PageSourceSearch

https://cdn.holded.com/frontend-next-gen/vendor-datadog.CbXwTgUc.js

js holded.com collected 2026-09-24 09:09:45 UTC 330,223 bytes, 9 lines download raw bytes

vendor: 7,502 bytes, line 1
1import{o as e,r as t,t as n}from"./rolldown-runtime.DAXXjFlN.js";var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function E(e,t){return ee(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var D=/\/+/g;function O(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+O(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(D,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=E(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(D,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+O(a,u),c+=ie(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+O(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function k(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var A=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},j={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=j,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ee(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:k}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,A)}catch(e){A(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()}
1,e.version=`19.2.4`})),i=n(((e,t)=>{t.exports=r()})),a=e(i(),1),o=`modulepreload`,s=function(e,t){return new URL(e,t).href},c={},l=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=l(t.map(t=>{if(t=s(t,n),t=u(t),t in c)return;c[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:o,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},u=e=>{throw TypeError(e)},d=(e,t,n)=>t.has(e)||u(`Cannot `+n),f=(e,t,n)=>(d(e,t,`read from private field`),n?n.call(e):t.get(e)),p=(e,t,n)=>t.has(e)?u(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),m=(e,t,n,r)=>(d(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),h=`popstate`;function g(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function _(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return S(``,{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:C(t)}return T(t,n,null,e)}function v(e,t){if(e===!1||e==null)throw Error(t)}function y(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function b(){return Math.random().toString(36).substring(2,10)}function x(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 S(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?w(t):t,state:n,key:t&&t.key||r||b(),mask:i}}function C({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 w(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 T(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:_.location,delta:t})}function f(e,t){s=`PUSH`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u()+1;let d=x(r,l),f=_.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:_.location,delta:1})}function p(e,t){s=`REPLACE`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u();let i=x(r,l),d=_.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:_.location,delta:0})}function m(e){return ee(i,e)}let _={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(h,d),c=e,()=>{i.removeEventListener(h,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 _}function ee(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),v(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:C(t);return i=i.replace(/ $/,`%20`),!n&&i.startsWith(`//`)&&(i=r+i),new URL(i,r)}var E,te=class{constructor(e){if(p(this,E,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(f(this,E).has(e))return f(this,E).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){f(this,E).set(e,t)}};E=new WeakMap;var ne=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function D(e){return ne.has(e)}var O=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function re(e){return O.has(e)}function ie(e){return e.index===!0}function ae(e,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(v(e.index!==!0||!e.children,`Cannot specify children on an index route`),v(i||!r[s],`Found a route id collision on id "${s}".  Route id's must be globally unique within Data Router usages`),ie(e)){let n={...e,id:s};return r[s]=k(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=k(n,t(n)),e.children&&(n.children=ae(e.children,t,o,r,i)),n}})}function k(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function A(e,t,n=`/`){return j(e,t,n,!1)}function j(e,t,n,r,i){let a=we((typeof t==`string`?w(t):t).pathname||`/`,n);if(a==null)return null;let o=i??se(e),s=null,c=Ce(a);for(let e=0;s==null&&e<o.length;++e)s=be(o[e],c,r);return s}function oe(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function se(e){let t=ce(e);return ue(t),t}function ce(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;v(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=Fe([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(v(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ce(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ve(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of le(e.path))a(e,t,!0,n)}),t}function le(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=le(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 ue(e){e.sort((e,t)=>e.score===t.score?ye(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var de=/^:[\w-]+$/,fe=3,pe=2,me=1,he=10,ge=-2,_e=e=>e===`*`;function ve(e,t){let n=e.split(`/`),r=n.length;return n.some(_e)&&(r+=ge),t&&(r+=pe),n.filter(e=>!_e(e)).reduce((e,t)=>e+(de.test(t)?fe:t===``?me:he),r)}function ye(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 be(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=xe({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=xe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
1Object.assign(i,u.params),o.push({params:i,pathname:Fe([a,u.pathname]),pathnameBase:Le(Fe([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Fe([a,u.pathnameBase]))}return o}function xe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Se(e.path,e.caseSensitive,e.end),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 Se(e,t=!1,n=!0){y(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)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ce(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return y(!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 we(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 Te({basename:e,pathname:t}){return t===`/`?e:Fe([e,t])}var Ee=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=e=>Ee.test(e);function Oe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?w(e):e,a;return n?(n=Pe(n),a=n.startsWith(`/`)?ke(n.substring(1),`/`):ke(n,t)):a=t,{pathname:a,search:Re(r),hash:ze(i)}}function ke(e,t){let n=Ie(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ae(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 je(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Me(e){let t=je(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ne(e,t,n,r=!1){let i;typeof e==`string`?i=w(e):(i={...e},v(!i.pathname||!i.pathname.includes(`?`),Ae(`?`,`pathname`,`search`,i)),v(!i.pathname||!i.pathname.includes(`#`),Ae(`#`,`pathname`,`hash`,i)),v(!i.search||!i.search.includes(`#`),Ae(`#`,`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=Oe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Pe=e=>e.replace(/\/\/+/g,`/`),Fe=e=>Pe(e.join(`/`)),Ie=e=>e.replace(/\/+$/,``),Le=e=>Ie(e).replace(/^\/*/,`/`),Re=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ze=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Be=class{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 Ve(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function He(e){return Fe(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ue=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function We(e,t){let n=e;if(typeof n!=`string`||!Ee.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ue)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=we(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{y(!1,`<Link to="${n}">
1 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 Ge=Symbol(`Uninstrumented`);function Ke(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){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Je(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Je(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Ge]??i,a=Je(n[e],t,(...e)=>Xe(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Ge]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Ge]??e,r=Je(n.middleware,t,(...e)=>Xe(e[0]));return r?(r[Ge]=t,r):e})),r}function qe(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Ge]??e.navigate,r=Je(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?C(n):`.`,...Ze(e,r??{})}});r&&(r[Ge]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Ge]??e.fetch,r=Je(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Ze(e,i??{})}});r&&(r[Ge]=t,e.fetch=r)}return e}function Je(e,t,n){return e.length===0?null:async(...r)=>{let i=await Ye(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Ye(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Ye(e,t,n,r-1),a=await o,v(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Xe(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Qe(t),params:{...r},pattern:i,context:$e(n)}}function Ze(e,t){return{currentUrl:C(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 Qe(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function $e(e){if(tt(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var et=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function tt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===et}var nt=[`POST`,`PUT`,`PATCH`,`DELETE`],rt=new Set(nt),it=[`GET`,...nt],at=new Set(it),ot=new Set([301,302,303,307,308]),st=new Set([307,308]),ct={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},lt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ut={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},dt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ft=`remix-router-transitions`,pt=Symbol(`ResetLoaderData`),mt,ht,gt,_t,vt=class{constructor(e){p(this,mt),p(this,ht),p(this,gt),p(this,_t),m(this,mt,e),m(this,ht,se(e))}get stableRoutes(){return f(this,mt)}get activeRoutes(){return f(this,gt)??f(this,mt)}get branches(){return f(this,_t)??f(this,ht)}get hasHMRRoutes(){return f(this,gt)!=null}setRoutes(e){m(this,mt,e),m(this,ht,se(e))}setHmrRoutes(e){m(this,gt,e),m(this,_t,se(e))}commitHmrRoutes(){f(this,gt)&&(m(this,mt,f(this,gt)),m(this,ht,f(this,_t)),m(this,gt,void 0),m(this,_t,void 0))}};mt=new WeakMap,ht=new WeakMap,gt=new WeakMap,_t=new WeakMap;function yt(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;v(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||dt,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...Ke(t.map(e=>
1e.route).filter(Boolean),e)})}let o={},s=new vt(ae(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||It,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,b=j(s.activeRoutes,e.history.location,c,!1,s.branches),x=!1,C=null,T,E;if(b==null&&!e.patchRoutesOnNavigation){let t=sn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=on(s.activeRoutes);T=!0,E=!T,b=n,C={[r.id]:t}}else if(b&&!e.hydrationData&&_t(b,s.activeRoutes,e.history.location.pathname).active&&(b=null),!b){T=!1,E=!T,b=[];let t=_t(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(x=!0,b=t.matches)}else if(b.some(e=>e.route.lazy))T=!1,E=!T;else if(!b.some(e=>wt(e.route)))T=!0,E=!T;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=b;if(n){let e=b.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}E=!1,T=!0,r.forEach(e=>{let r=Tt(e.route,t,n);E||=r.renderFallback,T&&=!r.shouldLoad})}let ne,D={historyAction:e.history.action,location:e.history.location,matches:b,initialized:T,renderFallback:E,navigation:ct,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},O=`POP`,re=null,ie=!1,k,A=!1,se=new Map,ce=null,le=!1,ue=!1,de=new Set,fe=new Map,pe=0,me=-1,he=new Map,ge=new Set,_e=new Map,ve=new Map,ye=new Set,be=new Map,xe,Se=null;function Ce(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(xe){xe(),xe=void 0;return}y(be.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=ot({currentLocation:D.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{xe=e});e.history.go(r*-1),at(i,{state:`blocked`,location:n,proceed(){at(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(D.blockers);e.set(i,ut),Oe({blockers:e})}}),re?.resolve(),re=null;return}return Me(t,n)}),n){jn(t,se);let e=()=>Mn(t,se);t.addEventListener(`pagehide`,e),ce=()=>t.removeEventListener(`pagehide`,e)}return D.initialized||Me(`POP`,D.location,{initialHydration:!0}),ne}function Te(){d&&d(),ce&&ce(),f.clear(),k&&k.abort(),D.fetchers.forEach((e,t)=>Ze(D.fetchers,t)),D.blockers.forEach((e,t)=>it(t))}function Ee(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(D,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function Oe(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}),D={...D,...e};let n=[],r=[];D.fetchers.forEach((e,t)=>{e.state===`idle`&&(ye.has(t)?n.push(t):r.push(t))}),ye.forEach(e=>{!D.fetchers.has(e)&&!fe.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(D,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ze(D.fetchers,e)),r.forEach(e=>D.fetchers.delete(e))}function ke(t,n,{flushSync:r}={}){let i=D.actionData!=null&&D.navigation.formMethod!=null&&Sn(D.navigation.formMethod)&&D.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?D.actionData:null;let o=n.loaderData?nn(D.loaderData,n.loaderData,n.matches||[],n.errors):D.loaderData,c=D.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,ut)));let l=le?!1:gt(t,n.matches||D.matches),u=ie===!0||D.navigation.formMethod!=null&&Sn(D.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),le||O===`POP`||(O===`PUSH`?e.history.push(t,t.state):O===`REPLACE`&&e.history.replace(t,t.state));let d;if(O===`POP`){let e=se.get(D.location.pathname);e&&e.has(t.pathname)?d={currentLocation:D.location,nextLocation:t}:se.has(t.pathname)&&(d={currentLocation:t,nextLocation:D.location})}else if(A){let e=se.get(D.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),se.set(D.location.pathname,e)),d={currentLocation:D.location,nextLocation:t}}Oe({...n,actionData:a,loaderData:o,historyAction:O,location:t,initialized:!0,renderFallback:!1,navigation:ct,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),O=`POP`,ie=!1,A=!1,le=!1,ue=!1,re?.resolve(),re=null,Se?.resolve(),Se=null}async function Ae(t,n){if(re?.resolve(),re=null,typeof t==`number`){re||=Nn();let n=re.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=St(!1,xt(D.location,D.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?w(n.mask):{...D.location.mask,...n.mask}});let s=D.location,l=S(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&Sn(i.formMethod)&&i.formAction===D.location.pathname+D.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=ot({currentLocation:s,nextLocation:l,historyAction:d});if(m){at(m,{state:`blocked`,location:l,proceed(){at(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),Ae(t,n)},reset(){let e=new Map(D.blockers);e.set(m,ut),Oe({blockers:e})}});return}await Me(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function je(){Se||=Nn(),We(),Oe({revalidation:`loading`});let e=Se.promise;return D.navigation.state===`submitting`?e:D.navigation.state===`idle`?(Me(D.historyAction,D.location,{startUninterruptedRevalidation:!0}
1),e):(Me(O||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:A===!0}),e)}async function Me(t,n,r){k&&k.abort(),k=null,O=t,le=(r&&r.startUninterruptedRevalidation)===!0,ht(D.location,D.matches),ie=(r&&r.preventScrollReset)===!0,A=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&D.matches&&D.matches.length>0&&!x?D.matches:j(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&D.initialized&&!ue&&un(D.location,n)&&!(r&&r.submission&&Sn(r.submission.formMethod))){ke(n,{matches:a},{flushSync:o});return}let l=_t(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=ft(n.pathname);ke(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;k=new AbortController;let d=Xt(e.history,n,k.signal,r&&r.submission),f=e.getContext?await e.getContext():new te,p;if(r&&r.pendingError)p=[an(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Sn(r.submission.formMethod)){let i=await Ne(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(hn(t)&&Ve(t.error)&&t.error.status===404){k=null,ke(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=En(n,a,t,r.submission),o=!1,l.active=!1,d=Xt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Pe(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||(k=null,ke(n,{matches:h||a,...rn(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Ne(t,n,i,l,u,d,f,p,m={}){if(We(),Oe({navigation:Dn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await yt(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}=on(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=an(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}=ft(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=wn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:sn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await He(t,n,Ht(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(gn(h)){let n;return n=m&&m.replace!=null?m.replace:Yt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===D.location.pathname+D.location.search,await Be(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(hn(h)){let e=an(l,g.route.id);return(m&&m.replace)!==!0&&(O=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Pe(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||En(n,i,l,p),x=p||m||Tn(b),S=!le&&!g;if(d){if(S){let e=Fe(v);Oe({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await yt(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}=on(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=an(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}=ft(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=Ct(t,u,a,o,e.history,D,i,x,n,g?[]:r,g===!0,ue,de,ye,_e,ge,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(me=++pe,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(D.fetchers),t=tt(e);return ke(n,{matches:i,loaderData:{},errors:v&&hn(v[1])?{[v[0]]:v[1].error}:null,...rn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Fe(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Ie(T)),Oe(e,{flushSync:_})}
1T.forEach(e=>{$e(e.key),e.controller&&fe.set(e.key,e.controller)});let ee=()=>T.forEach(e=>$e(e.key));k&&k.signal.addEventListener(`abort`,ee);let{loaderResults:E,fetcherResults:te}=await Ue(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener(`abort`,ee),T.forEach(e=>fe.delete(e.key));let ne=cn(E);if(ne)return await Be(t,ne.result,!0,{replace:h}),{shortCircuited:!0};if(ne=cn(te),ne)return ge.add(ne.key),await Be(t,ne.result,!0,{replace:h}),{shortCircuited:!0};let O=new Map(D.fetchers),{loaderData:re,errors:ie}=tn(D,i,E,v,T,te,O);g&&D.errors&&(ie={...D.errors,...ie});let ae=tt(O),A=nt(me,O),j=ae||A||T.length>0;return{matches:i,loaderData:re,errors:ie,...j?{workingFetchers:O}:{}}}function Fe(e){if(e&&!hn(e[1]))return{[e[0]]:e[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function Ie(e){let t=new Map(D.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=On(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Le(t,n,r,i){$e(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=xt(D.location,D.matches,c,r,n,i?.relative),u=j(o,l,c,!1,s.branches),d=_t(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){Je(t,n,sn(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=St(!0,l,i);if(m){Je(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new te,g=(i&&i.preventScrollReset)===!0;if(p&&Sn(p.formMethod)){await Re(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}_e.set(t,{routeId:n,path:f}),await ze(t,n,f,u,h,d.active,a,g,p)}async function Re(t,n,i,l,u,d,f,p,m,h){We(),_e.delete(t),Ge(t,kn(m,D.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Xt(e.history,i,g.signal,m);if(d){let e=await yt(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Je(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{Je(t,n,sn(404,{pathname:i}),{flushSync:f});return}}let y=wn(l,i);if(!y.route.action&&!y.route.lazy){Je(t,n,sn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}fe.set(t,g);let b=pe,x=Ht(a,o,_,i,l,y,r,u),S=await He(_,i,x,u,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(_.signal.aborted){fe.get(t)===g&&fe.delete(t);return}if(ye.has(t)){if(gn(C)||hn(C)){Ge(t,An(void 0));return}}else{if(gn(C))if(fe.delete(t),me>b){Ge(t,An(void 0));return}else return ge.add(t),Ge(t,On(m)),Be(_,C,!1,{fetcherSubmission:m,preventScrollReset:p});if(hn(C)){Je(t,n,C.error);return}}let w=D.navigation.location||D.location,T=Xt(e.history,w,g.signal),ee=s.activeRoutes,E=D.navigation.state===`idle`?D.matches:j(ee,D.navigation.location,c,!1,s.branches);v(E,`Didn't find any matches after fetcher action`);let te=++pe;he.set(t,te);let{dsMatches:ne,revalidatingFetchers:re}=Ct(T,u,a,o,e.history,D,E,m,w,r,!1,ue,de,ye,_e,ge,ee,c,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],h),ie=On(m,C.data),ae=new Map(D.fetchers);ae.set(t,ie),re.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=ae.get(t),r=On(void 0,n?n.data:void 0);ae.set(t,r),$e(t),e.controller&&fe.set(t,e.controller)}),Oe({fetchers:ae});let A=()=>re.forEach(e=>$e(e.key));g.signal.addEventListener(`abort`,A);let{loaderResults:oe,fetcherResults:se}=await Ue(ne,re,T,w,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,A),he.delete(t),fe.delete(t),re.forEach(e=>fe.delete(e.key));let ce=D.fetchers.has(t),le=e=>{if(!ce)return e;let n=new Map(e.fetchers);return n.set(t,An(C.data)),{...e,fetchers:n}},ve=cn(oe);if(ve)return D=le(D),Be(T,ve.result,!1,{preventScrollReset:p});if(ve=cn(se),ve)return ge.add(ve.key),D=le(D),Be(T,ve.result,!1,{preventScrollReset:p});let be=new Map(D.fetchers);ce&&be.set(t,An(C.data));let{loaderData:xe,errors:Se}=tn(D,E,oe,void 0,re,se,be);nt(te,be),D.navigation.state===`loading`&&te>me?(v(O,`Expected pending action`),k&&k.abort(),ke(D.navigation.location,{matches:E,loaderData:xe,errors:Se,fetchers:be})):(Oe({errors:Se,loaderData:nn(D.loaderData,xe,E,Se),fetchers:be}),ue=!1)}async function ze(t,n,i,s,c,l,u,d,f){let p=D.fetchers.get(t);Ge(t,On(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Xt(e.history,i,m.signal);if(l){let e=await yt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Je(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{Je(t,n,sn(404,{pathname:i}),{flushSync:u});return}}let g=wn(s,i);fe.set(t,m);let _=pe,v=await He(h,i,Ht(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(fe.get(t)===m&&fe.delete(t),!h.signal.aborted){if(ye.has(t)){Ge(t,An(void 0));return}if(gn(y))if(me>_){Ge(t,An(void 0));return}else{ge.add(t),await Be(h,y,!1,{preventScrollReset:d});return}if(hn(y)){Je(t,n,y.error);return}Ge(t,An(y.data))}}async function Be(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(re?.resolve(),re=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ue=!0);let d=i.response.headers.get(`Location`);v(d,`Expected a Location header on the redirect Response`),d=Yt(d,new URL(r.url),c,e.history);let f=S(D.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;
1else if(De(d)){let n=ee(t,d,!0);e=n.origin!==t.location.origin||we(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}k=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=D.navigation;!o&&!s&&m&&h&&g&&(o=Tn(D.navigation));let _=o||s;st.has(i.response.status)&&_&&Sn(_.formMethod)?await Me(p,f,{submission:{..._,formAction:d},preventScrollReset:l||ie,enableViewTransition:a?A:void 0}):await Me(p,f,{overrideNavigation:En(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||ie,enableViewTransition:a?A:void 0})}async function He(e,t,n,r,i){let a,o={};try{a=await Ut(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(!Sn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!D.loaderData.hasOwnProperty(e.route.id)&&(!D.errors||!D.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(mn(r)){let i=r.result;o[t]={type:`redirect`,response:qt(i,e,t,n,c)}}else o[t]=await Kt(r);return o}async function Ue(e,t,n,r,i){let a=He(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await He(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:sn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function We(){ue=!0,_e.forEach((e,t)=>{fe.has(t)&&de.add(t),$e(t)})}function Ge(e,t,n={}){let r=new Map(D.fetchers);r.set(e,t),Oe({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Je(e,t,n,r={}){let i=an(D.matches,t),a=new Map(D.fetchers);Ze(a,e),Oe({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ye(e){return ve.set(e,(ve.get(e)||0)+1),ye.has(e)&&ye.delete(e),D.fetchers.get(e)||lt}function Xe(e,t){$e(e,t?.reason),Ge(e,An(null))}function Ze(e,t){let n=D.fetchers.get(t);fe.has(t)&&!(n&&n.state===`loading`&&he.has(t))&&$e(t),_e.delete(t),he.delete(t),ge.delete(t),ye.delete(t),de.delete(t),e.delete(t)}function Qe(e){let t=(ve.get(e)||0)-1;t<=0?(ve.delete(e),ye.add(e)):ve.set(e,t),Oe({fetchers:new Map(D.fetchers)})}function $e(e,t){let n=fe.get(e);n&&(n.abort(t),fe.delete(e))}function et(e,t){for(let n of e){let e=t.get(n);v(e,`Expected fetcher: ${n}`);let r=An(e.data);t.set(n,r)}}function tt(e){let t=[],n=!1;for(let r of ge){let i=e.get(r);v(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ge.delete(r),t.push(r),n=!0)}return et(t,e),n}function nt(e,t){let n=[];for(let[r,i]of he)if(i<e){let e=t.get(r);v(e,`Expected fetcher: ${r}`),e.state===`loading`&&($e(r),he.delete(r),n.push(r))}return et(n,t),n.length>0}function rt(e,t){let n=D.blockers.get(e)||ut;return be.get(e)!==t&&be.set(e,t),n}function it(e){D.blockers.delete(e),be.delete(e)}function at(e,t){let n=D.blockers.get(e)||ut;v(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(D.blockers);r.set(e,t),Oe({blockers:r})}function ot({currentLocation:e,nextLocation:t,historyAction:n}){if(be.size===0)return;be.size>1&&y(!1,`A router only supports one blocker at a time`);let r=Array.from(be.entries()),[i,a]=r[r.length-1],o=D.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function ft(e){let t=sn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=on(n);return{notFoundMatches:r,route:i,error:t}}function pt(e,t,n){if(m=e,g=t,h=n||null,!_&&D.navigation===ct){_=!0;let e=gt(D.location,D.matches);e!=null&&Oe({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function mt(e,t){return h&&h(e,t.map(e=>oe(e,D.loaderData)))||e.key}function ht(e,t){if(m&&g){let n=mt(e,t);m[n]=g()}}function gt(e,t){if(m){let n=mt(e,t),r=m[n];if(typeof r==`number`)return r}return null}function _t(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:j(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:j(n,r,c,!0,e)}}return{active:!1,matches:null}}async function yt(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||kt(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=j(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=j(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&bt(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=j(s.activeRoutes,n,c,!0,u),!f||bt(l,f))return{type:`success`,matches:null};l=f}}function bt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Et(e){o={},s.setHmrRoutes(ae(e,a,void 0,o))}function Dt(e,t,n=!1){kt(e,t,s,o,a,n),s.hasHMRRoutes||Oe({})}return ne={get basename(){return c},get future(){return u},get state(){return D},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:Ce,subscribe:Ee,enableScrollRestoration:pt,navigate:Ae,fetch:Le,revalidate:je,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ye,resetFetcher:Xe,deleteFetcher:Qe,dispose:Te,getBlocker:rt,deleteBlocker:it,patchRoutes:Dt,_internalFetchControllers:fe,_internalSetRoutes:Et,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){Oe(e)}},e.instrumentations&&(ne=qe(ne,e.instrumentations.map(e=>
1e.router).filter(Boolean))),ne}function bt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function xt(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=Ne(r||`.`,Me(o),we(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Cn(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=Te({basename:n,pathname:c.pathname})),C(c)}function St(e,t,n){if(!n||!bt(n))return{path:t};if(n.formMethod&&!xn(n.formMethod))return{path:t,error:sn(405,{method:n.formMethod})};let r=()=>({path:t,error:sn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=ln(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Sn(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}
2`,``):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(!Sn(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()}}}v(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Qt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Qt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=$t(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=$t(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(Sn(c.formMethod))return{path:t,submission:c};let l=w(t);return e&&l.search&&Cn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:C(l),submission:c}}function Ct(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?hn(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&&hn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let ee=b?b[1].statusCode:void 0,E=ee&&ee>=400,te={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:ee},ne=He(o),D=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(!wt(s))f=!1;else if(u){let{shouldLoad:e}=Tt(s,a.loaderData,a.errors);f=e}else Et(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Vt(n,r,e,c,ne,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:E?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Dt(a.matches[o],i)&&(p=!0):p=!0;let m={...te,defaultShouldRevalidate:p},h=Ot(i,m);return Vt(n,r,e,c,ne,i,l,t,h,m,x)}),O=[];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=j(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;O.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=wn(b,e.path),C=new AbortController,w=Xt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Ht(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Ht(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:E?!1:d;let a={...te,defaultShouldRevalidate:i};Ot(S,a)&&(T=Ht(n,r,w,e.path,b,S,l,t,a))}T&&O.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:D,revalidatingFetchers:O}}function wt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Tt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!wt(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}}function Et(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Dt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Ot(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function kt(e,t,n,r,i,a){let o;if(e){let t=r[e];v(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];
2if(t.forEach(e=>{let t=o.find(t=>At(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ae(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]=ae([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 At(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=>At(e,t)))??!1:!1}var jt=new WeakMap,Mt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(v(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=jt.get(i);o||(o={},jt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=D(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)y(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)y(!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},Nt=new WeakMap;function Pt(e,t,n,r,i){let a=n[e.id];if(v(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Nt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{v(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=re(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?y(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?y(!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 Nt.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=Mt({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 Ft(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 It(e){return e.matches.some(e=>e.route.middleware)?Lt(e,()=>Ft(e)):Ft(e)}function Lt(e,t){return Rt(e,t,e=>{if(bn(e))throw e;return e},fn,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=an(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Rt(e,t,n,r,i){let{matches:a,...o}=e;return await zt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function zt(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()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await zt(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 Bt(e,t,n,r,i){let a=Mt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Pt(r.route,Sn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Vt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Bt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Ot(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Ot(a,{...l,defaultShouldRevalidate:e}):Ot(a,l):c}
2,resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Sn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Sn(n.method)||!p)?Wt({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 Ht(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Vt(e,t,n,r,He(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Bt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Ut(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:Zt(t,n),pattern:He(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 Lt(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 Wt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Sn(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:Zt(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 sn(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 sn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Gt(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 Kt(e){let{result:t,type:n}=e;if(vn(t)){let e;try{e=await Gt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Be(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?_n(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:dn(t),statusCode:Ve(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ve(t)?t.status:void 0}:_n(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 qt(e,t,n,r,i){let a=e.headers.get(`Location`);if(v(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!De(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=xt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Jt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Yt(e,t,n,r){if(De(e)){let r=e,i=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(Jt.includes(i.protocol))throw Error(`Invalid redirect location`);let a=we(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Pe(i.pathname)+i.search+i.hash}try{let t=r.createURL(e);if(Jt.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function Xt(e,t,n,r){let i=e.createURL(ln(t)).toString(),a={signal:n};if(r&&Sn(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=Qt(r.formData):a.body=r.formData}
2return new Request(i,a)}function Zt(e,t){let n=new URL(e.url),r=typeof t==`string`?w(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);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Qt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function $t(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function en(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&hn(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(v(!gn(f),`Cannot handle redirect results in processLoaderData`),hn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=an(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=pt),c||(c=!0,s=Ve(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 tn(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=en(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(v(s,`Did not find corresponding fetcher result`),hn(s)){let t=an(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(gn(s))v(!1,`Unhandled fetcher revalidation redirect`);else{let e=An(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function nn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==pt).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 rn(e){return e?hn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function an(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function on(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 sn(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 Be(e||500,o,Error(s),!0)}function cn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(gn(r))return{key:n,result:r}}}function ln(e){return C({...typeof e==`string`?w(e):e,hash:``})}function un(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function dn(e){return new Be(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function fn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&pn(t))}function pn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function mn(e){return vn(e.result)&&ot.has(e.result.status)}function hn(e){return e.type===`error`}function gn(e){return(e&&e.type)===`redirect`}function _n(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function vn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function yn(e){return ot.has(e)}function bn(e){return vn(e)&&yn(e.status)&&e.headers.has(`Location`)}function xn(e){return at.has(e.toUpperCase())}function Sn(e){return rt.has(e.toUpperCase())}function Cn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function wn(e,t){let n=typeof t==`string`?w(t).search:t.search;if(e[e.length-1].route.index&&Cn(n||``))return e[e.length-1];let r=je(e);return r[r.length-1]}function Tn(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 En(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 Dn(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 On(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 kn(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 An(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 jn(e,t){try{let n=e.sessionStorage.getItem(ft);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 Mn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ft,JSON.stringify(n))}catch(e){y(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Nn(){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 Pn=a.createContext(null);Pn.displayName=`DataRouter`;var Fn=a.createContext(null);Fn.displayName=`DataRouterState`;var In=a.createContext(!1);function Ln(){return a.useContext(In)}var Rn=a.createContext({isTransitioning:!1});Rn.displayName=`ViewTransition`;var zn=a.createContext(new Map);zn.displayName=`Fetchers`;var Bn=a.createContext(null);Bn.displayName=`Await`;var Vn=a.createContext(null);Vn.displayName=`Navigation`;var Hn=a.createContext(null);Hn.displayName=`Location`;var Un=a.createContext({outlet:null,matches:[],isDataRoute:!1});Un.displayName=`Route`;var Wn=a.createContext(null);Wn.displayName=`RouteError`;var Gn=`REACT_ROUTER_ERROR`,Kn=`REDIRECT`,qn=`ROUTE_ERROR_RESPONSE`;function Jn(e){if(e.startsWith(`${Gn}:${Kn}:{`))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 Yn(e){if(e.startsWith(`${Gn}:${qn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Be(t.status,t.statusText,t.data)}catch{}}function Xn(e,{relative:t}={}){v(Zn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=a.useContext(Vn),{hash:i,pathname:o,search:s}=cr(e,{relative:t}),c=o;return n!==`/`&&(c=o===`/`?n:Fe([n,o])),r.createHref({pathname:c,search:s,hash:i})}function Zn(){return a.useContext(Hn)!=null}
2function Qn(){return v(Zn(),`useLocation() may be used only in the context of a <Router> component.`),a.useContext(Hn).location}function $n(e){v(Zn(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=Qn();return a.useMemo(()=>xe(e,Ce(t)),[t,e])}var er=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function tr(e){a.useContext(Vn).static||a.useLayoutEffect(e)}function nr(){let{isDataRoute:e}=a.useContext(Un);return e?kr():rr()}function rr(){v(Zn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=a.useContext(Pn),{basename:t,navigator:n}=a.useContext(Vn),{matches:r}=a.useContext(Un),{pathname:i}=Qn(),o=JSON.stringify(Me(r)),s=a.useRef(!1);return tr(()=>{s.current=!0}),a.useCallback((r,a={})=>{if(y(s.current,er),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=Ne(r,JSON.parse(o),i,a.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Fe([t,c.pathname])),(a.replace?n.replace:n.push)(c,a.state,a)},[t,n,o,i,e])}var ir=a.createContext(null);function ar(){return a.useContext(ir)}function or(e){let t=a.useContext(Un).outlet;return a.useMemo(()=>t&&a.createElement(ir.Provider,{value:e},t),[t,e])}function sr(){let{matches:e}=a.useContext(Un);return e[e.length-1]?.params??{}}function cr(e,{relative:t}={}){let{matches:n}=a.useContext(Un),{pathname:r}=Qn(),i=JSON.stringify(Me(n));return a.useMemo(()=>Ne(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lr(e,t){return ur(e,t)}function ur(e,t,n){v(Zn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=a.useContext(Vn),{matches:i}=a.useContext(Un),o=i[i.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,u=o&&o.route;{let e=u&&u.path||``;jr(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
4Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=Qn(),f;if(t){let e=typeof t==`string`?w(t):t;v(l===`/`||e.pathname?.startsWith(l),`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 "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):A(e,{pathname:m});y(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),y(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=_r(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Fe([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:Fe([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?a.createElement(Hn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function dr(){let e=Er(),t=Ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},o={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=a.createElement(a.Fragment,null,a.createElement(`p`,null,`💿 Hey developer 👋`),a.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,a.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,a.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),a.createElement(a.Fragment,null,a.createElement(`h2`,null,`Unexpected Application 
4Error!`),a.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?a.createElement(`pre`,{style:i},n):null,s)}var fr=a.createElement(dr,null),pr=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}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=Yn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:a.createElement(Un.Provider,{value:this.props.routeContext},a.createElement(Wn.Provider,{value:e,children:this.props.component}));return this.context?a.createElement(hr,{error:e},t):t}};pr.contextType=In;var mr=new WeakMap;function hr({children:e,error:t}){let{basename:n}=a.useContext(Vn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Jn(t.digest);if(e){let r=mr.get(t);if(r)throw r;let i=We(e.location,n);if(Ue&&!mr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mr.set(t,n),n}return a.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gr({routeContext:e,match:t,children:n}){let r=a.useContext(Pn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(Un.Provider,{value:e},n)}function _r(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,o=r?.errors;if(o!=null){let e=i.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);v(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:a}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:He(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=o&&n.route.id?o[n.route.id]:void 0,p=n.route.errorElement||fr,s&&(c<0&&l===0?(jr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(gr,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?a.createElement(pr,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function vr(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function yr(e){let t=a.useContext(Pn);return v(t,vr(e)),t}function br(e){let t=a.useContext(Fn);return v(t,vr(e)),t}function xr(e){let t=a.useContext(Un);return v(t,vr(e)),t}function Sr(e){let t=xr(e),n=t.matches[t.matches.length-1];return v(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Cr(){return Sr(`useRouteId`)}function wr(){let e=br(`useNavigation`);return a.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Tr(){let{matches:e,loaderData:t}=br(`useMatches`);return a.useMemo(()=>e.map(e=>oe(e,t)),[e,t])}function Er(){let e=a.useContext(Wn),t=br(`useRouteError`),n=Sr(`useRouteError`);return e===void 0?t.errors?.[n]:e}var Dr=0;function Or(e){let{router:t,basename:n}
4=yr(`useBlocker`),r=br(`useBlocker`),[i,o]=a.useState(``),s=a.useCallback(t=>{if(typeof e!=`function`)return!!e;if(n===`/`)return e(t);let{currentLocation:r,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...r,pathname:we(r.pathname,n)||r.pathname},nextLocation:{...i,pathname:we(i.pathname,n)||i.pathname},historyAction:a})},[n,e]);return a.useEffect(()=>{let e=String(++Dr);return o(e),()=>t.deleteBlocker(e)},[t]),a.useEffect(()=>{i!==``&&t.getBlocker(i,s)},[t,i,s]),i&&r.blockers.has(i)?r.blockers.get(i):ut}function kr(){let{router:e}=yr(`useNavigate`),t=Sr(`useNavigate`),n=a.useRef(!1);return tr(()=>{n.current=!0}),a.useCallback(async(r,i={})=>{y(n.current,er),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ar={};function jr(e,t,n){!t&&!Ar[e]&&(Ar[e]=!0,y(!1,n))}var Mr={};function Nr(e,t){!e&&!Mr[t]&&(Mr[t]=!0,console.warn(t))}var Pr=a.useOptimistic,Fr=()=>void 0;function Ir(e){return Pr?Pr(e):[e,Fr]}function Lr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&y(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:a.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&y(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&y(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Rr=[`HydrateFallback`,`hydrateFallbackElement`],zr=class{constructor(){this.status=`pending`,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 Br({router:e,flushSync:t,onError:n,useTransitions:r}){r=Ln()||r;let[i,o]=a.useState(e.state),[s,c]=Ir(i),[l,u]=a.useState(),[d,f]=a.useState({isTransitioning:!1}),[p,m]=a.useState(),[h,g]=a.useState(),[_,v]=a.useState(),y=a.useRef(new Map),b=a.useCallback((i,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:He(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),Nr(d===!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 b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Nr(_==null||b,"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."),!_||!b){t&&d?t(()=>o(i)):r===!1?o(i):a.startTransition(()=>{r===!0&&c(e=>
4Vr(e,i)),o(i)});return}if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>o(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,c,n]);a.useLayoutEffect(()=>e.subscribe(b),[e,b]),a.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new zr)},[d]),a.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?o(t):a.startTransition(()=>{r===!0&&c(e=>Vr(e,t)),o(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,c]),a.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),a.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=a.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]),S=e.basename||`/`,C=a.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return a.createElement(a.Fragment,null,a.createElement(Pn.Provider,{value:C},a.createElement(Fn.Provider,{value:s},a.createElement(zn.Provider,{value:y.current},a.createElement(Rn.Provider,{value:d},a.createElement(qr,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:r},a.createElement(Hr,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function Vr(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 Hr=a.memo(Ur);function Ur({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return ur(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Wr({to:e,replace:t,state:n,relative:r}){v(Zn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=a.useContext(Vn);y(!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:o}=a.useContext(Un),{pathname:s}=Qn(),c=nr(),l=Ne(e,Me(o),s,r===`path`),u=JSON.stringify(l);return a.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Gr(e){return or(e.context)}function Kr(e){v(!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 qr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:o=!1,useTransitions:s}){v(!Zn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=a.useMemo(()=>({basename:c,navigator:i,static:o,useTransitions:s,future:{}}),[c,i,o,s]);typeof n==`string`&&(n=w(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=a.useMemo(()=>{let e=we(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return y(g!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:a.createElement(Vn.Provider,{value:l},a.createElement(Hn.Provider,{children:t,value:g}))}function Jr({children:e,location:t}){return lr(Yr(e),t)}a.Component;function Yr(e,t=[]){let n=[];
4return a.Children.forEach(e,(e,r)=>{if(!a.isValidElement(e))return;let i=[...t,r];if(e.type===a.Fragment){n.push.apply(n,Yr(e.props.children,i));return}v(e.type===Kr,`[${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>`),v(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let o={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Yr(e.props.children,i)),n.push(o)}),n}var Xr=`get`,Zr=`application/x-www-form-urlencoded`;function Qr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function $r(e){return Qr(e)&&e.tagName.toLowerCase()===`button`}function ei(e){return Qr(e)&&e.tagName.toLowerCase()===`form`}function ti(e){return Qr(e)&&e.tagName.toLowerCase()===`input`}function ni(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ri(e,t){return e.button===0&&(!t||t===`_self`)&&!ni(e)}function ii(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 ai(e,t){let n=ii(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var oi=null;function si(){if(oi===null)try{new FormData(document.createElement(`form`),0),oi=!1}catch{oi=!0}return oi}var ci=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function li(e){return e!=null&&!ci.has(e)?(y(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Zr}"`),null):e}function ui(e,t){let n,r,i,a,o;if(ei(e)){let o=e.getAttribute(`action`);r=o?we(o,t):null,n=e.getAttribute(`method`)||Xr,i=li(e.getAttribute(`enctype`))||Zr,a=new FormData(e)}else if($r(e)||ti(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?we(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Xr,i=li(e.getAttribute(`formenctype`))||li(o.getAttribute(`enctype`))||Zr,a=new FormData(o,e),!si()){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(Qr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Xr,r=null,i=Zr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var di={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},fi=/[&><\u2028\u2029]/g;function pi(e){return e.replace(fi,e=>di[e])}function mi(e,t){if(e===!1||e==null)throw Error(t)}function hi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&we(i.pathname,t)===`/`?i.pathname=`${Ie(t)}/_root.${r}`:i.pathname=`${Ie(i.pathname)}.${r}`,i}async function gi(e,t){if(e.id in t)return t[e.id];try{let n=await l(()=>import(e.module),[],import.meta.url);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 _i(e){return e!=null&&typeof e.page==`string`}function vi(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 yi(e,t,n){return wi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await gi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(vi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function bi(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,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)=>
4o(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 xi(e,t,{includeHydrateFallback:n}={}){return Si(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 Si(e){return[...new Set(e)]}function Ci(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function wi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!_i(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ci(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Ti(){let e=a.useContext(Pn);return mi(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ei(){let e=a.useContext(Fn);return mi(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Di=a.createContext(void 0);Di.displayName=`FrameworkContext`;function Oi(){let e=a.useContext(Di);return mi(e,`You must render this element inside a <HydratedRouter> element`),e}function ki(e,t){let n=a.useContext(Di),[r,i]=a.useState(!1),[o,s]=a.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=a.useRef(null);a.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[o,p,{onFocus:Ai(c,m),onBlur:Ai(l,h),onMouseEnter:Ai(u,m),onMouseLeave:Ai(d,h),onTouchStart:Ai(f,m)}]:[o,p,{}]:[!1,p,{}]}function Ai(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ji({page:e,...t}){let n=Ln(),{router:r}=Ti(),i=a.useMemo(()=>A(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?a.createElement(Ni,{page:e,matches:i,...t}):a.createElement(Pi,{page:e,matches:i,...t}):null}function Mi(e){let{manifest:t,routeModules:n}=Oi(),[r,i]=a.useState([]);return a.useEffect(()=>{let r=!1;return yi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ni({page:e,matches:t,...n}){let r=Qn(),{future:i}=Oi(),{basename:o}=Ti(),s=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=hi(e,o,i.v8_trailingSlashAwareDataRequests,`rsc`),a=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?a=!0:s.push(e.route.id);return a&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,i.v8_trailingSlashAwareDataRequests,e,r,t]);return a.createElement(a.Fragment,null,s.map(e=>a.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Pi({page:e,matches:t,...n}){let r=Qn(),{future:i,manifest:o,routeModules:s}=Oi(),{basename:c}=Ti(),{loaderData:l,matches:u}=Ei(),d=a.useMemo(()=>bi(e,t,u,o,r,`data`),[e,t,u,o,r]),f=a.useMemo(()=>bi(e,t,u,o,r,`assets`),[e,t,u,o,r]),p=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,a=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:n.add(e.route.id))}),n.size===0)return[];let u=hi(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return a&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,o,d,t,e,s]),m=a.useMemo(()=>xi(f,o),[f,o]),h=Mi(f);return a.createElement(a.Fragment,null,p.map(e=>a.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>a.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>a.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Fi(...e){return t=>
4{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}a.Component;var Ii=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Ii&&(window.__reactRouterVersion=`7.17.0`)}catch{}function Li(e,t){return yt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:_({window:t?.window}),hydrationData:t?.hydrationData||Ri(),routes:e,mapRouteProperties:Lr,hydrationRouteProperties:Rr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ri(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:zi(e.errors)}),e}function zi(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 Be(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(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 Bi({basename:e,children:t,history:n,useTransitions:r}){let[i,o]=a.useState({action:n.action,location:n.location}),s=a.useCallback(e=>{r===!1?o(e):a.startTransition(()=>o(e))},[r]);return a.useLayoutEffect(()=>n.listen(s),[n,s]),a.createElement(qr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Bi.displayName=`unstable_HistoryRouter`;var Vi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hi=a.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:o,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=a.useContext(Vn),y=typeof u==`string`&&Vi.test(u),b=We(u,g);u=b.to;let x=Xn(u,{relative:r}),S=Qn(),C=null;if(s){let e=Ne(s,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:Fe([g,e.pathname])),C=_.createHref(e)}let[w,T,ee]=ki(n,m),E=Yi(u,{replace:o,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function te(t){e&&e(t),t.defaultPrevented||E(t)}let ne=!(b.isExternal||i),D=a.createElement(`a`,{...m,...ee,href:(ne?C:void 0)||b.absoluteURL||x,onClick:ne?te:e,ref:Fi(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?a.createElement(a.Fragment,null,D,a.createElement(ji,{page:x})):D});Hi.displayName=`Link`;var Ui=a.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:o,viewTransition:s,children:c,...l},u){let d=cr(o,{relative:l.relative}),f=Qn(),p=a.useContext(Fn),{navigator:m,basename:h}=a.useContext(Vn),g=p!=null&&oa(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=we(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let ee=typeof i==`function`?i(C):i;return a.createElement(Hi,{...l,"aria-current":w,className:T,ref:u,style:ee,to:o,viewTransition:s},typeof c==`function`?c(C):c)});Ui.displayName=`NavLink`;var Wi=a.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:s=Xr,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=a.useContext(Vn),_=$i(),v=ea(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&Vi.test(c);return a.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?a.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});Wi.displayName=`Form`;function Gi({getKey:e,storageKey:t,...n}){let r=a.useContext(Di),{basename:i}=a.useContext(Vn),o=Qn(),s=Tr();ia({getKey:e,storageKey:t});let c=a.useMemo(()=>
4{if(!r||!e)return null;let t=ra(o,s,i,e);return t===o.key?null:t},[]);if(!r||r.isSpaMode)return null;let l=((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];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return a.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${pi(JSON.stringify(t||ta))}, ${pi(JSON.stringify(c))})`}})}Gi.displayName=`ScrollRestoration`;function Ki(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function qi(e){let t=a.useContext(Pn);return v(t,Ki(e)),t}function Ji(e){let t=a.useContext(Fn);return v(t,Ki(e)),t}function Yi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=nr(),f=Qn(),p=cr(e,{relative:s});return a.useCallback(m=>{if(ri(m,t)){m.preventDefault();let t=n===void 0?C(f)===C(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?a.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,o,s,c,l,u])}function Xi(e){y(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=a.useRef(ii(e)),n=a.useRef(!1),r=Qn(),i=a.useMemo(()=>ai(r.search,n.current?null:t.current),[r.search]),o=nr();return[i,a.useCallback((e,t)=>{let r=ii(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,o(`?`+r,t)},[o,i])]}var Zi=0,Qi=()=>`__${String(++Zi)}__`;function $i(){let{router:e}=qi(`useSubmit`),{basename:t}=a.useContext(Vn),n=Cr(),r=e.fetch,i=e.navigate;return a.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ui(e,t);if(a.navigate===!1){let e=a.fetcherKey||Qi();await r(e,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})}else 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 ea(e,{relative:t}={}){let{basename:n}=a.useContext(Vn),r=a.useContext(Un);v(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),o={...cr(e||`.`,{relative:t})},s=Qn();if(e==null){o.search=s.search;let e=new URLSearchParams(o.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();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:Fe([n,o.pathname])),C(o)}var ta=`react-router-scroll-positions`,na={};function ra(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:we(e.pathname,n)||e.pathname},t)),i??=e.key,i}function ia({getKey:e,storageKey:t}={}){let{router:n}=qi(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Ji(`useScrollRestoration`),{basename:o}=a.useContext(Vn),s=Qn(),c=Tr(),l=wr();a.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),aa(a.useCallback(()=>{if(l.state===`idle`){let t=ra(s,c,o,e);na[t]=window.scrollY}try{sessionStorage.setItem(t||ta,JSON.stringify(na))}catch(e){y(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,o,s,c,t])),typeof document<`u`&&(a.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||ta);e&&(na=JSON.parse(e))}catch{}},[t]),a.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(na,()=>window.scrollY,e?(t,n)=>ra(t,n,o,e):void 0);return()=>t&&t()},[n,o,e]),a.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{y(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[s,r,i]))}function aa(e,t){let{capture:n}=t||{};a.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function oa(e,{relative:t}={}){let n=a.useContext(Rn);v(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qi(`useViewTransitionState`),i=cr(e,{relative:t});if(!n.isTransitioning)return!1;let o=we(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=we(n.nextLocation.pathname,r)||n.nextLocation.pathname;return xe(i.pathname,s)!=null||xe(i.pathname,o)!=null}function sa(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function ca(e){return sa(e)===`object`}function la(e){return typeof e==`number`&&e>=0&&e<=100}function ua(e){return typeof e==`string`||e instanceof RegExp||typeof e==`function`}function da(e,t){return fa(e,t,ha())}function fa(e,t,n){if(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)return new RegExp(t.source,t.flags);if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let r=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)r[e]=fa(r[e],t[e],n);return r}let r=sa(e)===`object`?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==`__proto__`&&(r[e]=fa(r[e],t[e],n));return r}function pa(e){return da(void 0,e)}function ma(...e){let t;for(let n of e)n!=null&&(t=da(t,n));return t}function ha(){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let n=e.has(t);return n||e.add(t),n}}}var ga=`https://docs.datadoghq.com`,_a=`More details:`,va={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},ya=console,ba={log:ya.log,debug:ya.debug,info:ya.info,warn:ya.warn,error:ya.error};function xa(e){return{debug:ba.debug.bind(ya,e),log:ba.log.bind(ya,e),info:ba.info.bind(ya,e),warn:ba.warn.bind(ya,e),error:ba.error.bind(ya,e)}}var Sa=!1;function Ca(e){Sa=e}function wa(){return Sa}var M=globalThis,Ta=`WorkerGlobalScope`in M;function Ea(e){return ka(e,M.document?.baseURI??M.location?.href).href}function Da(e){try{return!!ka(e)}catch{return!1}}function Oa(e){let t=ka(e).pathname;return t[0]===`/`?t:`/${t}`}function ka(e,t){let n=ja();try{return t===void 0?new n(e):new n(e,t)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}var Aa;function ja(){if(!Aa){let e=!1;try{e=new M.URL(`b`,`http://a`).href===`http://a/b`}catch{}Aa=e?M.URL:Na().URL}return Aa}var Ma;
4function Na(){if(!Ma){let e,t;try{e=document.createElement(`iframe`),e.style.display=`none`,document.body.appendChild(e),t=e.contentWindow??M}catch{t=M}Ma={URL:t.URL},e?.remove()}return Ma}function Pa(e,t){function n(e,t,n){n.value=r(n.value)}function r(e){return function(...t){return i(e,this,t)}}function i(e,t,n){try{return e.apply(t,n)}catch(e){a(e)}}function a(n){let r=t=>{wa()&&e.error(`[MONITOR]`,t)};r(n);try{t(n)}catch(e){r(e)}}return{monitored:n,monitor:r,callMonitored:i,monitorError:a}}var Fa=xa(`Datadog SDK:`),Ia,La=Pa(Fa,e=>Ia?.(e)),N=La.monitor,Ra=La.callMonitored,P=La.monitorError;function za(e){return Ia?!1:(Ia=e,!0)}function Ba(e){let t=M.queueMicrotask;typeof t==`function`?t(N(e)):Promise.resolve().then(N(e))}var F=class{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}};function Va(...e){return new F(t=>{let n=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>n.forEach(e=>e.unsubscribe())})}var Ha=class extends F{constructor(e,t){super(),this.maxBufferSize=e,this.onDrop=t,this.buffer=[],this.droppedCount=0}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&(this.buffer.shift(),this.droppedCount++),super.notify(e)}subscribe(e){let t=!1;return Ba(()=>{for(let n of this.buffer){if(t)return;e(n)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){Ba(()=>{this.droppedCount>0&&this.onDrop&&this.onDrop(this.droppedCount),this.maxBufferSize=this.buffer.length=0})}},Ua={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function Wa(e){let t=new F;function n(){return e===Ua.GRANTED}return{tryToInit(t){e||=t},onGrantedOnce(e){if(n())e();else{let r=t.subscribe(()=>{n()&&(e(),r.unsubscribe())})}},update(n){e=n,t.notify()},isGranted:n,observable:t}}var Ga=`datad0g.com`,Ka=`datadoghq.com`,qa=`datadoghq.eu`,Ja=`ddog-gov.com`,Ya=`us2.ddog-gov.com`,Xa=[`ddsource`,`dd-api-key`,`dd-request-id`];function Za(e){return Xa.every(t=>e.includes(t))}var Qa=1e3,$a=60*Qa,eo=60*$a,to=31536e6;function no(){return new Date().getTime()}function I(){return no()}function L(e,t){return t-e}function R(e){return typeof e==`number`?Math.round(e*1e6):e}function ro(e,t){return e+t}function io(){return performance.now()}function z(){return{relative:io(),timeStamp:I()}}function ao(){return{relative:0,timeStamp:mo()}}function oo(e){return{relative:e,timeStamp:ho(e)}}function so(e){return{relative:co(e),timeStamp:e}}function co(e){return e-mo()}function lo(e){return Math.round(ro(mo(),e))}function uo(e){return e<to}
4function fo(){return Math.round(no()-ro(mo(),performance.now()))}var po;function mo(){return po===void 0&&(po=performance.timing?.navigationStart??performance.timeOrigin),po}function ho(e){let t=no()-performance.now();return t>mo()?Math.round(ro(t,e)):lo(e)}function go(e,t,n){return{build(r,i){return vo({proxy:e.proxy,site:e.site,path:`/api/v2/${t}`,parameters:yo(e,t,r,i,n)})},trackType:t}}function _o({replica:e,proxy:t,source:n},r){if(e)return go({clientToken:e.clientToken,proxy:t,source:n,site:Ka},r,r===`rum`?[`application.id=${e.applicationId}`]:void 0)}function vo({proxy:e,site:t=Ka,path:n,parameters:r=``,subdomain:i}){let a=n;if(r&&(a+=`?${r}`),typeof e==`string`){let t=`${Ea(e)}?ddforward=${encodeURIComponent(a)}`;return i&&(t+=`&ddforwardSubdomain=${i}`),t}if(typeof e==`function`)return e({path:n,parameters:r,subdomain:i});let o=t.split(`.`),s=o.pop(),c=`browser-intake-${o.join(`-`)}.${s}`;return i&&(c=`${i}.${c}`),`https://${c}${a}`}function yo({clientToken:e,source:t=`browser`},n,r,{retry:i,encoding:a},o=[]){let s=[`ddsource=${t}`,`dd-api-key=${e}`,`dd-evp-origin-version=7.13.0`,`dd-evp-origin=browser`,`dd-request-id=${bo()}`].concat(o);return a&&s.push(`dd-evp-encoding=${a}`),n===`rum`&&(s.push(`batch_time=${I()}`,`_dd.api=${r}`),i&&s.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),s.join(`&`)}function bo(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,bo)}var xo={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`,MASK_UNLESS_ALLOWLISTED:`mask-unless-allowlisted`},So={ALL:`all`,SAMPLED:`sampled`},Co={clientToken:{type:`string`,required:!0},service:{type:`string`},env:{type:`string`},version:{type:`string`},site:{type:`site`,default:Ka},proxy:{type:`union`,variants:[{type:`string`},{type:`function`,signature:void 0}]},sessionSampleRate:{type:`percentage`,default:100},telemetrySampleRate:{type:`percentage`,default:20},telemetryConfigurationSampleRate:{type:`percentage`,default:5},telemetryUsageSampleRate:{type:`percentage`,default:5},silentMultipleInit:{type:`boolean`,default:!1,strict:!1},storeContextsAcrossPages:{type:`boolean`,default:!1,strict:!1},trackAnonymousUser:{type:`boolean`,default:!0,strict:!1},useSecureSessionCookie:{type:`boolean`,default:!1,strict:!1},usePartitionedCrossSiteSessionCookie:{type:`boolean`,default:!1,strict:!1},trackSessionAcrossSubdomains:{type:`boolean`,default:!1,strict:!1},allowedTrackingOrigins:{type:`match-option`,multiple:!0,strict:!1},trackingConsent:{type:`enum`,values:Ua,default:Ua.GRANTED},beforeSend:{type:`function`,signature:void 0},source:{type:`enum`,values:[`browser`,`flutter`,`unity`],default:`browser`,strict:!1},sessionPersistence:{type:`enum`,values:[`cookie`,`local-storage`,`memory`],multiple:!0,strict:!1},replica:{type:`schema`,schema:{clientToken:{type:`string`,required:!0},applicationId:{type:`string`}}},datacenter:{type:`string`},sdkVersion:{type:`string`},variant:{type:`string`}};function wo(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_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,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}function B(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,B)}var To=/(\S+?)\s*=\s*(.*?)(?:;|$)/g;function Eo(e,t){for(To.lastIndex=0;;){let n=To.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function Do(e){let t=new Map;for(To.lastIndex=0;;){let n=To.exec(e);if(n){let e=n[1],r=n[2];t.has(e)?t.get(e).push(r):t.set(e,[r])}else break}return t}function Oo(e){let t=new Map;for(To.lastIndex=0;;){let n=To.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function ko(e,t,n=``){let r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function Ao(e,t){return t?`${e}-v${t.split(`.`)[0]}`:e}function jo(...e){let t=e.filter(e=>!!e);return t.length>0?t:void 0}function Mo(e,t,n=0,r){let i=new Date;i.setTime(i.getTime()+n);let a=`expires=${i.toUTCString()}`,o=r?.crossSite?`none`:`strict`,s=r?.domain?`;domain=${r.domain}`:``,c=r?.secure?`;secure`:``,l=r?.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${s}${c}${l}`}function No(e){let t=Eo(document.cookie,e);if(t!==``)return t}function Po(e){return Do(document.cookie).get(e)||[]}var Fo;function Io(e){return Fo||=Oo(document.cookie),Fo.get(e)}function Lo(e,t){Mo(e,``,0,t)}var Ro;function zo(e=M.location?.hostname??``,t=typeof document<`u`?document.referrer:``){if(!(typeof document>`u`)){if(Ro===void 0){let n=Bo(e,t);if(n){let e=`dd_site_test_${B()}`,t=n.split(`.`),r=t.pop();for(;t.length&&!No(e);)r=`${t.pop()}.${r}`,Mo(e,`test`,Qa,{domain:r});Lo(e,{domain:r}),Ro=r}}return Ro}}function Bo(e,t){try{return e||ka(t).hostname}catch{}}function Vo(e){let t={};if(t.secure=e.useSecureSessionCookie||e.usePartitionedCrossSiteSessionCookie,t.crossSite=e.usePartitionedCrossSiteSessionCookie,t.partitioned=e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=zo();if(!e)return;t.domain=e}return t}var V=xa(`Datadog Browser SDK:`),Ho=`${ga}/real_user_monitoring/browser/troubleshooting`;function Uo(e,t,n=!1){return e.some(e=>{try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.lastIndex=0,e.test(t);if(typeof e==`string`)return n?t.startsWith(e):e===t}catch(e){V.error(e)}return!1})}function H(e){return e}var Wo=[`chrome-extension://`,`moz-extension://`];function Go(e){return Wo.some(t=>e.includes(t))}function Ko(e,t=``){return Go(e)?!1:Go(t.split(`
5`).filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||``)}var qo="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",Jo=`SDK initialized on a non-allowed domain.`;function Yo(e,t){let n=H(M.location),r=n?n.origin:``,i=e.allowedTrackingOrigins;if(!i)return Ko(r,t)?(V.error(qo),!1):!0;let a=Uo(i,r);return a||V.error(Jo),a}var Xo=(e,t)=>e===`__proto__`?void 0:t;function Zo(e){try{return JSON.parse(e,Xo)}catch{}}function Qo(e){return{...e}}function $o(e,t){return Object.keys(e).some(n=>e[n]===t)}function es(e){return Object.keys(e).length===0}function ts(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r]);return n}var ns=function(e){return e.SESSION_REPLAY_RECORD_CANVAS=`session_replay_record_canvas`,e.TRACK_INTAKE_REQUESTS=`track_intake_requests`,e.TRACK_WEBSOCKETS=`track_websockets`,e}({}),rs=new Set;function is(e){Array.isArray(e)&&as(e.filter(e=>$o(ns,e)))}
5function as(e){e.forEach(e=>{rs.add(e)})}function os(e){return rs.has(e)}function ss(){return rs}function cs(e,t){let n=M,r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}function ls(e,t){return cs(M,`setTimeout`)(N(e),t)}function U(e){cs(M,`clearTimeout`)(e)}function us(e,t){return cs(M,`setInterval`)(N(e),t)}function ds(e){cs(M,`clearInterval`)(e)}function fs(e,t,n){let r=n?.leading===void 0?!0:n.leading,i=n?.trailing===void 0?!0:n.trailing,a=!1,o,s;return{throttled:(...n)=>{if(a){o=n;return}r?e(...n):o=n,a=!0,s=ls(()=>{i&&o&&e(...o),a=!1,o=void 0},t)},cancel:()=>{U(s),a=!1,o=void 0}}}function W(){}var ps=`?`;function ms(e){let t=[],n=Ds(e,`stack`),r=String(e);if(n?.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
6`).forEach(e=>{let n=ys(e)||xs(e)||Cs(e)||Es(e);n&&(!n.func&&n.line&&(n.func=ps),t.push(n))}),t.length>0&&Ns()&&e instanceof Error){let n=[],r=e;for(;(r=Object.getPrototypeOf(r))&&js(r);){let e=r.constructor?.name||ps;n.push(e)}for(let e=n.length-1;e>=0&&t[0]?.func===n[e];e--)t.shift()}return{message:Ds(e,`message`),name:Ds(e,`name`),stack:t}}var hs=`((?:blob|native|eval|<anonymous>|[a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/|\\w+\\.|\\/).*?)`,gs=`(?::(\\d+))`,_s=RegExp(`^\\s*at (.*?) ?\\(${hs}${gs}?${gs}?\\)?\\s*$`,`i`),vs=RegExp(`\\((\\S*)${gs}${gs}\\)`);function ys(e){let t=_s.exec(e);if(!t)return;let n=t[2]?.indexOf(`native`)===0,r=t[2]?.indexOf(`eval`)===0,i=vs.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]||ps,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}var bs=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${hs}${gs}?${gs}??\\s*$`,`i`);function xs(e){let t=bs.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||ps,line:t[3]?+t[3]:void 0,url:t[2]}}var Ss=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Cs(e){let t=Ss.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||ps,line:+t[3],url:t[2]}}var ws=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,Ts=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Es(e){let t=ws.exec(e);if(!t)return;let n=t[3]&&t[3].indexOf(` > eval`)>-1,r=Ts.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]||ps,line:t[4]?+t[4]:void 0,url:t[3]}}function Ds(e,t){return ca(e)&&typeof e[t]==`string`?e[t]:void 0}function Os(e,t,n,r){if(t===void 0)return;let{name:i,message:a}=As(e);return{name:i,message:a,stack:[{url:t,column:r,line:n}]}}var ks=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function As(e){let t,n;return{}.toString.call(e)===`[object String]`&&([,t,n]=ks.exec(e)),{name:t,message:n}}function js(e){return String(e.constructor).startsWith(`class `)}var Ms;function Ns(){if(Ms!==void 0)return Ms;class e extends Error{constructor(){super(),this.name=`Error`}}let[t,n]=[e,Error].map(e=>new e);return Ms=js(Object.getPrototypeOf(t))&&n.stack!==t.stack,Ms}function Ps(e){let t=Error(e);t.name=`HandlingStack`;let n;return Ra(()=>{let e=ms(t);e.stack=e.stack.slice(2),n=Fs(e)}),n}function Fs(e){let t=Is(e);return e.stack.forEach(e=>{let 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+=`\n  at ${n}${r} @ ${e.url}${i}${a}`}),t}function Is(e){return`${e.name||`Error`}: ${e.message}`}function Ls(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`)if(t in e&&typeof t==`string`&&t.startsWith(`on`))i=W;else return{stop:W};let a=!1,{stop:o}=zs(e,t,i,function(){if(a)return i.apply(this,arguments);let e=Array.from(arguments);return Bs(n,{target:this,parameters:e,handlingStack:r?Ps(`instrumented method`):void 0},()=>i.apply(this,e))});return{stop:()=>{a=!0,o()}}}function Rs(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`)return{stop:W};let a=!1,o=function(){if(!new.target)return Reflect.apply(i,this,Array.from(arguments));let e=new.target===o?i:new.target;if(a)return Reflect.construct(i,arguments,e);let t=Array.from(arguments);return Bs(n,{parameters:t,handlingStack:r?Ps(`instrumented constructor`):void 0},()=>Reflect.construct(i,t,e))},s=Vs(o,i),{stop:c}=zs(e,t,i,o);return{stop:()=>{a=!0,s(),c()}}}function zs(e,t,n,r){return e[t]=r,{stop:()=>{e[t]===r&&(e[t]=n)}}}function Bs(e,t,n){let r;Ra(e,null,[{...t,onPostCall:e=>{r=e}}]);let i=n();return r&&Ra(r,null,[i]),i}function Vs(e,t){for(let n of[].concat(Object.getOwnPropertyNames(t),Object.getOwnPropertySymbols(t))){let r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r)}let{stop:n}=zs(t.prototype,`constructor`,t.prototype.constructor,e);return n}function Hs(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);if(!r?.set||!r.configurable)return{stop:W};let i=W,a=(e,t)=>{ls(()=>{a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};
6return Object.defineProperty(e,t,{set:o}),{stop:()=>{Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var G=function(e){return e.BEFORE_UNLOAD=`beforeunload`,e.CLICK=`click`,e.DBL_CLICK=`dblclick`,e.KEY_DOWN=`keydown`,e.LOAD=`load`,e.POP_STATE=`popstate`,e.SCROLL=`scroll`,e.TOUCH_START=`touchstart`,e.TOUCH_END=`touchend`,e.TOUCH_MOVE=`touchmove`,e.VISIBILITY_CHANGE=`visibilitychange`,e.PAGE_SHOW=`pageshow`,e.FREEZE=`freeze`,e.RESUME=`resume`,e.DOM_CONTENT_LOADED=`DOMContentLoaded`,e.POINTER_DOWN=`pointerdown`,e.POINTER_UP=`pointerup`,e.POINTER_CANCEL=`pointercancel`,e.HASH_CHANGE=`hashchange`,e.PAGE_HIDE=`pagehide`,e.MOUSE_DOWN=`mousedown`,e.MOUSE_UP=`mouseup`,e.MOUSE_MOVE=`mousemove`,e.FOCUS=`focus`,e.BLUR=`blur`,e.CONTEXT_MENU=`contextmenu`,e.RESIZE=`resize`,e.CHANGE=`change`,e.INPUT=`input`,e.PLAY=`play`,e.PAUSE=`pause`,e.SECURITY_POLICY_VIOLATION=`securitypolicyviolation`,e.SELECTION_CHANGE=`selectionchange`,e.STORAGE=`storage`,e.UNHANDLED_REJECTION=`unhandledrejection`,e}({});function K(e,t,n,r){return Us(e,[t],n,r)}function Us(e,t,n,{once:r,capture:i,passive:a}={}){let o=N(e=>{!e.isTrusted&&!e.__ddIsTrusted&&Gs===!1||(r&&u(),n(e))}),s=a?{capture:i,passive:a}:i,c=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=cs(c,`addEventListener`);t.forEach(t=>l.call(e,t,o,s));function u(){let n=cs(c,`removeEventListener`);t.forEach(t=>n.call(e,t,o,s))}return{stop:u}}function Ws(e,t){if(!e)return!1;try{return K(e,t,W).stop(),!0}catch{return!1}}var Gs;function Ks(e){Gs!==!0&&(Gs=e??!1)}var qs=1024,Js=1024*qs,Ys=/[^\u0000-\u007F]/;function Xs(e){return Ys.test(e)?new TextEncoder().encode(e).length:e.length}function Zs(e){if(e.length===1)return e[0];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 Qs(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);let r=$s(Object.prototype),i=$s(Array.prototype),a=$s(Object.getPrototypeOf(e)),o=$s(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function $s(e){let t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):W}var ec=220*qs,tc=`$`,nc=3;function q(e,t=ec){let n=$s(Object.prototype),r=$s(Array.prototype);try{let n=[],r=new WeakMap,i=rc(e,tc,void 0,n,r),a=JSON.stringify(i),o=a?a.length:0;if(o>t){cc(t,`discarded`,e);return}for(;n.length>0&&o<t;){let i=n.shift(),a=0;if(Array.isArray(i.source))for(let s=0;s<i.source.length;s++){let c=rc(i.source[s],i.path,s,n,r);if(c===void 0?o+=4:o+=JSON.stringify(c).length,o+=a,a=1,o>t){cc(t,`truncated`,e);break}i.target[s]=c}else for(let s in i.source)if(Object.prototype.hasOwnProperty.call(i.source,s)){let c=rc(i.source[s],i.path,s,n,r);if(c!==void 0&&(o+=JSON.stringify(c).length+a+s.length+nc,a=1),o>t){cc(t,`truncated`,e);break}i.target[s]=c}}return i}finally{n(),r()}}function rc(e,t,n,r,i){let a=sc(e);if(!a||typeof a!=`object`)return ic(a);let o=ac(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;let s=e;if(i.has(s))return`[Reference seen at ${i.get(s)}]`;let 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 ic(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 ac(e){try{if(e instanceof Event)return oc(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;let t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t?.[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function oc(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?ac(e.currentTarget):null,target:e.target?ac(e.target):null}}function sc(e){if((typeof e!=`object`||!e)&&typeof e!=`function`)return e;let t=e;if(typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function cc(e,t,n){V.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var lc=`No stack, consider using an instance of Error`;function uc(e){try{return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}catch{return!1}}function dc(e){let{env:t,service:n,version:r,datacenter:i,sdkVersion:a,variant:o}=e,s=[fc(`sdk_version`,a??`7.13.0`)];return t&&s.push(fc(`env`,t)),n&&s.push(fc(`service`,n)),r&&s.push(fc(`version`,r)),i&&s.push(fc(`datacenter`,i)),o&&s.push(fc(`variant`,o)),s}function fc(e,t){let n=t?`${e}:${t}`:e;return(n.length>
6200||mc(n))&&V.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${_a} ${ga}/getting_started/tagging/#defining-tags`),pc(n)}function pc(e){return e.replace(/,/g,`_`)}function mc(e){return RegExp(`[^\\p{Ll}\\p{Lo}0-9_:./-]`,`u`).test(e)}function hc(e,t){let n=M.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}var gc={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`},_c=function(e){return e.UNCAUGHT=`Uncaught`,e.PROVIDED=`Provided`,e}({}),vc=function(e){return e.HANDLED=`handled`,e.UNHANDLED=`unhandled`,e}({});function yc(){let{navigator:e}=M;return{status:e?.onLine?`connected`:`not_connected`,interfaces:e?.connection?.type?[e.connection.type]:void 0,effective_type:e?.connection?.effectiveType}}function bc(e,t){return cs(M,`fetch`)(e,t)}function xc(e){return e>=500}function Sc(e){try{return e.clone()}catch{return}}var Cc=80*qs,wc=20*Js,Tc=$a,Ec=Qa;function Dc(e,t,n,r,i,a){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?kc(e,t,n,a,{onSuccess:()=>Ac(0,t,n,r,i,a),onFailure:()=>{t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),Oc(t,n,r,i,a)}}):t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e})}function Oc(e,t,n,r,i){e.transportStatus===2&&ls(()=>{kc(e.queuedPayloads.first(),e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=Ec,Ac(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(Tc,e.currentBackoffTime*2),Oc(e,t,n,r,i)}})},e.currentBackoffTime)}function kc(e,t,n,r,{onSuccess:i,onFailure:a}){t.bandwidthMonitor.add(e),n(e,n=>{t.bandwidthMonitor.remove(e),jc(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:`failure`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),a()):(t.transportStatus=0,r.notify({type:`success`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function Ac(e,t,n,r,i,a){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i(`Reached max ${r} events size queued for upload: ${wc/Js}MiB`),t.queueFullReported=!0);let o=t.queuedPayloads;for(t.queuedPayloads=Nc();o.size()>0;)Dc(o.dequeue(),t,n,r,i,a)}function jc(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||xc(e.status))}function Mc(){return{transportStatus:0,currentBackoffTime:Ec,bandwidthMonitor:Pc(),queuedPayloads:Nc(),queueFullReported:!1}}function Nc(){let e=[];return{bytesCount:0,enqueue(t){return this.isFull()?!1:(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=wc}}}function Pc(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Cc&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}var Fc=16*qs;function Ic(e,t,n=Fc){let r=new F,i=Mc();return{observable:r,send:n=>{for(let a of e)Dc(n,i,(e,t)=>{Bc(a,e,t)},a.trackType,t,r)},sendOnExit:t=>{for(let r of e)Lc(r,n,t)}}}function Lc(e,t,n){if(n.bytesCount<t)try{let t=e.build(`beacon`,n);if(navigator.sendBeacon(t,n.data))return}catch(e){zc(e)}Bc(e,n)}var Rc=!1;function zc(e){Rc||(Rc=!0,P(e))}function Bc(e,t,n){bc(e.build(`fetch`,t),{method:`POST`,body:t.data,mode:`cors`}).then(N(e=>n?.({status:e.status,type:e.type}))).catch(N(()=>n?.({status:0})))}var Vc=function(e){return e.RECORDS=`records`,e.PROFILES=`profiles`,e}({});function Hc(){let e=Kc();if(e)return{getCapabilities(){return JSON.parse(e.getCapabilities?.()||`[]`)},getPrivacyLevel(){return e.getPrivacyLevel?.()},getIsTraceSampled(){return JSON.parse(e.getIsTraceSampled?.()||`null`)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){let i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function Uc(e){let t=Hc();return!!t&&t.getCapabilities().includes(e)}function Wc(e=M.location?.hostname){return Hc()?.getAllowedWebViewHosts().some(t=>Gc(e,t))??!1}function Gc(e,t){if(!t.includes(`*`))return e===t||e.endsWith(`.${t}`);let n=t.split(`*`);if(n.length!==2)return V.error(`Invalid WebView host pattern "${t}": only one wildcard (*) is supported.`),!1;let[r,i]=n;return e.length>r.length+i.length&&e.startsWith(r)&&e.endsWith(i)}function Kc(){return M.DatadogEventBridge}function qc(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(t(r,n,e))return r}}
6function Jc(e){return Object.values(e)}function Yc(e){return Object.entries(e)}var Xc={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function Zc(){return new F(e=>{let t=M.window;if(!t)return;let{stop:n}=Us(t,[`visibilitychange`,`freeze`],t=>{t.type===`visibilitychange`&&document.visibilityState===`hidden`?e.notify({reason:Xc.HIDDEN}):t.type===`freeze`&&e.notify({reason:Xc.FROZEN})},{capture:!0}),r=K(t,`beforeunload`,()=>{e.notify({reason:Xc.UNLOADING})}).stop;return()=>{n(),r()}})}function Qc(e){return Jc(Xc).includes(e)}function $c(){let e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){let i=Xs(n);t+=i,e+=n,r&&r(i)},finish(e){e(this.finishSync())},finishSync(){let n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount(e){return e.length}}}var el=30*Qa,tl=Ta?1:50;function nl({pageMayExitObservable:e}){let t,n=new F,r=e.subscribe(e=>{t=e.reason;try{n.notify(e.reason)}finally{t=void 0}s(e.reason)}),i=new F(()=>()=>{r.unsubscribe()}),a=0,o=0;function s(e){if(o===0)return;let t=o,n=a;o=0,a=0,u(),i.notify({reason:e,messagesCount:t,bytesCount:n})}let c;function l(){c===void 0&&(c=ls(()=>{s(`duration_limit`)},el))}function u(){U(c),c=void 0}return{flushObservable:i,prepareUrgentFlushObservable:n,forceFlush:s,get messagesCount(){return o},notifyBeforeAddMessage(e){a+e>=Fc&&s(t??`bytes_limit`),o+=1,a+=e,l()},notifyAfterAddMessage(e=0){a+=e,o>=tl?s(t??`messages_limit`):a>=Fc&&s(t??`bytes_limit`)}}}var rl=256*qs;function il({encoder:e=$c(),endpoints:t,reportError:n}){let r=H(Ic)(t,n),i=H(Zc)(),a=H(nl)({pageMayExitObservable:i}),o={},s=a.flushObservable.subscribe(e=>u(e));function c(t,n,r){if(r!==void 0){let i;o[r]===void 0?(a.notifyBeforeAddMessage(n),i=0):i=n-e.estimateEncodedBytesCount(o[r]),o[r]=t,a.notifyAfterAddMessage(i)}else a.notifyBeforeAddMessage(n),e.write(e.isEmpty?t:`\n${t}`,e=>{a.notifyAfterAddMessage(e-n)})}function l(t,n){let r=Qs(t),i=e.estimateEncodedBytesCount(r);if(i>=rl){V.warn(`Discarded a message whose size was bigger than the maximum allowed size ${rl/qs}KiB. ${_a} ${Ho}/#technical-limitations`);return}c(r,i,n)}function u(t){let n=Jc(o).join(`
7`);o={};let i=Qc(t.reason),a=i?r.sendOnExit:r.send;if(i&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&a(al(t));let r=[t.pendingData,n].filter(Boolean).join(`
8`);r&&a({data:r,bytesCount:Xs(r)})}else n&&e.write(e.isEmpty?n:`\n${n}`),e.finish(e=>{a(al(e))})}return{get isEmpty(){return a.messagesCount===0},add:l,upsert:l,prepareUrgentFlushObservable:a.prepareUrgentFlushObservable,forceFlush:a.forceFlush,flushObservable:a.flushObservable,stop:s.unsubscribe}}function al(e){let t;return t=typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}var ol={LOG:`log`,CONFIGURATION:`configuration`,USAGE:`usage`};function sl(){let e=[];return{register(t){return e.push(t),{unregister(){e=e.filter(e=>e!==t)}}},trigger(t){let n=[];for(let r of e){let e=r(t);if(e===`DISCARDED`)return cl;e!==`SKIPPED`&&n.push(e)}return ma(...n)}}}var cl=`DISCARDED`,ll=`SKIPPED`;function ul(e){return e!==0&&Math.random()*100<=e}var dl=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],fl=function(e){return e.LOGS=`browser-logs-sdk`,e.RUM=`browser-rum-sdk`,e}({}),pl=function(e){return e.CUSTOMER_DATA_METRIC_NAME=`Customer data measures`,e.REMOTE_CONFIGURATION_METRIC_NAME=`remote configuration metrics`,e.RECORDER_INIT_METRICS_TELEMETRY_NAME=`Recorder init metrics`,e.SEGMENT_METRICS_TELEMETRY_NAME=`Segment network request metrics`,e.SESSION_MANAGER_INIT_METRICS_TELEMETRY_NAME=`Session manager init metrics`,e}({}),ml=1,hl=[Ja,Ya],gl=15,_l;function vl(){return _l||=new Ha(100),_l}function yl(e,t,n,r){let i=new F,{enabled:a,metricsEnabled:o}=bl(e,t,n,i,r),{stop:s}=xl(t,i);return{stop:s,enabled:a,metricsEnabled:o}}function bl(e,t,n,r,i,a=ml,o=gl){let s={},c=!hl.includes(t.site)&&ul(t.telemetrySampleRate),l={[ol.LOG]:c,[ol.CONFIGURATION]:c&&ul(t.telemetryConfigurationSampleRate),[ol.USAGE]:c&&ul(t.telemetryUsageSampleRate),metric:c&&ul(a)},u=Sl(),d=vl();return d.subscribe(({rawEvent:t,metricName:i})=>{if(i&&!l.metric||!l[t.type])return;let a=i||t.status||t.type,c=s[a];if(c||=s[a]=new Set,c.size>=o)return;let d=Qs(t);
8if(c.has(d))return;let p=n.trigger({startTime:z().relative});if(p===`DISCARDED`)return;let m=f(p,e,t,u);r.notify(m),hc(`telemetry`,m),c.add(d)}),d.unbuffer(),za(Tl),{enabled:c,metricsEnabled:l.metric};function f(e,n,r,a){return ma({type:`telemetry`,date:z().timeStamp,service:n,version:`7.13.0`,source:`browser`,_dd:{format_version:2},telemetry:ma(r,{runtime_env:a,connectivity:yc(),sdk_setup:`npm`,sdk_name:i}),ddtags:dc(t).join(`,`),experimental_features:Array.from(ss())},e)}}function xl(e,t){let n=[];if(Wc()){let e=Hc(),r=t.subscribe(t=>e.send(`internal_telemetry`,t));n.push(r.unsubscribe)}else{let r=[go(e,`rum`)],i=_o(e,`rum`);i&&Cl(e)&&r.push(i);let a=il({endpoints:r,reportError:W});n.push(a.stop);let o=t.subscribe(a.add);n.push(o.unsubscribe)}return{stop:()=>n.forEach(e=>e())}}function Sl(){return{is_local_file:M.location?.protocol===`file:`,is_worker:Ta}}function Cl(e){return e.site===Ga}function wl(e,t){wa()&&V.debug(`[Telemetry]`,e,t),vl().notify({rawEvent:{type:ol.LOG,message:e,status:`debug`,...t}})}function Tl(e,t){vl().notify({rawEvent:{type:ol.LOG,status:`error`,...Ol(e),...t}})}function El(e){vl().notify({rawEvent:{type:ol.CONFIGURATION,configuration:e}})}function Dl(e,t){vl().notify({rawEvent:{type:ol.LOG,message:e,status:`debug`,...t},metricName:e})}function J(e){vl().notify({rawEvent:{type:ol.USAGE,usage:e}})}function Ol(e){if(uc(e)){let t=ms(e);return{error:{kind:t.name,stack:Fs(kl(t))},message:t.message}}return{error:{stack:lc},message:`Uncaught ${Qs(e)}`}}function kl(e){return e.stack=e.stack.filter(e=>!e.url||dl.some(t=>e.url.startsWith(t))),e}var Al=new Map,jl=new Set,Ml=!1;function Nl(){let e=M.window?.DD_SOURCE_CODE_CONTEXT;if(!e)return;let t=!1,n=!1,r=!1;for(let[i,a]of Object.entries(e)){if(t||=a.ddDebugId!==void 0,n||=a.service!==void 0,r||=a.version!==void 0,jl.has(i))continue;jl.add(i);let e=ms({stack:i}).stack[0]?.url;e&&!Al.has(e)&&Al.set(e,a)}Ml||(Ml=!0,J({feature:`source-code-context`,use_debug_id:t,use_service:n,use_version:r}))}function Pl(e){Nl();let t=new Set,n=[];for(let r of e){if(t.has(r))continue;t.add(r);let e=Al.get(r)?.ddDebugId;e!==void 0&&n.push({url:r,id:e})}return n.length?n:void 0}function Fl(e){return Nl(),Al.get(e)}function Il({originalError:e,stackTrace:t,source:n,useFallbackStack:r=!0,nonErrorPrefix:i}){let a=uc(e);return{source:n,type:t?t.name:void 0,message:Vl(t,a,i,e),stack:t?Fs(t):r?lc:void 0}}function Ll(e){return e?.stack.map(e=>e.url).filter(e=>!!e)??[]}function Rl(e,t){let n=t.flatMap(({stackTrace:e})=>Ll(e));return Pl(Ll(e).concat(n))}function zl(e){let t=[],n=e.cause;for(;n!=null&&t.length<10;){let e=uc(n),r=e?ms(n):void 0;t.push({originalError:n,stackTrace:r}),n=e?n.cause:void 0}return t}function Bl({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:a,useFallbackStack:o=!0,source:s,handling:c}){let l=e??(uc(t)?ms(t):void 0),u=uc(t)?zl(t):[],d=Il({originalError:t,stackTrace:l,source:s,useFallbackStack:o,nonErrorPrefix:a}),f=u.map(({originalError:e,stackTrace:t})=>Il({originalError:e,stackTrace:t,source:s,useFallbackStack:!1}));return{startClocks:i,handling:c,handlingStack:n,componentStack:r,originalError:t,...d,debugIds:Rl(l,u),causes:f.length?f:void 0,fingerprint:Hl(t),context:Ul(t)}}function Vl(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:n?`${n} ${Qs(q(r))}`:Qs(q(r))}function Hl(e){return uc(e)&&`dd_fingerprint`in e?String(e.dd_fingerprint):void 0}function Ul(e){if(ca(e))return e.dd_context}function Wl(e){return/@ (.+)/.exec(e)?.[1]}function Gl(){return new F(e=>{let t=(t,n)=>{let r=Bl({stackTrace:n,originalError:t,startClocks:z(),nonErrorPrefix:`Uncaught`,source:gc.SOURCE,handling:`unhandled`});e.notify(r)},{stop:n}=Kl(t),{stop:r}=ql(t);return()=>{n(),r()}})}function Kl(e){return Ls(M,`onerror`,({parameters:[t,n,r,i,a]})=>{let o;uc(a)||(o=Os(t,n,r,i)),e(a??t,o)})}function ql(e){return Ws(M.window,`unhandledrejection`)?Ls(M,`onunhandledrejection`,({parameters:[t]})=>{e(t.reason||`Empty reason`)}):{stop:W}}function Jl(e,t){return(...n)=>{try{return e(...n)}catch(e){V.error(t,e)}}}function Yl(e){let t={version:`7.13.0`,onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get(){return Ca},enumerable:!1}),t}function Xl(e,t,n){let r=e[t];r&&!r.q&&r.version&&V.warn(`SDK is loaded more than once. This is unsupported and might have unex
8pected behavior.`),e[t]=n,r?.q&&r.q.forEach(e=>Jl(e,`onReady callback threw an error:`)())}function Zl(e,t){t.silentMultipleInit||V.error(`${e} is already initialized.`)}var Ql={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function $l(e){let t=[];e.includes(Ql.cspViolation)&&t.push(tu());let n=e.filter(e=>e!==Ql.cspViolation);return n.length&&t.push(eu(n)),Va(...t)}function eu(e){return new F(t=>{if(!window.ReportingObserver)return;let n=N((e,n)=>e.forEach(e=>t.notify(nu(e)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function tu(){return new F(e=>{if(!Ws(document,`securitypolicyviolation`))return;let{stop:t}=K(document,`securitypolicyviolation`,t=>{e.notify(ru(t))});return t})}function nu(e){let{type:t,body:n}=e;return iu({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:au(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber),debugIds:n.sourceFile?Pl([n.sourceFile]):void 0})}function ru(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return iu({type:e.effectiveDirective,message:`${Ql.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:au(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${ko(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber),debugIds:e.sourceFile?Pl([e.sourceFile]):void 0})}function iu(e){return{startClocks:z(),source:gc.REPORT,handling:`unhandled`,...e}}function au(e,t,n,r,i){return n?Fs({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function ou(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function su(e){return Array.isArray(e)&&e.length>0}var cu=1/0,lu=$a,uu,du=new Set;function fu(){du.forEach(e=>e())}function pu({expireDelay:e,maxEntries:t}){let n=[],r=()=>{if(!e)return;let t=io()-e;for(;n.length>0&&n[n.length-1].endTime<t;)n.pop()};e&&(uu||=us(()=>fu(),lu),du.add(r));function i(e,r){let i={value:e,startTime:r,endTime:cu,remove:()=>{ou(n,i)},close:e=>{i.endTime=e}};return t&&n.length>=t&&n.pop(),n.unshift(i),i}function a(e=cu,t={returnInactive:!1}){for(let r of n)if(r.startTime<=e){if(t.returnInactive||e<=r.endTime)return r.value;break}}function o(e){let t=n[0];t?.endTime===cu&&t.close(e)}function s(e=cu,t=0){let r=ro(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime).map(e=>e.value)}function c(e=cu,t=0){let r=ro(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime)}function l(e){return n.filter(t=>t.startTime===e)}function u(){n=[]}function d(){du.delete(r),du.size===0&&uu&&(ds(uu),uu=void 0)}return{add:i,find:a,closeActive:o,findAll:s,findAllEntries:c,getEntries:l,reset:u,stop:d}}function mu(e,t){return e*t/100}var hu=new Map;function gu(e,t){if(t===100)return!0;if(t===0)return!1;let n=hu.get(t);if(e===n?.sessionId)return n.decision;let r=_u(BigInt(`0x${e.split(`-`)[4]}`),t);return hu.set(t,{sessionId:e,decision:r}),r}function _u(e,t){let n=1n<<64n,r=e*1111111111111111111n%n;return Number(r)<=t/100*Number(n)}var vu=4*eo,yu=15*$a,bu=to,xu={COOKIE:`cookie`,MEMORY:`memory`,LOCAL_STORAGE:`local-storage`},Su=`dd_cookie_test_`;async function Cu(e,t){let n=`${Su}${B()}`,r=`test`,i=e(n,t);try{return await i.getAllAndSet(()=>({value:r,expireDelay:$a})),(await i.getAll()).includes(r)}catch(e){return V.error(e),!1}finally{try{await i.delete()}catch{}}}function wu(e,t){let n=H(M.cookieStore),r=new F(()=>K(n,`change`,t=>{(t.changed.some(t=>t.name===e)||t.deleted.some(t=>t.name===e))&&r.notify()}).stop);return{async getAll(){return(await n.getAll(e)).map(e=>e.value)},delete(){return n.delete({name:e,domain:t.domain,path:`/`,partitioned:t.partitioned})},async getAllAndSet(r){let i=await n.getAll(e),{value:a,expireDelay:o}=r(i.map(e=>e.value));try{await n.set({name:e,value:a,expires:no()+o,path:`/`,sameSite:t.crossSite?`none`:`strict`,domain:t.domain,secure:t.secure,partitioned:t.partitioned})}catch(n){if(!e.startsWith(`dd_cookie_test_`)){let r=Po(e);wl(`Failed to set cookie using Cookie Store API`,{"error.message":n.message,newValue:a,cookieOptions:{...t},cookies:i.map(e=>({...e})),cookieCount:i.length,documentCookies:r})}}},observable:r}}var Tu=Qa;function Eu(e,t){let n=Po(e),r=new F(()=>{let t=us(()=>{i(Po(e))},Tu);return()=>{ds(t)}});function i(e){String(e)!==String(n)&&(n=e,r.notify())}return{getAll(){return Promise.resolve(Po(e))},async getAllAndSet(n){let{value:r,expireDelay:a}=n(Po(e));Mo(e,r,a,t),await Promise.resolve(),i([r])},async delete(){Lo(e,t),await Promise.resolve(),i([])},observable:r}}function Du(){let e=H(M.cookieStore);return!!(e&&Ws(e,`change`))}var Ou=`_dd_s_v2`,ku=`_dd_s`,Au=`_DD_SESSION`;function ju(){return{type:xu.MEMORY}}function Mu(){let e=M;e._DD_SESSION||(e[Au]={});let t=e[Au],n=new F,r=t.onChange;return t.onChange=e=>{r?.(e),n.notify(e)},{async setSessionState(e,n){let r=Qo(e(t.state??{}));t.state=r,await Promise.resolve(),t.onChange?.(r)},sessionObservable:n}}var Nu=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Pu(e){return!!e&&(e.indexOf(`&`)!==-1||Nu.test(e))}function Fu(e){return e.created?Number(e.created):void 0}function Iu(e){let t=e.expire&&Number(e.expire),n=Fu(e);if(t&&n)return Math.min(t,n+vu)}function Lu(e,t){let n={isExpired:`1`};
8return t.trackAnonymousUser&&e?.anonymousId&&(n.anonymousId=e?.anonymousId),n}function Ru(e){return es(e)}function zu(e){return e.isExpired!==void 0||!Bu(e)}function Bu(e){let t=Iu(e);return t?no()<t:!1}function Vu(e){e.expire=String(no()+yu)}function Hu(e){return Yc(e).map(([e,t])=>e===`anonymousId`?`aid=${t}`:`${e}=${t}`).join(`&`)}function Uu(e){let t={};return Pu(e)&&e.split(`&`).forEach(e=>{let n=Nu.exec(e);if(n!==null){let[,e,r]=n;e===`aid`?t.anonymousId=r:t[e]=r}}),t}function Wu(e,t){return Ru(e)?(t.trackAnonymousUser&&(e.anonymousId=B()),Lu(e,t)):e}function Gu(e,t){if(Ru(e))return e;let n=e;return zu(e)&&(n=Lu(e,t)),n.id||(n.id=B(),n.created=String(no())),t.trackAnonymousUser&&!n.anonymousId&&(n.anonymousId=B()),delete n.isExpired,Vu(n),n}function Ku(e){return zu(e)||Ru(e)||!e.id||Vu(e),e}async function qu(e){let t=Vo(e);if(t){if(Du()&&await Cu(wu,t))return{type:xu.COOKIE,cookieOptions:t,cookieApi:1};if(await Cu(Eu,t))return{type:xu.COOKIE,cookieOptions:t,cookieApi:0}}}var Ju;function Yu(e,t){let{cookieOptions:n,cookieApi:r}=e,i=new F,a=!!t.trackAnonymousUser,o=ed(n),s=H(Zu)(r,n),c=!0;s.observable.subscribe(()=>{s.getAll().then(e=>{i.notify(Qu(e,o))}).catch(e=>P(Error(`Error while reading session cookies on change: ${e}`)))});function l(e){return s.getAllAndSet(t=>{let r=Qu(t,o);return c&&es(r)&&(r=Qu(Po(ku),o)),c=!1,{value:$u(e(r),n),expireDelay:a?bu:vu}})}return{async setSessionState(e,t){typeof navigator<`u`&&navigator.locks?await navigator.locks.request(Ou,()=>l(e)).catch(e=>{if(!Xu(e))throw e}):(Ju=(Ju??Promise.resolve()).then(()=>l(e)),await Ju)},sessionObservable:i}}function Xu(e){return e instanceof Error?e.name===`AbortError`||e.message.includes(`no longer runnable`):!1}function Zu(e,t){return e===1?wu(Ou,t):Eu(Ou,t)}function Qu(e,t){let n;for(let r of e.slice().reverse())if(n=Uu(r),n.c===t)break;return delete n?.c,n??{}}function $u(e,t){return Hu(es(e)?e:{...e,c:ed(t)})}function ed(e){let t=e.domain?e.domain.split(`.`).length-1:0,n=0;return n|=0,n|=t<<1,n|=+!!e.crossSite,n.toString(16)}var td=`_dd_test_`;
8function nd(){try{let e=B(),t=`${td}${e}`;localStorage.setItem(t,e);let n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:xu.LOCAL_STORAGE}:void 0}catch{return}}function rd(){let e=new F(e=>K(window,`storage`,t=>{t.key===`_dd_s_v2`&&t.storageArea===localStorage&&e.notify(Uu(t.newValue))}).stop),t=!0;return{async setSessionState(n,r){let i=Uu(localStorage.getItem(Ou));t&&Ru(i)&&(i=Uu(localStorage.getItem(ku))),t=!1;let a=n(i);localStorage.setItem(Ou,Hu(a)),await Promise.resolve(),e.notify(a)},sessionObservable:e}}async function id(e){let t=ad(e.sessionPersistence);for(let n of t){let t=await od(n,e);if(t!==void 0)return t}}function ad(e){return e===void 0?Ta?[xu.MEMORY]:[xu.COOKIE]:e}function od(e,t){switch(e){case xu.COOKIE:return qu(t);case xu.LOCAL_STORAGE:return nd();case xu.MEMORY:return ju();default:V.error(`Invalid session persistence '${String(e)}'`);return}}function sd(e,t){switch(e.type){case xu.COOKIE:return Yu(e,t);case xu.LOCAL_STORAGE:return rd();case xu.MEMORY:return Mu()}}var cd=$a,ld=1e3,ud=eo*12,dd=[];async function fd(e,t){let n=io(),r=new F,i=new F,a=await H(id)(e);if(!a){V.warn(`No storage available for session. We will not send any data.`);return}let o=H(sd)(a,e),s=pu({maxEntries:ld});dd.push(()=>s.stop());let c=!1,{throttled:l,cancel:u}=fs(()=>{c=!1,o.setSessionState(t=>Gu(t,e),`expandOrRenewOnActivity`).catch(P)},Qa);dd.push(u);let d;dd.push(()=>U(d));let f=!1;dd.push(()=>{f=!0});let p=await m().catch(e=>P(Error(`Error while resolving initial session state: ${e}`)));if(!p||f)return;for(;!t.isGranted();)if(b(),await new Promise(e=>t.onGrantedOnce(e)),f||(p=await m().catch(P),!p||f))return;return s.add(x(p),ao().relative),g(p),h(),_(),Dl(`Session manager init metrics`,{metrics:{duration:L(n,io())}}),v();async function m(){let t={};return await o.setSessionState(n=>(t=Gu(Wu(n,e),e),t),`initialize`),t}function h(){let e=o.sessionObservable.subscribe(e=>{g(e),y(e)});dd.push(()=>e.unsubscribe())}function g(n){U(d);let r=Iu(n);r&&(d=ls(()=>{o.setSessionState(n=>zu(n)?(t.isGranted()||delete n.anonymousId,Lu(n,e)):n,`expireOnTimeout`).catch(P)},r-no()))}function _(){t.observable.subscribe(()=>{t.isGranted()?(c=!1,o.setSessionState(t=>Gu(t,e),`expandOrRenewOnConsent`).catch(P)):b()}),Ta||(md(()=>{t.isGranted()&&l()}),hd(()=>{c||o.setSessionState(e=>
8Ku(e),`expandOnVisibility`).catch(P)}),gd(()=>{o.setSessionState(t=>Wu(t,e),`initializeOnResume`).catch(P)}))}function v(){return{findSession:(e,t)=>s.find(e,t),findTrackedSession:(t,{returnInactive:n=!1,maxAge:r=ud}={})=>{let i=s.find(t,{returnInactive:n});if(!(!i||i.id===`invalid`||!gu(i.id,e.sessionSampleRate))&&!(no()-i.createdAt>r))return i},renewObservable:r,expireObservable:i,expire:b,updateSessionState:e=>{o.setSessionState(t=>({...t,...e}),`updateState`).catch(P)}}}function y(e){let t=s.find(),n=t?.id!==void 0,a=e.id!==void 0,o=n&&a&&t.id!==e.id;if(n&&(!a||o)&&(c=!0,i.notify(),s.closeActive(io())),a&&(!n||o)){if(c)return;s.add(x(e),io()),r.notify()}else n&&a&&!o&&(t.isReplayForced=!!e.forcedReplay)}function b(){u();let n=Lu(s.find(),e);t.isGranted()||delete n.anonymousId,y(n),o.setSessionState(n=>(t.isGranted()||delete n.anonymousId,Lu(n,e)),`expire`).catch(P)}function x(e){let t=Fu(e)??I();return e.id?{id:e.id,isReplayForced:!!e.forcedReplay,anonymousId:e.anonymousId,createdAt:t}:{id:`invalid`,isReplayForced:!1,anonymousId:void 0,createdAt:t}}}function pd(){let e={id:B(),isReplayForced:!1,anonymousId:void 0,createdAt:I()};return Promise.resolve({findSession:()=>e,findTrackedSession:()=>e,renewObservable:new F,expireObservable:new F,expire:W,updateSessionState:t=>{e={...e,...t}}})}function md(e){let{stop:t}=Us(window,[`click`,`touchstart`,`keydown`,`scroll`],e,{capture:!0,passive:!0});dd.push(t)}function hd(e){let t=()=>{document.visibilityState===`visible`&&e()},{stop:n}=K(document,`visibilitychange`,t);dd.push(n);let r=us(t,cd);dd.push(()=>{ds(r)})}function gd(e){let{stop:t}=K(window,`resume`,e,{capture:!0});dd.push(t)}var _d=class{constructor(){this.callbacks={}}notify(e,t){let n=this.callbacks[e];n&&n.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},vd=3e3;function yd(e,t,n=vd){let r=0,i=!1;return{isLimitReached(){if(r===0&&ls(()=>{r=0},$a),r+=1,r<=n||i)return i=!1,!1;if(r===n+1){i=!0;try{t(`Reached max number of ${e}s by minute: ${n}`)}finally{i=!1}}return!0}}}function bd(){return Sd()===1}var xd;function Sd(){return xd??=Cd()}function Cd(e=window){let t=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(t)?0:e.navigator.vendor?.indexOf(`Apple`)===0||/safari/i.test(t)&&!/chrome|android/i.test(t)?1:2}function wd(e,t){return document.readyState===e||document.readyState===`complete`?(t(),{stop:W}):K(window,e===`complete`?`load`:`DOMContentLoaded`,t,{once:!0})}function Td(e){return new Promise(t=>{wd(e,t)})}var Ed,Dd=new WeakMap;function Od(){return Ed||=kd(),Ed}function kd(){return`XMLHttpRequest`in M?new F(e=>{let{stop:t}=Ls(XMLHttpRequest.prototype,`open`,Ad),{stop:n}=Ls(XMLHttpRequest.prototype,`send`,t=>{jd(t,e)},{computeHandlingStack:!0}),{stop:r}=Ls(XMLHttpRequest.prototype,`abort`,Md);return()=>{t(),n(),r()}}):new F}function Ad({target:e,parameters:[t,n]}){Dd.set(e,{state:`open`,method:String(t).toUpperCase(),url:Ea(String(n))})}function jd({target:e,parameters:[t],handlingStack:n},r){let i=Dd.get(e);if(!i)return;let a=i;a.state=`start`,a.startClocks=z(),a.isAborted=!1,a.xhr=e,a.handlingStack=n,a.requestBody=t;let o=!1,{stop:s}=Ls(e,`onreadystatechange`,()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),s(),o)return;o=!0;let t=i;t.duration=L(a.startClocks.timeStamp,I()),t.status=e.status,typeof e.response==`string`&&(t.responseBody=e.response),r.notify({...t,state:`complete`})},{stop:l}=K(e,`loadend`,c);r.notify(a)}function Md({target:e}){let t=Dd.get(e);t&&(t.isAborted=!0)}async function Nd(e){let t=e.getReader(),n=[];for(;;){let e=await t.read();if(e.done)break;n.push(e.value)}return t.cancel().catch(W),Zs(n)}var Pd=function(e){return e[e.IGNORE=0]=`IGNORE`,e[e.COLLECT=1]=`COLLECT`,e}({}),Fd,Id=[];function Ld({responseBodyAction:e}={}){return e&&Id.push(e),Fd||=Rd(),Fd}function Rd(){return new F(e=>{if(!M.fetch)return;let{stop:t}=Ls(M,`fetch`,t=>zd(t,e),{computeHandlingStack:!0});return t})}function zd({parameters:e,onPostCall:t,handlingStack:n},r){let[i,a]=e,o=a?.method;o===void 0&&i instanceof Request&&(o=i.method);let s=o===void 0?`GET`:String(o).toUpperCase(),c=i instanceof Request?i.url:Ea(String(i)),l={state:`start`,init:a,input
8:i,method:s,startClocks:z(),url:c,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||a?.signal?.aborted||!1};r.notify(l),e[0]=l.input,e[1]=l.init,t(e=>{Bd(r,e,l).catch(P)})}async function Bd(e,t,n){let r=n,i;try{i=await t}catch(t){e.notify({...r,state:`resolve`,status:0,isAborted:r.init?.signal?.aborted||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,error:t});return}if(r.response=i,r.status=i.status,r.responseType=i.type,r.isAborted=!1,Id.reduce((e,t)=>Math.max(e,t(r)),0)===1){let e=Sc(i);if(e?.body)try{let t=await Nd(e.body);r.responseBody=new TextDecoder().decode(t)}catch{}}e.notify({...r,state:`resolve`})}function Vd(e){return typeof e.WebSocket==`function`}var Hd;function Ud(){return Hd||=Wd(),Hd}function Wd(){return new F(e=>{if(!Vd(M))return;let{stop:t}=Rs(M,`WebSocket`,({parameters:t,onPostCall:n})=>{let r=Array.isArray(t[1])?[].concat(t[1]):t[1],i=z();n(t=>{e.notify({state:`connecting`,instance:t,url:t.url,protocols:r,startClocks:i}),Gd(t,e)})}),{stop:n}=Ls(M.WebSocket.prototype,`send`,({target:t,parameters:[n],onPostCall:r})=>{let i=Kd(n),a=t.bufferedAmount;r(()=>{e.notify({state:`message-out`,instance:t,size:i,bufferedAmountPreSend:a,at:z()})})});return()=>{t(),n()}})}function Gd(e,t){let{stop:n}=K(e,`open`,()=>{t.notify({state:`open`,instance:e,openClocks:z(),protocol:e.protocol||``}),n()}),{stop:r}=K(e,`message`,n=>{t.notify({state:`message-in`,instance:e,size:Kd(n.data),at:z()})}),{stop:i}=K(e,`close`,n=>{t.notify({state:`closed`,instance:e,code:n.code,reason:n.reason,wasClean:n.wasClean,at:z()}),r(),i()})}function Kd(e){return typeof e==`string`?Xs(e):e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof Blob<`u`&&e instanceof Blob?e.size:0}function qd(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let n=window.requestIdleCallback(N(e),t);return()=>window.cancelIdleCallback(n)}return Jd(e)}function Jd(e){let t=no(),n=ls(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(no()-t))})},0);return()=>U(n)}var Yd=Qa;function Xd(){let e=[];function t(t){let r;if(!t||t.didTimeout){let e=performance.now();r=()=>30-(performance.now()-e)}else r=t.timeRemaining.bind(t);for(;r()>0&&e.length;)e.shift()();e.length&&n()}function n(){qd(t,{timeout:Yd})}return{push(t){e.push(t)===1&&n()},stop(){e.length=0}}}function Zd(e){return!!e&&typeof e.then==`function`}var Qd={};function $d(e){return Va(...e.map(e=>(Qd[e]||(Qd[e]=ef(e)),Qd[e])))}function ef(e){return new F(t=>{let n=ya[e];return ya[e]=(...r)=>{n.apply(console,r);let i=Ps(`console error`);Ra(()=>{t.notify(tf(r,e,i))})},()=>{ya[e]=n}})}function tf(e,t,n){let r=e.map(e=>nf(e)).join(` `);if(t===va.error){let i=Bl({originalError:e.find(uc),handlingStack:n,startClocks:z(),source:gc.CONSOLE,handling:`handled`,nonErrorPrefix:`Provided`,useFallbackStack:!1});return i.message=r,{api:t,message:r,handlingStack:n,error:i}}return{api:t,message:r,error:void 0,handlingStack:n}}function nf(e){return typeof e==`string`?q(e):uc(e)?Is(ms(e)):Qs(q(e),void 0,2)}function rf(e){let t=sa(e)===`object`;return t||V.error(`Unsupported context:`,e),t}function af(e,t,n){let r={...e};for(let[e,{required:i,type:a}]of Object.entries(t))a===`string`&&!of(r[e])&&(r[e]=String(r[e])),i&&of(r[e])&&V.warn(`The property ${e} of ${n} is required; context will not be sent to the intake.`);return r}function of(e){return e==null||e===``}function sf(e=``,{propertiesConfig:t={}}={}){let n={},r=new F,i={getContext:()=>pa(n),setContext:a=>{rf(a)?n=q(af(a,t,e)):i.clearContext(),r.notify()},setContextProperty:(i,a)=>{n=q(af({...n,[i]:a},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],af(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function cf(e,t,n,r){return N((...i)=>(r&&J({feature:r}),e()[t][n](...i)))}function lf(e,t,n){e.changeObservable.subscribe(()=>{let r=e.getContext();n.notify(e=>e[t].setContext(r))})}var uf=`_dd_c`,df=[];function ff(e,t,n){if(typeof window>`u`||typeof localStorage>`u`)return;let r=pf(t,n);df.push(K(window,`storage`,({key:e})=>{r===e&&a()})),e.changeObservable.subscribe(o);let i=ma(s(),e.getContext());es(i)||e.setContext(i);function a(){e.setContext(s())}function o(){localStorage.setItem(r,JSON.stringify(e.getContext()))}function s(){let e=localStorage.getItem(r);return e?Zo(e)??{}:{}}}function pf(e,t){return`${uf}_${e}_${t}`}var mf={userContext:`userContext`,globalContext:`globalContext`,accountContext:`accountContext`},hf={getContext:`getContext`,setContext:`setContext`,setContextProperty:`setContextProperty`,removeContextProperty:`removeContextProperty`,clearContext:`clearContext`};function gf(e,t,n){let r=_f();return t.storeContextsAcrossPages&&ff(r,n,4),e.register(()=>{let e=r.getContext();return es(e)||!e.id?ll:{account:e}}),r}function _f(){return sf(`account`,{propertiesConfig:{id:{type:`string`,required:!0},name:{type:`string`}}})}
8var vf=`_dd_tab_id`,yf;function bf(e){let t=xf();e.register(()=>({tab:{id:t}}))}function xf(){return yf||=Sf()??B(),yf}function Sf(){try{let e=sessionStorage.getItem(vf);if(e)return e;let t=B();return sessionStorage.setItem(vf,t),t}catch{return}}function Cf(e,t,n,r){let i=wf();return t.storeContextsAcrossPages&&ff(i,n,2),e.register(()=>{let e=i.getContext();return r?{context:e}:e}),i}function wf(){return sf(`global context`)}function Tf(e,t,n,r){let i=Ef();return t.storeContextsAcrossPages&&ff(i,r,1),e.register(({eventType:e,startTime:r})=>{let a=i.getContext(),o=n.findTrackedSession(r);return o?.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=o.anonymousId),es(a)?ll:{type:e,usr:a}}),i}function Ef(){return sf(`user`,{propertiesConfig:{id:{type:`string`},name:{type:`string`},email:{type:`string`}}})}var Df=`datadog-synthetics-`,Of=`${Df}public-id`,kf=`${Df}result-id`,Af=`${Df}injects-rum`,jf=`${Df}rum-context`;function Mf(){return Ta?!1:!!(M._DATADOG_SYNTHETICS_INJECTS_RUM||Io(Af))}function Nf(){let e=Ff();return If(e)?e:void 0}function Pf(){return!!Nf()}function Ff(){let e=M._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;let t=Io(jf);return t?Zo(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||Io(Of),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||Io(kf)}}function If(e){return typeof e==`object`&&!!e&&typeof e.test_id==`string`&&typeof e.result_id==`string`}var Lf={DOCUMENT:`document`,XHR:`xhr`,BEACON:`beacon`,FETCH:`fetch`,CSS:`css`,JS:`js`,IMAGE:`image`,FONT:`font`,MEDIA:`media`,WEBSOCKET:`websocket`,OTHER:`other`},Rf={FETCH:Lf.FETCH,XHR:Lf.XHR},zf=500,Bf=function(e){return e[e.RUNTIME_ERROR=0]=`RUNTIME_ERROR`,e[e.FETCH=1]=`FETCH`,e[e.XHR=2]=`XHR`,e[e.CONSOLE=3]=`CONSOLE`,e}({});function Vf(){let e=new Ha(zf,e=>{wl(`Early data collection dropped data on unbuffer`,{count:e})}),t=[];function n(n,r){t.push(r.subscribe(t=>{e.notify({type:n,data:t})}))}return n(0,H(Gl)()),n(1,Ld()),n(2,Od()),n(3,$d(Object.values(va))),{observable:e,stop:()=>t.forEach(e=>e.unsubscribe())}}function Hf(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Uf(e,t){return+e.toFixed(t)}function Wf(e){return typeof e==`number`}var Gf=function(e){return e[e.REPLAY=1]=`REPLAY`,e[e.RUM=2]=`RUM`,e[e.TELEMETRY=4]=`TELEMETRY`,e[e.PROFILING=6]=`PROFILING`,e}({});function Kf(e,t,n){e.register(({startTime:e})=>{let r=t.findTrackedSession(e);return r?{session:{id:r.id},anonymous_id:r.anonymousId,...n}:ll})}function qf(e,t){switch(t.type){case`string`:return`"${e}" must be a non-empty string`;case`number`:return t.min!==void 0&&t.max!==void 0?`"${e}" must be a number between ${t.min} and ${t.max}`:t.min===void 0?t.max===void 0?`"${e}" must be a finite number`:`"${e}" must be a number less than or equal to ${t.max}`:`"${e}" must be a number greater than or equal to ${t.min}`;case`percentage`:return`"${e}" must be a number between 0 and 100`;case`boolean`:return`"${e}" must be a boolean`;case`site`:return`"${e}" must be a valid Datadog site. ${_a} ${ga}/getting_started/site/.`;case`match-option`:return`"${e}" must be a string, RegExp, or function`;case`enum`:return`"${e}" must be one of: "${$f(t.values).join(`", "`)}"`;case`union`:return`"${e}" does not match any expected type`;case`schema`:return`"${e}" is not a valid object`;case`function`:return`"${e}" must be a function`}}function Jf(e,t,n){if(!e||typeof e!=`object`){n.error(`Configuration must be an object`);return}return Yf(t,e,n)}function Yf(e,t,n){let r={};for(let[i,a]of Object.entries(e)){let e=t[i],o=a.multiple?Xf(a,e,n):Qf(a,e,n);if(o===void 0){if(e!=null&&e!==``){if(n.error(qf(i,a)),a.required||a.strict!==!1)return}else if(a.required){n.error(`"${i}" is required`);return}r[i]=`default`in a?pa(a.default):void 0}else r[i]=o}return r}function Xf(e,t,n){if(t==null)return;if(e.type===`enum`&&e.allowAll&&t===`all`)return $f(e.values).slice();let r=Array.isArray(t)?t:[t],i=[];for(let t of r){let r=Qf(e,t,n);if(r===void 0){if(e.strict!==!1)return}else i.push(r)}if(!(e.strict===!1&&i.length===0&&r.length>0))return i}var Zf=/(datadog|ddog|datad0g|dd0g)/;function Qf(e,t,n){if(e.type===`schema`)return typeof t!=`object`||!t?void 0:Yf(e.schema,t,n);if(e.type===`union`){if(t==null)return;for(let r of e.variants){let e=Qf(r,t,n);if(e!==void 0)return e}return}if(t!=null)switch(e.type){case`function`:return typeof t==`function`?t:void 0;case`string`:return typeof t==`string`&&t.length>0?t:void 0;case`number`:return typeof t==`number`&&Number.isFinite(t)&&(e.min===void 0||t>=e.min)&&(e.max===void 0||t<=e.max)?t:void 0;case`percentage`:return la(t)?t:void 0;case`boolean`:return typeof t==`boolean`?t:e.strict===!1?!!t:void 0;case`site`:return typeof t!=`string`||!Zf.test(t)?void 0:t;case`match-option`:return ua(t)?t:void 0;case`enum`:return typeof t==`string`&&$f(e.values).includes(t)?t:void 0}}function $f(e){return ep(e)?e:Object.values(e)}function ep(e){return Array.isArray(e)}function tp(e,t){let n=0,r=[],i,a=!0,o=0,s=[],c=t,{stop:l}=K(e,`message`,({data:e})=>
8{if(e.type!==`wrote`||e.streamId!==c)return;let t=s[0];t&&(t.id===e.id?(s.shift(),n+=e.additionalBytesCount,r.push(e.result),i=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id<e.id&&l())});function u(){let e=r.length===0?new Uint8Array:Zs(r.concat(i)),t={rawBytesCount:n,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return n=0,r=[],t}function d(){a||=(e.postMessage({action:`reset`,streamId:t}),!0)}return{isAsync:!0,get isEmpty(){return a},write(n,r){e.postMessage({action:`write`,id:o,data:n,streamId:t}),s.push({id:o,writeCallback:r,data:n}),a=!1,o+=1},finish(e){d(),s.length?(s.forEach(e=>{delete e.writeCallback}),s[s.length-1].finishCallback=()=>e(u())):e(u())},finishSync(){d();let e=s.map(e=>e.data).join(``);return s.length=0,{...u(),pendingData:e}},estimateEncodedBytesCount(e){return e.length/8},stop(){l()}}}function np({configuredUrl:e,error:t,source:n,scriptType:r}){if(V.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&rp(t.message)){let t;t=e?`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,V.error(`${t} See documentation at ${ga}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r===`worker`&&Tl(t)}function rp(e){return e.includes(`Content Security Policy`)||e.includes(`requires 'TrustedScriptURL'`)}var ip=30*Qa;function ap(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=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]),n=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]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(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?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(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)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;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},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=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]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;
vendor: 4,151 bytes, line 8
8)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,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},S=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}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={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"},q=C,F=function(t,e,a){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&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=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))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&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<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}
vendor: 8,488 bytes, line 8
8(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(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<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(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-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(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=W(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=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(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-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||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=F(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=W(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&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(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=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(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 st=[new it(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(at(t),0===t.lookahead&&0===e)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,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){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=8,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),V(this.dyn_ltree),V(this.dyn_dtree),V(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),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(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}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[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),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(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)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>
vendor: 5,917 bytes, line 8
8=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(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=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(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=O(t.adler,r.pending_buf,r.pending-a,a)),X(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,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(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=O(t.adler,r.pending_buf,r.pending-a,a)),X(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,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)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+H;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=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(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)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=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},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};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 ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);
8i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(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=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.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?4:0,"[object ArrayBuffer]"===ct.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),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;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},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(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,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.13.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{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){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();`])))}var op={status:0};
8function sp(e,t,n){switch(op.status===0&&lp(e,t),op.status){case 1:return op.initializationFailureCallbacks.push(n),op.worker;case 3:return op.worker}}function cp(){return op.status}function lp(e,t){try{let n=H(ap)(e),{stop:r}=K(n,`error`,n=>{fp(e,t,n)}),{stop:i}=K(n,`message`,({data:n})=>{n.type===`errored`?fp(e,t,n.error,n.streamId):n.type===`initialized`&&dp(n.version)});n.postMessage({action:`init`}),ls(()=>up(t),ip),op={status:1,worker:n,stop:()=>{r(),i()},initializationFailureCallbacks:[]}}catch(n){fp(e,t,n)}}function up(e){op.status===1&&(V.error(`${e} failed to start: a timeout occurred while initializing the Worker`),op.initializationFailureCallbacks.forEach(e=>e()),op={status:2})}function dp(e){op.status===1&&(op={status:3,worker:op.worker,stop:op.stop,version:e})}function fp(e,t,n,r){op.status===1||op.status===0?(np({configuredUrl:e.workerUrl,error:n,source:t,scriptType:`worker`}),op.status===1&&op.initializationFailureCallbacks.forEach(e=>e()),op={status:2}):Tl(n,{worker_version:op.status===3&&op.version,stream_id:r})}var pp;function mp(e){return yp(e).segments_count}function hp(e){yp(e).segments_count+=1}function gp(e){yp(e).records_count+=1}function _p(e,t){yp(e).segments_total_raw_size+=t}function vp(e){return pp?.get(e)}function yp(e){pp||=new Map;let t;return pp.has(e)?t=pp.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},pp.set(e,t),pp.size>1e3&&bp()),t}function bp(){if(!pp)return;let e=pp.keys().next().value;e&&pp.delete(e)}var Y={ACTION:`action`,ERROR:`error`,LONG_TASK:`long_task`,VIEW:`view`,VIEW_UPDATE:`view_update`,RESOURCE:`resource`,VITAL:`vital`},xp={LONG_TASK:`long-task`,LONG_ANIMATION_FRAME:`long-animation-frame`},Sp={INITIAL_LOAD:`initial_load`,ROUTE_CHANGE:`route_change`,SESSION_RENEWAL:`session_renewal`,BF_CACHE:`bf_cache`},Cp={CLICK:`click`,CUSTOM:`custom`,TAP:`tap`,SCROLL:`scroll`,SWIPE:`swipe`,APPLICATION_START:`application_start`,BACK:`back`},wp={RAGE_CLICK:`rage_click`,ERROR_CLICK:`error_click`,DEAD_CLICK:`dead_click`},Tp={DURATION:`duration`,OPERATION_STEP:`operation_step`};function Ep(e,t){t.lastIndex=0;let n=t.exec(e);if(!n)return;let[r,i]=n;return i||r}function Dp(e){let t=[],n=0,r,i={quote:void 0,escapeSequence:void 0},a=``;for(let o of e){if(r=Pp[n].find(e=>Np[e](o,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!Lp(i.escapeSequence))return[];a+=zp(i.escapeSequence),i.escapeSequence=void 0}Fp.includes(r)?a+=o:Ip.includes(r)&&a!==``?(t.push(a),a=``):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${o}`:o:r===8?i.quote=o:r===9&&(i.quote=void 0),n=r}return Pp[n].includes(1)?(a!==``&&t.push(a),t):[]}var Op=/[a-zA-Z_$]/,kp=/[a-zA-Z0-9_$]/,Ap=/[0-9]/,jp=/[a-fA-F0-9]/,Mp=`'"`,Np={0:()=>!1,1:()=>!1,2:e=>Op.test(e),3:e=>kp.test(e),4:e=>e===`.`,5:e=>e===`[`,6:e=>e===`]`,7:e=>Ap.test(e),8:e=>Mp.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e===`\\`,12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith(`u`)&&t.escapeSequence.length<5?jp.test(e):!1},Pp={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Fp=[2,3,7,10],Ip=[4,5,6];function Lp(e){return`"'/\\bfnrt`.includes(e)||e.startsWith(`u`)&&e.length===5}var Rp={'"':`"`,"'":`'`,"/":`/`,"\\":`\\`,b:`\b`,f:`\f`,n:`
9`,r:`\r`,t:`	`};function zp(e){return e.startsWith(`u`)?String.fromCharCode(parseInt(e.slice(1),16)):Rp[e]}var Bp=`dd_rc_`,Vp={hit:`success`,miss:`missing`,error:`failure`};function Hp(e){return`${Bp}${e}`}function Up(e){if(typeof e!=`object`||!e)return!1;let t=`version`in e&&e.version===3,n=`config`in e&&typeof e.config==`object`&&e.config!==null,r=`metadata`in e&&ca(e.metadata)&&typeof e.metadata.syncId==`string`&&typeof e.metadata.lastSynced==`number`;return t&&n&&r}function Wp(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function Gp({remoteConfigurationId:e}){let t=Hp(e);return{read(){let e;try{e=localStorage.getItem(t)}catch{return{status:`error`}}if(e===null)return{status:`miss`};let n=Zo(e);return n===void 0||!Up(n)?(this.remove(),{status:`error`}):{status:`hit`,config:n.config,metadata:n.metadata}},remove(){try{localStorage.removeItem(t)}catch{}},write(e,n){let r=this.read();r.status===`hit`&&JSON.stringify(r.config)===JSON.stringify(e)||Wp(t,{version:3,config:e,metadata:{lastModified:n,lastSynced:I(),syncId:B()}})},stampFirstApplied(e){if(e.metadata.firstApplied!==void 0)return e.metadata;let n={...e.metadata,firstApplied:I()};return Wp(t,{version:3,config:e.config,metadata:n}),n}}}var Kp=`v1`,qp=[`applicationId`,`service`,`env`,`version`,`sessionSampleRate`,`sessionReplaySampleRate`,`telemetrySampleRate`,`trackAnonymousUser`,`trackUserInteractions`,`trackResources`,`trackLongTasks`,`traceContextInjection`,`actionNameAttribute`,`defaultPrivacyLevel`,`enablePrivacyF
9orActionName`,`traceSampleRate`,`trackSessionAcrossSubdomains`,`allowedTracingUrls`,`allowedTrackingOrigins`];async function Jp(e,t){let n,r=Xp(),i=await tm(e);return i.ok?(r.increment(`fetch`,`success`),n=Yp(e,i.value,t,r)):(r.increment(`fetch`,`failure`),V.error(i.error)),Dl(pl.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:r.get()}),n}function Yp(e,t,n,r){let i={...e};if(t.rum){let e=t.rum;qp.forEach(t=>{t in e&&(i[t]=a(e[t]))}),Object.keys(n).forEach(t=>{e[t]!==void 0&&o(n[t],e[t])})}return t.profiling?.sampleRate!==void 0&&(i.profilingSampleRate=t.profiling.sampleRate),i;function a(e){if(Array.isArray(e))return e.map(a);if(ca(e)){if(Zp(e)){let t=e.rcSerializedType;switch(t){case`string`:return e.value;case`regex`:return Qp(e.value);case`dynamic`:return s(e);default:V.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`);return}}return ts(e,a)}return e}function o(e,t){t.forEach(({key:t,value:n})=>{e.setContextProperty(t,a(n))})}function s(e){let t=e.strategy,n;switch(t){case`cookie`:n=c(e);break;case`dom`:n=u(e);break;case`js`:n=f(e);break;case`localStorage`:n=l(e);break;default:V.error(`Unsupported remote configuration: "strategy": "${t}"`);return}let r=e.extractor;return r!==void 0&&typeof n==`string`?$p(r,n):n}function c({name:e}){let t=No(e);return r.increment(`cookie`,t===void 0?`missing`:`success`),t}function l({key:e}){let t;try{t=localStorage.getItem(e)}catch{r.increment(`localStorage`,`failure`);return}return r.increment(`localStorage`,t===null?`missing`:`success`),t??void 0}function u({selector:e,attribute:t}){let n;try{n=document.querySelector(e)}catch{V.error(`Invalid selector in the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}if(!n){r.increment(`dom`,`missing`);return}if(d(n,t)){V.error(`Forbidden element selected by the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}let i=t===void 0?n.textContent:n.getAttribute(t);if(i===null){r.increment(`dom`,`missing`);return}return r.increment(`dom`,`success`),i}function d(e,t){return e.getAttribute(`type`)===`password`&&t===`value`}function f({path:e}){let t=window,n=Dp(e);if(n.length===0){V.error(`Invalid JSON path in the remote configuration: '${e}'`),r.increment(`js`,`failure`);return}for(let i of n){if(!(i in t)){r.increment(`js`,`missing`);return}try{t=t[i]}catch(t){V.error(`Error accessing: '${e}'`,t),r.increment(`js`,`failure`);return}}return r.increment(`js`,`success`),t}}function Xp(){let e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function Zp(e){return`rcSerializedType`in e}function Qp(e){try{return new RegExp(e)}catch{V.error(`Invalid regex in the remote configuration: '${e}'`)}}function $p(e,t){let n=Qp(e.value);if(n!==void 0)return Ep(t,n)}function em(e){let t=e.headers?.get(`last-modified`);if(!t)return;let n=new Date(t).getTime();return isNaN(n)?void 0:n}async function tm(e){let t;try{t=await bc(rm(e))}catch{t=void 0}if(!t?.ok)return{ok:!1,error:Error(`Error fetching the remote configuration.`)};let n=await t.json();return n.rum||n.profiling?{ok:!0,value:n,lastModified:em(t)}:{ok:!1,error:Error(`No remote configuration for RUM.`)}}function nm(e){return e.remoteConfiguration?.id??e.remoteConfigurationId}function rm(e){if(e.remoteConfigurationProxy)return e.remoteConfigurationProxy;let t=nm(e);return vo({site:e.site,path:`/${Kp}/${encodeURIComponent(t)}.json`,subdomain:`sdk-configuration`})}function im(e,t,n){tm(e).then(e=>{e.ok?(n.increment(`fetch`,`success`),t.write(e.value,e.lastModified)):(n.increment(`fetch`,`failure`),V.error(e.error))}).catch(P).finally(()=>{Dl(pl.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:n.get()})})}function am(e,t){let n=Gp({remoteConfigurationId:nm(e)}),r=Xp(),i=n.read();if(r.increment(`cache`,Vp[i.status]),im(e,n,r),i.status===`hit`)return{metadata:n.stampFirstApplied(i),initConfiguration:Yp(e,i.config,t,r)};if(!e.remoteConfiguration?.required)return{initConfiguration:e}}var om=[`tracecontext`,`datadog`],sm=[`cache-control`,`etag`,`age`,`expires`,`content-type`,`content-encoding`,`vary`,`content-length`,`server-timing`,`x-cache`,`cf-cache-status`,`x-vercel-cache`],cm={...Co,applicationId:{type:`string`,required:!0},actionNameAttribute:{type:`string`},workerUrl:{type:`string`},subdomain:{type:`string`},sessionReplaySampleRate:{type:`percentage`,default:0},traceSampleRate:{type:`percentage`,default:100},profilingSampleRate:{type:`percentage`,default:0},compressIntakeRequests:{type:`boolean`,default:!1},trackUserInteractions:{type:`boolean`,default:!0,strict:!1},trackResources:{type:`boolean`,default:!0,strict:!1},trackLongTasks:{type:`boolean`,default:!0,strict:!1},trackViewsManually:{type:`boolean`,default:!1,strict:!1},betaEnableViewUpdates:{type:`boolean`},betaTrackWebSockets:{type:`boolean`,default:!1,strict:!1}
9,enablePrivacyForActionName:{type:`boolean`,default:!0},propagateTraceBaggage:{type:`boolean`,default:!0},startSessionReplayRecordingManually:{type:`boolean`,default:!1,strict:!1},sessionReplayCanvasRecording:{type:`schema`,schema:{enable:{type:`boolean`,required:!0},maxFramesPerSecond:{type:`number`,min:0,max:5,default:1},hashingMaxDimension:{type:`number`,min:1,max:100,default:100},maxImageDimension:{type:`number`,min:1,max:1e3,default:1e3}}},defaultPrivacyLevel:{type:`enum`,values:xo,default:xo.MASK_USER_INPUT,strict:!1},traceContextInjection:{type:`enum`,values:So,default:So.SAMPLED,strict:!1},excludedActivityUrls:{type:`match-option`,multiple:!0,default:[]},allowedTracingUrls:{type:`union`,multiple:!0,strict:!1,default:[],variants:[{type:`match-option`},{type:`schema`,schema:{match:{type:`match-option`,required:!0},propagatorTypes:{type:`enum`,values:[`datadog`,`b3`,`b3multi`,`tracecontext`],multiple:!0,strict:!1,default:om}}}]},plugins:{type:`schema`,multiple:!0,strict:!1,default:[],schema:{name:{type:`string`,required:!0},getConfigurationTelemetry:{type:`function`,strict:!1,signature:void 0},onInit:{type:`function`,strict:!1,signature:void 0},onRumStart:{type:`function`,strict:!1,signature:void 0}}},trackFeatureFlagsForEvents:{type:`enum`,values:[`vital`,`action`,`long_task`,`resource`],multiple:!0,strict:!1,default:[]}};function lm(e,t,n){return Wc()?!1:e??!1}function um(e,t){let n=Jf(e,cm,V);if(!n)return;let r=n.allowedTracingUrls.map(fm).filter(Boolean);if(r.length>0&&!n.service){V.error(`Service needs to be configured when tracing is enabled`);return}let i=os(ns.SESSION_REPLAY_RECORD_CANVAS)?n.sessionReplayCanvasRecording:void 0;return{...n,service:n.service||n.applicationId,sessionReplayCanvasRecording:i,betaEnableViewUpdates:lm(n.betaEnableViewUpdates,n.proxy,t),allowedTracingUrls:r,beforeSend:n.beforeSend?Jl(n.beforeSend,`beforeSend threw an error:`):void 0,rulePsr:Wf(e.traceSampleRate)?e.traceSampleRate/100:void 0,trackResourceHeaders:hm(e),allowedGraphQlUrls:pm(e),remoteConfigurationId:nm(e)}}function dm(e){let t=new Set;return su(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{fm(e)?.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}function fm(e){if(ua(e))return{match:e,propagatorTypes:om};if(ca(e)&&ua(e.match)&&(e.propagatorTypes===null||e.propagatorTypes===void 0||Array.isArray(e.propagatorTypes)))return{match:e.match,propagatorTypes:e.propagatorTypes||om}}function pm(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return V.warn(`allowedGraphQlUrls should be an array`),[];let t=[];
9return e.allowedGraphQlUrls.forEach(e=>{ua(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):ca(e)&&ua(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}var mm=[`request`,`response`,`any`];function hm(e){let t=e.trackResourceHeaders;if(t===void 0||t===!1)return[];if(t===!0)return sm.map(e=>({name:e}));if(!Array.isArray(t))return V.warn(`trackResourceHeaders should be true or an array of MatchHeader`),[];if(t.length===0)return V.warn(`trackResourceHeaders is an empty array, no headers will be captured`),[];let n=[];return t.forEach((e,t)=>{if(!ca(e)){V.warn(`trackResourceHeaders[${t}] should be a MatchHeader object`);return}if(e.name!==void 0&&!ua(e.name)){V.warn(`trackResourceHeaders[${t}].name should be a MatchOption`);return}if(e.url!==void 0&&!ua(e.url)){V.warn(`trackResourceHeaders[${t}].url should be a MatchOption`);return}if(e.extractor!==void 0&&!(e.extractor instanceof RegExp)){V.warn(`trackResourceHeaders[${t}].extractor should be a RegExp`);return}if(e.location!==void 0&&(typeof e.location!=`string`||!mm.includes(e.location))){V.warn(`trackResourceHeaders[${t}].location should be 'request', 'response', or 'any'`);return}let{name:r,...i}=e;n.push({...i,...r===void 0?{}:{name:typeof r==`string`?r.toLowerCase():r}})}),n}function gm(e){return su(e)&&e.some(e=>ca(e)&&e.trackPayload)}function _m(e){return su(e)&&e.some(e=>ca(e)&&e.trackResponseErrors)}function vm(e){if(e===!0)return`default_headers`;if(Array.isArray(e))return`custom`}function ym(e,t,n){let r=wo(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:su(e.allowedTracingUrls),use_allowed_graph_ql_urls:su(e.allowedGraphQlUrls),use_track_graph_ql_payload:gm(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:_m(e.allowedGraphQlUrls),selected_tracing_propagators:dm(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:su(e.excludedActivityUrls),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.plugins?.map(e=>({name:e.name,...e.getConfigurationTelemetry?.()})),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:nm(e),remote_configuration:n&&{last_modified:n.lastModified,last_synced:n.lastSynced,first_applied:n.firstApplied,sync_id:n.syncId},profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,track_resource_headers:vm(e.trackResourceHeaders),beta_enable_view_updates:lm(e.betaEnableViewUpdates,e.proxy,t),beta_track_web_sockets:e.betaTrackWebSockets,...r}}function bm(){return{assembleEventDefaults:sl(),assembleTelemetry:sl(),assembleEvent:sl()}}function xm(){let e=Sm();return new F(t=>{let n=new e(N(e=>t.notify(e)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Sm(){let e,t=window;return t.Zone&&(e=cs(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver&&(e=cs(new t.MutationObserver(W),`originalInstance`)?.constructor)),e||=t.MutationObserver,e}var Cm=function(e){return e[e.AUTO_ACTION_COMPLETED=0]=`AUTO_ACTION_COMPLETED`,e[e.BEFORE_VIEW_CREATED=1]=`BEFORE_VIEW_CREATED`,e[e.VIEW_CREATED=2]=`VIEW_CREATED`,e[e.BEFORE_VIEW_UPDATED=3]=`BEFORE_VIEW_UPDATED`,e[e.VIEW_UPDATED=4]=`VIEW_UPDATED`,e[e.VIEW_ENDED=5]=`VIEW_ENDED`,e[e.AFTER_VIEW_ENDED=6]=`AFTER_VIEW_ENDED`,e[e.REQUEST_STARTED=7]=`REQUEST_STARTED`,e[e.REQUEST_COMPLETED=8]=`REQUEST_COMPLETED`,e[e.WEBSOCKET_COMPLETED=9]=`WEBSOCKET_COMPLETED`,e[e.SESSION_EXPIRED=10]=`SESSION_EXPIRED`,e[e.SESSION_RENEWED=11]=`SESSION_RENEWED`,e[e.PREPARE_URGENT_FLUSH=12]=`PREPARE_URGENT_FLUSH`,e[e.RAW_RUM_EVENT_COLLECTED=13]=`RAW_RUM_EVENT_COLLECTED`,e[e.RUM_EVENT_COLLECTED=14]=`RUM_EVENT_COLLECTED`,e[e.RAW_ERROR_COLLECTED=15]=`RAW_ERROR_COLLECTED`,e[e.ACTION_STARTED=16]=`ACTION_STARTED`,e[e.DURATION_VITAL_STARTED=17]=`DURATION_VITAL_STARTED`,e}({}),wm=_d,Tm=vu;function Em(e){let t=pu({expireDelay:Tm});e.subscribe(1,e=>{t.add(n(e),e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let n=t.find(e.startClocks.relative);n&&(e.name&&(n.name=e.name),e.context&&(n.context=e.context),n.sessionIsActive=e.sessionIsActive)}),e.subscribe(11,()=>{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:(e,n)=>t.find(e,n),stop:()=>{t.stop()}}}var Dm=[[Lf.DOCUMENT,e=>e===`navigation`],[Lf.XHR,e=>e===`xmlhttprequest`],[Lf.FETCH,e=>e===`fetch`],[Lf.BEACON,e=>e===`beacon`],[Lf.CSS,(e,t)=>/\.css$/i.test(t)],[Lf.JS,(e,t)=>/\.js$/i.test(t)],[Lf.IMAGE,(e,t)=>[`image`,`img`,`icon`].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[Lf.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[Lf.MEDIA,(e,t)=>[`audio`,`video`].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];
9function Om(e){let t=e.name;if(!Da(t))return Lf.OTHER;let n=Oa(t);for(let[t,r]of Dm)if(r(e.initiatorType,n))return t;return Lf.OTHER}function km(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Am(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function jm(e){let{duration:t,startTime:n,responseEnd:r}=e;return e.initiatorType===`navigation`||t===0&&n<r?L(n,r):t}function Mm(e){if(!Pm(e))return;let{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:a,domainLookupStart:o,domainLookupEnd:s,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:f,responseEnd:p}=e,m={download:Im(t,f,p),first_byte:Im(t,d,f)};return 0<r&&r<n&&(m.worker=Im(t,r,n)),n<u&&(m.connect=Im(t,c,u),c<=l&&l<=u&&(m.ssl=Im(t,l,u))),n<s&&(m.dns=Im(t,o,s)),t<a&&(m.redirect=Im(t,i,a)),m}function Nm(e){return e.duration>=0}function Pm(e){let t=km(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=Fm(e)?km(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function Fm(e){return e.redirectEnd>e.startTime}function Im(e,t,n){if(e<=t&&t<=n)return{duration:R(L(t,n)),start:R(L(e,t))}}function Lm(e){return e.nextHopProtocol===``?void 0:e.nextHopProtocol}function Rm(e){return e.deliveryType===``?`other`:e.deliveryType}function zm(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Bm(e){return e&&(!Za(e)||os(ns.TRACK_INTAKE_REQUESTS))}var Vm=/data:(.+)?(;base64)?,/g,Hm=24e3;function Um(e,t=Hm){if(e.length<=t||!e.startsWith(`data:`))return e;let n=e.substring(0,100).match(Vm);return n?`${n[0]}[...]`:e}function Wm(e){return e.nodeType===Node.TEXT_NODE}function Gm(e){return e.nodeType===Node.COMMENT_NODE}function Km(e){return e.nodeType===Node.ELEMENT_NODE}function qm(e){return Km(e)&&!!e.shadowRoot}function Jm(e){let t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Km(t.host)}function Ym(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;qm(e)&&t(e.shadowRoot)}function Xm(e){return Jm(e)?e.host:e.parentNode}function Zm(e){if(e.parentElement)return e.parentElement;let t=e.parentNode;return t&&Jm(t)?t.host:null}var Qm=function(e){return 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`,e.VISIBILITY_STATE=`visibility-state`,e}({});function $m(e){return new F(t=>{let n=e=>{let n=ih(e);n.length>0&&t.notify(n)},r,i=!0,a=new PerformanceObserver(N(e=>{i?r=ls(()=>n(e.getEntries())):n(e.getEntries())}));return a.observe(e),i=!1,th(),()=>{a.disconnect(),U(r)}})}var eh;function th(){!eh&&nh()&&`addEventListener`in performance&&(eh=K(performance,`resourcetimingbufferfull`,()=>{performance.clearResourceTimings()}))}function nh(){return window.performance!==void 0&&`getEntries`in performance}function rh(e){return PerformanceObserver.supportedEntryTypes.includes(e)}function ih(e){return e.filter(e=>!ah(e))}function ah(e){return e.entryType===`resource`&&(!Bm(e.name)||!Nm(e))}var oh=`data-dd-action-name`,sh=`Masked Element`,ch=`::shadow `,lh=[oh,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],uh=[yh,gh],dh=[yh,_h,vh];function fh(e,t){if(!e.isConnected)return;let n=ph(e),r=[];for(let{rootNode:e,target:i}of n){let n=mh(i,e,t);if(!n)return;r.push(n)}return r.join(ch)}function ph(e){let t=[],n=e;for(;n;){let e=n.getRootNode();if(t.push({rootNode:e,target:n}),Jm(e))n=e.host;else break}return t.reverse()}function mh(e,t,n){let r,i=e;for(;i&&i.nodeName!==`HTML`;){let e=Ch(i,t,uh,wh,n,r);if(e)return Eh(e,r);r=Eh(Ch(i,t,dh,Th,n,r)||xh(i),r),i=i.parentElement}return r}function hh(e){return/[0-9]/.test(e)}function gh(e){if(e.id&&!hh(e.id))return`#${CSS.escape(e.id)}`}function _h(e){if(e.tagName===`BODY`)return;let t=e.classList;for(let n=0;n<t.length;n+=1){let r=t[n];if(!hh(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function vh(e){return CSS.escape(e.tagName)}function yh(e,t){if(t){let e=n(t);if(e)return e}for(let e of lh){let t=n(e);if(t)return t}function n(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}${bh(t,e.getAttribute(t))}`}}function bh(e,t){return`[${e}="${CSS.escape(t)}"]`}function xh(e){let t=Sh(e);return`${CSS.escape(e.tagName)}:nth-of-type(${t})`}function Sh(e){let t=e.parentNode.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return n}function Ch(e,t,n,r,i,a){for(let o of n){let n=o(e,i);if(n&&r(e,t,n,a))return n}}function wh(e,t,n,r){return t.querySelectorAll(Eh(n,r)).length===1}function Th(e,t,n,r){let i;if(r===void 0)i=e=>e.matches(n);else{let e=Eh(`${n}:scope`,r);i=t=>t.querySelector(e)!==null}let a=e.previousElementSibling;for(;a;){if(i(a))return!1;a=a.previousElementSibling}for(a=e.nextElementSibling;a;){if(i(a))return!1;a=a.nextElementSibling}return!0}function Eh(e,t){return t?`${e}>${t}`:e}var X={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:xo.ALLOW,MASK:xo.MASK,MASK_USER_INPUT:xo.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:xo.MASK_UNLESS_ALLOWLISTED},Dh=`data-dd-privacy`,Oh=`hidden`,kh=`dd-privacy-`,Ah=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,jh={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Mh(e){return`[${Dh}="${e}"], .${kh}${e}`}
9function Nh(e,t,n){if(n?.has(e))return n.get(e);let r=Xm(e),i=r?Nh(r,t,n):t,a=Ph(Fh(e),i);return n&&n.set(e,a),a}function Ph(e,t){switch(t){case X.HIDDEN:case X.IGNORE:return t}switch(e){case X.ALLOW:case X.MASK:case X.MASK_USER_INPUT:case X.MASK_UNLESS_ALLOWLISTED:case X.HIDDEN:case X.IGNORE:return e;default:return t}}function Fh(e){if(Km(e)){if(e.tagName===`BASE`)return X.ALLOW;if(e.tagName===`INPUT`){let t=e;if(t.type===`password`||t.type===`email`||t.type===`tel`||t.type===`hidden`)return X.MASK;let n=t.getAttribute(`autocomplete`);if(n&&(n.startsWith(`cc-`)||n.endsWith(`-password`)))return X.MASK}if(e.matches(Mh(X.HIDDEN)))return X.HIDDEN;if(e.matches(Mh(X.MASK)))return X.MASK;if(e.matches(Mh(X.MASK_UNLESS_ALLOWLISTED)))return X.MASK_UNLESS_ALLOWLISTED;if(e.matches(Mh(X.MASK_USER_INPUT)))return X.MASK_USER_INPUT;if(e.matches(Mh(X.ALLOW)))return X.ALLOW;if(Vh(e))return X.IGNORE}}function Ih(e,t){switch(t){case X.MASK:case X.HIDDEN:case X.IGNORE:return!0;case X.MASK_UNLESS_ALLOWLISTED:return Wm(e)?Rh(e.parentNode)?!0:!Hh(e.textContent||``):Rh(e);case X.MASK_USER_INPUT:return Wm(e)?Rh(e.parentNode):Rh(e);default:return!1}}function Lh(e,t,n,r,i){if(r!==X.MASK&&r!==X.MASK_UNLESS_ALLOWLISTED||t===`data-dd-privacy`||lh.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case`title`:case`alt`:case`placeholder`:case`aria-label`:case`name`:return!0}return!!(e===`A`&&t===`href`||e===`IFRAME`&&t===`srcdoc`||n&&t.startsWith(`data-`)||(e===`IMG`||e===`SOURCE`)&&(t===`src`||t===`srcset`))}function Rh(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;let t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!jh[t.tagName]}function zh(e){return e.replace(/\S/g,`x`)}function Bh(e,t){let n=e.parentElement?.tagName,r=e.textContent||``,i=t;return n===`SCRIPT`||i===X.HIDDEN?r=`***`:Ih(e,i)&&(n===`DATALIST`||n===`SELECT`||n===`OPTGROUP`||(r=n===`OPTION`?`***`:zh(r))),n===`HEAD`&&!r.trim()?``:r}function Vh(e){if(e.nodeName===`SCRIPT`)return!0;if(e.nodeName===`LINK`){let e=t(`rel`);return/preload|prefetch/i.test(e)&&t(`as`)===`script`||e===`shortcut icon`||e===`icon`}if(e.nodeName===`META`){let n=t(`name`),r=t(`rel`),i=t(`property`);return/^msapplication-tile(image|color)$/.test(n)||n===`application-name`||r===`icon`||r===`apple-touch-icon`||r===`shortcut icon`||n===`keywords`||n===`description`||/^(og|twitter|fb):/.test(i)||/^(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(i)||/^product:/.test(i)||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 t(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}function Hh(e){return e?.trim()?window.$DD_ALLOW?.has(e.toLocaleLowerCase())||!1:!0}function Uh(e,t){return Hh(e)?e:t||zh(e)}function Wh(){let e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function Gh(){let e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var Kh;function qh(){return Kh||=Jh(),Kh}function Jh(){return new F(e=>{let{throttled:t}=fs(()=>{e.notify(Yh())},200);return K(window,G.RESIZE,t,{capture:!0,passive:!0}).stop})}function Yh(){let 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 Xh=function(e){return e[e.OFF=0]=`OFF`,e[e.SAMPLED=1]=`SAMPLED`,e[e.FORCED=2]=`FORCED`,e}({});function Zh(e,t){return Wc()?+!!Uc(Vc.RECORDS):gu(e.id,mu(t.sessionSampleRate,t.sessionReplaySampleRate))?1:e.isReplayForced?2:0}function Qh(){let e=new F,{stop:t}=Ls(window,`open`,()=>e.notify());return{observable:e,stop:t}}function $h(e,t,n,r,i){return{get:a=>{let o=n.findView(a),s=i.findUrl(a),c=t.findTrackedSession(a);if(c&&o&&s){let t=r.findActionId(a);return{application_id:e,session_id:c.id,user_action:t?{id:t}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}function eg(){return ng(64)}function tg(){return ng(63)}function ng(e){let t=crypto.getRandomValues(new Uint32Array(2)),n=BigInt(t[0])+(BigInt(t[1])<<32n);return e===63&&(n&=9223372036854775807n),n}function rg(e){return e.toString(16).padStart(16,`0`)}function ig(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function ag(e,t,n,r){return{clearTracingIfNeeded:ig,traceFetch:i=>og(e,i,t,n,r,e=>{if(i.input instanceof Request&&!i.init?.headers)i.input=new Request
9(i.input),Object.keys(e).forEach(t=>{i.input.headers.append(t,e[t])});else{i.init=Qo(i.init);let t=[];i.init.headers instanceof Headers?i.init.headers.forEach((e,n)=>{t.push([n,e])}):Array.isArray(i.init.headers)?i.init.headers.forEach(e=>{t.push(e)}):i.init.headers&&Object.keys(i.init.headers).forEach(e=>{t.push([e,i.init.headers[e]])}),i.init.headers=t.concat(Yc(e))}}),traceXhr:(i,a)=>og(e,i,t,n,r,e=>{try{Object.keys(e).forEach(t=>{a.setRequestHeader(t,e[t])})}catch{}})}}function og(e,t,n,r,i,a){let o=n.findTrackedSession();if(!o)return;let s=e.allowedTracingUrls.find(e=>Uo([e.match],t.url,!0));if(!s)return;let c=gu(o.id,mu(e.sessionSampleRate,e.traceSampleRate)),l=Wc()?Hc()?.getIsTraceSampled()??c:c;(l||e.traceContextInjection===So.ALL)&&(t.traceSampled=l,t.traceId=eg(),t.spanId=tg(),a(sg(t.traceId,t.spanId,t.traceSampled,o.id,s.propagatorTypes,r,i,e)))}function sg(e,t,n,r,i,a,o,s){let c={};if(i.forEach(r=>{switch(r){case`datadog`:Object.assign(c,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toString()});break;case`tracecontext`:Object.assign(c,{traceparent:`00-0000000000000000${rg(e)}-${rg(t)}-0${n?`1`:`0`}`,tracestate:`dd=s:${n?`1`:`0`};o:rum`});break;case`b3`:Object.assign(c,{b3:`${rg(e)}-${rg(t)}-${n?`1`:`0`}`});break;case`b3multi`:Object.assign(c,{"X-B3-TraceId":rg(e),"X-B3-SpanId":rg(t),"X-B3-Sampled":n?`1`:`0`})}}),s.propagateTraceBaggage){let e={"session.id":r},t=a.getContext().id;typeof t==`string`&&(e[`user.id`]=t);let n=o.getContext().id;typeof n==`string`&&(e[`account.id`]=n);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(`,`);i&&(c.baggage=i)}return c}var cg=32*qs;function lg(e,t){let n=fg(e,t.trackPayload);if(n){if(t.trackResponseErrors&&e.responseBody){let t=ug(e.responseBody);t&&(n.error_count=t.length,n.errors=t)}return n}}function ug(e){let t=Zo(e);if(!t||typeof t!=`object`)return;let n=t;if(su(n.errors))return n.errors.map(e=>({message:e.message,path:e.path,locations:e.locations,code:e.extensions?.code}))}function dg(e,t){return t.allowedGraphQlUrls.find(t=>Uo([t.match],e))}function fg(e,t=!1){let n;if(e.method===`POST`?n=pg(e.requestBody):e.method===`GET`&&(n=mg(e.url)),n)return hg(n,t)}function pg(e){if(!e||typeof e!=`string`)return;let t=Zo(e);if(t)return{query:t.query,operationName:t.operationName,variables:t.variables?JSON.stringify(t.variables):void 0,operationType:t.operationType}}function mg(e){let t=ka(e).searchParams,n=t.get(`variables`),r=n&&Zo(n)!==void 0?n:void 0;return{query:t.get(`query`)||void 0,operationName:t.get(`operationName`)||void 0,variables:r,operationType:t.get(`operationType`)||void 0}}function hg(e,t){let n,r,i;if(e.query){let i=e.query.trim();n=gg(i),t&&(r=ko(i,cg,`...`))}if(!n){let t=e.operationType;(t===`query`||t===`mutation`||t===`subscription`)&&(n=t)}return e.variables&&(i=e.variables),{operationType:n,operationName:e.operationName,variables:i,payload:r}}function gg(e){return e.match(/^\s*(query|mutation|subscription)\b/i)?.[1]}var _g=1;function vg(e,t,n,r,i,a){let o=ag(t,n,r,i);yg(e,o,a),bg(e,t,o,a)}function yg(e,t,n){let r=[];return r.push(Od().subscribe(e=>{e.state===`start`&&Bm(e.url)&&(t.traceXhr(e,e.xhr),xg(e))})),r.push(n.subscribe(({data:n,type:r})=>{if(r!==Bf.XHR)return;let i=n;if(Bm(i.url))switch(i.state){case`start`:xg(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`complete`:t.clearTracingIfNeeded(i),e.notify(8,{...i,type:Rf.XHR,isAbortedOnStart:!1})}})),{stop:()=>r.forEach(e=>e.unsubscribe())}}function bg(e,t,n,r){let i=[];return i.push(Ld({responseBodyAction:e=>dg(e.url,t)?.trackResponseErrors?Pd.COLLECT:Pd.IGNORE}).subscribe(e=>{e.state===`start`&&Bm(e.url)&&(n.traceFetch(e),xg(e))})),i.push(r.subscribe(({data:t,type:r})=>{if(r!==Bf.FETCH)return;let i=t;if(Bm(i.url))switch(i.state){case`start`:xg(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`resolve`:n.clearTracingIfNeeded(i),e.notify(8,{...i,duration:L(i.startClocks.timeStamp,I()),type:Rf.FETCH,requestBody:i.init?.body})}})),{stop:()=>i.forEach(e=>e.unsubscribe())}}function xg(e){e.requestIndex||=_g++}var Sg=`websocket-connecting`,Cg=`websocket-closed`;function wg(e,t,n){let r=Tg(e,Ud(),t,n),i=e.subscribe(10,({endClocks:e})=>{r.flushOpenConnections(`session_end`,e)});return{stop:()=>{i.unsubscribe(),r.flushOpenConnections(`session_end`),r.stop()}}}function Tg(e,t,n,r){let i=new Map;function a(t,i,a){let o=Og(t,i,a,n);e.notify(9,o),r({id:B(),name:Cg,type:Tp.DURATION,startClocks:o.endClocks,duration:0,
9context:q({url:o.url,connection_id:o.connectionId})})}let o=t.subscribe(e=>{switch(e.state){case`connecting`:{let t=B(),a=n.findView(e.startClocks.relative)?.id,o=Eg(e.url),s={webSocket:e.instance,connectionId:t,url:o,startClocks:e.startClocks,startViewId:a,messagesIn:{count:0,size:0},messagesOut:{count:0,size:0},longestInboundSilence:0,bufferedAmountMax:0};i.set(e.instance,s),r({id:B(),name:Sg,type:Tp.DURATION,startClocks:e.startClocks,duration:0,context:q({url:o,connection_id:t})});return}case`open`:{let t=i.get(e.instance);if(!t)return;t.openClocks=e.openClocks,t.protocol=e.protocol,t.setupDuration=L(t.startClocks.timeStamp,e.openClocks.timeStamp);return}case`message-in`:{let t=i.get(e.instance);if(!t)return;t.messagesIn.count+=1,t.messagesIn.size+=e.size,Dg(t,e.at,`in`);return}case`message-out`:{let t=i.get(e.instance);if(!t)return;e.bufferedAmountPreSend>t.bufferedAmountMax&&(t.bufferedAmountMax=e.bufferedAmountPreSend),t.messagesOut.count+=1,t.messagesOut.size+=e.size,Dg(t,e.at,`out`);return}case`closed`:{let t=i.get(e.instance);if(!t)return;i.delete(e.instance),a(t,e,`close_event`);return}}});return{flushOpenConnections:(e,t=z())=>{i.forEach(n=>{a(n,{at:t},e)}),i.clear()},stop:()=>{o.unsubscribe(),i.clear()}}}function Eg(e){let t=ka(e);return t.search=``,t.href}function Dg(e,t,n){if(e.openClocks===void 0)return;let r=L(e.openClocks.timeStamp,t.timeStamp);if(n===`in`&&e.firstMessageInOffset===void 0?e.firstMessageInOffset=r:n===`out`&&e.firstMessageOutOffset===void 0&&(e.firstMessageOutOffset=r),n===`in`){if(e.lastMessageInAt!==void 0){let n=L(e.lastMessageInAt,t.timeStamp);n>e.longestInboundSilence&&(e.longestInboundSilence=n)}e.lastMessageInAt=t.timeStamp}}function Og(e,t,n,r){let i=t.at,a=n===`session_end`?r.findView(i.relative,{returnInactive:!0})?.id:r.findView(i.relative)?.id,o=e.lastMessageInAt===void 0?void 0:L(e.lastMessageInAt,i.timeStamp),{openClocks:s,...c}=e;return{...c,endClocks:i,endViewId:a,inboundIdleDurationBeforeClose:o,trackingEndReason:n,handshakeSucceeded:s!==void 0,setupDuration:e.setupDuration??L(e.startClocks.timeStamp,i.timeStamp),closeCode:t.code,closeReason:t.reason,wasClean:t.wasClean}}function kg(e){return Wf(e)&&e<0?void 0:e}function Ag(e,t,n,r,i,a){let o=H(jg)(e,t,n,r),s,c=!1,l=ls(N(()=>p({hadActivity:!1})),100),u=a===void 0?void 0:ls(N(()=>p({hadActivity:!0,end:I()})),a),d=o.subscribe(({isBusy:e})=>{U(l),U(s);let t=I();e||(s=ls(N(()=>p({hadActivity:!0,end:t})),100))}),f=()=>{c=!0,U(l),U(s),U(u),d.unsubscribe()};function p(e){c||(f(),i(e))}return{stop:f}}function jg(e,t,n,r){return new F(i=>{let a=[],o,s=0;return a.push(t.subscribe(e=>{e.every(Ng)||c()}),n.subscribe(c),$m({type:`resource`}).subscribe(e=>{e.some(e=>!Mg(r,e.name))&&c()}),e.subscribe(7,e=>{Mg(r,e.url)||(o===void 0&&(o=e.requestIndex),s+=1,c())}),e.subscribe(8,e=>{Mg(r,e.url)||o===void 0||e.requestIndex<o||(--s,c())})),()=>{a.forEach(e=>e.unsubscribe())};function c(){i.notify({isBusy:s>0})}})}function Mg(e,t){return Uo(e.excludedActivityUrls,t)}function Ng(e){let t=e.type===`characterData`?e.target.parentElement:e.target;return!!(t&&Km(t)&&t.matches(`[data-dd-excluded-activity-mutations], [data-dd-excluded-activity-mutations] *`))}function Pg({lifeCycle:e,isChildEvent:t,onChange:n=W}){let r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(14,e=>{if(!(e.type===`view`||e.type===`vital`||!t(e)))switch(e.type){case Y.ERROR:r.errorCount+=1,n();break;case Y.ACTION:r.actionCount+=1,e.action.frustration&&(r.frustrationCount+=e.action.frustration.type.length),n();break;case Y.LONG_TASK:r.longTaskCount+=1,n();break;case Y.RESOURCE:e._dd?.discarded||(r.resourceCount+=1,n())}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}var Fg=5*$a;function Ig(e){let t=pu({expireDelay:Fg}),n=new Map;function r(e){n.delete(e.key),e.eventCounts?.stop()}function i(){n.forEach(e=>{r(e)}),t.reset()}let a=e.subscribe(11,i);function o(i,a,o,s){let c=B(),l=t.add(c,a.relative),u=n.get(i);u&&r(u);let d={id:c,key:i,startClocks:a,data:o,historyEntry:l,eventCounts:s?.isChildEvent?Pg({lifeCycle:e,isChildEvent:s.isChildEvent(c)}):void 0};return n.set(i,d),d}function s(e,t,i){let a=n.get(e);if(!a)return;let o=i?ma(a.data,i):a.data;a.historyEntry.close(t.relative);let s=L(a.startClocks.timeStamp,t.timeStamp),c=a.eventCounts?.eventCounts;return r(a),{...o,id:a.id,startClocks:a.startClocks,duration:s,counts:c}}function c(e){let t=n.get(e);if(!t)return;let i=t.eventCounts?.eventCounts;return r(t),t.historyEntry.remove(),{...t.data,id:t.id,startClocks:t.startClocks,counts:i}}function l(e){return t.findAll(e)}function u(e){return n.get(e)?.eventCounts?.eventCounts}function d(){a.unsubscribe(),i(),t.stop()}return{start:o,stop:s,discard:c,getCounts:u,findId:l,stopAll:d}}var Lg=[`HTML`,`BODY`],Rg=2*qs,zg=lh.concat([`role`,`type`,`disabled`,`readonly`,`tabindex`,`draggable`,`target`,`rel`,`download`,`method`,`action`,`enctype`,`autocomplete`]);function Bg(e,t){let n=e.filter(e=>e instanceof Element&&!Lg.includes(e.tagName));if(n.length===0)return``;let r=t?[t].concat(zg):zg,i=``;for(let e of n){let t=Vg(e,r);if(i+=t,i.length>=Rg)return ko(i,Rg)}return i}function Vg(e,t){let n=vh(e),r=gh(e),i=Hg(e),a=Wg(e,t),o=Ug(e);return`${n}${r||``}${a}${i}${o};`}function Hg(e){return Array.from(e.classList).filter(e=>!hh(e)).sort().map(e=>`.${CSS.escape(e)}`).join(``)}function Ug(e){let t=Array.from(e.parentNode.children);if(t.length<=1)return``;let n=t.filter(t=>t.tagName===e.tagName),r=t.indexOf(e),i=Sh(e);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${i})`:``}`}function Wg(e,t){let n=[],r=Array.from(e.attributes);for(let e of r)t.includes(e.name)&&n.push(bh(e.name,e.value));return n.sort().join(``)}var Gg=`data-dd-ignore-frustration`,Kg=`all`,qg=`rage-click`,Jg=`dead-click`,Yg=`error-click`;function Xg(e,t){return(e&t)!==0}function Zg(e){let t=0,n=e;for(;n;){let e=n.getAttribute(Gg);if(e!==null){let n=e.split(/\s+/);if(e.trim()===``||n.includes(Kg))return 7;n.includes(qg)&&(t|=1),n.includes(Jg)&&(t|=2),n.includes(Yg)&&(t|=4)}if(t===7)break;n=Zm(n)}return t}var Qg=Qa;function $g(e,t){let n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),U(i),i=ls(s,Qg)}function o(){r===1&&n.every(e=>e.isStopped())&&(r=2,t(n))}function s(){U(i),r===0&&(r=1,o())}return{tryAppend:e=>r===0?n.length>0&&!e_(n[n.length-1],e)?(s(),!1):(a(e),!0):!1,stop:()=>{s()}}}function e_(e,t){return Xg(e.ignore,1)===Xg(t.ignore,1)&&e.event.target===t.event.target&&t_(e.event,t.event)<=100&&e.event.timeStamp-t.event.timeStamp<=Qg}function t_(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function n_(e,t,n=X.ALLOW){let r=new Map,{actionNameAttribute:i}=t,a=r_(e,`data-dd-action-name`)||i&&r_(e,i);return a?{name:a,nameSource:`custom_attribute`}:n===X.MASK?{name:sh,nameSource:`mask_placeholder`}:c_(e,a_,t,r)||c_(e,o_,t,r)||{name:``,nameSource:`blank`}}function r_(e,t){let n=i_(e,`[${t}]`);
9if(n)return u_(l_(n.getAttribute(t).trim()))}function i_(e,t){let n=e;for(;n;){if(n.matches(t))return n;n=Zm(n)}return null}var a_=[(e,t,n)=>{if(`labels`in e&&e.labels&&e.labels.length>0)return p_(e.labels[0],t,n)},e=>{if(e.nodeName===`INPUT`){let t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return{name:t.value,nameSource:`text_content`}}},(e,t,n)=>{if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return p_(e,t,n)},(e,t,n)=>f_(e,`aria-label`,t,n),(e,t,n)=>{let r=e.getAttribute(`aria-labelledby`);if(r)return{name:r.split(/\s+/).map(t=>d_(e,t)).filter(e=>!!e).map(e=>m_(e,t,n)).join(` `),nameSource:`text_content`}},(e,t,n)=>f_(e,`alt`,t,n),(e,t,n)=>f_(e,`name`,t,n),(e,t,n)=>f_(e,`title`,t,n),(e,t,n)=>f_(e,`placeholder`,t,n),(e,t,n)=>{if(`options`in e&&e.options.length>0)return p_(e.options[0],t,n)}],o_=[(e,t,n)=>p_(e,t,n)],s_=10;function c_(e,t,n,r){let i=e,a=0;for(;a<=s_&&i&&i.nodeName!==`BODY`&&i.nodeName!==`HTML`&&i.nodeName!==`HEAD`;){for(let e of t){let t=e(i,n,r);if(t){let{name:e,nameSource:n}=t,r=e?.trim();if(r)return{name:u_(l_(r)),nameSource:n}}}if(i.nodeName===`FORM`)break;i=Zm(i),a+=1}}function l_(e){return e.replace(/\s+/g,` `)}function u_(e){return e.length>100?`${ko(e,100)} [...]`:e}function d_(e,t){let n=e.getRootNode();if(n instanceof ShadowRoot){let e=n.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null}function f_(e,t,n,r){let{enablePrivacyForActionName:i,defaultPrivacyLevel:a}=n,o=e.getAttribute(t);if(o&&i){let i=Nh(e,a,r);Lh(e.tagName,t,o,i,n)&&(o=Uh(o,sh))}else o||=``;return{name:o,nameSource:`standard_attribute`}}function p_(e,t,n){return{name:m_(e,t,n)||``,nameSource:`text_content`}}function m_(e,t,n){if(e.isContentEditable)return;let{enablePrivacyForActionName:r,actionNameAttribute:i,defaultPrivacyLevel:a}=t,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,c),s=``;for(;o.nextNode();){let e=o.currentNode;if(Km(e)){(e.nodeName===`BR`||e.nodeName===`P`||[`block`,`flex`,`grid`,`list-item`,`table`,`table-caption`].includes(getComputedStyle(e).display))&&(s+=` `);continue}s+=e.textContent||``}return s.replace(/\s+/g,` `).trim();function c(e){let t=Nh(e,a,n);if(r&&t&&Ih(e,t))return NodeFilter.FILTER_REJECT;if(Km(e)){if(e.hasAttribute(`data-dd-action-name`)||i&&e.hasAttribute(i))return NodeFilter.FILTER_REJECT;let t=getComputedStyle(e);if(t.visibility!==`visible`||t.display===`none`||t.contentVisibility&&t.contentVisibility!==`visible`)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function h_({onPointerDown:e,onPointerUp:t}){let n,r={selection:!1,input:!1,scroll:!1},i,a=[K(window,G.POINTER_DOWN,t=>{__(t)&&(n=g_(),r={selection:!1,input:!1,scroll:!1},i=e(t))},{capture:!0}),K(window,G.SELECTION_CHANGE,()=>{(!n||!g_())&&(r.selection=!0)},{capture:!0}),K(window,G.SCROLL,()=>{r.scroll=!0},{capture:!0,passive:!0}),K(window,G.POINTER_UP,e=>{if(__(e)&&i){let n=r;t(i,e,()=>n),i=void 0}},{capture:!0}),K(window,G.INPUT,()=>{r.input=!0},{capture:!0})];return{stop:()=>{a.forEach(e=>e.stop())}}}function g_(){let e=window.getSelection();return!e||e.isCollapsed}function __(e){return e.target instanceof Element&&e.isPrimary!==!1}var v_=3;function y_(e,t){if(b_(e))return t.addFrustration(wp.RAGE_CLICK),e.some(S_)&&t.addFrustration(wp.DEAD_CLICK),t.hasError&&!Xg(t.ignore,4)&&t.addFrustration(wp.ERROR_CLICK),{isRage:!0};let n=e.some(e=>e.getUserActivity().selection);return e.forEach(e=>{e.hasError&&!Xg(e.ignore,4)&&e.addFrustration(wp.ERROR_CLICK),S_(e)&&!n&&e.addFrustration(wp.DEAD_CLICK)}),{isRage:!1}}function b_(e){if(e.some(e=>Xg(e.ignore,1)||e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-2;t+=1)if(e[t+v_-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var x_=`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 S_(e){if(Xg(e.ignore,2)||e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName===`LABEL`&&t.hasAttribute(`for`)&&(t=document.getElementById(t.getAttribute(`for`))),!t?.matches(x_)}var C_=10*Qa,w_=new Map;function T_(e){let t=w_.get(e);return w_.delete(e),t}function E_(e,t){w_.set(e,t),w_.forEach((e,t)=>{L(t,io())>C_&&w_.delete(t)})}function D_(e){return t=>t.action?.id?.includes(e)??!1}function O_(e,t,n,r){let i=Ig(e),a=new F,o;e.subscribe(5,l),e.subscribe(12,l);let{stop:s}=h_({onPointerDown:i=>k_(r,e,t,i,n),onPointerUp:({clickActionBase:o,ignore:s,hadActivityOnPointerDown:l},u,d)=>{A_(r,e,t,n,i,a,c,o,s,u,d,l)}});return{stop:()=>
9{l(),a.notify(),s(),i.stopAll()},findActionId:i.findId};function c(e){if(!o?.tryAppend(e)){let t=e.clone(),n=$g(e,e=>{P_(e,t),o===n&&(o=void 0)});o=n}}function l(){o&&o.stop()}}function k_(e,t,n,r,i){let a;if(a=e.enablePrivacyForActionName?Nh(M_(r),e.defaultPrivacyLevel):X.ALLOW,a===X.HIDDEN)return;let o=j_(r,a,e),s=!1;return Ag(t,n,i,e,e=>{s=e.hadActivity},100),{clickActionBase:o,ignore:Zg(M_(r)),hadActivityOnPointerDown:()=>s}}function A_(e,t,n,r,i,a,o,s,c,l,u,d){let f=N_(t,i,u,s,c,l);o(f);let p=s?.target?.selector;p&&E_(l.timeStamp,p);let{stop:m}=Ag(t,n,r,e,e=>{e.hadActivity&&e.end<f.startClocks.timeStamp?f.discard():e.hadActivity?f.stop(e.end):d()?f.stop(f.startClocks.timeStamp):f.stop()},C_),h=t.subscribe(5,({endClocks:e})=>{f.stop(e.timeStamp)}),g=t.subscribe(12,()=>{f.stop(I())}),_=a.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),h.unsubscribe(),m(),_.unsubscribe()})}function j_(e,t,n){let r=M_(e),i=r.getBoundingClientRect(),a=fh(r,n.actionNameAttribute),o=Bg(e.composedPath(),n.actionNameAttribute);a&&E_(e.timeStamp,a);let{name:s,nameSource:c}=n_(r,n,t);return{type:Cp.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:a,composedPathSelector:o||void 0},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:s,nameSource:c}}function M_(e){if(e.composed&&qm(e.target)&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function N_(e,t,n,r,i,a){let o=B(),s=oo(a.timeStamp),c=t.start(o,s,r,{isChildEvent:D_});e.notify(16,c);let l=0,u,d=[],f=new F;function p(e){l===0&&(l=1,u=e?t.stop(o,so(e)):t.discard(o),f.notify())}return{event:a,ignore:i,stop:p,stopObservable:f,get hasError(){let e=u?.counts??t.getCounts(o);return e?e.errorCount>0:!1},get hasPageActivity(){return u&&`duration`in u},getUserActivity:n,addFrustration:e=>{d.push(e)},get startClocks(){return s},isStopped:()=>l===1||l===2,clone:()=>N_(e,t,n,r,i,a),validate:t=>{if(p(),l!==1||!u)return;let n={frustrationTypes:d,events:t??[a],event:a,...u,counts:u.counts};e.notify(0,n),l=2},discard:()=>{p(),l=2}}}function P_(e,t){let{isRage:n}=y_(e,t);n?(e.forEach(e=>e.discard()),t.stop(I()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))}function F_(e,t){let n=Ig(e);function r(t,r={},i=z()){let a=r.actionKey??t,o=n.start(a,i,{name:t,...r},{isChildEvent:D_});e.notify(16,o)}function i(e,r={},i=z()){let a=r.actionKey??e,o=n.stop(a,i,r);if(!o)return;let s=[];o.counts&&o.counts.errorCount>0&&s.push(wp.ERROR_CLICK),t({...o,type:o.type||Cp.CUSTOM,frustrationTypes:s})}function a(e){t({id:B(),frustrationTypes:[],...e})}return{addAction:a,startAction:r,stopAction:i,findActionId:n.findId,stop:n.stopAll}}function I_(e,t,n,r,i){let{unsubscribe:a}=e.subscribe(0,t=>{e.notify(13,L_(t))}),o=W,s;i.trackUserInteractions&&(s=O_(e,n,r,i));let c=F_(e,t=>{e.notify(13,L_(t))}),l={findActionId:e=>{let t=c.findActionId(e),n=s?.findActionId(e)??[];return t.concat(n)}};return t.assembleEventDefaults.register(({startTime:e,eventType:t})=>{if(t!==Y.ERROR&&t!==Y.RESOURCE&&t!==Y.LONG_TASK)return ll;let n=t===Y.LONG_TASK?ro(e,1):e,r=l.findActionId(n);return r.length?{type:t,action:{id:r}}:ll}),t.assembleTelemetry.register(({startTime:e})=>({action:{id:l.findActionId(e)}})),{addAction:c.addAction,startAction:c.startAction,stopAction:c.stopAction,actionContexts:l,stop:()=>{a(),o(),c.stop(),s?.stop()}}}function L_(e){let t=R_(e),n=kg(R(e.duration));return{rawRumEvent:{type:Y.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...n!==void 0&&{loading_time:n},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:{selector:e.target?.selector||void 0,width:e.target?.width||void 0,height:e.target?.height||void 0,composed_path_selector:e.target?.composedPathSelector},position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}function R_(e){return`events`in e}function z_(e){let t=$l([Ql.cspViolation,Ql.intervention]).subscribe(t=>e.notify(t));return{stop:()=>{t.unsubscribe()}}}function B_(e,t){let n=new F;return t.subscribe(({data:e,type:t})=>{t===Bf.RUNTIME_ERROR?n.notify(e):t===Bf.CONSOLE&&e.api===va.error&&n.notify(e.error)}),z_(n),n.subscribe(t=>e.notify(15,{error:t})),V_(e)}function V_(e){return e.subscribe(15,({error:t})=>{e.notify(13,H_(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:a})=>{let o=Bl({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:_c.PROVIDED,source:gc.CUSTOM,handling:vc.HANDLED});o.context=ma(o.context,a),e.notify(15,{error:o})}}}function H_(e){let t={date:e.startClocks.timeStamp,error:{id:B(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:`browser`,fingerprint:e.fingerprint,csp:e.csp},_dd:{debug_ids:e.debugIds},type:Y.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:n}}function U_(e){return!(e.loadEventEnd>0&&e.domComplete<=0)}function W_(){if(rh(`navigation`)){let e=performance.getEntriesByType(`navigation`)[0];if(e&&U_(e))return e}let e=G_(),t={entryType:`navigation`,initiatorType:`navigation`,name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function G_(){let e={},t=performance.timing;for(let n in t)if(Wf(t[n])){let r=n,i=t[r];e[r]=i===0?0:co(i)}return e}function K_(e){return e.responseStart>=0&&e.responseStart<=io()?e.responseStart:void 0}function q_(){if(rh(`resource`))return performance.getEntriesByType(`resource`)}function J_(e,t){let n=q_();if(n)return qc(n,n=>n.name===e&&n.startTime<=t)}var Y_=2*$a;function X_(e){let t=Z_(e)||Q_(e);if(!(!t||t.traceTime<=mo()-Y_))return t.traceId}function Z_(e){let t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return $_(t?.content,n?.content)}function Q_(e){let t=ev(e);
9if(t)return $_(Eo(t,`trace-id`),Eo(t,`trace-time`))}function $_(e,t){let n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function ev(e){for(let t=0;t<e.childNodes.length;t+=1){let n=tv(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;--t){let n=e.body.childNodes[t],r=tv(n);if(r)return r;if(!Wm(n))break}}function tv(e){if(e&&Gm(e)){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function nv(e){let t=new Set,n=e.subscribe(8,e=>{t.add(e),t.size>1e3&&t.delete(t.values().next().value)});return{getMatchingRequest(e){let n=1/0,r;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){n.unsubscribe()}}}function rv(e,t){function n(e,n={},r=z()){let i=n.resourceKey??e;t.start(i,r,{url:e,...n})}function r(n,r={},i=z()){let a=r.resourceKey??n,o=t.stop(a,i,{context:r.context,type:r.type});if(!o)return;let s=L(o.startClocks.relative,i.relative),c={date:o.startClocks.timeStamp,type:Y.RESOURCE,resource:{id:o.id,type:o.type||Lf.OTHER,url:Um(o.url),duration:R(s),method:o.method,status_code:r.statusCode,size:r.size},_dd:{},context:o.context};e.notify(13,{rawRumEvent:c,startClocks:o.startClocks,duration:s,domainContext:{isManual:!0}})}return{startResource:n,stopResource:r}}function iv(e,t){let n=H(Xd)(),r=nv(e);e.subscribe(9,n=>{let r=av(n,t);r&&e.notify(13,r)});let i=$m({type:`resource`,buffered:!0}).subscribe(n=>{for(let i of n)Am(i)?ls(()=>{let n=ov(i,r.getMatchingRequest(i),t);n&&e.notify(13,n)},50):o(()=>ov(i,void 0,t))}),{stop:a}=wd(`interactive`,()=>{o(()=>ov(W_(),void 0,t))});function o(t){n.push(()=>{let n=t();n&&e.notify(13,n)})}let s=Ig(e),c=rv(e,s);return{startResource:c.startResource,stopResource:c.stopResource,stop:()=>{a(),n.stop(),i.unsubscribe(),s.stopAll()}}}function av(e,t){let n=L(e.startClocks.timeStamp,e.endClocks.timeStamp),r={date:e.startClocks.timeStamp,type:Y.RESOURCE,resource:{id:B(),type:Lf.WEBSOCKET,url:e.url,duration:R(n),websocket:{connection_id:e.connectionId,handshake_succeeded:e.handshakeSucceeded,start_time:e.startClocks.timeStamp,end_time:e.endClocks.timeStamp,start_view_id:e.startViewId,end_view_id:e.endViewId,tracking_end_reason:e.trackingEndReason,close_code:e.closeCode,close_reason:e.closeReason,was_clean:e.wasClean,messages_in:e.messagesIn,messages_out:e.messagesOut,time_to_first_message_in:R(e.firstMessageInOffset),time_to_first_message_out:R(e.firstMessageOutOffset),last_message_in_at:e.lastMessageInAt,longest_inbound_silence:R(e.longestInboundSilence),inbound_idle_duration_before_close:R(e.inboundIdleDurationBeforeClose),buffered_amount_max:e.bufferedAmountMax,protocol:e.protocol,setup_duration:R(e.setupDuration)}},_dd:{discarded:!t.trackResources}};return{startClocks:e.startClocks,duration:n,rawRumEvent:r,domainContext:{isWebSocket:!0,isManual:!1,webSocket:e.webSocket}}}function ov(e,t,n){let r=t?uv(t,n):dv(e,n);if(!n.trackResources&&!r)return;let i=oo(e.startTime),a=jm(e),o=pv(t,n);return{startClocks:i,duration:a,rawRumEvent:ma({date:i.timeStamp,resource:{id:B(),duration:R(a),type:Om(e),method:t?.method,status_code:t?t.status:fv(e.responseStatus),url:t?Um(t.url):e.name,protocol:Lm(e),delivery_type:Rm(e),graphql:t&&sv(t,n),render_blocking_status:e.renderBlockingStatus,...zm(e),...Mm(e)},type:Y.RESOURCE,_dd:{discarded:!n.trackResources}},r,cv(e),o),domainContext:lv(e,t)}}function sv(e,t){let n=dg(e.url,t);if(n)return lg(e,n)}function cv(e){let t=e.contentType;if(t)return{resource:{response:{headers:{"content-type":t}}}}}function lv(e,t){return{performanceEntry:e,isManual:!1,isAborted:t?t.isAborted:!1,isWebSocket:!1,handlingStack:t?.handlingStack,requestInit:t?.init,requestInput:t?.input,response:t?.response,error:t?.error,xhr:t?.xhr}}function uv(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function dv(e,t){if(e.initiatorType!==`navigation`)return;let n=H(X_)(document);if(n)return{_dd:{trace_id:n,span_id:tg().toString(),rule_psr:t.rulePsr}}}function fv(e){return e===0?void 0:e}function pv(e,t){let n=t.trackResourceHeaders;if(n.length===0||!e)return;let r=n.filter(t=>t.url===void 0?!0:Uo([t.url],e.url,!0));if(r.length===0)return;let i=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`response`),a=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`request`),o=i.length>0?mv(e,i):void 0,s=a.length>0?hv(e,a):void 0;if(!(!o&&!s))return{resource:{request:s?{headers:s}:void 0,response:o?{headers:o}:void 0}}}function mv(e,t){if(e.type===Rf.FETCH&&e.response)return bv(e.response.headers,t);if(e.type===Rf.XHR&&e.xhr){let n=e.xhr.getAllResponseHeaders();if(n)try{return bv(new Headers(xv(n)),t)}catch{}}}function hv(e,t){if(e.type!==Rf.FETCH)return;let n;return e.init?.headers?n=new Headers(e.init.headers):e.input instanceof Request&&(n=e.input.headers),n?bv(n,t):void 0}var gv=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/,_v=100,vv=128,yv=e=>sm.includes(e);function bv(e,t){let n={},r=0,i=!1;return e.forEach((e,a)=>{if(r>=_v){i||=(V.warn(`Maximum number of headers (${_v}) has been reached. Further headers are dropped.`),!0);return}let o=a.toLowerCase();if(gv.test(o))return;let s=t.find(e=>Uo([e.name??yv],o));if(!s)return;let{extractor:c}=s,l=c?Ep(e,c):e;l!==void 0&&(l.length>vv&&V.warn(`Header "${o}" value was truncated from ${l.length} to ${vv} characters.`),n[o]=ko(l,vv),r++)}),r>0?n:void 0}function xv(e){let t=[],n=e.trim().split(/\r\n/);for(let e of n){let n=e.indexOf(`:`);n>0&&t.push([e.substring(0,n).trim(),e.substring(n+1).trim()])}return t}function Sv(e,t,n){let{stop:r,eventCounts:i}
9=Pg({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:n});return{stop:r,eventCounts:i}}var Cv=10*$a;function wv(e,t){return{stop:$m({type:`paint`,buffered:!0}).subscribe(n=>{let r=n.find(t=>t.name===`first-contentful-paint`&&t.startTime<e.timeStamp&&t.startTime<Cv);r&&t(r.startTime)}).unsubscribe}}function Tv(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(L(e,io()))})})}function Ev(e){return kv(()=>{let t=H(W_)();Ov(t)||e(Dv(t))})}function Dv(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:K_(e)}}function Ov(e){return e.loadEventEnd<=0}function kv(e){let t,{stop:n}=wd(`complete`,()=>{t=ls(()=>e())});return{stop:()=>{n(),U(t)}}}var Av=10*$a;function jv(e,t,n,r){let i=1/0,{stop:a}=Us(n,[G.POINTER_DOWN,G.KEY_DOWN],e=>{i=e.timeStamp},{capture:!0,once:!0}),o=0,s=$m({type:`largest-contentful-paint`,buffered:!0}).subscribe(n=>{let a=qc(n,e=>e.entryType===`largest-contentful-paint`&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<Av&&e.size>o);if(a){let t;a.element&&(t=fh(a.element,e.actionNameAttribute));let n=Mv(a),i=a.startTime,s=Nv(n,i);r({value:i,targetSelector:t,resourceUrl:n,subParts:s}),o=a.size}});return{stop:()=>{a(),s.unsubscribe()}}}function Mv(e){return e.url===``?void 0:e.url}function Nv(e,t){let n=K_(W_());if(n===void 0)return;let r=e?J_(e,t):void 0,i=r?Math.max(n,r.requestStart||r.startTime):n,a=Math.min(t,Math.max(i,r?.responseEnd||0));return{loadDelay:i-n,loadTime:a-i,renderDelay:t-a}}function Pv(e,t=window){if(document.visibilityState===`hidden`)return{timeStamp:0,stop:W};if(rh(`visibility-state`)){let t=performance.getEntriesByType(`visibility-state`).filter(e=>e.name===`hidden`).find(t=>t.startTime>=e.relative);if(t)return{timeStamp:t.startTime,stop:W}}let n=1/0,{stop:r}=Us(t,[G.PAGE_HIDE,G.VISIBILITY_CHANGE],e=>{(e.type===G.PAGE_HIDE||document.visibilityState===`hidden`)&&(n=e.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function Fv(e,t,n,r){let i={},{stop:a}=Ev(e=>{n(e.loadEvent),i.navigationTimings=e,r()}),o=Pv(t),{stop:s}=wv(o,e=>{i.firstContentfulPaint=e,r()}),{stop:c}=jv(e,o,window,e=>{i.largestContentfulPaint=e,r()});function l(){a(),s(),c(),o.stop()}return{stop:l,initialViewMetrics:i}}var Iv=(e,t)=>e*t,Lv=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return n>=i||r>=a?0:Iv(i-n,a-r)},Rv=e=>{let t=Iv(e.previousRect.width,e.previousRect.height),n=Iv(e.currentRect.width,e.currentRect.height),r=Lv(e.previousRect,e.currentRect);return t+n-r};function zv(e,t,n){if(!Gv())return{stop:W};let r=0,i;n({value:0});let a=Wv(),o=$m({type:`layout-shift`,buffered:!0}).subscribe(o=>{for(let s of o){if(s.hadRecentInput||s.startTime<t)continue;let{cumulatedValue:o,isMaxValue:c}=a.update(s);if(c){let e=Bv(s.sources);i={target:e?.node?new WeakRef(e.node):void 0,time:L(t,s.startTime),previousRect:e?.previousRect,currentRect:e?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(o>r){r=o;let t=i?.target?.deref();n({value:Uf(r,4),targetSelector:t&&fh(t,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?Vv(i.previousRect):void 0,currentRect:i?.currentRect?Vv(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function Bv(e){let t;for(let n of e)if(n.node&&Km(n.node)){let e=Rv(n);(!t||Rv(t)<e)&&(t=n)}return t}function Vv({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}var Hv=5*Qa,Uv=Qa;function Wv(){let e=0,t,n,r=0;return{update:i=>{let a=t===void 0||i.startTime-n>=Uv||i.startTime-t>=Hv,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 Gv(){return rh(`layout-shift`)&&`WeakRef`in window}var Kv,qv=0,Jv=1/0,Yv=0;function Xv(){`interactionCount`in performance||Kv||(Kv=new window.PerformanceObserver(N(e=>{e.getEntries().forEach(e=>{let t=e;t.interactionId&&(Jv=Math.min(Jv,t.interactionId),Yv=Math.max(Yv,t.interactionId),qv=(Yv-Jv)/7+1)})})),Kv.observe({type:`event`,buffered:!0,durationThreshold:0}))}var Zv=()=>Kv?qv:window.performance.interactionCount||0,Qv=10,$v=1*$a,ey=8;function ty(e,t,n){if(!ay())return{getInteractionToNextPaint:()=>
9void 0,setViewEnd:W,stop:W};let r=1/0,i,{getViewInteractionCount:a,stopViewInteractionCount:o}=ry(n),s=ny(a),c=iy(s),l=$m({type:`first-input`,buffered:!0}).subscribe(d),u=$m({type:`event`,durationThreshold:40,buffered:!0}).subscribe(d);function d(e){for(let n of e)n.interactionId&&n.startTime>=t&&n.startTime<=r&&(s.process(n),c.process(n));c.pruneUntracked();let n=s.estimateP98Interaction();n&&f(n)}function f(n){let r=L(t,n.startTime);if(n.duration!==i?.duration||r!==i.startTime){let t=T_(n.startTime);!t&&n.target&&Km(n.target)&&(t=fh(n.target,e.actionNameAttribute)),i={duration:n.duration,startTime:r,targetSelector:t}}i.subParts=c.computeSubParts(n,oy(i.duration))}return{getInteractionToNextPaint:()=>{if(i)return{value:oy(i.duration),targetSelector:i.targetSelector,time:i.startTime,subParts:i.subParts};if(a())return{value:0}},setViewEnd:e=>{r=e,o()},stop:()=>{u.unsubscribe(),l.unsubscribe(),c.stop()}}}function ny(e){let t=[];function n(){t.sort((e,t)=>t.duration-e.duration).splice(Qv)}return{process(e){let r=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];r===-1?(t.length<Qv||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction(){let n=Math.min(t.length-1,Math.floor(e()/50));return t[n]},isTracked(e){return t.some(t=>t.interactionId===e)}}}function ry(e){Xv();let t=e===Sp.INITIAL_LOAD?0:Zv(),n={stopped:!1};function r(){return Zv()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function iy(e){let t=new Map;function n(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(e.interactionId===void 0||!e.processingStart||!e.processingEnd)return;let r=e.startTime+e.duration,i=t.get(e.interactionId);if(i){n(i,e);return}for(let[,i]of t.entries())if(Math.abs(r-i.referenceRenderTime)<=ey){n(i,e),t.set(e.interactionId,i);return}t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:r})},pruneUntracked(){for(let[n]of t)e.isTracked(n)||t.delete(n)},computeSubParts(e,n){if(!e.processingStart||!e.processingEnd||e.interactionId===void 0)return;let r=t.get(e.interactionId);if(!r)return;let i=Math.max(r.startTime+n,r.processingStart),a=Math.min(r.processingEnd,i);return{inputDelay:L(r.startTime,r.processingStart),processingDuration:L(r.processingStart,a),presentationDelay:L(a,i)}},stop(){t.clear()}}}function ay(){return rh(`event`)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function oy(e){return Math.min(e,$v)}function sy(e,t,n,r,i,a,o){let s=i===Sp.INITIAL_LOAD,c=!0,l=[],u=Pv(a);function d(){if(!c&&!s&&l.length>0){let e=Math.max(...l);e<u.timeStamp-a.relative&&o(e)}}let{stop:f}=Ag(e,t,n,r,e=>{c&&(c=!1,e.hadActivity&&l.push(L(a.timeStamp,e.end)),d())});return{stop:()=>{f(),u.stop()},setLoadEvent:e=>{s&&(s=!1,l.push(e),d())}}}var cy=Qa;function ly(e,t,n=dy()){let r=0,i=0,a=0,o=n.subscribe(({scrollDepth:n,scrollTop:o,scrollHeight:s})=>{let c=!1;if(n>r&&(r=n,c=!0),s>i){i=s;let t=io();a=L(e.relative,t),c=!0}c&&t({maxDepth:Math.min(r,i),maxDepthScrollTop:o,maxScrollHeight:i,maxScrollHeightTime:a})});return{stop:()=>o.unsubscribe()}}function uy(){let e=Gh(),{height:t}=Yh();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}function dy(e=cy){return new F(t=>{function n(){t.notify(uy())}let r=fs(n,e,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,a=new ResizeObserver(N(r.throttled));i&&a.observe(i);let o=K(window,G.SCROLL,r.throttled,{passive:!0});return()=>{r.cancel(),a.disconnect(),o.stop()}})}function fy(e,t,n,r,i,a,o){let s={},c=!1,l=!1,{stop:u,setLoadEvent:d}=sy(e,t,n,r,a,o,e=>{c||(s.loadingTime=e,i())}),{stop:f}=ly(o,e=>{s.scroll=e}),{stop:p}=zv(r,o.relative,e=>{s.cumulativeLayoutShift=e,i()}
9),{stop:m,getInteractionToNextPaint:h,setViewEnd:g}=ty(r,o.relative,a);return{stop:()=>{u(),p(),f()},stopINPTracking:m,setLoadEvent:d,setViewEnd:e=>{l=!0,g(e)},getCommonViewMetrics:()=>(s.interactionToNextPaint=h(),s),setLoadingTime:e=>{if(l)return;let t=L(o.timeStamp,e??I());c||u(),c=!0,s.loadingTime=t,i()}}}function py(e){let{stop:t}=K(window,G.PAGE_SHOW,t=>{t.persisted&&e(t)},{capture:!0});return t}function my(e,t,n){Tv(e.relative,e=>{t.firstContentfulPaint=e,t.largestContentfulPaint={value:e},n()})}var hy=3e3,gy=5*$a,_y=5*$a;function vy(e,t,n,r,i,a,o){let s=new Set,c=d(Sp.INITIAL_LOAD,ao(),o),l;f();let u;a&&(u=p(i),l=py(e=>{c.end();let t=oo(e.timeStamp);c=d(Sp.BF_CACHE,t,void 0)}));function d(i,a,o){let c=yy(e,t,n,r,i,a,o);return s.add(c),c.stopObservable.subscribe(()=>{s.delete(c)}),c}function f(){e.subscribe(11,()=>{c=d(Sp.SESSION_RENEWAL,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),e.subscribe(10,({endClocks:e})=>{c.end({sessionIsActive:!1,endClocks:e})})}function p(e){return e.subscribe(({oldLocation:e,newLocation:t})=>{xy(e,t)&&(c.end(),c=d(Sp.ROUTE_CHANGE))})}return{addTiming:(e,t=I())=>{c.addTiming(e,t)},setLoadingTime:e=>c.setLoadingTime(e),startView:(e,t)=>{c.end({endClocks:t}),c=d(Sp.ROUTE_CHANGE,t,e)},setViewContext:e=>{c.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{c.contextManager.setContextProperty(e,t)},setViewName:e=>{c.setViewName(e)},getViewContext:()=>c.contextManager.getContext(),stop:()=>
9{u&&u.unsubscribe(),l&&l(),c.end(),s.forEach(e=>e.stop())}}}function yy(e,t,n,r,i,a=z(),o){let s=B(),c=new F,l={},u=0,d,f=Qo(H(window.location)),p=sf(),m=!0,h=o?.name,g=o?.service||r.service,_=o?.version||r.version,v=o?.context,y=o?.handlingStack;v&&p.setContext(v);let b={id:s,name:h,startClocks:a,service:g,version:_,context:v,url:o?.url};e.notify(1,b),e.notify(2,b);let{throttled:x,cancel:S}=fs(j,hy,{leading:!1}),{setLoadEvent:C,setViewEnd:w,stop:T,stopINPTracking:ee,getCommonViewMetrics:E,setLoadingTime:te}=fy(e,t,n,r,A,i,a),{stop:ne,initialViewMetrics:D}=i===Sp.INITIAL_LOAD?Fv(r,a,C,A):{stop:W,initialViewMetrics:{}};i===Sp.BF_CACHE&&my(a,D,A);let{stop:O,eventCounts:re}=Sv(e,s,A),ie=us(j,gy),ae=e.subscribe(12,e=>{e===Xc.UNLOADING&&j()});j(),p.changeObservable.subscribe(A);function k(){e.notify(3,{id:s,name:h,context:p.getContext(),startClocks:a,sessionIsActive:m})}function A(){k(),x()}function j(){S(),k(),u+=1;let t=d===void 0?I():d.timeStamp;e.notify(4,{customTimings:l,documentVersion:u,id:s,name:h,service:g,version:_,context:p.getContext(),loadingType:i,location:f,handlingStack:y,startClocks:a,commonViewMetrics:E(),initialViewMetrics:D,duration:L(a.timeStamp,t),isActive:d===void 0,sessionIsActive:m,eventCounts:re})}return{get name(){return h},service:g,version:_,contextManager:p,stopObservable:c,end(t={}){d||(d=t.endClocks??z(),m=t.sessionIsActive??!0,e.notify(5,{endClocks:d}),e.notify(6,{endClocks:d}),ds(ie),w(d.relative),T(),ae.unsubscribe(),j(),ls(()=>{this.stop()},_y))},stop(){ne(),O(),ee(),c.notify()},addTiming(e,t){if(d)return;let n=uo(t)?t:L(a.timeStamp,t);l[by(e)]=n,A()},setLoadingTime:te,setViewName(e){h=e,j()}}}function by(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&V.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function xy(e,t){return e.pathname!==t.pathname||!Sy(t.hash)&&Cy(t.hash)!==Cy(e.hash)}function Sy(e){let t=e.substring(1);return t!==``&&!!document.getElementById(t)}function Cy(e){let t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function wy(e,t,n,r,i,a,o,s,c){return e.subscribe(4,t=>
9e.notify(13,Ty(t,n,o))),t.assembleEventDefaults.register(({startTime:e,eventType:t})=>{let n=s.findView(e);return n?{type:t,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:cl}),t.assembleTelemetry.register(({startTime:e})=>({view:{id:s.findView(e)?.id}})),vy(e,r,i,n,a,!n.trackViewsManually,c)}function Ty(e,t,n){let r=n.getReplayStats(e.id),i=e.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,a={_dd:{document_version:e.documentVersion,replay_stats:r,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually,remote_configuration_id:t.remoteConfigurationId}},date:e.startClocks.timeStamp,type:Y.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:R(e.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:R(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:R(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:R(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:R(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:R(e.initialViewMetrics.firstContentfulPaint),interaction_to_next_paint:R(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:R(e.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:R(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:R(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:kg(R(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Ey(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:R(e.duration)},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:R(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:Hf()}};return es(e.customTimings)||(a.view.custom_timings=ts(e.customTimings,R)),{rawRumEvent:a,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}function Ey({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,largestContentfulPaint:r}){return{cls:e&&{score:e.value,timestamp:R(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:R(n)},inp:t&&{duration:R(t.value),timestamp:R(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:R(t.subParts.inputDelay),processing_duration:R(t.subParts.processingDuration),presentation_delay:R(t.subParts.presentationDelay)}:void 0},lcp:r&&{timestamp:R(r.value),target_selector:r.targetSelector,resource_url:r.resourceUrl,sub_parts:r.subParts?{load_delay:R(r.subParts.loadDelay),load_time:R(r.subParts.loadTime),render_delay:R(r.subParts.renderDelay)}:void 0}}}function Dy(e,t){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return e===t;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length?e.every((e,n)=>Dy(e,t[n])):!1;if(Array.isArray(e)||Array.isArray(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);return i.length===a.length?i.every(e=>a.includes(e)&&Dy(n[e],r[e])):!1}function Oy(e,t,n){let r={},i=n?.replaceKeys??new Set,a=n?.appendKeys??new Set,o=n?.ignoreKeys??new Set;for(let n of Object.keys(e)){if(o.has(n))continue;let s=e[n],c=t[n];if(!i.has(n)&&ca(s)&&ca(c)){let e=Oy(s,c,{replaceKeys:ky(i,n),appendKeys:ky(a,n),ignoreKeys:ky(o,n)});e&&(r[n]=e)}else a.has(n)&&Array.isArray(s)&&Array.isArray(c)?s.length>c.length&&(r[n]=s.slice(c.length)):Dy(s,c)||(r[n]=s)}for(let n of Object.keys(t))n in e||(r[n]=null);return Object.keys(r).length>0?r:void 0}function ky(e,t){let n=new Set;for(let r of e)r.startsWith(`${t}.`)&&n.add(r.slice(t.length+1));return n}function Ay(e,t){let n=Oy(e,t,{replaceKeys:new Set([`view.custom_timings`,`context`,`connectivity`,`usr`,`device`,`privacy`]),appendKeys:new Set([`_dd.page_states`]),ignoreKeys:new Set([`date`,`type`,`application`,`session`,`view.id`,`view.url`,`_dd.document_version`,`_dd.format_version`])});if(n)return ma(n,{type:Y.VIEW_UPDATE,date:e.date,application:e.application,session:e.session,view:{id:e.view.id,url:e.view.url},_dd:{document_version:e._dd.document_version,format_version:e._dd.format_version}})}function jy(e,t){let n,r,i=!1,a=0,{unsubscribe:o}=e.flushObservable.subscribe(()=>{i=!1,r=n});return{dispatch:o=>
9{if(o.type!==Y.VIEW){e.add(o);return}if(!t){e.upsert(o,o.view.id);return}let s=o.view.id;if(!o.view.is_active){s===n?.view.id&&(n=void 0,r=void 0,i=!1,a=0),e.upsert(o,s);return}if(s!==n?.view.id){a=0,e.upsert(o,s),n=o,i=!e.isEmpty;return}if(n=o,i){e.upsert(o,s);return}if(a+=1,a>=100){a=0,e.upsert(o,s),i=!e.isEmpty;return}if(r){let t=Ay(o,r);t&&(hc(`rum`,t),e.upsert(t,s))}},stop:o}}function My(e,t,n,r,i){let a=[go(e,`rum`)],o=_o(e,`rum`);o&&a.push(o);let s=il({encoder:i(Gf.RUM),endpoints:a,reportError:n});r.subscribe(()=>s.forceFlush(`session_expire`));let{dispatch:c,stop:l}=jy(s,e.betaEnableViewUpdates);t.subscribe(14,c);let u=s.stop.bind(s);return s.stop=()=>{l(),u()},s}function Ny(e){let t=Hc();e.subscribe(14,e=>{t.send(`rum`,e)})}var Py=vu;function Fy(e,t,n){let r=pu({expireDelay:Py}),i;e.subscribe(1,({startClocks:e,url:t})=>{let n=H(M.location).href,a=t===void 0?n:ka(t,n).href;r.add(o({url:a,referrer:i||document.referrer}),e.relative),i=a}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)});let a=n.subscribe(({newLocation:e})=>{let t=r.find();if(t){let n=io();r.closeActive(n),r.add(o({url:e.href,referrer:t.referrer}),n)}});function o({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(({startTime:e,eventType:t})=>{let n=r.find(e);return n?{type:t,view:{url:n.url,referrer:n.referrer}}:cl}),{findUrl:e=>r.find(e),stop:()=>{a.unsubscribe(),r.stop()}}}function Iy(){let e=Qo(Ly());return new F(t=>{let{stop:n}=Ry(i),{stop:r}=zy(i);function i(){if(e.href===Ly().href)return;let n=Qo(Ly());t.notify({newLocation:n,oldLocation:e}),e=n}return()=>{n(),r()}})}function Ly(){return H(M.location)}function Ry(e){let{stop:t}=Ls(By(`pushState`),`pushState`,({onPostCall:t})=>{t(e)}),{stop:n}=Ls(By(`replaceState`),`replaceState`,({onPostCall:t})=>{t(e)}),{stop:r}=K(window,G.POP_STATE,e);return{stop:()=>{t(),n(),r()}}}function zy(e){return K(window,G.HASH_CHANGE,e)}function By(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}var Vy=vu;function Hy(e,t,n){let r=pu({expireDelay:Vy});return e.subscribe(1,({startClocks:e})=>{r.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)}),t.register(({startTime:e,eventType:t})=>{if(!n.trackFeatureFlagsForEvents.concat([Y.VIEW,Y.ERROR]).includes(t))return ll;let i=r.find(e);return!i||es(i)?ll:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let n=r.find();n&&(n[e]=t)}}}var Uy=10*Qa,Wy,Gy;function Ky(e,t,n){e.metricsEnabled&&(Xy(),Gy=!1,t.subscribe(14,()=>{Gy=!0}),n.subscribe(({bytesCount:e,messagesCount:t})=>{Gy&&(Gy=!1,Wy.batchCount+=1,Yy(Wy.batchBytesCount,e),Yy(Wy.batchMessagesCount,t))}),us(qy,Uy))}function qy(){Wy.batchCount!==0&&(Dl(pl.CUSTOMER_DATA_METRIC_NAME,Wy),Xy())}function Jy(){return{min:1/0,max:0,sum:0}}function Yy(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function Xy(){Wy={batchCount:0,batchBytesCount:Jy(),batchMessagesCount:Jy()}}var Zy=4e3,Qy=vu;function $y(e,t=500){let n=pu({expireDelay:Qy,maxEntries:Zy}),r;rh(`visibility-state`)&&performance.getEntriesByType(`visibility-state`).forEach(e=>{a(e.name===`hidden`?`hidden`:`active`,e.startTime)}),a(nb(),io());let{stop:i}=Us(window,[G.PAGE_SHOW,G.FOCUS,G.BLUR,G.VISIBILITY_CHANGE,G.RESUME,G.FREEZE,G.PAGE_HIDE],e=>{a(tb(e),e.timeStamp)},{capture:!0});function a(e,t=io()){e!==r&&(r=e,n.closeActive(t),n.add({state:r,startTime:t},t))}function o(e,t,r){return n.findAll(t,r).some(t=>t.state===e)}return e.register(({startTime:e,duration:r=0,eventType:i})=>i===Y.VIEW?{type:i,_dd:{page_states:eb(n.findAll(e,r),e,t)}}:i===Y.ACTION||i===Y.ERROR?{type:i,view:{in_foreground:o(`active`,e,0)}}:ll),{wasInPageStateDuringPeriod:o,addPageState:a,stop:()=>{i(),n.stop()}}}function eb(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:e,startTime:n})=>({state:e,start:R(L(t,n))}))}function tb(e){return e.type===G.FREEZE?`frozen`:e.type===G.PAGE_HIDE?e.persisted?`frozen`:`terminated`:nb()}function nb(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function rb(e){let t,n=requestAnimationFrame(N(()=>{t=Yh()})),r=qh().subscribe(e=>{t=e}).unsubscribe;return e.register(({eventType:e})=>({type:e,display:t?{viewport:t}:void 0})),{stop:()=>{r(),n&&cancelAnimationFrame(n)}}}function ib(e,t){let n=Ig(e);function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.duration)}function i(t){r(t)&&e.notify(13,ab(t))}function a(t,n,r,i){let{operationKey:a,context:o,description:s,handlingStack:c}=r||{}
9,l={name:t,type:Tp.OPERATION_STEP,operationKey:a,failureReason:i,stepType:n,startClocks:z(),context:q(o),description:s,handlingStack:c};e.notify(13,ab(l))}function o(t,r={},i=z()){let{id:a}=n.start(r.vitalKey??t,i,{name:t,...r});e.notify(17,{id:a,name:t,startClocks:i,...r})}function s(e,t={},r=z()){let a=n.stop(t.vitalKey??e,r,t);a&&i({type:Tp.DURATION,...a})}return{addOperationStepVital:a,addDurationVital:i,startDurationVital:o,stopDurationVital:s}}function ab(e){let{startClocks:t,type:n,name:r,description:i,context:a,handlingStack:o}=e,s={id:(e.type===Tp.DURATION?e.id:void 0)??B(),type:n,name:r,description:i,...n===Tp.DURATION?{duration:R(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:Y.VITAL,context:a},startClocks:t,duration:n===Tp.DURATION?e.duration:void 0,domainContext:o?{handlingStack:o}:{}}}function ob(e,t,n,r,i){e.register(({eventType:e,startTime:a})=>{let o=n.findTrackedSession(a),s=i.findView(a);if(!o||!s)return cl;let c,l,u;return e===Y.VIEW?(c=r.getReplayStats(s.id)?!0:void 0,l=Zh(o,t)===1,u=s.sessionIsActive?void 0:!1):c=r.isRecording()?!0:void 0,{type:e,session:{id:o.id,type:`user`,has_replay:c,sampled_for_replay:l,is_active:u}}})}function sb(e){let t=Du()?cb():ub;return new F(n=>t(e,e=>n.notify(e)))}function cb(){return(e,t)=>K(M.cookieStore,G.CHANGE,n=>{let r=n.changed.find(t=>t.name===e)||n.deleted.find(t=>t.name===e);r&&t(r.value)}).stop}var lb=Qa;function ub(e,t){let n=No(e),r=us(()=>{let r=No(e);r!==n&&(n=r,t(r))},lb);return()=>{ds(r)}}var db=`datadog-ci-visibility-test-execution-id`;function fb(e,t=sb(db)){let n=Io(`datadog-ci-visibility-test-execution-id`)||pb(),r=t.subscribe(e=>{n=e});return e.register(({eventType:e})=>typeof n==`string`?{type:e,session:{type:`ci_test`},ci_test:{test_execution_id:n}}:ll),{stop:()=>{r.unsubscribe()}}}function pb(){let e=window.Cypress;if(e)try{return e.env(`traceId`)}catch{V.warn(`Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.`);return}}function mb(e,t){let n=$m({type:rh(`long-animation-frame`)?`long-animation-frame`:`longtask`,buffered:!0}).subscribe(n=>{for(let r of n){if(!t.trackLongTasks)break;let n=oo(r.startTime),i=hb(r,n);e.notify(13,{rawRumEvent:i,startClocks:n,duration:r.duration,domainContext:{performanceEntry:r}})}});return{stop:()=>n.unsubscribe()}}function hb(e,t){let n=B(),r=R(e.duration),i={date:t.timeStamp,type:Y.LONG_TASK,_dd:{discarded:!1}};if(e.entryType===`longtask`)return{...i,long_task:{id:n,entry_type:xp.LONG_TASK,duration:r}};let a=Pl(e.scripts.map(e=>e.sourceURL).filter(e=>!!e));return{...i,_dd:{discarded:!1,debug_ids:a},long_task:{id:n,entry_type:xp.LONG_ANIMATION_FRAME,duration:r,blocking_duration:R(e.blockingDuration),first_ui_event_timestamp:R(e.firstUIEventTimestamp),render_start:R(e.renderStart),style_and_layout_start:R(e.styleAndLayoutStart),start_time:R(e.startTime),scripts:e.scripts.map(e=>({duration:R(e.duration),pause_duration:R(e.pauseDuration),forced_style_and_layout_duration:R(e.forcedStyleAndLayoutDuration),start_time:R(e.startTime),execution_start:R(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}))}}}function gb(e){e.register(({eventType:e})=>Pf()?{type:e,session:{type:`synthetics`},synthetics:{...Nf(),injected:Mf()}}:ll)}function _b(e,t,n){let r=pa(e),i=n(r);return Yc(t).forEach(([t,n])=>vb(e,r,t.split(/\.|(?=\[\])/),n)),i}function vb(e,t,n,r){let[i,...a]=n;if(i===`[]`){Array.isArray(e)&&Array.isArray(t)&&e.forEach((e,n)=>vb(e,t[n],a,r));return}if(!(!bb(e)||!bb(t))){if(a.length>0)return vb(e[i],t[i],a,r);yb(e,i,t[i],r)}}function yb(e,t,n,r){if(e[t]===n)return;let i=sa(n);i===r?e[t]=q(n):r===`object`&&(i===`undefined`||i===`null`)?e[t]={}:r===`array`&&(i===`undefined`||i===`null`)&&(e[t]=[])}function bb(e){return sa(e)===`object`}var xb={"view.name":`string`,"view.url":`string`,"view.referrer":`string`,context:`object`,service:`string`,version:`string`},Sb={[Y.VIEW]:{...xb,"view.performance.lcp.resource_url":`string`},[Y.ERROR]:{...xb,"error.message":`string`,"error.stack":`string`,"error.handling_stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`,"_dd.debug_ids":`array`},[Y.RESOURCE]:{...xb,"resource.url":`string`,"resource.graphql.variables":`string`,"resource.request.headers":`object`,"resource.response.headers":`object`,"resource.websocket.close_reason":`string`,"resource.websocket.protocol":`string`},[Y.ACTION]:{...xb,"action.target.name":`string`},[Y.LONG_TASK]:{...xb,"long_task.scripts[].source_url":`string`,"long_task.scripts[].invoker":`string`,"_dd.debug_ids":`array`},[Y.VITAL]:xb};function Cb(e,t,n,r,i){let a={[Y.ERROR]:yd(Y.ERROR,r,i),[Y.ACTION]:yd(Y.ACTION,r,i),[Y.VITAL]:yd(Y.VITAL,r,i)};t.subscribe(13,({startClocks:r,duration:i,rawRumEvent:o,domainContext:s})=>{let c={eventType:o.type,rawRumEvent:o,domainContext:s,startTime:r.relative,duration:i},l=n.assembleEventDefaults.trigger(c);if(l===`DISCARDED`)return;let u=n.assembleEvent.trigger(c);if(u===`DISCARDED`)return;let d=ma(l,o,u,{ddtags:dc(e).join(`,`)});wb(d,e.beforeSend,s,a)&&(es(d.context)&&delete d.context,t.notify(14,d))})}function wb(e,t,n,r){if(t){let r=_b(e,Sb[e.type],e=>t(e,n));if(r===!1&&e.type!==Y.VIEW)return!1;r===!1&&V.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function Tb(e){e.register(({eventType:e})=>({type:e,connectivity:yc()}))}function Eb(e,t,n){e.register(({eventType:e})=>{let r=t.source;return{type:e,_dd:{format_version:2,drift:fo(),configuration:{session_sample_rate:Uf(t.sessionSampleRate,3),session_replay_sample_rate:Uf(t.sessionReplaySampleRate,3),profiling_sample_rate:Uf(t.profilingSampleRate,3),trace_sample_rate:Uf(t.traceSampleRate,3)},browser_sdk_version:Wc()?`7.13.0`:void 0,sdk_name:n},application:{id:t.applicationId},date:I(),source:r}})}var Db=[Y.ACTION,Y.ERROR,Y.LONG_TASK,Y.RESOURCE,Y.VITAL];function Ob(e){return{addEvent:(t,n,r,i)=>
9{Db.includes(n.type)&&e.notify(13,{startClocks:oo(t),rawRumEvent:n,domainContext:r,duration:i})}}}function kb(e){e.register(({domainContext:e,rawRumEvent:t})=>{let n=Ab(e,t);if(!n)return ll;let r=Fl(n);return r?{type:t.type,service:r.service,version:r.version}:ll})}function Ab(e,t){if(t.type===`long_task`&&t.long_task.entry_type===`long-animation-frame`)return t.long_task.scripts[0]?.source_url;let n;return`handlingStack`in e&&(n=e.handlingStack),t.type===`error`&&t.error.stack&&(n=t.error.stack),ms({stack:n}).stack[0]?.url}function jb(e,t,n,r,i,a,o,s,c,l){let u=[],d=new wm;d.subscribe(14,e=>hc(`rum`,e)),t.expireObservable.subscribe(()=>d.notify(10,{endClocks:z()})),t.renewObservable.subscribe(()=>d.notify(11));let f=e=>{d.notify(15,{error:{message:e,source:gc.AGENT,startClocks:z()}}),wl(`Error reported to customer`,{"error.message":e})};if(Wc()){Ny(d);let e=Zc().subscribe(e=>{d.notify(12,e.reason)});u.push(()=>e.unsubscribe())}else{let n=My(e,d,f,t.expireObservable,a),r=n.prepareUrgentFlushObservable.subscribe(e=>{d.notify(12,e)});u.push(()=>r.unsubscribe()),u.push(()=>n.stop()),Ky(s,d,n.flushObservable)}let{stop:p,...m}=Mb(d,c,e,t,n,i,o,l,f);return u.push(p),o.unbuffer(),u.push(()=>r.stop()),{...m,lifeCycle:d,sessionManager:t,stopSession:()=>t.expire(),telemetry:s,stop:()=>{u.forEach(e=>e())},hooks:c}}function Mb(e,t,n,r,i,a,o,s,c){let l=[],u=xm(),d=Iy(),{observable:f,stop:p}=Qh();l.push(p);let{assembleEventDefaults:m}=t;Eb(m,n,s);let h=$y(m);l.push(()=>h.stop());let g=Em(e);l.push(()=>g.stop());let _=Fy(e,m,d);l.push(()=>_.stop());let v=Hy(e,m,n);ob(m,n,r,i,g),Tb(m),bf(m);let y=Cf(m,n,`rum`,!0),b=Tf(m,n,r,`rum`),x=gf(m,n,`rum`),S=I_(e,t,u,f,n);l.push(S.stop);let C=Ob(e),w=rb(m);l.push(w.stop);let T=fb(m);l.push(T.stop),gb(m),Cb(n,e,t,c);let{addTiming:ee,setLoadingTime:E,startView:te,setViewName:ne,setViewContext:D,setViewContextProperty:O,getViewContext:re,stop:ie}=wy(e,t,n,u,f,d,i,g,a);kb(m),l.push(ie);let ae=iv(e,n);l.push(ae.stop);let{stop:k}=mb(e,n);l.push(k);let{addError:A}=B_(e,o);vg(e,n,r,b,x,o);let j=ib(e,h);if(n.trackResources&&(n.betaTrackWebSockets||os(ns.TRACK_WEBSOCKETS))){let t=wg(e,g,j.addDurationVital);l.push(t.stop)}let oe=$h(n.applicationId,r,g,S.actionContexts,_);return{addAction:S.addAction,startAction:S.startAction,stopAction:S.stopAction,startResource:ae.startResource,stopResource:ae.stopResource,addEvent:C.addEvent,addError:A,addTiming:ee,setLoadingTime:E,addFeatureFlagEvaluation:v.addFeatureFlagEvaluation,startView:te,setViewContext:D,setViewContextProperty:O,getViewContext:re,setViewName:ne,viewHistory:g,sessionManager:r,stopSession:()=>r.expire(),getInternalContext:oe.get,startDurationVital:j.startDurationVital,stopDurationVital:j.stopDurationVital,addDurationVital:j.addDurationVital,addOperationStepVital:j.addOperationStepVital,globalContext:y,userContext:b,accountContext:x,stop:()=>l.forEach(e=>e())}}function Nb(e,t){if(!e)return!0;let n=e.map(e=>e.onInit?.(t));return n.some(Zd)?Promise.all(n).then(e=>!e.includes(!1)):!n.includes(!1)}function Pb(e,t){for(let n of e??[])n.onRumStart?.(t)}function Fb(e,t){e.register(()=>t.isGranted()?ll:cl)}function Ib({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t,s
9dkName:n},r,i){let a=new Ha(500,e=>{wl(`preStartRum buffer data lost`,{count:e})}),o=wf();lf(o,mf.globalContext,a);let s=Ef();lf(s,mf.userContext,a);let c=_f();lf(c,mf.accountContext,a);let l,u,d,f,p,m,h=bm(),g=r.observable.subscribe(y),_={},v=!1;function y(){if(v||!d||!f||!p||!m)return;g.unsubscribe();let e;if(f.trackViewsManually){if(!l)return;e=l.options}let t=f.trackViewsManually?l?.callback:void 0,n=i(f,p,u,e,m,h);v=!0,a.subscribe(e=>{e!==t&&e(n)}),a.unbuffer()}function b(e,i,a){let o=Wc();if(o&&(e=Lb(e)),d=e,f){Zl(`DD_RUM`,e);return}let s=um(e,n);!s||!Yo(s,i??``)||s.compressIntakeRequests&&!o&&t&&(u=t(s,`Datadog RUM`,W),!u)||(f=s,r.tryToInit(s.trackingConsent),r.onGrantedOnce(()=>{let{assembleTelemetry:t}=h;if(Fb(t,r),m=H(yl)(fl.RUM,s,t,n),Ta){V.warn(`The RUM SDK is not supported in a web or service worker environment.`);return}(Wc()?pd():H(fd)(s,r)).then(r=>{r&&(p=r,Kf(t,p,{application:{id:s.applicationId}}),El(ym(e,n,a)),y())}).catch(P)}))}return{init(t,n,r){if(!t){V.error(`Missing configuration`);return}if(is(t.enableExperimentalFeatures),Ks(t.allowUntrustedEvents),d=t,e&&Mf())return;let i=Nb(t.plugins,{initConfiguration:t,publicApi:n,registerAssembleEventHook:h.assembleEvent.register});typeof i==`boolean`?i&&a():i.then(e=>{e&&a()}).catch(P);function a(){if(nm(t)){let e={user:s,context:o};if(t.remoteConfigurationId||t.remoteConfiguration?.sync)Jp(t,e).then(e=>{e&&b(e,r)}).catch(P);else{let n=am(t,e);n&&b(n.initConfiguration,r,n.metadata)}}else b(t,r)}},get initConfiguration(){return d},getInternalContext:W,stopSession:W,addTiming(e,t=I()){a.notify(n=>n.addTiming(e,t))},setLoadingTime:(e=>{a.notify(t=>t.setLoadingTime(e))}),startView(e,t=z()){let n=n=>{n.startView(e,t)};a.notify(n),l||(l={options:e,callback:n},y())}
9,setViewName(e){a.notify(t=>t.setViewName(e))},setViewContext(e){a.notify(t=>t.setViewContext(e))},setViewContextProperty(e,t){a.notify(n=>n.setViewContextProperty(e,t))},getViewContext:()=>_,globalContext:o,userContext:s,accountContext:c,addAction(e){a.notify(t=>t.addAction(e))},startAction(e,t){let n=z();a.notify(r=>r.startAction(e,t,n))},stopAction(e,t){let n=z();a.notify(r=>r.stopAction(e,t,n))},startResource(e,t){let n=z();a.notify(r=>r.startResource(e,t,n))},stopResource(e,t){let n=z();a.notify(r=>r.stopResource(e,t,n))},addError(e){a.notify(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){a.notify(n=>n.addFeatureFlagEvaluation(e,t))},startDurationVital(e,t){let n=z();a.notify(r=>r.startDurationVital(e,t,n))},stopDurationVital(e,t){let n=z();a.notify(r=>r.stopDurationVital(e,t,n))},addDurationVital(e){a.notify(t=>t.addDurationVital(e))},addOperationStepVital:(e,t,n,r)=>{a.notify(i=>i.addOperationStepVital(q(e),t,q(n),q(r)))}}}function Lb(e){return{...e,service:e.service||e.applicationId,applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??Hc()?.getPrivacyLevel()}}function Rb(e,t,n={}){let r=Wa(),i=Vf(),a=Ib(n,r,(r,o,s,c,l,u)=>{let d=s&&n.createDeflateEncoder?e=>n.createDeflateEncoder(s,e):$c,f=H(jb)(r,o,e,t,c,d,i.observable,l,u,n.sdkName);return e.onRumStart(f.lifeCycle,r,o,f.viewHistory,s,f.telemetry),t.onRumStart(f.lifeCycle,f.hooks,r,o,f.viewHistory,d),a=Bb(a,f),Pb(r.plugins,{addEvent:f.addEvent,addError:f.addError}),f}),o=()=>a,s=e=>{let t=Ps(`view`);Ra(()=>{let n=typeof e==`object`?e:{name:e};a.startView({...n,name:zb(n.name,`view name`),service:zb(n.service,`view service`),version:zb(n.version,`view version`),handlingStack:t}),J({feature:`start-view`})})},c=(e,t)=>{let n=Ps(`vital`);Ra(()=>{J({feature:`add-operation-step-vital`,action_type:`start`}),a.addOperationStepVital(e,`start`,{...t,handlingStack:n})})},l=N((e,t)=>{J({feature:`add-operation-step-vital`,action_type:`succeed`}),a.addOperationStepVital(e,`end`,t)}),u=N((e,t,n)=>{J({feature:`add-operation-step-vital`,action_type:`fail`}),a.addOperationStepVital(e,`end`,n,t)}),d=Yl({init:e=>{let t=Error().stack;Ra(()=>a.init(e,d,t))},setTrackingConsent:N(e=>{r.update(e),J({feature:`set-tracking-consent`,tracking_consent:e})}),setViewName:N(e=>{a.setViewName(zb(e,`view name`)),J({feature:`set-view-name`})}),setViewContext:N(e=>{a.setViewContext(e),J({feature:`set-view-context`})}),setViewContextProperty:N((e,t)=>{a.setViewContextProperty(e,t),J({feature:`set-view-context-property`})}),getViewContext:N(()=>(J({feature:`set-view-context-property`}),a.getViewContext())),getInternalContext:N(e=>a.getInternalContext(e)),getInitConfiguration:N(()=>pa(a.initConfiguration)),addAction:(e,t)=>{let n=Ps(`action`);Ra(()=>{a.addAction({name:q(e),context:q(t),startClocks:z(),type:Cp.CUSTOM,handlingStack:n}),J({feature:`add-action`})})},startAction:N((e,t)=>{J({feature:`start-action`}),a.startAction(q(e),{type:q(t?.type),context:q(t?.context),actionKey:t?.actionKey})}),stopAction:N((e,t)=>{J({feature:`stop-action`}),a.stopAction(q(e),{type:q(t?.type),context:q(t?.context),actionKey:t?.actionKey})}),startResource:N((e,t)=>{J({feature:`start-resource`}),a.startResource(q(e),{type:q(t?.type),method:q(t?.method),context:q(t?.context),resourceKey:t?.resourceKey})}),stopResource:N((e,t)=>{J({feature:`stop-resource`}),a.stopResource(q(e),{type:q(t?.type),statusCode:t?.statusCode,size:t?.size,context:q(t?.context),resourceKey:t?.resourceKey})}),addError:(e,t)=>{let n=Ps(`error`);Ra(()=>{a.addError({error:e,handlingStack:n,context:q(t),startClocks:z()}),J({feature:`add-error`})})},addTiming:N((e,t)=>{a.addTiming(q(e),t)}),setViewLoadingTime:N(()=>{let e=I();a.setLoadingTime(e),J({feature:`addViewLoadingTime`})}),setGlobalContext:cf(o,mf.globalContext,hf.setContext,`set-global-context`),getGlobalContext:cf(o,mf.globalContext,hf.getContext,`get-global-context`),setGlobalContextProperty:cf(o,mf.globalContext,hf.setContextProperty,`set-global-context-property`),removeGlobalContextProperty:cf(o,mf.globalContext,hf.removeContextProperty,`remove-global-context-property`),clearGlobalContext:cf(o,mf.globalContext,hf.clearContext,`clear-global-context`),setUser:cf(o,mf.userContext,hf.setContext,`set-user`),getUser:cf(o,mf.userContext,hf.getContext,`get-user`),setUserProperty:cf(o,mf.userContext,hf.setContextProperty,`set-user-property`),removeUserProperty:cf(o,mf.userContext,hf.removeContextProperty,`remove-user-property`),clearUser:cf(o,mf.userContext,hf.clearContext,`clear-user`),setAccount:cf(o,mf.accountContext,hf.setContext,`set-account`),getAccount:cf(o,mf.accountContext,hf.getContext,`get-account`),setAccountProperty:cf(o,mf.accountContext,hf.setContextProperty,`set-account-property`),removeAccountProperty:cf(o,mf.accountContext,hf.removeContextProperty,`remove-account-property`),clearAccount:cf(o,mf.accountContext,hf.clearContext,`clear-account`),startView:s,stopSession:N(()=>{a.stopSession(),J({feature:`stop-session`})}),addFeatureFlagEvaluation:N((e,t)=>{a.addFeatureFlagEvaluation(q(e),q(t)),J({feature:`add-feature-flag-evaluation`})}),getSessionReplayLink:N(()=>e.getSessionReplayLink()),startSessionReplayRecording:N(t=>
9{e.start(t),J({feature:`start-session-replay-recording`,force:t?.force})}),stopSessionReplayRecording:N(()=>e.stop()),addDurationVital:(e,t)=>{let n=Ps(`vital`);Ra(()=>{J({feature:`add-duration-vital`}),a.addDurationVital({id:B(),name:q(e),type:Tp.DURATION,startClocks:so(t.startTime),duration:t.duration,context:q(t?.context),description:q(t?.description),handlingStack:n})})},startDurationVital:(e,t)=>{let n=Ps(`vital`);Ra(()=>{J({feature:`start-duration-vital`}),a.startDurationVital(q(e),{vitalKey:t?.vitalKey,context:q(t?.context),description:q(t?.description),handlingStack:n})})},stopDurationVital:N((e,t)=>{J({feature:`stop-duration-vital`}),a.stopDurationVital(q(e),{vitalKey:t?.vitalKey,context:q(t?.context),description:q(t?.description)})}),startOperation:c,succeedOperation:l,failOperation:u,startFeatureOperation:c,succeedFeatureOperation:l,failFeatureOperation:u,DEFAULT_TRACKED_RESOURCE_HEADERS:sm});return d}function zb(e,t){if(e!==void 0){if(typeof e!=`string`){V.warn(`Invalid ${t} provided (expected a string, got ${typeof e}). Ignoring.`);return}return q(e)}}function Bb(e,t){return{...e,init:e=>{Zl(`DD_RUM`,e)},getInternalContext:t.getInternalContext,stopSession:t.stopSession,getViewContext:t.getViewContext,globalContext:t.globalContext,userContext:t.userContext,accountContext:t.accountContext}}function Vb(e,{session:t,viewContext:n,errorType:r}){let i=t?t.id:`no-session-id`,a=[];return r!==void 0&&a.push(`error-type=${r}`),n&&(a.push(`seed=${n.id}`),a.push(`from=${n.startClocks.timeStamp}`)),`${Hb(e)}${`/rum/replay/sessions/${i}`}?${a.join(`&`)}`}function Hb(e){let t=e.site,n=e.subdomain||Ub(e);return`https://${n?`${n}.`:``}${t}`}function Ub(e){switch(e.site){case Ka:case qa:return`app`;case Ga:return`dd`;default:return}}function Wb(e,t,n,r){let i=Ic([go(e,`profile`)],e=>{t.notify(15,{error:{message:e,source:gc.AGENT,startClocks:z()}}),wl(`Error reported to customer`,{"error.message":e})}),a=n(r);return{async send({event:e,...t}){let n=new FormData,r=Qs(e);if(!r)throw Error(`Failed to serialize event`);n.append(`event`,new Blob([r],{type:`application/json`}),`event.json`);let o=r.length;for(let[e,r]of Yc(t)){let t=Qs(r);if(!t)throw Error(`Failed to serialize attachment`);let i=await Gb(a,t);o+=i.outputBytesCount,n.append(e,new Blob([i.output]),e)}i.send({data:n,bytesCount:o})}}}function Gb(e,t){return new Promise(n=>{e.write(t),e.finish(e=>{n(e)})})}function Kb(e,t,n,r){let i=t.findTrackedSession(),a=qb(e,i,r);return Vb(e,{viewContext:n.findView(),errorType:a,session:i})}function qb(e,t,n){if(!t)return`rum-not-tracked`;if(Zh(t,e)===Xh.OFF)return`incorrect-session-plan`;if(!n)return`replay-not-started`}function Jb(e,t){if(!e.metricsEnabled)return{stop:W};let n,r,i,{unsubscribe:a}=t.subscribe(e=>{switch(e.type){case`start`:n={forced:e.forced,timestamp:I()},r=void 0,i=void 0;break;case`document-ready`:n&&(r=L(n.timestamp,I()));break;case`recorder-settled`:n&&(i=L(n.timestamp,I()));break;case`aborted`:case`deflate-encoder-load-failed`:case`recorder-load-failed`:case`succeeded`:a(),n&&Dl(pl.RECORDER_INIT_METRICS_TELEMETRY_NAME,{metrics:Yb(n.forced,i,L(n.timestamp,I()),e.type,r)})}});return{stop:a}}function Yb(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}async function Xb(){try{return await H(Zb)()}catch(e){np({error:e,source:`Recorder`,scriptType:`module`})}}async function Zb(){return(await l(async()=>{let{startRecording:e}=await Promise.resolve().then(()=>ew);return{startRecording:e}},void 0,import.meta.url)).startRecording}function Qb(e,t,n,r,i,a){let o=0,s;t.subscribe(Cm.SESSION_EXPIRED,()=>{(o===2||o===3)&&(d(),o=1)}),t.subscribe(Cm.SESSION_RENEWED,()=>{o===1&&u()});let c=new F;Jb(a,c);let l=async l=>{c.notify({type:`start`,forced:l});let[u]=await Promise.all([nx(c,{type:`recorder-settled`},Xb()),nx(c,{type:`document-ready`},Td(`interactive`))]);if(o!==2){c.notify({type:`aborted`});return}if(!u){o=0,c.notify({type:`recorder-load-failed`});return}let d=i();if(!d){o=0,c.notify({type:`deflate-encoder-load-failed`});return}({stop:s}=u(t,e,n,r,d,a)),o=3,c.notify({type:`succeeded`})};function u(t){let r=n.findTrackedSession(),i=r?Zh(r,e):void 0;if(!$b(i,t)){o=1;return}if(ex(o))return;o=2;let a=tx(i,t)||!1;
9l(a).catch(P),a&&n.updateSessionState({forcedReplay:`1`})}function d(){o===3&&s?.(),o=0}return{start:u,stop:d,getSessionReplayLink(){return Kb(e,n,r,o!==0)},isRecording:()=>o===3}}function $b(e,t){return e!==void 0&&(e!==Xh.OFF||t?.force)}function ex(e){return e===2||e===3}function tx(e,t){return t&&t.force&&e===Xh.OFF}async function nx(e,t,n){try{return await n}finally{e.notify(t)}}function rx(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:W},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function ix(){if(Wc()&&!Uc(Vc.RECORDS))return{start:W,stop:W,getReplayStats:()=>void 0,onRumStart:W,isRecording:()=>!1,getSessionReplayLink:()=>void 0};let{strategy:e,shouldStartImmediately:t}=rx();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart:n,isRecording:()=>cp()===3&&e.isRecording(),getReplayStats:e=>cp()===3?vp(e):void 0};function n(n,r,i,a,o,s){let c;function l(){return c||(o??=sp(r,`Datadog Session Replay`,()=>e.stop()),o&&(c=tp(o,Gf.REPLAY))),c}e=Qb(r,n,i,a,l,s),t(r)&&e.start()}}function ax(){return M.Profiler!==void 0}function ox(e){let t={status:`starting`};return e.assembleEventDefaults.register(({eventType:e})=>e!==Y.VIEW&&e!==Y.LONG_TASK&&e!==Y.ACTION&&e!==Y.VITAL?ll:{type:e,_dd:{profiling:t}}),{get:()=>t,set:e=>{t=e}}}async function sx(){try{return await H(cx)()}catch(e){np({error:e,source:`Profiler`,scriptType:`module`})}}async function cx(){return(await l(async()=>{let{createRumProfiler:e}=await Promise.resolve().then(()=>Sw);return{createRumProfiler:e}},void 0,import.meta.url)).createRumProfiler}function lx(){let e;function t(t,n,r,i,a,o){let s=i.findTrackedSession();if(!s||!ux(r,s))return;let c=ox(n);if(!H(ax)()){c.set({status:`error`,error_reason:`not-supported-by-browser`});return}H(sx)().then(n=>{if(!n){c.set({status:`error`,error_reason:`failed-to-lazy-load`});return}e=n(r,t,i,c,o,a,void 0),e.start()}).catch(P)}return{onRumStart:t,stop:()=>{e?.stop()}}}function ux(e,t){return Wc()?Uc(Vc.PROFILES):gu(t.id,mu(e.sessionSampleRate,e.profilingSampleRate))}var dx=Rb(ix(),lx(),{startDeflateWorker:sp,createDeflateEncoder:tp,sdkName:`rum`});Xl(M,`DD_RUM`,dx);var fx,px,mx,hx,gx=[],_x=[];function vx(e={}){return{name:`react`,onInit({publicApi:t,initConfiguration:n}){fx=t,px=e;for(let e of gx)e(px,fx);e.router&&(n.trackViewsManually=!0)},onRumStart({addError:e}){mx=e;for(let t of _x)e&&t(e)},getConfigurationTelemetry(){let t=Ao(`react`,a.version);return{router:!!e.router,integrations:jo(t,e.router&&hx)}}}}function yx(e){hx=e}function bx(e){px&&fx?e(px,fx):gx.push(e)}function xx(e){mx?e(mx):_x.push(e)}function Sx(e,t){let n=Ps(`react error`),r=z();xx(i=>{Ra(()=>{i({error:e,handlingStack:n,componentStack:t.componentStack??void 0,startClocks:r,context:{...typeof e==`object`&&e?e.dd_context:void 0,framework:`react`}})})})}var Cx={didCatch:!1,error:null};function wx(e,t=`ErrorBoundary`){let n=class extends a.Component{constructor(e){super(e),this.resetError=()=>{this.setState(Cx)},this.state=Cx}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}componentDidCatch(t,n){e(t,n)}render(){return this.state.didCatch?a.createElement(this.props.fallback,{error:this.state.error,resetError:this.resetError}):this.props.children}};return n.displayName=t,n}wx(Sx);function Tx(e){bx((t,n)=>{if(!t.router){V.warn("`router: true` is missing from the react plugin configuration, the view will not be tracked.");return}n.startView(Ex(e))})}function Ex(e){if(!e||e.length===0)return``;let t=`/`;for(let n of e){let r=n.route.path;r&&(r=Dx(r,n.params,n===e[e.length-1]),r.startsWith(`/`)?t=r:(t.endsWith(`/`)||(t+=`/`),t+=r))}return t}function Dx(e,t,n){return!e.includes(`*`)||t[`*`]===void 0?e:n?e.replace(/\*/,t[`*`]):e.replace(/\/?\*/,``)}function Ox(e){return((t,n)=>{let r=e(t,n),i=r.state.location.pathname,a=null,o=!1;r.subscribe((e,t)=>{t?.newErrors&&!o&&(a={state:e,opts:t});let n=e.location.pathname;i!==n&&(Tx(e.matches),i=n)});let s=r.subscribe.bind(r);return r.subscribe=e=>{o=!0,r.subscribe=s;let t=s(e);return a&&=(e(a.state,a.opts),null),t},Tx(r.state.matches),r})}function kx({useRoutes:e,useLocation:t,matchRoutes:n}){return((r,i)=>{let o=t(),s=typeof i==`string`?i:i?.pathname||o.pathname,c=(0,a.useRef)(null);if(c.current!==s){c.current=s;let e=n(r,s);e&&Tx(e)}return e(r,i)})}yx(`react-router-v7`);var Ax=Ox(Li);kx({useRoutes:lr,useLocation:Qn,matchRoutes:A});function jx(){let e=new Set,t=new WeakSet,n=new WeakMap;function r(e){let t=n.get(e);return t||(t={},n.set(e,t)),t}function i(e){let t=r(e),i=()=>n.get(e)===t;return{lastChangeHash:t.lastChangeHash,isCurrent:i,setLastChangeHash:e=>{i()&&(t.lastChangeHash=e)}}}function a(n){!n.isConnected||t.has(n)||e.add(n)}function o(t){e.delete(t)}function s(n){t.add(n),e.delete(n)}return{markCanvas:(e,t)=>{switch(t){case 1:a(e);return;case 0:o(e);return;case 2:s(e);return;default:return}},forgetCanvas:t=>{e.delete(t),n.delete(t)},resetCanvasBitmap:e=>{n.delete(e),a(e)}
9,takeCapturableCanvases:()=>{let n=[];return e.forEach(r=>{r.isConnected?t.has(r)||(e.delete(r),n.push(r)):e.delete(r)}),n},startCaptureAttempt:i,reset:()=>{e.clear(),n=new WeakMap}}}var Mx={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9,Change:12},Z={AddString:0,AddNode:1,RemoveNode:2,Attribute:3,Text:4,Size:5,ScrollPosition:6,AddStyleSheet:7,AttachedStyleSheets:8,MediaPlaybackState:9,VisualViewport:10,AddRoleAnnotatedStrings:11,InputValue:12,InputSelection:13,ClearStrings:14,ImageContent:15},Q={Default:0,NodeName:1,AttributeName:2,AttributeValue:3,TextContent:4,FormInput:5,Css:6,Url:7,ResourceId:8},Nx={Selected:0,Deselected:1,Indeterminate:2},Px={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},Fx={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},Ix={Play:0,Pause:1},Lx={V1:0,Change:1};function Rx(e){return Bx(void 0,void 0,e)}function zx(e,t,n){return Bx(e,t,n)}function Bx(e,t,n){let r={container:void 0,parentId:e,previousSiblingId:void 0,nextSiblingId:t},i=e=>r.previousSiblingId===e-1?0:r.nextSiblingId===void 0?r.parentId===void 0?null:e-r.parentId:r.nextSiblingId-e;return{advance(e){let t=n.getOrInsert(e),a=i(t);return r.previousSiblingId=t,{nodeId:t,insertionPoint:a}},ascend(){r.container&&(r=r.container)},descend(){r.previousSiblingId!==void 0&&(r={container:r,parentId:r.previousSiblingId,previousSiblingId:void 0,nextSiblingId:void 0})}}}function $(e,t){return{role:e,string:t}}function Vx(e,t,n){return[$(Q.AttributeName,t),$(Gx(e,t),n)]}function Hx(e,t,n){let r=$(Q.AttributeName,t);return n===null?[r]:[r,$(Gx(e,t),n)]}var Ux=new Set([`input`,`option`,`select`,`textarea`]),Wx=new Set([`action`,`background`,`cite`,`data`,`formaction`,`href`,`longdesc`,`manifest`,`ping`,`poster`,`src`,`srcset`,`xlink:href`]);function Gx(e,t){switch(t){case`value`:return Ux.has(e)?Q.FormInput:Q.AttributeValue;case`style`:return Q.Css;default:return Wx.has(t)?Q.Url:Q.AttributeValue}}function Kx(e){let t=[],n=qx(e),r=()=>{n.flushInto(t),n=qx(e)},i=()=>{r(),t.push([Z.ClearStrings]),e.clear()};return{add:(t,r)=>{n.add(t,r),e.size+n.pendingStringCount>=1e6&&i()},flush:()=>{r();let e=t;return t=[],e}}}function qx(e){let t={},n=new Map,r=[],i=0,a=!1,o=t=>{let r=e.get(t);if(r!==void 0)return r;a=!0;let o=n.get(t.role);o||(o={role:t.role,strings:new Map,references:0},n.set(t.role,o)),o.references++;let s=o.strings.get(t.string);if(s)return s;let c={literal:t,id:void 0};return o.strings.set(t.string,c),i++,c},s=e=>{for(let t=0,n=e.length;t<n;t++){let n=e[t];typeof n==`string`?e[t]=o($(Q.Default,n)):Array.isArray(n)?s(n):Xx(n)&&(e[t]=o(n))}},c=()=>{if(n.size===0)return;let t=[Z.AddRoleAnnotatedStrings];for(let r of Array.from(n.values()).sort(Yx)){let n=[r.role];for(let t of r.strings.values())t.id=e.getOrInsert(t.literal),n.push(t.literal.string);t.push(n)}return t};return{add:(e,n)=>{e in t||(t[e]=[e]),Array.isArray(n)&&(a=!1,s(n),a&&r.push(n)),t[e].push(n)},flushInto:e=>{let n=c();n&&e.push(n);for(let e of r)Jx(e);[Z.AddNode,Z.RemoveNode,Z.Attribute,Z.Text,Z.InputValue,Z.InputSelection,Z.Size,Z.ScrollPosition,Z.AddStyleSheet,Z.AttachedStyleSheets,Z.MediaPlaybackState,Z.VisualViewport,Z.ImageContent].forEach(n=>{let r=t[n];r&&e.push(r)})},get pendingStringCount(){return i}}}function Jx(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];Array.isArray(n)?Jx(n):Zx(n)&&(e[t]=n.id)}}function Yx(e,t){return t.references-e.references}function Xx(e){return typeof e==`object`&&!!e&&`string`in e}function Zx(e){return typeof e==`object`&&!!e&&`literal`in e}function Qx(){return{cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}}}function $x(e,t,n){e[t].count+=1,e[t].max=Math.max(e[t].max,n),e[t].sum+=n}function eS(e,t){for(let n of[`cssText`,`serializationDuration`])e[n].c
9ount+=t[n].count,e[n].max=Math.max(e[n].max,t[n].max),e[n].sum+=t[n].sum}function tS(e,t,n,r,i,a){let o=Kx(r.stringIds),s=Qx(),c={addMetric(e,t){$x(s,e,t)},addNode(...e){o.add(Z.AddNode,e)},addStyleSheet(e,t,n){n?o.add(Z.AddStyleSheet,[e,t||[],n]):t?o.add(Z.AddStyleSheet,[e,t]):o.add(Z.AddStyleSheet,[e])},attachStyleSheets(e,t){let n=[e];for(let e of t)n.push(e);o.add(Z.AttachedStyleSheets,n)},removeNode(e){o.add(Z.RemoveNode,e)},setAttributes(e){o.add(Z.Attribute,e)},setInputSelection(e,t){let n=[e];for(let e of t)n.push(e);o.add(Z.InputSelection,n)},setInputValue(e,t){o.add(Z.InputValue,[e,t])},setMediaPlaybackState(e,t){o.add(Z.MediaPlaybackState,[e,t])},setScrollPosition(e,t,n){o.add(Z.ScrollPosition,[e,t,n])},setSize(e,t,n){o.add(Z.Size,[e,t,n])},setText(e,t){o.add(Z.Text,[e,t])},kind:e,scope:r},l=I();a(c),$x(s,`serializationDuration`,L(l,I()));let u=o.flush();u.length>0&&t(e===0||e===1?{data:u,format:Lx.Change,type:Mx.FullSnapshot,timestamp:i}:{data:u,type:Mx.Change,timestamp:i}),n(s)}function nS(e,t){let n=e.tagName,r=e.value;if(Ih(e,t)){let t=e.type;return n===`INPUT`&&(t===`button`||t===`submit`||t===`reset`)?r:!r||n===`OPTION`?void 0:`***`}if(n===`OPTION`||n===`SELECT`)return e.value;if(!(n!==`INPUT`&&n!==`TEXTAREA`))return r}var rS=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,iS=/^[A-Za-z]+:|^\/\//,aS=/^["']?data:.*,/i;function oS(e,t){return e.replace(rS,(e,n,r,i,a,o)=>{let s=r||a||o;if(!t||!s||iS.test(s)||aS.test(s))return e;let c=n||i||``;return`url(${c}${sS(s,t)}${c})`})}function sS(e,t){try{return ka(e,t).href}catch{return e}}function cS(e){return e.tagName.toLowerCase()}function lS(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 uS=[`width`,`height`];function dS(e){return Km(e)&&e.tagName===`CANVAS`}function fS(e){return uS.includes(e.toLowerCase())}var pS=1e6;function mS(e,t,n,r){if(t===X.HIDDEN)return null;let i=e.getAttribute(n),a=e.tagName;if(Lh(a,n,i,t,r)){if(a===`IMG`){let t=e;if(t.naturalWidth>0)return lS(t.naturalWidth,t.naturalHeight);let{width:n,height:r}=e.getBoundingClientRect();return n>0||r>0?lS(n,r):Ah}return a===`SOURCE`?Ah:`***`}return i&&Um(i,pS)}function hS(e,t,n){if(t===X.HIDDEN)return[];let r=[],i=cS(e);for(let a=0;a<e.attributes.length;a+=1){let o=e.attributes.item(a).name;o===`value`||o===`selected`||o===`checked`||gS(r,e,i,o,t,n)}if(e.value&&(i===`textarea`||i===`select`||i===`option`||i===`input`)){let n=nS(e,t);n!==void 0&&r.push(Vx(i,`value`,n))}else e.hasAttribute(`value`)&&gS(r,e,i,`value`,t,n);i===`option`?e.selected&&!Ih(e,t)&&r.push(Vx(i,`selected`,``)):e.hasAttribute(`selected`)&&gS(r,e,i,`selected`,t,n);let a=e;return i===`input`&&(a.type===`radio`||a.type===`checkbox`)?a.checked&&!Ih(e,t)&&r.push(Vx(i,`checked`,``)):e.hasAttribute(`checked`)&&gS(r,e,i,`checked`,t,n),r}function gS(e,t,n,r,i,a){let o=mS(t,i,r,a.scope.configuration);o!==null&&e.push(Vx(n,r,o))}function _S(e,t,n){if(t===X.HIDDEN)return{};let r={},i=cS(e);if(i===`link`){let t=vS(e.sheet);t&&(n.addMetric(`cssText`,t.length),r._cssText=t)}if(i===`style`&&e.sheet){let t=vS(e.sheet);t&&(n.addMetric(`cssText`,t.length),r._cssText=t)}(i===`audio`||i===`video`)&&(r.rr_mediaState=e.paused?`paused`:`played`);let a,o;switch(n.kind){case 0:a=Math.round(e.scrollTop),o=Math.round(e.scrollLeft),(a||o)&&n.scope.elementsScrollPositions.set(e,{scrollTop:a,scrollLeft:o});break;case 1:n.scope.elementsScrollPositions.has(e)&&({scrollTop:a,scrollLeft:o}=n.scope.elementsScrollPositions.get(e))}return o&&(r.rr_scrollLeft=o),a&&(r.rr_scrollTop=a),r}function vS(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}return t?oS(Array.from(t,bd()?yS:bS).join(``),e.href):null}function yS(e){return SS(e)&&e.selectorText.includes(`:`)?e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,`$1\\$2`):bS(e)}function bS(e){return xS(e)&&vS(e.styleSheet)||e.cssText}function xS(e){return`styleSheet`in e}function SS(e){return`selectorText`in e}function CS(e,t,n,r){if(t.parentNode?.nodeName===`STYLE`||n===X.HIDDEN||n===X.IGNORE)return;let i,a=Fh(t);if(i=a?Ph(a,n):n,i===X.HIDDEN){AS(e,t,r);return}if(i!==X.IGNORE){switch(t.nodeType){case t.CDATA_SECTION_NODE:kS(e,t,r);break;case t.DOCUMENT_NODE:wS(e,t,r);break;case t.DOCUMENT_FRAGMENT_NODE:TS(e,t,r);break;case t.DOCUMENT_TYPE_NODE:ES(e,t,r);break;case t.ELEMENT_NODE:DS(e,t,i,r);break;case t.TEXT_NODE:OS(e,t,i,r);break;default:return}switch(t.nodeType){case t.CDATA_SECTION_NODE:case t.DOCUMENT_TYPE_NODE:case t.TEXT_NODE:return}e.descend(),Ym(t,t=>{CS(e,t,i,r)}),e.ascend()}}function wS(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,$(Q.NodeName,`#document`)),n.setScrollPosition(r,Wh(),Gh()),jS(t.adoptedStyleSheets,r,n)}
9function TS(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);if(!Jm(t)){n.addNode(i,$(Q.NodeName,`#document-fragment`));return}n.addNode(i,$(Q.NodeName,`#shadow-root`)),n.scope.shadowRootsController.addShadowRoot(t,n.scope),jS(t.adoptedStyleSheets,r,n)}function ES(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,$(Q.NodeName,`#doctype`),$(Q.AttributeValue,t.name),$(Q.AttributeValue,t.publicId),$(Q.Url,t.systemId))}function DS(e,t,n,r){let{nodeId:i,insertionPoint:a}=e.advance(t),o=hS(t,n,r);r.addNode(a,NS(t),...o),dS(t)&&r.scope.canvasManager.markCanvas(t,1);let{_cssText:s,rr_mediaState:c,rr_scrollLeft:l,rr_scrollTop:u}=_S(t,n,r),d=t;if(s!==void 0&&d.sheet){let e=r.scope.styleSheetIds.getOrInsert(d.sheet);r.addStyleSheet($(Q.Css,s)),r.attachStyleSheets(i,[e])}c===`played`?r.setMediaPlaybackState(i,Ix.Play):c===`paused`&&r.setMediaPlaybackState(i,Ix.Pause),(l!==void 0||u!==void 0)&&r.setScrollPosition(i,l||0,u||0)}function OS(e,t,n,r){let{insertionPoint:i}=e.advance(t),a=Bh(t,n);r.addNode(i,$(Q.NodeName,`#text`),$(Q.TextContent,a))}function kS(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,$(Q.NodeName,`#cdata-section`))}function AS(e,t,n){if(!Km(t))return;let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,NS(t),Vx(cS(t),Dh,Oh));let{width:a,height:o}=t.getBoundingClientRect();n.setSize(r,a,o)}function jS(e,t,n){!e||e.length===0||n.attachStyleSheets(t,e.map(e=>MS(e,n)))}function MS(e,t){let n=Array.from(e.cssRules||e.rules,e=>$(Q.Css,e.cssText)),r=e.media.length>0?Array.from(e.media).map(e=>$(Q.Css,e)):void 0;return t.addMetric(`cssText`,n.reduce((e,t)=>e+t.string.length,0)),t.addStyleSheet(n,r,e.disabled),t.scope.styleSheetIds.getOrInsert(e)}function NS(e){let t=e.nodeName;return PS(e)?$(Q.NodeName,`svg>${t}`):$(Q.NodeName,t)}function PS(e){return e.namespaceURI===`http://www.w3.org/2000/svg`}function FS(e,t,n,r,i,a){a.resetIds(),tS(t,r,i,a,e,e=>{CS(Rx(a.nodeIds),n,a.configuration.defaultPrivacyLevel,e)})}function IS(e,t,n,r,i){tS(2,n,r,i,e,e=>LS(t,e))}function LS(e,t){let n=new Set,r=new Map,i=new Map,a=new Set;for(let t of e)switch(t.type){case`attributes`:{let e=t.target,n=r.get(e);n||(n=new Map,r.set(e,n));let i=t.attributeName;n.has(i)||n.set(i,t.oldValue);break}case`characterData`:i.has(t.target)||i.set(t.target,t.oldValue);break;case`childList`:for(let e=0;e<t.addedNodes.length;e++)n.add(t.addedNodes[e]);for(let e=0;e<t.removedNodes.length;e++)a.add(t.removedNodes[e])}let o=t.scope.nodeIds.nextId,s=new Map;RS(a,t),zS(n,s,t),BS(i,o,s,t),VS(r,o,s,t)}function RS(e,t){let n=t.scope.nodeIds;for(let r of e){let e=n.get(r);e!==void 0&&(US(r,e=>{dS(e)&&t.scope.canvasManager.forgetCanvas(e),qm(e)&&t.scope.shadowRootsController.removeShadowRoot(e.shadowRoot),n.delete(e)}),t.removeNode(e))}}function zS(e,t,n){let r=n.scope.nodeIds;for(let i of e){if(!i.isConnected||r.get(i)!==void 0)continue;let e=Xm(i);if(!e)continue;let a=r.get(e);if(a===void 0)continue;let o=Nh(e,n.scope.configuration.defaultPrivacyLevel,t);CS(zx(a,HS(i,r),r),i,o,n)}}function BS(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(a.textContent===o||!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=Xm(a);if(!s)continue;let c=Nh(s,r.scope.configuration.defaultPrivacyLevel,n);if(c===X.HIDDEN||c===X.IGNORE)continue;let l=Bh(a,c);r.setText(e,$(Q.TextContent,l))}}function VS(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=Nh(a,r.scope.configuration.defaultPrivacyLevel,n);if(s===X.HIDDEN||s===X.IGNORE)continue;let c=cS(a),l=[e];for(let[e,t]of o){if(dS(a)&&fS(e)&&r.scope.canvasManager.resetCanvasBitmap(a),a.getAttribute(e)===t)continue;if(e===`value`){let t=nS(a,s);t!==void 0&&l.push(Vx(c,e,t));continue}let n=mS(a,s,e,r.scope.configuration);l.push(Hx(c,e,n))}l.length>1&&r.setAttributes(l)}}function HS(e,t){let n=e.nextSibling;for(;n;){let e=t.get(n);if(e!==void 0)return e;n=n.nextSibling}}function US(e,t){t(e),Ym(e,e=>US(e,t))}var WS=25;function GS(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>WS||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>WS}var KS=(e,t)=>
9{let n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)GS(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},qS=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function JS(e,t,n,r,i){YS(I(),0,t,n,i);let{unsubscribe:a}=e.subscribe(Cm.VIEW_CREATED,e=>{r(),YS(e.startClocks.timeStamp,1,t,n,i)});return{stop:a}}function YS(e,t,n,r,i){let{width:a,height:o}=Yh();n({data:{height:o,href:window.location.href,width:a},type:Mx.Meta,timestamp:e}),n({data:{has_focus:document.hasFocus()},type:Mx.Focus,timestamp:e}),FS(e,t,document,n,r,i),window.visualViewport&&n({data:qS(window.visualViewport),type:Mx.VisualViewport,timestamp:e})}function XS(){let e=0,t=ZS(),n=e=>t[e.role][e.string];return{clear(){e!==0&&(t=ZS(),e=0)},get:n,getOrInsert(r){let i=n(r);return i===void 0&&(i=e++,t[r.role][r.string]=i),i},get size(){return e-0}}}function ZS(){return{[Q.Default]:QS(),[Q.NodeName]:QS(),[Q.AttributeName]:QS(),[Q.AttributeValue]:QS(),[Q.TextContent]:QS(),[Q.FormInput]:QS(),[Q.Css]:QS(),[Q.Url]:QS(),[Q.ResourceId]:QS()}}function QS(){return Object.create(null)}function $S(){return nC(1)}function eC(){return nC(0)}function tC(){return nC(0)}function nC(e){return rC(()=>new WeakMap,e)}function rC(e,t){let n=e(),r=t,i=e=>n.get(e);return{clear(){r!==t&&(n=e(),r=t)},delete(e){n.delete(e)},get:i,getOrInsert(e){let t=i(e);return t===void 0&&(t=r++,n.set(e,t)),t},get nextId(){return r},get size(){return r-t}}}function iC(e,t,n,r){let i={resetIds(){i.eventIds.clear(),i.nodeIds.clear(),i.stringIds.clear(),i.styleSheetIds.clear(),i.canvasManager.reset()},canvasManager:e,configuration:t,elementsScrollPositions:n,eventIds:$S(),nodeIds:eC(),shadowRootsController:r,stringIds:XS(),styleSheetIds:tC()};return i}function aC(){let e=new WeakMap;return{set(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}function oC(e){return!!e.changedTouches}function sC(e){return e.composed===!0&&qm(e.target)?e.composedPath()[0]:e.target}function cC(e,t,n=I()){return{data:{source:e,...t},type:Mx.IncrementalSnapshot,timestamp:n}}var lC=50;function uC(e,t){let{throttled:n,cancel:r}=fs(n=>{let r=sC(n),i=t.nodeIds.get(r);if(i===void 0)return;let a=dC(n);if(!a)return;let o={id:i,timeOffset:0,x:a.x,y:a.y};e(cC(oC(n)?Px.TouchMove:Px.MouseMove,{positions:[o]}))},lC,{trailing:!1}),{stop:i}=Us(document,[G.MOUSE_MOVE,G.TOUCH_MOVE],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function dC(e){let{clientX:t,clientY:n}=oC(e)?e.changedTouches[0]:e;if(window.visualViewport){let{visualViewportX:e,visualViewportY:r}=KS(t,n);t=e,n=r}if(!(!Number.isFinite(t)||!Number.isFinite(n)))return{x:t,y:n}}var fC={[G.POINTER_UP]:Fx.MouseUp,[G.MOUSE_DOWN]:Fx.MouseDown,[G.CLICK]:Fx.Click,[G.CONTEXT_MENU]:Fx.ContextMenu,[G.DBL_CLICK]:Fx.DblClick,[G.FOCUS]:Fx.Focus,[G.BLUR]:Fx.Blur,[G.TOUCH_START]:Fx.TouchStart,[G.TOUCH_END]:Fx.TouchEnd};function pC(e,t){return Us(document,Object.keys(fC),n=>{let r=sC(n),i=t.nodeIds.get(r);if(i===void 0||Nh(r,t.configuration.defaultPrivacyLevel)===X.HIDDEN)return;let a=fC[n.type],o;if(a!==Fx.Blur&&a!==Fx.Focus){let e=dC(n);if(!e)return;o={id:i,type:a,x:e.x,y:e.y}}else o={id:i,type:a};e({id:t.eventIds.getOrInsert(n),...cC(Px.MouseInteraction,o)})},{capture:!0,passive:!0})}var mC=100;function hC(e,t,n){let{throttled:r,cancel:i}=fs(e=>{let r=sC(e);if(!r)return;let i=n.nodeIds.get(r);if(i===void 0||Nh(r,n.configuration.defaultPrivacyLevel)===X.HIDDEN)return;let a=r===document?{scrollTop:Gh(),scrollLeft:Wh()}:{scrollTop:Math.round(r.scrollTop),scrollLeft:Math.round(r.scrollLeft)};n.elementsScrollPositions.set(r,a),t(cC(Px.Scroll,{id:i,x:a.scrollLeft,y:a.scrollTop}))},mC),{stop:a}=K(e,G.SCROLL,r,{capture:!0,passive:!0});return{stop:()=>{a(),i()}}}var gC=200;function _C(e){let t=qh().subscribe(t=>{e(cC(Px.ViewportResize,t))});return{stop:()=>{t.unsubscribe()}}}
9function vC(e){let t=window.visualViewport;if(!t)return{stop:W};let{throttled:n,cancel:r}=fs(()=>{e({data:qS(t),type:Mx.VisualViewport,timestamp:I()})},gC,{trailing:!1}),{stop:i}=Us(t,[G.RESIZE,G.SCROLL],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function yC(e,t){return Us(document,[G.PLAY,G.PAUSE],n=>{let r=sC(n);if(!r)return;let i=t.nodeIds.get(r);i===void 0||Nh(r,t.configuration.defaultPrivacyLevel)===X.HIDDEN||e(cC(Px.MediaInteraction,{id:i,type:n.type===G.PLAY?Ix.Play:Ix.Pause}))},{capture:!0,passive:!0})}function bC(e,t){function n(e,n){if(!e?.ownerNode)return;let r=t.nodeIds.get(e.ownerNode);r!==void 0&&n(r)}let r=[Ls(CSSStyleSheet.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t,t=>e(cC(Px.StyleSheetRule,{id:t,adds:[{rule:r,index:i}]})))}),Ls(CSSStyleSheet.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t,t=>e(cC(Px.StyleSheetRule,{id:t,removes:[{index:r}]})))})];typeof CSSGroupingRule<`u`?i(CSSGroupingRule):(i(CSSMediaRule),i(CSSSupportsRule));function i(t){r.push(Ls(t.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t.parentStyleSheet,n=>{let a=xC(t);a&&(a.push(i||0),e(cC(Px.StyleSheetRule,{id:n,adds:[{rule:r,index:a}]})))})}),Ls(t.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t.parentStyleSheet,n=>{let i=xC(t);i&&(i.push(r),e(cC(Px.StyleSheetRule,{id:n,removes:[{index:i}]})))})}))}return{stop:()=>{r.forEach(e=>e.stop())}}}function xC(e){let t=[],n=e;for(;n.parentRule;){let e=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(e),n=n.parentRule}if(!n.parentStyleSheet)return;let r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(r),t}function SC(e){return Us(window,[G.FOCUS,G.BLUR],()=>{e({data:{has_focus:document.hasFocus()},type:Mx.Focus,timestamp:I()})})}function CC(e,t,n){let r=e.subscribe(Cm.VIEW_ENDED,()=>{n(),t({timestamp:I(),type:Mx.ViewEnd})});return{stop:()=>{r.unsubscribe()}}}var wC={type:1,selection:Nx.Deselected};function TC(e,t,n,r){let i=r.configuration.defaultPrivacyLevel,a=new WeakMap,o=e.nodeType!==e.DOCUMENT_NODE,s=(o?e.ownerDocument:e).defaultView;if(!s)return{stop:W};let{stop:c}=Us(e,o?[G.CHANGE]:[G.INPUT,G.CHANGE],e=>{let t=sC(e);(t instanceof s.HTMLInputElement||t instanceof s.HTMLTextAreaElement||t instanceof s.HTMLSelectElement)&&u(t)},{capture:!0,passive:!0}),l;if(o)l=W;else{let e=[Hs(s.HTMLInputElement.prototype,`value`,u),Hs(s.HTMLInputElement.prototype,`checked`,u),Hs(s.HTMLSelectElement.prototype,`value`,u),Hs(s.HTMLTextAreaElement.prototype,`value`,u),Hs(s.HTMLSelectElement.prototype,`selectedIndex`,u)];l=()=>{e.forEach(e=>e.stop())}}return{stop:()=>{l(),c()}};function u(e){let o=Nh(e,i);if(o===X.HIDDEN)return;let s=e.type,c=e,l;if(s===`radio`||s===`checkbox`){if(Ih(e,o))return;l={type:1,selection:DC(e)}}else if(EC(e)){if(Ih(e,o))return;let t=e.options[e.selectedIndex];if(!t)return;c=t,l={type:1,selection:Nx.Selected}}else{let t=nS(e,o);if(t===void 0)return;l={type:0,value:t}}let u=d(c,l),f=[];if(s===`radio`&&e.checked&&OC(e,e=>{let t=d(e,wC);t!==void 0&&f.push(t)}),EC(e))for(let t=0;t<e.options.length;t++){let n=e.options[t];n!==c&&a.delete(n)}u===void 0&&f.length===0||tS(2,t,n,r,I(),e=>{u!==void 0&&(l.type===0?e.setInputValue(u,$(Q.FormInput,l.value)):e.setInputSelection(l.selection,[u])),f.length>0&&e.setInputSelection(Nx.Deselected,f)})}function d(e,t){let n=r.nodeIds.get(e);if(n===void 0)return;let i=a.get(e);if(!(i&&kC(i,t)))return a.set(e,t),n}}function EC(e){return e.tagName===`SELECT`}function DC(e){return e.checked?Nx.Selected:Nx.Deselected}function OC(e,t){e.name&&e.ownerDocument.querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`).forEach(n=>{let r=n;r!==e&&t(r)})}function kC(e,t){return e.type===0?t.type===0&&e.value===t.value:t.type===1&&e.selection===t.selection}var AC=100;function jC(e){let t=W,n=[];function r(){t(),e(n),n=[]}let{throttled:i,cancel:a}=fs(r,16,{leading:!1});return{addMutations:e=>{n.length===0&&(t=qd(i,{timeout:AC}));for(let t of e)n.push(t)},flush:r,stop:()=>{t(),a()}}}function MC(e,t,n,r){let i=Sm();if(!i)return{stop:W,flush:W};let a=jC(e=>{IS(I(),e.concat(o.takeRecords()),t,n,r)}),o=new i(N(a.addMutations));return o.observe(e,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{o.disconnect(),a.stop()},flush:()=>{a.flush()}}}var NC=[`clearRect`,`fillRect`,`strokeRect`,`fill`,`stroke`,`fillText`,`strokeText`,`drawImage`,`putImageData`,`drawFocusIfNeeded`,`reset`];function PC(e){if(!e.configuration.sessionReplayCanvasRecording?.enable||e.configuration.sessionReplayCanvasRecording.maxFramesPerSecond===0||typeof CanvasRenderingContext2D>`u`)return{stop:W};let t=[];return NC.forEach(n=>{t.push(Ls(CanvasRenderingContext2D.prototype,n,({target:t,onPostCall:n})=>{n(()=>
9{e.nodeIds.get(t.canvas)!==void 0&&e.canvasManager.markCanvas(t.canvas,1)})}))}),{stop:()=>t.forEach(e=>e.stop())}}function FC(e,t){let n=e.width,r=e.height,i=Math.min(1,t/Math.max(n,r)),a=Math.max(1,Math.round(n*i)),o=Math.max(1,Math.round(r*i)),s=document.createElement(`canvas`);s.width=a,s.height=o;let c=s.getContext(`2d`);if(c)return c.imageSmoothingQuality=`low`,c.drawImage(e,0,0,a,o),{canvasHeight:r,canvasWidth:n,source:s}}function IC(e){return new Promise(t=>{try{e.source.toBlob(e=>t(e??void 0),`image/png`)}catch{t(void 0)}})}function LC(e,t){let{height:n,width:r}=e.source,i=Math.min(1,t/Math.max(r,n)),a=Math.max(1,Math.round(r*i)),o=Math.max(1,Math.round(n*i)),s=document.createElement(`canvas`);s.width=a,s.height=o;let c=s.getContext(`2d`);if(!c)return Promise.resolve(void 0);c.imageSmoothingQuality=`low`,c.drawImage(e.source,0,0,a,o);let l=c.getImageData(0,0,a,o).data,u=H(M.crypto?.subtle);return u?u.digest(`SHA-256`,l).then(t=>zC(e.canvasWidth,e.canvasHeight,RC(t)),()=>zC(e.canvasWidth,e.canvasHeight,BC(l))):Promise.resolve(zC(e.canvasWidth,e.canvasHeight,BC(l)))}function RC(e){return Array.from(new Uint8Array(e),e=>e.toString(16).padStart(2,`0`)).join(``)}function zC(e,t,n){return`${e}x${t}:${n}`}function BC(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e[n],t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}var VC=(e,t=W)=>{let n=e.canvasManager,r=e.configuration.sessionReplayCanvasRecording,i=r?.maxFramesPerSecond??0;if(!r?.enable||i===0)return{stop:W};let a=!1,o,s=Qa/i;function c(e){a||(o=ls(()=>{l()},e))}async function l(){let e=performance.now();try{await u()}finally{let t=performance.now()-e;c(Math.max(s-t,s*.5))}}async function u(){let t=n.takeCapturableCanvases();if(!a)for(let r of t){let t=e.nodeIds.get(r);if(t===void 0){n.forgetCanvas(r);continue}if(Nh(r,e.configuration.defaultPrivacyLevel)!==X.ALLOW){n.markCanvas(r,1);continue}await f(r,t)}}function d(e,t){e.isCurrent()&&n.markCanvas(t,1)}async function f(e,i){let o=n.startCaptureAttempt(e),s=()=>a||!o.isCurrent();if(!s())try{let a=FC(e,r?.maxImageDimension??1e3);if(!a){d(o,e);return}let c=await LC(a,r?.hashingMaxDimension??100);if(s())return;if(c===void 0){d(o,e);return}if(c===o.lastChangeHash)return;let l=await IC(a);if(s())return;if(!l){d(o,e);return}try{t({nodeId:i,changeHash:c,image:l})}catch{s()||n.markCanvas(e,1);return}o.setLastChangeHash(c)}catch(t){s()||n.markCanvas(e,HC(t)?2:1)}}return c(s),{stop:()=>{a=!0,U(o)}}};function HC(e){return e instanceof DOMException&&e.name===`SecurityError`}var UC=(e,t)=>{let n=new Map;return{addShadowRoot:(r,i)=>{if(n.has(r))return;let a=MC(r,e,t,i),o=TC(r,e,t,i),s=hC(r,e,i);n.set(r,{flush:()=>a.flush(),stop:()=>{a.stop(),o.stop(),s.stop()}})},removeShadowRoot:e=>{let t=n.get(e);t&&(t.stop(),n.delete(e))},stop:()=>{n.forEach(({stop:e})=>e())},flush:()=>{n.forEach(({flush:e})=>e())}}};function WC(e){let{emitRecord:t,emitStats:n,configuration:r,lifeCycle:i}=e;if(!t||!n)throw Error(`emit functions are required`);let a=n=>{t(n),hc(`record`,{record:n}),gp(e.viewHistory.findView().id)},o=jx(),s=UC(a,n),c=iC(o,r,aC(),s),{stop:l}=JS(i,a,n,u,c);function u(){s.flush(),d.flush()}let d=MC(document,a,n,c),f=[d,uC(a,c),pC(a,c),hC(document,a,c),_C(a),TC(document,a,n,c),yC(a,c),bC(a,c),SC(a),vC(a),CC(i,a,u),PC(c),VC(c)];return{stop:()=>{s.stop(),f.forEach(e=>e.stop()),l()},flushMutations:u,shadowRootsController:s}}function GC(e,t,n,r){let i=new FormData;i.append(`segment`,new Blob([e],{type:`application/octet-stream`}),`${t.session.id}-${t.start}`);let a={raw_segment_size:r,compressed_segment_size:e.byteLength,...t},o=JSON.stringify(a);return i.append(`event`,new Blob([o],{type:`application/json`})),{data:i,bytesCount:e.byteLength,cssText:n.cssText,isFullSnapshot:t.index_in_view===0,rawSize:r,recordCount:t.records_count,serializationDuration:n.serializationDuration}}function KC({context:e,creationReason:t,encoder:n}){let r=0,i=e.view.id,a={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:mp(i),source:`browser`,...e},o=Qx();hp(i);function s(e,t){a.start=Math.min(a.start,e.timestamp),a.end=Math.max(a.end,e.timestamp),a.records_count+=1,a.has_full_snapshot||=e.type===Mx.FullSnapshot||e.type===Mx.Change&&a.index_in_view===0;let i=n.isEmpty?`{"records":[`:`,`;n.write(i+JSON.stringify(e),e=>{r+=e,t(r)})}function c(e){eS(o,e)}function l(e){if(n.isEmpty)throw Error(`Empty segment flushed`);n.write(`],${JSON.stringify(a).slice(1)}\n`),n.finish(t=>{_p(a.view.id,t.rawBytesCount),e(a,o,t)})}return{addRecord:s,addStats:c,flush:l}}var qC=5*Qa;function JC(e,t,n,r,i,a){return YC(e,()=>XC(t.applicationId,n,r),i,a)}function YC(e,t,n,r){let i={status:0,nextSegmentCreationReason:`init`},{unsubscribe:a}
9=e.subscribe(Cm.VIEW_CREATED,()=>{s(`view_change`)}),{unsubscribe:o}=e.subscribe(Cm.PREPARE_URGENT_FLUSH,e=>{s(e)});function s(e){i.status===1&&(i.segment.flush((t,r,i)=>{let a=GC(i.output,t,r,i.rawBytesCount);Qc(e)&&e!==Xc.HIDDEN?n.sendOnExit(a):n.send(a)}),U(i.expirationTimeoutId)),i=e===`stop`?{status:2}:{status:0,nextSegmentCreationReason:e}}return{addRecord:e=>{if(i.status!==2){if(i.status===0){let e=t();if(!e)return;i={status:1,segment:KC({encoder:r,context:e,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:ls(()=>{s(`segment_duration_limit`)},qC)}}i.segment.addRecord(e,e=>{e>6e4&&s(`segment_bytes_limit`)})}},addStats:e=>{i.status===1&&i.segment.addStats(e)},stop:()=>{s(`stop`),a(),o()}}}function XC(e,t,n){let r=t.findTrackedSession(),i=n.findView();if(!(!r||!i))return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function ZC(e,t){if(!e.metricsEnabled)return{stop:W};let{unsubscribe:n}=t.subscribe(e=>{if(e.type===`failure`||e.type===`queue-full`||e.type===`success`&&e.payload.isFullSnapshot){let t=QC(e.type,e.bandwidth,e.payload);Dl(pl.SEGMENT_METRICS_TELEMETRY_NAME,{metrics:t})}});return{stop:n}}function QC(e,t,n){return{cssText:{count:n.cssText.count,max:n.cssText.max,sum:n.cssText.sum},encoding:{fullSnapshot:`change`,incrementalSnapshot:`change`},isFullSnapshot:n.isFullSnapshot,ongoingRequests:{count:t.ongoingRequestCount,totalSize:t.ongoingByteCount},recordCount:n.recordCount,result:e,serializationDuration:{count:n.serializationDuration.count,max:n.serializationDuration.max,sum:n.serializationDuration.sum},size:{compressed:n.bytesCount,raw:n.rawSize}}}function $C(e){let t=Hc();return{addRecord:n=>{let r=e.findView();t.send(`record`,n,r.id)}}}var ew=t({startRecording:()=>tw});function tw(e,t,n,r,i,a,o){let s=[],c=o||Ic([go(t,`replay`)],t=>{e.notify(Cm.RAW_ERROR_COLLECTED,{error:{message:t,source:gc.AGENT,startClocks:z()}}),wl(`Error reported to customer`,{"error.message":t})},6e4),l,u;if(Wc())({addRecord:l}=$C(r)),u=W;else{let o=JC(e,t,n,r,c,i);l=o.addRecord,u=o.addStats,s.push(o.stop);let d=ZC(a,c.observable);s.push(d.stop)}let{stop:d}=WC({emitRecord:l,emitStats:u,configuration:t,lifeCycle:e,viewHistory:r});return s.push(d),{stop:()=>{s.forEach(e=>e())}}}function nw(){let e=Hc();return t=>{e.send(`profile`,t)}}function rw(e,t,n){let r=Wb(e,t,n,Gf.PROFILING);return({profile:e,trace:t})=>{let n={event:e,"wall-time.json":t};r.send(n)}}var iw=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;function aw(e){return e?e.replace(iw,`/?`):`/`}var ow=(e,t)=>e||aw(t);function sw(e,t,n){let r=dc(t),i=cw(e,t.applicationId,n),a=dw(r);return{...i,attachments:[`wall-time.json`],start:new Date(e.startClocks.timeStamp).toISOString(),end:new Date(e.endClocks.timeStamp).toISOString(),family:`chrome`,runtime:`chrome`,format:`json`,version:4,tags_profiler:a.join(`,`),_dd:{clock_drift:fo()}}}function cw(e,t,n){let{ids:r,names:i}=lw(e.views),a=e.longTasks.map(e=>e.id).filter(e=>e!==void 0),o=e.actions?.map(e=>e.id).filter(e=>e!==void 0)??[],{ids:s,labels:c}=uw(e.vitals),l={application:{id:t}};return n&&(l.session={id:n}),r.length&&(l.view={id:r,name:i}),a.length&&(l.long_task={id:a}),o.length&&(l.action={id:o,label:[]}),s.length&&(l.vital={id:s,label:c}),l}function lw(e){let t={ids:[],names:[]};for(let n of e)t.ids.push(n.viewId),n.viewName&&t.names.push(n.viewName);return t.names=Array.from(new Set(t.names)),t}function uw(e){let t={ids:[],labels:[]};if(!e)return t;for(let n of e)t.ids.push(n.id),t.labels.push(n.label);return t.labels=Array.from(new Set(t.labels)),t}function dw(e){return e.concat([`language:javascript`,`runtime:chrome`,`family:chrome`,`host:browser`])}var fw=vu;function pw(e){let t=pu({expireDelay:fw});return e.subscribe(Cm.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{e.type===`long_task`&&t.add({id:e.long_task.id,startClocks:n,duration:r,entryType:e.long_task.entry_type===xp.LONG_TASK?Qm.LONG_TASK:Qm.LONG_ANIMATION_FRAME},n.relative).close(ro(n.relative,r))}),t}var mw=vu;function hw(e){let t=pu({expireDelay:mw});return e.subscribe(Cm.ACTION_STARTED,e=>{t.add({id:e.id,label:``,startClocks:e.startClocks,duration:void 0},e.startClocks.relative)}),e.subscribe(Cm.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type===`action`){let i=t.getEntries(n.relative).find(t=>t.value.id===e.action.id),a=r??0;i?(i.value.duration=a,i.close(ro(n.relative,a))):t.add({id:e.action.id,label:``,startClocks:n,duration:r},n.relative).close(ro(n.relative,a))}}),t}var gw=vu;function _w(e){let t=pu({expireDelay:gw});return e.subscribe(Cm.DURATION_VITAL_STARTED,e=>{t.add({id:e.id,type:Tp.DURATION,startClocks:e.startClocks,duration:void 0,label:e.name},e.startClocks.relative)}),e.subscribe(Cm.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type!==`vital`)return;
9if(e.vital.type===Tp.OPERATION_STEP){if(e.vital.step_type===`start`)t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,label:e.vital.name},n.relative);else if(e.vital.step_type===`end`){let r=t.findAllEntries().find(t=>t.value.type===Tp.OPERATION_STEP&&t.value.label===e.vital.name&&t.value.operationKey===e.vital.operation_key);if(!r)return;r.value.duration=L(r.value.startClocks.relative,n.relative),r.close(n.relative)}return}let i=t.getEntries(n.relative).find(t=>t.value.id===e.vital.id);if(i){i.value.duration=r,i.close(ro(n.relative,r));return}t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,duration:r,label:e.vital.name},n.relative).close(ro(n.relative,r))}),t}function vw(e,t){let n=e?.data?.attributes;if(!n||typeof n.admitted!=`boolean`||typeof n.reason!=`string`)return t;let r=n.reason===`backend_client_not_initialized`?`backend_unavailable`:n.reason;return{decision:n.admitted?`quota_ok`:`quota_ko`,reason:r}}function yw(e,t){return vo({proxy:e.proxy,site:e.site,path:`/api/v2/profiling/quota`,parameters:`session_id=${t}`,subdomain:`quota`})}function bw(e,t,n=5e3){let r=yw(e,t),i=new AbortController,a,o=bc(r,{credentials:`omit`,signal:i.signal,headers:new Headers({"DD-CLIENT-TOKEN":e.clientToken})}).then(e=>{let t=e.status===429?{decision:`quota_ko`,reason:`quota_exceeded`}:{decision:`quota_ok`,reason:`api-error`};return e.json().then(e=>(U(a),vw(e,t)),()=>(U(a),t))}).catch(()=>(U(a),{decision:`quota_ok`,reason:`api-error`})),s=new Promise(e=>{a=ls(()=>{i.abort(),e({decision:`quota_ok`,reason:`timeout`})},n)});return Promise.race([o,s])}function xw(e){let t=new Map(Pl(e)?.map(e=>[e.url,e.id])),n=[];return e.forEach((e,r)=>{let i=t.get(e);i!==void 0&&n.push({resourceId:r,debugId:i})}),n.length?n:void 0}var Sw=t({DEFAULT_RUM_PROFILER_CONFIGURATION:()=>Cw,createRumProfiler:()=>ww}),Cw={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3};function ww(e,t,n,r,i,a,o=Cw){let s=Wc()?H(nw)():H(rw)(e,t,i),c,l=[],u=H(pw)(t),d=H(hw)(t),f=H(_w)(t),p={state:`stopped`,stateReason:`initializing`},m=0;t.subscribe(Cm.SESSION_EXPIRED,()=>{v(`session-expired`)}),t.subscribe(Cm.SESSION_RENEWED,()=>{if(p.state===`stopped`&&(p.stateReason===`session-expired`||p.stateReason===`quota_ko`)){let t=n.findTrackedSession();if(!t||!gu(t.id,mu(e.sessionSampleRate,e.profilingSampleRate)))return;h()}});function h(){if(p.state===`running`)return;let e=a.findView();c=e?{startClocks:e.startClocks,viewId:e.id,viewName:ow(e.name,document.location.pathname)}:void 0,l.push(K(window,G.VISIBILITY_CHANGE,E).stop,K(window,G.BEFORE_UNLOAD,te).stop),b(),g()}function g(){if(Wc())return;let t=++m,r=n.findTrackedSession()?.id;r&&H(bw)(e,r).then(e=>{t===m&&(p.state!==`running`&&p.state!==`paused`||e.decision===`quota_ko`&&v(`quota_ko`,e.reason))}).catch(P)}function _(){v(`stopped-by-user`)}function v(e,t){S(e),l.forEach(e=>e()),l.length=0,r.set({status:`stopped`,error_reason:void 0,quota_reason:t})}function y(e){if(e.state===`running`)return{cleanupTasks:e.cleanupTasks};let n=[],r=t.subscribe(Cm.VIEW_CREATED,e=>{let t={viewId:e.id,viewName:ow(e.name,document.location.pathname),startClocks:e.startClocks};w(t),c=t});return n.push(r.unsubscribe),{cleanupTasks:n}}function b(){let e=M.Profiler;if(!e)throw r.set({status:`error`,error_reason:`not-supported-by-browser`}),Error(`RUM Profiler is not supported in this browser.`);p.state===`running`&&x(p);let{cleanupTasks:t}=y(p),i;try{i=new e({sampleInterval:o.sampleIntervalMs,maxBufferSize:Math.round(o.collectIntervalMs*1.5/o.sampleIntervalMs)})}catch(e){e instanceof Error&&e.message.includes(`disabled by Document Policy`)?(V.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),r.set({status:`error`,error_reason:`missing-document-policy-header`})):r.set({status:`error`,error_reason:`unexpected-exception`});return}r.set({status:`running`,error_reason:void 0}),p={state:`running`,startClocks:z(),profiler:i,timeoutId:ls(b,o.collectIntervalMs),views:[],cleanupTasks:t,longTasks:[],sessionId:n.findTrackedSession()?.id},w(c),i.addEventListener(`samplebufferfull`,ee)}function x(e){U(e.timeoutId),e.profiler.removeEventListener(`samplebufferfull`,ee);let{startClocks:t,views:n,sessionId:r}=e;e.profiler.stop().then(e=>{let i=z(),a=L(t.relative,i.relative),s=u.findAll(t.relative,a),c=d.findAll(t.relative,a),l=f.findAll(t.relative,a).map(e=>({id:e.id,label:e.label,startClocks:e.startClocks,duration:e.duration})),p=a<o.minProfileDurationMs;s.length===0&&p||T(Object.assign({},e,{startClocks:t,endClocks:i,clocksOrigin:ao(),longTasks:s,actions:c,vitals:l,views:n,sampleInterval:o.sampleIntervalMs,debugIds:xw(e.resources)}),r)}).catch(P)}function S(e){if(p.state!==`running`){(p.state===`paused`||p.state===`stopped`&&e===`stopped-by-user`)&&(p={state:`stopped`,stateReason:e});return}let t=p;p={state:`stopped`,stateReason:e}
9,t.cleanupTasks.forEach(e=>e()),e===`quota_ko`?(U(t.timeoutId),t.profiler.removeEventListener(`samplebufferfull`,ee),t.profiler.stop().catch(P)):x(t)}function C(){if(p.state!==`running`)return;let e=p;p={state:`paused`},e.cleanupTasks.forEach(e=>e()),x(e)}function w(e){p.state!==`running`||!e||p.views.push(e)}function T(t,n){let r={profile:sw(t,e,n),trace:t};s(r)}function ee(){b()}function E(){document.visibilityState===`hidden`&&p.state===`running`?C():document.visibilityState===`visible`&&p.state===`paused`&&b()}function te(){b()}function ne(){return p.state===`stopped`}function D(){return p.state===`running`}function O(){return p.state===`paused`}return{start:h,stop:_,isStopped:ne,isRunning:D,isPaused:O}}export{hc as $,sr as $t,Zl as A,va as At,wl as B,Br as Bt,Ld as C,Wa as Ct,pd as D,P as Dt,fd as E,N as Et,Wl as F,Hi as Ft,sl as G,Or as Gt,yl as H,Li as Ht,Ll as I,Ui as It,Hc as J,$n as Jt,il as K,Yi as Kt,Pl as L,Wr as Lt,Yl as M,ba as Mt,Jl as N,ma as Nt,Ql as O,M as Ot,Bl as P,pa as Pt,_c as Q,ar as Qt,fl as R,Gr as Rt,Pd as S,Za as St,_d as T,Ra as Tt,cl as U,xe as Ut,J as V,Jr as Vt,ll as W,A as Wt,vc as X,nr as Xt,xc as Y,Tr as Yt,gc as Z,wr as Zt,hf as _,go as _t,Kf as a,Ks as at,cf as b,I as bt,Rf as c,ms as ct,Tf as d,Yo as dt,Xi as en,fc as et,wf as f,H as ft,gf as g,wo as gt,_f as h,Co as ht,Jf as i,qs as it,Xl as j,ya as jt,$l as k,Ta as kt,Mf as l,W as lt,bf as m,ko as mt,vx as n,i as nn,pc as nt,Bf as o,Ps as ot,Cf as p,V as pt,Wc as q,Qn as qt,dx as r,q as rt,Vf as s,Fs as st,Ax as t,l as tn,dc as tt,Ef as u,is as ut,mf as v,_o as vt,yd as w,Ha as wt,sf as x,co as xt,lf as y,z as yt,El as z,Kr as zt};

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.