PageSourceSearch

https://www.reviespaces.com/_next/static/chunks/3cwtw6btcfd5v.js

js reviespaces.com collected 2026-10-10 00:21:03 UTC 188,058 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="e70b88a6-5ee4-95d1-8cec-1706bcf97632")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,947439,e=>{"use strict";var t=e.i(438014),r=e.i(750349);try{var n="u">typeof window?window:e.g;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}e.s(["default",0,function({locale:e,...n}){if(!e)throw Error(void 0);return(0,r.jsx)(t.IntlProvider,{locale:e,...n})}])},498113,e=>{"use strict";var t=e.i(750349),r=e.i(835153);try{var n=window;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}e.s(["default",0,({gtmId:e})=>(0,t.jsx)(r.GoogleTagManager,{gtmId:e,"data-sentry-element":"GTM","data-sentry-component":"GoogleTagManagerClient","data-sentry-source-file":"google-tag-manager.client.tsx"})])},965694,e=>{"use strict";let t;var r=e.i(750349),n=e.i(664454);try{var i="u">typeof window?window:e.g;i._sentryModuleMetadata=i._sentryModuleMetadata||{},i._sentryModuleMetadata[(new i.Error).stack]=Object.assign({},i._sentryModuleMetadata[(new i.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}var s=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,d=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,u=(e,t)=>function(){return t||(0,e[l(e)[0]])((t={exports:{}}).exports,t),t.exports},h=u({"node_modules/penpal/lib/constants.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DATA_CLONE_ERROR=e.MESSAGE=e.REJECTED=e.FULFILLED=e.REPLY=e.CALL=e.HANDSHAKE_REPLY=e.HANDSHAKE=void 0,e.HANDSHAKE="handshake",e.HANDSHAKE_REPLY="handshake-reply",e.CALL="call",e.REPLY="reply",e.FULFILLED="fulfilled",e.REJECTED="rejected",e.MESSAGE="message",e.DATA_CLONE_ERROR="DataCloneError"}}),p=u({"node_modules/penpal/lib/errorCodes.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ERR_NO_IFRAME_SRC=e.ERR_NOT_IN_IFRAME=e.ERR_CONNECTION_TIMEOUT=e.ERR_CONNECTION_DESTROYED=void 0,e.ERR_CONNECTION_DESTROYED="ConnectionDestroyed",e.ERR_CONNECTION_TIMEOUT="ConnectionTimeout",e.ERR_NOT_IN_IFRAME="NotInIframe",e.ERR_NO_IFRAME_SRC="NoIframeSrc"}}),f=u({"node_modules/penpal/lib/createDestructor.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=()=>{let e=[],t=!1;return{destroy(){t=!0,e.forEach(e=>{e()})},onDestroy(r){t?r():e.push(r)}}},t.exports=e.default}}),m=u({"node_modules/penpal/lib/getOriginFromSrc.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={"http:":"80","https:":"443"},n=/^(https?:)?\/\/([^/:]+)?(:(\d+))?/,i=["file:","data:"];e.default=e=>{let t,s,o;if(e&&i.find(t=>e.startsWith(t)))return"null";let a=document.location,l=n.exec(e);l?(t=l[1]?l[1]:a.protocol,s=l[2],o=l[4]):(t=a.protocol,s=a.hostname,o=a.port);let d=o&&o!==r[t]?`:${o}`:"";return`${t}//${s}${d}`},t.exports=e.default}}),g=u({"node_modules/penpal/lib/createLogger.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=e=>function(){if(e){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];console.log("[Penpal]",...r)}},t.exports=e.default}}),y=u({"node_modules/penpal/lib/errorSerialization.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeError=e.serializeError=void 0,e.serializeError=e=>{let t=e.name;return{name:t,message:e.message,stack:e.stack}},e.deserializeError=e=>{let t=Error();return Object.keys(e).forEach(r=>t[r]=e[r]),t}}}),v=u({"node_modules/penpal/lib/connectCallReceiver.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=h(),n=y();e.default=(e,t,i)=>{let s=e.localName,o=e.local,a=e.remote,l=e.originForSending,d=e.originForReceiving,c=!1;i(`${s}: Connecting call receiver`);let u=e=>{if(e.source!==a||e.data.penpal!==r.CALL)return;if(e.origin!==d)return void i(`${s} received message from origin ${e.origin} which did not match expected origin ${d}`);let o=e.data,u=o.methodName,h=o.args,p=o.id;i(`${s}: Received ${u}() call`);let f=e=>t=>{if(i(`${s}: Sending ${u}() reply`),c)return void i(`${s}: Unable to send ${u}() reply due to destroyed connection`);let o={penpal:r.REPLY,id:p,resolution:e,returnValue:t};e===r.REJECTED&&t instanceof Error&&(o.returnValue=(0,n.serializeError)(t),o.returnValueIsError=!0);try{a.postMessage(o,l)}catch(e){throw e.name===r.DATA_CLONE_ERROR&&a.postMessage({penpal:r.REPLY,id:p,resolution:r.REJECTED,returnValue:(0,n.serializeError)(e),returnValueIsError:!0},l),e}};new Promise(e=>e(t[u].apply(t,h))).then(f(r.FULFILLED),f(r.REJECTED))};return o.addEventListener(r.MESSAGE,u),()=>{c=!0,o.removeEventListener(r.MESSAGE,u)}},t.exports=e.default}}
2),w=u({"node_modules/penpal/lib/generateId.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=0;e.default=()=>++r,t.exports=e.default}}),b=u({"node_modules/penpal/lib/connectCallSender.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=h(),i=p(),s=(r=w())&&r.__esModule?r:{default:r},o=y();e.default=(e,t,r,a,l)=>{let d=t.localName,c=t.local,u=t.remote,h=t.originForSending,p=t.originForReceiving,f=!1;return l(`${d}: Connecting call sender`),r.reduce((e,t)=>(e[t]=function(){let e;for(var r=arguments.length,m=Array(r),g=0;g<r;g++)m[g]=arguments[g];l(`${d}: Sending ${t}() call`);try{u.closed&&(e=!0)}catch(t){e=!0}if(e&&a(),f){let e=Error(`Unable to send ${t}() call due to destroyed connection`);throw e.code=i.ERR_CONNECTION_DESTROYED,e}return new Promise((e,r)=>{let i=(0,s.default)(),a=s=>{if(s.source!==u||s.data.penpal!==n.REPLY||s.data.id!==i)return;if(s.origin!==p)return void l(`${d} received message from origin ${s.origin} which did not match expected origin ${p}`);l(`${d}: Received ${t}() reply`),c.removeEventListener(n.MESSAGE,a);let h=s.data.returnValue;s.data.returnValueIsError&&(h=(0,o.deserializeError)(h)),(s.data.resolution===n.FULFILLED?e:r)(h)};c.addEventListener(n.MESSAGE,a),u.postMessage({penpal:n.CALL,id:i,methodName:t,args:m},h)})},e),e),()=>{f=!0}},t.exports=e.default}}),E=u({"node_modules/penpal/lib/connectToChild.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=h(),n=p(),i=d(f()),s=d(m()),o=d(g()),a=d(v()),l=d(b());function d(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let t=e.iframe,d=e.methods,c=void 0===d?{}:d,u=e.childOrigin,h=e.timeout,p=e.debug,f=(0,o.default)(p),m=window,g=(0,i.default)(),y=g.destroy,v=g.onDestroy;if(!u){if(!t.src&&!t.srcdoc){let e=Error("Iframe must have src or srcdoc property defined.");throw e.code=n.ERR_NO_IFRAME_SRC,e}u=(0,s.default)(t.src)}let w="null"===u?"*":u;return{promise:new Promise((e,i)=>{let s,o,d;void 0!==h&&(s=setTimeout(()=>{let e=Error(`Connection to child timed out after ${h}ms`);e.code=n.ERR_CONNECTION_TIMEOUT,i(e),y()},h));let p={},g=n=>{let i=t.contentWindow;if(n.source!==i||n.data.penpal!==r.HANDSHAKE)return;if(n.origin!==u)return void f(`Parent received handshake from origin ${n.origin} which did not match expected origin ${u}`);f("Parent: Received handshake, sending reply"),n.source.postMessage({penpal:r.HANDSHAKE_REPLY,methodNames:Object.keys(c)},w);let h={localName:"Parent",local:m,remote:i,originForSending:w,originForReceiving:u};d&&d(),v(d=(0,a.default)(h,c,f)),o&&o.forEach(e=>{delete p[e]}),o=n.data.methodNames,v((0,l.default)(p,h,o,y,f)),clearTimeout(s),e(p)};m.addEventListener(r.MESSAGE,g),f("Parent: Awaiting handshake");var b=setInterval(()=>{document.contains(t)||(clearInterval(b),y())},6e4);v(()=>{m.removeEventListener(r.MESSAGE,g),clearInterval(b);let e=Error("Connection destroyed");e.code=n.ERR_CONNECTION_DESTROYED,i(e)})}),destroy:y}},t.exports=e.default}}),S=u({"node_modules/penpal/lib/connectToParent.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=h(),n=p(),i=l(f()),s=l(v()),o=l(b()),a=l(g());function l(e){return e&&e.__esModule?e:{default:e}}e.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentOrigin,l=void 0===t?"*":t,d=e.methods,c=void 0===d?{}:d,u=e.timeout,h=e.debug,p=(0,a.default)(h);if(window===window.top){let e=Error("connectToParent() must be called within an iframe");throw e.code=n.ERR_NOT_IN_IFRAME,e}let f=(0,i.default)(),m=f.destroy,g=f.onDestroy,y=window,v=y.parent;return{promise:new Promise((e,t)=>{let i;void 0!==u&&(i=setTimeout(()=>{let e=Error(`Connection to parent timed out after ${u}ms`);e.code=n.ERR_CONNECTION_TIMEOUT,t(e),m()},u));let a=t=>{try{clearTimeout()}catch(e){return}if(t.source!==v||t.data.penpal!==r.HANDSHAKE_REPLY)return;if("*"!==l&&l!==t.origin)return void p(`Child received handshake reply from origin ${t.origin} which did not match expected origin ${l}`);p("Child: Received handshake reply"),y.removeEventListener(r.MESSAGE,a);let n={localName:"Child",local:y,remote:v,originForSending:"null"===t.origin?"*":t.origin,originForReceiving:t.origin},d={};g((0,s.default)(n,c,p)),g((0,o.default)(d,n,t.data.methodNames,m,p)),clearTimeout(i),e(d)};y.addEventListener(r.MESSAGE,a),g(()=>{y.removeEventListener(r.MESSAGE,a);let e=Error("Connection destroyed");e.code=n.ERR_CONNECTION_DESTROYED,t(e)}),p("Child: Sending handshake"),v.postMessage({penpal:r.HANDSHAKE,methodNames:Object.keys(c)},l)}),destroy:m}},t.exports=e.default}}),_=u({"node_modules/penpal/lib/index.js"(e,t){Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.default=void 0;var r=s(E()),n=s(S()),i=p();function s(e){return e&&e.__esModule?e:{default:e}}e.default={ERR_CONNECTION_DESTROYED:i.ERR_CONNECTION_DESTROYED,ERR_CONNECTION_TIMEOUT:i.ERR_CONNECTION_TIMEOUT,ERR_NOT_IN_IFRAME:i.ERR_NOT_IN_IFRAME,ERR_NO_IFRAME_SRC:i.ERR_NO_IFRAME_SRC,connectToChild:r.default,connectToParent:n.default},t.exports=e.default}}),M=e=>"object"==typeof e&&null!=e&&1===e.nodeType,C=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,k=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let r,n=getComputedStyle(e,null);return C(n.overflowY,t)||C(n.overflowX,t)||!!(r=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(r.clientHeight<e.scrollHeight||r.clientWidth<e.scrollWidth)}return!1},I=(e,t,r,n,i,s,o,a)=>s<e&&o>t||s>e&&o<t?0:s<=e&&a<=r||o>=t&&a>=r?s-e-n:o>t&&a<r||s<e&&a>r?o-t+i:0,T=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};function R(e){let t="u">typeof Document?Document:void 0,r="u">typeof document?document:void 0;if(t&&e instanceof t)return e;let n=e.ownerDocument??r??null;if(!n)throw Error("Unable to resolve document");return n}function A(e){let t=new URL(e,"http://example.com");return t.pathname+t.search+t.hash}function x(e){return"u">typeof PointerEvent?e instanceof PointerEvent:"string"==typeof e.pointerType&&"mouse"===e.pointerType}function O(e){return"u">typeof MouseEvent?e instanceof MouseEvent:"number"==typeof e.button}function N(e){return"u">typeof KeyboardEvent?e instanceof KeyboardEvent:"string"==typeof e.key}function D(e){return e.defaultView??("u">typeof window?window:null)}function P(e){let t=e.activeElement;if(!t)return!1;let r=t.tagName;return"INPUT"===r||"TEXTAREA"===r||"SELECT"===r||t.isContentEditable}function L(e){return new Promise(t=>setTimeout(t,e))}function F(e,t){return new Promise((r,n)=>{if(e<=0)return void(t.aborted?n(Error("Animation cancelled")):r());let i=()=>{clearTimeout(s),t.removeEventListener("abort",i),n(Error("Animation cancelled"))},s=setTimeout(()=>{t.removeEventListener("abort",i),r()},e);t.addEventListener("abort",i)})}async function W(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}function j(e){let t=R(e),r=e.getBoundingClientRect(),n=D(t);if(!n)return!1;let i=n.innerHeight||t.documentElement.clientHeight,s=n.innerWidth||t.documentElement.clientWidth;return r.top<i&&r.bottom>0&&r.left<s&&r.right>0}function B(e,t){let r=((e,t)=>{var r,n,i,s;let o;if("u"<typeof document)return[];let{scrollMode:a,block:l,inline:d,boundary:c,skipOverflowHiddenElements:u}=t,h="function"==typeof c?c:e=>e!==c;if(!M(e))throw TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,f=[],m=e;for(;M(m)&&h(m);){if((m=T(m))===p){f.push(m);break}null!=m&&m===document.body&&k(m)&&!k(document.documentElement)||null!=m&&k(m,u)&&f.push(m)}let g=null!=(n=null==(r=window.visualViewport)?void 0:r.width)?n:innerWidth,y=null!=(s=null==(i=window.visualViewport)?void 0:i.height)?s:innerHeight,{scrollX:v,scrollY:w}=window,{height:b,width:E,top:S,right:_,bottom:C,left:R}=e.getBoundingClientRect(),{top:A,right:x,bottom:O,left:N}={top:parseFloat((o=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0},D="start"===l||"nearest"===l?S-A:"end"===l?C+O:S+b/2-A+O,P="center"===d?R+E/2-N+x:"end"===d?_+x:R-N,L=[];for(let e=0;e<f.length;e++){let t=f[e],{height:r,width:n,top:i,right:s,bottom:o,left:c}=t.getBoundingClientRect();if("if-needed"===a&&S>=0&&R>=0&&C<=y&&_<=g&&(t===p&&!k(t)||S>=i&&C<=o&&R>=c&&_<=s))break;let u=getComputedStyle(t),h=parseInt(u.borderLeftWidth,10),m=parseInt(u.borderTopWidth,10),M=parseInt(u.borderRightWidth,10),T=parseInt(u.borderBottomWidth,10),A=0,x=0,O="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-M:0,N="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-T:0,F="offsetWidth"in t?0===t.offsetWidth?0:n/t.offsetWidth:0,W="offsetHeight"in t?0===t.offsetHeight?0:r/t.offsetHeight:0;if(p===t)A="start"===l?D:"end"===l?D-y:"nearest"===l?I(w,w+y,y,m,T,w+D,w+D+b,b):D-y/2,x="start"===d?P:"center"===d?P-g/2:"end"===d?P-g:I(v,v+g,g,h,M,v+P,v+P+E,E),A=Math.max(0,A+w),x=Math.max(0,x+v);else{A="start"===l?D-i-m:"end"===l?D-o+T+N:"nearest"===l?I(i,o,r,m,T+N,D,D+b,b):D-(i+r/2)+N/2,x="start"===d?P-c-h:"center"===d?P-(c+n/2)+O/2:"end"===d?P-s+M+O:I(c,s,n,h,M+O,P,P+E,E);let{scrollLeft:e,scrollTop:a}=t;A=0===W?0:Math.max(0,Math.min(a+A/W,t.scrollHeight-r/W+N)),x=0===F?0:Math.max(0,Math.min(e+x/F,t.scrollWidth-n/F+O)),D+=a-A,P+=e-x}L.push({el:t,top:A,left:x})}return L})(e,t),n=0;for(let e of r){let t=e.el,r=Math.abs(e.top-t.scrollTop);n+=Math.abs(e.left-t.scrollLeft)+r}return n}async function U(e,t){if(e.some(j))return;let r=null,n=1/0;for(let t of e){let e=B(t,{scrollMode:"if-needed",block:"center",inline:"nearest"});e<n&&z(t)&&(n=e,r=t)}r&&(r.scrollIntoView({behavior:"smooth",block:"center"}),await H(r,t))}function z(e){if(!e)return!1;let t=window.getComputedStyle(e);
2return"none"!==t.display&&"hidden"!==t.visibility&&"0"!==t.opacity&&(0!==e.offsetWidth||0!==e.offsetHeight)&&function e(t){if(!t)return!0;let r=window.getComputedStyle(t);return"none"!==r.display&&"hidden"!==r.visibility&&"0"!==r.opacity&&e(t.parentElement)}(e.parentElement)}async function H(e,t){D(R(e))?(await new Promise((r,n)=>{let i;if(t.aborted)return void n(new DOMException("Aborted","AbortError"));let s=()=>{if(t.aborted){cancelAnimationFrame(i),n(new DOMException("Aborted","AbortError"));return}1>Math.abs(B(e,{scrollMode:"if-needed",block:"center",inline:"nearest"}))?r():i=requestAnimationFrame(s)};i=requestAnimationFrame(s)}),await F(100,t)):await F(500,t)}var $=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of l(t))c.call(e,n)||void 0===n||o(e,n,{get:()=>t[n],enumerable:!(r=a(t,n))||r.enumerable});return e})(o(null!=(t=_())?s(d(t)):{},"default",{value:t,enumerable:!0}),t);function q(e,t){let r=e.match(t);return r&&r.groups?{environment:r.groups.environment||"__PRIMARY__",itemTypeId:r.groups.item_type_id,itemId:r.groups.item_id,fieldPath:r.groups.field_path}:null}function K(e){let t=Math.round(100*function(e){let t=0,r=.5,n=0;for(;r-t>.001;){let i=(t+r)/2,[s,o,a]=function(e,t){let r=Math.min(t,1-t),n=n=>{let i=(n+e/30)%12;return t-r*Math.max(-1,Math.min(i-3,Math.min(9-i,1)))};return[Math.round(255*n(0)),Math.round(255*n(8)),Math.round(255*n(4))]}(e,i);1.05/(function(e,t,r){let n=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return .2126*n(e/255)+.7152*n(t/255)+.0722*n(r/255)}(s,o,a)+.05)>=3.5?(n=i,t=i+.001):r=i-.001}return n}(e));return{borderColor:`hsl(${e}, 100%, ${t}%)`,backgroundColor:`hsla(${e}, 100%, ${t}%, 0.15)`}}function G(e){let t=null,r=null,n=()=>{t=null,r&&(e(...r),r=null)},i=(...e)=>{r=e,null==t&&(t=window.requestAnimationFrame(n))};return i.cancel=()=>{null!=t&&(window.cancelAnimationFrame(t),t=null),r=null},i}var V=class{constructor(e){this.doc=e,this.callbacks=new Set,this.running=!1,this.rafHandler=G(()=>{for(let e of Array.from(this.callbacks))try{e()}catch(e){}}),this.onEvent=()=>{this.rafHandler()}}startIfNeeded(){if(this.running)return;let e=D(this.doc);e&&(e.addEventListener("scroll",this.onEvent,{passive:!0,capture:!0}),e.addEventListener("resize",this.onEvent,{passive:!0,capture:!0})),this.doc.addEventListener("scroll",this.onEvent,{passive:!0,capture:!0}),this.running=!0}stopIfIdle(){if(!this.running||this.callbacks.size>0)return;let e=D(this.doc);e&&(e.removeEventListener("scroll",this.onEvent),e.removeEventListener("resize",this.onEvent)),this.doc.removeEventListener("scroll",this.onEvent),this.running=!1,this.rafHandler.cancel()}subscribe(e){return this.callbacks.add(e),this.startIfNeeded(),()=>{this.callbacks.delete(e),this.stopIfIdle()}}},Y=new WeakMap,J=class{constructor(e){this.window=e,this.observer=null,this.callbacks=new WeakMap;const t=function(e){return e&&"ResizeObserver"in e?e.ResizeObserver:"u">typeof ResizeObserver?ResizeObserver:void 0}(this.window);t&&(this.observer=new t(e=>{for(let t of e){let e=this.callbacks.get(t.target);if(e)for(let t of e)t()}}))}observe(e,t){if(!this.observer)return()=>{};let r=this.callbacks.get(e);return r||(r=new Set,this.callbacks.set(e,r),this.observer.observe(e)),r.add(t),()=>{let r=this.callbacks.get(e);r&&(r.delete(t),0===r.size&&(this.callbacks.delete(e),this.observer?.unobserve(e)))}}},X=new WeakMap,Q=class{constructor(e,t={}){this.targetElement=e,this.resizeUnobserve=null,this.scrollResizeUnsubscribe=null,this.pendingAnimationAbortController=null,this.onDispose=t.onDispose,this.showLabel=t.showLabel??!1,this.overlayColors=t.overlayColors??K(17),this.overlayElement=this.createOverlayElement(this.showLabel),document.body.appendChild(this.overlayElement);const r=function(e){let t=Y.get(e);return t||(t=new V(e),Y.set(e,t)),t}(this.document);this.scrollResizeUnsubscribe=r.subscribe(()=>{this.updatePosition()});const n=function(e){if(!e)return null;let t=X.get(e);return t||(t=new J(e),X.set(e,t)),t}(this.window);n&&(this.resizeUnobserve=n.observe(e,()=>{this.updatePosition()}))}show(){this.updatePosition()}get document(){return R(this.targetElement)}get window(){return D(this.document)}dispose(){this.onDispose?.(),this.scrollResizeUnsubscribe?.(),this.resizeUnobserve?.(),this.overlayElement.remove()}cancelPendingAnimation(){this.pendingAnimationAbortController?.abort()}async fadeIn(e=0,t){this.cancelPendingAnimation(),this.pendingAnimationAbortController=t||new AbortController;let{signal:r}=this.pendingAnimationAbortController;try{this.overlayElement.style.opacity="0",await W(),await F(e,r),this.overlayElement.style.opacity="1"}catch(e){}}async disposeWithFadeOut(e=0,t){this.cancelPendingAnimation(),this.pendingAnimationAbortController=t||new AbortController;let{signal:r}=this.pendingAnimationAbortController;try{await F(e,r),this.overlayElement.style.opacity="0",await F(250,r)}catch(e){}finally{this.dispose()}}createOverlayElement(e){let t=this.document.createElement("div");if(t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="0",t.style.height="0",t.style.border=`2px solid ${this.overlayColors.borderColor}`,t.style.borderRadius=e?"6px 0 6px 6px":"6px",t.style.background=this.overlayColors.backgroundColor,t.style.boxSizing="border-box",t.style.pointerEvents="none",t.style.zIndex="2147483646",t.style.display="block",t.style.opacity="1",t.style.transition="opacity 200ms ease-in-out",t.setAttribute("aria-hidden","true"),e){let e=this.document.createElement("div");e.textContent="Open in DatoCMS ↗",e.style.position="absolute",e.style.bottom="100%",e.style.right="-2px",e.style.backgroundColor=this.overlayColors.borderColor,e.style.color="white",e.style.padding="4px 12px",e.style.borderRadius="6px 6px 0 0",e.style.fontSize="13px",e.style.fontWeight="600",e.style.fontFamily="system-ui, -apple-system, sans-serif",e.style.whiteSpace="nowrap",e.style.setProperty("-webkit-font-smoothing","antialiased"),e.style.letterSpacing="normal",e.style.lineHeight="normal",e.style.textTransform="none",e.style.fontStyle="normal",e.setAttribute("aria-hidden","true"),t.appendChild(e)}return t}updatePosition(){let e=function(e){if("function"!=typeof e.getBoundingClientRect)return null;let t=e.getBoundingClientRect();
2return(0!==t.width||0!==t.height)&&z(e)?{top:t.top,left:t.left,width:t.width,height:t.height}:null}(this.targetElement);if(this.overlayElement.style.zIndex=this.computeOverlayZIndex(this.targetElement),!e){this.overlayElement.style.display="none";return}if(this.overlayElement.style.display="block",this.overlayElement.style.top=`${e.top-8}px`,this.overlayElement.style.left=`${e.left-8}px`,this.overlayElement.style.width=`${e.width+16}px`,this.overlayElement.style.height=`${e.height+16}px`,this.showLabel){let t=this.overlayElement.firstElementChild;t&&(e.width+16<150?(t.style.bottom="calc(100% + 10px)",t.style.right="auto",t.style.left="50%",t.style.transform="translateX(-50%)",t.style.borderRadius="6px",this.overlayElement.style.borderRadius="6px"):(t.style.bottom="100%",t.style.right="-2px",t.style.left="auto",t.style.transform="none",t.style.borderRadius="6px 6px 0 0",this.overlayElement.style.borderRadius="6px 0 6px 6px"))}}computeOverlayZIndex(e){if(!this.window)return"0";let t=e,r=null;for(;t&&t instanceof this.window.Element;){let e=this.window.getComputedStyle(t).zIndex;if("auto"!==e){let t=Number(e);Number.isFinite(t)&&(r=t)}t=t.parentElement}return null!==r?String(r):"0"}},Z="data-datocms-auto-content-link-url",ee="data-datocms-content-link-url",et="data-datocms-content-link-group",er="data-datocms-content-link-source",en=`[${ee}], [${Z}]`;function ei(e){if(!e||!(e instanceof Element))return null;let t=e.closest(en);if(!t)return null;let r=t.getAttribute(ee)||t.getAttribute(Z);return r?{element:t,editUrl:r}:null}var es=class{constructor(e,t,r=()=>!1,n){this.document=e,this.onEditClick=t,this.shouldShowLabel=r,this.overlayColors=n,this.highlightOverlay=null,this.listenerAbortController=null,this.throttledOnPointerMove=G(e=>this.immediateOnPointerMoveEvent(e))}isActive(){return!!this.listenerAbortController}activate(){if(this.isActive())return;this.listenerAbortController=new AbortController;let e={capture:!0,signal:this.listenerAbortController.signal};this.document.addEventListener("pointerover",this.throttledOnPointerMove,e),this.document.addEventListener("pointermove",this.throttledOnPointerMove,e),this.document.addEventListener("pointerleave",e=>this.onPointerLeave(e),e),this.document.addEventListener("click",e=>this.onClick(e),e),this.document.addEventListener("focusin",e=>this.onFocusIn(e),e),this.document.addEventListener("focusout",()=>this.onFocusOut(),e),this.document.addEventListener("keydown",e=>this.onKeyDown(e),e)}immediateOnPointerMoveEvent(e){if(!x(e))return;let t=ei(e.target);this.highlightElement(t?.element)}onPointerLeave(e){!x(e)||ei(e.relatedTarget)||this.highlightElement(null)}onFocusIn(e){let t=ei(e.target);this.highlightElement(t?.element)}onKeyDown(e){if(!N(e)||"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key)return;let t=ei(this.document.activeElement);t&&(this.highlightElement(t.element),e.preventDefault(),e.stopPropagation(),this.onEditClick(t.editUrl))}onClick(e){if(!O(e)||0!==e.button)return;let t=ei(e.target);t&&(this.highlightElement(t.element),e.preventDefault(),e.stopPropagation(),this.onEditClick(t.editUrl))}onFocusOut(){this.highlightElement(null)}highlightElement(e){let t=e&&!e.isConnected?null:e;if((!this.highlightOverlay||this.highlightOverlay.targetElement!==t)&&(this.highlightOverlay&&(this.highlightOverlay.dispose(),this.highlightOverlay=null),t)){let e=t.style.cursor;t.style.cursor="pointer",this.highlightOverlay=new Q(t,{onDispose:()=>{t.style.cursor=e},showLabel:this.shouldShowLabel(),overlayColors:this.overlayColors}),this.highlightOverlay.show()}}deactivate(){this.isActive()&&(this.listenerAbortController.abort(),this.listenerAbortController=null,this.throttledOnPointerMove.cancel(),this.highlightOverlay?.dispose(),this.highlightOverlay=null)}},eo={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},ea={0:8203,1:8204,2:8205,3:65279},el=[,,,,].fill(String.fromCodePoint(ea[0])).join(""),ed=Object.fromEntries(Object.entries(ea).map(e=>e.reverse())),ec=Object.fromEntries(Object.entries(eo).map(e=>e.reverse())),eu=`${Object.values(eo).map(e=>`\\u{${e.toString(16)}}`).join("")}`,eh=RegExp(`[${eu}]{4,}`,"gu"),ep=class{constructor(e,t,r=!1,n=!1){this.root=e,this.onStamp=t,this.stripStega=r,this.silenceWarnings=n,this.pendingElementsToStamp=new Set,this.scheduleStamping=function(e){let t=!1,r="function"==typeof queueMicrotask?queueMicrotask:e=>Promise.resolve().then(e);return()=>{t||(t=!0,r(()=>{t=!1,e()}))}}(()=>this.instantStampPendingElements()),this.observer=new MutationObserver(e=>this.handleMutations(e)),this.observer.observe(this.root,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["alt",er]}
2),this.instantStampPendingElements(!0)}dispose(){for(let e of(this.observer.disconnect(),this.pendingElementsToStamp.clear(),this.root.querySelectorAll(`[${Z}]`)))e.removeAttribute(Z)}handleMutations(e){let t=!1;for(let r of e)if("characterData"===r.type){let e=r.target,n=e.parentElement??e.parentNode??this.root;this.pendingElementsToStamp.add(n),t=!0}else if("attributes"===r.type&&"alt"===r.attributeName){let e=r.target;this.pendingElementsToStamp.add(e.parentElement??this.root),t=!0}else if("attributes"===r.type&&r.attributeName===er){let e=r.target;this.pendingElementsToStamp.add(e.parentElement??this.root),t=!0}else if("childList"===r.type){for(let e of(this.pendingElementsToStamp.add(r.target),r.addedNodes))(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&this.pendingElementsToStamp.add(e);t=!0}t&&this.scheduleStamping()}instantStampPendingElements(e=!1){let t=0===this.pendingElementsToStamp.size?[this.root]:Array.from(this.pendingElementsToStamp);this.pendingElementsToStamp.clear();let r=[];for(let e of t){let t=this.stampElement(e);r.push(t)}let n=1===r.length?r[0]:{appliedStamps:r.reduce((e,t)=>{for(let[r,n]of t.appliedStamps.entries())e.set(r,n);return e},new Map),scope:this.root};!this.silenceWarnings&&e&&0===n.appliedStamps.size&&console.warn("[@datocms/content-link] No editable elements were detected after initialization. Make sure that Content Link headers are enabled in your GraphQL requests! If you're hydrating/streaming, do not replace the server-rendered nodes that carry stega-encoded data: reuse the same DOM element!"),0!==r.length&&this.onStamp(n)}stampElement(e){let t=R(e);if(!t)return{appliedStamps:new Map,scope:e};let r=new Map,n=t.createTreeWalker(e,NodeFilter.SHOW_TEXT),i=n.nextNode();for(;i;){if(!(i instanceof Text)){i=n.nextNode();continue}let e=i.nodeValue??"",t=i.parentElement;if(t&&this.isInsideExcludedTag(t)){i=n.nextNode();continue}let s=this.addStampingAttributesTargetAndReturnStrippedValue(e,t,r);this.stripStega&&void 0!==s&&(i.nodeValue=s),i=n.nextNode()}for(let t of e.querySelectorAll("img[alt]")){let e=t.getAttribute("alt"),n=this.addStampingAttributesTargetAndReturnStrippedValue(e,t,r);this.stripStega&&void 0!==n&&t.setAttribute("alt",n)}for(let t of e.querySelectorAll(`[${er}]`)){let e=t.getAttribute(er);this.addStampingAttributesTargetAndReturnStrippedValue(e,t,r),this.stripStega&&t.removeAttribute(er)}return{appliedStamps:r,scope:e}}addStampingAttributesTargetAndReturnStrippedValue(e,t,r){let n,i;if(!e||!t)return;try{var s,o;if(!(n={cleaned:e.replace(eh,""),encoded:(null==(s=e.match(eh))?void 0:s[0])||""}).encoded||(o=i=function(e){let t=e.match(eh);if(t)return function(e,t=!1){let r=Array.from(e);if(r.length%2==0){if(r.length%4||!e.startsWith(el))return function(e,t){var r;let n=[];for(let t=.5*e.length;t--;){let r=`${ec[e[2*t].codePointAt(0)]}${ec[e[2*t+1].codePointAt(0)]}`;n.unshift(String.fromCharCode(parseInt(r,16)))}let i=[],s=[n.join("")],o=10;for(;s.length;){let e=s.shift();try{if(i.push(JSON.parse(e)),t)break}catch(n){if(!o--)throw n;let t=+(null==(r=n.message.match(/\sposition\s(\d+)$/))?void 0:r[1]);if(!t)throw n;s.unshift(e.substring(0,t),e.substring(t))}}return i}(r,t)}else throw Error("Encoded data has invalid length");let n=[];for(let e=.25*r.length;e--;){let t=r.slice(4*e,4*e+4).map(e=>ed[e.codePointAt(0)]).join("");n.unshift(String.fromCharCode(parseInt(t,4)))}if(t){n.shift();let e=n.indexOf("\0");return -1===e&&(e=n.length),[JSON.parse(n.slice(0,e).join(""))]}return n.join("").split("\0").filter(Boolean).map(e=>JSON.parse(e))}(t[0],!0)[0]}(n.encoded),"object"!=typeof o||null===o||!("origin"in o)||"string"!=typeof o.origin||!("href"in o)||"string"!=typeof o.href))return}catch(e){return}let a=this.maybeFindGroup(t);if(!a)return;let l=r.get(a);return!this.silenceWarnings&&l&&l!==i.href&&this.warnCollision(a,l,t,i.href),a.getAttribute(Z)!==i.href&&(a.setAttribute(Z,i.href),r.set(a,i.href)),this.stripStega||t.setAttribute("data-datocms-contains-stega",""),n.cleaned}warnCollision(e,t,r,n){console.warn(`[@datocms/content-link] Multiple stega-encoded payloads resolved to the same DOM element. Previous URL: ${t}. Incoming URL: ${n}. Wrap each encoded block in its own element (for example by adding ${et}).`,e,r)}isInsideExcludedTag(e){if(!e)return!1;let t=e;for(;t;){if("SCRIPT"===t.tagName||"STYLE"===t.tagName)return!0;t=t.parentElement}return!1}maybeFindGroup(e){let t=e;for(;t;){if(t.hasAttribute(et))return t;if(t.hasAttribute("data-datocms-content-link-boundary"))break;t=t.parentElement}return e}},ef=class{constructor(e){this.doc=e.doc}emitStamped(e){this.dispatch("datocms:visual-editing:stamped",e)}emitClickToEditToggle(e){this.dispatch("datocms:click-to-edit:toggle",e)}
2dispatch(e,t){let r=this.doc.defaultView?.CustomEvent??("u">typeof CustomEvent?CustomEvent:void 0);if(r)try{let n=new r(e,{detail:t});this.doc.dispatchEvent(n)}catch{}}},em=class{constructor(e,t){this.wrapperElement=e,this.overlayColors=t,this.overlays=[],this.pendingAnimationAbortController=null,this.disposed=!1}async flash(e){this.disposed||(this.fadeIn(e),await L(1500),this.fadeOut())}async fadeIn(e){if(this.disposed)return;await W();let t=Array.from(this.wrapperElement.querySelectorAll(en));if(0===t.length)return;this.instantlyDisposeOverlays();let r=new AbortController,{signal:n}=r;this.pendingAnimationAbortController=r;try{e&&await U(t,n);let i=t.length;t.map((e,t)=>{let n=new Q(e,{overlayColors:this.overlayColors});n.fadeIn(i<50?10*t:0,r),this.overlays.push(n)})}catch(e){}}fadeOut(){if(this.disposed)return;this.cancelPendingAnimation();let e=new AbortController,t=this.overlays.length;this.overlays.map((r,n)=>{r.disposeWithFadeOut(t<50?10*n:0,e)}),this.overlays=[]}dispose(){this.disposed||(this.disposed=!0,this.instantlyDisposeOverlays())}cancelPendingAnimation(){this.pendingAnimationAbortController?.abort()}instantlyDisposeOverlays(){this.cancelPendingAnimation(),this.overlays.forEach(e=>{e.cancelPendingAnimation(),e.dispose()}),this.overlays=[]}},eg=class{constructor(e,t,r,n){this.wrapperElement=e,this.itemId=t,this.editUrlRegExp=r,this.overlayColors=n,this.overlays=[],this.pendingAnimationAbortController=null,this.disposed=!1}async flash(e){this.disposed||(await W(),this.fadeIn(e),await L(1500),await this.fadeOut())}async fadeIn(e){if(this.disposed)return;let t=this.wrapperElement.querySelectorAll(en),r=new Set;for(let e of t){let t=e.getAttribute(ee)||e.getAttribute(Z);if(t){let n=q(t,this.editUrlRegExp);n&&n.itemId===this.itemId&&r.add(e)}}let n=Array.from(r);if(0===n.length)return;this.instantlyDisposeOverlays();let i=new AbortController,{signal:s}=i;this.pendingAnimationAbortController=i;try{e&&await U(n,s),n.map((e,t)=>{let r=new Q(e,{overlayColors:this.overlayColors});r.fadeIn(10*t,i),this.overlays.push(r)})}catch(e){}}async fadeOut(){if(this.disposed)return;this.cancelPendingAnimation();let e=new AbortController,t=Promise.all(this.overlays.map((t,r)=>t.disposeWithFadeOut(10*r,e)));return this.overlays=[],await t}dispose(){this.disposed||(this.disposed=!0,this.instantlyDisposeOverlays())}cancelPendingAnimation(){this.pendingAnimationAbortController?.abort()}instantlyDisposeOverlays(){this.cancelPendingAnimation(),this.overlays.forEach(e=>{e.cancelPendingAnimation(),e.dispose()}),this.overlays=[]}},ey=class{constructor(e){this.flashItemManager=null,this.webPreviewsPluginConnection=null,this.disposed=!1,this.currentPath=A(document.location.toString()),this.wrapperElement=e.root??document,this.onNavigateTo=e.onNavigateTo,this.overlayColors=K(e.hue??17),this.eventsManager=new ef({doc:this.document}),this.clickToEditManager=new es(this.document,e=>this.handleEditClick(e),()=>null===this.webPreviewsPluginConnection,this.overlayColors),this.initializeWebPreviewsPluginConnection(),this.stampingManager=new ep(this.wrapperElement,e=>this.handleStampResult(e),e.stripStega??!1,e.silenceWarnings??!1),this.flashAllManager=new em(this.wrapperElement,this.overlayColors),this.listenerAbortController=new AbortController,this.document.addEventListener("keydown",e=>this.onKeyDown(e),{capture:!0,signal:this.listenerAbortController.signal}),this.document.addEventListener("keyup",e=>this.onKeyUp(e),{capture:!0,signal:this.listenerAbortController.signal}),this.document.addEventListener("click",e=>this.onClick(e),{capture:!0,signal:this.listenerAbortController.signal}),this.document.addEventListener("visibilitychange",()=>{document.hidden&&this.disableTemporaryClickToEditState()},{signal:this.listenerAbortController.signal}),D(this.document)?.addEventListener("blur",()=>{this.disableTemporaryClickToEditState()},{signal:this.listenerAbortController.signal})}get document(){return R(this.wrapperElement)}dispose(){this.disposed||(this.disposed=!0,this.clickToEditManager.deactivate(),this.stampingManager.dispose(),this.flashAllManager.dispose(),this.flashItemManager?.dispose(),this.webPreviewsPluginConnection?.destroy(),this.listenerAbortController.abort())}isDisposed(){return this.disposed}setCurrentPath(e){this.currentPath=A(e)}enableClickToEdit(e){!this.disposed&&(this.clickToEditManager.isActive()||(this.clickToEditManager.activate(),this.eventsManager.emitClickToEditToggle(!0),this.notifyStateChangeToWebPreviewsPlugin()),e&&this.flashAllManager.flash(e.scrollToNearestTarget))}disableClickToEdit(){this.clickToEditManager.isActive()&&!this.disposed&&(this.clickToEditManager.deactivate(),this.eventsManager.emitClickToEditToggle(!1),this.notifyStateChangeToWebPreviewsPlugin())}isClickToEditEnabled(){return this.clickToEditManager.isActive()&&!this.disposed}flashAll(e=!1){this.disposed||this.flashAllManager.flash(e)}async flashItem(e,t=!1){if(this.disposed||!this.webPreviewsPluginConnection)return;this.flashItemManager?.dispose();let r=new eg(this.wrapperElement,e,this.webPreviewsPluginConnection.editUrlRegExp,this.overlayColors),n=r.flash(t);this.flashItemManager=r,await n,r.dispose()}handleStampResult(e){this.eventsManager.emitStamped(e),this.notifyStateChangeToWebPreviewsPlugin()}async notifyStateChangeToWebPreviewsPlugin(){if(!this.webPreviewsPluginConnection)return;let e=this.wrapperElement.querySelectorAll(en),t=new Set;for(let r of e){let e=r.getAttribute(ee)||r.getAttribute(Z);e&&t.add(e)}await this.webPreviewsPluginConnection.parent.onStateChange({clickToEditEnabled:this.clickToEditManager.isActive(),path:this.currentPath,itemIdsPerEnvironment:function(e,t){let r={};for(let n of e){let e=q(n,t);if(e){let t=e.environment;r[t]||(r[t]=new Set),r[t].add(e.itemId)}}let n={};for(let[e,t]of Object.entries(r))n[e]=Array.from(t);return n}(Array.from(t),this.webPreviewsPluginConnection.editUrlRegExp)})}handleEditClick(e){if(this.webPreviewsPluginConnection){let t=q(e,this.webPreviewsPluginConnection.editUrlRegExp);t&&this.webPreviewsPluginConnection.parent.openItem(t)}else{let t=this.document.defaultView??("u">typeof window?window:null);t?.open(e,"_blank","noopener,noreferrer")}}async initializeWebPreviewsPluginConnection(){let e;if(!("u">typeof window&&window.parent!==window))return;let t=$.default.connectToParent({timeout:2e4,methods:{navigateTo:e=>{this.onNavigateTo?.(e.path)},flashAll:e=>{this.flashAll(e.scrollToNearestTarget)},flashItem:e=>{this.flashItem(e.itemId,e.scrollToNearestTarget)},setClickToEditEnabled:e=>{e.enabled?this.enableClickToEdit(e.flash):this.disableClickToEdit()}}}),r=await t.promise;if(this.disposed)return void t.destroy();let{editUrlRegExp:n}=await r.onInit();e=setInterval(()=>
2r.onPing(),1e3),this.webPreviewsPluginConnection={parent:r,destroy:()=>{clearInterval(e),t.destroy()},editUrlRegExp:new RegExp(n.source,n.flags)},await this.notifyStateChangeToWebPreviewsPlugin()}onKeyDown(e){N(e)&&"Alt"===e.key&&this.isTopLevelWindowOrInWebPreviewsIframe&&(P(this.document)||this.enableTemporaryClickToEditState())}onKeyUp(e){N(e)&&"Alt"===e.key&&this.isTopLevelWindowOrInWebPreviewsIframe&&(P(this.document)||this.disableTemporaryClickToEditState())}onClick(e){if(O(e)&&0===e.button&&this.temporaryState&&!this.temporaryState.enabled&&e.altKey){e.preventDefault();let t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.target.dispatchEvent(t)}}enableTemporaryClickToEditState(){this.clickToEditManager.isActive()?(this.temporaryState={enabled:!1},this.disableClickToEdit(),this.flashAllManager.fadeOut()):(this.temporaryState={enabled:!0},this.enableClickToEdit(),this.flashAllManager.fadeIn(!0))}disableTemporaryClickToEditState(){this.temporaryState&&(this.temporaryState.enabled?(this.disableClickToEdit(),this.flashAllManager.fadeOut()):(this.enableClickToEdit(),this.flashAllManager.flash(!0)),this.temporaryState=void 0)}get isTopLevelWindowOrInWebPreviewsIframe(){let e=this.document.defaultView??("u">typeof window?window:null);return this.webPreviewsPluginConnection||e&&e.parent===e}},ev=class{constructor(){this.disposed=!1}dispose(){this.disposed=!0}isDisposed(){return this.disposed}setCurrentPath(){}enableClickToEdit(){}disableClickToEdit(){}isClickToEditEnabled(){return!1}flashAll(){}};try{var ew="u">typeof window?window:e.g;ew._sentryModuleMetadata=ew._sentryModuleMetadata||{},ew._sentryModuleMetadata[(new ew.Error).stack]=Object.assign({},ew._sentryModuleMetadata[(new ew.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}try{var eb="u">typeof window?window:e.g;eb._sentryModuleMetadata=eb._sentryModuleMetadata||{},eb._sentryModuleMetadata[(new eb.Error).stack]=Object.assign({},eb._sentryModuleMetadata[(new eb.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}var eE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function eS(e){let{currentPath:t,enableClickToEdit:r,stripStega:i,hue:s}=e,{enableClickToEdit:o,setCurrentPath:a}=function(e={}){let{enabled:t=!0,onNavigateTo:r,root:i,hue:s}=e,o=(0,n.useRef)(null),a=(0,n.useRef)(r);(0,n.useEffect)(()=>{a.current=r},[r]),(0,n.useEffect)(()=>{if(!0!==t&&("object"!=typeof t||null===t)){o.current&&(o.current.dispose(),o.current=null);return}let e="object"==typeof t&&t.stripStega,r=function(e={}){return"u">typeof window&&"u">typeof document?new ey(e):new ev}({onNavigateTo:e=>{var t;return null==(t=a.current)?void 0:t.call(a,e)},root:(null==i?void 0:i.current)||void 0,stripStega:e,hue:s});return o.current=r,()=>{r.dispose(),o.current=null}},[t,i,s]);let l=(0,n.useCallback)(e=>{var t;(null==e||!e.hoverOnly||"u">typeof window&&window.matchMedia("(hover: hover)").matches)&&(null==(t=o.current)||t.enableClickToEdit((null==e?void 0:e.scrollToNearestTarget)?{scrollToNearestTarget:e.scrollToNearestTarget}:void 0))},[]),d=(0,n.useCallback)(()=>{var e;null==(e=o.current)||e.disableClickToEdit()},[]),c=(0,n.useCallback)(()=>{var e,t;return null!=(t=null==(e=o.current)?void 0:e.isClickToEditEnabled())&&t},[]),u=(0,n.useCallback)(e=>{var t;null==(t=o.current)||t.flashAll(e)},[]),h=(0,n.useCallback)(e=>{var t;null==(t=o.current)||t.setCurrentPath(e)},[]);return{controller:o.current,enableClickToEdit:l,disableClickToEdit:d,isClickToEditEnabled:c,flashAll:u,setCurrentPath:h}}(Object.assign(Object.assign({},eE(e,["currentPath","enableClickToEdit","stripStega","hue"])),{enabled:void 0===i||{stripStega:i},hue:s}));return(0,n.useEffect)(()=>{void 0!==t&&a(t)},[t,a]),(0,n.useEffect)(()=>{!r||"u">typeof window&&window.parent===window&&o(!0===r?void 0:r)},[r,o]),null}var e_=e.i(744705);try{var eM=window;eM._sentryModuleMetadata=eM._sentryModuleMetadata||{},eM._sentryModuleMetadata[(new eM.Error).stack]=Object.assign({},eM._sentryModuleMetadata[(new eM.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}let eC=()=>{let e=(0,e_.usePathname)();return(0,r.jsxs)("div",{className:"fixed start-4 bottom-4 z-50 flex items-center gap-2 rounded-md bg-yellow-500 px-4 py-2 font-semibold text-black shadow-lg","data-sentry-component":"DraftModeBanner","data-sentry-source-file":"draft-mode-banner.tsx",children:[(0,r.jsx)("span",{children:"Draft Mode"}),(0,r.jsx)("a",{href:`/api/draft-mode/disable?redirect=${encodeURIComponent(e)}`,className:"underline hover:no-underline",children:"Exit"})]})};try{var ek=window;ek._sentryModuleMetadata=ek._sentryModuleMetadata||{},ek._sentryModuleMetadata[(new ek.Error).stack]=Object.assign({},ek._sentryModuleMetadata[(new ek.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}e.s(["default",0,()=>{let e=(0,e_.useRouter)(),t=(0,e_.usePathname)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eC,{"data-sentry-element":"DraftModeBanner","data-sentry-source-file":"draft-mode-prov
2ider.tsx"}),(0,r.jsx)(eS,{currentPath:t,onNavigateTo:t=>e.push(t),enableClickToEdit:!0,"data-sentry-element":"ContentLink","data-sentry-source-file":"draft-mode-provider.tsx"})]})}],965694)},742564,e=>{"use strict";let t,r,n,i,s,o,a,l,d,c;var u,h,p,f,m,g,y,v,w,b,E,S,_=e.i(768417),M=e.i(810389),C=e.i(336379);try{var k="u">typeof window?window:e.g;k._sentryModuleMetadata=k._sentryModuleMetadata||{},k._sentryModuleMetadata[(new k.Error).stack]=Object.assign({},k._sentryModuleMetadata[(new k.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}function I(e,t,r,n,i){(0,C._INTERNAL_captureLog)({level:e,message:t,attributes:r,severityNumber:i},n)}function T(e,t,{scope:r}={}){I("trace",e,t,r)}function R(e,t,{scope:r}={}){I("debug",e,t,r)}function A(e,t,{scope:r}={}){I("info",e,t,r)}function x(e,t,{scope:r}={}){I("warn",e,t,r)}function O(e,t,{scope:r}={}){I("error",e,t,r)}function N(e,t,{scope:r}={}){I("fatal",e,t,r)}e.s(["debug",0,R,"error",0,O,"fatal",0,N,"info",0,A,"trace",0,T,"warn",0,x],164505),e.i(164505);try{var D="u">typeof window?window:e.g;D._sentryModuleMetadata=D._sentryModuleMetadata||{},D._sentryModuleMetadata[(new D.Error).stack]=Object.assign({},D._sentryModuleMetadata[(new D.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}e.s(["debug",0,R,"error",0,O,"fatal",0,N,"fmt",0,function(e,...t){let r=e.map((t,r)=>t??e.raw[r]),n=new String(String.raw({raw:r},...t));return n.__sentry_template_string__=r.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n},"info",0,A,"trace",0,T,"warn",0,x],186042);var P=e.i(186042),P=P;try{var L="u">typeof window?window:e.g;L._sentryModuleMetadata=L._sentryModuleMetadata||{},L._sentryModuleMetadata[(new L.Error).stack]=Object.assign({},L._sentryModuleMetadata[(new L.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}var F=Object.defineProperty,W=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?F(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r};function j(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:j(e.parentNode,t,r,n+1)}function B(e,t){return r=>{if(null===r)return!1;try{if(e){if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}(r,e))return!0}if(t&&r.matches(t))return!0;return!1}catch{return!1}}}let U="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",z={map:{},getId:()=>(console.error(U),-1),getNode:()=>(console.error(U),null),removeNodeFromMap(){console.error(U)},has:()=>(console.error(U),!1),reset(){console.error(U)}};function H(e,t,r,n,i=window){let s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(e){Y(()=>{r.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>H(e,t,s||{},!0)}function $(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}function q(e,t,r,n,i){if(!e)return!1;let s=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}(e);if(!s)return!1;let o=B(t,r);if(!i){let e=n&&s.matches(n);return o(s)&&!e}let a=j(s,o),l=-1;return!(a<0)&&(n&&(l=j(s,B(null,n))),a>-1&&l<0||a<l)}"u">typeof window&&window.Proxy&&window.Reflect&&(z=new Proxy(z,{get:(e,t,r)=>("map"===t&&console.error(U),Reflect.get(e,t,r))})),Date.now().toString();let K={};function G(e){let t=K[e];if(t)return t;let r=window.document,n=window[e];if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(e){}return K[e]=n.bind(window)}function V(...e){return G("requestAnimationFrame")(...e)}function Y(...e){return G("setTimeout")(...e)}
2var J=((u=J||{})[u["2D"]=0]="2D",u[u.WebGL=1]="WebGL",u[u.WebGL2=2]="WebGL2",u);let X=e=>t?(...r)=>{try{return e(...r)}catch(e){if(t&&!0===t(e))return()=>{};throw e}}:e;for(var Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z="u"<typeof Uint8Array?[]:new Uint8Array(256),ee=0;ee<Q.length;ee++)Z[Q.charCodeAt(ee)]=ee;var et=function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=Q[r[t]>>2],i+=Q[(3&r[t])<<4|r[t+1]>>4],i+=Q[(15&r[t+1])<<2|r[t+2]>>6],i+=Q[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};let er=new Map,en=(e,t,r)=>{let n;if(!e||!(es(e,t)||"object"==typeof e))return;let i=e.constructor.name,s=((n=er.get(r))||(n=new Map,er.set(r,n)),n.has(i)||n.set(i,[]),n.get(i)),o=s.indexOf(e);return -1===o&&(o=s.length,s.push(e)),o},ei=(e,t,r)=>e.map(e=>(function e(t,r,n){if(t instanceof Array)return t.map(t=>e(t,r,n));if(null===t);else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};else if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:et(t)};else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,r,n),t.byteOffset,t.byteLength]};else if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:r}=t;return{rr_type:e,src:r}}else if(t instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[e(t.data,r,n),t.width,t.height]};else if(es(t,r)||"object"==typeof t)return{rr_type:t.constructor.name,index:en(t,r,n)};return t})(e,t,r)),es=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(r=>e instanceof t[r]);function eo(e,t,r,n,i){let s=[];try{let o=$(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(s,...o){if(!q(this,t,r,n,!0)){let e="experimental-webgl"===s?"webgl":s;if("__context"in this||(this.__context=e),i&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){let e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...o])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(e=>e())}}function ea(e,t,r,n,i,s,o,a){let l=[];for(let o of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if("function"!=typeof e[o])continue;let d=$(e,o,function(e){return function(...l){let d=e.apply(this,l);if(en(d,a,this),"tagName"in this.canvas&&!q(this.canvas,n,i,s,!0)){let e=ei(l,a,this),n={type:t,property:o,args:e};r(this.canvas,n)}return d}});l.push(d)}catch{let n=H(e,o,{set(e){r(this.canvas,{type:t,property:o,args:[e],setter:!0})}});l.push(n)}return l}class el{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{enableManualSnapshot:r,sampling:n="all",win:i,recordCanvas:s,errorHandler:o}=e;if(e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,o&&function(e){t=e}(o),(s&&"number"==typeof n||r)&&(this.worker=this.initFPSWorker()),this.addWindow(i),r)return;X(()=>{s&&"all"===n&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&"number"==typeof n&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEac
2h(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){let{sampling:t="all",blockClass:r,blockSelector:n,unblockSelector:i,recordCanvas:s,enableManualSnapshot:o}=this.options;if(!this.windowsSet.has(e)){if(o){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}X(()=>{if(s&&"all"===t&&this.initCanvasMutationObserver(e,r,n,i),s&&"number"==typeof t){let t=eo(e,r,n,i,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){t?.skipRequestAnimationFrame?this.takeSnapshot(performance.now(),!0,e):V(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){let e,t=new Worker((e=new Blob(['for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};']),URL.createObjectURL(e)));return t.onmessage=e=>{let t=e.data,{id:r}=t;if(this.snapshotInProgressMap.set(r,!1),!("base64"in t))return;let{base64:n,type:i,width:s,height:o}=t;this.mutationCb({id:r,type:J["2D"],commands:[{property:"clearRect",args:[0,0,s,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:i}]},0,0,s,o]}]})},t}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=r=>{this.takeSnapshot(r,!1),e=V(t)};e=V(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,r,n){var i,s;let o,a=eo(e,t,r,n,!1),l=function(e,t,r,n,i){let s=[];for(let o of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;let a=$(t.CanvasRenderingContext2D.prototype,o,function(s){return function(...a){return q(this.canvas,r,n,i,!0)||Y(()=>{let r=ei(a,t,this);e(this.canvas,{type:J["2D"],property:o,args:r})},0),s.apply(this,a)}});s.push(a)}catch{let r=H(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:J["2D"],property:o,args:[t],setter:!0})}});s.push(r)}return()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r,n),d=(i=this.processMutation.bind(this),s=this.mirror,(o=[]).push(...ea(e.WebGLRenderingContext.prototype,J.WebGL,i,t,r,n,s,e)),void 0!==e.WebGL2RenderingContext&&o.push(...ea(e.WebGL2RenderingContext.prototype,J.WebGL2,i,t,r,n,s,e)),()=>{o.forEach(e=>e())});this.restoreHandlers.push(()=>{a(),l(),d()})}getCanvasElements(e,t,r){let n=[],i=i=>{i.querySelectorAll("canvas").forEach(i=>
2{q(i,e,t,r,!0)||n.push(i)})};for(let e of this.windows){let t,r=e.deref();try{t=r&&r.document}catch{}t&&i(t)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return n}takeSnapshot(e,t,r){let{sampling:n,blockClass:i,blockSelector:s,unblockSelector:o,dataURLOptions:a,maxCanvasSize:l}=this.options;return(!this.lastSnapshotTime||!(e-this.lastSnapshotTime<1e3/("all"===n?2:n||2)))&&(this.lastSnapshotTime=e,(r?[r]:this.getCanvasElements(i,s,o)).forEach(e=>{let r=this.mirror.getId(e);if(!(!this.mirror.hasNode(e)||!e.width||!e.height||this.snapshotInProgressMap.get(r))){if(this.snapshotInProgressMap.set(r,!0),!t&&["webgl","webgl2"].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{this.worker?.postMessage({id:r,bitmap:t,width:e.width,height:e.height,dataURLOptions:a,maxCanvasSize:l},[t])}).catch(e=>{X(()=>{throw this.snapshotInProgressMap.delete(r),e})()})}}),!0)}startPendingCanvasMutationFlusher(){V(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,V(e)};V(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),V(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;let n=r.map(e=>{let{type:t,...r}=e;return r}),{type:i}=r[0];this.mutationCb({id:t,type:i,commands:n}),this.pendingCanvasMutations.delete(e)}}try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}new class e{constructor(){W(this,"idNodeMap",new Map),W(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},(h=E||(E={}))[h.NotStarted=0]="NotStarted",h[h.Running=1]="Running",h[h.Stopped=2]="Stopped";let ed={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},ec=(0,_.defineIntegration)((e={})=>{let t,r,[n,i]=e.maxCanvasSize||[],s={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[n?Math.min(n,1280):1280,i?Math.min(i,1280):1280]},o=new Promise(e=>r=e);return{name:"ReplayCanvas",getOptions(){let{quality:e,enableManualSnapshot:n,maxCanvasSize:i}=s;return{enableManualSnapshot:n,recordCanvas:!0,getCanvasManager:e=>{let s=new el({...e,enableManualSnapshot:n,maxCanvasSize:i,errorHandler:e=>{try{"object"==typeof e&&(e.__rrweb__=!0)}catch{}}});return t=s,r(s),s},...ed[e]||ed.medium}},async snapshot(e,r){(t||await o).snapshot(e,r)}}});var eu=e.i(156494),eh=e.i(332466),ep=e.i(159493),ef=e.i(534536),em=e.i(938843),eg=e.i(260031),ey=e.i(947733),ev=e.i(300928),ew=e.i(164851),eb=e.i(684091),eE=e.i(968637),eS=e.i(634298),e_=e.i(207337);try{var eM="u">typeof window?window:e.g;eM._sentryModuleMetadata=eM._sentryModuleMetadata||{},eM._sentryModuleMetadata[(new eM.Error).stack]=Object.assign({},eM._sentryModuleMetadata[(new eM.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}function eC(e){return"/"===e[e.length-1]?e.slice(0,-1):e}var ek=e.i(957631);try{var eI="u">typeof window?window:e.g;eI._sentryModuleMetadata=eI._sentryModuleMetadata||{},eI._sentryModuleMetadata[(new eI.Error).stack]=Object.assign({},eI._sentryModuleMetadata[(new eI.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}var eT=e.i(9084),eR=e.i(204325),eA=e.i(438756),ex=e.i(927442),eO=e.i(644153),eN=e.i(152621),eD=e.i(516598),eP=e.i(181765),eL=e.i(949613),eF=e.i(392616),eW=e.i(527986),ej=e.i(192212),eB=e.i(63559),eU=e.i(6
255597);try{var ez="u">typeof window?window:e.g;ez._sentryModuleMetadata=ez._sentryModuleMetadata||{},ez._sentryModuleMetadata[(new ez.Error).stack]=Object.assign({},ez._sentryModuleMetadata[(new ez.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}let eH=eu.GLOBAL_OBJ,e$="sentryReplaySession",eq="Unable to send Replay";var eK=Object.defineProperty,eG=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?eK(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},eV=((p=eV||{})[p.Document=0]="Document",p[p.DocumentType=1]="DocumentType",p[p.Element=2]="Element",p[p.Text=3]="Text",p[p.CDATA=4]="CDATA",p[p.Comment=5]="Comment",p);function eY(e){let t=e?.host;return t?.shadowRoot===e}function eJ(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function eX(e){try{var t;let r=e.rules||e.cssRules;return r?((t=Array.from(r,eQ).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}}function eQ(e){let t;if("styleSheet"in e)try{t=eX(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(e){}else if("selectorText"in e){let t=e.cssText,r=e.selectorText.includes(":"),n="string"==typeof e.style.all&&e.style.all;if(n&&(t=function(e){let t="";for(let r=0;r<e.style.length;r++){let n=e.style,i=n[r],s=n.getPropertyPriority(i);t+=`${i}:${n.getPropertyValue(i)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),r&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),r||n)return t}return t||e.cssText}class eZ{constructor(){eG(this,"idNodeMap",new Map),eG(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function e0({maskInputOptions:e,tagName:t,type:r}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||"password"===r||"INPUT"===t&&!r&&e.text)}function e1({isMasked:e,element:t,value:r,maskInputFn:n}){let i=r||"";return e?(n&&(i=n(i,t)),"*".repeat(i.length)):i}function e2(e){return e.toLowerCase()}function e3(e){return e.toUpperCase()}let e5="__rrweb_original__";function e6(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?e2(t):null}function e8(e,t,r){return"INPUT"===t&&("radio"===r||"checkbox"===r)?e.getAttribute("value")||"":e.value}function e4(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}let n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return n?.[1]??null}let e7={};function e9(e){let t=e7[e];if(t)return t;let r=window.document,n=window[e];if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(e){}return e7[e]=n.bind(window)}function te(...e){return e9("setTimeout")(...e)}function tt(...e){return e9("clearTimeout")(...e)}function tr(e){try{return e.contentDocument}catch{}}let tn=1,ti=RegExp("[^a-z0-9-_:]");function ts(){return tn++}let to=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ta=/^(?:[a-z+]+:)?\/\//i,tl=/^www\..*/i,td=/^(data:)([^,]*),(.*)/i;function tc(e,t){return(e||"").replace(to,(e,r,n,i,s,o)=>{let a=n||s||o,l=r||i||"";if(!a)return e;if(ta.test(a)||tl.test(a)||td.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let d=t.split("/"),c=a.split("/");for(let e of(d.pop(),c))if("."===e)continue;else".."===e?d.pop():d.push(e);return`url(${l}${d.join("/")}${l})`})}let tu=/^[^ \t\n\r\u000c]+/,th=/^[, \t\n\r\u000c]+/,tp=new WeakMap;function tf(e,t){return t&&""!==t.trim()?tm(e,t):t}function tm(e,t){let r=tp.get(e);if(r||(r=e.createElement("a"),tp.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function tg(e,t,r,n,i,s,o){if(!n)return n;if("src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0])return tf(e,n);if("background"===r&&("table"===t||"td"===t||"th"===t))return tf(e,n);if("srcset"===r)return function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n,i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}let i=[];for(;n(th),!(r>=t.length);){let s=n(tu);if(","===s.slice(-1))s=tf(e,s.substring(0,s.length-1)),i.push(s);else{let n="";s=tf(e,s);let o=!1;for(;;){let e=t.charAt(r);if(""===e){i.push((s+n).trim());break}if(o)")"===e&&(o=!1);else if(","===e){r+=1,i.push((s+n).trim());break}else"("===e&&(o=!0);n+=e,r+=1}}}return i.join(", ")}(e,n);if("style"===r){let t=tc(n,tm(e));return o&&o.size>0&&(t=function(e,t){if(!e||0===t.size)return e;try{let r=e.split(";"),n=[];for(let e of r){if(!(e=e.trim()))continue;let r=e.indexOf(":");if(-1===r){n.push(e);continue}let i=e.slice(0,r).trim();t.has(i)||n.push(e)}return n.join("; ")+(n.length>0&&e.endsWith(";")?";":"")}catch(t){return console.warn("Error filtering CSS properties:",t),e}}(t,o)),t}else if("object"===t&&"data"===r)return tf(e,n);return"function"==typeof s?s(r,n,i):n}function ty(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function tv(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:tv(e.parentNode,t,r,n+1)}function tw(e,t){return r=>{if(null===r)return!1;try{if(e){if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}(r,e))return!0}if(t&&r.matches(t))return!0;return!1}catch{return!1}}}function tb(e,t,r,n,i,s){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){let e=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,l=-1;if(s){if((l=tv(o,tw(n,i)))<0)return!0;a=tv(o,tw(t,r),l>=0?l:1/0)}else{if((a=tv(o,tw(t,r)))<0)return!1;l=tv(o,tw(n,i),a>=0?a:1/0)}return a>=0?!(l>=0)||a<=l:!(l>=0)&&!!s}catch(e){}return!!s}function tE(e){return null==e?"":e.toLowerCase()}function tS(e,t){let i,{doc:s,mirror:o,blockClass:a,blockSelector:l,unblockSelector:d,maskAllText:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,skipChild:m=!1,inlineStylesheet:g=!0,maskInputOptions:y={},maskAttributeFn:v,maskTextFn:w,maskInputFn:b,slimDOMOptions:E,dataURLOptions:S={}
2,inlineImages:_=!1,recordCanvas:M=!1,onSerialize:C,onIframeLoad:k,iframeLoadTimeout:I=5e3,onBlockedImageLoad:T,onStylesheetLoad:R,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:O=!1,ignoreCSSAttributes:N}=t,{preserveWhiteSpace:D=!0}=t,P=function(e,t){let{doc:i,mirror:s,blockClass:o,blockSelector:a,unblockSelector:l,maskAllText:d,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:m,maskInputOptions:g={},maskTextFn:y,maskInputFn:v,dataURLOptions:w={},inlineImages:b,recordCanvas:E,keepIframeSrcFn:S,newlyAddedElement:_=!1,ignoreCSSAttributes:M}=t,C=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(i,s);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:eV.Document,childNodes:[],compatMode:e.compatMode};return{type:eV.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:eV.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return function(e,t){let i,{doc:s,blockClass:o,blockSelector:a,unblockSelector:l,inlineStylesheet:d,maskInputOptions:c={},maskAttributeFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y=!1,rootId:v,maskTextClass:w,unmaskTextClass:b,maskTextSelector:E,unmaskTextSelector:S,ignoreCSSAttributes:_}=t,M=function(e,t,r,n){try{if(n&&e.matches(n))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,o,a,l),C=function(e){if(e instanceof HTMLFormElement)return"form";let t=e2(e.tagName);return ti.test(t)?"div":t}(e),k={},I=e.attributes.length;for(let t=0;t<I;t++){let r=e.attributes[t];r.name&&!ty(C,r.name,r.value)&&(k[r.name]=tg(s,C,e2(r.name),r.value,e,u,_))}if("link"===C&&d){let t=Array.from(s.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=eX(t)),r&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=tc(r,t.href))}if("style"===C&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=eX(e.sheet);t&&(k._cssText=tc(t,tm(s)))}if("input"===C||"textarea"===C||"select"===C||"option"===C){let t=e6(e),r=e8(e,e3(C),t),n=e.checked;if("submit"!==t&&"button"!==t&&r){let n=tb(e,w,E,b,S,e0({type:t,tagName:e3(C),maskInputOptions:c}));k.value=e1({isMasked:n,element:e,value:r,maskInputFn:h})}n&&(k.checked=n)}if("option"===C&&(e.selected&&!c.select?k.selected=!0:delete k.selected),"canvas"===C&&m){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){let i=t.getImageData;if(new Uint32Array((e5 in i?i[e5]:i).call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(k.rr_dataURL=e.toDataURL(p.type,p.quality));else if(!("__context"in e)){let t=e.toDataURL(p.type,p.quality),r=s.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(p.type,p.quality)&&(k.rr_dataURL=t)}}if("img"===C&&f){r||(n=(r=s.createElement("canvas")).getContext("2d"));let t=e.currentSrc||e.getAttribute("src")||"<unknown-src>",i=e.crossOrigin,o=()=>{e.removeEventListener("load",o);try{r.width=e.naturalWidth,r.height=e.naturalHeight,n.drawImage(e,0,0),k.rr_dataURL=r.toDataURL(p.type,p.quality)}catch(r){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o);return}console.warn(`Cannot inline img src=${t}! Error: ${r}`)}"anonymous"===e.crossOrigin&&(i?k.crossOrigin=i:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if(("audio"===C||"video"===C)&&(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),!y&&(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),M){let{width:t,height:r}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==C||g(k.src)||(M||tr(e)||(k.rr_src=k.src),delete k.src);try{customElements.get(C)&&(i=!0)}catch(e){}return{type:eV.Element,tagName:C,attributes:k,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:M,rootId:v,isCustom:i}}(e,{doc:i,blockClass:o,blockSelector:a,unblockSelector:l,inlineStylesheet:m,maskAttributeFn:c,maskInputOptions:g,maskInputFn:v,dataURLOptions:w,inlineImages:b,recordCanvas:E,keepIframeSrcFn:S,newlyAddedElement:_,rootId:C,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,ignoreCSSAttributes:M});case e.TEXT_NODE:return function(e,t){let{maskAllText:r,maskTextClass:n,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:d,rootId:c}=t,u=e.parentNode&&e.parentNode.tagName,h=e.textContent,p="STYLE"===u||void 0,f="SCRIPT"===u||void 0,m="TEXTAREA"===u||void 0;if(p&&h){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(h=eX(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}h=tc(h,tm(t.doc))}f&&(h="SCRIPT_PLACEHOLDER");let g=tb(e,n,s,i,o,r);return p||f||m||!h||!g||(h=a?a(h,e.parentElement):h.replace(/[\S]/g,"*")),m&&h&&(l.textarea||g)&&(h=d?d(h,e.parentNode):h.replace(/[\S]/g,"*")),"OPTION"===u&&h&&(h=e1({isMasked:tb(e,n,s,i,o,e0({type:null,tagName:u,maskInputOptions:l})),element:e,value:h,maskInputFn:d})),{type:eV.Text,textContent:h||"",isStyle:p,rootId:c}}(e,{doc:i,maskAllText:d,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,maskTextFn:y,maskInputOptions:g,maskInputFn:v,rootId:C});case e.CDATA_SECTION_NODE:return{type:eV.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:eV.Comment,textContent:e.textContent||"",rootId:C};default:return!1}}(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,maskAllText:c,unblockSelector:d,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:g,maskInputOptions:y,maskAttributeFn:v,maskTextFn:w,maskInputFn:b,dataURLOptions:S,inlineImages:_,recordCanvas:M,keepIframeSrcFn:x,newlyAddedElement:O,ignoreCSSAttributes:N});if(!P)return console.warn(e,"not serialized"),null;i=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===eV.Comment)return!0;
2if(e.type===eV.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===e4(e.attributes.href)))return!0;else if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(tE(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===tE(e.attributes.name)||"icon"===tE(e.attributes.rel)||"apple-touch-icon"===tE(e.attributes.rel)||"shortcut icon"===tE(e.attributes.rel))))return!0;else if("meta"===e.tagName){if(t.headMetaDescKeywords&&tE(e.attributes.name).match(/^description|keywords$/))return!0;else if(t.headMetaSocial&&(tE(e.attributes.property).match(/^(og|twitter|fb):/)||tE(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===tE(e.attributes.name)))return!0;else if(t.headMetaRobots&&("robots"===tE(e.attributes.name)||"googlebot"===tE(e.attributes.name)||"bingbot"===tE(e.attributes.name)))return!0;else if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===tE(e.attributes.name)||"generator"===tE(e.attributes.name)||"framework"===tE(e.attributes.name)||"publisher"===tE(e.attributes.name)||"progid"===tE(e.attributes.name)||tE(e.attributes.property).match(/^article:/)||tE(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===tE(e.attributes.name)||"yandex-verification"===tE(e.attributes.name)||"csrf-token"===tE(e.attributes.name)||"p:domain_verify"===tE(e.attributes.name)||"verify-v1"===tE(e.attributes.name)||"verification"===tE(e.attributes.name)||"shopify-checkout-api-token"===tE(e.attributes.name)))return!0}}return!1}(P,E)&&(D||P.type!==eV.Text||P.isStyle||P.textContent.trim().length)?ts():-2;let L=Object.assign(P,{id:i});if(o.add(e,L),-2===i)return null;C&&C(e);let F=!m;if(L.type===eV.Element){F=F&&!L.needBlock;let t=e.shadowRoot;t&&eJ(t)&&(L.isShadowHost=!0)}if((L.type===eV.Document||L.type===eV.Element)&&F){E.headWhitespace&&L.type===eV.Element&&"head"===L.tagName&&(D=!1);let t={doc:s,mirror:o,blockClass:a,blockSelector:l,maskAllText:c,unblockSelector:d,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,skipChild:m,inlineStylesheet:g,maskInputOptions:y,maskAttributeFn:v,maskTextFn:w,maskInputFn:b,slimDOMOptions:E,dataURLOptions:S,inlineImages:_,recordCanvas:M,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:k,iframeLoadTimeout:I,onBlockedImageLoad:T,onStylesheetLoad:R,stylesheetLoadTimeout:A,keepIframeSrcFn:x,ignoreCSSAttributes:N};for(let r of e.childNodes?Array.from(e.childNodes):[]){let e=tS(r,t);e&&L.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let r of Array.from(e.shadowRoot.childNodes)){let n=tS(r,t);n&&(eJ(e.shadowRoot)&&(n.isShadow=!0),L.childNodes.push(n))}}if(e.parentNode&&eY(e.parentNode)&&eJ(e.parentNode)&&(L.isShadow=!0),L.type!==eV.Element||"iframe"!==L.tagName||L.needBlock||function(e,t,r){let n,i=function(e){try{return e.contentWindow}catch{}}(e);if(!i)return;let s=!1;try{n=i.document.readyState}catch(e){return}if("complete"!==n){let n=te(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{tt(n),s=!0,t()});return}let o="about:blank";if(i.location.href!==o||e.src===o||""===e.src)return te(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=tr(e);if(t&&k){let r=tS(t,{doc:t,mirror:o,blockClass:a,blockSelector:l,unblockSelector:d,maskAllText:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:g,maskInputOptions:y,maskAttributeFn:v,maskTextFn:w,maskInputFn:b,slimDOMOptions:E,dataURLOptions:S,inlineImages:_,recordCanvas:M,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:k,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:A,keepIframeSrcFn:x,ignoreCSSAttributes:N});r&&k(e,r)}},I),L.type===eV.Element&&"img"===L.tagName&&!e.complete&&L.needBlock){let t=()=>{if(e.isConnected&&!e.complete&&T)try{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&T(e,L,t)}catch(e){}e.removeEventListener("load",t)};e.isConnected&&e.addEventListener("load",t)}return L.type===eV.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===e4(L.attributes.href))&&function(e,t,r){let n,i=!1;try{n=e.sheet}catch(e){n=null}if(n)return;let s=te(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{tt(s),i=!0,t()})}(e,()=>{if(R){let t=tS(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,unblockSelector:d,maskAllText:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:g,maskInputOptions:y,maskAttributeFn:v,maskTextFn:w,maskInputFn:b,slimDOMOptions:E,dataURLOptions:S,inlineImages:_,recordCanvas:M,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:k,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:A,keepIframeSrcFn:x,ignoreCSSAttributes:N});t&&R(e,t)}},A),L.type===eV.Element&&delete L.needBlock,L}function t_(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}let tM="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",tC={map:{},getId:()=>(console.error(tM),-1),getNode:()=>(console.error(tM),null),removeNodeFromMap(){console.error(tM)},has:()=>(console.error(tM),!1),reset(){console.error(tM)}};function tk(e,t,r={}){let n=null,i=0;return function(...s){let o=Date.now();i||!1!==r.leading||(i=o);let a=t-(o-i),l=this;a<=0||a>t?(n&&(function(...e){tH("clearTimeout")(...e)}
2(n),n=null),i=o,e.apply(l,s)):n||!1===r.trailing||(n=t$(()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(l,s)},a))}}function tI(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}"u">typeof window&&window.Proxy&&window.Reflect&&(tC=new Proxy(tC,{get:(e,t,r)=>("map"===t&&console.error(tM),Reflect.get(e,t,r))}));let tT=Date.now;function tR(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function tA(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function tx(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function tO(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function tN(e,t,r,n,i){if(!e)return!1;let s=tO(e);if(!s)return!1;let o=tw(t,r);if(!i){let e=n&&s.matches(n);return o(s)&&!e}let a=tv(s,o),l=-1;return!(a<0)&&(n&&(l=tv(s,tw(null,n))),a>-1&&l<0||a<l)}function tD(e,t){return -2===t.getId(e)}function tP(e){return!!e.changedTouches}function tL(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function tF(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function tW(e){return!!e?.shadowRoot}/[1-9][0-9]{12}/.test(Date.now().toString())||(tT=()=>new Date().getTime());class tj{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function tB(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function tU(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let r=function(e){let t,r=e;for(;t=tB(r);)r=t;return r}(e);return t.contains(r)}(e))}let tz={};function tH(e){let t=tz[e];if(t)return t;let r=window.document,n=window[e];if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(e){}return tz[e]=n.bind(window)}function t$(...e){return tH("setTimeout")(...e)}var tq=((f=tq||{})[f.DomContentLoaded=0]="DomContentLoaded",f[f.Load=1]="Load",f[f.FullSnapshot=2]="FullSnapshot",f[f.IncrementalSnapshot=3]="IncrementalSnapshot",f[f.Meta=4]="Meta",f[f.Custom=5]="Custom",f[f.Plugin=6]="Plugin",f),tK=((m=tK||{})[m.Mutation=0]="Mutation",m[m.MouseMove=1]="MouseMove",m[m.MouseInteraction=2]="MouseInteraction",m[m.Scroll=3]="Scroll",m[m.ViewportResize=4]="ViewportResize",m[m.Input=5]="Input",m[m.TouchMove=6]="TouchMove",m[m.MediaInteraction=7]="MediaInteraction",m[m.StyleSheetRule=8]="StyleSheetRule",m[m.CanvasMutation=9]="CanvasMutation",m[m.Font=10]="Font",m[m.Log=11]="Log",m[m.Drag=12]="Drag",m[m.StyleDeclaration=13]="StyleDeclaration",m[m.Selection=14]="Selection",m[m.AdoptedStyleSheet=15]="AdoptedStyleSheet",m[m.CustomElement=16]="CustomElement",m),tG=((g=tG||{})[g.MouseUp=0]="MouseUp",g[g.MouseDown=1]="MouseDown",g[g.Click=2]="Click",g[g.ContextMenu=3]="ContextMenu",g[g.DblClick=4]="DblClick",g[g.Focus=5]="Focus",g[g.Blur=6]="Blur",g[g.TouchStart=7]="TouchStart",g[g.TouchMove_Departed=8]="TouchMove_Departed",g[g.TouchEnd=9]="TouchEnd",g[g.TouchCancel=10]="TouchCancel",g),tV=((y=tV||{})[y.Mouse=0]="Mouse",y[y.Pen=1]="Pen",y[y.Touch=2]="Touch",y),tY=((v=tY||{})[v.Play=0]="Play",v[v.Pause=1]="Pause",v[v.Seeked=2]="Seeked",v[v.VolumeChange=3]="VolumeChange",v[v.RateChange=4]="RateChange",v);let tJ=e=>i?(...t)=>{try{return e(...t)}catch(e){if(i&&!0===i(e))return()=>{};throw e}}:e;for(var tX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/",tQ="u"<typeof Uint8Array?[]:new Uint8Array(256),tZ=0;tZ<tX.length;tZ++)tQ[tX.charCodeAt(tZ)]=tZ;class t0{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function t1(e){try{return e.contentDocument}catch(e){}}function t2(e){try{return e.contentWindow}catch(e){}}class t3{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if("u"<typeof CSSStyleSheet||"function"!=typeof CSSStyleSheet.prototype.replaceSync)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let r=t.cssRules[0];if(!r||r.type!==CSSRule.STYLE_RULE)return null;return r.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement("span");return t.setAttribute("style",e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}class t5{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let t6=(e,t)=>`${e}@${t}`;class t8{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new t5,n=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{if(!i.parentNode||!tU(i))return;let s=eY(i.parentNode)?this.mirror.getId(tB(i)):this.mirror.getId(i.parentNode),o=n(i);if(-1===s||-1===o)return r.addNode(i);let a=tS(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{tL(e,this.mirror)&&!tN(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),tF(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),tW(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(tN(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let r=t2(e);r&&this.canvasManager.addWindow(r),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:r,height:n})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${r}px`,height:`${n}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(e.push({parentId:s,nextId:o,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!t7(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)t9(this.droppedSet,e)||t7(this.removes,e,this.mirror)?t9(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let s=null;for(;r.length;){let e=null;if(s){let t=this.mirror.getId(s.value.parentNode),r=n(s.value);-1!==t&&-1!==r&&(e=s)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(r.value.parentNode);
2if(-1===n(r.value))continue;if(-1!==t){e=r;break}{let t=r.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}s=e.previous,r.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!tD(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;tN(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:tb(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,tO(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){let r=e6(t),i=t.tagName;n=e8(t,i,r);let s=e0({maskInputOptions:this.maskInputOptions,tagName:i,type:r});n=e1({isMasked:tb(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:n,maskInputFn:this.maskInputFn})}if(tN(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(t1(t))return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
2,this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!ty(t.tagName,r)&&(i.attributes[r]=tg(this.doc,e2(t.tagName),e2(r),n,t,this.maskAttributeFn),"style"===r)){let r=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let n=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);n!==(r?.getPropertyValue(e)||"")||s!==(r?.getPropertyPriority(e)||"")?""===s?i.styleDiff[e]=n:i.styleDiff[e]=[n,s]:i._unchangedStyles[e]=[n,s]}if(r)for(let e of Array.from(r))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(tN(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),n=eY(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);tN(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||tD(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(t4(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function e(t,r){if(eY(t))return!1;let n=r.getId(t);return!r.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,r))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[t6(r,n)]?t4(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!!(eY(e.target)&&eJ(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(tD(e,this.mirror))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[t6(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!tN(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),tW(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new t3(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function t4(e,t){e.delete(t),t.childNodes?.forEach(t=>t4(e,t))}function t7(e,t,r){return 0!==e.length&&function(e,t,r){let n=t.parentNode;for(;n;){let t=r.getId(n);if(e.some(e=>e.id===t))return!0;n=n.parentNode}return!1}(e,t,r)}function t9(e,t){return 0!==e.size&&function e(t,r){let{parentNode:n}=r;return!!n&&(!!t.has(n)||e(t,n))}(e,t)}let re=[];function rt(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function rr(e,t){let r=new t8;re.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(n=window[i]);let s=new n(tJ(t=>{e.onMutation&&!1===e.onMutation(t)||r.processMutations.bind(r)(t)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function rn({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,sampling:o}){return t_("scroll",tJ(tk(tJ(o=>{let a=rt(o);if(!a||tN(a,n,i,s,!0))return;let l=r.getId(a);if(a===t&&t.defaultView){let r=tR(t.defaultView);e({id:l,x:r.left,y:r.top})}else e({id:l,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100)),t)}let ri=["INPUT","TEXTAREA","SELECT"],rs=new WeakMap;function ro(e){var t=[];if(rc("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||rc("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||rc("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||rc("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}function ra(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function rl({mirror:e,stylesheetManager:t},r){let n=null;n="#document"===r.nodeName?e.getId(r):e.getId(r.host);let i="#document"===r.nodeName?r.defaultView?.Document:r.ownerDocument?.defaultView?.ShadowRoot,s=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return null!==n&&-1!==n&&i&&s?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){let r=s.set?.call(this,e);if(null!==n&&-1!==n)try{t.adoptStyleSheets(e,n)}catch(e){}return r}}),tJ(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function rd(e,t={}){let r,n=e.doc.defaultView;if(!n)return()=>{};e.recordDOM&&(r=rr(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){let i;if(!1===t.mousemove)return()=>{};let s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=tk(tJ(t=>{let r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),o),d=tJ(tk(tJ(e=>{let t=rt(e),{clientX:r,clientY:s}=tP(e)?e.changedTouches[0]:e;i||(i=tT()),a.push({x:r,y:s,id:n.getId(t),timeOffset:tT()-i}),l("u">typeof DragEvent&&e instanceof DragEvent?tK.Drag:e instanceof MouseEvent?tK.MouseMove:tK.TouchMove)}),s,{trailing:!1})),c=[t_("mousemove",d,r),t_("touchmove",d,r),t_("drag",d,r)];return tJ(()=>
2{c.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,sampling:o}){if(!1===o.mouseInteraction)return()=>{};let a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,l=[],d=null;return Object.keys(tG).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(o=>{let a=e2(o),c=t=>{let a=rt(t);if(tN(a,n,i,s,!0))return;let l=null,c=o;if("pointerType"in t){switch(t.pointerType){case"mouse":l=tV.Mouse;break;case"touch":l=tV.Touch;break;case"pen":l=tV.Pen}l===tV.Touch?tG[o]===tG.MouseDown?c="TouchStart":tG[o]===tG.MouseUp&&(c="TouchEnd"):tV.Pen}else tP(t)&&(l=tV.Touch);null!==l?(d=l,(c.startsWith("Touch")&&l===tV.Touch||c.startsWith("Mouse")&&l===tV.Mouse)&&(l=null)):tG[o]===tG.Click&&(l=d,d=null);let u=tP(t)?t.changedTouches[0]:t;if(!u)return;let h=r.getId(a),{clientX:p,clientY:f}=u;tJ(e)({type:tG[c],id:h,x:p,y:f,...null!==l&&{pointerType:l}})};if(window.PointerEvent)switch(tG[o]){case tG.MouseDown:case tG.MouseUp:a=a.replace("mouse","pointer");break;case tG.TouchStart:case tG.TouchEnd:return}l.push(t_(a,c,t))}),tJ(()=>{l.forEach(e=>e())})}(e),o=rn(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return t_("resize",tJ(tk(tJ(()=>{let t=tA(),i=tx();(r!==t||n!==i)&&(e({width:Number(i),height:Number(t)}),r=t,n=i)}),200)),t)}(e,{win:n}),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:d,sampling:c,userTriggeredOnInput:u,maskTextClass:h,unmaskTextClass:p,maskTextSelector:f,unmaskTextSelector:m}){function g(e){let r=rt(e),c=e.isTrusted,g=r&&e3(r.tagName);if("OPTION"===g&&(r=r.parentElement),!r||!g||0>ri.indexOf(g)||tN(r,n,i,s,!0))return;let v=r;if(v.classList.contains(o)||a&&v.matches(a))return;let w=e6(r),b=e8(v,g,w),E=!1,S=e0({maskInputOptions:l,tagName:g,type:w}),_=tb(r,h,f,p,m,S);("radio"===w||"checkbox"===w)&&(E=r.checked),b=e1({isMasked:_,element:r,value:b,maskInputFn:d}),y(r,u?{text:b,isChecked:E,userTriggered:c}:{text:b,isChecked:E});let M=r.name;"radio"===w&&M&&E&&t.querySelectorAll(`input[type="radio"][name="${M}"]`).forEach(e=>{if(e!==r){let t=e1({isMasked:_,element:e,value:e8(e,g,w),maskInputFn:d});y(e,u?{text:t,isChecked:!E,userTriggered:!1}:{text:t,isChecked:!E})}})}function y(t,n){let i=rs.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){rs.set(t,n);let i=r.getId(t);tJ(e)({...n,id:i})}}let v=("last"===c.input?["change"]:["input","change"]).map(e=>t_(e,tJ(g),t)),w=t.defaultView;if(!w)return()=>{v.forEach(e=>e())};let b=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value"),E=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&v.push(...E.map(e=>(function e(t,r,n,i,s=window){let o=s.Object.getOwnPropertyDescriptor(t,r);return s.Object.defineProperty(t,r,i?n:{set(e){t$(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,r,o||{},!0)})(e[0],e[1],{set(){tJ(g)({target:this,isTrusted:!1})}},!1,w))),tJ(()=>{v.forEach(e=>e())})}(e),d=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:i,sampling:s,doc:o}){let a=tJ(o=>tk(tJ(s=>{let a=rt(s);if(!a||tN(a,t,r,n,!0))return;let{currentTime:l,volume:d,muted:c,playbackRate:u}=a;e({type:o,id:i.getId(a),currentTime:l,volume:d,muted:c,playbackRate:u})}),s.media||500)),l=[t_("play",a(tY.Play),o),t_("pause",a(tY.Pause),o),t_("seeked",a(tY.Seeked),o),t_("volumechange",a(tY.VolumeChange),o),t_("ratechange",a(tY.RateChange),o)];return tJ(()=>{l.forEach(e=>e())})}(e),c=()=>{},u=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){let i,s;if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:tJ((n,i,s)=>{let[o,a]=s,{id:l,styleId:d}=ra(i,t,r.styleMirror);return(l&&-1!==l||d&&-1!==d)&&e({id:l,styleId:d,adds:[{rule:o,index:a}]}),n.apply(i,s)})});let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:tJ((n,i,s)=>{let[o]=s,{id:a,styleId:l}=ra(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),n.apply(i,s)})}),n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:tJ((n,i,s)=>{let[o]=s,{id:a,styleId:l}=ra(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),n.apply(i,s)})})),n.CSSStyleSheet.prototype.replaceSync&&(s=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:tJ((n,i,s)=>{let[o]=s,{id:a,styleId:l}=ra(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),n.apply(i,s)})}));let l={};ru("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(ru("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),ru("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),ru("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let d={};return Object.entries(l).forEach(([n,i])=>{d[n]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(d[n].insertRule,{apply:tJ((n,i,s)=>{let[o,a]=s,{id:l,styleId:d}=ra(i.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||d&&-1!==d)&&e({id:l,styleId:d,adds:[{rule:o,index:[...ro(i),a||0]}]}),n.apply(i,s)})}),i.prototype.deleteRule=new Proxy(d[n].deleteRule,{apply:tJ((n,i,s)=>{let[o]=s,{id:a,styleId:l}=ra(i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...ro(i),o]}]}),n.apply(i,s)})})}),tJ(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=a,i&&(n.CSSStyleSheet.prototype.replace=i),s&&(n.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=d[e].insertRule,t.prototype.deleteRule=d[e].deleteRule})})}(e,{win:n}),u=rl(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:tJ((i,o,a)=>{let[l,d,c]=a;if(r.has(l))return s.apply(o,[l,d,c]);let{id:u,styleId:h}=ra(o.parentRule?.parentStyleSheet,t,n.styleMirror);return(u&&-1!==u||h&&-1!==h)&&e({id:u,styleId:h,set:{property:l,value:d,priority:c},index:ro(o.parentRule)}),i.apply(o,a)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:tJ((i,s,a)=>{let[l]=a;if(r.has(l))return o.apply(s,[l]);let{id:d,styleId:c}=ra(s.parentRule?.parentStyleSheet,t,n.styleMirror);return(d&&-1!==d||c&&-1!==c)&&e({id:d,styleId:c,remove:{property:l},index:ro(s.parentRule)}),i.apply(s,a)})}),tJ(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:n}),e.collectFonts&&(p=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,r){let n=new s(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};let o=tI(t.fonts,"add",function(t){return function(r){return t$(tJ(()=>{let t=i.get(r);t&&(e(t),i.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=s}
2),n.push(o),tJ(()=>{n.forEach(e=>e())})}(e)));let f=function(e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,selectionCb:o}=e,a=!0,l=tJ(()=>{let e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;let l=[],d=e.rangeCount||0;for(let t=0;t<d;t++){let{startContainer:o,startOffset:a,endContainer:d,endOffset:c}=e.getRangeAt(t);tN(o,n,i,s,!0)||tN(d,n,i,s,!0)||l.push({start:r.getId(o),startOffset:a,end:r.getId(d),endOffset:c})}o({ranges:l})});return l(),t_("selectionchange",l)}(e),m=function({doc:e,customElementCb:t}){let r=e.defaultView;return r&&r.customElements?tI(r.customElements,"define",function(e){return function(r,n,i){try{t({define:{name:r}})}catch(e){}return e.apply(this,[r,n,i])}}):()=>{}}(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return tJ(()=>{re.forEach(e=>e.reset()),r?.disconnect(),i(),s(),o(),a(),l(),d(),c(),u(),h(),p(),f(),m(),g.forEach(e=>e())})}function rc(e){return void 0!==window[e]}function ru(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class rh{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,r,n){let i=r||this.getIdToRemoteIdMap(e),s=n||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),s.set(o,t)),o}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let i=n.get(t);return i||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class rp{constructor(){this.crossOriginIframeMirror=new rh(ts),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class rf{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new rh(ts),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new rh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);let t=t2(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t2(e)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);let r=t1(e);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let r=this.transformCrossOriginEvent(t,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case tq.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:tq.IncrementalSnapshot,data:{source:tK.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case tq.Meta:case tq.Load:case tq.DomContentLoaded:break;case tq.Plugin:return t;case tq.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case tq.IncrementalSnapshot:switch(t.data.source){case tK.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}
2),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case tK.Drag:case tK.TouchMove:case tK.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case tK.ViewportResize:return!1;case tK.MediaInteraction:case tK.MouseInteraction:case tK.Scroll:case tK.CanvasMutation:case tK.Input:return this.replaceIds(t.data,e,["id"]),t;case tK.StyleSheetRule:case tK.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case tK.Font:return t;case tK.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case tK.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(let i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===eV.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class rm{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class rg{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!eJ(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let r=rr({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(rn({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),t$(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(rl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=t1(e),r=t2(e);t&&r&&this.patchAttachShadow(r.Element,t)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(tI(e.prototype,"attachShadow",function(e){return function(n){let i=e.call(this,n);return this.shadowRoot&&tU(this)&&r.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class ry{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new tj,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let r={id:t,styleIds:[]},n=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:eQ(e),index:t}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class rv{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){tH("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}
2try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let rw=new eZ;function rb(e={}){let t,{emit:r,checkoutEveryNms:n,checkoutEveryNth:a,blockClass:l="rr-block",blockSelector:d=null,unblockSelector:c=null,ignoreClass:u="rr-ignore",ignoreSelector:h=null,maskAllText:p=!1,maskTextClass:f="rr-mask",unmaskTextClass:m=null,maskTextSelector:g=null,unmaskTextSelector:y=null,inlineStylesheet:v=!0,maskAllInputs:w,maskInputOptions:b,slimDOMOptions:E,maskAttributeFn:S,maskInputFn:_,maskTextFn:M,maxCanvasSize:C=null,packFn:k,sampling:I={},dataURLOptions:T={},mousemoveWait:R,recordDOM:A=!0,recordCanvas:x=!1,recordCrossOriginIframes:O=!1,recordAfter:N="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:P=!1,inlineImages:L=!1,plugins:F,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:j=new Set([]),errorHandler:B,onMutation:U,getCanvasManager:z}=e;i=B;let H=!O||window.parent===window,$=!1;if(!H)try{window.parent.document&&($=!1)}catch(e){$=!0}if(H&&!r)throw Error("emit function is required");if(!H&&!$)return()=>{};void 0!==R&&void 0===I.mousemove&&(I.mousemove=R),rw.reset();let q=!0===w?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==b?b:{},K=!0===E||"all"===E?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===E,headMetaDescKeywords:"all"===E}:E||{};!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode)return!1})}();let G=0,V=e=>{for(let t of F||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!$&&(e=k(e)),e};s=(e,i)=>{if(e.timestamp=tT(),re[0]?.isFrozen()&&e.type!==tq.FullSnapshot&&(e.type!==tq.IncrementalSnapshot||e.data.source!==tK.Mutation)&&re.forEach(e=>e.unfreeze()),H)r?.(V(e),i);else if($){let t={type:"rrweb",event:V(e),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(e.type===tq.FullSnapshot)t=e,G=0;else if(e.type===tq.IncrementalSnapshot){if(e.data.source===tK.Mutation&&e.data.isAttachIframe)return;G++;let r=a&&G>=a,i=n&&t&&e.timestamp-t.timestamp>n;(r||i)&&en(!0)}};let Y=e=>{s({type:tq.IncrementalSnapshot,data:{source:tK.Mutation,...e}})},J=e=>s({type:tq.IncrementalSnapshot,data:{source:tK.Scroll,...e}}),X=e=>s({type:tq.IncrementalSnapshot,data:{source:tK.CanvasMutation,...e}}),Q=new ry({mutationCb:Y,adoptedStyleSheetCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.AdoptedStyleSheet,...e}})}),Z="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new rp:new rf({mirror:rw,mutationCb:Y,stylesheetManager:Q,recordCrossOriginIframes:O,wrappedEmit:s});for(let e of F||[])e.getMirror&&e.getMirror({nodeMirror:rw,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});let ee=new rv,et=function(e,t){try{return e?e(t):new t0}catch{return console.warn("Unable to initialize CanvasManager"),new t0}}(z,{mirror:rw,win:window,mutationCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.CanvasMutation,...e}}),recordCanvas:x,blockClass:l,blockSelector:d,unblockSelector:c,maxCanvasSize:C,sampling:I.canvas,dataURLOptions:T,errorHandler:B}),er="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new rm:new rg({mutationCb:Y,scrollCb:J,bypassOptions:{onMutation:U,blockClass:l,blockSelector:d,unblockSelector:c,maskAllText:p,maskTextClass:f,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:y,inlineStylesheet:v,maskInputOptions:q,dataURLOptions:T,maskAttributeFn:S,maskTextFn:M,maskInputFn:_,recordCanvas:x,inlineImages:L,sampling:I,slimDOMOptions:K,iframeManager:Z,stylesheetManager:Q,canvasManager:et,keepIframeSrcFn:W,processedNodeManager:ee,ignoreCSSAttributes:j},mirror:rw}),en=(e=!1)=>
2{if(!A)return;s({type:tq.Meta,data:{href:window.location.href,width:tx(),height:tA()}},e),Q.reset(),er.init(),re.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new eZ,blockClass:n="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:d=null,unmaskTextSelector:c=null,inlineStylesheet:u=!0,inlineImages:h=!1,recordCanvas:p=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:v=!1,dataURLOptions:w,preserveWhiteSpace:b,onSerialize:E,onIframeLoad:S,iframeLoadTimeout:_,onBlockedImageLoad:M,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:I=()=>!1,ignoreCSSAttributes:T=new Set([])}=t||{};return tS(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:w,inlineImages:h,recordCanvas:p,preserveWhiteSpace:b,onSerialize:E,onIframeLoad:S,iframeLoadTimeout:_,onBlockedImageLoad:M,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:I,newlyAddedElement:!1,ignoreCSSAttributes:T})}(document,{mirror:rw,blockClass:l,blockSelector:d,unblockSelector:c,maskAllText:p,maskTextClass:f,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:y,inlineStylesheet:v,maskAllInputs:q,maskAttributeFn:S,maskInputFn:_,maskTextFn:M,slimDOM:K,dataURLOptions:T,recordCanvas:x,inlineImages:L,onSerialize:e=>{tL(e,rw)&&Z.addIframe(e),tF(e,rw)&&Q.trackLinkElement(e),tW(e)&&er.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t);let r=t2(e);r&&et.addWindow(r),er.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Q.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:r,height:n})=>{Y({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${r}px`,height:`${n}px`}}}]})},keepIframeSrcFn:W,ignoreCSSAttributes:j});if(!t)return console.warn("Failed to snapshot the document");s({type:tq.FullSnapshot,data:{node:t,initialOffset:tR(window)}}),re.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Q.adoptStyleSheets(document.adoptedStyleSheets,rw.getId(document))};o=en;try{let e=[],t=e=>tJ(rd)({onMutation:U,mutationCb:Y,mousemoveCb:(e,t)=>s({type:tq.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.MouseInteraction,...e}}),scrollCb:J,viewportResizeCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.ViewportResize,...e}}),inputCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.Input,...e}}),mediaInteractionCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.MediaInteraction,...e}}),styleSheetRuleCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.StyleSheetRule,...e}}),styleDeclarationCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.StyleDeclaration,...e}}),canvasMutationCb:X,fontCb:e=>s({type:tq.IncrementalSnapshot,data:{source:tK.Font,...e}}),selectionCb:e=>{s({type:tq.IncrementalSnapshot,data:{source:tK.Selection,...e}})},customElementCb:e=>{s({type:tq.IncrementalSnapshot,data:{source:tK.CustomElement,...e}})},blockClass:l,ignoreClass:u,ignoreSelector:h,maskAllText:p,maskTextClass:f,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:y,maskInputOptions:q,inlineStylesheet:v,sampling:I,recordDOM:A,recordCanvas:x,inlineImages:L,userTriggeredOnInput:D,collectFonts:P,doc:e,maskAttributeFn:S,maskInputFn:_,maskTextFn:M,keepIframeSrcFn:W,blockSelector:d,unblockSelector:c,slimDOMOptions:K,dataURLOptions:T,mirror:rw,iframeManager:Z,stylesheetManager:Q,shadowDomManager:er,processedNodeManager:ee,canvasManager:et,ignoreCSSAttributes:j,plugins:F?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>s({type:tq.Plugin,data:{plugin:e.name,payload:t}}
2)}))||[]},{});Z.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{en(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(t_("DOMContentLoaded",()=>{s({type:tq.DomContentLoaded,data:{}}),"DOMContentLoaded"===N&&r()})),e.push(t_("load",()=>{s({type:tq.Load,data:{}}),"load"===N&&r()},window))),()=>{e.forEach(e=>e()),ee.destroy(),o=void 0,i=void 0}}catch(e){console.warn(e)}}function rE(e){return e>0x2540be3ff?e:1e3*e}function rS(e){return e>0x2540be3ff?e/1e3:e}function r_(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:tq.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,eh.normalize)(t,10,1e3)}}),"console"===t.category)))}function rM(e){return e.closest("button,a")||e}function rC(e){let t=rk(e);return t&&t instanceof Element?rM(t):t}function rk(e){var t;return(t=e,(0,ep.isObjectLike)(t)&&"target"in t)?e.target:e}rb.mirror=rw,rb.takeFullSnapshot=function(e){if(!o)throw Error("please take full snapshot after start recording");o(e)},(w=S||(S={}))[w.NotStarted=0]="NotStarted",w[w.Running=1]="Running",w[w.Stopped=2]="Stopped";let rI=new Set([tK.Mutation,tK.StyleSheetRule,tK.StyleDeclaration,tK.AdoptedStyleSheet,tK.CanvasMutation,tK.Selection,tK.MediaInteraction]);class rT{constructor(e,t,r=r_){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){var e;let t=(e=()=>{this._lastMutation=rA()},a||(a=[],(0,ef.fill)(eH,"open",function(e){return function(...t){if(a)try{a.forEach(e=>e())}catch{}return e.apply(eH,t)}})),a.push(e),()=>{let t=a?a.indexOf(e):-1;t>-1&&a.splice(t,1)});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){var r,n,i;if(r=t,n=this._ignoreSelector,!rR.includes(r.tagName)||"INPUT"===r.tagName&&!["submit","button"].includes(r.getAttribute("type")||"")||"A"===r.tagName&&(r.hasAttribute("download")||r.hasAttribute("target")&&"_self"!==r.getAttribute("target"))||n&&r.matches(n)||!((i=e).data&&"number"==typeof i.data.nodeId&&i.timestamp))return;let s={timestamp:rS(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===s.node&&1>Math.abs(e.timestamp-s.timestamp))||(this._clicks.push(s),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=rS(e)}registerScroll(e=Date.now()){this._lastScroll=rS(e)}registerClick(e){let t=rM(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=rA();for(let r of(this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=t&&e.push(r)}),e)){let e=this._clicks.indexOf(r);e>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,n=e.mutationAfter&&e.mutationAfter<=this._threshold,{clickCount:i,clickBreadcrumb:s}=e;if(!r&&!n){let r=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),n=r<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:{...s.data,url:eH.location.href,route:t.getCurrentRoute(),timeAfterClickMs:r,endReason:n,clickCount:i||1}};this._addBreadcrumbEvent(t,o);return}if(i>1){let e={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:{...s.data,url:eH.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=(0,eD.setTimeout)(()=>this._checkClicks(),1e3)}}let rR=["A","BUTTON","INPUT"];function rA(){return Date.now()/1e3}function rx(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var rO=((b=rO||{})[b.Document=0]="Document",b[b.DocumentType=1]="DocumentType",b[b.Element=2]="Element",b[b.Text=3]="Text",b[b.CDATA=4]="CDATA",b[b.Comment=5]="Comment",b);let rN=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),rD=new Set([...rN,"data-sentry-element"]);function rP(e,t){let r=rb.mirror.getId(e),n=r&&rb.mirror.getNode(r),i=n&&rb.mirror.getMeta(n),s=i&&i.type===rO.Element?i:null;return{message:t,data:s?{nodeId:r,node:{id:r,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>
2e.type===rO.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:function(e){let t={};for(let r in e)if(rN.has(r)){let n=r;("data-testid"===r||"data-test-id"===r)&&(n="testId"),t[n]=e[r]}return!t["data-sentry-component"]&&e["data-sentry-element"]&&(t["data-sentry-component"]=e["data-sentry-element"]),t}(s.attributes)}}:{}}}let rL={resource:function(e){let{entryType:t,initiatorType:r,name:n,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:d}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:rj(s),end:rj(i),name:n,data:{size:d,statusCode:l,decodedBodySize:o,encodedBodySize:a}}},paint:function(e){let{duration:t,entryType:r,name:n,startTime:i}=e,s=rj(i);return{type:r,name:n,start:s,end:s+t,data:void 0}},navigation:function(e){let{entryType:t,name:r,decodedBodySize:n,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:d,loadEventStart:c,loadEventEnd:u,redirectCount:h,startTime:p,transferSize:f,type:m}=e;return 0===i?null:{type:`${t}.${m}`,start:rj(p),end:rj(s),name:r,data:{size:f,decodedBodySize:n,encodedBodySize:o,duration:i,domInteractive:d,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:u,domComplete:s,redirectCount:h}}}};function rF(e,t){return({metric:r})=>void t.replayPerformanceEntries.push(e(r))}function rW(e){let t=rL[e.entryType];return t?t(e):null}function rj(e){return(((0,em.browserPerformanceTimeOrigin)()||eH.performance.timeOrigin)+e)/1e3}function rB(e){let t=e.entries[e.entries.length-1];return rH(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function rU(e){let t=[],r=[];for(let n of e.entries)if(void 0!==n.sources){let e=[];for(let t of n.sources)if(t.node){r.push(t.node);let n=rb.mirror.getId(t.node);n&&e.push(n)}t.push({value:n.value,nodeIds:e.length?e:void 0})}return rH(e,"cumulative-layout-shift",r,t)}function rz(e){let t=e.entries[e.entries.length-1];return rH(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function rH(e,t,r,n){let i=e.value,s=e.rating,o=rj(i);return{type:"web-vital",name:t,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:r?r.map(e=>rb.mirror.getId(e)):void 0,attributions:n}}}let r$="u"<typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,rq=["log","warn","error"],rK="[Replay] ";function rG(e,t="info"){(0,ew.addBreadcrumb)({category:"console",data:{logger:"replay"},level:t,message:`${rK}${e}`},{level:t})}let rV=(l=!1,d=!1,c={exception:()=>void 0,infoTick:()=>void 0,setConfig:e=>{l=!!e.captureExceptions,d=!!e.traceInternals}},r$?(rq.forEach(e=>{c[e]=(...t)=>{eg.debug[e](rK,...t),d&&rG(t.join(""),(0,ey.severityLevelFromString)(e))}}),c.exception=(e,...t)=>{t.length&&c.error&&c.error(...t),eg.debug.error(rK,e),l?(0,ev.captureException)(e,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):d&&rG(e,"error")},c.infoTick=(...e)=>{eg.debug.log(rK,...e),d&&setTimeout(()=>rG(e[0]),0)}):rq.forEach(e=>{c[e]=()=>void 0}),c);class rY extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class rJ extends Error{constructor(){super("Worker destroyed")}}class rX{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new rY;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(null===e||t<e)&&(e=t);return null===e?e:rE(e)}}class rQ{constructor(e){this._onMessage=({data:e})=>{if("number"!=typeof e.id)return;let t=this._pending.get(e.id);if(t&&t.method===e.method){if(this._pending.delete(e.id),!e.success){r$&&rV.error("Error in compression worker: ",e.response),t.reject(Error("Error in compression worker"));return}t.resolve(e.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>
2{this._worker.addEventListener("message",({data:r})=>{r.success?e():(r$&&rV.warn("Received worker message with unsuccessful status",r),t(Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",e=>{r$&&rV.warn("Failed to load Replay compression worker",e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})})),this._ensureReadyPromise}destroy(){r$&&rV.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(e=>e.reject(new rJ)),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let r=this._getAndIncrementId();return new Promise((n,i)=>{this._pending.set(r,{method:e,resolve:n,reject:i});try{this._worker.postMessage({id:r,method:e,arg:t})}catch(e){this._pending.delete(r),i(e)}})}_getAndIncrementId(){return this._id++}}class rZ{constructor(e){this._worker=new rQ(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=rE(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let r=JSON.stringify(e);return(this._totalSize+=r.length,this._totalSize>2e7)?Promise.reject(new rY):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{r$&&rV.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){let e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class r0{constructor(e){this._fallback=new rX,this._compression=new rZ(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){r$&&rV.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:r}=this._fallback,n=[];for(let t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(n),this._fallback.clear()}catch(e){if(e instanceof rJ)return;r$&&rV.exception(e,"Failed to add events when switching buffers.")}}}function r1(){try{return"sessionStorage"in eH&&!!eH.sessionStorage}catch{return!1}}function r2(e){return void 0!==e&&Math.random()<e}function r3(e){if(r1())try{eH.sessionStorage.setItem(e$,JSON.stringify(e))}catch{}}function r5(e){let t=Date.now(),r=e.id||(0,eb.uuid4)(),n=e.started||t,i=e.lastActivity||t,s=e.segmentId||0,o=e.sampled;return{id:r,started:n,lastActivity:i,segmentId:s,sampled:o,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function r6({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){let i=r5({sampled:r2(e)?"session":!!t&&"buffer",previousSessionId:n});return r&&r3(i),i}function r8(e,t,r=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=r}function r4(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!!function(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return r8(e.started,t,n)||r8(e.lastActivity,r,n)}(e,{sessionIdleExpire:t,maxReplayDuration:r})&&("buffer"!==e.sampled||0!==e.segmentId)}function r7({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){let i=n.stickySession&&function(){if(!r1())return null;try{let e=eH.sessionStorage.getItem(e$);if(!e)return null;let t=JSON.parse(e);return r$&&rV.infoTick("Loading existing session"),r5(t)}catch{return null}}();return i?r4(i,{sessionIdleExpire:e,maxReplayDuration:t})?(r$&&rV.infoTick("Session in sessionStorage is expired, creating new one..."),r6(n,{previousSessionId:i.id})):i:(r$&&rV.infoTick("Creating new session"),r6(n,{previousSessionId:r}))}function r9(e,t,r){return!!nt(e,t)&&(ne(e,t,r),!0)}async function ne(e,t,r){let{eventBuffer:n}=e;if(!n||n.waitForCheckout&&!r)return null;let i="buffer"===e.recordingMode;try{r&&i&&n.clear(),r&&(n.hasCheckout=!0,n.waitForCheckout=!1);let s=e.getOptions(),o=function(e,t){try{if("function"==typeof t&&e.type===tq.Custom)return t(e)}catch(e){return r$&&rV.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,s.beforeAddRecordingEvent);if(!o)return;return await n.addEvent(o)}catch(s){if(!e.isEnabled())return e.handleException(s),null;let t=s&&s instanceof rY,r=(0,M.getClient)();if(r&&r.recordDroppedEvent(t?"buffer_overflow":"internal_sdk_error","replay"),t&&i)return n.clear(),n.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:t?"eventBufferOverflow":"eventBufferError"})}}
2function nt(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let r=rE(t.timestamp);return!(r+e.timeouts.sessionIdlePause<Date.now())&&(!(r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(r$&&rV.infoTick(`Skipping event with timestamp ${r} because it is after maxReplayDuration`),!1))}function nr(e,t,r){let n=e.getContext();t&&n.traceIds.size<100&&n.traceIds.add(t),r&&n.segmentNames.size<100&&n.segmentNames.add(r)}function nn(e){return"transaction"===e.type}function ni(e){return"feedback"===e.type}function ns(e){return!!e.category}function no(){let e=(0,M.getCurrentScope)().getPropagationContext().dsc;e&&delete e.replay_id;let t=(0,eE.getActiveSpan)();if(t){let e=(0,eS.getDynamicSamplingContextFromSpan)(t);delete e.replay_id}}function na(e){let t=(0,M.getCurrentScope)().getPropagationContext().dsc;t&&(t.replay_id=e);let r=(0,eE.getActiveSpan)();r&&((0,eS.getDynamicSamplingContextFromSpan)(r).replay_id=e)}function nl(e,t){return t.map(({type:t,start:r,end:n,name:i,data:s})=>{let o=e.throttledAddEvent({type:tq.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:r,endTimestamp:n,data:s}}});return"string"==typeof o?Promise.resolve(null):o})}function nd(e,t){e.isEnabled()&&null!==t&&!function(e,t){var r,n,i,s,o,a,l;let d,c,u;if(r$&&e.getOptions()._experiments.traceInternals)return!1;return r=(0,M.getClient)(),d=r?.getDsn(),c=r?.getOptions().tunnel,n=t,i=d,!(!(u=(0,e_.parseStringToURLObject)(n))||(0,e_.isURLObjectRelative)(u))&&!!i&&(s=u.hostname,s===(o=i.host)||o.length>0&&s.endsWith(`.${o}`))&&/(^|&|\?)sentry_key=/.test(u.search)||(a=t,!!(l=c)&&eC(a)===eC(l))}(e,t.name)&&e.addUpdate(()=>(nl(e,[t]),!0))}function nc(e){if(!e)return;let t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let r=(0,eW.serializeFormData)(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function nu(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function nh(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let r={...e._meta},n=r.warnings||[];return r.warnings=[...n,t],e._meta=r,e}function np(e,t){if(!t)return null;let{startTimestamp:r,endTimestamp:n,url:i,method:s,statusCode:o,request:a,response:l}=t;return{type:e,start:r/1e3,end:n/1e3,name:i,data:{method:s,statusCode:o,request:a,response:l}}}function nf(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function nm(e,t,r){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};let n={headers:e,size:t},{body:i,warnings:s}=function(e){var t;let r,n;if(!e||"string"!=typeof e)return{body:e};let i=e.length>15e4,s=(r=(t=e)[0],n=t[t.length-1],"["===r&&"]"===n||"{"===r&&"}"===n);if(i){let t=e.slice(0,15e4);return s?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(s)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(r);return n.body=i,s?.length&&(n._meta={warnings:s}),n}function ng(e,t){return Object.entries(e).reduce((r,[n,i])=>{let s=n.toLowerCase();return t.includes(s)&&e[n]&&(r[s]=i),r},{})}function ny(e,t){let r=function(e,t=eH.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(eH.location.origin))return e;let r=new URL(e,t);if(r.origin!==new URL(t).origin)return e;let n=r.href;return!e.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}(e);return(0,ek.stringMatchesSomePattern)(r,t)}async function nv(e,t,r){try{let n=await nw(e,t,r),i=np("resource.fetch",n);nd(r.replay,i)}catch(e){r$&&rV.exception(e,"Failed to capture fetch breadcrumb")}}async function nw(e,t,r){let n=Date.now(),{startTimestamp:i=n,endTimestamp:s=n}=t,{url:o,method:a,status_code:l=0,request_body_size:d,response_body_size:c}=e.data,u=ny(o,r.networkDetailAllowUrls)&&!ny(o,r.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:s,url:o,method:a,statusCode:l,request:u?function({networkCaptureBodies:e,networkRequestHeaders:t},r,n){var i,s;let o=r?(i=r,s=t,1===i.length&&"string"!=typeof i[0]?n_(i[0],s):2===i.length?n_(i[1],s):{}):{};if(!e)return nm(o,n,void 0);let a=(0,eW.getFetchRequestArgBody)(r),[l,d]=(0,eW.getBodyString)(a,rV),c=nm(o,n,l);return d?nh(c,d):c}(r,t.input,d):nf(d),response:await nb(u,r,t.response,c)}}async function nb(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,i){if(!e&&void 0!==i)return nf(i);let s=n?nS(n.headers,r):{};if(!n||!t&&void 0!==i)return nm(s,i,void 0);let[o,a]=await nE(n),l=function(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:i}){try{let s=e?.length&&void 0===r?nc(e):r;if(!n)return nf(s);if(t)return nm(i,s,e);return nm(i,s,void 0)}catch(e){return r$&&rV.exception(e,"Failed to serialize response body"),nm(i,r,void 0)}}(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:s});return a?nh(l,a):l}async function nE(e){let t=function(e){try{return e.clone()}catch(e){r$&&rV.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{var r;return[await (r=t,new Promise((e,t)=>
2{let n=(0,eD.setTimeout)(()=>t(Error("Timeout while trying to read response body")),500);nM(r).then(t=>e(t),e=>t(e)).finally(()=>clearTimeout(n))}))]}catch(e){if(e instanceof Error&&e.message.indexOf("Timeout")>-1)return r$&&rV.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"];return r$&&rV.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"]}}function nS(e,t){let r={};return t.forEach(t=>{e.get(t)&&(r[t]=e.get(t))}),r}function n_(e,t){if(!e)return{};let r=e.headers;return r?r instanceof Headers?nS(r,t):Array.isArray(r)?{}:ng(r,t):{}}async function nM(e){return e.text()}async function nC(e,t,r){try{let n=function(e,t,r){let n=Date.now(),{startTimestamp:i=n,endTimestamp:s=n,input:o,xhr:a}=t,{url:l,method:d,status_code:c=0,request_body_size:u,response_body_size:h}=e.data;if(!l)return null;if(!a||!ny(l,r.networkDetailAllowUrls)||ny(l,r.networkDetailDenyUrls)){let e=nf(u);return{startTimestamp:i,endTimestamp:s,url:l,method:d,statusCode:c,request:e,response:nf(h)}}let p=a[ej.SENTRY_XHR_DATA_KEY],f=p?ng(p.request_headers,r.networkRequestHeaders):{},m=ng((0,eW.parseXhrResponseHeaders)(a),r.networkResponseHeaders),[g,y]=r.networkCaptureBodies?(0,eW.getBodyString)(o,rV):[void 0],[v,w]=r.networkCaptureBodies?function(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{var r=e.response,n=e.responseType;try{if("string"==typeof r)return[r];if(r instanceof Document)return[r.body.outerHTML];if("json"===n&&(0,ep.isObjectLike)(r))return[JSON.stringify(r)];if(!r)return[void 0]}catch(e){return r$&&rV.exception(e,"Failed to serialize body",r),[void 0,"BODY_PARSE_ERROR"]}return r$&&rV.log("Skipping network body because of body type",r),[void 0,"UNPARSEABLE_BODY_TYPE"]}catch(e){t.push(e)}return r$&&rV.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],b=nm(f,u,g),E=nm(m,h,v);return{startTimestamp:i,endTimestamp:s,url:l,method:d,statusCode:c,request:y?nh(b,y):b,response:w?nh(E,w):E}}(e,t,r),i=np("resource.xhr",n);nd(r.replay,i)}catch(e){r$&&rV.exception(e,"Failed to capture xhr breadcrumb")}}async function nk(e){try{return await Promise.all(nl(e,[function(e){let{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}(eH.performance.memory)]))}catch{return[]}}let nI=eu.GLOBAL_OBJ.navigator;async function nT({client:e,scope:t,replayId:r,event:n}){let i={event_id:r,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",n,i);let s=await (0,eR.prepareEvent)(e.getOptions(),n,i,t,e,(0,M.getIsolationScope)());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let o=e.getSdkMetadata(),{name:a,version:l,settings:d}=o?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:l||"0.0.0",settings:d},s}async function nR({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:i,session:s}){var o;let a,l=function({recordingData:e,headers:t}){let r,n=`${JSON.stringify(t)}
3`;if("string"==typeof e)r=`${n}${e}`;else{let t=new TextEncoder().encode(n);(r=new Uint8Array(t.length+e.length)).set(t),r.set(e,t.length)}return r}({recordingData:e,headers:{segment_id:r}}),{urls:d,errorIds:c,traceIds:u,segmentNames:h,initialTimestamp:p}=n,f=(0,M.getClient)(),m=(0,M.getCurrentScope)(),g=f?.getTransport(),y=f?.getDsn();if(!f||!g||!y||!s.sampled)return Promise.resolve({});let v={type:"replay_event",replay_start_timestamp:p/1e3,timestamp:i/1e3,error_ids:c,trace_ids:u,segment_names:h,urls:d,replay_id:t,segment_id:r,replay_type:s.sampled},w=await nT({scope:m,client:f,replayId:t,event:v});if(!w)return r$&&rV.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete w.sdkProcessingMetadata;let b=(o=f.getOptions().tunnel,(0,eT.createEnvelope)((0,eT.createEventEnvelopeHeaders)(w,(0,eT.getSdkMetadataForEnvelopeHeader)(w),o,y),[[{type:"replay_event"},w],[{type:"replay_recording",length:"string"==typeof l?new TextEncoder().encode(l).length:l.length},l]]));try{a=await g.send(b)}catch(t){let e=Error(eq);try{e.cause=t}catch{}throw e}let E=(0,eA.updateRateLimits)({},a);if((0,eA.isRateLimited)(E,"replay"))throw new nx(E);if("number"==typeof a.statusCode&&(a.statusCode<200||a.statusCode>=300))throw new nA(a.statusCode);return a}
3class nA extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class nx extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}class nO extends Error{constructor(){super("Session is too long, not sending replay")}}async function nN(e,t={count:0,interval:5e3}){let{recordingData:r,onError:n}=e;if(r.length)try{return await nR(e),!0}catch(r){if(r instanceof nA||r instanceof nx)throw r;if((0,ev.setContext)("Replays",{_retryCount:t.count}),n&&n(r),t.count>=3){let e=Error(`${eq} - max retries exceeded`);try{e.cause=r}catch{}throw e}return t.interval*=++t.count,new Promise((r,n)=>{(0,eD.setTimeout)(async()=>{try{await nN(e,t),r(!0)}catch(e){n(e)}},t.interval)})}}let nD="__THROTTLED";class nP{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,r){return function(e,t,r){let n,i,s,o=r?.maxWait?Math.max(r.maxWait,t):0,a=r?.setTimeoutImpl||setTimeout;function l(){return d(),n=e()}function d(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function c(){return i&&clearTimeout(i),i=a(l,t),o&&void 0===s&&(s=a(l,o)),n}return c.cancel=d,c.flush=function(){return void 0!==i||void 0!==s?l():n},c}(e,t,{...r,setTimeoutImpl:eD.setTimeout})}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e){let t=new Map,r=!1;return(...n)=>{let i,s=Math.floor(Date.now()/1e3);if(i=s-5,t.forEach((e,r)=>{r<i&&t.delete(r)}),[...t.values()].reduce((e,t)=>e+t,0)>=300){let e=r;return r=!0,e?"__SKIPPED":nD}r=!1;let o=t.get(s)||0;return t.set(s,o+1),e(...n)}}((e,t)=>nt(this,e)?ne(this,e,t):Promise.resolve(null));const{slowClickTimeout:r,slowClickIgnoreSelectors:n}=this.getOptions(),i=r?{threshold:Math.min(3e3,r),timeout:r,scrollTimeout:300,ignoreSelector:n?n.join(","):""}:void 0;if(i&&(this.clickDetector=new rT(this,i)),r$){const t=e._experiments;rV.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===eH.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=rx({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=rx({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=function(e){var t;let{metaKey:r,shiftKey:n,ctrlKey:i,altKey:s,key:o,target:a}=e;if(!a||"INPUT"===(t=a).tagName||"TEXTAREA"===t.tagName||t.isContentEditable||!o)return null;let l=r||i||s,d=1===o.length;if(!l&&d)return null;let c=(0,eP.htmlTreeAsString)(a,{maxStringLength:200})||"<unknown>",u=rP(a,c);return rx({category:"ui.keyDown",message:c,data:{...u.data,metaKey:r,shiftKey:n,ctrlKey:i,altKey:s,key:o}})}(t);r&&r_(e,r)}(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){r$&&rV.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:r}=this._options,n=t<=0&&r<=0;if(this._requiresManualStart=n,!n){if(this._initializeSessionForSampling(e),!this.session){r$&&rV.exception(Error("Unable to initialize and create session"));return}!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",r$&&rV.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode){r$&&rV.log("Recording is already in progress");return}if(this._isEnabled&&"buffer"===this.recordingMode){r$&&rV.log("Buffering is in progress, call `flush()` to save the replay");return}r$&&rV.infoTick("Starting replay in session mode"),this._updateUserActivity();let e=r7({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}
3startBuffering(){if(this._isEnabled){r$&&rV.log("Buffering is in progress, call `flush()` to save the replay");return}r$&&rV.infoTick("Starting replay in buffer mode");let e=r7({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{var e;let t,r=this._canvas;this._stopRecording=rb({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:(e=this,t=!1,(r,n)=>{try{if(!e.checkAndHandleExpiredSession()){r$&&rV.warn("Received replay event after session expired.");return}let i=n||!t;t=!0,function(e){let t=e.data;if(e.type===tq.IncrementalSnapshot&&t&&"object"==typeof t&&"source"in t&&t.source===tK.Mutation&&"attributes"in t&&Array.isArray(t.attributes))for(let e of t.attributes){let t=rb.mirror.getNode(e.id),r=t&&rb.mirror.getMeta(t);if(!t||r?.type!==rO.Element)continue;let n={...r.attributes},i=!1;for(let[t,r]of Object.entries(e.attributes))rD.has(t)&&(null===r?delete n[t]:n[t]=r,i=!0);i&&rb.mirror.add(t,{...r,attributes:n})}}(r),e.clickDetector&&function(e,t){try{var r;if(r=t,3!==r.type)return;let{source:n}=t.data;if(rI.has(n)&&e.registerMutation(t.timestamp),n===tK.Scroll&&e.registerScroll(t.timestamp),t.data.source===tK.MouseInteraction){let{type:r,id:n}=t.data,i=rb.mirror.getNode(n);i instanceof HTMLElement&&r===tG.Click&&e.registerClick(i)}}catch{}}(e.clickDetector,r),e.addUpdate(()=>{if("buffer"===e.recordingMode&&i&&e.setInitialState(),!r9(e,r,i))return!0;if(!i)return!1;let t=e.session;if(function(e,t){if(t&&e.session?.segmentId===0){let t;r9(e,(t=e.getOptions(),{type:tq.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}),!1)}}(e,i),"buffer"===e.recordingMode&&t&&e.eventBuffer&&!t.dirty){let r=e.eventBuffer.getEarliestTimestamp();r&&(r$&&rV.log(`Updating session start time to earliest event in buffer to ${new Date(r)}`),t.started=r,e.getOptions().stickySession&&r3(t))}return!!t?.previousSessionId||("session"===e.recordingMode&&e.flush(),!0)})}catch(t){e.handleException(t)}}),.../iPhone|iPad|iPod/i.test(nI?.userAgent??"")||/Macintosh/i.test(nI?.userAgent??"")&&nI?.maxTouchPoints&&nI?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...r?{recordCanvas:r.recordCanvas,getCanvasManager:r.getCanvasManager,sampling:r.sampling,dataURLOptions:r.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";let r=t??"manual";(0,M.getClient)()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{r$&&rV.log(`Stopping Replay triggered by ${r}`),no(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,function(){if(r1())try{eH.sessionStorage.removeItem(e$)}catch{}}(),this.session=void 0}catch(e){this.handleException(e)}}pause(){!this._isPaused&&(this._isPaused=!0,this.stopRecording(),r$&&rV.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),r$&&rV.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();let t=Date.now();r$&&rV.log("Converting buffer to session"),await this.flushImmediate();let r=this.stopRecording();e&&r&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),na(this.session.id)),this.startRecording())}addUpdate(e){let t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!e||this.session?.sampled!==!1)return this.session?.id}
3checkAndHandleExpiredSession(){return this._lastActivity&&r8(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"?void this.pause():!!this._checkSession()}setInitialState(){let e=`${eH.location.pathname}${eH.location.hash}${eH.location.search}`,t=`${eH.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let r=this._throttledAddEvent(e,t);if(r===nD){let e=rx({category:"replay.throttled"});this.addUpdate(()=>!r9(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return r}getCurrentRoute(){let e=this.lastActiveSpan||(0,eE.getActiveSpan)(),t=e&&(0,eE.getRootSpan)(e);if(!t)return;let r=(0,eE.spanToJSON)(t),n=r.attributes["sentry.segment.name.source"];if(n&&["route","custom"].includes(n))return r.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=function(e){try{let t=e||function(){if("u"<typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__){let e;return e=new Blob(['
vendor: 10,471 bytes, line 3
3var t=Uint8Array,r=Uint16Array,n=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new r(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new n(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new r(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,n,e){for(var i=t.length,s=0,a=new r(n);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new r(n);for(s=1;s<n;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new r(1<<n);var f=15-n;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=n-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new r(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(r,n,e){return(null==e||e>r.length)&&(e=r.length),new t(r.subarray(n,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,r,n){var e=new Error(r||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!n)throw e;return e},z=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8},_=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8,t[e+2]|=n>>16},x=function(n,e){for(var i=[],s=0;s<n.length;++s)n[s]&&i.push({s:s,f:n[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,r){return t.f-r.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new r(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,r){return p[r.s]-p[t.s]||t.f-r.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,r,n){return-1==t.s?Math.max(A(t.l,r,n+1),A(t.r,r,n+1)):r[t.s]=n},D=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new r(++n),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=n;++h)if(t[h]==s&&h!=n)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:n}},T=function(t,r){for(var n=0,e=0;e<r.length;++e)n+=t[e]*r[e];return n},k=function(t,r,n){var e=n.length,i=m(r+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=n[s];return 8*(i+4+e)},U=function(t,n,a,o,h,f,l,u,c,v,m){z(n,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new r(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(n,m,t.subarray(c,c+v));if(z(n,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(n,m,S-257),z(n,m+5,j-1),z(n,m+10,K-4),m+=14;for(B=0;B<K;++B)z(n,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var rt=31&tt[B];z(n,m,Y[rt]),m+=H[rt],rt>15&&(z(n,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var nt=o[B];if(nt>255){_(n,m,N[(rt=nt>>18&31)+257]),m+=P[rt+257],rt>7&&(z(n,m,nt>>23&31),m+=e[rt]);var et=31&nt;_(n,m,Q[et]),m+=R[et],et>3&&(_(n,m,nt>>5&8191),m+=i[et])}else _(n,m,N[nt]),m+=P[nt]}return _(n,m,N[256]),m+P[256]},C=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),r=0;r<256;++r){for(var n=r,e=9;--e;)n=(1&n&&-306674912)^n>>>1;t[r]=n}return t}(),S=function(){var t=1,r=0;return{p:function(n){for(var e=t,i=r,s=0|n.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=n[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,r=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(r%=65521))<<8|r>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new r(32768),x=c.h||new r(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new n(25e3),I=new r(288),S=new r(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),rt=0;for(P=0;P<tt;++P){var nt=j-W+P&32767,et=nt-_[nt]&32767;et>rt&&(rt=et,K=nt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,r,n){for(;n;++r)t[r]=n,n>>>=8},j=function(){function r(r,n){if("function"==typeof r&&(n=r,r={}),this.ondata=n,this.o=r||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return r.prototype.p=function(t,r){this.ondata(L(t,this.o,0,0,this.s),r)},r.prototype.push=function(r,n){this.ondata||E(5),this.s.l&&E(4);var e=r.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(r.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(r.subarray(s),32768),this.s.z=r.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(r,this.s.z),this.s.z+=r.length;this.s.l=1&n,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2),n&&(this.s=this.o={},this.b=F)},r.prototype.flush=function(r){if(this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,r){var n=new t(6);n[0]=this.s.r>>3;var e=k(n,this.s.r,F);this.s.r=0,this.ondata(n.subarray(0,e>>3),!1)}},r}();function q(t,r){r||(r={});var n=function(){var t=-1;return{p:function(r){for(var n=t,e=0;e<r.length;++e)n=I[255&n^r[e]]^n>>>8;t=n},d:function(){return~t}}}(),e=t.length;n.p(t);var i,s=L(t,r,10+((i=r).filename?i.filename.length+1:0),8),a=s.length;return function(t,r){var n=r.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=r.level<2?4:9==r.level?2:0,t[9]=3,0!=r.mtime&&O(t,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),n){t[3]=8;for(var e=0;e<=n.length;++e)t[e+10]=n.charCodeAt(e)}}(s,r),O(s,a-8,n.d()),O(s,a-4,e),s}var B=function(){function t(t,r){this.c=S(),this.v=1,j.call(this,t,r)}return t.prototype.push=function(t,r){this.c.p(t),j.prototype.push.call(this,t,r)},t.prototype.p=function(t,r){var n=L(t,this.o,this.v&&(this.o.dictionary?6:2),r&&4,this.s);this.v&&(function(t,r){var n=r.level,e=0==n?0:n<6?1:9==n?3:2;if(t[0]=120,t[1]=e<<6|(r.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,r.dictionary){var i=S();i.p(r.dictionary),O(t,2,i.d())}}(n,this.o),this.v=0),r&&O(n,n.length-4,this.c.d()),this.ondata(n,r)},t.prototype.flush=function(t){j.prototype.flush.call(this,t)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,r){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=r||!1)},t}();function K(r,n){if(G)return G.encode(r);for(var e=r.length,i=new t(r.length+(r.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=r.charCodeAt(o);f<128||n?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&r.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const r=this._hasEvents?",":"";this.stream.push(r+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let r=0;for(const n of t)r+=n.length;const n=new Uint8Array(r);for(let r=0,e=0,i=t.length;r<i;r++){const i=t[r];n.set(i,e),e+=i.length}return n}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,r)=>{this._deflatedData.push(t)},this.stream=new J((t,r)=>{this.deflate.push(t,r)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const r=t.data.method,n=t.data.id,e=t.data.arg;if(r in P&&"function"==typeof P[r])try{const t=P[r](e);postMessage({id:n,method:r,success:!0,response:t})}catch(t){postMessage({id:n,method:r,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});
3'],{type:"text/javascript"}),URL.createObjectURL(e)}return""}();if(!t)return;r$&&rV.log(`Using compression worker${e?` from ${e}`:""}`);let r=new Worker(t);return new r0(r)}catch(e){r$&&rV.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return r$&&rV.log("Using simple buffer"),new rX}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&(0,M.getClient)()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),"session"===this.recordingMode&&this.session&&na(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,r=r7({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=r}_checkSession(){if(!this.session)return!1;let e=this.session;return!r4(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(e.id))}_addListeners(){try{eH.document.addEventListener("visibilitychange",this._handleVisibilityChange),eH.addEventListener("blur",this._handleWindowBlur),eH.addEventListener("focus",this._handleWindowFocus),eH.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){let t,r=(0,M.getClient)();(0,eB.addClickKeypressInstrumentationHandler)(t=>{var r,n;if(!e.isEnabled())return;let i=function(e){let{target:t,message:r}=function(e){let t,r="click"===e.name,n=null;try{n=r?rC(e.event):rk(e.event),t=(0,eP.htmlTreeAsString)(n,{maxStringLength:200})||"<unknown>"}catch{t="<unknown>"}return{target:n,message:t}}(e);return rx({category:`ui.${e.name}`,...rP(t,r)})}(t);if(!i)return;let s="click"===t.name,o=s?t.event:void 0;s&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&(r=e.clickDetector,n=rC(t.event),r.handleClick(i,n)),r_(e,i)}),(0,eU.addHistoryInstrumentationHandler)(t=>{if(!e.isEnabled())return;let r=function(e){let{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}(t);null!==r&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(nl(e,[r]),!1)))}),(t=(0,M.getClient)())&&t.on("beforeAddBreadcrumb",t=>(function(e,t){var r;if(!e.isEnabled()||!ns(t))return;let n=(r=t,!ns(r)||["fetch","xhr","sentry.event","sentry.transaction"].includes(r.category)||r.category.startsWith("ui.")?null:"console"===r.category?function(e){let t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return rx(e);let r=!1,n=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>5e3?(r=!0,`${e.slice(0,5e3)}\u2026`):e;if("object"==typeof e)try{let t=(0,eh.normalize)(e,7);if(JSON.stringify(t).length>5e3)return r=!0,`${JSON.stringify(t,null,2).slice(0,5e3)}\u2026`;return t}catch{}return e});return rx({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(r):rx(r));n&&r_(e,n)})(e,t));let n=(0,M.getClient)();try{let{networkDetailAllowUrls:t,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:t,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};n&&n.on("beforeAddBreadcrumb",(e,t)=>(function(e,t,r){if(t.data)try{var n,i,s,o;n=t,"xhr"===n.category&&(i=r,i?.xhr)&&(!function(e,t){let{xhr:r,input:n}=t;if(!r)return;let i=nc(n),s=r.getResponseHeader("content-length")?nu(r.getResponseHeader("content-length")):function(e,t){try{let r="json"===t&&(0,ep.isObjectLike)(e)?JSON.stringify(e):e;return nc(r)}catch{return}}(r.response,r.responseType);void 0!==i&&(e.data.request_body_size=i),void 0!==s&&(e.data.response_body_size=s)}(t,r),nC(t,r,e)),s=t,"fetch"===s.category&&(o=r,o?.input!==void 0)&&(!function(e,t){let{input
3:r,response:n}=t,i=nc(r?(0,eW.getFetchRequestArgBody)(r):void 0),s=n?nu(n.headers.get("content-length")):void 0;void 0!==i&&(e.data.request_body_size=i),void 0!==s&&(e.data.response_body_size=s)}(t,r),nv(t,r,e))}catch(e){r$&&rV.exception(e,"Error when enriching network breadcrumb")}})(a,e,t))}catch{}let i=Object.assign((t,r)=>{if(e.session&&r4(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&no(),!e.isEnabled()||e.isPaused())return t;if("replay_event"===t.type)return delete t.breadcrumbs,t;if(t.type&&!nn(t)&&!ni(t))return t;if(!e.checkAndHandleExpiredSession())return no(),t;if(ni(t)){let r=e.getSessionId(),n=t.contexts.feedback.replay_id;return n&&n!==r?t:(e.flush(),t.contexts.feedback.replay_id=r,e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:tq.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)),t)}if(!t.type&&t.exception?.values?.length&&r.originalException?.__rrweb__&&!e.getOptions()._experiments.captureExceptions)return r$&&rV.log("Ignoring error from rrweb internals",t),null;let n="buffer"===e.recordingMode&&t.message!==eq&&!!t.exception&&!t.type&&r2(e.getOptions().errorSampleRate);if((n||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&"buffer"===e.recordingMode&&e.session?.sampled==="buffer"){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&r3(t)}return t},{id:"Replay"});if((0,ev.addEventProcessor)(i),r){let t;r.on("beforeSendEvent",t=>{var r,n;let i;e.isEnabled()&&!t.type&&(r=e,n=t,i=n.exception?.values?.[0]?.value,"string"==typeof i&&(i.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||i.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&r_(r,rx({category:"replay.hydrate-error",data:{url:(0,eF.getLocationHref)()}})))}),r.on("afterSendEvent",(t,r)=>{if(!e.isEnabled()||t.type&&!nn(t))return;let n=r.statusCode;if(n&&!(n<200)&&!(n>=300)){if(nn(t)){var i,s;return void(i=e,s=t,nr(i,s.contexts?.trace?.trace_id,s.transaction))}!function(e,t){let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags?.replayId)return;let{beforeErrorSampling:n}=e.getOptions();("function"!=typeof n||n(t))&&(0,eD.setTimeout)(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t)}}),r.on("createDsc",t=>{let r=e.getSessionId();r&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=r)}),r.on("processSegmentSpan",t=>{e.isEnabled()&&nr(e,t.trace_id,t.name||void 0)}),r.on("spanStart",t=>{e.lastActiveSpan=t}),r.on("spanEnd",t=>{e.lastActiveSpan=t}),r.on("beforeSendFeedback",async(r,n)=>{let i=r.contexts?.feedback;if(!n?.includeReplay||!i)return;if("widget"===i.source&&t){i.replay_id=t,t=void 0;return}let s=e.getSessionId();e.isEnabled()&&s&&("api"===i.source&&await e.sendBufferedReplayOrFlush(),i.replay_id=s)}),r.on("openFeedbackWidget",async()=>{t=void 0,await e.sendBufferedReplayOrFlush(),t=e.isEnabled()?e.getSessionId():void 0})}}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function r({entries:e}){e.forEach(t)}let n=[];return["navigation","paint","resource"].forEach(e=>{n.push((0,eL.addPerformanceInstrumentationHandler)(e,r))}),n.push((0,eL.addLcpInstrumentationHandler)(rF(rB,e)),(0,eL.addClsInstrumentationHandler)(rF(rU,e)),(0,eL.addInpInstrumentationHandler)(rF(rz,e))),()=>{n.forEach(e=>e())}}(this)}_removeListeners(){try{eH.document.removeEventListener("visibilitychange",this._handleVisibilityChange),eH.removeEventListener("blur",this._handleWindowBlur),eH.removeEventListener("focus",this._handleWindowFocus),eH.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}
3_doChangeToBackgroundTasks(e){this.session&&(r4(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})?no():(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){r$&&rV.log("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:tq.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=this.performanceEntries.map(rW).filter(Boolean).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(nl(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let r=t.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
3_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){r$&&rV.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents){if((await nk(this),this.eventBuffer)&&e===this.getSessionId())try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new nO;let r=this._popEventContext(),n=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await nN({replayId:e,recordingData:i,segmentId:n,eventContext:r,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(t){this.handleException(t),this.stop({reason:"sendError"});let e=(0,M.getClient)();e&&e.recordDroppedEvent(t instanceof nx?"ratelimit_backoff":t instanceof nO?"invalid":"send_error","replay")}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){r$&&rV.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let t=this.session.started,r=Date.now()-t;this._debouncedFlush.cancel();let n=r<this._options.minReplayDuration,i=r>this._options.maxReplayDuration+5e3;if(n||i){r$&&rV.log(`Session duration (${Math.floor(r/1e3)}s) is too ${n?"short":"long"}, not sending replay.`),n&&this._debouncedFlush();return}let s=this.eventBuffer;s&&0===this.session.segmentId&&!s.hasCheckout&&r$&&rV.log("Flushing initial segment without checkout.");let o=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&r3(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let r=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),n=t.join(",");return r?.matches(n)}))return!1;let r=e.length,n=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=n&&r>n;if(r>i||s){let e=rx({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(e)}return!s||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function nL(e,t){return[...e,...t].join(",")}let nF='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',nW=["content-length","content-type","accept"],nj=Symbol.for("sentry__originalRequestBody"),nB=!1,nU=!1;class nz{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:r=4999,maxReplayDuration:n=36e5,stickySession:i=!0,useCompression:s=!0,workerUrl:o,_experiments:a={},maskAllText:l=!0,maskAllInputs:d=!0,blockAllMedia:c=!0,mutationBreadcrumbLimit:u=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:v=[],networkResponseHeaders:w=[],mask:b=[],maskAttributes:E=["title","placeholder","aria-label"],unmask:S=[],block:_=[],unblock:M=[],ignore:C=[],maskFn:k,beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:R,attachRawBodyFromRequest:A=!1}={}){this.name="Replay";const x=function({mask:e,unmask:t,block:r,unblock:n,ignore:i}){return{maskTextSelector:nL(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:nL(t,[]),blockSelector:nL(r,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:nL(n,[]),ignoreSelector:nL(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:S,block:_,unblock:M,ignore:C});if(this._recordingOptions={maskAllInputs:d,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:k,maskInputFn:k,maskAttributeFn:(e,t,r)=>(function({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:i,value:s}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return s;let o=r.includes(t),a=n&&"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"");return o||a?s.replace(/[\S]/g,"*"):s})({maskAttributes:E,maskAllText:l,privacyOptions:x,key:e,value:t,el:r}),...x,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(r,5e4),maxReplayDuration:Math.min(n,36e5),stickySession:i,useCompression:s,workerUrl:o,blockAllMedia:c,maskAllInputs:d,maskAllText:l,mutationBreadcrumbLimit:u,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:f,
3networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:nH(v),networkResponseHeaders:nH(w),beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:R,attachRawBodyFromRequest:A,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${nF}`:nF,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&(0,ex.isBrowser)())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return nB}set _isInitialized(e){nB=e}afterAllSetup(e){(0,ex.isBrowser)()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&function(){if("u"<typeof Request||nU)return;let e=Request;try{let t=function(t,r){let n=new e(t,r);return r?.body!=null&&(n[nj]=r.body),n};t.prototype=e.prototype,eu.GLOBAL_OBJ.Request=t,nU=!0}catch{}}(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(e){return this._replay?this._replay.stop({forceFlush:e?.flush??"session"===this._replay.recordingMode,reason:"manual"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&((0,eO.safeSetSpanJSONAttributes)(e,{"sentry.replay_id":t}),"buffer"===this.getRecordingMode()&&(0,eO.safeSetSpanJSONAttributes)(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){var t;let r,n,i,s,o=(t=this._initialOptions,r=e.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...t},i=(0,eN.parseSampleRate)(r.replaysSessionSampleRate),s=(0,eN.parseSampleRate)(r.replaysOnErrorSampleRate),null==i&&null==s&&(0,eg.consoleSandbox)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=i&&(n.sessionSampleRate=i),null!=s&&(n.errorSampleRate=s),n);this._replay=new nP({options:o,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function nH(e){return[...nW,...e.map(e=>e.toLowerCase())]}var n$=e.i(664454);try{var nq=window;nq._sentryModuleMetadata=nq._sentryModuleMetadata||{},nq._sentryModuleMetadata[(new nq.Error).stack]=Object.assign({},nq._sentryModuleMetadata[(new nq.Error).stack],{"_sentryBundlerPluginAppKey:revie-frontend":!0})}catch(e){}let nK=!1;e.s(["default",0,()=>((0,n$.useEffect)(()=>{let e,t=()=>{if(!nK){let e=(0,M.getClient)(),t=e?.getIntegrationByName?.("Replay"),r=e?.getIntegrationByName?.("ReplayCanvas");if(t&&r)nK=!0;else if(t&&!r)try{(0,_.addIntegration)(ec()),nK=!0}catch(e){console.error("Failed to add Sentry replay canvas integration:",e)}else if(!t)try{let e;(0,_.addIntegration)((e={maskAllText:!1,maskAllInputs:!1,blockAllMedia:!1,networkDetailAllowUrls:[window.location.origin,/^https:\/\/api\.(staging\.)?reviespaces\.com/],networkRequestHeaders:["accept","content-type","cache-control","content-length","accept-encoding","accept-language"],networkResponseHeaders:["content-type","cache-control","content-length","x-request-id"],networkCaptureBodies:!1},new nz(e))),(0,_.addIntegration)(ec()),nK=!0}catch(e){console.error("Failed to add Sentry replay integrations:",e)}}function t(e){let t=e.target,r=t.src||t.href;if(r)try{let e=new URL(r,window.location.href);if(e.origin===window.location.origin){if(e.pathname.startsWith("/_next/image")||e.pathname.includes("/_next/static/chunks/")||"hidden"===document.visibilityState)return;let r={tag:t.tagName,src:t.src,href:t.href,type:t.getAttribute?.("type")||t.type,rel:t.getAttribute?.("rel")||t.rel,outerHTML:t.outerHTML?.slice(0,300),pageUrl:window.location.href,pagePath:window.location.pathname,referrer:document.referrer,userAgent:navigator.userAgent,t
3imestamp:new Date().toISOString(),networkStatus:navigator.onLine?"online":"offline",connectionType:navigator.connection?.effectiveType};P.info(`Resource failed to load: ${e.pathname}`,r)}}catch{}}window.addEventListener("error",t,!0),e=()=>{window.removeEventListener("error",t,!0)}};if("requestIdleCallback"in window){let r=requestIdleCallback(t,{timeout:2e3});return()=>{cancelIdleCallback(r),e?.()}}{let r=setTimeout(t,200);return()=>{clearTimeout(r),e?.()}}},[]),null)],742564)}]);
4
5//# debugId=e70b88a6-5ee4-95d1-8cec-1706bcf97632

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.