@mevdragon/vidfarm-devcli 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/dist/app.css +1 -1
- package/demo/dist/app.js +74 -74
- package/dist/src/app.js +313 -7
- package/dist/src/config.js +13 -0
- package/dist/src/editor-chat.js +1 -0
- package/dist/src/frontend/homepage-client.js +50 -1
- package/dist/src/frontend/homepage-shared.js +197 -0
- package/dist/src/frontend/homepage-store.js +10 -1
- package/dist/src/frontend/homepage-view.js +43 -5
- package/dist/src/homepage.js +51 -18
- package/dist/src/services/serverless-records.js +9 -0
- package/package.json +1 -1
- package/public/assets/homepage-client-app.js +23 -23
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var CI=Object.create;var Ug=Object.defineProperty;var AI=Object.getOwnPropertyDescriptor;var MI=Object.getOwnPropertyNames;var LI=Object.getPrototypeOf,OI=Object.prototype.hasOwnProperty;var Xr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var DI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of MI(t))!OI.call(e,o)&&o!==r&&Ug(e,o,{get:()=>t[o],enumerable:!(n=AI(t,o))||n.enumerable});return e};var mr=(e,t,r)=>(r=e!=null?CI(LI(e)):{},DI(t||!e||!e.__esModule?Ug(r,"default",{value:e,enumerable:!0}):r,e));var N0=Xr(V=>{"use strict";var Ca=Symbol.for("react.element"),fM=Symbol.for("react.portal"),mM=Symbol.for("react.fragment"),hM=Symbol.for("react.strict_mode"),gM=Symbol.for("react.profiler"),SM=Symbol.for("react.provider"),yM=Symbol.for("react.context"),vM=Symbol.for("react.forward_ref"),_M=Symbol.for("react.suspense"),EM=Symbol.for("react.memo"),TM=Symbol.for("react.lazy"),y0=Symbol.iterator;function bM(e){return e===null||typeof e!="object"?null:(e=y0&&e[y0]||e["@@iterator"],typeof e=="function"?e:null)}var E0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T0=Object.assign,b0={};function Fi(e,t,r){this.props=e,this.context=t,this.refs=b0,this.updater=r||E0}Fi.prototype.isReactComponent={};Fi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Fi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function I0(){}I0.prototype=Fi.prototype;function pm(e,t,r){this.props=e,this.context=t,this.refs=b0,this.updater=r||E0}var fm=pm.prototype=new I0;fm.constructor=pm;T0(fm,Fi.prototype);fm.isPureReactComponent=!0;var v0=Array.isArray,x0=Object.prototype.hasOwnProperty,mm={current:null},k0={key:!0,ref:!0,__self:!0,__source:!0};function w0(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)x0.call(t,n)&&!k0.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)o[n]===void 0&&(o[n]=a[n]);return{$$typeof:Ca,type:e,key:i,ref:s,props:o,_owner:mm.current}}function IM(e,t){return{$$typeof:Ca,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ca}function xM(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var _0=/\/+/g;function dm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xM(""+e.key):t.toString(36)}function uu(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ca:case fM:s=!0}}if(s)return s=e,o=o(s),e=n===""?"."+dm(s,0):n,v0(o)?(r="",e!=null&&(r=e.replace(_0,"$&/")+"/"),uu(o,t,r,"",function(c){return c})):o!=null&&(hm(o)&&(o=IM(o,r+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(_0,"$&/")+"/")+e)),t.push(o)),1;if(s=0,n=n===""?".":n+":",v0(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+dm(i,a);s+=uu(i,t,r,l,o)}else if(l=bM(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+dm(i,a++),s+=uu(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function cu(e,t,r){if(e==null)return e;var n=[],o=0;return uu(e,n,"","",function(i){return t.call(r,i,o++)}),n}function kM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var vt={current:null},du={transition:null},wM={ReactCurrentDispatcher:vt,ReactCurrentBatchConfig:du,ReactCurrentOwner:mm};function R0(){throw Error("act(...) is not supported in production builds of React.")}V.Children={map:cu,forEach:function(e,t,r){cu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return cu(e,function(){t++}),t},toArray:function(e){return cu(e,function(t){return t})||[]},only:function(e){if(!hm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};V.Component=Fi;V.Fragment=mM;V.Profiler=gM;V.PureComponent=pm;V.StrictMode=hM;V.Suspense=_M;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wM;V.act=R0;V.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=T0({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=mm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)x0.call(t,l)&&!k0.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:Ca,type:e.type,key:o,ref:i,props:n,_owner:s}};V.createContext=function(e){return e={$$typeof:yM,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:SM,_context:e},e.Consumer=e};V.createElement=w0;V.createFactory=function(e){var t=w0.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:vM,render:e}};V.isValidElement=hm;V.lazy=function(e){return{$$typeof:TM,_payload:{_status:-1,_result:e},_init:kM}};V.memo=function(e,t){return{$$typeof:EM,type:e,compare:t===void 0?null:t}};V.startTransition=function(e){var t=du.transition;du.transition={};try{e()}finally{du.transition=t}};V.unstable_act=R0;V.useCallback=function(e,t){return vt.current.useCallback(e,t)};V.useContext=function(e){return vt.current.useContext(e)};V.useDebugValue=function(){};V.useDeferredValue=function(e){return vt.current.useDeferredValue(e)};V.useEffect=function(e,t){return vt.current.useEffect(e,t)};V.useId=function(){return vt.current.useId()};V.useImperativeHandle=function(e,t,r){return vt.current.useImperativeHandle(e,t,r)};V.useInsertionEffect=function(e,t){return vt.current.useInsertionEffect(e,t)};V.useLayoutEffect=function(e,t){return vt.current.useLayoutEffect(e,t)};V.useMemo=function(e,t){return vt.current.useMemo(e,t)};V.useReducer=function(e,t,r){return vt.current.useReducer(e,t,r)};V.useRef=function(e){return vt.current.useRef(e)};V.useState=function(e){return vt.current.useState(e)};V.useSyncExternalStore=function(e,t,r){return vt.current.useSyncExternalStore(e,t,r)};V.useTransition=function(){return vt.current.useTransition()};V.version="18.3.1"});var pn=Xr((M9,C0)=>{"use strict";C0.exports=N0()});var Y0=Xr(ge=>{"use strict";function Tm(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<pu(o,t))e[n]=t,e[r]=o,r=n;else break e}}function xr(e){return e.length===0?null:e[0]}function mu(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var s=2*(n+1)-1,a=e[s],l=s+1,c=e[l];if(0>pu(a,r))l<o&&0>pu(c,a)?(e[n]=c,e[l]=r,n=l):(e[n]=a,e[s]=r,n=s);else if(l<o&&0>pu(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function pu(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(B0=performance,ge.unstable_now=function(){return B0.now()}):(vm=Date,F0=vm.now(),ge.unstable_now=function(){return vm.now()-F0});var B0,vm,F0,$r=[],Fn=[],AM=1,ir=null,lt=3,hu=!1,Uo=!1,La=!1,$0=typeof setTimeout=="function"?setTimeout:null,j0=typeof clearTimeout=="function"?clearTimeout:null,H0=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function bm(e){for(var t=xr(Fn);t!==null;){if(t.callback===null)mu(Fn);else if(t.startTime<=e)mu(Fn),t.sortIndex=t.expirationTime,Tm($r,t);else break;t=xr(Fn)}}function Im(e){if(La=!1,bm(e),!Uo)if(xr($r)!==null)Uo=!0,km(xm);else{var t=xr(Fn);t!==null&&wm(Im,t.startTime-e)}}function xm(e,t){Uo=!1,La&&(La=!1,j0(Oa),Oa=-1),hu=!0;var r=lt;try{for(bm(t),ir=xr($r);ir!==null&&(!(ir.expirationTime>t)||e&&!V0());){var n=ir.callback;if(typeof n=="function"){ir.callback=null,lt=ir.priorityLevel;var o=n(ir.expirationTime<=t);t=ge.unstable_now(),typeof o=="function"?ir.callback=o:ir===xr($r)&&mu($r),bm(t)}else mu($r);ir=xr($r)}if(ir!==null)var i=!0;else{var s=xr(Fn);s!==null&&wm(Im,s.startTime-t),i=!1}return i}finally{ir=null,lt=r,hu=!1}}var gu=!1,fu=null,Oa=-1,W0=5,G0=-1;function V0(){return!(ge.unstable_now()-G0<W0)}function _m(){if(fu!==null){var e=ge.unstable_now();G0=e;var t=!0;try{t=fu(!0,e)}finally{t?Ma():(gu=!1,fu=null)}}else gu=!1}var Ma;typeof H0=="function"?Ma=function(){H0(_m)}:typeof MessageChannel<"u"?(Em=new MessageChannel,z0=Em.port2,Em.port1.onmessage=_m,Ma=function(){z0.postMessage(null)}):Ma=function(){$0(_m,0)};var Em,z0;function km(e){fu=e,gu||(gu=!0,Ma())}function wm(e,t){Oa=$0(function(){e(ge.unstable_now())},t)}ge.unstable_IdlePriority=5;ge.unstable_ImmediatePriority=1;ge.unstable_LowPriority=4;ge.unstable_NormalPriority=3;ge.unstable_Profiling=null;ge.unstable_UserBlockingPriority=2;ge.unstable_cancelCallback=function(e){e.callback=null};ge.unstable_continueExecution=function(){Uo||hu||(Uo=!0,km(xm))};ge.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W0=0<e?Math.floor(1e3/e):5};ge.unstable_getCurrentPriorityLevel=function(){return lt};ge.unstable_getFirstCallbackNode=function(){return xr($r)};ge.unstable_next=function(e){switch(lt){case 1:case 2:case 3:var t=3;break;default:t=lt}var r=lt;lt=t;try{return e()}finally{lt=r}};ge.unstable_pauseExecution=function(){};ge.unstable_requestPaint=function(){};ge.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=lt;lt=e;try{return t()}finally{lt=r}};ge.unstable_scheduleCallback=function(e,t,r){var n=ge.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:AM++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,Tm(Fn,e),xr($r)===null&&e===xr(Fn)&&(La?(j0(Oa),Oa=-1):La=!0,wm(Im,r-n))):(e.sortIndex=o,Tm($r,e),Uo||hu||(Uo=!0,km(xm))),e};ge.unstable_shouldYield=V0;ge.unstable_wrapCallback=function(e){var t=lt;return function(){var r=lt;lt=t;try{return e.apply(this,arguments)}finally{lt=r}}}});var K0=Xr((Z9,q0)=>{"use strict";q0.exports=Y0()});var Zb=Xr(Yt=>{"use strict";var MM=pn(),Gt=K0();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rT=new Set,rl={};function Xo(e,t){ss(e,t),ss(e+"Capture",t)}function ss(e,t){for(rl[e]=t,e=0;e<t.length;e++)rT.add(t[e])}var vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xm=Object.prototype.hasOwnProperty,LM=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,X0={},J0={};function OM(e){return Xm.call(J0,e)?!0:Xm.call(X0,e)?!1:LM.test(e)?J0[e]=!0:(X0[e]=!0,!1)}function DM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function PM(e,t,r,n){if(t===null||typeof t>"u"||DM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Tt(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new Tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new Tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new Tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new Tt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){et[e]=new Tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new Tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new Tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new Tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new Tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var $h=/[\-:]([a-z])/g;function jh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($h,jh);et[t]=new Tt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($h,jh);et[t]=new Tt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($h,jh);et[t]=new Tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new Tt(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new Tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new Tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wh(e,t,r,n){var o=et.hasOwnProperty(t)?et[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(PM(t,r,o,n)&&(r=null),n||o===null?OM(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var bn=MM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Su=Symbol.for("react.element"),$i=Symbol.for("react.portal"),ji=Symbol.for("react.fragment"),Gh=Symbol.for("react.strict_mode"),Jm=Symbol.for("react.profiler"),nT=Symbol.for("react.provider"),oT=Symbol.for("react.context"),Vh=Symbol.for("react.forward_ref"),Qm=Symbol.for("react.suspense"),Zm=Symbol.for("react.suspense_list"),Yh=Symbol.for("react.memo"),zn=Symbol.for("react.lazy"),iT=Symbol.for("react.offscreen"),Q0=Symbol.iterator;function Da(e){return e===null||typeof e!="object"?null:(e=Q0&&e[Q0]||e["@@iterator"],typeof e=="function"?e:null)}var Re=Object.assign,Rm;function ja(e){if(Rm===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Rm=t&&t[1]||""}return`
|
|
2
|
-
`+Rm+e}var
|
|
1
|
+
var Ak=Object.create;var Ug=Object.defineProperty;var Mk=Object.getOwnPropertyDescriptor;var Lk=Object.getOwnPropertyNames;var Ok=Object.getPrototypeOf,Pk=Object.prototype.hasOwnProperty;var Jr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Dk=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Lk(t))!Pk.call(e,o)&&o!==r&&Ug(e,o,{get:()=>t[o],enumerable:!(n=Mk(t,o))||n.enumerable});return e};var hr=(e,t,r)=>(r=e!=null?Ak(Ok(e)):{},Dk(t||!e||!e.__esModule?Ug(r,"default",{value:e,enumerable:!0}):r,e));var CE=Jr(q=>{"use strict";var Na=Symbol.for("react.element"),mM=Symbol.for("react.portal"),hM=Symbol.for("react.fragment"),gM=Symbol.for("react.strict_mode"),SM=Symbol.for("react.profiler"),yM=Symbol.for("react.provider"),vM=Symbol.for("react.context"),_M=Symbol.for("react.forward_ref"),EM=Symbol.for("react.suspense"),TM=Symbol.for("react.memo"),bM=Symbol.for("react.lazy"),yE=Symbol.iterator;function kM(e){return e===null||typeof e!="object"?null:(e=yE&&e[yE]||e["@@iterator"],typeof e=="function"?e:null)}var EE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},TE=Object.assign,bE={};function Hi(e,t,r){this.props=e,this.context=t,this.refs=bE,this.updater=r||EE}Hi.prototype.isReactComponent={};Hi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function kE(){}kE.prototype=Hi.prototype;function pm(e,t,r){this.props=e,this.context=t,this.refs=bE,this.updater=r||EE}var fm=pm.prototype=new kE;fm.constructor=pm;TE(fm,Hi.prototype);fm.isPureReactComponent=!0;var vE=Array.isArray,IE=Object.prototype.hasOwnProperty,mm={current:null},wE={key:!0,ref:!0,__self:!0,__source:!0};function xE(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)IE.call(t,n)&&!wE.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)o[n]===void 0&&(o[n]=a[n]);return{$$typeof:Na,type:e,key:i,ref:s,props:o,_owner:mm.current}}function IM(e,t){return{$$typeof:Na,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Na}function wM(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var _E=/\/+/g;function dm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wM(""+e.key):t.toString(36)}function uu(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Na:case mM:s=!0}}if(s)return s=e,o=o(s),e=n===""?"."+dm(s,0):n,vE(o)?(r="",e!=null&&(r=e.replace(_E,"$&/")+"/"),uu(o,t,r,"",function(c){return c})):o!=null&&(hm(o)&&(o=IM(o,r+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(_E,"$&/")+"/")+e)),t.push(o)),1;if(s=0,n=n===""?".":n+":",vE(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+dm(i,a);s+=uu(i,t,r,l,o)}else if(l=kM(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+dm(i,a++),s+=uu(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function cu(e,t,r){if(e==null)return e;var n=[],o=0;return uu(e,n,"","",function(i){return t.call(r,i,o++)}),n}function xM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _t={current:null},du={transition:null},RM={ReactCurrentDispatcher:_t,ReactCurrentBatchConfig:du,ReactCurrentOwner:mm};function RE(){throw Error("act(...) is not supported in production builds of React.")}q.Children={map:cu,forEach:function(e,t,r){cu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return cu(e,function(){t++}),t},toArray:function(e){return cu(e,function(t){return t})||[]},only:function(e){if(!hm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};q.Component=Hi;q.Fragment=hM;q.Profiler=SM;q.PureComponent=pm;q.StrictMode=gM;q.Suspense=EM;q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RM;q.act=RE;q.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=TE({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=mm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)IE.call(t,l)&&!wE.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:Na,type:e.type,key:o,ref:i,props:n,_owner:s}};q.createContext=function(e){return e={$$typeof:vM,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:yM,_context:e},e.Consumer=e};q.createElement=xE;q.createFactory=function(e){var t=xE.bind(null,e);return t.type=e,t};q.createRef=function(){return{current:null}};q.forwardRef=function(e){return{$$typeof:_M,render:e}};q.isValidElement=hm;q.lazy=function(e){return{$$typeof:bM,_payload:{_status:-1,_result:e},_init:xM}};q.memo=function(e,t){return{$$typeof:TM,type:e,compare:t===void 0?null:t}};q.startTransition=function(e){var t=du.transition;du.transition={};try{e()}finally{du.transition=t}};q.unstable_act=RE;q.useCallback=function(e,t){return _t.current.useCallback(e,t)};q.useContext=function(e){return _t.current.useContext(e)};q.useDebugValue=function(){};q.useDeferredValue=function(e){return _t.current.useDeferredValue(e)};q.useEffect=function(e,t){return _t.current.useEffect(e,t)};q.useId=function(){return _t.current.useId()};q.useImperativeHandle=function(e,t,r){return _t.current.useImperativeHandle(e,t,r)};q.useInsertionEffect=function(e,t){return _t.current.useInsertionEffect(e,t)};q.useLayoutEffect=function(e,t){return _t.current.useLayoutEffect(e,t)};q.useMemo=function(e,t){return _t.current.useMemo(e,t)};q.useReducer=function(e,t,r){return _t.current.useReducer(e,t,r)};q.useRef=function(e){return _t.current.useRef(e)};q.useState=function(e){return _t.current.useState(e)};q.useSyncExternalStore=function(e,t,r){return _t.current.useSyncExternalStore(e,t,r)};q.useTransition=function(){return _t.current.useTransition()};q.version="18.3.1"});var fn=Jr((LW,NE)=>{"use strict";NE.exports=CE()});var YE=Jr(ge=>{"use strict";function Tm(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<pu(o,t))e[n]=t,e[r]=o,r=n;else break e}}function wr(e){return e.length===0?null:e[0]}function mu(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var s=2*(n+1)-1,a=e[s],l=s+1,c=e[l];if(0>pu(a,r))l<o&&0>pu(c,a)?(e[n]=c,e[l]=r,n=l):(e[n]=a,e[s]=r,n=s);else if(l<o&&0>pu(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function pu(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(BE=performance,ge.unstable_now=function(){return BE.now()}):(vm=Date,FE=vm.now(),ge.unstable_now=function(){return vm.now()-FE});var BE,vm,FE,Wr=[],Hn=[],MM=1,ir=null,ct=3,hu=!1,Bo=!1,La=!1,$E=typeof setTimeout=="function"?setTimeout:null,WE=typeof clearTimeout=="function"?clearTimeout:null,HE=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function bm(e){for(var t=wr(Hn);t!==null;){if(t.callback===null)mu(Hn);else if(t.startTime<=e)mu(Hn),t.sortIndex=t.expirationTime,Tm(Wr,t);else break;t=wr(Hn)}}function km(e){if(La=!1,bm(e),!Bo)if(wr(Wr)!==null)Bo=!0,wm(Im);else{var t=wr(Hn);t!==null&&xm(km,t.startTime-e)}}function Im(e,t){Bo=!1,La&&(La=!1,WE(Oa),Oa=-1),hu=!0;var r=ct;try{for(bm(t),ir=wr(Wr);ir!==null&&(!(ir.expirationTime>t)||e&&!VE());){var n=ir.callback;if(typeof n=="function"){ir.callback=null,ct=ir.priorityLevel;var o=n(ir.expirationTime<=t);t=ge.unstable_now(),typeof o=="function"?ir.callback=o:ir===wr(Wr)&&mu(Wr),bm(t)}else mu(Wr);ir=wr(Wr)}if(ir!==null)var i=!0;else{var s=wr(Hn);s!==null&&xm(km,s.startTime-t),i=!1}return i}finally{ir=null,ct=r,hu=!1}}var gu=!1,fu=null,Oa=-1,jE=5,GE=-1;function VE(){return!(ge.unstable_now()-GE<jE)}function _m(){if(fu!==null){var e=ge.unstable_now();GE=e;var t=!0;try{t=fu(!0,e)}finally{t?Ma():(gu=!1,fu=null)}}else gu=!1}var Ma;typeof HE=="function"?Ma=function(){HE(_m)}:typeof MessageChannel<"u"?(Em=new MessageChannel,zE=Em.port2,Em.port1.onmessage=_m,Ma=function(){zE.postMessage(null)}):Ma=function(){$E(_m,0)};var Em,zE;function wm(e){fu=e,gu||(gu=!0,Ma())}function xm(e,t){Oa=$E(function(){e(ge.unstable_now())},t)}ge.unstable_IdlePriority=5;ge.unstable_ImmediatePriority=1;ge.unstable_LowPriority=4;ge.unstable_NormalPriority=3;ge.unstable_Profiling=null;ge.unstable_UserBlockingPriority=2;ge.unstable_cancelCallback=function(e){e.callback=null};ge.unstable_continueExecution=function(){Bo||hu||(Bo=!0,wm(Im))};ge.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):jE=0<e?Math.floor(1e3/e):5};ge.unstable_getCurrentPriorityLevel=function(){return ct};ge.unstable_getFirstCallbackNode=function(){return wr(Wr)};ge.unstable_next=function(e){switch(ct){case 1:case 2:case 3:var t=3;break;default:t=ct}var r=ct;ct=t;try{return e()}finally{ct=r}};ge.unstable_pauseExecution=function(){};ge.unstable_requestPaint=function(){};ge.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=ct;ct=e;try{return t()}finally{ct=r}};ge.unstable_scheduleCallback=function(e,t,r){var n=ge.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:MM++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,Tm(Hn,e),wr(Wr)===null&&e===wr(Hn)&&(La?(WE(Oa),Oa=-1):La=!0,xm(km,r-n))):(e.sortIndex=o,Tm(Wr,e),Bo||hu||(Bo=!0,wm(Im))),e};ge.unstable_shouldYield=VE;ge.unstable_wrapCallback=function(e){var t=ct;return function(){var r=ct;ct=t;try{return e.apply(this,arguments)}finally{ct=r}}}});var KE=Jr((e9,qE)=>{"use strict";qE.exports=YE()});var Qb=Jr(Yt=>{"use strict";var LM=fn(),Gt=KE();function x(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rT=new Set,rl={};function Jo(e,t){as(e,t),as(e+"Capture",t)}function as(e,t){for(rl[e]=t,e=0;e<t.length;e++)rT.add(t[e])}var _n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xm=Object.prototype.hasOwnProperty,OM=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,XE={},JE={};function PM(e){return Xm.call(JE,e)?!0:Xm.call(XE,e)?!1:OM.test(e)?JE[e]=!0:(XE[e]=!0,!1)}function DM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function UM(e,t,r,n){if(t===null||typeof t>"u"||DM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function bt(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new bt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new bt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new bt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new bt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){et[e]=new bt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new bt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new bt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new bt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new bt(e,5,!1,e.toLowerCase(),null,!1,!1)});var $h=/[\-:]([a-z])/g;function Wh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($h,Wh);et[t]=new bt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($h,Wh);et[t]=new bt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($h,Wh);et[t]=new bt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new bt(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new bt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new bt(e,1,!1,e.toLowerCase(),null,!0,!0)});function jh(e,t,r,n){var o=et.hasOwnProperty(t)?et[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(UM(t,r,o,n)&&(r=null),n||o===null?PM(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var kn=LM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Su=Symbol.for("react.element"),Wi=Symbol.for("react.portal"),ji=Symbol.for("react.fragment"),Gh=Symbol.for("react.strict_mode"),Jm=Symbol.for("react.profiler"),nT=Symbol.for("react.provider"),oT=Symbol.for("react.context"),Vh=Symbol.for("react.forward_ref"),Zm=Symbol.for("react.suspense"),Qm=Symbol.for("react.suspense_list"),Yh=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),iT=Symbol.for("react.offscreen"),ZE=Symbol.iterator;function Pa(e){return e===null||typeof e!="object"?null:(e=ZE&&e[ZE]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Object.assign,Rm;function Wa(e){if(Rm===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Rm=t&&t[1]||""}return`
|
|
2
|
+
`+Rm+e}var Cm=!1;function Nm(e,t){if(!e||Cm)return"";Cm=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
3
3
|
`),i=n.stack.split(`
|
|
4
4
|
`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=`
|
|
5
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Nm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ja(e):""}function UM(e){switch(e.tag){case 5:return ja(e.type);case 16:return ja("Lazy");case 13:return ja("Suspense");case 19:return ja("SuspenseList");case 0:case 2:case 15:return e=Cm(e.type,!1),e;case 11:return e=Cm(e.type.render,!1),e;case 1:return e=Cm(e.type,!0),e;default:return""}}function eh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ji:return"Fragment";case $i:return"Portal";case Jm:return"Profiler";case Gh:return"StrictMode";case Qm:return"Suspense";case Zm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oT:return(e.displayName||"Context")+".Consumer";case nT:return(e._context.displayName||"Context")+".Provider";case Vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yh:return t=e.displayName||null,t!==null?t:eh(e.type)||"Memo";case zn:t=e._payload,e=e._init;try{return eh(e(t))}catch{}}return null}function BM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return eh(t);case 8:return t===Gh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function to(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FM(e){var t=sT(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yu(e){e._valueTracker||(e._valueTracker=FM(e))}function aT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=sT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Vu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function th(e,t){var r=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Z0(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=to(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lT(e,t){t=t.checked,t!=null&&Wh(e,"checked",t,!1)}function rh(e,t){lT(e,t);var r=to(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nh(e,t.type,r):t.hasOwnProperty("defaultValue")&&nh(e,t.type,to(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eE(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function nh(e,t,r){(t!=="number"||Vu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wa=Array.isArray;function es(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+to(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function oh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tE(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(R(92));if(Wa(r)){if(1<r.length)throw Error(R(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:to(r)}}function cT(e,t){var r=to(t.value),n=to(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function rE(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uT(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ih(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var vu,dT=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(vu=vu||document.createElement("div"),vu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ya={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},HM=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){HM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ya[t]=Ya[e]})});function pT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ya.hasOwnProperty(e)&&Ya[e]?(""+t).trim():t+"px"}function fT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=pT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var zM=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sh(e,t){if(t){if(zM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function ah(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lh=null;function qh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ch=null,ts=null,rs=null;function nE(e){if(e=El(e)){if(typeof ch!="function")throw Error(R(280));var t=e.stateNode;t&&(t=_d(t),ch(e.stateNode,e.type,t))}}function mT(e){ts?rs?rs.push(e):rs=[e]:ts=e}function hT(){if(ts){var e=ts,t=rs;if(rs=ts=null,nE(e),t)for(e=0;e<t.length;e++)nE(t[e])}}function gT(e,t){return e(t)}function ST(){}var Am=!1;function yT(e,t,r){if(Am)return e(t,r);Am=!0;try{return gT(e,t,r)}finally{Am=!1,(ts!==null||rs!==null)&&(ST(),hT())}}function ol(e,t){var r=e.stateNode;if(r===null)return null;var n=_d(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(R(231,t,typeof r));return r}var uh=!1;if(vn)try{Hi={},Object.defineProperty(Hi,"passive",{get:function(){uh=!0}}),window.addEventListener("test",Hi,Hi),window.removeEventListener("test",Hi,Hi)}catch{uh=!1}var Hi;function $M(e,t,r,n,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(u){this.onError(u)}}var qa=!1,Yu=null,qu=!1,dh=null,jM={onError:function(e){qa=!0,Yu=e}};function WM(e,t,r,n,o,i,s,a,l){qa=!1,Yu=null,$M.apply(jM,arguments)}function GM(e,t,r,n,o,i,s,a,l){if(WM.apply(this,arguments),qa){if(qa){var c=Yu;qa=!1,Yu=null}else throw Error(R(198));qu||(qu=!0,dh=c)}}function Jo(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function vT(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function oE(e){if(Jo(e)!==e)throw Error(R(188))}function VM(e){var t=e.alternate;if(!t){if(t=Jo(e),t===null)throw Error(R(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return oE(o),e;if(i===n)return oE(o),t;i=i.sibling}throw Error(R(188))}if(r.return!==n.return)r=o,n=i;else{for(var s=!1,a=o.child;a;){if(a===r){s=!0,r=o,n=i;break}if(a===n){s=!0,n=o,r=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===r){s=!0,r=i,n=o;break}if(a===n){s=!0,n=i,r=o;break}a=a.sibling}if(!s)throw Error(R(189))}}if(r.alternate!==n)throw Error(R(190))}if(r.tag!==3)throw Error(R(188));return r.stateNode.current===r?e:t}function _T(e){return e=VM(e),e!==null?ET(e):null}function ET(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ET(e);if(t!==null)return t;e=e.sibling}return null}var TT=Gt.unstable_scheduleCallback,iE=Gt.unstable_cancelCallback,YM=Gt.unstable_shouldYield,qM=Gt.unstable_requestPaint,Le=Gt.unstable_now,KM=Gt.unstable_getCurrentPriorityLevel,Kh=Gt.unstable_ImmediatePriority,bT=Gt.unstable_UserBlockingPriority,Ku=Gt.unstable_NormalPriority,XM=Gt.unstable_LowPriority,IT=Gt.unstable_IdlePriority,gd=null,Vr=null;function JM(e){if(Vr&&typeof Vr.onCommitFiberRoot=="function")try{Vr.onCommitFiberRoot(gd,e,void 0,(e.current.flags&128)===128)}catch{}}var Cr=Math.clz32?Math.clz32:e2,QM=Math.log,ZM=Math.LN2;function e2(e){return e>>>=0,e===0?32:31-(QM(e)/ZM|0)|0}var _u=64,Eu=4194304;function Ga(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=Ga(a):(i&=s,i!==0&&(n=Ga(i)))}else s=r&~o,s!==0?n=Ga(s):i!==0&&(n=Ga(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Cr(t),o=1<<r,n|=e[r],t&=~o;return n}function t2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function r2(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Cr(i),a=1<<s,l=o[s];l===-1?((a&r)===0||(a&n)!==0)&&(o[s]=t2(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function ph(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xT(){var e=_u;return _u<<=1,(_u&4194240)===0&&(_u=64),e}function Mm(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cr(t),e[t]=r}function n2(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Cr(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function Xh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Cr(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var ae=0;function kT(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var wT,Jh,RT,NT,CT,fh=!1,Tu=[],Yn=null,qn=null,Kn=null,il=new Map,sl=new Map,jn=[],o2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function sE(e,t){switch(e){case"focusin":case"focusout":Yn=null;break;case"dragenter":case"dragleave":qn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":il.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sl.delete(t.pointerId)}}function Pa(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=El(t),t!==null&&Jh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function i2(e,t,r,n,o){switch(t){case"focusin":return Yn=Pa(Yn,e,t,r,n,o),!0;case"dragenter":return qn=Pa(qn,e,t,r,n,o),!0;case"mouseover":return Kn=Pa(Kn,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return il.set(i,Pa(il.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,sl.set(i,Pa(sl.get(i)||null,e,t,r,n,o)),!0}return!1}function AT(e){var t=Ho(e.target);if(t!==null){var r=Jo(t);if(r!==null){if(t=r.tag,t===13){if(t=vT(r),t!==null){e.blockedOn=t,CT(e.priority,function(){RT(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=mh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);lh=n,r.target.dispatchEvent(n),lh=null}else return t=El(r),t!==null&&Jh(t),e.blockedOn=r,!1;t.shift()}return!0}function aE(e,t,r){Pu(e)&&r.delete(t)}function s2(){fh=!1,Yn!==null&&Pu(Yn)&&(Yn=null),qn!==null&&Pu(qn)&&(qn=null),Kn!==null&&Pu(Kn)&&(Kn=null),il.forEach(aE),sl.forEach(aE)}function Ua(e,t){e.blockedOn===t&&(e.blockedOn=null,fh||(fh=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,s2)))}function al(e){function t(o){return Ua(o,e)}if(0<Tu.length){Ua(Tu[0],e);for(var r=1;r<Tu.length;r++){var n=Tu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Yn!==null&&Ua(Yn,e),qn!==null&&Ua(qn,e),Kn!==null&&Ua(Kn,e),il.forEach(t),sl.forEach(t),r=0;r<jn.length;r++)n=jn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<jn.length&&(r=jn[0],r.blockedOn===null);)AT(r),r.blockedOn===null&&jn.shift()}var ns=bn.ReactCurrentBatchConfig,Ju=!0;function a2(e,t,r,n){var o=ae,i=ns.transition;ns.transition=null;try{ae=1,Qh(e,t,r,n)}finally{ae=o,ns.transition=i}}function l2(e,t,r,n){var o=ae,i=ns.transition;ns.transition=null;try{ae=4,Qh(e,t,r,n)}finally{ae=o,ns.transition=i}}function Qh(e,t,r,n){if(Ju){var o=mh(e,t,r,n);if(o===null)Fm(e,t,n,Qu,r),sE(e,n);else if(i2(o,e,t,r,n))n.stopPropagation();else if(sE(e,n),t&4&&-1<o2.indexOf(e)){for(;o!==null;){var i=El(o);if(i!==null&&wT(i),i=mh(e,t,r,n),i===null&&Fm(e,t,n,Qu,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else Fm(e,t,n,null,r)}}var Qu=null;function mh(e,t,r,n){if(Qu=null,e=qh(n),e=Ho(e),e!==null)if(t=Jo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=vT(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qu=e,null}function MT(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(KM()){case Kh:return 1;case bT:return 4;case Ku:case XM:return 16;case IT:return 536870912;default:return 16}default:return 16}}var Gn=null,Zh=null,Uu=null;function LT(){if(Uu)return Uu;var e,t=Zh,r=t.length,n,o="value"in Gn?Gn.value:Gn.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===o[i-n];n++);return Uu=o.slice(e,1<n?1-n:void 0)}function Bu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bu(){return!0}function lE(){return!1}function Vt(e){function t(r,n,o,i,s){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bu:lE,this.isPropagationStopped=lE,this}return Re(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=bu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=bu)},persist:function(){},isPersistent:bu}),t}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eg=Vt(fs),_l=Re({},fs,{view:0,detail:0}),c2=Vt(_l),Lm,Om,Ba,Sd=Re({},_l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ba&&(Ba&&e.type==="mousemove"?(Lm=e.screenX-Ba.screenX,Om=e.screenY-Ba.screenY):Om=Lm=0,Ba=e),Lm)},movementY:function(e){return"movementY"in e?e.movementY:Om}}),cE=Vt(Sd),u2=Re({},Sd,{dataTransfer:0}),d2=Vt(u2),p2=Re({},_l,{relatedTarget:0}),Dm=Vt(p2),f2=Re({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=Vt(f2),h2=Re({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Vt(h2),S2=Re({},fs,{data:0}),uE=Vt(S2),y2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_2[e])?!!t[e]:!1}function tg(){return E2}var T2=Re({},_l,{key:function(e){if(e.key){var t=y2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(e){return e.type==="keypress"?Bu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b2=Vt(T2),I2=Re({},Sd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dE=Vt(I2),x2=Re({},_l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),k2=Vt(x2),w2=Re({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),R2=Vt(w2),N2=Re({},Sd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),C2=Vt(N2),A2=[9,13,27,32],rg=vn&&"CompositionEvent"in window,Ka=null;vn&&"documentMode"in document&&(Ka=document.documentMode);var M2=vn&&"TextEvent"in window&&!Ka,OT=vn&&(!rg||Ka&&8<Ka&&11>=Ka),pE=" ",fE=!1;function DT(e,t){switch(e){case"keyup":return A2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wi=!1;function L2(e,t){switch(e){case"compositionend":return PT(t);case"keypress":return t.which!==32?null:(fE=!0,pE);case"textInput":return e=t.data,e===pE&&fE?null:e;default:return null}}function O2(e,t){if(Wi)return e==="compositionend"||!rg&&DT(e,t)?(e=LT(),Uu=Zh=Gn=null,Wi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return OT&&t.locale!=="ko"?null:t.data;default:return null}}var D2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!D2[e.type]:t==="textarea"}function UT(e,t,r,n){mT(n),t=Zu(t,"onChange"),0<t.length&&(r=new eg("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Xa=null,ll=null;function P2(e){qT(e,0)}function yd(e){var t=Yi(e);if(aT(t))return e}function U2(e,t){if(e==="change")return t}var BT=!1;vn&&(vn?(xu="oninput"in document,xu||(Pm=document.createElement("div"),Pm.setAttribute("oninput","return;"),xu=typeof Pm.oninput=="function"),Iu=xu):Iu=!1,BT=Iu&&(!document.documentMode||9<document.documentMode));var Iu,xu,Pm;function hE(){Xa&&(Xa.detachEvent("onpropertychange",FT),ll=Xa=null)}function FT(e){if(e.propertyName==="value"&&yd(ll)){var t=[];UT(t,ll,e,qh(e)),yT(P2,t)}}function B2(e,t,r){e==="focusin"?(hE(),Xa=t,ll=r,Xa.attachEvent("onpropertychange",FT)):e==="focusout"&&hE()}function F2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yd(ll)}function H2(e,t){if(e==="click")return yd(t)}function z2(e,t){if(e==="input"||e==="change")return yd(t)}function $2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mr=typeof Object.is=="function"?Object.is:$2;function cl(e,t){if(Mr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Xm.call(t,o)||!Mr(e[o],t[o]))return!1}return!0}function gE(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function SE(e,t){var r=gE(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gE(r)}}function HT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zT(){for(var e=window,t=Vu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Vu(e.document)}return t}function ng(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function j2(e){var t=zT(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HT(r.ownerDocument.documentElement,r)){if(n!==null&&ng(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=SE(r,i);var s=SE(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var W2=vn&&"documentMode"in document&&11>=document.documentMode,Gi=null,hh=null,Ja=null,gh=!1;function yE(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gh||Gi==null||Gi!==Vu(n)||(n=Gi,"selectionStart"in n&&ng(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ja&&cl(Ja,n)||(Ja=n,n=Zu(hh,"onSelect"),0<n.length&&(t=new eg("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Gi)))}function ku(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vi={animationend:ku("Animation","AnimationEnd"),animationiteration:ku("Animation","AnimationIteration"),animationstart:ku("Animation","AnimationStart"),transitionend:ku("Transition","TransitionEnd")},Um={},$T={};vn&&($T=document.createElement("div").style,"AnimationEvent"in window||(delete Vi.animationend.animation,delete Vi.animationiteration.animation,delete Vi.animationstart.animation),"TransitionEvent"in window||delete Vi.transitionend.transition);function vd(e){if(Um[e])return Um[e];if(!Vi[e])return e;var t=Vi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in $T)return Um[e]=t[r];return e}var jT=vd("animationend"),WT=vd("animationiteration"),GT=vd("animationstart"),VT=vd("transitionend"),YT=new Map,vE="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function no(e,t){YT.set(e,t),Xo(t,[e])}for(wu=0;wu<vE.length;wu++)Ru=vE[wu],_E=Ru.toLowerCase(),EE=Ru[0].toUpperCase()+Ru.slice(1),no(_E,"on"+EE);var Ru,_E,EE,wu;no(jT,"onAnimationEnd");no(WT,"onAnimationIteration");no(GT,"onAnimationStart");no("dblclick","onDoubleClick");no("focusin","onFocus");no("focusout","onBlur");no(VT,"onTransitionEnd");ss("onMouseEnter",["mouseout","mouseover"]);ss("onMouseLeave",["mouseout","mouseover"]);ss("onPointerEnter",["pointerout","pointerover"]);ss("onPointerLeave",["pointerout","pointerover"]);Xo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Va="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),G2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Va));function TE(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,GM(n,t,void 0,e),e.currentTarget=null}function qT(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var a=n[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;TE(o,a,c),i=l}else for(s=0;s<n.length;s++){if(a=n[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;TE(o,a,c),i=l}}}if(qu)throw e=dh,qu=!1,dh=null,e}function Ee(e,t){var r=t[Eh];r===void 0&&(r=t[Eh]=new Set);var n=e+"__bubble";r.has(n)||(KT(t,e,2,!1),r.add(n))}function Bm(e,t,r){var n=0;t&&(n|=4),KT(r,e,n,t)}var Nu="_reactListening"+Math.random().toString(36).slice(2);function ul(e){if(!e[Nu]){e[Nu]=!0,rT.forEach(function(r){r!=="selectionchange"&&(G2.has(r)||Bm(r,!1,e),Bm(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nu]||(t[Nu]=!0,Bm("selectionchange",!1,t))}}function KT(e,t,r,n){switch(MT(t)){case 1:var o=a2;break;case 4:o=l2;break;default:o=Qh}r=o.bind(null,t,r,e),o=void 0,!uh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Fm(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var a=n.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Ho(a),s===null)return;if(l=s.tag,l===5||l===6){n=i=s;continue e}a=a.parentNode}}n=n.return}yT(function(){var c=i,u=qh(r),d=[];e:{var p=YT.get(e);if(p!==void 0){var f=eg,h=e;switch(e){case"keypress":if(Bu(r)===0)break e;case"keydown":case"keyup":f=b2;break;case"focusin":h="focus",f=Dm;break;case"focusout":h="blur",f=Dm;break;case"beforeblur":case"afterblur":f=Dm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=cE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=d2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=k2;break;case jT:case WT:case GT:f=m2;break;case VT:f=R2;break;case"scroll":f=c2;break;case"wheel":f=C2;break;case"copy":case"cut":case"paste":f=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=dE}var y=(t&4)!==0,E=!y&&e==="scroll",m=y?p!==null?p+"Capture":null:p;y=[];for(var g=c,v;g!==null;){v=g;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,m!==null&&(b=ol(g,m),b!=null&&y.push(dl(g,b,v)))),E)break;g=g.return}0<y.length&&(p=new f(p,h,null,r,u),d.push({event:p,listeners:y}))}}if((t&7)===0){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==lh&&(h=r.relatedTarget||r.fromElement)&&(Ho(h)||h[_n]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(h=r.relatedTarget||r.toElement,f=c,h=h?Ho(h):null,h!==null&&(E=Jo(h),h!==E||h.tag!==5&&h.tag!==6)&&(h=null)):(f=null,h=c),f!==h)){if(y=cE,b="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=dE,b="onPointerLeave",m="onPointerEnter",g="pointer"),E=f==null?p:Yi(f),v=h==null?p:Yi(h),p=new y(b,g+"leave",f,r,u),p.target=E,p.relatedTarget=v,b=null,Ho(u)===c&&(y=new y(m,g+"enter",h,r,u),y.target=v,y.relatedTarget=E,b=y),E=b,f&&h)t:{for(y=f,m=h,g=0,v=y;v;v=zi(v))g++;for(v=0,b=m;b;b=zi(b))v++;for(;0<g-v;)y=zi(y),g--;for(;0<v-g;)m=zi(m),v--;for(;g--;){if(y===m||m!==null&&y===m.alternate)break t;y=zi(y),m=zi(m)}y=null}else y=null;f!==null&&bE(d,p,f,y,!1),h!==null&&E!==null&&bE(d,E,h,y,!0)}}e:{if(p=c?Yi(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var k=U2;else if(mE(p))if(BT)k=z2;else{k=F2;var w=B2}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=H2);if(k&&(k=k(e,c))){UT(d,k,r,u);break e}w&&w(e,p,c),e==="focusout"&&(w=p._wrapperState)&&w.controlled&&p.type==="number"&&nh(p,"number",p.value)}switch(w=c?Yi(c):window,e){case"focusin":(mE(w)||w.contentEditable==="true")&&(Gi=w,hh=c,Ja=null);break;case"focusout":Ja=hh=Gi=null;break;case"mousedown":gh=!0;break;case"contextmenu":case"mouseup":case"dragend":gh=!1,yE(d,r,u);break;case"selectionchange":if(W2)break;case"keydown":case"keyup":yE(d,r,u)}var _;if(rg)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else Wi?DT(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(OT&&r.locale!=="ko"&&(Wi||I!=="onCompositionStart"?I==="onCompositionEnd"&&Wi&&(_=LT()):(Gn=u,Zh="value"in Gn?Gn.value:Gn.textContent,Wi=!0)),w=Zu(c,I),0<w.length&&(I=new uE(I,e,null,r,u),d.push({event:I,listeners:w}),_?I.data=_:(_=PT(r),_!==null&&(I.data=_)))),(_=M2?L2(e,r):O2(e,r))&&(c=Zu(c,"onBeforeInput"),0<c.length&&(u=new uE("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=_))}qT(d,t)})}function dl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Zu(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ol(e,r),i!=null&&n.unshift(dl(e,i,o)),i=ol(e,t),i!=null&&n.push(dl(e,i,o))),e=e.return}return n}function zi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bE(e,t,r,n,o){for(var i=t._reactName,s=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,o?(l=ol(r,i),l!=null&&s.unshift(dl(r,l,a))):o||(l=ol(r,i),l!=null&&s.push(dl(r,l,a)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var V2=/\r\n?/g,Y2=/\u0000|\uFFFD/g;function IE(e){return(typeof e=="string"?e:""+e).replace(V2,`
|
|
6
|
-
`).replace(Y2,"")}function Cu(e,t,r){if(t=IE(t),IE(e)!==t&&r)throw Error(R(425))}function ed(){}var Sh=null,yh=null;function vh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _h=typeof setTimeout=="function"?setTimeout:void 0,q2=typeof clearTimeout=="function"?clearTimeout:void 0,xE=typeof Promise=="function"?Promise:void 0,K2=typeof queueMicrotask=="function"?queueMicrotask:typeof xE<"u"?function(e){return xE.resolve(null).then(e).catch(X2)}:_h;function X2(e){setTimeout(function(){throw e})}function Hm(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),al(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);al(t)}function Xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function kE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ms=Math.random().toString(36).slice(2),Gr="__reactFiber$"+ms,pl="__reactProps$"+ms,_n="__reactContainer$"+ms,Eh="__reactEvents$"+ms,J2="__reactListeners$"+ms,Q2="__reactHandles$"+ms;function Ho(e){var t=e[Gr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[_n]||r[Gr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=kE(e);e!==null;){if(r=e[Gr])return r;e=kE(e)}return t}e=r,r=e.parentNode}return null}function El(e){return e=e[Gr]||e[_n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function _d(e){return e[pl]||null}var Th=[],qi=-1;function oo(e){return{current:e}}function Te(e){0>qi||(e.current=Th[qi],Th[qi]=null,qi--)}function Se(e,t){qi++,Th[qi]=e.current,e.current=t}var ro={},pt=oo(ro),Mt=oo(!1),Go=ro;function as(e,t){var r=e.type.contextTypes;if(!r)return ro;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Lt(e){return e=e.childContextTypes,e!=null}function td(){Te(Mt),Te(pt)}function wE(e,t,r){if(pt.current!==ro)throw Error(R(168));Se(pt,t),Se(Mt,r)}function XT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(R(108,BM(e)||"Unknown",o));return Re({},r,n)}function rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ro,Go=pt.current,Se(pt,e),Se(Mt,Mt.current),!0}function RE(e,t,r){var n=e.stateNode;if(!n)throw Error(R(169));r?(e=XT(e,t,Go),n.__reactInternalMemoizedMergedChildContext=e,Te(Mt),Te(pt),Se(pt,e)):Te(Mt),Se(Mt,r)}var hn=null,Ed=!1,zm=!1;function JT(e){hn===null?hn=[e]:hn.push(e)}function Z2(e){Ed=!0,JT(e)}function io(){if(!zm&&hn!==null){zm=!0;var e=0,t=ae;try{var r=hn;for(ae=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}hn=null,Ed=!1}catch(o){throw hn!==null&&(hn=hn.slice(e+1)),TT(Kh,io),o}finally{ae=t,zm=!1}}return null}var Ki=[],Xi=0,nd=null,od=0,sr=[],ar=0,Vo=null,gn=1,Sn="";function Bo(e,t){Ki[Xi++]=od,Ki[Xi++]=nd,nd=e,od=t}function QT(e,t,r){sr[ar++]=gn,sr[ar++]=Sn,sr[ar++]=Vo,Vo=e;var n=gn;e=Sn;var o=32-Cr(n)-1;n&=~(1<<o),r+=1;var i=32-Cr(t)+o;if(30<i){var s=o-o%5;i=(n&(1<<s)-1).toString(32),n>>=s,o-=s,gn=1<<32-Cr(t)+o|r<<o|n,Sn=i+e}else gn=1<<i|r<<o|n,Sn=e}function og(e){e.return!==null&&(Bo(e,1),QT(e,1,0))}function ig(e){for(;e===nd;)nd=Ki[--Xi],Ki[Xi]=null,od=Ki[--Xi],Ki[Xi]=null;for(;e===Vo;)Vo=sr[--ar],sr[ar]=null,Sn=sr[--ar],sr[ar]=null,gn=sr[--ar],sr[ar]=null}var Wt=null,jt=null,Ie=!1,Nr=null;function ZT(e,t){var r=lr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function NE(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,jt=Xn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,jt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Vo!==null?{id:gn,overflow:Sn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=lr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Wt=e,jt=null,!0):!1;default:return!1}}function bh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ih(e){if(Ie){var t=jt;if(t){var r=t;if(!NE(e,t)){if(bh(e))throw Error(R(418));t=Xn(r.nextSibling);var n=Wt;t&&NE(e,t)?ZT(n,r):(e.flags=e.flags&-4097|2,Ie=!1,Wt=e)}}else{if(bh(e))throw Error(R(418));e.flags=e.flags&-4097|2,Ie=!1,Wt=e}}}function CE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Au(e){if(e!==Wt)return!1;if(!Ie)return CE(e),Ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vh(e.type,e.memoizedProps)),t&&(t=jt)){if(bh(e))throw eb(),Error(R(418));for(;t;)ZT(e,t),t=Xn(t.nextSibling)}if(CE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){jt=Xn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}jt=null}}else jt=Wt?Xn(e.stateNode.nextSibling):null;return!0}function eb(){for(var e=jt;e;)e=Xn(e.nextSibling)}function ls(){jt=Wt=null,Ie=!1}function sg(e){Nr===null?Nr=[e]:Nr.push(e)}var eL=bn.ReactCurrentBatchConfig;function Fa(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(R(309));var n=r.stateNode}if(!n)throw Error(R(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(R(284));if(!r._owner)throw Error(R(290,e))}return e}function Mu(e,t){throw e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function AE(e){var t=e._init;return t(e._payload)}function tb(e){function t(m,g){if(e){var v=m.deletions;v===null?(m.deletions=[g],m.flags|=16):v.push(g)}}function r(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function n(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function o(m,g){return m=eo(m,g),m.index=0,m.sibling=null,m}function i(m,g,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<g?(m.flags|=2,g):v):(m.flags|=2,g)):(m.flags|=1048576,g)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,v,b){return g===null||g.tag!==6?(g=qm(v,m.mode,b),g.return=m,g):(g=o(g,v),g.return=m,g)}function l(m,g,v,b){var k=v.type;return k===ji?u(m,g,v.props.children,b,v.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===zn&&AE(k)===g.type)?(b=o(g,v.props),b.ref=Fa(m,g,v),b.return=m,b):(b=Gu(v.type,v.key,v.props,null,m.mode,b),b.ref=Fa(m,g,v),b.return=m,b)}function c(m,g,v,b){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Km(v,m.mode,b),g.return=m,g):(g=o(g,v.children||[]),g.return=m,g)}function u(m,g,v,b,k){return g===null||g.tag!==7?(g=Wo(v,m.mode,b,k),g.return=m,g):(g=o(g,v),g.return=m,g)}function d(m,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=qm(""+g,m.mode,v),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Su:return v=Gu(g.type,g.key,g.props,null,m.mode,v),v.ref=Fa(m,null,g),v.return=m,v;case $i:return g=Km(g,m.mode,v),g.return=m,g;case zn:var b=g._init;return d(m,b(g._payload),v)}if(Wa(g)||Da(g))return g=Wo(g,m.mode,v,null),g.return=m,g;Mu(m,g)}return null}function p(m,g,v,b){var k=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:a(m,g,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:return v.key===k?l(m,g,v,b):null;case $i:return v.key===k?c(m,g,v,b):null;case zn:return k=v._init,p(m,g,k(v._payload),b)}if(Wa(v)||Da(v))return k!==null?null:u(m,g,v,b,null);Mu(m,v)}return null}function f(m,g,v,b,k){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(v)||null,a(g,m,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Su:return m=m.get(b.key===null?v:b.key)||null,l(g,m,b,k);case $i:return m=m.get(b.key===null?v:b.key)||null,c(g,m,b,k);case zn:var w=b._init;return f(m,g,v,w(b._payload),k)}if(Wa(b)||Da(b))return m=m.get(v)||null,u(g,m,b,k,null);Mu(g,b)}return null}function h(m,g,v,b){for(var k=null,w=null,_=g,I=g=0,j=null;_!==null&&I<v.length;I++){_.index>I?(j=_,_=null):j=_.sibling;var x=p(m,_,v[I],b);if(x===null){_===null&&(_=j);break}e&&_&&x.alternate===null&&t(m,_),g=i(x,g,I),w===null?k=x:w.sibling=x,w=x,_=j}if(I===v.length)return r(m,_),Ie&&Bo(m,I),k;if(_===null){for(;I<v.length;I++)_=d(m,v[I],b),_!==null&&(g=i(_,g,I),w===null?k=_:w.sibling=_,w=_);return Ie&&Bo(m,I),k}for(_=n(m,_);I<v.length;I++)j=f(_,m,I,v[I],b),j!==null&&(e&&j.alternate!==null&&_.delete(j.key===null?I:j.key),g=i(j,g,I),w===null?k=j:w.sibling=j,w=j);return e&&_.forEach(function(D){return t(m,D)}),Ie&&Bo(m,I),k}function y(m,g,v,b){var k=Da(v);if(typeof k!="function")throw Error(R(150));if(v=k.call(v),v==null)throw Error(R(151));for(var w=k=null,_=g,I=g=0,j=null,x=v.next();_!==null&&!x.done;I++,x=v.next()){_.index>I?(j=_,_=null):j=_.sibling;var D=p(m,_,x.value,b);if(D===null){_===null&&(_=j);break}e&&_&&D.alternate===null&&t(m,_),g=i(D,g,I),w===null?k=D:w.sibling=D,w=D,_=j}if(x.done)return r(m,_),Ie&&Bo(m,I),k;if(_===null){for(;!x.done;I++,x=v.next())x=d(m,x.value,b),x!==null&&(g=i(x,g,I),w===null?k=x:w.sibling=x,w=x);return Ie&&Bo(m,I),k}for(_=n(m,_);!x.done;I++,x=v.next())x=f(_,m,I,x.value,b),x!==null&&(e&&x.alternate!==null&&_.delete(x.key===null?I:x.key),g=i(x,g,I),w===null?k=x:w.sibling=x,w=x);return e&&_.forEach(function(Y){return t(m,Y)}),Ie&&Bo(m,I),k}function E(m,g,v,b){if(typeof v=="object"&&v!==null&&v.type===ji&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:e:{for(var k=v.key,w=g;w!==null;){if(w.key===k){if(k=v.type,k===ji){if(w.tag===7){r(m,w.sibling),g=o(w,v.props.children),g.return=m,m=g;break e}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===zn&&AE(k)===w.type){r(m,w.sibling),g=o(w,v.props),g.ref=Fa(m,w,v),g.return=m,m=g;break e}r(m,w);break}else t(m,w);w=w.sibling}v.type===ji?(g=Wo(v.props.children,m.mode,b,v.key),g.return=m,m=g):(b=Gu(v.type,v.key,v.props,null,m.mode,b),b.ref=Fa(m,g,v),b.return=m,m=b)}return s(m);case $i:e:{for(w=v.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){r(m,g.sibling),g=o(g,v.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=Km(v,m.mode,b),g.return=m,m=g}return s(m);case zn:return w=v._init,E(m,g,w(v._payload),b)}if(Wa(v))return h(m,g,v,b);if(Da(v))return y(m,g,v,b);Mu(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(r(m,g.sibling),g=o(g,v),g.return=m,m=g):(r(m,g),g=qm(v,m.mode,b),g.return=m,m=g),s(m)):r(m,g)}return E}var cs=tb(!0),rb=tb(!1),id=oo(null),sd=null,Ji=null,ag=null;function lg(){ag=Ji=sd=null}function cg(e){var t=id.current;Te(id),e._currentValue=t}function xh(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function os(e,t){sd=e,ag=Ji=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(At=!0),e.firstContext=null)}function ur(e){var t=e._currentValue;if(ag!==e)if(e={context:e,memoizedValue:t,next:null},Ji===null){if(sd===null)throw Error(R(308));Ji=e,sd.dependencies={lanes:0,firstContext:e}}else Ji=Ji.next=e;return t}var zo=null;function ug(e){zo===null?zo=[e]:zo.push(e)}function nb(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,ug(t)):(r.next=o.next,o.next=r),t.interleaved=r,En(e,n)}function En(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var $n=!1;function dg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ob(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Z&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,En(e,r)}return o=n.interleaved,o===null?(t.next=t,ug(n)):(t.next=o.next,o.next=t),n.interleaved=t,En(e,r)}function Fu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xh(e,r)}}function ME(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ad(e,t,r,n){var o=e.updateQueue;$n=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,u=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,y=a;switch(p=t,f=r,y.tag){case 1:if(h=y.payload,typeof h=="function"){d=h.call(f,d,p);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=y.payload,p=typeof h=="function"?h.call(f,d,p):h,p==null)break e;d=Re({},d,p);break e;case 2:$n=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,s|=p;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;p=a,a=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);qo|=s,e.lanes=s,e.memoizedState=d}}function LE(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(R(191,o));o.call(n)}}}var Tl={},Yr=oo(Tl),fl=oo(Tl),ml=oo(Tl);function $o(e){if(e===Tl)throw Error(R(174));return e}function pg(e,t){switch(Se(ml,t),Se(fl,e),Se(Yr,Tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ih(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ih(t,e)}Te(Yr),Se(Yr,t)}function us(){Te(Yr),Te(fl),Te(ml)}function ib(e){$o(ml.current);var t=$o(Yr.current),r=ih(t,e.type);t!==r&&(Se(fl,e),Se(Yr,r))}function fg(e){fl.current===e&&(Te(Yr),Te(fl))}var ke=oo(0);function ld(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $m=[];function mg(){for(var e=0;e<$m.length;e++)$m[e]._workInProgressVersionPrimary=null;$m.length=0}var Hu=bn.ReactCurrentDispatcher,jm=bn.ReactCurrentBatchConfig,Yo=0,we=null,ze=null,Ge=null,cd=!1,Qa=!1,hl=0,tL=0;function ct(){throw Error(R(321))}function hg(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Mr(e[r],t[r]))return!1;return!0}function gg(e,t,r,n,o,i){if(Yo=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hu.current=e===null||e.memoizedState===null?iL:sL,e=r(n,o),Qa){i=0;do{if(Qa=!1,hl=0,25<=i)throw Error(R(301));i+=1,Ge=ze=null,t.updateQueue=null,Hu.current=aL,e=r(n,o)}while(Qa)}if(Hu.current=ud,t=ze!==null&&ze.next!==null,Yo=0,Ge=ze=we=null,cd=!1,t)throw Error(R(300));return e}function Sg(){var e=hl!==0;return hl=0,e}function Wr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?we.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function dr(){if(ze===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ge===null?we.memoizedState:Ge.next;if(t!==null)Ge=t,ze=e;else{if(e===null)throw Error(R(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ge===null?we.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function gl(e,t){return typeof t=="function"?t(e):t}function Wm(e){var t=dr(),r=t.queue;if(r===null)throw Error(R(311));r.lastRenderedReducer=e;var n=ze,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Yo&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=n):l=l.next=d,we.lanes|=u,qo|=u}c=c.next}while(c!==null&&c!==i);l===null?s=n:l.next=a,Mr(n,t.memoizedState)||(At=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,we.lanes|=i,qo|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Gm(e){var t=dr(),r=t.queue;if(r===null)throw Error(R(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Mr(i,t.memoizedState)||(At=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function sb(){}function ab(e,t){var r=we,n=dr(),o=t(),i=!Mr(n.memoizedState,o);if(i&&(n.memoizedState=o,At=!0),n=n.queue,yg(ub.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ge!==null&&Ge.memoizedState.tag&1){if(r.flags|=2048,Sl(9,cb.bind(null,r,n,o,t),void 0,null),Ve===null)throw Error(R(349));(Yo&30)!==0||lb(r,t,o)}return o}function lb(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function cb(e,t,r,n){t.value=r,t.getSnapshot=n,db(t)&&pb(e)}function ub(e,t,r){return r(function(){db(t)&&pb(e)})}function db(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Mr(e,r)}catch{return!0}}function pb(e){var t=En(e,1);t!==null&&Ar(t,e,1,-1)}function OE(e){var t=Wr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:e},t.queue=e,e=e.dispatch=oL.bind(null,we,e),[t.memoizedState,e]}function Sl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function fb(){return dr().memoizedState}function zu(e,t,r,n){var o=Wr();we.flags|=e,o.memoizedState=Sl(1|t,r,void 0,n===void 0?null:n)}function Td(e,t,r,n){var o=dr();n=n===void 0?null:n;var i=void 0;if(ze!==null){var s=ze.memoizedState;if(i=s.destroy,n!==null&&hg(n,s.deps)){o.memoizedState=Sl(t,r,i,n);return}}we.flags|=e,o.memoizedState=Sl(1|t,r,i,n)}function DE(e,t){return zu(8390656,8,e,t)}function yg(e,t){return Td(2048,8,e,t)}function mb(e,t){return Td(4,2,e,t)}function hb(e,t){return Td(4,4,e,t)}function gb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sb(e,t,r){return r=r!=null?r.concat([e]):null,Td(4,4,gb.bind(null,t,e),r)}function vg(){}function yb(e,t){var r=dr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&hg(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function vb(e,t){var r=dr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&hg(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function _b(e,t,r){return(Yo&21)===0?(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=r):(Mr(r,t)||(r=xT(),we.lanes|=r,qo|=r,e.baseState=!0),t)}function rL(e,t){var r=ae;ae=r!==0&&4>r?r:4,e(!0);var n=jm.transition;jm.transition={};try{e(!1),t()}finally{ae=r,jm.transition=n}}function Eb(){return dr().memoizedState}function nL(e,t,r){var n=Zn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Tb(e))bb(t,r);else if(r=nb(e,t,r,n),r!==null){var o=Et();Ar(r,e,n,o),Ib(r,t,n)}}function oL(e,t,r){var n=Zn(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Tb(e))bb(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,Mr(a,s)){var l=t.interleaved;l===null?(o.next=o,ug(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=nb(e,t,o,n),r!==null&&(o=Et(),Ar(r,e,n,o),Ib(r,t,n))}}function Tb(e){var t=e.alternate;return e===we||t!==null&&t===we}function bb(e,t){Qa=cd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ib(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xh(e,r)}}var ud={readContext:ur,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},iL={readContext:ur,useCallback:function(e,t){return Wr().memoizedState=[e,t===void 0?null:t],e},useContext:ur,useEffect:DE,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zu(4194308,4,gb.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zu(4194308,4,e,t)},useInsertionEffect:function(e,t){return zu(4,2,e,t)},useMemo:function(e,t){var r=Wr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Wr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=nL.bind(null,we,e),[n.memoizedState,e]},useRef:function(e){var t=Wr();return e={current:e},t.memoizedState=e},useState:OE,useDebugValue:vg,useDeferredValue:function(e){return Wr().memoizedState=e},useTransition:function(){var e=OE(!1),t=e[0];return e=rL.bind(null,e[1]),Wr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=we,o=Wr();if(Ie){if(r===void 0)throw Error(R(407));r=r()}else{if(r=t(),Ve===null)throw Error(R(349));(Yo&30)!==0||lb(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,DE(ub.bind(null,n,i,e),[e]),n.flags|=2048,Sl(9,cb.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Wr(),t=Ve.identifierPrefix;if(Ie){var r=Sn,n=gn;r=(n&~(1<<32-Cr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=hl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=tL++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sL={readContext:ur,useCallback:yb,useContext:ur,useEffect:yg,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:hb,useMemo:vb,useReducer:Wm,useRef:fb,useState:function(){return Wm(gl)},useDebugValue:vg,useDeferredValue:function(e){var t=dr();return _b(t,ze.memoizedState,e)},useTransition:function(){var e=Wm(gl)[0],t=dr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1},aL={readContext:ur,useCallback:yb,useContext:ur,useEffect:yg,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:hb,useMemo:vb,useReducer:Gm,useRef:fb,useState:function(){return Gm(gl)},useDebugValue:vg,useDeferredValue:function(e){var t=dr();return ze===null?t.memoizedState=e:_b(t,ze.memoizedState,e)},useTransition:function(){var e=Gm(gl)[0],t=dr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1};function wr(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function kh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Re({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bd={isMounted:function(e){return(e=e._reactInternals)?Jo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Et(),o=Zn(e),i=yn(n,o);i.payload=t,r!=null&&(i.callback=r),t=Jn(e,i,o),t!==null&&(Ar(t,e,o,n),Fu(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Et(),o=Zn(e),i=yn(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Jn(e,i,o),t!==null&&(Ar(t,e,o,n),Fu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Et(),n=Zn(e),o=yn(r,n);o.tag=2,t!=null&&(o.callback=t),t=Jn(e,o,n),t!==null&&(Ar(t,e,n,r),Fu(t,e,n))}};function PE(e,t,r,n,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!cl(r,n)||!cl(o,i):!0}function xb(e,t,r){var n=!1,o=ro,i=t.contextType;return typeof i=="object"&&i!==null?i=ur(i):(o=Lt(t)?Go:pt.current,n=t.contextTypes,i=(n=n!=null)?as(e,o):ro),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function UE(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&bd.enqueueReplaceState(t,t.state,null)}function wh(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},dg(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ur(i):(i=Lt(t)?Go:pt.current,o.context=as(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(kh(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&bd.enqueueReplaceState(o,o.state,null),ad(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ds(e,t){try{var r="",n=t;do r+=UM(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
5
|
+
`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Cm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Wa(e):""}function BM(e){switch(e.tag){case 5:return Wa(e.type);case 16:return Wa("Lazy");case 13:return Wa("Suspense");case 19:return Wa("SuspenseList");case 0:case 2:case 15:return e=Nm(e.type,!1),e;case 11:return e=Nm(e.type.render,!1),e;case 1:return e=Nm(e.type,!0),e;default:return""}}function eh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ji:return"Fragment";case Wi:return"Portal";case Jm:return"Profiler";case Gh:return"StrictMode";case Zm:return"Suspense";case Qm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oT:return(e.displayName||"Context")+".Consumer";case nT:return(e._context.displayName||"Context")+".Provider";case Vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yh:return t=e.displayName||null,t!==null?t:eh(e.type)||"Memo";case $n:t=e._payload,e=e._init;try{return eh(e(t))}catch{}}return null}function FM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return eh(t);case 8:return t===Gh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ro(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function HM(e){var t=sT(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yu(e){e._valueTracker||(e._valueTracker=HM(e))}function aT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=sT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Vu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function th(e,t){var r=t.checked;return Ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function QE(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ro(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lT(e,t){t=t.checked,t!=null&&jh(e,"checked",t,!1)}function rh(e,t){lT(e,t);var r=ro(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nh(e,t.type,r):t.hasOwnProperty("defaultValue")&&nh(e,t.type,ro(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function e0(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function nh(e,t,r){(t!=="number"||Vu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ja=Array.isArray;function ts(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+ro(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function oh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(x(91));return Ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function t0(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(x(92));if(ja(r)){if(1<r.length)throw Error(x(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ro(r)}}function cT(e,t){var r=ro(t.value),n=ro(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function r0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uT(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ih(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var vu,dT=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(vu=vu||document.createElement("div"),vu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ya={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zM=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){zM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ya[t]=Ya[e]})});function pT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ya.hasOwnProperty(e)&&Ya[e]?(""+t).trim():t+"px"}function fT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=pT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var $M=Ce({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sh(e,t){if(t){if($M[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function ah(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lh=null;function qh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ch=null,rs=null,ns=null;function n0(e){if(e=El(e)){if(typeof ch!="function")throw Error(x(280));var t=e.stateNode;t&&(t=_d(t),ch(e.stateNode,e.type,t))}}function mT(e){rs?ns?ns.push(e):ns=[e]:rs=e}function hT(){if(rs){var e=rs,t=ns;if(ns=rs=null,n0(e),t)for(e=0;e<t.length;e++)n0(t[e])}}function gT(e,t){return e(t)}function ST(){}var Am=!1;function yT(e,t,r){if(Am)return e(t,r);Am=!0;try{return gT(e,t,r)}finally{Am=!1,(rs!==null||ns!==null)&&(ST(),hT())}}function ol(e,t){var r=e.stateNode;if(r===null)return null;var n=_d(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(x(231,t,typeof r));return r}var uh=!1;if(_n)try{zi={},Object.defineProperty(zi,"passive",{get:function(){uh=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{uh=!1}var zi;function WM(e,t,r,n,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var qa=!1,Yu=null,qu=!1,dh=null,jM={onError:function(e){qa=!0,Yu=e}};function GM(e,t,r,n,o,i,s,a,l){qa=!1,Yu=null,WM.apply(jM,arguments)}function VM(e,t,r,n,o,i,s,a,l){if(GM.apply(this,arguments),qa){if(qa){var c=Yu;qa=!1,Yu=null}else throw Error(x(198));qu||(qu=!0,dh=c)}}function Zo(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function vT(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function o0(e){if(Zo(e)!==e)throw Error(x(188))}function YM(e){var t=e.alternate;if(!t){if(t=Zo(e),t===null)throw Error(x(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return o0(o),e;if(i===n)return o0(o),t;i=i.sibling}throw Error(x(188))}if(r.return!==n.return)r=o,n=i;else{for(var s=!1,a=o.child;a;){if(a===r){s=!0,r=o,n=i;break}if(a===n){s=!0,n=o,r=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===r){s=!0,r=i,n=o;break}if(a===n){s=!0,n=i,r=o;break}a=a.sibling}if(!s)throw Error(x(189))}}if(r.alternate!==n)throw Error(x(190))}if(r.tag!==3)throw Error(x(188));return r.stateNode.current===r?e:t}function _T(e){return e=YM(e),e!==null?ET(e):null}function ET(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ET(e);if(t!==null)return t;e=e.sibling}return null}var TT=Gt.unstable_scheduleCallback,i0=Gt.unstable_cancelCallback,qM=Gt.unstable_shouldYield,KM=Gt.unstable_requestPaint,Oe=Gt.unstable_now,XM=Gt.unstable_getCurrentPriorityLevel,Kh=Gt.unstable_ImmediatePriority,bT=Gt.unstable_UserBlockingPriority,Ku=Gt.unstable_NormalPriority,JM=Gt.unstable_LowPriority,kT=Gt.unstable_IdlePriority,gd=null,Yr=null;function ZM(e){if(Yr&&typeof Yr.onCommitFiberRoot=="function")try{Yr.onCommitFiberRoot(gd,e,void 0,(e.current.flags&128)===128)}catch{}}var Ar=Math.clz32?Math.clz32:t2,QM=Math.log,e2=Math.LN2;function t2(e){return e>>>=0,e===0?32:31-(QM(e)/e2|0)|0}var _u=64,Eu=4194304;function Ga(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=Ga(a):(i&=s,i!==0&&(n=Ga(i)))}else s=r&~o,s!==0?n=Ga(s):i!==0&&(n=Ga(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Ar(t),o=1<<r,n|=e[r],t&=~o;return n}function r2(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function n2(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Ar(i),a=1<<s,l=o[s];l===-1?((a&r)===0||(a&n)!==0)&&(o[s]=r2(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function ph(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function IT(){var e=_u;return _u<<=1,(_u&4194240)===0&&(_u=64),e}function Mm(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ar(t),e[t]=r}function o2(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Ar(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function Xh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ar(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var ae=0;function wT(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var xT,Jh,RT,CT,NT,fh=!1,Tu=[],qn=null,Kn=null,Xn=null,il=new Map,sl=new Map,jn=[],i2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function s0(e,t){switch(e){case"focusin":case"focusout":qn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":il.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sl.delete(t.pointerId)}}function Da(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=El(t),t!==null&&Jh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function s2(e,t,r,n,o){switch(t){case"focusin":return qn=Da(qn,e,t,r,n,o),!0;case"dragenter":return Kn=Da(Kn,e,t,r,n,o),!0;case"mouseover":return Xn=Da(Xn,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return il.set(i,Da(il.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,sl.set(i,Da(sl.get(i)||null,e,t,r,n,o)),!0}return!1}function AT(e){var t=zo(e.target);if(t!==null){var r=Zo(t);if(r!==null){if(t=r.tag,t===13){if(t=vT(r),t!==null){e.blockedOn=t,NT(e.priority,function(){RT(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Du(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=mh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);lh=n,r.target.dispatchEvent(n),lh=null}else return t=El(r),t!==null&&Jh(t),e.blockedOn=r,!1;t.shift()}return!0}function a0(e,t,r){Du(e)&&r.delete(t)}function a2(){fh=!1,qn!==null&&Du(qn)&&(qn=null),Kn!==null&&Du(Kn)&&(Kn=null),Xn!==null&&Du(Xn)&&(Xn=null),il.forEach(a0),sl.forEach(a0)}function Ua(e,t){e.blockedOn===t&&(e.blockedOn=null,fh||(fh=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,a2)))}function al(e){function t(o){return Ua(o,e)}if(0<Tu.length){Ua(Tu[0],e);for(var r=1;r<Tu.length;r++){var n=Tu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(qn!==null&&Ua(qn,e),Kn!==null&&Ua(Kn,e),Xn!==null&&Ua(Xn,e),il.forEach(t),sl.forEach(t),r=0;r<jn.length;r++)n=jn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<jn.length&&(r=jn[0],r.blockedOn===null);)AT(r),r.blockedOn===null&&jn.shift()}var os=kn.ReactCurrentBatchConfig,Ju=!0;function l2(e,t,r,n){var o=ae,i=os.transition;os.transition=null;try{ae=1,Zh(e,t,r,n)}finally{ae=o,os.transition=i}}function c2(e,t,r,n){var o=ae,i=os.transition;os.transition=null;try{ae=4,Zh(e,t,r,n)}finally{ae=o,os.transition=i}}function Zh(e,t,r,n){if(Ju){var o=mh(e,t,r,n);if(o===null)Fm(e,t,n,Zu,r),s0(e,n);else if(s2(o,e,t,r,n))n.stopPropagation();else if(s0(e,n),t&4&&-1<i2.indexOf(e)){for(;o!==null;){var i=El(o);if(i!==null&&xT(i),i=mh(e,t,r,n),i===null&&Fm(e,t,n,Zu,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else Fm(e,t,n,null,r)}}var Zu=null;function mh(e,t,r,n){if(Zu=null,e=qh(n),e=zo(e),e!==null)if(t=Zo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=vT(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zu=e,null}function MT(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(XM()){case Kh:return 1;case bT:return 4;case Ku:case JM:return 16;case kT:return 536870912;default:return 16}default:return 16}}var Vn=null,Qh=null,Uu=null;function LT(){if(Uu)return Uu;var e,t=Qh,r=t.length,n,o="value"in Vn?Vn.value:Vn.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===o[i-n];n++);return Uu=o.slice(e,1<n?1-n:void 0)}function Bu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bu(){return!0}function l0(){return!1}function Vt(e){function t(r,n,o,i,s){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bu:l0,this.isPropagationStopped=l0,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=bu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=bu)},persist:function(){},isPersistent:bu}),t}var ms={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eg=Vt(ms),_l=Ce({},ms,{view:0,detail:0}),u2=Vt(_l),Lm,Om,Ba,Sd=Ce({},_l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ba&&(Ba&&e.type==="mousemove"?(Lm=e.screenX-Ba.screenX,Om=e.screenY-Ba.screenY):Om=Lm=0,Ba=e),Lm)},movementY:function(e){return"movementY"in e?e.movementY:Om}}),c0=Vt(Sd),d2=Ce({},Sd,{dataTransfer:0}),p2=Vt(d2),f2=Ce({},_l,{relatedTarget:0}),Pm=Vt(f2),m2=Ce({},ms,{animationName:0,elapsedTime:0,pseudoElement:0}),h2=Vt(m2),g2=Ce({},ms,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S2=Vt(g2),y2=Ce({},ms,{data:0}),u0=Vt(y2),v2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},E2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function T2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=E2[e])?!!t[e]:!1}function tg(){return T2}var b2=Ce({},_l,{key:function(e){if(e.key){var t=v2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(e){return e.type==="keypress"?Bu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k2=Vt(b2),I2=Ce({},Sd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),d0=Vt(I2),w2=Ce({},_l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),x2=Vt(w2),R2=Ce({},ms,{propertyName:0,elapsedTime:0,pseudoElement:0}),C2=Vt(R2),N2=Ce({},Sd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),A2=Vt(N2),M2=[9,13,27,32],rg=_n&&"CompositionEvent"in window,Ka=null;_n&&"documentMode"in document&&(Ka=document.documentMode);var L2=_n&&"TextEvent"in window&&!Ka,OT=_n&&(!rg||Ka&&8<Ka&&11>=Ka),p0=" ",f0=!1;function PT(e,t){switch(e){case"keyup":return M2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function DT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function O2(e,t){switch(e){case"compositionend":return DT(t);case"keypress":return t.which!==32?null:(f0=!0,p0);case"textInput":return e=t.data,e===p0&&f0?null:e;default:return null}}function P2(e,t){if(Gi)return e==="compositionend"||!rg&&PT(e,t)?(e=LT(),Uu=Qh=Vn=null,Gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return OT&&t.locale!=="ko"?null:t.data;default:return null}}var D2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function m0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!D2[e.type]:t==="textarea"}function UT(e,t,r,n){mT(n),t=Qu(t,"onChange"),0<t.length&&(r=new eg("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Xa=null,ll=null;function U2(e){qT(e,0)}function yd(e){var t=qi(e);if(aT(t))return e}function B2(e,t){if(e==="change")return t}var BT=!1;_n&&(_n?(Iu="oninput"in document,Iu||(Dm=document.createElement("div"),Dm.setAttribute("oninput","return;"),Iu=typeof Dm.oninput=="function"),ku=Iu):ku=!1,BT=ku&&(!document.documentMode||9<document.documentMode));var ku,Iu,Dm;function h0(){Xa&&(Xa.detachEvent("onpropertychange",FT),ll=Xa=null)}function FT(e){if(e.propertyName==="value"&&yd(ll)){var t=[];UT(t,ll,e,qh(e)),yT(U2,t)}}function F2(e,t,r){e==="focusin"?(h0(),Xa=t,ll=r,Xa.attachEvent("onpropertychange",FT)):e==="focusout"&&h0()}function H2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yd(ll)}function z2(e,t){if(e==="click")return yd(t)}function $2(e,t){if(e==="input"||e==="change")return yd(t)}function W2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lr=typeof Object.is=="function"?Object.is:W2;function cl(e,t){if(Lr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Xm.call(t,o)||!Lr(e[o],t[o]))return!1}return!0}function g0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function S0(e,t){var r=g0(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=g0(r)}}function HT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zT(){for(var e=window,t=Vu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Vu(e.document)}return t}function ng(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function j2(e){var t=zT(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HT(r.ownerDocument.documentElement,r)){if(n!==null&&ng(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=S0(r,i);var s=S0(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var G2=_n&&"documentMode"in document&&11>=document.documentMode,Vi=null,hh=null,Ja=null,gh=!1;function y0(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gh||Vi==null||Vi!==Vu(n)||(n=Vi,"selectionStart"in n&&ng(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ja&&cl(Ja,n)||(Ja=n,n=Qu(hh,"onSelect"),0<n.length&&(t=new eg("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Vi)))}function wu(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Yi={animationend:wu("Animation","AnimationEnd"),animationiteration:wu("Animation","AnimationIteration"),animationstart:wu("Animation","AnimationStart"),transitionend:wu("Transition","TransitionEnd")},Um={},$T={};_n&&($T=document.createElement("div").style,"AnimationEvent"in window||(delete Yi.animationend.animation,delete Yi.animationiteration.animation,delete Yi.animationstart.animation),"TransitionEvent"in window||delete Yi.transitionend.transition);function vd(e){if(Um[e])return Um[e];if(!Yi[e])return e;var t=Yi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in $T)return Um[e]=t[r];return e}var WT=vd("animationend"),jT=vd("animationiteration"),GT=vd("animationstart"),VT=vd("transitionend"),YT=new Map,v0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function oo(e,t){YT.set(e,t),Jo(t,[e])}for(xu=0;xu<v0.length;xu++)Ru=v0[xu],_0=Ru.toLowerCase(),E0=Ru[0].toUpperCase()+Ru.slice(1),oo(_0,"on"+E0);var Ru,_0,E0,xu;oo(WT,"onAnimationEnd");oo(jT,"onAnimationIteration");oo(GT,"onAnimationStart");oo("dblclick","onDoubleClick");oo("focusin","onFocus");oo("focusout","onBlur");oo(VT,"onTransitionEnd");as("onMouseEnter",["mouseout","mouseover"]);as("onMouseLeave",["mouseout","mouseover"]);as("onPointerEnter",["pointerout","pointerover"]);as("onPointerLeave",["pointerout","pointerover"]);Jo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Jo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Jo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Jo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Jo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Jo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Va="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),V2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Va));function T0(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,VM(n,t,void 0,e),e.currentTarget=null}function qT(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var a=n[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;T0(o,a,c),i=l}else for(s=0;s<n.length;s++){if(a=n[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;T0(o,a,c),i=l}}}if(qu)throw e=dh,qu=!1,dh=null,e}function Ee(e,t){var r=t[Eh];r===void 0&&(r=t[Eh]=new Set);var n=e+"__bubble";r.has(n)||(KT(t,e,2,!1),r.add(n))}function Bm(e,t,r){var n=0;t&&(n|=4),KT(r,e,n,t)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function ul(e){if(!e[Cu]){e[Cu]=!0,rT.forEach(function(r){r!=="selectionchange"&&(V2.has(r)||Bm(r,!1,e),Bm(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cu]||(t[Cu]=!0,Bm("selectionchange",!1,t))}}function KT(e,t,r,n){switch(MT(t)){case 1:var o=l2;break;case 4:o=c2;break;default:o=Zh}r=o.bind(null,t,r,e),o=void 0,!uh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Fm(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var a=n.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=zo(a),s===null)return;if(l=s.tag,l===5||l===6){n=i=s;continue e}a=a.parentNode}}n=n.return}yT(function(){var c=i,d=qh(r),u=[];e:{var p=YT.get(e);if(p!==void 0){var f=eg,h=e;switch(e){case"keypress":if(Bu(r)===0)break e;case"keydown":case"keyup":f=k2;break;case"focusin":h="focus",f=Pm;break;case"focusout":h="blur",f=Pm;break;case"beforeblur":case"afterblur":f=Pm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=c0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=p2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=x2;break;case WT:case jT:case GT:f=h2;break;case VT:f=C2;break;case"scroll":f=u2;break;case"wheel":f=A2;break;case"copy":case"cut":case"paste":f=S2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=d0}var v=(t&4)!==0,I=!v&&e==="scroll",m=v?p!==null?p+"Capture":null:p;v=[];for(var S=c,y;S!==null;){y=S;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,m!==null&&(b=ol(S,m),b!=null&&v.push(dl(S,b,y)))),I)break;S=S.return}0<v.length&&(p=new f(p,h,null,r,d),u.push({event:p,listeners:v}))}}if((t&7)===0){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==lh&&(h=r.relatedTarget||r.fromElement)&&(zo(h)||h[En]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(h=r.relatedTarget||r.toElement,f=c,h=h?zo(h):null,h!==null&&(I=Zo(h),h!==I||h.tag!==5&&h.tag!==6)&&(h=null)):(f=null,h=c),f!==h)){if(v=c0,b="onMouseLeave",m="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(v=d0,b="onPointerLeave",m="onPointerEnter",S="pointer"),I=f==null?p:qi(f),y=h==null?p:qi(h),p=new v(b,S+"leave",f,r,d),p.target=I,p.relatedTarget=y,b=null,zo(d)===c&&(v=new v(m,S+"enter",h,r,d),v.target=y,v.relatedTarget=I,b=v),I=b,f&&h)t:{for(v=f,m=h,S=0,y=v;y;y=$i(y))S++;for(y=0,b=m;b;b=$i(b))y++;for(;0<S-y;)v=$i(v),S--;for(;0<y-S;)m=$i(m),y--;for(;S--;){if(v===m||m!==null&&v===m.alternate)break t;v=$i(v),m=$i(m)}v=null}else v=null;f!==null&&b0(u,p,f,v,!1),h!==null&&I!==null&&b0(u,I,h,v,!0)}}e:{if(p=c?qi(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var R=B2;else if(m0(p))if(BT)R=$2;else{R=H2;var E=F2}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(R=z2);if(R&&(R=R(e,c))){UT(u,R,r,d);break e}E&&E(e,p,c),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&nh(p,"number",p.value)}switch(E=c?qi(c):window,e){case"focusin":(m0(E)||E.contentEditable==="true")&&(Vi=E,hh=c,Ja=null);break;case"focusout":Ja=hh=Vi=null;break;case"mousedown":gh=!0;break;case"contextmenu":case"mouseup":case"dragend":gh=!1,y0(u,r,d);break;case"selectionchange":if(G2)break;case"keydown":case"keyup":y0(u,r,d)}var _;if(rg)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Gi?PT(e,r)&&(k="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(k="onCompositionStart");k&&(OT&&r.locale!=="ko"&&(Gi||k!=="onCompositionStart"?k==="onCompositionEnd"&&Gi&&(_=LT()):(Vn=d,Qh="value"in Vn?Vn.value:Vn.textContent,Gi=!0)),E=Qu(c,k),0<E.length&&(k=new u0(k,e,null,r,d),u.push({event:k,listeners:E}),_?k.data=_:(_=DT(r),_!==null&&(k.data=_)))),(_=L2?O2(e,r):P2(e,r))&&(c=Qu(c,"onBeforeInput"),0<c.length&&(d=new u0("onBeforeInput","beforeinput",null,r,d),u.push({event:d,listeners:c}),d.data=_))}qT(u,t)})}function dl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Qu(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ol(e,r),i!=null&&n.unshift(dl(e,i,o)),i=ol(e,t),i!=null&&n.push(dl(e,i,o))),e=e.return}return n}function $i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function b0(e,t,r,n,o){for(var i=t._reactName,s=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,o?(l=ol(r,i),l!=null&&s.unshift(dl(r,l,a))):o||(l=ol(r,i),l!=null&&s.push(dl(r,l,a)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var Y2=/\r\n?/g,q2=/\u0000|\uFFFD/g;function k0(e){return(typeof e=="string"?e:""+e).replace(Y2,`
|
|
6
|
+
`).replace(q2,"")}function Nu(e,t,r){if(t=k0(t),k0(e)!==t&&r)throw Error(x(425))}function ed(){}var Sh=null,yh=null;function vh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _h=typeof setTimeout=="function"?setTimeout:void 0,K2=typeof clearTimeout=="function"?clearTimeout:void 0,I0=typeof Promise=="function"?Promise:void 0,X2=typeof queueMicrotask=="function"?queueMicrotask:typeof I0<"u"?function(e){return I0.resolve(null).then(e).catch(J2)}:_h;function J2(e){setTimeout(function(){throw e})}function Hm(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),al(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);al(t)}function Jn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function w0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var hs=Math.random().toString(36).slice(2),Vr="__reactFiber$"+hs,pl="__reactProps$"+hs,En="__reactContainer$"+hs,Eh="__reactEvents$"+hs,Z2="__reactListeners$"+hs,Q2="__reactHandles$"+hs;function zo(e){var t=e[Vr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[En]||r[Vr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=w0(e);e!==null;){if(r=e[Vr])return r;e=w0(e)}return t}e=r,r=e.parentNode}return null}function El(e){return e=e[Vr]||e[En],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function qi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(x(33))}function _d(e){return e[pl]||null}var Th=[],Ki=-1;function io(e){return{current:e}}function Te(e){0>Ki||(e.current=Th[Ki],Th[Ki]=null,Ki--)}function Se(e,t){Ki++,Th[Ki]=e.current,e.current=t}var no={},ft=io(no),Lt=io(!1),Vo=no;function ls(e,t){var r=e.type.contextTypes;if(!r)return no;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ot(e){return e=e.childContextTypes,e!=null}function td(){Te(Lt),Te(ft)}function x0(e,t,r){if(ft.current!==no)throw Error(x(168));Se(ft,t),Se(Lt,r)}function XT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(x(108,FM(e)||"Unknown",o));return Ce({},r,n)}function rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||no,Vo=ft.current,Se(ft,e),Se(Lt,Lt.current),!0}function R0(e,t,r){var n=e.stateNode;if(!n)throw Error(x(169));r?(e=XT(e,t,Vo),n.__reactInternalMemoizedMergedChildContext=e,Te(Lt),Te(ft),Se(ft,e)):Te(Lt),Se(Lt,r)}var gn=null,Ed=!1,zm=!1;function JT(e){gn===null?gn=[e]:gn.push(e)}function eL(e){Ed=!0,JT(e)}function so(){if(!zm&&gn!==null){zm=!0;var e=0,t=ae;try{var r=gn;for(ae=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}gn=null,Ed=!1}catch(o){throw gn!==null&&(gn=gn.slice(e+1)),TT(Kh,so),o}finally{ae=t,zm=!1}}return null}var Xi=[],Ji=0,nd=null,od=0,sr=[],ar=0,Yo=null,Sn=1,yn="";function Fo(e,t){Xi[Ji++]=od,Xi[Ji++]=nd,nd=e,od=t}function ZT(e,t,r){sr[ar++]=Sn,sr[ar++]=yn,sr[ar++]=Yo,Yo=e;var n=Sn;e=yn;var o=32-Ar(n)-1;n&=~(1<<o),r+=1;var i=32-Ar(t)+o;if(30<i){var s=o-o%5;i=(n&(1<<s)-1).toString(32),n>>=s,o-=s,Sn=1<<32-Ar(t)+o|r<<o|n,yn=i+e}else Sn=1<<i|r<<o|n,yn=e}function og(e){e.return!==null&&(Fo(e,1),ZT(e,1,0))}function ig(e){for(;e===nd;)nd=Xi[--Ji],Xi[Ji]=null,od=Xi[--Ji],Xi[Ji]=null;for(;e===Yo;)Yo=sr[--ar],sr[ar]=null,yn=sr[--ar],sr[ar]=null,Sn=sr[--ar],sr[ar]=null}var jt=null,Wt=null,Ie=!1,Nr=null;function QT(e,t){var r=lr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function C0(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,jt=e,Wt=Jn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,jt=e,Wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Yo!==null?{id:Sn,overflow:yn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=lr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,jt=e,Wt=null,!0):!1;default:return!1}}function bh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kh(e){if(Ie){var t=Wt;if(t){var r=t;if(!C0(e,t)){if(bh(e))throw Error(x(418));t=Jn(r.nextSibling);var n=jt;t&&C0(e,t)?QT(n,r):(e.flags=e.flags&-4097|2,Ie=!1,jt=e)}}else{if(bh(e))throw Error(x(418));e.flags=e.flags&-4097|2,Ie=!1,jt=e}}}function N0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;jt=e}function Au(e){if(e!==jt)return!1;if(!Ie)return N0(e),Ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vh(e.type,e.memoizedProps)),t&&(t=Wt)){if(bh(e))throw eb(),Error(x(418));for(;t;)QT(e,t),t=Jn(t.nextSibling)}if(N0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Wt=Jn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Wt=null}}else Wt=jt?Jn(e.stateNode.nextSibling):null;return!0}function eb(){for(var e=Wt;e;)e=Jn(e.nextSibling)}function cs(){Wt=jt=null,Ie=!1}function sg(e){Nr===null?Nr=[e]:Nr.push(e)}var tL=kn.ReactCurrentBatchConfig;function Fa(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(x(309));var n=r.stateNode}if(!n)throw Error(x(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(x(284));if(!r._owner)throw Error(x(290,e))}return e}function Mu(e,t){throw e=Object.prototype.toString.call(t),Error(x(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function A0(e){var t=e._init;return t(e._payload)}function tb(e){function t(m,S){if(e){var y=m.deletions;y===null?(m.deletions=[S],m.flags|=16):y.push(S)}}function r(m,S){if(!e)return null;for(;S!==null;)t(m,S),S=S.sibling;return null}function n(m,S){for(m=new Map;S!==null;)S.key!==null?m.set(S.key,S):m.set(S.index,S),S=S.sibling;return m}function o(m,S){return m=to(m,S),m.index=0,m.sibling=null,m}function i(m,S,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<S?(m.flags|=2,S):y):(m.flags|=2,S)):(m.flags|=1048576,S)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,S,y,b){return S===null||S.tag!==6?(S=qm(y,m.mode,b),S.return=m,S):(S=o(S,y),S.return=m,S)}function l(m,S,y,b){var R=y.type;return R===ji?d(m,S,y.props.children,b,y.key):S!==null&&(S.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===$n&&A0(R)===S.type)?(b=o(S,y.props),b.ref=Fa(m,S,y),b.return=m,b):(b=Gu(y.type,y.key,y.props,null,m.mode,b),b.ref=Fa(m,S,y),b.return=m,b)}function c(m,S,y,b){return S===null||S.tag!==4||S.stateNode.containerInfo!==y.containerInfo||S.stateNode.implementation!==y.implementation?(S=Km(y,m.mode,b),S.return=m,S):(S=o(S,y.children||[]),S.return=m,S)}function d(m,S,y,b,R){return S===null||S.tag!==7?(S=Go(y,m.mode,b,R),S.return=m,S):(S=o(S,y),S.return=m,S)}function u(m,S,y){if(typeof S=="string"&&S!==""||typeof S=="number")return S=qm(""+S,m.mode,y),S.return=m,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Su:return y=Gu(S.type,S.key,S.props,null,m.mode,y),y.ref=Fa(m,null,S),y.return=m,y;case Wi:return S=Km(S,m.mode,y),S.return=m,S;case $n:var b=S._init;return u(m,b(S._payload),y)}if(ja(S)||Pa(S))return S=Go(S,m.mode,y,null),S.return=m,S;Mu(m,S)}return null}function p(m,S,y,b){var R=S!==null?S.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return R!==null?null:a(m,S,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Su:return y.key===R?l(m,S,y,b):null;case Wi:return y.key===R?c(m,S,y,b):null;case $n:return R=y._init,p(m,S,R(y._payload),b)}if(ja(y)||Pa(y))return R!==null?null:d(m,S,y,b,null);Mu(m,y)}return null}function f(m,S,y,b,R){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(y)||null,a(S,m,""+b,R);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Su:return m=m.get(b.key===null?y:b.key)||null,l(S,m,b,R);case Wi:return m=m.get(b.key===null?y:b.key)||null,c(S,m,b,R);case $n:var E=b._init;return f(m,S,y,E(b._payload),R)}if(ja(b)||Pa(b))return m=m.get(y)||null,d(S,m,b,R,null);Mu(S,b)}return null}function h(m,S,y,b){for(var R=null,E=null,_=S,k=S=0,z=null;_!==null&&k<y.length;k++){_.index>k?(z=_,_=null):z=_.sibling;var w=p(m,_,y[k],b);if(w===null){_===null&&(_=z);break}e&&_&&w.alternate===null&&t(m,_),S=i(w,S,k),E===null?R=w:E.sibling=w,E=w,_=z}if(k===y.length)return r(m,_),Ie&&Fo(m,k),R;if(_===null){for(;k<y.length;k++)_=u(m,y[k],b),_!==null&&(S=i(_,S,k),E===null?R=_:E.sibling=_,E=_);return Ie&&Fo(m,k),R}for(_=n(m,_);k<y.length;k++)z=f(_,m,k,y[k],b),z!==null&&(e&&z.alternate!==null&&_.delete(z.key===null?k:z.key),S=i(z,S,k),E===null?R=z:E.sibling=z,E=z);return e&&_.forEach(function(L){return t(m,L)}),Ie&&Fo(m,k),R}function v(m,S,y,b){var R=Pa(y);if(typeof R!="function")throw Error(x(150));if(y=R.call(y),y==null)throw Error(x(151));for(var E=R=null,_=S,k=S=0,z=null,w=y.next();_!==null&&!w.done;k++,w=y.next()){_.index>k?(z=_,_=null):z=_.sibling;var L=p(m,_,w.value,b);if(L===null){_===null&&(_=z);break}e&&_&&L.alternate===null&&t(m,_),S=i(L,S,k),E===null?R=L:E.sibling=L,E=L,_=z}if(w.done)return r(m,_),Ie&&Fo(m,k),R;if(_===null){for(;!w.done;k++,w=y.next())w=u(m,w.value,b),w!==null&&(S=i(w,S,k),E===null?R=w:E.sibling=w,E=w);return Ie&&Fo(m,k),R}for(_=n(m,_);!w.done;k++,w=y.next())w=f(_,m,k,w.value,b),w!==null&&(e&&w.alternate!==null&&_.delete(w.key===null?k:w.key),S=i(w,S,k),E===null?R=w:E.sibling=w,E=w);return e&&_.forEach(function($){return t(m,$)}),Ie&&Fo(m,k),R}function I(m,S,y,b){if(typeof y=="object"&&y!==null&&y.type===ji&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Su:e:{for(var R=y.key,E=S;E!==null;){if(E.key===R){if(R=y.type,R===ji){if(E.tag===7){r(m,E.sibling),S=o(E,y.props.children),S.return=m,m=S;break e}}else if(E.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===$n&&A0(R)===E.type){r(m,E.sibling),S=o(E,y.props),S.ref=Fa(m,E,y),S.return=m,m=S;break e}r(m,E);break}else t(m,E);E=E.sibling}y.type===ji?(S=Go(y.props.children,m.mode,b,y.key),S.return=m,m=S):(b=Gu(y.type,y.key,y.props,null,m.mode,b),b.ref=Fa(m,S,y),b.return=m,m=b)}return s(m);case Wi:e:{for(E=y.key;S!==null;){if(S.key===E)if(S.tag===4&&S.stateNode.containerInfo===y.containerInfo&&S.stateNode.implementation===y.implementation){r(m,S.sibling),S=o(S,y.children||[]),S.return=m,m=S;break e}else{r(m,S);break}else t(m,S);S=S.sibling}S=Km(y,m.mode,b),S.return=m,m=S}return s(m);case $n:return E=y._init,I(m,S,E(y._payload),b)}if(ja(y))return h(m,S,y,b);if(Pa(y))return v(m,S,y,b);Mu(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,S!==null&&S.tag===6?(r(m,S.sibling),S=o(S,y),S.return=m,m=S):(r(m,S),S=qm(y,m.mode,b),S.return=m,m=S),s(m)):r(m,S)}return I}var us=tb(!0),rb=tb(!1),id=io(null),sd=null,Zi=null,ag=null;function lg(){ag=Zi=sd=null}function cg(e){var t=id.current;Te(id),e._currentValue=t}function Ih(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function is(e,t){sd=e,ag=Zi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Mt=!0),e.firstContext=null)}function ur(e){var t=e._currentValue;if(ag!==e)if(e={context:e,memoizedValue:t,next:null},Zi===null){if(sd===null)throw Error(x(308));Zi=e,sd.dependencies={lanes:0,firstContext:e}}else Zi=Zi.next=e;return t}var $o=null;function ug(e){$o===null?$o=[e]:$o.push(e)}function nb(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,ug(t)):(r.next=o.next,o.next=r),t.interleaved=r,Tn(e,n)}function Tn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Wn=!1;function dg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ob(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ee&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,Tn(e,r)}return o=n.interleaved,o===null?(t.next=t,ug(n)):(t.next=o.next,o.next=t),n.interleaved=t,Tn(e,r)}function Fu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xh(e,r)}}function M0(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ad(e,t,r,n){var o=e.updateQueue;Wn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(i!==null){var u=o.baseState;s=0,d=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(p=t,f=r,v.tag){case 1:if(h=v.payload,typeof h=="function"){u=h.call(f,u,p);break e}u=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,p=typeof h=="function"?h.call(f,u,p):h,p==null)break e;u=Ce({},u,p);break e;case 2:Wn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=f,l=u):d=d.next=f,s|=p;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;p=a,a=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(d===null&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Ko|=s,e.lanes=s,e.memoizedState=u}}function L0(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(x(191,o));o.call(n)}}}var Tl={},qr=io(Tl),fl=io(Tl),ml=io(Tl);function Wo(e){if(e===Tl)throw Error(x(174));return e}function pg(e,t){switch(Se(ml,t),Se(fl,e),Se(qr,Tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ih(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ih(t,e)}Te(qr),Se(qr,t)}function ds(){Te(qr),Te(fl),Te(ml)}function ib(e){Wo(ml.current);var t=Wo(qr.current),r=ih(t,e.type);t!==r&&(Se(fl,e),Se(qr,r))}function fg(e){fl.current===e&&(Te(qr),Te(fl))}var xe=io(0);function ld(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $m=[];function mg(){for(var e=0;e<$m.length;e++)$m[e]._workInProgressVersionPrimary=null;$m.length=0}var Hu=kn.ReactCurrentDispatcher,Wm=kn.ReactCurrentBatchConfig,qo=0,Re=null,ze=null,Ge=null,cd=!1,Za=!1,hl=0,rL=0;function ut(){throw Error(x(321))}function hg(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Lr(e[r],t[r]))return!1;return!0}function gg(e,t,r,n,o,i){if(qo=i,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hu.current=e===null||e.memoizedState===null?sL:aL,e=r(n,o),Za){i=0;do{if(Za=!1,hl=0,25<=i)throw Error(x(301));i+=1,Ge=ze=null,t.updateQueue=null,Hu.current=lL,e=r(n,o)}while(Za)}if(Hu.current=ud,t=ze!==null&&ze.next!==null,qo=0,Ge=ze=Re=null,cd=!1,t)throw Error(x(300));return e}function Sg(){var e=hl!==0;return hl=0,e}function Gr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?Re.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function dr(){if(ze===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ge===null?Re.memoizedState:Ge.next;if(t!==null)Ge=t,ze=e;else{if(e===null)throw Error(x(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ge===null?Re.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function gl(e,t){return typeof t=="function"?t(e):t}function jm(e){var t=dr(),r=t.queue;if(r===null)throw Error(x(311));r.lastRenderedReducer=e;var n=ze,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var a=s=null,l=null,c=i;do{var d=c.lane;if((qo&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,s=n):l=l.next=u,Re.lanes|=d,Ko|=d}c=c.next}while(c!==null&&c!==i);l===null?s=n:l.next=a,Lr(n,t.memoizedState)||(Mt=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,Re.lanes|=i,Ko|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Gm(e){var t=dr(),r=t.queue;if(r===null)throw Error(x(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Lr(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function sb(){}function ab(e,t){var r=Re,n=dr(),o=t(),i=!Lr(n.memoizedState,o);if(i&&(n.memoizedState=o,Mt=!0),n=n.queue,yg(ub.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ge!==null&&Ge.memoizedState.tag&1){if(r.flags|=2048,Sl(9,cb.bind(null,r,n,o,t),void 0,null),Ve===null)throw Error(x(349));(qo&30)!==0||lb(r,t,o)}return o}function lb(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function cb(e,t,r,n){t.value=r,t.getSnapshot=n,db(t)&&pb(e)}function ub(e,t,r){return r(function(){db(t)&&pb(e)})}function db(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Lr(e,r)}catch{return!0}}function pb(e){var t=Tn(e,1);t!==null&&Mr(t,e,1,-1)}function O0(e){var t=Gr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:e},t.queue=e,e=e.dispatch=iL.bind(null,Re,e),[t.memoizedState,e]}function Sl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function fb(){return dr().memoizedState}function zu(e,t,r,n){var o=Gr();Re.flags|=e,o.memoizedState=Sl(1|t,r,void 0,n===void 0?null:n)}function Td(e,t,r,n){var o=dr();n=n===void 0?null:n;var i=void 0;if(ze!==null){var s=ze.memoizedState;if(i=s.destroy,n!==null&&hg(n,s.deps)){o.memoizedState=Sl(t,r,i,n);return}}Re.flags|=e,o.memoizedState=Sl(1|t,r,i,n)}function P0(e,t){return zu(8390656,8,e,t)}function yg(e,t){return Td(2048,8,e,t)}function mb(e,t){return Td(4,2,e,t)}function hb(e,t){return Td(4,4,e,t)}function gb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sb(e,t,r){return r=r!=null?r.concat([e]):null,Td(4,4,gb.bind(null,t,e),r)}function vg(){}function yb(e,t){var r=dr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&hg(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function vb(e,t){var r=dr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&hg(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function _b(e,t,r){return(qo&21)===0?(e.baseState&&(e.baseState=!1,Mt=!0),e.memoizedState=r):(Lr(r,t)||(r=IT(),Re.lanes|=r,Ko|=r,e.baseState=!0),t)}function nL(e,t){var r=ae;ae=r!==0&&4>r?r:4,e(!0);var n=Wm.transition;Wm.transition={};try{e(!1),t()}finally{ae=r,Wm.transition=n}}function Eb(){return dr().memoizedState}function oL(e,t,r){var n=eo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Tb(e))bb(t,r);else if(r=nb(e,t,r,n),r!==null){var o=Tt();Mr(r,e,n,o),kb(r,t,n)}}function iL(e,t,r){var n=eo(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Tb(e))bb(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,Lr(a,s)){var l=t.interleaved;l===null?(o.next=o,ug(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=nb(e,t,o,n),r!==null&&(o=Tt(),Mr(r,e,n,o),kb(r,t,n))}}function Tb(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function bb(e,t){Za=cd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function kb(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xh(e,r)}}var ud={readContext:ur,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},sL={readContext:ur,useCallback:function(e,t){return Gr().memoizedState=[e,t===void 0?null:t],e},useContext:ur,useEffect:P0,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zu(4194308,4,gb.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zu(4194308,4,e,t)},useInsertionEffect:function(e,t){return zu(4,2,e,t)},useMemo:function(e,t){var r=Gr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Gr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=oL.bind(null,Re,e),[n.memoizedState,e]},useRef:function(e){var t=Gr();return e={current:e},t.memoizedState=e},useState:O0,useDebugValue:vg,useDeferredValue:function(e){return Gr().memoizedState=e},useTransition:function(){var e=O0(!1),t=e[0];return e=nL.bind(null,e[1]),Gr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Re,o=Gr();if(Ie){if(r===void 0)throw Error(x(407));r=r()}else{if(r=t(),Ve===null)throw Error(x(349));(qo&30)!==0||lb(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,P0(ub.bind(null,n,i,e),[e]),n.flags|=2048,Sl(9,cb.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Gr(),t=Ve.identifierPrefix;if(Ie){var r=yn,n=Sn;r=(n&~(1<<32-Ar(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=hl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=rL++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},aL={readContext:ur,useCallback:yb,useContext:ur,useEffect:yg,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:hb,useMemo:vb,useReducer:jm,useRef:fb,useState:function(){return jm(gl)},useDebugValue:vg,useDeferredValue:function(e){var t=dr();return _b(t,ze.memoizedState,e)},useTransition:function(){var e=jm(gl)[0],t=dr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1},lL={readContext:ur,useCallback:yb,useContext:ur,useEffect:yg,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:hb,useMemo:vb,useReducer:Gm,useRef:fb,useState:function(){return Gm(gl)},useDebugValue:vg,useDeferredValue:function(e){var t=dr();return ze===null?t.memoizedState=e:_b(t,ze.memoizedState,e)},useTransition:function(){var e=Gm(gl)[0],t=dr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1};function Rr(e,t){if(e&&e.defaultProps){t=Ce({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function wh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ce({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bd={isMounted:function(e){return(e=e._reactInternals)?Zo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Tt(),o=eo(e),i=vn(n,o);i.payload=t,r!=null&&(i.callback=r),t=Zn(e,i,o),t!==null&&(Mr(t,e,o,n),Fu(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Tt(),o=eo(e),i=vn(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Zn(e,i,o),t!==null&&(Mr(t,e,o,n),Fu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Tt(),n=eo(e),o=vn(r,n);o.tag=2,t!=null&&(o.callback=t),t=Zn(e,o,n),t!==null&&(Mr(t,e,n,r),Fu(t,e,n))}};function D0(e,t,r,n,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!cl(r,n)||!cl(o,i):!0}function Ib(e,t,r){var n=!1,o=no,i=t.contextType;return typeof i=="object"&&i!==null?i=ur(i):(o=Ot(t)?Vo:ft.current,n=t.contextTypes,i=(n=n!=null)?ls(e,o):no),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function U0(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&bd.enqueueReplaceState(t,t.state,null)}function xh(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},dg(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ur(i):(i=Ot(t)?Vo:ft.current,o.context=ls(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(wh(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&bd.enqueueReplaceState(o,o.state,null),ad(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ps(e,t){try{var r="",n=t;do r+=BM(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
7
7
|
Error generating stack: `+i.message+`
|
|
8
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Vm(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Rh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var lL=typeof WeakMap=="function"?WeakMap:Map;function kb(e,t,r){r=yn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){pd||(pd=!0,Bh=n),Rh(e,t)},r}function wb(e,t,r){r=yn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){Rh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Rh(e,t),typeof n!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function BE(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new lL;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=TL.bind(null,e,t,r),t.then(e,e))}function FE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function HE(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=yn(-1,1),t.tag=2,Jn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var cL=bn.ReactCurrentOwner,At=!1;function _t(e,t,r,n){t.child=e===null?rb(t,null,r,n):cs(t,e.child,r,n)}function zE(e,t,r,n,o){r=r.render;var i=t.ref;return os(t,o),n=gg(e,t,r,n,i,o),r=Sg(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Tn(e,t,o)):(Ie&&r&&og(t),t.flags|=1,_t(e,t,n,o),t.child)}function $E(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!wg(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Rb(e,t,i,n,o)):(e=Gu(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:cl,r(s,n)&&e.ref===t.ref)return Tn(e,t,o)}return t.flags|=1,e=eo(i,n),e.ref=t.ref,e.return=t,t.child=e}function Rb(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(cl(i,n)&&e.ref===t.ref)if(At=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,Tn(e,t,o)}return Nh(e,t,r,n,o)}function Nb(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Se(Zi,$t),$t|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Se(Zi,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Se(Zi,$t),$t|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Se(Zi,$t),$t|=n;return _t(e,t,o,r),t.child}function Cb(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Nh(e,t,r,n,o){var i=Lt(r)?Go:pt.current;return i=as(t,i),os(t,o),r=gg(e,t,r,n,i,o),n=Sg(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Tn(e,t,o)):(Ie&&n&&og(t),t.flags|=1,_t(e,t,r,o),t.child)}function jE(e,t,r,n,o){if(Lt(r)){var i=!0;rd(t)}else i=!1;if(os(t,o),t.stateNode===null)$u(e,t),xb(t,r,n),wh(t,r,n,o),n=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=ur(c):(c=Lt(r)?Go:pt.current,c=as(t,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||l!==c)&&UE(t,s,n,c),$n=!1;var p=t.memoizedState;s.state=p,ad(t,n,s,o),l=t.memoizedState,a!==n||p!==l||Mt.current||$n?(typeof u=="function"&&(kh(t,r,u,n),l=t.memoizedState),(a=$n||PE(t,r,a,n,p,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),s.props=n,s.state=l,s.context=c,n=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,ob(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:wr(t.type,a),s.props=c,d=t.pendingProps,p=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=ur(l):(l=Lt(r)?Go:pt.current,l=as(t,l));var f=r.getDerivedStateFromProps;(u=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||p!==l)&&UE(t,s,n,l),$n=!1,p=t.memoizedState,s.state=p,ad(t,n,s,o);var h=t.memoizedState;a!==d||p!==h||Mt.current||$n?(typeof f=="function"&&(kh(t,r,f,n),h=t.memoizedState),(c=$n||PE(t,r,c,n,p,h,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=h),s.props=n,s.state=h,s.context=l,n=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Ch(e,t,r,n,i,o)}function Ch(e,t,r,n,o,i){Cb(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return o&&RE(t,r,!1),Tn(e,t,i);n=t.stateNode,cL.current=t;var a=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=cs(t,e.child,null,i),t.child=cs(t,null,a,i)):_t(e,t,a,i),t.memoizedState=n.state,o&&RE(t,r,!0),t.child}function Ab(e){var t=e.stateNode;t.pendingContext?wE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wE(e,t.context,!1),pg(e,t.containerInfo)}function WE(e,t,r,n,o){return ls(),sg(o),t.flags|=256,_t(e,t,r,n),t.child}var Ah={dehydrated:null,treeContext:null,retryLane:0};function Mh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mb(e,t,r){var n=t.pendingProps,o=ke.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Se(ke,o&1),e===null)return Ih(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=n.children,e=n.fallback,i?(n=t.mode,i=t.child,s={mode:"hidden",children:s},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=kd(s,n,0,null),e=Wo(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mh(r),t.memoizedState=Ah,e):_g(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return uL(e,t,s,n,a,o,r);if(i){i=n.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:n.children};return(s&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=eo(o,l),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=eo(a,i):(i=Wo(i,s,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,s=e.child.memoizedState,s=s===null?Mh(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=Ah,n}return i=e.child,e=i.sibling,n=eo(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function _g(e,t){return t=kd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lu(e,t,r,n){return n!==null&&sg(n),cs(t,e.child,null,r),e=_g(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uL(e,t,r,n,o,i,s){if(r)return t.flags&256?(t.flags&=-257,n=Vm(Error(R(422))),Lu(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=kd({mode:"visible",children:n.children},o,0,null),i=Wo(i,o,s,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&cs(t,e.child,null,s),t.child.memoizedState=Mh(s),t.memoizedState=Ah,i);if((t.mode&1)===0)return Lu(e,t,s,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(R(419)),n=Vm(i,n,void 0),Lu(e,t,s,n)}if(a=(s&e.childLanes)!==0,At||a){if(n=Ve,n!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,En(e,o),Ar(n,e,o,-1))}return kg(),n=Vm(Error(R(421))),Lu(e,t,s,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=bL.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,jt=Xn(o.nextSibling),Wt=t,Ie=!0,Nr=null,e!==null&&(sr[ar++]=gn,sr[ar++]=Sn,sr[ar++]=Vo,gn=e.id,Sn=e.overflow,Vo=t),t=_g(t,n.children),t.flags|=4096,t)}function GE(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),xh(e.return,t,r)}function Ym(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function Lb(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(_t(e,t,n.children,r),n=ke.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&GE(e,r,t);else if(e.tag===19)GE(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Se(ke,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&ld(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Ym(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ld(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Ym(t,!0,r,null,i);break;case"together":Ym(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $u(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),qo|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,r=eo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=eo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function dL(e,t,r){switch(t.tag){case 3:Ab(t),ls();break;case 5:ib(t);break;case 1:Lt(t.type)&&rd(t);break;case 4:pg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Se(id,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Se(ke,ke.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Mb(e,t,r):(Se(ke,ke.current&1),e=Tn(e,t,r),e!==null?e.sibling:null);Se(ke,ke.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return Lb(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Se(ke,ke.current),n)break;return null;case 22:case 23:return t.lanes=0,Nb(e,t,r)}return Tn(e,t,r)}var Ob,Lh,Db,Pb;Ob=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Lh=function(){};Db=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,$o(Yr.current);var i=null;switch(r){case"input":o=th(e,o),n=th(e,n),i=[];break;case"select":o=Re({},o,{value:void 0}),n=Re({},n,{value:void 0}),i=[];break;case"textarea":o=oh(e,o),n=oh(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ed)}sh(r,n);var s;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(rl.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=o?.[c],n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(rl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ee("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Pb=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ha(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function pL(e,t,r){var n=t.pendingProps;switch(ig(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return Lt(t.type)&&td(),ut(t),null;case 3:return n=t.stateNode,us(),Te(Mt),Te(pt),mg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Au(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nr!==null&&(zh(Nr),Nr=null))),Lh(e,t),ut(t),null;case 5:fg(t);var o=$o(ml.current);if(r=t.type,e!==null&&t.stateNode!=null)Db(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(R(166));return ut(t),null}if(e=$o(Yr.current),Au(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Gr]=t,n[pl]=i,e=(t.mode&1)!==0,r){case"dialog":Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":case"embed":Ee("load",n);break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],n);break;case"source":Ee("error",n);break;case"img":case"image":case"link":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"input":Z0(n,i),Ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",n);break;case"textarea":tE(n,i),Ee("invalid",n)}sh(r,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Cu(n.textContent,a,e),o=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Cu(n.textContent,a,e),o=["children",""+a]):rl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Ee("scroll",n)}switch(r){case"input":yu(n),eE(n,i,!0);break;case"textarea":yu(n),rE(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ed)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uT(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[Gr]=t,e[pl]=n,Ob(e,t,!1,!1),t.stateNode=e;e:{switch(s=ah(r,n),r){case"dialog":Ee("cancel",e),Ee("close",e),o=n;break;case"iframe":case"object":case"embed":Ee("load",e),o=n;break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],e);o=n;break;case"source":Ee("error",e),o=n;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),o=n;break;case"details":Ee("toggle",e),o=n;break;case"input":Z0(e,n),o=th(e,n),Ee("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=Re({},n,{value:void 0}),Ee("invalid",e);break;case"textarea":tE(e,n),o=oh(e,n),Ee("invalid",e);break;default:o=n}sh(r,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?fT(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&dT(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&nl(e,l):typeof l=="number"&&nl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(rl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ee("scroll",e):l!=null&&Wh(e,i,l,s))}switch(r){case"input":yu(e),eE(e,n,!1);break;case"textarea":yu(e),rE(e);break;case"option":n.value!=null&&e.setAttribute("value",""+to(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?es(e,!!n.multiple,i,!1):n.defaultValue!=null&&es(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ed)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ut(t),null;case 6:if(e&&t.stateNode!=null)Pb(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(R(166));if(r=$o(ml.current),$o(Yr.current),Au(t)){if(n=t.stateNode,r=t.memoizedProps,n[Gr]=t,(i=n.nodeValue!==r)&&(e=Wt,e!==null))switch(e.tag){case 3:Cu(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cu(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Gr]=t,t.stateNode=n}return ut(t),null;case 13:if(Te(ke),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ie&&jt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)eb(),ls(),t.flags|=98560,i=!1;else if(i=Au(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(R(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(R(317));i[Gr]=t}else ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),i=!1}else Nr!==null&&(zh(Nr),Nr=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ke.current&1)!==0?$e===0&&($e=3):kg())),t.updateQueue!==null&&(t.flags|=4),ut(t),null);case 4:return us(),Lh(e,t),e===null&&ul(t.stateNode.containerInfo),ut(t),null;case 10:return cg(t.type._context),ut(t),null;case 17:return Lt(t.type)&&td(),ut(t),null;case 19:if(Te(ke),i=t.memoizedState,i===null)return ut(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)Ha(i,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=ld(e),s!==null){for(t.flags|=128,Ha(i,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Se(ke,ke.current&1|2),t.child}e=e.sibling}i.tail!==null&&Le()>ps&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304)}else{if(!n)if(e=ld(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ie)return ut(t),null}else 2*Le()-i.renderingStartTime>ps&&r!==1073741824&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Le(),t.sibling=null,r=ke.current,Se(ke,n?r&1|2:r&1),t):(ut(t),null);case 22:case 23:return xg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?($t&1073741824)!==0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function fL(e,t){switch(ig(t),t.tag){case 1:return Lt(t.type)&&td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return us(),Te(Mt),Te(pt),mg(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return fg(t),null;case 13:if(Te(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(ke),null;case 4:return us(),null;case 10:return cg(t.type._context),null;case 22:case 23:return xg(),null;case 24:return null;default:return null}}var Ou=!1,dt=!1,mL=typeof WeakSet=="function"?WeakSet:Set,A=null;function Qi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Me(e,t,n)}else r.current=null}function Oh(e,t,r){try{r()}catch(n){Me(e,t,n)}}var VE=!1;function hL(e,t){if(Sh=Ju,e=zT(),ng(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==r||o!==0&&d.nodeType!==3||(a=s+o),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)p=d,d=f;for(;;){if(d===e)break t;if(p===r&&++c===o&&(a=s),p===i&&++u===n&&(l=s),(f=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(yh={focusedElem:e,selectionRange:r},Ju=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var y=h.memoizedProps,E=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:wr(t.type,y),E);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(b){Me(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return h=VE,VE=!1,h}function Za(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Oh(t,r,i)}o=o.next}while(o!==n)}}function Id(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Dh(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function Ub(e){var t=e.alternate;t!==null&&(e.alternate=null,Ub(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gr],delete t[pl],delete t[Eh],delete t[J2],delete t[Q2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bb(e){return e.tag===5||e.tag===3||e.tag===4}function YE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ph(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ed));else if(n!==4&&(e=e.child,e!==null))for(Ph(e,t,r),e=e.sibling;e!==null;)Ph(e,t,r),e=e.sibling}function Uh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Uh(e,t,r),e=e.sibling;e!==null;)Uh(e,t,r),e=e.sibling}var Qe=null,Rr=!1;function Hn(e,t,r){for(r=r.child;r!==null;)Fb(e,t,r),r=r.sibling}function Fb(e,t,r){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(gd,r)}catch{}switch(r.tag){case 5:dt||Qi(r,t);case 6:var n=Qe,o=Rr;Qe=null,Hn(e,t,r),Qe=n,Rr=o,Qe!==null&&(Rr?(e=Qe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Qe.removeChild(r.stateNode));break;case 18:Qe!==null&&(Rr?(e=Qe,r=r.stateNode,e.nodeType===8?Hm(e.parentNode,r):e.nodeType===1&&Hm(e,r),al(e)):Hm(Qe,r.stateNode));break;case 4:n=Qe,o=Rr,Qe=r.stateNode.containerInfo,Rr=!0,Hn(e,t,r),Qe=n,Rr=o;break;case 0:case 11:case 14:case 15:if(!dt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Oh(r,t,s),o=o.next}while(o!==n)}Hn(e,t,r);break;case 1:if(!dt&&(Qi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Me(r,t,a)}Hn(e,t,r);break;case 21:Hn(e,t,r);break;case 22:r.mode&1?(dt=(n=dt)||r.memoizedState!==null,Hn(e,t,r),dt=n):Hn(e,t,r);break;default:Hn(e,t,r)}}function qE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new mL),t.forEach(function(n){var o=IL.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function kr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Qe=a.stateNode,Rr=!1;break e;case 3:Qe=a.stateNode.containerInfo,Rr=!0;break e;case 4:Qe=a.stateNode.containerInfo,Rr=!0;break e}a=a.return}if(Qe===null)throw Error(R(160));Fb(i,s,o),Qe=null,Rr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Me(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hb(t,e),t=t.sibling}function Hb(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kr(t,e),jr(e),n&4){try{Za(3,e,e.return),Id(3,e)}catch(y){Me(e,e.return,y)}try{Za(5,e,e.return)}catch(y){Me(e,e.return,y)}}break;case 1:kr(t,e),jr(e),n&512&&r!==null&&Qi(r,r.return);break;case 5:if(kr(t,e),jr(e),n&512&&r!==null&&Qi(r,r.return),e.flags&32){var o=e.stateNode;try{nl(o,"")}catch(y){Me(e,e.return,y)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&lT(o,i),ah(a,s);var c=ah(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?fT(o,d):u==="dangerouslySetInnerHTML"?dT(o,d):u==="children"?nl(o,d):Wh(o,u,d,c)}switch(a){case"input":rh(o,i);break;case"textarea":cT(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?es(o,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?es(o,!!i.multiple,i.defaultValue,!0):es(o,!!i.multiple,i.multiple?[]:"",!1))}o[pl]=i}catch(y){Me(e,e.return,y)}}break;case 6:if(kr(t,e),jr(e),n&4){if(e.stateNode===null)throw Error(R(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(y){Me(e,e.return,y)}}break;case 3:if(kr(t,e),jr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{al(t.containerInfo)}catch(y){Me(e,e.return,y)}break;case 4:kr(t,e),jr(e);break;case 13:kr(t,e),jr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(bg=Le())),n&4&&qE(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(dt=(c=dt)||u,kr(t,e),dt=c):kr(t,e),jr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(A=e,u=e.child;u!==null;){for(d=A=u;A!==null;){switch(p=A,f=p.child,p.tag){case 0:case 11:case 14:case 15:Za(4,p,p.return);break;case 1:Qi(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(y){Me(n,r,y)}}break;case 5:Qi(p,p.return);break;case 22:if(p.memoizedState!==null){XE(d);continue}}f!==null?(f.return=p,A=f):XE(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=pT("display",s))}catch(y){Me(e,e.return,y)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(y){Me(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:kr(t,e),jr(e),n&4&&qE(e);break;case 21:break;default:kr(t,e),jr(e)}}function jr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Bb(r)){var n=r;break e}r=r.return}throw Error(R(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(nl(o,""),n.flags&=-33);var i=YE(e);Uh(e,i,o);break;case 3:case 4:var s=n.stateNode.containerInfo,a=YE(e);Ph(e,a,s);break;default:throw Error(R(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gL(e,t,r){A=e,zb(e,t,r)}function zb(e,t,r){for(var n=(e.mode&1)!==0;A!==null;){var o=A,i=o.child;if(o.tag===22&&n){var s=o.memoizedState!==null||Ou;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||dt;a=Ou;var c=dt;if(Ou=s,(dt=l)&&!c)for(A=o;A!==null;)s=A,l=s.child,s.tag===22&&s.memoizedState!==null?JE(o):l!==null?(l.return=s,A=l):JE(o);for(;i!==null;)A=i,zb(i,t,r),i=i.sibling;A=o,Ou=a,dt=c}KE(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,A=i):KE(e,t,r)}}function KE(e){for(;A!==null;){var t=A;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:dt||Id(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!dt)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:wr(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&LE(t,i,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}LE(t,s,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&al(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}dt||t.flags&512&&Dh(t)}catch(p){Me(t,t.return,p)}}if(t===e){A=null;break}if(r=t.sibling,r!==null){r.return=t.return,A=r;break}A=t.return}}function XE(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var r=t.sibling;if(r!==null){r.return=t.return,A=r;break}A=t.return}}function JE(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Id(4,t)}catch(l){Me(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){Me(t,o,l)}}var i=t.return;try{Dh(t)}catch(l){Me(t,i,l)}break;case 5:var s=t.return;try{Dh(t)}catch(l){Me(t,s,l)}}}catch(l){Me(t,t.return,l)}if(t===e){A=null;break}var a=t.sibling;if(a!==null){a.return=t.return,A=a;break}A=t.return}}var SL=Math.ceil,dd=bn.ReactCurrentDispatcher,Eg=bn.ReactCurrentOwner,cr=bn.ReactCurrentBatchConfig,Z=0,Ve=null,Ue=null,Ze=0,$t=0,Zi=oo(0),$e=0,yl=null,qo=0,xd=0,Tg=0,el=null,Ct=null,bg=0,ps=1/0,mn=null,pd=!1,Bh=null,Qn=null,Du=!1,Vn=null,fd=0,tl=0,Fh=null,ju=-1,Wu=0;function Et(){return(Z&6)!==0?Le():ju!==-1?ju:ju=Le()}function Zn(e){return(e.mode&1)===0?1:(Z&2)!==0&&Ze!==0?Ze&-Ze:eL.transition!==null?(Wu===0&&(Wu=xT()),Wu):(e=ae,e!==0||(e=window.event,e=e===void 0?16:MT(e.type)),e)}function Ar(e,t,r,n){if(50<tl)throw tl=0,Fh=null,Error(R(185));vl(e,r,n),((Z&2)===0||e!==Ve)&&(e===Ve&&((Z&2)===0&&(xd|=r),$e===4&&Wn(e,Ze)),Ot(e,n),r===1&&Z===0&&(t.mode&1)===0&&(ps=Le()+500,Ed&&io()))}function Ot(e,t){var r=e.callbackNode;r2(e,t);var n=Xu(e,e===Ve?Ze:0);if(n===0)r!==null&&iE(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&iE(r),t===1)e.tag===0?Z2(QE.bind(null,e)):JT(QE.bind(null,e)),K2(function(){(Z&6)===0&&io()}),r=null;else{switch(kT(n)){case 1:r=Kh;break;case 4:r=bT;break;case 16:r=Ku;break;case 536870912:r=IT;break;default:r=Ku}r=Kb(r,$b.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function $b(e,t){if(ju=-1,Wu=0,(Z&6)!==0)throw Error(R(327));var r=e.callbackNode;if(is()&&e.callbackNode!==r)return null;var n=Xu(e,e===Ve?Ze:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=md(e,n);else{t=n;var o=Z;Z|=2;var i=Wb();(Ve!==e||Ze!==t)&&(mn=null,ps=Le()+500,jo(e,t));do try{_L();break}catch(a){jb(e,a)}while(!0);lg(),dd.current=i,Z=o,Ue!==null?t=0:(Ve=null,Ze=0,t=$e)}if(t!==0){if(t===2&&(o=ph(e),o!==0&&(n=o,t=Hh(e,o))),t===1)throw r=yl,jo(e,0),Wn(e,n),Ot(e,Le()),r;if(t===6)Wn(e,n);else{if(o=e.current.alternate,(n&30)===0&&!yL(o)&&(t=md(e,n),t===2&&(i=ph(e),i!==0&&(n=i,t=Hh(e,i))),t===1))throw r=yl,jo(e,0),Wn(e,n),Ot(e,Le()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(R(345));case 2:Fo(e,Ct,mn);break;case 3:if(Wn(e,n),(n&130023424)===n&&(t=bg+500-Le(),10<t)){if(Xu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Et(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_h(Fo.bind(null,e,Ct,mn),t);break}Fo(e,Ct,mn);break;case 4:if(Wn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-Cr(n);i=1<<s,s=t[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*SL(n/1960))-n,10<n){e.timeoutHandle=_h(Fo.bind(null,e,Ct,mn),n);break}Fo(e,Ct,mn);break;case 5:Fo(e,Ct,mn);break;default:throw Error(R(329))}}}return Ot(e,Le()),e.callbackNode===r?$b.bind(null,e):null}function Hh(e,t){var r=el;return e.current.memoizedState.isDehydrated&&(jo(e,t).flags|=256),e=md(e,t),e!==2&&(t=Ct,Ct=r,t!==null&&zh(t)),e}function zh(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function yL(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Mr(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wn(e,t){for(t&=~Tg,t&=~xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Cr(t),n=1<<r;e[r]=-1,t&=~n}}function QE(e){if((Z&6)!==0)throw Error(R(327));is();var t=Xu(e,0);if((t&1)===0)return Ot(e,Le()),null;var r=md(e,t);if(e.tag!==0&&r===2){var n=ph(e);n!==0&&(t=n,r=Hh(e,n))}if(r===1)throw r=yl,jo(e,0),Wn(e,t),Ot(e,Le()),r;if(r===6)throw Error(R(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fo(e,Ct,mn),Ot(e,Le()),null}function Ig(e,t){var r=Z;Z|=1;try{return e(t)}finally{Z=r,Z===0&&(ps=Le()+500,Ed&&io())}}function Ko(e){Vn!==null&&Vn.tag===0&&(Z&6)===0&&is();var t=Z;Z|=1;var r=cr.transition,n=ae;try{if(cr.transition=null,ae=1,e)return e()}finally{ae=n,cr.transition=r,Z=t,(Z&6)===0&&io()}}function xg(){$t=Zi.current,Te(Zi)}function jo(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,q2(r)),Ue!==null)for(r=Ue.return;r!==null;){var n=r;switch(ig(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&td();break;case 3:us(),Te(Mt),Te(pt),mg();break;case 5:fg(n);break;case 4:us();break;case 13:Te(ke);break;case 19:Te(ke);break;case 10:cg(n.type._context);break;case 22:case 23:xg()}r=r.return}if(Ve=e,Ue=e=eo(e.current,null),Ze=$t=t,$e=0,yl=null,Tg=xd=qo=0,Ct=el=null,zo!==null){for(t=0;t<zo.length;t++)if(r=zo[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var s=i.next;i.next=o,n.next=s}r.pending=n}zo=null}return e}function jb(e,t){do{var r=Ue;try{if(lg(),Hu.current=ud,cd){for(var n=we.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}cd=!1}if(Yo=0,Ge=ze=we=null,Qa=!1,hl=0,Eg.current=null,r===null||r.return===null){$e=1,yl=t,Ue=null;break}e:{var i=e,s=r.return,a=r,l=t;if(t=Ze,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=FE(s);if(f!==null){f.flags&=-257,HE(f,s,a,i,t),f.mode&1&&BE(i,c,t),t=f,l=c;var h=t.updateQueue;if(h===null){var y=new Set;y.add(l),t.updateQueue=y}else h.add(l);break e}else{if((t&1)===0){BE(i,c,t),kg();break e}l=Error(R(426))}}else if(Ie&&a.mode&1){var E=FE(s);if(E!==null){(E.flags&65536)===0&&(E.flags|=256),HE(E,s,a,i,t),sg(ds(l,a));break e}}i=l=ds(l,a),$e!==4&&($e=2),el===null?el=[i]:el.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=kb(i,l,t);ME(i,m);break e;case 1:a=l;var g=i.type,v=i.stateNode;if((i.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Qn===null||!Qn.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=wb(i,a,t);ME(i,b);break e}}i=i.return}while(i!==null)}Vb(r)}catch(k){t=k,Ue===r&&r!==null&&(Ue=r=r.return);continue}break}while(!0)}function Wb(){var e=dd.current;return dd.current=ud,e===null?ud:e}function kg(){($e===0||$e===3||$e===2)&&($e=4),Ve===null||(qo&268435455)===0&&(xd&268435455)===0||Wn(Ve,Ze)}function md(e,t){var r=Z;Z|=2;var n=Wb();(Ve!==e||Ze!==t)&&(mn=null,jo(e,t));do try{vL();break}catch(o){jb(e,o)}while(!0);if(lg(),Z=r,dd.current=n,Ue!==null)throw Error(R(261));return Ve=null,Ze=0,$e}function vL(){for(;Ue!==null;)Gb(Ue)}function _L(){for(;Ue!==null&&!YM();)Gb(Ue)}function Gb(e){var t=qb(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Vb(e):Ue=t,Eg.current=null}function Vb(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=pL(r,t,$t),r!==null){Ue=r;return}}else{if(r=fL(r,t),r!==null){r.flags&=32767,Ue=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$e=6,Ue=null;return}}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);$e===0&&($e=5)}function Fo(e,t,r){var n=ae,o=cr.transition;try{cr.transition=null,ae=1,EL(e,t,r,n)}finally{cr.transition=o,ae=n}return null}function EL(e,t,r,n){do is();while(Vn!==null);if((Z&6)!==0)throw Error(R(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(R(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(n2(e,i),e===Ve&&(Ue=Ve=null,Ze=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Du||(Du=!0,Kb(Ku,function(){return is(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=cr.transition,cr.transition=null;var s=ae;ae=1;var a=Z;Z|=4,Eg.current=null,hL(e,r),Hb(r,e),j2(yh),Ju=!!Sh,yh=Sh=null,e.current=r,gL(r,e,o),qM(),Z=a,ae=s,cr.transition=i}else e.current=r;if(Du&&(Du=!1,Vn=e,fd=o),i=e.pendingLanes,i===0&&(Qn=null),JM(r.stateNode,n),Ot(e,Le()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(pd)throw pd=!1,e=Bh,Bh=null,e;return(fd&1)!==0&&e.tag!==0&&is(),i=e.pendingLanes,(i&1)!==0?e===Fh?tl++:(tl=0,Fh=e):tl=0,io(),null}function is(){if(Vn!==null){var e=kT(fd),t=cr.transition,r=ae;try{if(cr.transition=null,ae=16>e?16:e,Vn===null)var n=!1;else{if(e=Vn,Vn=null,fd=0,(Z&6)!==0)throw Error(R(331));var o=Z;for(Z|=4,A=e.current;A!==null;){var i=A,s=i.child;if((A.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(A=c;A!==null;){var u=A;switch(u.tag){case 0:case 11:case 15:Za(8,u,i)}var d=u.child;if(d!==null)d.return=u,A=d;else for(;A!==null;){u=A;var p=u.sibling,f=u.return;if(Ub(u),u===c){A=null;break}if(p!==null){p.return=f,A=p;break}A=f}}}var h=i.alternate;if(h!==null){var y=h.child;if(y!==null){h.child=null;do{var E=y.sibling;y.sibling=null,y=E}while(y!==null)}}A=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,A=s;else e:for(;A!==null;){if(i=A,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Za(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,A=m;break e}A=i.return}}var g=e.current;for(A=g;A!==null;){s=A;var v=s.child;if((s.subtreeFlags&2064)!==0&&v!==null)v.return=s,A=v;else e:for(s=g;A!==null;){if(a=A,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Id(9,a)}}catch(k){Me(a,a.return,k)}if(a===s){A=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,A=b;break e}A=a.return}}if(Z=o,io(),Vr&&typeof Vr.onPostCommitFiberRoot=="function")try{Vr.onPostCommitFiberRoot(gd,e)}catch{}n=!0}return n}finally{ae=r,cr.transition=t}}return!1}function ZE(e,t,r){t=ds(r,t),t=kb(e,t,1),e=Jn(e,t,1),t=Et(),e!==null&&(vl(e,1,t),Ot(e,t))}function Me(e,t,r){if(e.tag===3)ZE(e,e,r);else for(;t!==null;){if(t.tag===3){ZE(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Qn===null||!Qn.has(n))){e=ds(r,e),e=wb(t,e,1),t=Jn(t,e,1),e=Et(),t!==null&&(vl(t,1,e),Ot(t,e));break}}t=t.return}}function TL(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Et(),e.pingedLanes|=e.suspendedLanes&r,Ve===e&&(Ze&r)===r&&($e===4||$e===3&&(Ze&130023424)===Ze&&500>Le()-bg?jo(e,0):Tg|=r),Ot(e,t)}function Yb(e,t){t===0&&((e.mode&1)===0?t=1:(t=Eu,Eu<<=1,(Eu&130023424)===0&&(Eu=4194304)));var r=Et();e=En(e,t),e!==null&&(vl(e,t,r),Ot(e,r))}function bL(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Yb(e,r)}function IL(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(R(314))}n!==null&&n.delete(t),Yb(e,r)}var qb;qb=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)At=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return At=!1,dL(e,t,r);At=(e.flags&131072)!==0}else At=!1,Ie&&(t.flags&1048576)!==0&&QT(t,od,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;$u(e,t),e=t.pendingProps;var o=as(t,pt.current);os(t,r),o=gg(null,t,n,e,o,r);var i=Sg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(n)?(i=!0,rd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dg(t),o.updater=bd,t.stateNode=o,o._reactInternals=t,wh(t,n,e,r),t=Ch(null,t,n,!0,i,r)):(t.tag=0,Ie&&i&&og(t),_t(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch($u(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=kL(n),e=wr(n,e),o){case 0:t=Nh(null,t,n,e,r);break e;case 1:t=jE(null,t,n,e,r);break e;case 11:t=zE(null,t,n,e,r);break e;case 14:t=$E(null,t,n,wr(n.type,e),r);break e}throw Error(R(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),Nh(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),jE(e,t,n,o,r);case 3:e:{if(Ab(t),e===null)throw Error(R(387));n=t.pendingProps,i=t.memoizedState,o=i.element,ob(e,t),ad(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ds(Error(R(423)),t),t=WE(e,t,n,r,o);break e}else if(n!==o){o=ds(Error(R(424)),t),t=WE(e,t,n,r,o);break e}else for(jt=Xn(t.stateNode.containerInfo.firstChild),Wt=t,Ie=!0,Nr=null,r=rb(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ls(),n===o){t=Tn(e,t,r);break e}_t(e,t,n,r)}t=t.child}return t;case 5:return ib(t),e===null&&Ih(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,vh(n,o)?s=null:i!==null&&vh(n,i)&&(t.flags|=32),Cb(e,t),_t(e,t,s,r),t.child;case 6:return e===null&&Ih(t),null;case 13:return Mb(e,t,r);case 4:return pg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=cs(t,null,n,r):_t(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),zE(e,t,n,o,r);case 7:return _t(e,t,t.pendingProps,r),t.child;case 8:return _t(e,t,t.pendingProps.children,r),t.child;case 12:return _t(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Se(id,n._currentValue),n._currentValue=s,i!==null)if(Mr(i.value,s)){if(i.children===o.children&&!Mt.current){t=Tn(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=yn(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),xh(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(R(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),xh(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}_t(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,os(t,r),o=ur(o),n=n(o),t.flags|=1,_t(e,t,n,r),t.child;case 14:return n=t.type,o=wr(n,t.pendingProps),o=wr(n.type,o),$E(e,t,n,o,r);case 15:return Rb(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),$u(e,t),t.tag=1,Lt(n)?(e=!0,rd(t)):e=!1,os(t,r),xb(t,n,o),wh(t,n,o,r),Ch(null,t,n,!0,e,r);case 19:return Lb(e,t,r);case 22:return Nb(e,t,r)}throw Error(R(156,t.tag))};function Kb(e,t){return TT(e,t)}function xL(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lr(e,t,r,n){return new xL(e,t,r,n)}function wg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kL(e){if(typeof e=="function")return wg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vh)return 11;if(e===Yh)return 14}return 2}function eo(e,t){var r=e.alternate;return r===null?(r=lr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gu(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")wg(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ji:return Wo(r.children,o,i,t);case Gh:s=8,o|=8;break;case Jm:return e=lr(12,r,t,o|2),e.elementType=Jm,e.lanes=i,e;case Qm:return e=lr(13,r,t,o),e.elementType=Qm,e.lanes=i,e;case Zm:return e=lr(19,r,t,o),e.elementType=Zm,e.lanes=i,e;case iT:return kd(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nT:s=10;break e;case oT:s=9;break e;case Vh:s=11;break e;case Yh:s=14;break e;case zn:s=16,n=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=lr(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Wo(e,t,r,n){return e=lr(7,e,n,t),e.lanes=r,e}function kd(e,t,r,n){return e=lr(22,e,n,t),e.elementType=iT,e.lanes=r,e.stateNode={isHidden:!1},e}function qm(e,t,r){return e=lr(6,e,null,t),e.lanes=r,e}function Km(e,t,r){return t=lr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wL(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mm(0),this.expirationTimes=Mm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mm(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rg(e,t,r,n,o,i,s,a,l){return e=new wL(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=lr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dg(i),e}function RL(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$i,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Xb(e){if(!e)return ro;e=e._reactInternals;e:{if(Jo(e)!==e||e.tag!==1)throw Error(R(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(R(171))}if(e.tag===1){var r=e.type;if(Lt(r))return XT(e,r,t)}return t}function Jb(e,t,r,n,o,i,s,a,l){return e=Rg(r,n,!0,e,o,i,s,a,l),e.context=Xb(null),r=e.current,n=Et(),o=Zn(r),i=yn(n,o),i.callback=t??null,Jn(r,i,o),e.current.lanes=o,vl(e,o,n),Ot(e,n),e}function wd(e,t,r,n){var o=t.current,i=Et(),s=Zn(o);return r=Xb(r),t.context===null?t.context=r:t.pendingContext=r,t=yn(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Jn(o,t,s),e!==null&&(Ar(e,o,s,i),Fu(e,o,s)),s}function hd(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function eT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ng(e,t){eT(e,t),(e=e.alternate)&&eT(e,t)}function NL(){return null}var Qb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cg(e){this._internalRoot=e}Rd.prototype.render=Cg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));wd(e,t,null,null)};Rd.prototype.unmount=Cg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ko(function(){wd(null,e,null,null)}),t[_n]=null}};function Rd(e){this._internalRoot=e}Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=NT();e={blockedOn:null,target:e,priority:t};for(var r=0;r<jn.length&&t!==0&&t<jn[r].priority;r++);jn.splice(r,0,e),r===0&&AT(e)}};function Ag(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function tT(){}function CL(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=hd(s);i.call(c)}}var s=Jb(t,n,e,0,null,!1,!1,"",tT);return e._reactRootContainer=s,e[_n]=s.current,ul(e.nodeType===8?e.parentNode:e),Ko(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var a=n;n=function(){var c=hd(l);a.call(c)}}var l=Rg(e,0,!1,null,null,!1,!1,"",tT);return e._reactRootContainer=l,e[_n]=l.current,ul(e.nodeType===8?e.parentNode:e),Ko(function(){wd(t,l,r,n)}),l}function Cd(e,t,r,n,o){var i=r._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=hd(s);a.call(l)}}wd(t,s,e,o)}else s=CL(r,t,e,o,n);return hd(s)}wT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ga(t.pendingLanes);r!==0&&(Xh(t,r|1),Ot(t,Le()),(Z&6)===0&&(ps=Le()+500,io()))}break;case 13:Ko(function(){var n=En(e,1);if(n!==null){var o=Et();Ar(n,e,1,o)}}),Ng(e,1)}};Jh=function(e){if(e.tag===13){var t=En(e,134217728);if(t!==null){var r=Et();Ar(t,e,134217728,r)}Ng(e,134217728)}};RT=function(e){if(e.tag===13){var t=Zn(e),r=En(e,t);if(r!==null){var n=Et();Ar(r,e,t,n)}Ng(e,t)}};NT=function(){return ae};CT=function(e,t){var r=ae;try{return ae=e,t()}finally{ae=r}};ch=function(e,t,r){switch(t){case"input":if(rh(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=_d(n);if(!o)throw Error(R(90));aT(n),rh(n,o)}}}break;case"textarea":cT(e,r);break;case"select":t=r.value,t!=null&&es(e,!!r.multiple,t,!1)}};gT=Ig;ST=Ko;var AL={usingClientEntryPoint:!1,Events:[El,Yi,_d,mT,hT,Ig]},za={findFiberByHostInstance:Ho,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ML={bundleType:za.bundleType,version:za.version,rendererPackageName:za.rendererPackageName,rendererConfig:za.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:bn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_T(e),e===null?null:e.stateNode},findFiberByHostInstance:za.findFiberByHostInstance||NL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&($a=__REACT_DEVTOOLS_GLOBAL_HOOK__,!$a.isDisabled&&$a.supportsFiber))try{gd=$a.inject(ML),Vr=$a}catch{}var $a;Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AL;Yt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ag(t))throw Error(R(200));return RL(e,t,null,r)};Yt.createRoot=function(e,t){if(!Ag(e))throw Error(R(299));var r=!1,n="",o=Qb;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Rg(e,1,!1,null,null,r,!1,n,o),e[_n]=t.current,ul(e.nodeType===8?e.parentNode:e),new Cg(t)};Yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=_T(t),e=e===null?null:e.stateNode,e};Yt.flushSync=function(e){return Ko(e)};Yt.hydrate=function(e,t,r){if(!Nd(t))throw Error(R(200));return Cd(null,e,t,!0,r)};Yt.hydrateRoot=function(e,t,r){if(!Ag(e))throw Error(R(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",s=Qb;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=Jb(t,null,e,1,r??null,o,!1,i,s),e[_n]=t.current,ul(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Rd(t)};Yt.render=function(e,t,r){if(!Nd(t))throw Error(R(200));return Cd(null,e,t,!1,r)};Yt.unmountComponentAtNode=function(e){if(!Nd(e))throw Error(R(40));return e._reactRootContainer?(Ko(function(){Cd(null,null,e,!1,function(){e._reactRootContainer=null,e[_n]=null})}),!0):!1};Yt.unstable_batchedUpdates=Ig;Yt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Nd(r))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return Cd(e,t,r,!1,n)};Yt.version="18.3.1-next-f1338f8080-20240426"});var rI=Xr((tW,tI)=>{"use strict";function eI(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eI)}catch(e){console.error(e)}}eI(),tI.exports=Zb()});var oI=Xr(Mg=>{"use strict";var nI=rI();Mg.createRoot=nI.createRoot,Mg.hydrateRoot=nI.hydrateRoot;var rW});var dI=Xr(Md=>{"use strict";var PL=pn(),UL=Symbol.for("react.element"),BL=Symbol.for("react.fragment"),FL=Object.prototype.hasOwnProperty,HL=PL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zL={key:!0,ref:!0,__self:!0,__source:!0};function uI(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)FL.call(t,n)&&!zL.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:UL,type:e,key:i,ref:s,props:o,_owner:HL.current}}Md.Fragment=BL;Md.jsx=uI;Md.jsxs=uI});var xl=Xr((fW,pI)=>{"use strict";pI.exports=dI()});var N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var L=globalThis;var Or="10.56.0";function Ut(){return uo(L),L}function uo(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Or,t[Or]=t[Or]||{}}function hr(e,t,r=L){let n=r.__SENTRY__=r.__SENTRY__||{},o=n[Or]=n[Or]||{};return o[e]||(o[e]=t())}var wl=["debug","info","warn","error","log","assert","trace"],PI="Sentry Logger ",po={};function qe(e){if(!("console"in L))return e();let t=L.console,r={},n=Object.keys(po);n.forEach(o=>{let i=po[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function UI(){Bd().enabled=!0}function BI(){Bd().enabled=!1}function Bg(){return Bd().enabled}function FI(...e){Ud("log",...e)}function HI(...e){Ud("warn",...e)}function zI(...e){Ud("error",...e)}function Ud(e,...t){N&&Bg()&&qe(()=>{L.console[e](`${PI}[${e}]:`,...t)})}function Bd(){return N?hr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var T={enable:UI,disable:BI,isEnabled:Bg,log:FI,warn:HI,error:zI};var Fg=/\(error: (.*)\)/,Hg=/captureMessage|captureException/;function vs(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,o=0)=>{let i=[],s=r.split(`
|
|
9
|
-
`);for(let a=n;a<s.length;a++){let l=s[a];l.length>1024&&(l=l.slice(0,1024));let c=Fg.test(l)?l.replace(Fg,"$1"):l;if(!c.includes("Error: ")){for(let
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Vm(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Rh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var cL=typeof WeakMap=="function"?WeakMap:Map;function wb(e,t,r){r=vn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){pd||(pd=!0,Bh=n),Rh(e,t)},r}function xb(e,t,r){r=vn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){Rh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Rh(e,t),typeof n!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function B0(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new cL;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=bL.bind(null,e,t,r),t.then(e,e))}function F0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function H0(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=vn(-1,1),t.tag=2,Zn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var uL=kn.ReactCurrentOwner,Mt=!1;function Et(e,t,r,n){t.child=e===null?rb(t,null,r,n):us(t,e.child,r,n)}function z0(e,t,r,n,o){r=r.render;var i=t.ref;return is(t,o),n=gg(e,t,r,n,i,o),r=Sg(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,bn(e,t,o)):(Ie&&r&&og(t),t.flags|=1,Et(e,t,n,o),t.child)}function $0(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!xg(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Rb(e,t,i,n,o)):(e=Gu(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:cl,r(s,n)&&e.ref===t.ref)return bn(e,t,o)}return t.flags|=1,e=to(i,n),e.ref=t.ref,e.return=t,t.child=e}function Rb(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(cl(i,n)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Mt=!0);else return t.lanes=e.lanes,bn(e,t,o)}return Ch(e,t,r,n,o)}function Cb(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Se(es,$t),$t|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Se(es,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Se(es,$t),$t|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Se(es,$t),$t|=n;return Et(e,t,o,r),t.child}function Nb(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ch(e,t,r,n,o){var i=Ot(r)?Vo:ft.current;return i=ls(t,i),is(t,o),r=gg(e,t,r,n,i,o),n=Sg(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,bn(e,t,o)):(Ie&&n&&og(t),t.flags|=1,Et(e,t,r,o),t.child)}function W0(e,t,r,n,o){if(Ot(r)){var i=!0;rd(t)}else i=!1;if(is(t,o),t.stateNode===null)$u(e,t),Ib(t,r,n),xh(t,r,n,o),n=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=ur(c):(c=Ot(r)?Vo:ft.current,c=ls(t,c));var d=r.getDerivedStateFromProps,u=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";u||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||l!==c)&&U0(t,s,n,c),Wn=!1;var p=t.memoizedState;s.state=p,ad(t,n,s,o),l=t.memoizedState,a!==n||p!==l||Lt.current||Wn?(typeof d=="function"&&(wh(t,r,d,n),l=t.memoizedState),(a=Wn||D0(t,r,a,n,p,l,c))?(u||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),s.props=n,s.state=l,s.context=c,n=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,ob(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Rr(t.type,a),s.props=c,u=t.pendingProps,p=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=ur(l):(l=Ot(r)?Vo:ft.current,l=ls(t,l));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==u||p!==l)&&U0(t,s,n,l),Wn=!1,p=t.memoizedState,s.state=p,ad(t,n,s,o);var h=t.memoizedState;a!==u||p!==h||Lt.current||Wn?(typeof f=="function"&&(wh(t,r,f,n),h=t.memoizedState),(c=Wn||D0(t,r,c,n,p,h,l)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=h),s.props=n,s.state=h,s.context=l,n=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Nh(e,t,r,n,i,o)}function Nh(e,t,r,n,o,i){Nb(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return o&&R0(t,r,!1),bn(e,t,i);n=t.stateNode,uL.current=t;var a=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=us(t,e.child,null,i),t.child=us(t,null,a,i)):Et(e,t,a,i),t.memoizedState=n.state,o&&R0(t,r,!0),t.child}function Ab(e){var t=e.stateNode;t.pendingContext?x0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&x0(e,t.context,!1),pg(e,t.containerInfo)}function j0(e,t,r,n,o){return cs(),sg(o),t.flags|=256,Et(e,t,r,n),t.child}var Ah={dehydrated:null,treeContext:null,retryLane:0};function Mh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mb(e,t,r){var n=t.pendingProps,o=xe.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Se(xe,o&1),e===null)return kh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=n.children,e=n.fallback,i?(n=t.mode,i=t.child,s={mode:"hidden",children:s},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=wd(s,n,0,null),e=Go(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mh(r),t.memoizedState=Ah,e):_g(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return dL(e,t,s,n,a,o,r);if(i){i=n.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:n.children};return(s&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=to(o,l),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=to(a,i):(i=Go(i,s,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,s=e.child.memoizedState,s=s===null?Mh(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=Ah,n}return i=e.child,e=i.sibling,n=to(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function _g(e,t){return t=wd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lu(e,t,r,n){return n!==null&&sg(n),us(t,e.child,null,r),e=_g(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dL(e,t,r,n,o,i,s){if(r)return t.flags&256?(t.flags&=-257,n=Vm(Error(x(422))),Lu(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=wd({mode:"visible",children:n.children},o,0,null),i=Go(i,o,s,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&us(t,e.child,null,s),t.child.memoizedState=Mh(s),t.memoizedState=Ah,i);if((t.mode&1)===0)return Lu(e,t,s,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(x(419)),n=Vm(i,n,void 0),Lu(e,t,s,n)}if(a=(s&e.childLanes)!==0,Mt||a){if(n=Ve,n!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Tn(e,o),Mr(n,e,o,-1))}return wg(),n=Vm(Error(x(421))),Lu(e,t,s,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=kL.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Wt=Jn(o.nextSibling),jt=t,Ie=!0,Nr=null,e!==null&&(sr[ar++]=Sn,sr[ar++]=yn,sr[ar++]=Yo,Sn=e.id,yn=e.overflow,Yo=t),t=_g(t,n.children),t.flags|=4096,t)}function G0(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ih(e.return,t,r)}function Ym(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function Lb(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(Et(e,t,n.children,r),n=xe.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&G0(e,r,t);else if(e.tag===19)G0(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Se(xe,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&ld(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Ym(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ld(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Ym(t,!0,r,null,i);break;case"together":Ym(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $u(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function bn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ko|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(x(153));if(t.child!==null){for(e=t.child,r=to(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=to(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function pL(e,t,r){switch(t.tag){case 3:Ab(t),cs();break;case 5:ib(t);break;case 1:Ot(t.type)&&rd(t);break;case 4:pg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Se(id,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Se(xe,xe.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Mb(e,t,r):(Se(xe,xe.current&1),e=bn(e,t,r),e!==null?e.sibling:null);Se(xe,xe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return Lb(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Se(xe,xe.current),n)break;return null;case 22:case 23:return t.lanes=0,Cb(e,t,r)}return bn(e,t,r)}var Ob,Lh,Pb,Db;Ob=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Lh=function(){};Pb=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Wo(qr.current);var i=null;switch(r){case"input":o=th(e,o),n=th(e,n),i=[];break;case"select":o=Ce({},o,{value:void 0}),n=Ce({},n,{value:void 0}),i=[];break;case"textarea":o=oh(e,o),n=oh(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ed)}sh(r,n);var s;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(rl.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=o?.[c],n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(rl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ee("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Db=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ha(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function fL(e,t,r){var n=t.pendingProps;switch(ig(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return Ot(t.type)&&td(),dt(t),null;case 3:return n=t.stateNode,ds(),Te(Lt),Te(ft),mg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Au(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nr!==null&&(zh(Nr),Nr=null))),Lh(e,t),dt(t),null;case 5:fg(t);var o=Wo(ml.current);if(r=t.type,e!==null&&t.stateNode!=null)Pb(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(x(166));return dt(t),null}if(e=Wo(qr.current),Au(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Vr]=t,n[pl]=i,e=(t.mode&1)!==0,r){case"dialog":Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":case"embed":Ee("load",n);break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],n);break;case"source":Ee("error",n);break;case"img":case"image":case"link":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"input":QE(n,i),Ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",n);break;case"textarea":t0(n,i),Ee("invalid",n)}sh(r,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Nu(n.textContent,a,e),o=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Nu(n.textContent,a,e),o=["children",""+a]):rl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Ee("scroll",n)}switch(r){case"input":yu(n),e0(n,i,!0);break;case"textarea":yu(n),r0(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ed)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uT(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[Vr]=t,e[pl]=n,Ob(e,t,!1,!1),t.stateNode=e;e:{switch(s=ah(r,n),r){case"dialog":Ee("cancel",e),Ee("close",e),o=n;break;case"iframe":case"object":case"embed":Ee("load",e),o=n;break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],e);o=n;break;case"source":Ee("error",e),o=n;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),o=n;break;case"details":Ee("toggle",e),o=n;break;case"input":QE(e,n),o=th(e,n),Ee("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=Ce({},n,{value:void 0}),Ee("invalid",e);break;case"textarea":t0(e,n),o=oh(e,n),Ee("invalid",e);break;default:o=n}sh(r,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?fT(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&dT(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&nl(e,l):typeof l=="number"&&nl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(rl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ee("scroll",e):l!=null&&jh(e,i,l,s))}switch(r){case"input":yu(e),e0(e,n,!1);break;case"textarea":yu(e),r0(e);break;case"option":n.value!=null&&e.setAttribute("value",""+ro(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?ts(e,!!n.multiple,i,!1):n.defaultValue!=null&&ts(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ed)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return dt(t),null;case 6:if(e&&t.stateNode!=null)Db(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(x(166));if(r=Wo(ml.current),Wo(qr.current),Au(t)){if(n=t.stateNode,r=t.memoizedProps,n[Vr]=t,(i=n.nodeValue!==r)&&(e=jt,e!==null))switch(e.tag){case 3:Nu(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Nu(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Vr]=t,t.stateNode=n}return dt(t),null;case 13:if(Te(xe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ie&&Wt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)eb(),cs(),t.flags|=98560,i=!1;else if(i=Au(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(x(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(x(317));i[Vr]=t}else cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),i=!1}else Nr!==null&&(zh(Nr),Nr=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(xe.current&1)!==0?$e===0&&($e=3):wg())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return ds(),Lh(e,t),e===null&&ul(t.stateNode.containerInfo),dt(t),null;case 10:return cg(t.type._context),dt(t),null;case 17:return Ot(t.type)&&td(),dt(t),null;case 19:if(Te(xe),i=t.memoizedState,i===null)return dt(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)Ha(i,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=ld(e),s!==null){for(t.flags|=128,Ha(i,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Se(xe,xe.current&1|2),t.child}e=e.sibling}i.tail!==null&&Oe()>fs&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304)}else{if(!n)if(e=ld(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ie)return dt(t),null}else 2*Oe()-i.renderingStartTime>fs&&r!==1073741824&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Oe(),t.sibling=null,r=xe.current,Se(xe,n?r&1|2:r&1),t):(dt(t),null);case 22:case 23:return Ig(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?($t&1073741824)!==0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function mL(e,t){switch(ig(t),t.tag){case 1:return Ot(t.type)&&td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ds(),Te(Lt),Te(ft),mg(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return fg(t),null;case 13:if(Te(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(xe),null;case 4:return ds(),null;case 10:return cg(t.type._context),null;case 22:case 23:return Ig(),null;case 24:return null;default:return null}}var Ou=!1,pt=!1,hL=typeof WeakSet=="function"?WeakSet:Set,A=null;function Qi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Le(e,t,n)}else r.current=null}function Oh(e,t,r){try{r()}catch(n){Le(e,t,n)}}var V0=!1;function gL(e,t){if(Sh=Ju,e=zT(),ng(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,d=0,u=e,p=null;t:for(;;){for(var f;u!==r||o!==0&&u.nodeType!==3||(a=s+o),u!==i||n!==0&&u.nodeType!==3||(l=s+n),u.nodeType===3&&(s+=u.nodeValue.length),(f=u.firstChild)!==null;)p=u,u=f;for(;;){if(u===e)break t;if(p===r&&++c===o&&(a=s),p===i&&++d===n&&(l=s),(f=u.nextSibling)!==null)break;u=p,p=u.parentNode}u=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(yh={focusedElem:e,selectionRange:r},Ju=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,I=h.memoizedState,m=t.stateNode,S=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Rr(t.type,v),I);m.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(b){Le(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return h=V0,V0=!1,h}function Qa(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Oh(t,r,i)}o=o.next}while(o!==n)}}function kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ph(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function Ub(e){var t=e.alternate;t!==null&&(e.alternate=null,Ub(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vr],delete t[pl],delete t[Eh],delete t[Z2],delete t[Q2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bb(e){return e.tag===5||e.tag===3||e.tag===4}function Y0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Dh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ed));else if(n!==4&&(e=e.child,e!==null))for(Dh(e,t,r),e=e.sibling;e!==null;)Dh(e,t,r),e=e.sibling}function Uh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Uh(e,t,r),e=e.sibling;e!==null;)Uh(e,t,r),e=e.sibling}var Ze=null,Cr=!1;function zn(e,t,r){for(r=r.child;r!==null;)Fb(e,t,r),r=r.sibling}function Fb(e,t,r){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(gd,r)}catch{}switch(r.tag){case 5:pt||Qi(r,t);case 6:var n=Ze,o=Cr;Ze=null,zn(e,t,r),Ze=n,Cr=o,Ze!==null&&(Cr?(e=Ze,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ze.removeChild(r.stateNode));break;case 18:Ze!==null&&(Cr?(e=Ze,r=r.stateNode,e.nodeType===8?Hm(e.parentNode,r):e.nodeType===1&&Hm(e,r),al(e)):Hm(Ze,r.stateNode));break;case 4:n=Ze,o=Cr,Ze=r.stateNode.containerInfo,Cr=!0,zn(e,t,r),Ze=n,Cr=o;break;case 0:case 11:case 14:case 15:if(!pt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Oh(r,t,s),o=o.next}while(o!==n)}zn(e,t,r);break;case 1:if(!pt&&(Qi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Le(r,t,a)}zn(e,t,r);break;case 21:zn(e,t,r);break;case 22:r.mode&1?(pt=(n=pt)||r.memoizedState!==null,zn(e,t,r),pt=n):zn(e,t,r);break;default:zn(e,t,r)}}function q0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new hL),t.forEach(function(n){var o=IL.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function xr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Ze=a.stateNode,Cr=!1;break e;case 3:Ze=a.stateNode.containerInfo,Cr=!0;break e;case 4:Ze=a.stateNode.containerInfo,Cr=!0;break e}a=a.return}if(Ze===null)throw Error(x(160));Fb(i,s,o),Ze=null,Cr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Le(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hb(t,e),t=t.sibling}function Hb(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xr(t,e),jr(e),n&4){try{Qa(3,e,e.return),kd(3,e)}catch(v){Le(e,e.return,v)}try{Qa(5,e,e.return)}catch(v){Le(e,e.return,v)}}break;case 1:xr(t,e),jr(e),n&512&&r!==null&&Qi(r,r.return);break;case 5:if(xr(t,e),jr(e),n&512&&r!==null&&Qi(r,r.return),e.flags&32){var o=e.stateNode;try{nl(o,"")}catch(v){Le(e,e.return,v)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&lT(o,i),ah(a,s);var c=ah(a,i);for(s=0;s<l.length;s+=2){var d=l[s],u=l[s+1];d==="style"?fT(o,u):d==="dangerouslySetInnerHTML"?dT(o,u):d==="children"?nl(o,u):jh(o,d,u,c)}switch(a){case"input":rh(o,i);break;case"textarea":cT(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?ts(o,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?ts(o,!!i.multiple,i.defaultValue,!0):ts(o,!!i.multiple,i.multiple?[]:"",!1))}o[pl]=i}catch(v){Le(e,e.return,v)}}break;case 6:if(xr(t,e),jr(e),n&4){if(e.stateNode===null)throw Error(x(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(v){Le(e,e.return,v)}}break;case 3:if(xr(t,e),jr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{al(t.containerInfo)}catch(v){Le(e,e.return,v)}break;case 4:xr(t,e),jr(e);break;case 13:xr(t,e),jr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(bg=Oe())),n&4&&q0(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(pt=(c=pt)||d,xr(t,e),pt=c):xr(t,e),jr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&(e.mode&1)!==0)for(A=e,d=e.child;d!==null;){for(u=A=d;A!==null;){switch(p=A,f=p.child,p.tag){case 0:case 11:case 14:case 15:Qa(4,p,p.return);break;case 1:Qi(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(v){Le(n,r,v)}}break;case 5:Qi(p,p.return);break;case 22:if(p.memoizedState!==null){X0(u);continue}}f!==null?(f.return=p,A=f):X0(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{o=u.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=u.stateNode,l=u.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=pT("display",s))}catch(v){Le(e,e.return,v)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(v){Le(e,e.return,v)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:xr(t,e),jr(e),n&4&&q0(e);break;case 21:break;default:xr(t,e),jr(e)}}function jr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Bb(r)){var n=r;break e}r=r.return}throw Error(x(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(nl(o,""),n.flags&=-33);var i=Y0(e);Uh(e,i,o);break;case 3:case 4:var s=n.stateNode.containerInfo,a=Y0(e);Dh(e,a,s);break;default:throw Error(x(161))}}catch(l){Le(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function SL(e,t,r){A=e,zb(e,t,r)}function zb(e,t,r){for(var n=(e.mode&1)!==0;A!==null;){var o=A,i=o.child;if(o.tag===22&&n){var s=o.memoizedState!==null||Ou;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||pt;a=Ou;var c=pt;if(Ou=s,(pt=l)&&!c)for(A=o;A!==null;)s=A,l=s.child,s.tag===22&&s.memoizedState!==null?J0(o):l!==null?(l.return=s,A=l):J0(o);for(;i!==null;)A=i,zb(i,t,r),i=i.sibling;A=o,Ou=a,pt=c}K0(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,A=i):K0(e,t,r)}}function K0(e){for(;A!==null;){var t=A;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:pt||kd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!pt)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Rr(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&L0(t,i,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}L0(t,s,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&al(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(x(163))}pt||t.flags&512&&Ph(t)}catch(p){Le(t,t.return,p)}}if(t===e){A=null;break}if(r=t.sibling,r!==null){r.return=t.return,A=r;break}A=t.return}}function X0(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var r=t.sibling;if(r!==null){r.return=t.return,A=r;break}A=t.return}}function J0(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{kd(4,t)}catch(l){Le(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){Le(t,o,l)}}var i=t.return;try{Ph(t)}catch(l){Le(t,i,l)}break;case 5:var s=t.return;try{Ph(t)}catch(l){Le(t,s,l)}}}catch(l){Le(t,t.return,l)}if(t===e){A=null;break}var a=t.sibling;if(a!==null){a.return=t.return,A=a;break}A=t.return}}var yL=Math.ceil,dd=kn.ReactCurrentDispatcher,Eg=kn.ReactCurrentOwner,cr=kn.ReactCurrentBatchConfig,ee=0,Ve=null,Be=null,Qe=0,$t=0,es=io(0),$e=0,yl=null,Ko=0,Id=0,Tg=0,el=null,At=null,bg=0,fs=1/0,hn=null,pd=!1,Bh=null,Qn=null,Pu=!1,Yn=null,fd=0,tl=0,Fh=null,Wu=-1,ju=0;function Tt(){return(ee&6)!==0?Oe():Wu!==-1?Wu:Wu=Oe()}function eo(e){return(e.mode&1)===0?1:(ee&2)!==0&&Qe!==0?Qe&-Qe:tL.transition!==null?(ju===0&&(ju=IT()),ju):(e=ae,e!==0||(e=window.event,e=e===void 0?16:MT(e.type)),e)}function Mr(e,t,r,n){if(50<tl)throw tl=0,Fh=null,Error(x(185));vl(e,r,n),((ee&2)===0||e!==Ve)&&(e===Ve&&((ee&2)===0&&(Id|=r),$e===4&&Gn(e,Qe)),Pt(e,n),r===1&&ee===0&&(t.mode&1)===0&&(fs=Oe()+500,Ed&&so()))}function Pt(e,t){var r=e.callbackNode;n2(e,t);var n=Xu(e,e===Ve?Qe:0);if(n===0)r!==null&&i0(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&i0(r),t===1)e.tag===0?eL(Z0.bind(null,e)):JT(Z0.bind(null,e)),X2(function(){(ee&6)===0&&so()}),r=null;else{switch(wT(n)){case 1:r=Kh;break;case 4:r=bT;break;case 16:r=Ku;break;case 536870912:r=kT;break;default:r=Ku}r=Kb(r,$b.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function $b(e,t){if(Wu=-1,ju=0,(ee&6)!==0)throw Error(x(327));var r=e.callbackNode;if(ss()&&e.callbackNode!==r)return null;var n=Xu(e,e===Ve?Qe:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=md(e,n);else{t=n;var o=ee;ee|=2;var i=jb();(Ve!==e||Qe!==t)&&(hn=null,fs=Oe()+500,jo(e,t));do try{EL();break}catch(a){Wb(e,a)}while(!0);lg(),dd.current=i,ee=o,Be!==null?t=0:(Ve=null,Qe=0,t=$e)}if(t!==0){if(t===2&&(o=ph(e),o!==0&&(n=o,t=Hh(e,o))),t===1)throw r=yl,jo(e,0),Gn(e,n),Pt(e,Oe()),r;if(t===6)Gn(e,n);else{if(o=e.current.alternate,(n&30)===0&&!vL(o)&&(t=md(e,n),t===2&&(i=ph(e),i!==0&&(n=i,t=Hh(e,i))),t===1))throw r=yl,jo(e,0),Gn(e,n),Pt(e,Oe()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(x(345));case 2:Ho(e,At,hn);break;case 3:if(Gn(e,n),(n&130023424)===n&&(t=bg+500-Oe(),10<t)){if(Xu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_h(Ho.bind(null,e,At,hn),t);break}Ho(e,At,hn);break;case 4:if(Gn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-Ar(n);i=1<<s,s=t[s],s>o&&(o=s),n&=~i}if(n=o,n=Oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*yL(n/1960))-n,10<n){e.timeoutHandle=_h(Ho.bind(null,e,At,hn),n);break}Ho(e,At,hn);break;case 5:Ho(e,At,hn);break;default:throw Error(x(329))}}}return Pt(e,Oe()),e.callbackNode===r?$b.bind(null,e):null}function Hh(e,t){var r=el;return e.current.memoizedState.isDehydrated&&(jo(e,t).flags|=256),e=md(e,t),e!==2&&(t=At,At=r,t!==null&&zh(t)),e}function zh(e){At===null?At=e:At.push.apply(At,e)}function vL(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Lr(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Gn(e,t){for(t&=~Tg,t&=~Id,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ar(t),n=1<<r;e[r]=-1,t&=~n}}function Z0(e){if((ee&6)!==0)throw Error(x(327));ss();var t=Xu(e,0);if((t&1)===0)return Pt(e,Oe()),null;var r=md(e,t);if(e.tag!==0&&r===2){var n=ph(e);n!==0&&(t=n,r=Hh(e,n))}if(r===1)throw r=yl,jo(e,0),Gn(e,t),Pt(e,Oe()),r;if(r===6)throw Error(x(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ho(e,At,hn),Pt(e,Oe()),null}function kg(e,t){var r=ee;ee|=1;try{return e(t)}finally{ee=r,ee===0&&(fs=Oe()+500,Ed&&so())}}function Xo(e){Yn!==null&&Yn.tag===0&&(ee&6)===0&&ss();var t=ee;ee|=1;var r=cr.transition,n=ae;try{if(cr.transition=null,ae=1,e)return e()}finally{ae=n,cr.transition=r,ee=t,(ee&6)===0&&so()}}function Ig(){$t=es.current,Te(es)}function jo(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,K2(r)),Be!==null)for(r=Be.return;r!==null;){var n=r;switch(ig(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&td();break;case 3:ds(),Te(Lt),Te(ft),mg();break;case 5:fg(n);break;case 4:ds();break;case 13:Te(xe);break;case 19:Te(xe);break;case 10:cg(n.type._context);break;case 22:case 23:Ig()}r=r.return}if(Ve=e,Be=e=to(e.current,null),Qe=$t=t,$e=0,yl=null,Tg=Id=Ko=0,At=el=null,$o!==null){for(t=0;t<$o.length;t++)if(r=$o[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var s=i.next;i.next=o,n.next=s}r.pending=n}$o=null}return e}function Wb(e,t){do{var r=Be;try{if(lg(),Hu.current=ud,cd){for(var n=Re.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}cd=!1}if(qo=0,Ge=ze=Re=null,Za=!1,hl=0,Eg.current=null,r===null||r.return===null){$e=1,yl=t,Be=null;break}e:{var i=e,s=r.return,a=r,l=t;if(t=Qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if((d.mode&1)===0&&(u===0||u===11||u===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=F0(s);if(f!==null){f.flags&=-257,H0(f,s,a,i,t),f.mode&1&&B0(i,c,t),t=f,l=c;var h=t.updateQueue;if(h===null){var v=new Set;v.add(l),t.updateQueue=v}else h.add(l);break e}else{if((t&1)===0){B0(i,c,t),wg();break e}l=Error(x(426))}}else if(Ie&&a.mode&1){var I=F0(s);if(I!==null){(I.flags&65536)===0&&(I.flags|=256),H0(I,s,a,i,t),sg(ps(l,a));break e}}i=l=ps(l,a),$e!==4&&($e=2),el===null?el=[i]:el.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=wb(i,l,t);M0(i,m);break e;case 1:a=l;var S=i.type,y=i.stateNode;if((i.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Qn===null||!Qn.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=xb(i,a,t);M0(i,b);break e}}i=i.return}while(i!==null)}Vb(r)}catch(R){t=R,Be===r&&r!==null&&(Be=r=r.return);continue}break}while(!0)}function jb(){var e=dd.current;return dd.current=ud,e===null?ud:e}function wg(){($e===0||$e===3||$e===2)&&($e=4),Ve===null||(Ko&268435455)===0&&(Id&268435455)===0||Gn(Ve,Qe)}function md(e,t){var r=ee;ee|=2;var n=jb();(Ve!==e||Qe!==t)&&(hn=null,jo(e,t));do try{_L();break}catch(o){Wb(e,o)}while(!0);if(lg(),ee=r,dd.current=n,Be!==null)throw Error(x(261));return Ve=null,Qe=0,$e}function _L(){for(;Be!==null;)Gb(Be)}function EL(){for(;Be!==null&&!qM();)Gb(Be)}function Gb(e){var t=qb(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Vb(e):Be=t,Eg.current=null}function Vb(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=fL(r,t,$t),r!==null){Be=r;return}}else{if(r=mL(r,t),r!==null){r.flags&=32767,Be=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$e=6,Be=null;return}}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);$e===0&&($e=5)}function Ho(e,t,r){var n=ae,o=cr.transition;try{cr.transition=null,ae=1,TL(e,t,r,n)}finally{cr.transition=o,ae=n}return null}function TL(e,t,r,n){do ss();while(Yn!==null);if((ee&6)!==0)throw Error(x(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(x(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(o2(e,i),e===Ve&&(Be=Ve=null,Qe=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Pu||(Pu=!0,Kb(Ku,function(){return ss(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=cr.transition,cr.transition=null;var s=ae;ae=1;var a=ee;ee|=4,Eg.current=null,gL(e,r),Hb(r,e),j2(yh),Ju=!!Sh,yh=Sh=null,e.current=r,SL(r,e,o),KM(),ee=a,ae=s,cr.transition=i}else e.current=r;if(Pu&&(Pu=!1,Yn=e,fd=o),i=e.pendingLanes,i===0&&(Qn=null),ZM(r.stateNode,n),Pt(e,Oe()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(pd)throw pd=!1,e=Bh,Bh=null,e;return(fd&1)!==0&&e.tag!==0&&ss(),i=e.pendingLanes,(i&1)!==0?e===Fh?tl++:(tl=0,Fh=e):tl=0,so(),null}function ss(){if(Yn!==null){var e=wT(fd),t=cr.transition,r=ae;try{if(cr.transition=null,ae=16>e?16:e,Yn===null)var n=!1;else{if(e=Yn,Yn=null,fd=0,(ee&6)!==0)throw Error(x(331));var o=ee;for(ee|=4,A=e.current;A!==null;){var i=A,s=i.child;if((A.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(A=c;A!==null;){var d=A;switch(d.tag){case 0:case 11:case 15:Qa(8,d,i)}var u=d.child;if(u!==null)u.return=d,A=u;else for(;A!==null;){d=A;var p=d.sibling,f=d.return;if(Ub(d),d===c){A=null;break}if(p!==null){p.return=f,A=p;break}A=f}}}var h=i.alternate;if(h!==null){var v=h.child;if(v!==null){h.child=null;do{var I=v.sibling;v.sibling=null,v=I}while(v!==null)}}A=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,A=s;else e:for(;A!==null;){if(i=A,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Qa(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,A=m;break e}A=i.return}}var S=e.current;for(A=S;A!==null;){s=A;var y=s.child;if((s.subtreeFlags&2064)!==0&&y!==null)y.return=s,A=y;else e:for(s=S;A!==null;){if(a=A,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:kd(9,a)}}catch(R){Le(a,a.return,R)}if(a===s){A=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,A=b;break e}A=a.return}}if(ee=o,so(),Yr&&typeof Yr.onPostCommitFiberRoot=="function")try{Yr.onPostCommitFiberRoot(gd,e)}catch{}n=!0}return n}finally{ae=r,cr.transition=t}}return!1}function Q0(e,t,r){t=ps(r,t),t=wb(e,t,1),e=Zn(e,t,1),t=Tt(),e!==null&&(vl(e,1,t),Pt(e,t))}function Le(e,t,r){if(e.tag===3)Q0(e,e,r);else for(;t!==null;){if(t.tag===3){Q0(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Qn===null||!Qn.has(n))){e=ps(r,e),e=xb(t,e,1),t=Zn(t,e,1),e=Tt(),t!==null&&(vl(t,1,e),Pt(t,e));break}}t=t.return}}function bL(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&r,Ve===e&&(Qe&r)===r&&($e===4||$e===3&&(Qe&130023424)===Qe&&500>Oe()-bg?jo(e,0):Tg|=r),Pt(e,t)}function Yb(e,t){t===0&&((e.mode&1)===0?t=1:(t=Eu,Eu<<=1,(Eu&130023424)===0&&(Eu=4194304)));var r=Tt();e=Tn(e,t),e!==null&&(vl(e,t,r),Pt(e,r))}function kL(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Yb(e,r)}function IL(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(x(314))}n!==null&&n.delete(t),Yb(e,r)}var qb;qb=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lt.current)Mt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Mt=!1,pL(e,t,r);Mt=(e.flags&131072)!==0}else Mt=!1,Ie&&(t.flags&1048576)!==0&&ZT(t,od,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;$u(e,t),e=t.pendingProps;var o=ls(t,ft.current);is(t,r),o=gg(null,t,n,e,o,r);var i=Sg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ot(n)?(i=!0,rd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dg(t),o.updater=bd,t.stateNode=o,o._reactInternals=t,xh(t,n,e,r),t=Nh(null,t,n,!0,i,r)):(t.tag=0,Ie&&i&&og(t),Et(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch($u(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=xL(n),e=Rr(n,e),o){case 0:t=Ch(null,t,n,e,r);break e;case 1:t=W0(null,t,n,e,r);break e;case 11:t=z0(null,t,n,e,r);break e;case 14:t=$0(null,t,n,Rr(n.type,e),r);break e}throw Error(x(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Rr(n,o),Ch(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Rr(n,o),W0(e,t,n,o,r);case 3:e:{if(Ab(t),e===null)throw Error(x(387));n=t.pendingProps,i=t.memoizedState,o=i.element,ob(e,t),ad(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ps(Error(x(423)),t),t=j0(e,t,n,r,o);break e}else if(n!==o){o=ps(Error(x(424)),t),t=j0(e,t,n,r,o);break e}else for(Wt=Jn(t.stateNode.containerInfo.firstChild),jt=t,Ie=!0,Nr=null,r=rb(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(cs(),n===o){t=bn(e,t,r);break e}Et(e,t,n,r)}t=t.child}return t;case 5:return ib(t),e===null&&kh(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,vh(n,o)?s=null:i!==null&&vh(n,i)&&(t.flags|=32),Nb(e,t),Et(e,t,s,r),t.child;case 6:return e===null&&kh(t),null;case 13:return Mb(e,t,r);case 4:return pg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=us(t,null,n,r):Et(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Rr(n,o),z0(e,t,n,o,r);case 7:return Et(e,t,t.pendingProps,r),t.child;case 8:return Et(e,t,t.pendingProps.children,r),t.child;case 12:return Et(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Se(id,n._currentValue),n._currentValue=s,i!==null)if(Lr(i.value,s)){if(i.children===o.children&&!Lt.current){t=bn(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=vn(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Ih(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(x(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),Ih(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Et(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,is(t,r),o=ur(o),n=n(o),t.flags|=1,Et(e,t,n,r),t.child;case 14:return n=t.type,o=Rr(n,t.pendingProps),o=Rr(n.type,o),$0(e,t,n,o,r);case 15:return Rb(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Rr(n,o),$u(e,t),t.tag=1,Ot(n)?(e=!0,rd(t)):e=!1,is(t,r),Ib(t,n,o),xh(t,n,o,r),Nh(null,t,n,!0,e,r);case 19:return Lb(e,t,r);case 22:return Cb(e,t,r)}throw Error(x(156,t.tag))};function Kb(e,t){return TT(e,t)}function wL(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lr(e,t,r,n){return new wL(e,t,r,n)}function xg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xL(e){if(typeof e=="function")return xg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vh)return 11;if(e===Yh)return 14}return 2}function to(e,t){var r=e.alternate;return r===null?(r=lr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gu(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")xg(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ji:return Go(r.children,o,i,t);case Gh:s=8,o|=8;break;case Jm:return e=lr(12,r,t,o|2),e.elementType=Jm,e.lanes=i,e;case Zm:return e=lr(13,r,t,o),e.elementType=Zm,e.lanes=i,e;case Qm:return e=lr(19,r,t,o),e.elementType=Qm,e.lanes=i,e;case iT:return wd(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nT:s=10;break e;case oT:s=9;break e;case Vh:s=11;break e;case Yh:s=14;break e;case $n:s=16,n=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=lr(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Go(e,t,r,n){return e=lr(7,e,n,t),e.lanes=r,e}function wd(e,t,r,n){return e=lr(22,e,n,t),e.elementType=iT,e.lanes=r,e.stateNode={isHidden:!1},e}function qm(e,t,r){return e=lr(6,e,null,t),e.lanes=r,e}function Km(e,t,r){return t=lr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function RL(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mm(0),this.expirationTimes=Mm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mm(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rg(e,t,r,n,o,i,s,a,l){return e=new RL(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=lr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dg(i),e}function CL(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Wi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Xb(e){if(!e)return no;e=e._reactInternals;e:{if(Zo(e)!==e||e.tag!==1)throw Error(x(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(x(171))}if(e.tag===1){var r=e.type;if(Ot(r))return XT(e,r,t)}return t}function Jb(e,t,r,n,o,i,s,a,l){return e=Rg(r,n,!0,e,o,i,s,a,l),e.context=Xb(null),r=e.current,n=Tt(),o=eo(r),i=vn(n,o),i.callback=t??null,Zn(r,i,o),e.current.lanes=o,vl(e,o,n),Pt(e,n),e}function xd(e,t,r,n){var o=t.current,i=Tt(),s=eo(o);return r=Xb(r),t.context===null?t.context=r:t.pendingContext=r,t=vn(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Zn(o,t,s),e!==null&&(Mr(e,o,s,i),Fu(e,o,s)),s}function hd(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function eT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Cg(e,t){eT(e,t),(e=e.alternate)&&eT(e,t)}function NL(){return null}var Zb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ng(e){this._internalRoot=e}Rd.prototype.render=Ng.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(x(409));xd(e,t,null,null)};Rd.prototype.unmount=Ng.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xo(function(){xd(null,e,null,null)}),t[En]=null}};function Rd(e){this._internalRoot=e}Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=CT();e={blockedOn:null,target:e,priority:t};for(var r=0;r<jn.length&&t!==0&&t<jn[r].priority;r++);jn.splice(r,0,e),r===0&&AT(e)}};function Ag(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function tT(){}function AL(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=hd(s);i.call(c)}}var s=Jb(t,n,e,0,null,!1,!1,"",tT);return e._reactRootContainer=s,e[En]=s.current,ul(e.nodeType===8?e.parentNode:e),Xo(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var a=n;n=function(){var c=hd(l);a.call(c)}}var l=Rg(e,0,!1,null,null,!1,!1,"",tT);return e._reactRootContainer=l,e[En]=l.current,ul(e.nodeType===8?e.parentNode:e),Xo(function(){xd(t,l,r,n)}),l}function Nd(e,t,r,n,o){var i=r._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=hd(s);a.call(l)}}xd(t,s,e,o)}else s=AL(r,t,e,o,n);return hd(s)}xT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ga(t.pendingLanes);r!==0&&(Xh(t,r|1),Pt(t,Oe()),(ee&6)===0&&(fs=Oe()+500,so()))}break;case 13:Xo(function(){var n=Tn(e,1);if(n!==null){var o=Tt();Mr(n,e,1,o)}}),Cg(e,1)}};Jh=function(e){if(e.tag===13){var t=Tn(e,134217728);if(t!==null){var r=Tt();Mr(t,e,134217728,r)}Cg(e,134217728)}};RT=function(e){if(e.tag===13){var t=eo(e),r=Tn(e,t);if(r!==null){var n=Tt();Mr(r,e,t,n)}Cg(e,t)}};CT=function(){return ae};NT=function(e,t){var r=ae;try{return ae=e,t()}finally{ae=r}};ch=function(e,t,r){switch(t){case"input":if(rh(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=_d(n);if(!o)throw Error(x(90));aT(n),rh(n,o)}}}break;case"textarea":cT(e,r);break;case"select":t=r.value,t!=null&&ts(e,!!r.multiple,t,!1)}};gT=kg;ST=Xo;var ML={usingClientEntryPoint:!1,Events:[El,qi,_d,mT,hT,kg]},za={findFiberByHostInstance:zo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},LL={bundleType:za.bundleType,version:za.version,rendererPackageName:za.rendererPackageName,rendererConfig:za.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:kn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_T(e),e===null?null:e.stateNode},findFiberByHostInstance:za.findFiberByHostInstance||NL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&($a=__REACT_DEVTOOLS_GLOBAL_HOOK__,!$a.isDisabled&&$a.supportsFiber))try{gd=$a.inject(LL),Yr=$a}catch{}var $a;Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ML;Yt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ag(t))throw Error(x(200));return CL(e,t,null,r)};Yt.createRoot=function(e,t){if(!Ag(e))throw Error(x(299));var r=!1,n="",o=Zb;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Rg(e,1,!1,null,null,r,!1,n,o),e[En]=t.current,ul(e.nodeType===8?e.parentNode:e),new Ng(t)};Yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(x(188)):(e=Object.keys(e).join(","),Error(x(268,e)));return e=_T(t),e=e===null?null:e.stateNode,e};Yt.flushSync=function(e){return Xo(e)};Yt.hydrate=function(e,t,r){if(!Cd(t))throw Error(x(200));return Nd(null,e,t,!0,r)};Yt.hydrateRoot=function(e,t,r){if(!Ag(e))throw Error(x(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",s=Zb;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=Jb(t,null,e,1,r??null,o,!1,i,s),e[En]=t.current,ul(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Rd(t)};Yt.render=function(e,t,r){if(!Cd(t))throw Error(x(200));return Nd(null,e,t,!1,r)};Yt.unmountComponentAtNode=function(e){if(!Cd(e))throw Error(x(40));return e._reactRootContainer?(Xo(function(){Nd(null,null,e,!1,function(){e._reactRootContainer=null,e[En]=null})}),!0):!1};Yt.unstable_batchedUpdates=kg;Yt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Cd(r))throw Error(x(200));if(e==null||e._reactInternals===void 0)throw Error(x(38));return Nd(e,t,r,!1,n)};Yt.version="18.3.1-next-f1338f8080-20240426"});var rk=Jr((r9,tk)=>{"use strict";function ek(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ek)}catch(e){console.error(e)}}ek(),tk.exports=Qb()});var ok=Jr(Mg=>{"use strict";var nk=rk();Mg.createRoot=nk.createRoot,Mg.hydrateRoot=nk.hydrateRoot;var n9});var dk=Jr(Md=>{"use strict";var UL=fn(),BL=Symbol.for("react.element"),FL=Symbol.for("react.fragment"),HL=Object.prototype.hasOwnProperty,zL=UL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$L={key:!0,ref:!0,__self:!0,__source:!0};function uk(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)HL.call(t,n)&&!$L.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:BL,type:e,key:i,ref:s,props:o,_owner:zL.current}}Md.Fragment=FL;Md.jsx=uk;Md.jsxs=uk});var Il=Jr((m9,pk)=>{"use strict";pk.exports=dk()});var C=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var O=globalThis;var Pr="10.56.0";function Ut(){return po(O),O}function po(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Pr,t[Pr]=t[Pr]||{}}function gr(e,t,r=O){let n=r.__SENTRY__=r.__SENTRY__||{},o=n[Pr]=n[Pr]||{};return o[e]||(o[e]=t())}var xl=["debug","info","warn","error","log","assert","trace"],Uk="Sentry Logger ",fo={};function qe(e){if(!("console"in O))return e();let t=O.console,r={},n=Object.keys(fo);n.forEach(o=>{let i=fo[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function Bk(){Bd().enabled=!0}function Fk(){Bd().enabled=!1}function Bg(){return Bd().enabled}function Hk(...e){Ud("log",...e)}function zk(...e){Ud("warn",...e)}function $k(...e){Ud("error",...e)}function Ud(e,...t){C&&Bg()&&qe(()=>{O.console[e](`${Uk}[${e}]:`,...t)})}function Bd(){return C?gr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var T={enable:Bk,disable:Fk,isEnabled:Bg,log:Hk,warn:zk,error:$k};var Fg=/\(error: (.*)\)/,Hg=/captureMessage|captureException/;function vs(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,o=0)=>{let i=[],s=r.split(`
|
|
9
|
+
`);for(let a=n;a<s.length;a++){let l=s[a];l.length>1024&&(l=l.slice(0,1024));let c=Fg.test(l)?l.replace(Fg,"$1"):l;if(!c.includes("Error: ")){for(let d of t){let u=d(c);if(u){i.push(u);break}}if(i.length>=50+o)break}}return Hd(i.slice(o))}}function Cl(e){return Array.isArray(e)?vs(...e):e}function Hd(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Rl(t).function||"")&&t.pop(),t.reverse(),Hg.test(Rl(t).function||"")&&(t.pop(),Hg.test(Rl(t).function||"")&&t.pop()),t.slice(0,50).map(r=>({...r,filename:r.filename||Rl(t).filename,function:r.function||"?"}))}function Rl(e){return e[e.length-1]||{}}var Fd="<anonymous>";function mt(e){try{return!e||typeof e!="function"?Fd:e.name||Fd}catch{return Fd}}function _s(e){let t=e.exception;if(t){let r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}var Es={},zg={};function rt(e,t){return Es[e]=Es[e]||[],Es[e].push(t),()=>{let r=Es[e];if(r){let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}function nt(e,t){if(!zg[e]){zg[e]=!0;try{t()}catch(r){C&&T.error(`Error while instrumenting ${e}`,r)}}}function Pe(e,t){let r=e&&Es[e];if(r)for(let n of r)try{n(t)}catch(o){C&&T.error(`Error while triggering instrumentation handler.
|
|
10
10
|
Type: ${e}
|
|
11
|
-
Name: ${
|
|
12
|
-
Error:`,o)}}var zd=null;function Ts(e){let t="error";tt(t,e),rt(t,$I)}function $I(){zd=L.onerror,L.onerror=function(e,t,r,n,o){return Oe("error",{column:n,error:o,line:r,msg:e,url:t}),zd?zd.apply(this,arguments):!1},L.onerror.__SENTRY_INSTRUMENTED__=!0}var $d=null;function bs(e){let t="unhandledrejection";tt(t,e),rt(t,jI)}function jI(){$d=L.onunhandledrejection,L.onunhandledrejection=function(e){return Oe("unhandledrejection",e),$d?$d.apply(this,arguments):!0},L.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var $g=Object.prototype.toString;function qt(e){switch($g.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Sr(e,Error)}}function ei(e,t){return $g.call(e)===`[object ${t}]`}function ti(e){return ei(e,"ErrorEvent")}function Is(e){return ei(e,"DOMError")}function Cl(e){return ei(e,"DOMException")}function nt(e){return ei(e,"String")}function In(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function bt(e){return e===null||In(e)||typeof e!="object"&&typeof e!="function"}function Kt(e){return ei(e,"Object")}function xn(e){return typeof Event<"u"&&Sr(e,Event)}function Al(e){return ei(e,"RegExp")}function gr(e){return!!(e?.then&&typeof e.then=="function")}function Sr(e,t){try{return e instanceof t}catch{return!1}}function xs(e){return typeof Request<"u"&&Sr(e,Request)}function Ne(e,t,r){if(!(t in e))return;let n=e[t];if(typeof n!="function")return;let o=r(n);typeof o=="function"&&ks(o,n);try{e[t]=o}catch{N&&T.log(`Failed to replace method "${t}" in object`,e)}}function ve(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{N&&T.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function ks(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,ve(e,"__sentry_original__",t)}catch{}}function kn(e){return e.__sentry_original__}function ws(e){if(qt(e))return{message:e.message,name:e.name,stack:e.stack,...jg(e)};if(xn(e)){let{type:t,target:r,currentTarget:n,detail:o}=e;return{type:t,target:r,currentTarget:n,...o?{detail:o}:{},...jg(e)}}return e}function jg(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function Ml(e){let t=Object.keys(ws(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var ri;function fo(e){if(ri!==void 0)return ri?ri(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=L;return t in r&&typeof r[t]=="function"?(ri=r[t],ri(e)):(ri=null,e())}function Xt(){return fo(()=>Math.random())}function mo(){return fo(()=>Date.now())}var WI=Symbol.for("sentry.skipNormalization"),GI=Symbol.for("sentry.overrideNormalizationDepth");function Wg(e){return!!e[WI]}function Gg(e){let t=e[GI];return typeof t=="number"?t:void 0}var jd;function ni(e){jd=e}function ot(e,t=100,r=1/0){try{return Wd("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Rs(e,t=3,r=100*1024){let n=ot(e,t);return qI(n)>r?Rs(e,t-1,r):n}function Wd(e,t,r=1/0,n=1/0,o=KI()){let[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Gd(e,t);if(!a.startsWith("[object "))return a;if(Wg(t))return t;let l=Gg(t),c=l!==void 0?l:r;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let h=u.toJSON();return Wd("",h,c-1,n,o)}catch{}let d=Array.isArray(t)?[]:{},p=0,f=ws(t);for(let h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(p>=n){d[h]="[MaxProperties ~]";break}let y=f[h];d[h]=Wd(h,y,c-1,n,o),p++}return s(t),d}function Gd(e,t){try{if(jd){let n=jd(t);if(n)return n}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${ft(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${VI(t)}]`}catch(r){return`**non-serializable** (${r})`}}function VI(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function YI(e){return~-encodeURI(e).split(/%..|./).length}function qI(e){return YI(JSON.stringify(e))}function KI(){let e=new WeakSet;function t(n){return e.has(n)?!0:(e.add(n),!1)}function r(n){e.delete(n)}return[t,r]}function ho(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ns(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let o=e[n];bt(o)?r.push(String(o)):o instanceof Error?r.push(o.message?`${o.name}: ${o.message}`:o.name):r.push(Gd(void 0,o))}return r.join(t)}function wn(e,t,r=!1){return nt(e)?Al(t)?t.test(e):nt(t)?r?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Ke(e,t=[],r=!1){for(let n of t)if(wn(e,n,r))return!0;return!1}function XI(){let e=L;return e.crypto||e.msCrypto}var Vd;function JI(){return Xt()*16}function Ce(e=XI()){try{if(e?.randomUUID)return fo(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Vd||(Vd="10000000100040008000"+1e11),Vd.replace(/[018]/g,t=>(t^(JI()&15)>>t/4).toString(16))}function Vg(e){return e.exception?.values?.[0]}function yr(e){let{message:t,event_id:r}=e;if(t)return t;let n=Vg(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function go(e,t,r){let n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=r||"Error")}function Jt(e,t){let r=Vg(e);if(!r)return;let n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...t},t&&"data"in t){let i={...o?.data,...t.data};r.mechanism.data=i}}function Cs(e){if(Yd(e))return!0;try{ve(e,"__sentry_captured__",!0)}catch{}return!1}function Yd(e){try{return e.__sentry_captured__}catch{}}var qg=1e3;function It(){return mo()/qg}function QI(){let{performance:e}=L;if(!e?.now||!e.timeOrigin)return It;let t=e.timeOrigin;return()=>(t+fo(()=>e.now()))/qg}var Yg;function ne(){return(Yg??(Yg=QI()))()}var qd=null;function ZI(){let{performance:e}=L;if(!e?.now)return;let t=3e5,r=fo(()=>e.now()),n=mo(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+r-n)<t)return o;let i=e.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+r-n)<t?i:n-r}function ue(){return qd===null&&(qd=ZI()),qd}function Kg(e){let t=ne(),r={sid:Ce(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>ex(r)};return e&&Jr(r,e),r}function Jr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ne(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ce()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Xg(e,t){let r={};t?r={status:t}:e.status==="ok"&&(r={status:"exited"}),Jr(e,r)}function ex(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Rn(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;let n={...e};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=Rn(n[o],t[o],r-1));return n}function mt(){return Ce()}function it(){return Ce().substring(16)}function Ll(e){try{let t=L.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Ol(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var Kd="_sentrySpan";function Nn(e,t){t?ve(e,Kd,Ll(t)):delete e[Kd]}function So(e){return Ol(e[Kd])}var tx=100,xt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:mt(),sampleRand:Xt()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Nn(t,So(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Jr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this.setTags({[t]:r})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,r){return this.setAttributes({[t]:r})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let r=typeof t=="function"?t(this):t,n=r instanceof e?r.getScopeData():Kt(r)?t:void 0,{tags:o,attributes:i,extra:s,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d,conversationId:p}=n||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Nn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mt(),sampleRand:Xt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){let n=typeof r=="number"?r:tx;if(n<=0)return this;let o={timestamp:It(),...t,message:t.message?ho(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:So(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Rn(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){let n=r?.event_id||Ce();if(!this._client)return N&&T.warn("No client configured on scope - will not capture exception!"),n;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...r,event_id:n},this),n}captureMessage(t,r,n){let o=n?.event_id||Ce();if(!this._client)return N&&T.warn("No client configured on scope - will not capture message!"),o;let i=n?.syntheticException??new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:o},this),o}captureEvent(t,r){let n=t.event_id||r?.event_id||Ce();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(N&&T.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Jg(){return hr("defaultCurrentScope",()=>new xt)}function Qg(){return hr("defaultIsolationScope",()=>new xt)}var Zg=e=>e instanceof Promise&&!e[eS],eS=Symbol("chained PromiseLike"),tS=(e,t,r)=>{let n=e.then(o=>(t(o),o),o=>{throw r(o),o});return Zg(n)&&Zg(e)?n:rx(e,n)},rx=(e,t)=>{if(!t)return e;let r=!1;for(let n in e){if(n in t)continue;r=!0;let o=e[n];typeof o=="function"?Object.defineProperty(t,n,{value:(...i)=>o.apply(e,i),enumerable:!0,configurable:!0,writable:!0}):t[n]=o}return r&&Object.assign(t,{[eS]:!0}),t};var Xd=class{constructor(t,r){let n;t?n=t:n=new xt;let o;r?o=r:o=new xt,this._stack=[{scope:n}],this._isolationScope=o}withScope(t){let r=this._pushScope(),n;try{n=t(r)}catch(o){throw this._popScope(),o}return gr(n)?tS(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function oi(){let e=Ut(),t=uo(e);return t.stack=t.stack||new Xd(Jg(),Qg())}function nx(e){return oi().withScope(e)}function ox(e,t){let r=oi();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function rS(e){return oi().withScope(()=>e(oi().getIsolationScope()))}function nS(){return{withIsolationScope:rS,withScope:nx,withSetScope:ox,withSetIsolationScope:(e,t)=>rS(t),getCurrentScope:()=>oi().getScope(),getIsolationScope:()=>oi().getIsolationScope()}}function Dr(e){let t=uo(e);return t.acs?t.acs:nS()}function ix(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function sx(e,t){let{value:r,unit:n}=ix(e)?e:{value:e,unit:void 0},o=ax(r),i=n&&typeof n=="string"?{unit:n}:{};if(o)return{...o,...i};if(!t||t==="skip-undefined"&&r===void 0)return;let s="";try{s=JSON.stringify(r)??""}catch{}return{value:s,type:"string",...i}}function Jd(e,t=!1){let r={};for(let[n,o]of Object.entries(e??{})){let i=sx(o,t);i&&(r[n]=i)}return r}function ax(e){if(Array.isArray(e))return{value:e,type:"array"};let t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}var oS;function Qd(){return oS?.()}function Dl(){return oS!==void 0}function U(){let e=Ut();return Dr(e).getCurrentScope()}function be(){let e=Ut();return Dr(e).getIsolationScope()}function As(){return hr("globalScope",()=>new xt)}function Qt(...e){let t=Ut(),r=Dr(t);if(e.length===2){let[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function M(){return U().getClient()}function Pl(e){let t=Qd();if(t)return{trace_id:t.traceId,span_id:t.spanId};let r=e.getPropagationContext(),{traceId:n,parentSpanId:o,propagationSpanId:i}=r,s={trace_id:n,span_id:i||it()};return o&&(s.parent_span_id=o),s}var Fe="sentry.source",Qr="sentry.sample_rate",ii="sentry.previous_trace_sample_rate",_e="sentry.op",J="sentry.origin",Zr="sentry.idle_span_finish_reason",vr="sentry.measurement_unit",_r="sentry.measurement_value";var si="sentry.custom_span_name",yo="sentry.profile_id",st="sentry.exclusive_time";var Ul="sentry.link.type",Bl="gen_ai.conversation.id";function Zd(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function ai(e,t){e.setAttribute("http.response.status_code",t);let r=Zd(t);r.message!=="unknown_error"&&e.setStatus(r)}var iS="_sentryScope",sS="_sentryIsolationScope";function aS(e,t,r){e&&(ve(e,sS,Ll(r)),ve(e,iS,t))}function vo(e){let t=e;return{scope:t[iS],isolationScope:Ol(t[sS])}}var Ms="sentry-";var lx=8192;function Fl(e){let t=cx(e);if(!t)return;let r=Object.entries(t).reduce((n,[o,i])=>{if(o.startsWith(Ms)){let s=o.slice(Ms.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function ep(e){if(!e)return;let t=Object.entries(e).reduce((r,[n,o])=>(o&&(r[`${Ms}${n}`]=o),r),{});return ux(t)}function cx(e){if(!(!e||!nt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{let n=lS(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):lS(e)}function lS(e){return e.split(",").map(t=>{let r=t.indexOf("=");if(r===-1)return[];let n=t.slice(0,r),o=t.slice(r+1);return[n,o].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}function ux(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],o)=>{let i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,s=o===0?i:`${t},${i}`;return s.length>lx?(N&&T.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}var dx=/^o(\d+)\./,px=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function fx(e){return e==="http"||e==="https"}function Bt(e,t=!1){let{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function mx(e){let t=px.exec(e);if(!t){qe(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,o="",i="",s="",a=""]=t.slice(1),l="",c=a,u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return cS({host:i,pass:o,path:l,projectId:c,port:s,protocol:r,publicKey:n})}function cS(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function hx(e){if(!N)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(T.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?fx(n)?t&&isNaN(parseInt(t,10))?(T.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(T.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(T.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function gx(e){return e.match(dx)?.[1]}function uS(e){let t=e.getOptions(),{host:r}=e.getDsn()||{},n;return t.orgId?n=String(t.orgId):r&&(n=gx(r)),n}function Hl(e){let t=typeof e=="string"?mx(e):cS(e);if(!(!t||!hx(t)))return t}function Ft(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var zl=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function dS(e){if(!e)return;let t=e.match(zl);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function tp(e,t){let r=dS(e),n=Fl(t);if(!r?.traceId)return{traceId:mt(),sampleRand:Xt()};let o=Sx(r,n);n&&(n.sample_rand=o.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=r;return{traceId:i,parentSpanId:s,sampled:a,dsc:n||{},sampleRand:o}}function Ls(e=mt(),t=it(),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function Os(e=mt(),t=it(),r){return`00-${e}-${t}-${r?"01":"00"}`}function Sx(e,t){let r=Ft(t?.sample_rand);if(r!==void 0)return r;let n=Ft(t?.sample_rate);return n&&e?.parentSampled!==void 0?e.parentSampled?Xt()*n:n+Xt()*(1-n):Xt()}var $l=0,Ps=1,pS=!1;function hS(e){let{spanId:t,traceId:r}=e.spanContext(),{data:n,op:o,parent_span_id:i,status:s,origin:a,links:l}=B(e);return{parent_span_id:i,span_id:t,trace_id:r,data:n,op:o,status:s,origin:a,links:l}}function jl(e){let{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:B(e).parent_span_id,i=vo(e).scope,s=n?i?.getPropagationContext().propagationSpanId||it():t;return{parent_span_id:o,span_id:s,trace_id:r}}function Us(e){let{traceId:t,spanId:r}=e.spanContext(),n=wt(e);return Ls(t,r,n)}function gS(e){let{traceId:t,spanId:r}=e.spanContext(),n=wt(e);return Os(t,r,n)}function Bs(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:r,traceFlags:n,...o},attributes:i})=>({span_id:t,trace_id:r,sampled:n===Ps,attributes:i,...o}))}function op(e){if(e?.length)return e.map(({context:{spanId:t,traceId:r,traceFlags:n},attributes:o})=>({span_id:t,trace_id:r,sampled:n===Ps,attributes:o}))}function kt(e){return typeof e=="number"?fS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?fS(e.getTime()):ne()}function fS(e){return e>9999999999?e/1e3:e}function B(e){if(_S(e))return e.getSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(vS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{span_id:t,trace_id:r,data:n,description:i,parent_span_id:SS(e),start_timestamp:kt(o),timestamp:kt(s)||void 0,status:Hs(a),op:n[_e],origin:n[J],links:Bs(l)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function Fs(e){if(_S(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(vS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{name:i,span_id:t,trace_id:r,parent_span_id:SS(e),start_timestamp:kt(o),end_timestamp:kt(s),is_segment:e===Ds(e),status:ip(a),attributes:n,links:op(l)}}return{span_id:t,trace_id:r,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Ds(e)}}function SS(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function yS(e){return{...e,attributes:Jd(e.attributes),links:e.links?.map(t=>({...t,attributes:Jd(t.attributes)}))}}function vS(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _S(e){return typeof e.getSpanJSON=="function"}function wt(e){let{traceFlags:t}=e.spanContext();return t===Ps}function Hs(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function ip(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}var _o="_sentryChildSpans",rp="_sentryRootSpan";function zs(e,t){let r=e[rp]||e;ve(t,rp,r),e[_o]?e[_o].add(t):ve(e,_o,new Set([t]))}function ES(e,t){e[_o]&&e[_o].delete(t)}function en(e){let t=new Set;function r(n){if(!t.has(n)&&wt(n)){t.add(n);let o=n[_o]?Array.from(n[_o]):[];for(let i of o)r(i)}}return r(e),Array.from(t)}var te=Ds;function Ds(e){return e[rp]||e}function ie(){let e=Ut(),t=Dr(e);return t.getActiveSpan?t.getActiveSpan():So(U())}function $s(){pS||(qe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),pS=!0)}var TS=!1;function Wl(){if(TS)return;function e(){let t=ie(),r=t&&te(t);if(r){let n="internal_error";N&&T.log(`[Tracing] Root span: ${n} -> Global error occurred`),r.setStatus({code:2,message:n})}}TS=!0,Ts(e),bs(e)}function He(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||M()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function bS(e){T.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function tn(e,t){if(!t?.length)return!1;for(let r of t){if(vx(r)){if(e.description&&wn(e.description,r))return N&&bS(e),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let o=r.name?e.description&&wn(e.description,r.name):!0,i=r.op?e.op&&wn(e.op,r.op):!0,s=r.attributes?Object.entries(r.attributes).every(([a,l])=>yx(e.attributes?.[a],l)):!0;if(o&&i&&s)return N&&bS(e),!0}return!1}function yx(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?wn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e===t}function IS(e,t){let r=t.parent_span_id,n=t.span_id;if(r)for(let o of e)o.parent_span_id===n&&(o.parent_span_id=r)}function vx(e){return typeof e=="string"||e instanceof RegExp}var li="production";var xS="_frozenDsc";function ci(e,t){ve(e,xS,t)}function Gl(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o={environment:r.environment||li,release:r.release,public_key:n,trace_id:e,org_id:uS(t)};return t.emit("createDsc",o),o}function ui(e,t){let r=t.getPropagationContext();return r.dsc||Gl(r.traceId,e)}function De(e){let t=M();if(!t)return{};let r=te(e),n=B(r),o=n.data,i=r.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[Qr]??o[ii];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let l=r[xS];if(l)return a(l);let c=i?.get("sentry.dsc"),u=c&&Fl(c);if(u)return a(u);let d=Gl(e.spanContext().traceId,t),p=o[Fe]??o["sentry.span.source"],f=n.description;return p!=="url"&&f&&(d.transaction=f),He()&&(d.sampled=String(wt(r)),d.sample_rand=i?.get("sentry.sample_rand")??vo(r).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,r),d}var Xe=class{constructor(t={}){this._traceId=t.traceId||mt(),this._spanId=t.spanId||it(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:$l}}end(t){}setAttribute(t,r){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,r,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,r){}};function Vl(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function ht(e,t=[]){return[e,t]}function Yl(e,t){let[r,n]=e;return[r,[...n,t]]}function js(e,t){let r=e[1];for(let n of r){let o=n[0].type;if(t(n,o))return!0}return!1}function ap(e,t){return js(e,(r,n)=>t.includes(n))}function sp(e){let t=uo(L);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function lp(e){let[t,r]=e,n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[sp(n),i]:n.push(typeof i=="string"?sp(i):i)}for(let i of r){let[s,a]=i;if(o(`
|
|
11
|
+
Name: ${mt(n)}
|
|
12
|
+
Error:`,o)}}var zd=null;function Ts(e){let t="error";rt(t,e),nt(t,Wk)}function Wk(){zd=O.onerror,O.onerror=function(e,t,r,n,o){return Pe("error",{column:n,error:o,line:r,msg:e,url:t}),zd?zd.apply(this,arguments):!1},O.onerror.__SENTRY_INSTRUMENTED__=!0}var $d=null;function bs(e){let t="unhandledrejection";rt(t,e),nt(t,jk)}function jk(){$d=O.onunhandledrejection,O.onunhandledrejection=function(e){return Pe("unhandledrejection",e),$d?$d.apply(this,arguments):!0},O.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var $g=Object.prototype.toString;function qt(e){switch($g.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return yr(e,Error)}}function ti(e,t){return $g.call(e)===`[object ${t}]`}function ri(e){return ti(e,"ErrorEvent")}function ks(e){return ti(e,"DOMError")}function Nl(e){return ti(e,"DOMException")}function ot(e){return ti(e,"String")}function In(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function kt(e){return e===null||In(e)||typeof e!="object"&&typeof e!="function"}function Kt(e){return ti(e,"Object")}function wn(e){return typeof Event<"u"&&yr(e,Event)}function Al(e){return ti(e,"RegExp")}function Sr(e){return!!(e?.then&&typeof e.then=="function")}function yr(e,t){try{return e instanceof t}catch{return!1}}function Is(e){return typeof Request<"u"&&yr(e,Request)}function Ne(e,t,r){if(!(t in e))return;let n=e[t];if(typeof n!="function")return;let o=r(n);typeof o=="function"&&ws(o,n);try{e[t]=o}catch{C&&T.log(`Failed to replace method "${t}" in object`,e)}}function ve(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{C&&T.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function ws(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,ve(e,"__sentry_original__",t)}catch{}}function xn(e){return e.__sentry_original__}function xs(e){if(qt(e))return{message:e.message,name:e.name,stack:e.stack,...Wg(e)};if(wn(e)){let{type:t,target:r,currentTarget:n,detail:o}=e;return{type:t,target:r,currentTarget:n,...o?{detail:o}:{},...Wg(e)}}return e}function Wg(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function Ml(e){let t=Object.keys(xs(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var ni;function mo(e){if(ni!==void 0)return ni?ni(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=O;return t in r&&typeof r[t]=="function"?(ni=r[t],ni(e)):(ni=null,e())}function Xt(){return mo(()=>Math.random())}function ho(){return mo(()=>Date.now())}var Gk=Symbol.for("sentry.skipNormalization"),Vk=Symbol.for("sentry.overrideNormalizationDepth");function jg(e){return!!e[Gk]}function Gg(e){let t=e[Vk];return typeof t=="number"?t:void 0}var Wd;function oi(e){Wd=e}function it(e,t=100,r=1/0){try{return jd("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Rs(e,t=3,r=100*1024){let n=it(e,t);return Kk(n)>r?Rs(e,t-1,r):n}function jd(e,t,r=1/0,n=1/0,o=Xk()){let[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Gd(e,t);if(!a.startsWith("[object "))return a;if(jg(t))return t;let l=Gg(t),c=l!==void 0?l:r;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let d=t;if(d&&typeof d.toJSON=="function")try{let h=d.toJSON();return jd("",h,c-1,n,o)}catch{}let u=Array.isArray(t)?[]:{},p=0,f=xs(t);for(let h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(p>=n){u[h]="[MaxProperties ~]";break}let v=f[h];u[h]=jd(h,v,c-1,n,o),p++}return s(t),u}function Gd(e,t){try{if(Wd){let n=Wd(t);if(n)return n}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${mt(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Yk(t)}]`}catch(r){return`**non-serializable** (${r})`}}function Yk(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function qk(e){return~-encodeURI(e).split(/%..|./).length}function Kk(e){return qk(JSON.stringify(e))}function Xk(){let e=new WeakSet;function t(n){return e.has(n)?!0:(e.add(n),!1)}function r(n){e.delete(n)}return[t,r]}function go(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Cs(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let o=e[n];kt(o)?r.push(String(o)):o instanceof Error?r.push(o.message?`${o.name}: ${o.message}`:o.name):r.push(Gd(void 0,o))}return r.join(t)}function Rn(e,t,r=!1){return ot(e)?Al(t)?t.test(e):ot(t)?r?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Ke(e,t=[],r=!1){for(let n of t)if(Rn(e,n,r))return!0;return!1}function Jk(){let e=O;return e.crypto||e.msCrypto}var Vd;function Zk(){return Xt()*16}function Ae(e=Jk()){try{if(e?.randomUUID)return mo(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Vd||(Vd="10000000100040008000"+1e11),Vd.replace(/[018]/g,t=>(t^(Zk()&15)>>t/4).toString(16))}function Vg(e){return e.exception?.values?.[0]}function vr(e){let{message:t,event_id:r}=e;if(t)return t;let n=Vg(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function So(e,t,r){let n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=r||"Error")}function Jt(e,t){let r=Vg(e);if(!r)return;let n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...t},t&&"data"in t){let i={...o?.data,...t.data};r.mechanism.data=i}}function Ns(e){if(Yd(e))return!0;try{ve(e,"__sentry_captured__",!0)}catch{}return!1}function Yd(e){try{return e.__sentry_captured__}catch{}}var qg=1e3;function It(){return ho()/qg}function Qk(){let{performance:e}=O;if(!e?.now||!e.timeOrigin)return It;let t=e.timeOrigin;return()=>(t+mo(()=>e.now()))/qg}var Yg;function ne(){return(Yg??(Yg=Qk()))()}var qd=null;function eI(){let{performance:e}=O;if(!e?.now)return;let t=3e5,r=mo(()=>e.now()),n=ho(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+r-n)<t)return o;let i=e.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+r-n)<t?i:n-r}function ue(){return qd===null&&(qd=eI()),qd}function Kg(e){let t=ne(),r={sid:Ae(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>tI(r)};return e&&Zr(r,e),r}function Zr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ne(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ae()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Xg(e,t){let r={};t?r={status:t}:e.status==="ok"&&(r={status:"exited"}),Zr(e,r)}function tI(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Cn(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;let n={...e};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=Cn(n[o],t[o],r-1));return n}function ht(){return Ae()}function st(){return Ae().substring(16)}function Ll(e){try{let t=O.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Ol(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var Kd="_sentrySpan";function Nn(e,t){t?ve(e,Kd,Ll(t)):delete e[Kd]}function yo(e){return Ol(e[Kd])}var rI=100,wt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ht(),sampleRand:Xt()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Nn(t,yo(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Zr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this.setTags({[t]:r})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,r){return this.setAttributes({[t]:r})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let r=typeof t=="function"?t(this):t,n=r instanceof e?r.getScopeData():Kt(r)?t:void 0,{tags:o,attributes:i,extra:s,user:a,contexts:l,level:c,fingerprint:d=[],propagationContext:u,conversationId:p}=n||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),d.length&&(this._fingerprint=d),u&&(this._propagationContext=u),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Nn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ht(),sampleRand:Xt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){let n=typeof r=="number"?r:rI;if(n<=0)return this;let o={timestamp:It(),...t,message:t.message?go(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:yo(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Cn(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){let n=r?.event_id||Ae();if(!this._client)return C&&T.warn("No client configured on scope - will not capture exception!"),n;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...r,event_id:n},this),n}captureMessage(t,r,n){let o=n?.event_id||Ae();if(!this._client)return C&&T.warn("No client configured on scope - will not capture message!"),o;let i=n?.syntheticException??new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:o},this),o}captureEvent(t,r){let n=t.event_id||r?.event_id||Ae();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(C&&T.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Jg(){return gr("defaultCurrentScope",()=>new wt)}function Zg(){return gr("defaultIsolationScope",()=>new wt)}var Qg=e=>e instanceof Promise&&!e[eS],eS=Symbol("chained PromiseLike"),tS=(e,t,r)=>{let n=e.then(o=>(t(o),o),o=>{throw r(o),o});return Qg(n)&&Qg(e)?n:nI(e,n)},nI=(e,t)=>{if(!t)return e;let r=!1;for(let n in e){if(n in t)continue;r=!0;let o=e[n];typeof o=="function"?Object.defineProperty(t,n,{value:(...i)=>o.apply(e,i),enumerable:!0,configurable:!0,writable:!0}):t[n]=o}return r&&Object.assign(t,{[eS]:!0}),t};var Xd=class{constructor(t,r){let n;t?n=t:n=new wt;let o;r?o=r:o=new wt,this._stack=[{scope:n}],this._isolationScope=o}withScope(t){let r=this._pushScope(),n;try{n=t(r)}catch(o){throw this._popScope(),o}return Sr(n)?tS(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function ii(){let e=Ut(),t=po(e);return t.stack=t.stack||new Xd(Jg(),Zg())}function oI(e){return ii().withScope(e)}function iI(e,t){let r=ii();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function rS(e){return ii().withScope(()=>e(ii().getIsolationScope()))}function nS(){return{withIsolationScope:rS,withScope:oI,withSetScope:iI,withSetIsolationScope:(e,t)=>rS(t),getCurrentScope:()=>ii().getScope(),getIsolationScope:()=>ii().getIsolationScope()}}function Dr(e){let t=po(e);return t.acs?t.acs:nS()}function sI(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function aI(e,t){let{value:r,unit:n}=sI(e)?e:{value:e,unit:void 0},o=lI(r),i=n&&typeof n=="string"?{unit:n}:{};if(o)return{...o,...i};if(!t||t==="skip-undefined"&&r===void 0)return;let s="";try{s=JSON.stringify(r)??""}catch{}return{value:s,type:"string",...i}}function Jd(e,t=!1){let r={};for(let[n,o]of Object.entries(e??{})){let i=aI(o,t);i&&(r[n]=i)}return r}function lI(e){if(Array.isArray(e))return{value:e,type:"array"};let t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}var oS;function Zd(){return oS?.()}function Pl(){return oS!==void 0}function U(){let e=Ut();return Dr(e).getCurrentScope()}function ke(){let e=Ut();return Dr(e).getIsolationScope()}function As(){return gr("globalScope",()=>new wt)}function Zt(...e){let t=Ut(),r=Dr(t);if(e.length===2){let[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function M(){return U().getClient()}function Dl(e){let t=Zd();if(t)return{trace_id:t.traceId,span_id:t.spanId};let r=e.getPropagationContext(),{traceId:n,parentSpanId:o,propagationSpanId:i}=r,s={trace_id:n,span_id:i||st()};return o&&(s.parent_span_id=o),s}var Fe="sentry.source",Qr="sentry.sample_rate",si="sentry.previous_trace_sample_rate",_e="sentry.op",Z="sentry.origin",en="sentry.idle_span_finish_reason",_r="sentry.measurement_unit",Er="sentry.measurement_value";var ai="sentry.custom_span_name",vo="sentry.profile_id",at="sentry.exclusive_time";var Ul="sentry.link.type",Bl="gen_ai.conversation.id";function Qd(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function li(e,t){e.setAttribute("http.response.status_code",t);let r=Qd(t);r.message!=="unknown_error"&&e.setStatus(r)}var iS="_sentryScope",sS="_sentryIsolationScope";function aS(e,t,r){e&&(ve(e,sS,Ll(r)),ve(e,iS,t))}function _o(e){let t=e;return{scope:t[iS],isolationScope:Ol(t[sS])}}var Ms="sentry-";var cI=8192;function Fl(e){let t=uI(e);if(!t)return;let r=Object.entries(t).reduce((n,[o,i])=>{if(o.startsWith(Ms)){let s=o.slice(Ms.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function ep(e){if(!e)return;let t=Object.entries(e).reduce((r,[n,o])=>(o&&(r[`${Ms}${n}`]=o),r),{});return dI(t)}function uI(e){if(!(!e||!ot(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{let n=lS(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):lS(e)}function lS(e){return e.split(",").map(t=>{let r=t.indexOf("=");if(r===-1)return[];let n=t.slice(0,r),o=t.slice(r+1);return[n,o].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}function dI(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],o)=>{let i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,s=o===0?i:`${t},${i}`;return s.length>cI?(C&&T.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}var pI=/^o(\d+)\./,fI=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function mI(e){return e==="http"||e==="https"}function Bt(e,t=!1){let{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function hI(e){let t=fI.exec(e);if(!t){qe(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,o="",i="",s="",a=""]=t.slice(1),l="",c=a,d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){let u=c.match(/^\d+/);u&&(c=u[0])}return cS({host:i,pass:o,path:l,projectId:c,port:s,protocol:r,publicKey:n})}function cS(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function gI(e){if(!C)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(T.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?mI(n)?t&&isNaN(parseInt(t,10))?(T.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(T.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(T.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function SI(e){return e.match(pI)?.[1]}function uS(e){let t=e.getOptions(),{host:r}=e.getDsn()||{},n;return t.orgId?n=String(t.orgId):r&&(n=SI(r)),n}function Hl(e){let t=typeof e=="string"?hI(e):cS(e);if(!(!t||!gI(t)))return t}function Ft(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var zl=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function dS(e){if(!e)return;let t=e.match(zl);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function tp(e,t){let r=dS(e),n=Fl(t);if(!r?.traceId)return{traceId:ht(),sampleRand:Xt()};let o=yI(r,n);n&&(n.sample_rand=o.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=r;return{traceId:i,parentSpanId:s,sampled:a,dsc:n||{},sampleRand:o}}function Ls(e=ht(),t=st(),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function Os(e=ht(),t=st(),r){return`00-${e}-${t}-${r?"01":"00"}`}function yI(e,t){let r=Ft(t?.sample_rand);if(r!==void 0)return r;let n=Ft(t?.sample_rate);return n&&e?.parentSampled!==void 0?e.parentSampled?Xt()*n:n+Xt()*(1-n):Xt()}var $l=0,Ds=1,pS=!1;function hS(e){let{spanId:t,traceId:r}=e.spanContext(),{data:n,op:o,parent_span_id:i,status:s,origin:a,links:l}=B(e);return{parent_span_id:i,span_id:t,trace_id:r,data:n,op:o,status:s,origin:a,links:l}}function Wl(e){let{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:B(e).parent_span_id,i=_o(e).scope,s=n?i?.getPropagationContext().propagationSpanId||st():t;return{parent_span_id:o,span_id:s,trace_id:r}}function Us(e){let{traceId:t,spanId:r}=e.spanContext(),n=Rt(e);return Ls(t,r,n)}function gS(e){let{traceId:t,spanId:r}=e.spanContext(),n=Rt(e);return Os(t,r,n)}function Bs(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:r,traceFlags:n,...o},attributes:i})=>({span_id:t,trace_id:r,sampled:n===Ds,attributes:i,...o}))}function op(e){if(e?.length)return e.map(({context:{spanId:t,traceId:r,traceFlags:n},attributes:o})=>({span_id:t,trace_id:r,sampled:n===Ds,attributes:o}))}function xt(e){return typeof e=="number"?fS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?fS(e.getTime()):ne()}function fS(e){return e>9999999999?e/1e3:e}function B(e){if(_S(e))return e.getSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(vS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{span_id:t,trace_id:r,data:n,description:i,parent_span_id:SS(e),start_timestamp:xt(o),timestamp:xt(s)||void 0,status:Hs(a),op:n[_e],origin:n[Z],links:Bs(l)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function Fs(e){if(_S(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(vS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{name:i,span_id:t,trace_id:r,parent_span_id:SS(e),start_timestamp:xt(o),end_timestamp:xt(s),is_segment:e===Ps(e),status:ip(a),attributes:n,links:op(l)}}return{span_id:t,trace_id:r,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Ps(e)}}function SS(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function yS(e){return{...e,attributes:Jd(e.attributes),links:e.links?.map(t=>({...t,attributes:Jd(t.attributes)}))}}function vS(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _S(e){return typeof e.getSpanJSON=="function"}function Rt(e){let{traceFlags:t}=e.spanContext();return t===Ds}function Hs(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function ip(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}var Eo="_sentryChildSpans",rp="_sentryRootSpan";function zs(e,t){let r=e[rp]||e;ve(t,rp,r),e[Eo]?e[Eo].add(t):ve(e,Eo,new Set([t]))}function ES(e,t){e[Eo]&&e[Eo].delete(t)}function tn(e){let t=new Set;function r(n){if(!t.has(n)&&Rt(n)){t.add(n);let o=n[Eo]?Array.from(n[Eo]):[];for(let i of o)r(i)}}return r(e),Array.from(t)}var te=Ps;function Ps(e){return e[rp]||e}function ie(){let e=Ut(),t=Dr(e);return t.getActiveSpan?t.getActiveSpan():yo(U())}function $s(){pS||(qe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),pS=!0)}var TS=!1;function jl(){if(TS)return;function e(){let t=ie(),r=t&&te(t);if(r){let n="internal_error";C&&T.log(`[Tracing] Root span: ${n} -> Global error occurred`),r.setStatus({code:2,message:n})}}TS=!0,Ts(e),bs(e)}function He(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||M()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function bS(e){T.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function rn(e,t){if(!t?.length)return!1;for(let r of t){if(_I(r)){if(e.description&&Rn(e.description,r))return C&&bS(e),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let o=r.name?e.description&&Rn(e.description,r.name):!0,i=r.op?e.op&&Rn(e.op,r.op):!0,s=r.attributes?Object.entries(r.attributes).every(([a,l])=>vI(e.attributes?.[a],l)):!0;if(o&&i&&s)return C&&bS(e),!0}return!1}function vI(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Rn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e===t}function kS(e,t){let r=t.parent_span_id,n=t.span_id;if(r)for(let o of e)o.parent_span_id===n&&(o.parent_span_id=r)}function _I(e){return typeof e=="string"||e instanceof RegExp}var ci="production";var IS="_frozenDsc";function ui(e,t){ve(e,IS,t)}function Gl(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o={environment:r.environment||ci,release:r.release,public_key:n,trace_id:e,org_id:uS(t)};return t.emit("createDsc",o),o}function di(e,t){let r=t.getPropagationContext();return r.dsc||Gl(r.traceId,e)}function De(e){let t=M();if(!t)return{};let r=te(e),n=B(r),o=n.data,i=r.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[Qr]??o[si];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let l=r[IS];if(l)return a(l);let c=i?.get("sentry.dsc"),d=c&&Fl(c);if(d)return a(d);let u=Gl(e.spanContext().traceId,t),p=o[Fe]??o["sentry.span.source"],f=n.description;return p!=="url"&&f&&(u.transaction=f),He()&&(u.sampled=String(Rt(r)),u.sample_rand=i?.get("sentry.sample_rand")??_o(r).scope?.getPropagationContext().sampleRand.toString()),a(u),t.emit("createDsc",u,r),u}var Xe=class{constructor(t={}){this._traceId=t.traceId||ht(),this._spanId=t.spanId||st(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:$l}}end(t){}setAttribute(t,r){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,r,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,r){}};function Vl(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function gt(e,t=[]){return[e,t]}function Yl(e,t){let[r,n]=e;return[r,[...n,t]]}function Ws(e,t){let r=e[1];for(let n of r){let o=n[0].type;if(t(n,o))return!0}return!1}function ap(e,t){return Ws(e,(r,n)=>t.includes(n))}function sp(e){let t=po(O);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function lp(e){let[t,r]=e,n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[sp(n),i]:n.push(typeof i=="string"?sp(i):i)}for(let i of r){let[s,a]=i;if(o(`
|
|
13
13
|
${JSON.stringify(s)}
|
|
14
|
-
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(
|
|
14
|
+
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(it(a))}o(l)}}return typeof n=="string"?n:EI(n)}function EI(e){let t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return r}function cp(e){return[{type:"span"},e]}function up(e){let t=typeof e.data=="string"?sp(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var wS={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function TI(e){return e in wS}function ql(e){return TI(e)?wS[e]:e}function pi(e){if(!e?.sdk)return;let{name:t,version:r}=e.sdk;return{name:t,version:r}}function js(e,t,r,n){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:Bt(n)},...o&&{trace:o}}}function bI(e,t){if(!t)return e;let r=e.sdk||{};return e.sdk={...r,name:r.name||t.name,version:r.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function xS(e,t,r,n){let o=pi(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:Bt(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return gt(i,[s])}function RS(e,t,r,n){let o=pi(r),i=e.type&&e.type!=="replay_event"?e.type:"event";bI(e,r?.sdk);let s=js(e,o,n,t);return delete e.sdkProcessingMetadata,gt(s,[[{type:i},e]])}function CS(e,t){function r(f){return!!f.trace_id&&!!f.public_key}let n=De(e[0]),o=t?.getDsn(),i=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...r(n)&&{trace:n},...!!i&&o&&{dsn:Bt(o)}},{beforeSendSpan:a,ignoreSpans:l}=t?.getOptions()||{},c=l?.length?e.filter(f=>{let h=B(f);return!rn({description:h.description,op:h.op,attributes:h.data},l)}):e,d=e.length-c.length;d&&t?.recordDroppedEvent("before_send","span",d);let u=a?f=>{let h=B(f),v=Vl(a)?h:a(h);return v||($s(),h)}:B,p=[];for(let f of c){let h=u(f);h&&p.push(cp(h))}return gt(s,p)}function NS(e){if(!C)return;let{description:t="< unknown name >",op:r="< unknown op >",parent_span_id:n}=B(e),{spanId:o}=e.spanContext(),i=Rt(e),s=te(e),a=s===e,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,c=[`op: ${r}`,`name: ${t}`,`ID: ${o}`];if(n&&c.push(`parent ID: ${n}`),!a){let{op:d,description:u}=B(s);c.push(`root ID: ${s.spanContext().spanId}`),d&&c.push(`root op: ${d}`),u&&c.push(`root description: ${u}`)}T.log(`${l}
|
|
15
15
|
${c.join(`
|
|
16
|
-
`)}`)}function AS(e){if(!N)return;let{description:t="< unknown name >",op:r="< unknown op >"}=B(e),{spanId:n}=e.spanContext(),i=te(e)===e,s=`[Tracing] Finishing "${r}" ${i?"root ":""}span "${t}" with ID ${n}`;T.log(s)}function Kl(e,t,r,n=ie()){let o=n&&te(n);o&&(N&&T.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),o.addEvent(e,{[_r]:t,[vr]:r}))}function Xl(e){if(!e||e.length===0)return;let t={};return e.forEach(r=>{let n=r.attributes||{},o=n[vr],i=n[_r];typeof o=="string"&&typeof i=="number"&&(t[r.name]={value:i,unit:o})}),t}function Je(e){return e.getOptions().traceLifecycle==="stream"}var MS=1e3,Cn=class{constructor(t={}){this._traceId=t.traceId||mt(),this._spanId=t.spanId||it(),this._startTime=t.startTimestamp||ne(),this._links=t.links,this._attributes={},this.setAttributes({[J]:"manual",[_e]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,r){}spanContext(){let{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?Ps:$l}}setAttribute(t,r){return r===void 0?delete this._attributes[t]:this._attributes[t]=r,this}setAttributes(t){return Object.keys(t).forEach(r=>this.setAttribute(r,t[r])),this}updateStartTime(t){this._startTime=kt(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Fe,"custom"),this}end(t){this._endTime||(this._endTime=kt(t),AS(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[_e],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Hs(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[J],profile_id:this._attributes[yo],exclusive_time:this._attributes[st],measurements:Xl(this._events),is_segment:this._isStandaloneSpan&&te(this)===this||void 0,segment_id:this._isStandaloneSpan?te(this).spanContext().spanId:void 0,links:Bs(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===te(this),status:ip(this._status),attributes:this._attributes,links:op(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,r,n){N&&T.log("[Tracing] Adding an event to span:",t);let o=LS(r)?r:n||ne(),i=LS(r)?{}:r||{},s={name:t,time:kt(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=M();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===te(this)))return;if(this._isStandaloneSpan){this._sampled?Ix(NS([this],t)):(N&&T.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Je(t)){t.emit("afterSegmentSpanEnd",this);return}let n=this._convertSpanToTransaction();n&&(vo(this).scope||U()).captureEvent(n)}_convertSpanToTransaction(){if(!OS(B(this)))return;this._name||(N&&T.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:r}=vo(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=en(this).filter(d=>d!==this&&!bx(d)).map(d=>B(d)).filter(OS),s=this._attributes[Fe];delete this._attributes[si];let a=!1;i.forEach(d=>{delete d.data[si],d.op?.startsWith("gen_ai.")&&(a=!0)});let l={contexts:{trace:hS(this)},spans:i.length>MS?i.sort((d,p)=>d.start_timestamp-p.start_timestamp).slice(0,MS):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:r,dynamicSamplingContext:De(this),hasGenAiSpans:a},request:n,...s&&{transaction_info:{source:s}}},c=Xl(this._events);return c&&Object.keys(c).length&&(N&&T.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),l.measurements=c),l}};function LS(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function OS(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function bx(e){return e instanceof Cn&&e.isStandaloneSpan()}function Ix(e){let t=M();if(!t)return;let r=e[1];if(!r||r.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function DS(e,t,r){if(!He(e))return[!1];let n,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),n=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,n=!0);let i=Ft(o);if(i===void 0)return N&&T.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return N&&T.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,n];let s=r<i;return s||N&&T.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,n]}var dp="__SENTRY_SUPPRESS_TRACING__";function je(e){let t=US();if(t.startInactiveSpan)return t.startInactiveSpan(e);let r=kx(e),{forceTransaction:n,parentSpan:o}=e;return(e.scope?s=>Qt(e.scope,s):o!==void 0?s=>pi(o,s):s=>s())(()=>{let s=U(),a=Rx(s,o),l=M();return e.onlyIfParent&&!a?(l?.recordDroppedEvent("no_parent_span","span"),new Xe):xx({parentSpan:a,spanArguments:r,forceTransaction:n,scope:s})})}function pi(e,t){let r=US();return r.withActiveSpan?r.withActiveSpan(e,t):Qt(n=>(Nn(n,e||void 0),t(n)))}function xx({parentSpan:e,spanArguments:t,forceTransaction:r,scope:n}){if(!He()){let a=new Xe;if(r||!e){let l={sampled:"false",sample_rate:"0",transaction:t.name,...De(a)};ci(a,l)}return a}let o=M();if(Nx(o,t))return pp(n)||o?.recordDroppedEvent("ignored","span"),new Xe({dropReason:"ignored",traceId:e?.spanContext().traceId??n.getPropagationContext().traceId});let i=be(),s;if(e&&!r)s=wx(e,n,t),zs(e,s);else if(e){let a=De(e),{traceId:l,spanId:c}=e.spanContext(),u=wt(e);s=PS({traceId:l,parentSpanId:c,...t},n,u),ci(s,a)}else{let{traceId:a,dsc:l,parentSpanId:c,sampled:u}={...i.getPropagationContext(),...n.getPropagationContext()};s=PS({traceId:a,parentSpanId:c,...t},n,u),l&&ci(s,l)}return CS(s),aS(s,n,i),s}function kx(e){let r={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...r};return n.startTimestamp=kt(e.startTime),delete n.startTime,n}return r}function US(){let e=Ut();return Dr(e)}function PS(e,t,r){let n=M(),o=n?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};n?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??r,l=s.spanAttributes,c=t.getPropagationContext(),u=pp(t),[d,p,f]=u?[!1]:DS(o,{name:i,parentSampled:a,attributes:l,parentSampleRate:Ft(c.dsc?.sample_rate)},c.sampleRand),h=new Cn({...e,attributes:{[Fe]:"custom",[Qr]:p!==void 0&&f?p:void 0,...l},sampled:d});return!d&&n&&!u&&(N&&T.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),n.recordDroppedEvent("sample_rate",Je(n)?"span":"transaction")),n&&n.emit("spanStart",h),h}function wx(e,t,r){let{spanId:n,traceId:o}=e.spanContext(),i=pp(t),s=i?!1:wt(e),a=s?new Cn({...r,parentSpanId:n,traceId:o,sampled:s}):new Xe({traceId:o});zs(e,a);let l=M();return l&&(Je(l)&&a instanceof Xe&&(e instanceof Xe&&e.dropReason?(a.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):i||(a.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",a),r.endTimestamp&&(l.emit("spanEnd",a),l.emit("afterSpanEnd",a))),a}function Rx(e,t){if(t)return t;if(t===null)return;let r=So(e);if(!r)return;let n=M();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?te(r):r}function Nx(e,t){let r=e?.getOptions().ignoreSpans;return!e||!Je(e)||!r?.length?!1:tn({description:t.name||"",op:t.attributes?.[_e]||t.op,attributes:t.attributes},r)}function pp(e){return e.getScopeData().sdkProcessingMetadata[dp]===!0}var fi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Cx="heartbeatFailed",Ax="idleTimeout",Mx="finalTimeout",Lx="externalFinish";function Jl(e,t={}){let r=new Map,n=!1,o,i=Lx,s=!t.disableAutoFinish,a=[],{idleTimeout:l=fi.idleTimeout,finalTimeout:c=fi.finalTimeout,childSpanTimeout:u=fi.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,f=M();if(!f||!He()){let _=new Xe,I={sample_rate:"0",sampled:"false",...De(_)};return ci(_,I),_}let h=U(),y=ie(),E=Ox(e);E.end=new Proxy(E.end,{apply(_,I,j){if(d&&d(E),I instanceof Xe)return;let[x,...D]=j,Y=x||ne(),ee=kt(Y),G=en(E).filter($=>$!==E),Be=B(E);if(!G.length||!p)return w(ee),Reflect.apply(_,I,[ee,...D]);let ce=f.getOptions().ignoreSpans,ye=G?.reduce(($,q)=>{let pe=B(q);return!pe.timestamp||ce&&tn({description:pe.description,op:pe.op,attributes:pe.data},ce)?$:$?Math.max($,pe.timestamp):pe.timestamp},void 0),C=Be.start_timestamp,oe=Math.min(C?C+c/1e3:1/0,Math.max(C||-1/0,Math.min(ee,ye||1/0)));return w(oe),Reflect.apply(_,I,[oe,...D])}});function m(){o&&(clearTimeout(o),o=void 0)}function g(_){m(),o=setTimeout(()=>{!n&&r.size===0&&s&&(i=Ax,E.end(_))},l)}function v(_){o=setTimeout(()=>{!n&&s&&(i=Cx,E.end(_))},u)}function b(_){m(),r.set(_,!0);let I=ne();v(I+u/1e3)}function k(_){if(r.has(_)&&r.delete(_),r.size===0){let I=ne();g(I+l/1e3)}}function w(_){n=!0,r.clear(),a.forEach(G=>G()),Nn(h,y);let I=B(E),{start_timestamp:j}=I;if(!j)return;I.data[Zr]||E.setAttribute(Zr,i);let D=I.status;(!D||D==="unknown")&&E.setStatus({code:1}),T.log(`[Tracing] Idle span "${I.op}" finished`);let Y=en(E).filter(G=>G!==E),ee=0;Y.forEach(G=>{G.isRecording()&&(G.setStatus({code:2,message:"cancelled"}),G.end(_),N&&T.log("[Tracing] Cancelling span since span ended early",JSON.stringify(G,void 0,2)));let Be=B(G),{timestamp:ce=0,start_timestamp:ye=0}=Be,C=ye<=_,oe=(c+l)/1e3,$=ce-ye<=oe;if(N){let q=JSON.stringify(G,void 0,2);C?$||T.log("[Tracing] Discarding span since it finished after idle span final timeout",q):T.log("[Tracing] Discarding span since it happened after idle span was finished",q)}(!$||!C)&&(ES(E,G),ee++)}),ee>0&&E.setAttribute("sentry.idle_span_discarded_spans",ee)}return a.push(f.on("spanStart",_=>{if(n||_===E||B(_).timestamp||_ instanceof Cn&&_.isStandaloneSpan())return;en(E).includes(_)&&b(_.spanContext().spanId)})),a.push(f.on("spanEnd",_=>{n||k(_.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",_=>{_===E&&(s=!0,g(),r.size&&v())})),t.disableAutoFinish||g(),setTimeout(()=>{n||(E.setStatus({code:2,message:"deadline_exceeded"}),i=Mx,E.end())},c),E}function Ox(e){let t=je(e);return Nn(U(),t),N&&T.log("[Tracing] Started span is an idle span"),t}function FS(e,t){let{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;Dx(e,t),n&&Bx(e,n),Fx(e,r),Px(e,o),Ux(e,i)}function BS(e,t){let{extra:r,tags:n,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:p,propagationContext:f,transactionName:h,span:y}=t;Gs(e,"extra",r),Gs(e,"tags",n),Gs(e,"attributes",o),Gs(e,"user",i),Gs(e,"contexts",s),e.sdkProcessingMetadata=Rn(e.sdkProcessingMetadata,l,2),a&&(e.level=a),h&&(e.transactionName=h),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function Gs(e,t,r){e[t]=Rn(e[t],r,1)}function Ql(e,t){let r=As().getScopeData();return e&&BS(r,e.getScopeData()),t&&BS(r,t.getScopeData()),r}function Dx(e,t){let{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(n).length&&(e.tags={...n,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Px(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Ux(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Bx(e,t){e.contexts={trace:jl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:De(t),...e.sdkProcessingMetadata};let r=te(t),n=B(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function Fx(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var Hx="thismessage:/";function To(e){return"isRelative"in e}function Pr(e,t){let r=e.indexOf("://")<=0&&e.indexOf("//")!==0,n=t??(r?Hx:void 0);try{if("canParse"in URL&&!URL.canParse(e,n))return;let o=new URL(e,n);return r?{isRelative:r,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function mi(e){if(To(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Zt(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function Zl(e){return e.split(/[?#]/,1)[0]}function at(e,t=!0){if(e.startsWith("data:")){let r=e.match(/^data:([^;,]+)/),n=r?r[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),s="";if(t&&i!==-1){let a=e.slice(i+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${n}${o?",base64":""}${s?`,${s}`:""}`}return e}function An(e,t){let r=e.attributes??(e.attributes={});Object.entries(t).forEach(([n,o])=>{o!=null&&!(n in r)&&(r[n]=o)})}var fp=0,HS=1,zS=2;function Ur(e){return new Vs(t=>{t(e)})}function bo(e){return new Vs((t,r)=>{r(e)})}var Vs=class e{constructor(t){this._state=fp,this._handlers=[],this._runExecutor(t)}then(t,r){return new e((n,o)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){o(s)}},i=>{if(!r)o(i);else try{n(r(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new e((r,n)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){n(o);return}r(o)})})}_executeHandlers(){if(this._state===fp)return;let t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===HS&&r[1](this._value),this._state===zS&&r[2](this._value),r[0]=!0)})}_runExecutor(t){let r=(i,s)=>{if(this._state===fp){if(gr(s)){s.then(n,o);return}this._state=i,this._value=s,this._executeHandlers()}},n=i=>{r(HS,i)},o=i=>{r(zS,i)};try{t(n,o)}catch(i){o(i)}}};function $S(e,t,r,n=0){try{let o=mp(t,r,e,n);return gr(o)?o:Ur(o)}catch(o){return bo(o)}}function mp(e,t,r,n){let o=r[n];if(!e||!o)return e;let i=o({...e},t);return N&&i===null&&T.log(`Event processor "${o.id||"?"}" dropped event`),gr(i)?i.then(s=>mp(s,t,r,n+1)):mp(i,t,r,n+1)}var Io,jS,WS,Mn;function GS(e){let t=L._sentryDebugIds,r=L._debugIds;if(!t&&!r)return{};let n=t?Object.keys(t):[],o=r?Object.keys(r):[];if(Mn&&n.length===jS&&o.length===WS)return Mn;jS=n.length,WS=o.length,Mn={},Io||(Io={});let i=(s,a)=>{for(let l of s){let c=a[l],u=Io?.[l];if(u&&Mn&&c)Mn[u[0]]=c,Io&&(Io[l]=[u[0],c]);else if(c){let d=e(l);for(let p=d.length-1;p>=0;p--){let h=d[p]?.filename;if(h&&Mn&&Io){Mn[h]=c,Io[l]=[h,c];break}}}}};return t&&i(n,t),r&&i(o,r),Mn}function Ys(e,t,r,n,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||r.event_id||Ce(),timestamp:t.timestamp||It()},c=r.integrations||e.integrations.map(m=>m.name);zx(l,e),Wx(l,c),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&$x(l,e.stackParser);let u=Vx(n,r.captureContext);r.mechanism&&Jt(l,r.mechanism);let d=o?o.getEventProcessors():[],p=Ql(i,u),f=[...r.attachments||[],...p.attachments];f.length&&(r.attachments=f),FS(l,p);let h=[...d,...p.eventProcessors];return(r.data&&r.data.__sentry__===!0?Ur(l):$S(h,l,r)).then(m=>(m&&jx(m),typeof s=="number"&&s>0?Gx(m,s,a):m))}function zx(e,t){let{environment:r,release:n,dist:o,maxValueLength:i}=t;e.environment=e.environment||r||li,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o);let s=e.request;s?.url&&i&&(s.url=ho(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=ho(a.value,i))})}function $x(e,t){let r=GS(t);e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=r[o.filename])})})}function jx(e){let t={};if(e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(t).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function Wx(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Gx(e,t,r){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ot(o.data,t,r)}}))},...e.user&&{user:ot(e.user,t,r)},...e.contexts&&{contexts:ot(e.contexts,t,r)},...e.extra&&{extra:ot(e.extra,t,r)}};return e.contexts?.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=ot(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ot(o.data,t,r)}}))),e.contexts?.flags&&n.contexts&&(n.contexts.flags=ot(e.contexts.flags,3,r)),n}function Vx(e,t){if(!t)return e;let r=e?e.clone():new xt;return r.update(t),r}function VS(e){if(e)return Yx(e)?{captureContext:e}:Kx(e)?{captureContext:e}:e}function Yx(e){return e instanceof xt||typeof e=="function"}var qx=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Kx(e){return Object.keys(e).some(t=>qx.includes(t))}function rn(e,t){return U().captureException(e,VS(t))}function hi(e,t){return U().captureEvent(e,t)}function xo(e,t){be().setContext(e,t)}function qs(){return be().lastEventId()}function Ks(){let e=M();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Xs(e){be().addEventProcessor(e)}function gi(e){let t=be(),{user:r}=Ql(t,U()),{userAgent:n}=L.navigator||{},o=Kg({user:r,...n&&{userAgent:n},...e}),i=t.getSession();return i?.status==="ok"&&Jr(i,{status:"exited"}),Js(),t.setSession(o),o}function Js(){let e=be(),r=U().getSession()||e.getSession();r&&Xg(r),YS(),e.setSession()}function YS(){let e=be(),t=M(),r=e.getSession();r&&t&&t.captureSession(r)}function ko(e=!1){if(e){Js();return}YS()}var qS="7";function KS(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function Xx(e){return`${KS(e)}${e.projectId}/envelope/`}function Jx(e,t){let r={sentry_version:qS};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function gp(e,t,r){return t||`${Xx(e)}?${Jx(e,r)}`}function Sp(e,t){let r=Hl(e);if(!r)return"";let n=`${KS(r)}embed/error-page/`,o=`dsn=${Bt(r)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${o}`}var yp=[];function Qx(e){let t={};return e.forEach(r=>{let{name:n}=r,o=t[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function vp(e){let t=e.defaultIntegrations||[],r=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){let o=r(t);n=Array.isArray(o)?o:[o]}else n=t;return Qx(n)}function XS(e,t){let r={};return t.forEach(n=>{n?.beforeSetup&&n.beforeSetup(e)}),t.forEach(n=>{n&&Ep(e,n,r)}),r}function _p(e,t){for(let r of t)r?.afterAllSetup&&r.afterAllSetup(e)}function Ep(e,t,r){if(r[t.name]){N&&T.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!yp.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),yp.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>n(o,i,e))}if(typeof t.processEvent=="function"){let n=t.processEvent.bind(t),o=Object.assign((i,s)=>n(i,s,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(n=>{let o=t[n];typeof o=="function"&&e.on(n,i=>o.call(t,i,e))}),N&&T.log(`Integration installed: ${t.name}`)}function Tp(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function bp(){return"npm"}function JS(){return!Tp()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function er(){return typeof window<"u"&&(!JS()||Zx())}function Zx(){return L.process?.type==="renderer"}function e1(e,t){let r=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...er()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function QS(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=Bt(n)),ht(i,[e1(e,o)])}function Si(e,t){let r=t??t1(e)??[];if(r.length===0)return;let n=e.getOptions(),o=QS(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ZS().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function t1(e){return ZS().get(e)}function ZS(){return hr("clientToLogBufferMap",()=>new WeakMap)}function r1(e,t){let r=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...er()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function ey(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=Bt(n)),ht(i,[r1(e,o)])}function Qs(e,t){let r=t??n1(e)??[];if(r.length===0)return;let n=e.getOptions(),o=ey(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ty().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function n1(e){return ty().get(e)}function ty(){return hr("clientToMetricBufferMap",()=>new WeakMap)}function ry(e){let t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return yS(t)}function ny(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Je(t))return;let r=[],n=[];for(let i of e.spans)i.op?.startsWith("gen_ai.")?r.push(ry(i)):n.push(i);if(r.length===0)return;e.spans=n;let o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:r.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...er()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:r}]}function ec(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var yi=Symbol.for("SentryBufferFullError");function wo(e=100){let t=new Set;function r(){return t.size<e}function n(s){t.delete(s)}function o(s){if(!r())return bo(yi);let a=s();return t.add(a),a.then(()=>n(a),()=>n(a)),a}function i(s){if(!t.size)return Ur(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let l=[a,new Promise(c=>ec(setTimeout(()=>c(!1),s)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:o,drain:i}}var oy=60*1e3;function iy(e,t=mo()){let r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${e}`);return isNaN(n)?oy:n-t}function sy(e,t){return e[t]||e.all||0}function Zs(e,t,r=mo()){return sy(e,t)>r}function ea(e,{statusCode:t,headers:r},n=mo()){let o={...e},i=r?.["x-sentry-rate-limits"],s=r?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[l,c,,,u]=a.split(":",5),d=parseInt(l,10),p=(isNaN(d)?60:d)*1e3;if(!c)o.all=n+p;else for(let f of c.split(";"))f==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(o[f]=n+p):o[f]=n+p}else s?o.all=n+iy(s,n):t===429&&(o.all=n+60*1e3);return o}var Ip=64;function tc(e,t,r=wo(e.bufferSize||Ip)){let n={},o=s=>r.drain(s);function i(s){let a=[];if(js(s,(d,p)=>{let f=ql(p);Zs(n,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(d)}),a.length===0)return Promise.resolve({});let l=ht(s[0],a),c=d=>{if(ap(l,["client_report"])){N&&T.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}js(l,(p,f)=>{e.recordDroppedEvent(d,ql(f))})},u=()=>t({body:lp(l)}).then(d=>d.statusCode===413?(N&&T.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),d):(N&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&T.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=ea(n,d),d),d=>{throw c("network_error"),N&&T.error("Encountered error running transport request:",d),d});return r.add(u).then(d=>d,d=>{if(d===yi)return N&&T.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function ay(e,t,r){let n=[{type:"client_report"},{timestamp:r||It(),discarded_events:e}];return ht(t?{dsn:t}:{},[n])}function rc(e){let t=[];e.message&&t.push(e.message);try{let r=e.exception.values[e.exception.values.length-1];r?.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`))}catch{}return t}function ly(e){let{trace_id:t,parent_span_id:r,span_id:n,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:r,span_id:n??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[yo],exclusive_time:s?.[st],measurements:e.measurements,is_segment:!0}}function cy(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[yo]:e.profile_id},...e.exclusive_time&&{[st]:e.exclusive_time}}}},measurements:e.measurements}}var ta=["forwarded","-ip","remote-","via","-user"];function uy(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5}:{userInfo:!1,cookies:{deny:ta},httpHeaders:{request:{deny:ta},response:{deny:ta}},httpBodies:[],queryParams:{deny:ta},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:5}}var o1={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function dy(e){let t=e.dataCollection!=null?o1:uy(e.sendDefaultPii),r=e.dataCollection??{};return{userInfo:r.userInfo??t.userInfo,cookies:r.cookies??t.cookies,httpHeaders:{request:r.httpHeaders?.request??t.httpHeaders.request,response:r.httpHeaders?.response??t.httpHeaders.response},httpBodies:r.httpBodies??t.httpBodies,queryParams:r.queryParams??t.queryParams,genAI:{inputs:r.genAI?.inputs??t.genAI.inputs,outputs:r.genAI?.outputs??t.genAI.outputs},stackFrameVariables:r.stackFrameVariables??t.stackFrameVariables,frameContextLines:r.frameContextLines??t.frameContextLines}}var py="Not capturing exception because it's already been captured.",fy="Discarded session because of missing or non-string release",vy=Symbol.for("SentryInternalError"),_y=Symbol.for("SentryDoNotSendEventError"),i1=5e3;function nc(e){return{message:e,[vy]:!0}}function xp(e){return{message:e,[_y]:!0}}function my(e){return!!e&&typeof e=="object"&&vy in e}function hy(e){return!!e&&typeof e=="object"&&_y in e}function gy(e,t,r,n,o){let i=0,s,a=!1;e.on(r,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,l=>{if(i+=n(l),i>=8e5)o(e);else if(!a){let c=e.getOptions()._flushInterval??i1;c>0&&(a=!0,s=ec(setTimeout(()=>{o(e)},c)))}}),e.on("flush",()=>{o(e)})}var ra=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=wo(t.transportOptions?.bufferSize??Ip),this._dataCollection=dy(t),t.dsn?this._dsn=Hl(t.dsn):N&&T.warn("No DSN provided, client will not send events."),this._dsn){let n=gp(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&gy(this,"afterCaptureLog","flushLogs",c1,Si),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&gy(this,"afterCaptureMetric","flushMetrics",l1,Qs)}captureException(t,r,n){let o=Ce();if(Cs(t))return N&&T.log(py),o;let i={event_id:o,...r};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,n)).then(s=>s),"error"),i.event_id}captureMessage(t,r,n,o){let i={event_id:Ce(),...n},s=In(t)?t:String(t),a=bt(t),l=a?this.eventFromMessage(s,r,i):this.eventFromException(t,i);return this._process(()=>l.then(c=>this._captureEvent(c,i,o)),a?"unknown":"error"),i.event_id}captureEvent(t,r,n){let o=Ce();if(r?.originalException&&Cs(r.originalException))return N&&T.log(py),o;let i={event_id:o,...r},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,l=s.capturedSpanIsolationScope,c=Sy(t.type);return this._process(()=>this._captureEvent(t,i,a||n,l),c),i.event_id}captureSession(t){this.sendSession(t),Jr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let r=this._transport;if(this.emit("flush"),!r)return!0;let n=await this._isClientDoneProcessing(t),o=await r.flush(t);return n&&o}async close(t){Si(this);let r=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),r}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){let r=this._integrations[t.name];!r&&t.beforeSetup&&t.beforeSetup(this),Ep(this,t,this._integrations),r||_p(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=ny(t,this),o=RS(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of r.attachments||[])o=Yl(o,up(i));n&&(o=Yl(o,n)),this.sendEnvelope(o).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){let{release:r,environment:n=li}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!r){N&&T.warn(fy);return}i.release=i.release||r,i.environment=i.environment||n,t.attrs=i}else{if(!t.release&&!r){N&&T.warn(fy);return}t.release=t.release||r,t.environment=t.environment||n}this.emit("beforeSendSession",t);let o=wS(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,r,n=1){if(this._options.sendClientReports){let o=`${t}:${r}`;N&&T.log(`Recording outcome: "${o}"${n>1?` (${n} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+n}}on(t,r){let n=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>r(...i);return n.add(o),()=>{n.delete(o)}}emit(t,...r){let n=this._hooks[t];n&&n.forEach(o=>o(...r))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(r){return N&&T.error("Error while sending envelope:",r),{}}return N&&T.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=XS(this,t),_p(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",o=!1,i=r.exception?.values;if(i){o=!0,n=!1;for(let l of i)if(l.mechanism?.handled===!1){n=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Jr(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}async _isClientDoneProcessing(t){let r=0;for(;!t||r<t;){if(await new Promise(n=>setTimeout(n,1)),!this._numProcessing)return!0;r++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,o){let i=this.getOptions(),s=this.getIntegrationNames();return!r.integrations&&s.length&&(r.integrations=s),this.emit("preprocessEvent",t,r),t.type||o.setLastEventId(t.event_id||r.event_id),Ys(i,t,r,n,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,r),a.contexts={trace:{...a.contexts?.trace,...Pl(n)},...a.contexts};let l=ui(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,r={},n=U(),o=be()){return N&&kp(t)&&T.log(`Captured error event \`${rc(t)[0]||"<unknown>"}\``),this._processEvent(t,r,n,o).then(i=>i.event_id,i=>{N&&(hy(i)?T.log(i.message):my(i)?T.warn(i.message):T.warn(i))})}_processEvent(t,r,n,o){let i=this.getOptions(),{sampleRate:s}=i,a=Ey(t),l=kp(t),u=`before send for type \`${t.type||"error"}\``,d=typeof s>"u"?void 0:Ft(s);if(l&&typeof d=="number"&&Xt()>d)return this.recordDroppedEvent("sample_rate","error"),bo(xp(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let p=Sy(t.type);return this._prepareEvent(t,r,n,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),xp("An event processor returned `null`, will not send event.");if(r.data?.__sentry__===!0)return f;let y=a1(this,i,f,r);return s1(y,u)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){let m=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",m)}throw xp(`${u} returned \`null\`, will not send event.`)}let h=n.getSession()||o.getSession();if(l&&h&&this._updateSessionFromEvent(h,f),a){let E=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,m=f.spans?f.spans.length:0,g=E-m;g>0&&this.recordDroppedEvent("before_send","span",g)}let y=f.transaction_info;if(a&&y&&f.transaction!==t.transaction){let E="custom";f.transaction_info={...y,source:E}}return this.sendEvent(f,r),f}).then(null,f=>{throw hy(f)||my(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),nc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
17
|
-
Reason: ${f}`))})}_process(t,r){this._numProcessing++,this._promiseBuffer.add(t).then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n===
|
|
18
|
-
Event: ${
|
|
19
|
-
Event: ${
|
|
20
|
-
Event: ${
|
|
21
|
-
Event: ${
|
|
22
|
-
Url: ${ic(e)}`),!0;if(!
|
|
23
|
-
Event: ${
|
|
24
|
-
Url: ${ic(e)}`),!0}return!1}function E1(e,t){return t?.length?rc(e).some(r=>Ke(r,t)):!1}function T1(e,t){if(!t?.length)return!1;let r=e.transaction;return r?Ke(r,t):!1}function b1(e,t){if(!t?.length)return!1;let r=ic(e);return r?Ke(r,t):!1}function I1(e,t){if(!t?.length)return!0;let r=ic(e);return r?Ke(r,t):!0}function x1(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function ic(e){try{let r=[...e.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?x1(r):null}catch{return N&&T.error(`Cannot extract url for event ${yr(e)}`),null}}function k1(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Op(e,t,r,n,o,i){if(!o.exception?.values||!i||!Sr(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Lp(e,t,n,i.originalException,r,o.exception.values,s,0))}function Lp(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let l=[...i];if(Sr(n[o],Error)){wy(s,a,n);let c=e(t,n[o]),u=l.length;Ry(c,o,u,a),l=Lp(e,t,r,n[o],o,[c,...l],c,u)}return Ny(n)&&n.errors.forEach((c,u)=>{if(Sr(c,Error)){wy(s,a,n);let d=e(t,c),p=l.length;Ry(d,`errors[${u}]`,p,a),l=Lp(e,t,r,c,o,[d,...l],d,p)}}),l}function Ny(e){return Array.isArray(e.errors)}function wy(e,t,r){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Ny(r)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ry(e,t,r,n){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function w1(e){return qt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ac(e){return w1(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Cy=new Set([]);function Dp(e){let t="console",r=tt(t,e);return rt(t,R1),r}function R1(){"console"in L&&wl.forEach(function(e){e in L.console&&Ne(L.console,e,function(t){return po[e]=t,function(...r){let n=r[0],o=po[e],i=Cy.size&&typeof n=="string"&&Ke(n,Cy);i||Oe("console",{args:r,level:e}),(!i||N&&T.isEnabled())&&o?.apply(L.console,r)}})})}function _i(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var N1="Dedupe",C1=(()=>{let e;return{name:N1,processEvent(t){if(t.type)return t;try{if(A1(t,e))return N&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),lc=C1;function A1(e,t){return t?!!(M1(e,t)||L1(e,t)):!1}function M1(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Ly(e,t)||!My(e,t))}function L1(e,t){let r=Ay(t),n=Ay(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Ly(e,t)||!My(e,t))}function My(e,t){let r=_s(e),n=_s(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Ly(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Ay(e){return e.exception?.values?.[0]}var O1="ConversationId",D1=(()=>({name:O1,setup(e){e.on("spanStart",t=>{let r=U().getScopeData(),n=be().getScopeData(),o=r.conversationId||n.conversationId;if(o){let{op:i,data:s,description:a}=B(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(Bl,o)}})}})),Pp=D1;function Up(e,t,r,n,o){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=He()&&t(s);if(e.endTimestamp){let h=e.fetchData.__span;if(!h)return;let y=n[h];y&&(a&&(U1(y,e),P1(y,e,o)),delete n[h]);return}let{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof o=="object"?o:{spanOrigin:o},u=M(),p=!!ie()||!!u&&Je(u),f=a&&p?je(H1(s,i,l)):new Xe;if(a&&!p&&u?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,n[f.spanContext().spanId]=f,r(e.fetchData.url)){let h=e.args[0],y={...e.args[1]||{}},E=Dy(h,y,He()&&p?f:void 0,c);E&&(e.args[1]=y,y.headers=E)}if(u){let h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",f,h)}return f}function P1(e,t,r){(typeof r=="object"&&r!==null?r.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Dy(e,t,r,n){let o=vi({span:r,propagateTraceparent:n}),i=o["sentry-trace"],s=o.baggage,a=o.traceparent;if(!i)return;let l=t.headers||(xs(e)?e.headers:void 0);if(l)if(B1(l)){let c=new Headers(l);if(c.get("sentry-trace")||c.set("sentry-trace",i),n&&a&&!c.get("traceparent")&&c.set("traceparent",a),s){let u=c.get("baggage");u?cc(u)||c.set("baggage",`${u},${s}`):c.set("baggage",s)}return c}else if(F1(l)){let c=[...l];c.find(d=>d[0]==="sentry-trace")||c.push(["sentry-trace",i]),n&&a&&!c.find(d=>d[0]==="traceparent")&&c.push(["traceparent",a]);let u=l.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&cc(d[1]));return s&&!u&&c.push(["baggage",s]),c}else{let c="sentry-trace"in l?l["sentry-trace"]:void 0,u="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,p=d?Array.isArray(d)?[...d]:[d]:[],f=d&&(Array.isArray(d)?d.find(y=>cc(y)):cc(d));s&&!f&&p.push(s);let h=Object.assign({},l,{"sentry-trace":c??i,baggage:p.length>0?p.join(","):void 0});return n&&a&&!u&&(h.traceparent=a),h}else return{...o}}function U1(e,t){if(t.response){ai(e,t.response.status);let r=t.response?.headers?.get("content-length");if(r){let n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}function cc(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Ms))}function B1(e){return typeof Headers<"u"&&Sr(e,Headers)}function F1(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function H1(e,t,r){if(e.startsWith("data:")){let i=at(e);return{name:`${t} ${i}`,attributes:Oy(e,void 0,t,r)}}let n=Pr(e),o=n?mi(n):e;return{name:`${t} ${o}`,attributes:Oy(e,n,t,r)}}function Oy(e,t,r,n){let o={url:at(e),type:"fetch","http.method":r,[J]:n,[_e]:"http.client"};return t&&(To(t)||(o["http.url"]=at(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function uc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var oa=L;function Bp(){return"history"in oa&&!!oa.history}function z1(){if(!("fetch"in oa))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function ia(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fp(){if(typeof EdgeRuntime=="string")return!0;if(!z1())return!1;if(ia(oa.fetch))return!0;let e=!1,t=oa.document;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow?.fetch&&(e=ia(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){N&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Ln(e,t){let r="fetch",n=tt(r,e);return rt(r,()=>Uy(void 0,t)),n}function pc(e){let t="fetch-body-resolved",r=tt(t,e);return rt(t,()=>Uy(j1)),r}function Uy(e,t=!1){t&&!Fp()||Ne(L,"fetch",function(r){return function(...n){let o=new Error,{method:i,url:s}=W1(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:ne()*1e3,virtualError:o,headers:G1(n)};return e||Oe("fetch",{...a}),r.apply(L,n).then(async l=>(e?e(l):Oe("fetch",{...a,endTimestamp:ne()*1e3,response:l}),l),l=>{Oe("fetch",{...a,endTimestamp:ne()*1e3,error:l}),qt(l)&&l.stack===void 0&&(l.stack=o.stack,ve(l,"framesToPop",1));let u=M()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{let f=new URL(a.fetchData.url).host;u==="always"?l.message=`${l.message} (${f})`:ve(l,"__sentry_fetch_url_host__",f)}catch{}throw l})}})}async function $1(e,t){if(e?.body){let r=e.body,n=r.getReader(),o=setTimeout(()=>{r.cancel().then(null,()=>{})},90*1e3),i=!0;for(;i;){let s;try{s=setTimeout(()=>{r.cancel().then(null,()=>{})},5e3);let{done:a}=await n.read();clearTimeout(s),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),n.releaseLock(),r.cancel().then(null,()=>{})}}function j1(e){let t;try{t=e.clone()}catch{return}$1(t,()=>{Oe("fetch-body-resolved",{endTimestamp:ne()*1e3,response:e})})}function dc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Py(e){return typeof e=="string"?e:e?dc(e,"url")?e.url:e.toString?e.toString():"":""}function W1(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[r,n]=e;return{url:Py(r),method:dc(n,"method")?String(n.method).toUpperCase():xs(r)&&dc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Py(t),method:dc(t,"method")?String(t.method).toUpperCase():"GET"}}function G1(e){let[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(xs(t))return new Headers(t.headers)}catch{}}var By=L;function Rt(){try{return By.document.location.href}catch{return""}}function Ei(e,t=5){if(!By.HTMLElement)return null;let r=e;for(let n=0;n<t;n++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}var P=L,Hp=0;function zp(){return Hp>0}function xk(){Hp++,setTimeout(()=>{Hp--})}function Ro(e,t={}){function r(o){return typeof o=="function"}if(!r(e))return e;try{let o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(kn(e))return e}catch{return e}let n=function(...o){L._sentryWrappedDepth=(L._sentryWrappedDepth||0)+1;try{let i=o.map(s=>Ro(s,t));return e.apply(this,i)}catch(i){throw xk(),Qt(s=>{s.addEventProcessor(a=>(t.mechanism&&(go(a,void 0,void 0),Jt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),rn(i)}),i}finally{L._sentryWrappedDepth=(L._sentryWrappedDepth||0)-1}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}ks(n,e),ve(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}function Ti(){let e=Rt(),{referrer:t}=P.document||{},{userAgent:r}=P.navigator||{},n={...t&&{Referer:t},...r&&{"User-Agent":r}};return{url:e,headers:n}}function fc(e,t){let r=mc(e,t),n={type:Ck(t),value:Ak(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function kk(e,t,r,n){let i=M()?.getOptions().normalizeDepth,s=Ok(t),a={__serialized__:Rs(t,i)};if(s)return{exception:{values:[fc(e,s)]},extra:a};let l={exception:{values:[{type:xn(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Mk(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=mc(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function $p(e,t){return{exception:{values:[fc(e,t)]}}}function mc(e,t){let r=t.stacktrace||t.stack||"",n=Rk(t),o=Nk(t);try{return e(r,n,o)}catch{}return[]}var wk=/Minified React error #\d+;/i;function Rk(e){return e&&wk.test(e.message)?1:0}function Nk(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function rv(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Ck(e){let t=e?.name;return!t&&rv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Ak(e){let t=e?.message;return rv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?ac(t.error):ac(e):"No error message"}function nv(e,t,r,n){let o=r?.syntheticException||void 0,i=hc(e,t,o,n);return Jt(i),i.level="error",r?.event_id&&(i.event_id=r.event_id),Ur(i)}function ov(e,t,r="info",n,o){let i=n?.syntheticException||void 0,s=jp(e,t,i,o);return s.level=r,n?.event_id&&(s.event_id=n.event_id),Ur(s)}function hc(e,t,r,n,o){let i;if(ti(t)&&t.error)return $p(e,t.error);if(Is(t)||Cl(t)){let s=t;if("stack"in t){i=$p(e,t);let a=i.exception?.values?.[0];if(n&&r&&a&&!a.stacktrace){let l=mc(e,r);l.length&&(a.stacktrace={frames:l},Jt(i,{synthetic:!0}))}}else{let a=s.name||(Is(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;i=jp(e,l,r,n),go(i,l)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return qt(t)?$p(e,t):Kt(t)||xn(t)?(i=kk(e,t,r,o),Jt(i,{synthetic:!0}),i):(i=jp(e,t,r,n),go(i,`${t}`,void 0),Jt(i,{synthetic:!0}),i)}function jp(e,t,r,n){let o={};if(n&&r){let i=mc(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Jt(o,{synthetic:!0})}if(In(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function Mk(e,{isUnhandledRejection:t}){let r=Ml(e),n=t?"promise rejection":"exception";return ti(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:xn(e)?`Event \`${Lk(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Lk(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ok(e){return Object.values(e).find(t=>t instanceof Error)}var gc=class extends ra{constructor(t){let r=Dk(t),n=P.SENTRY_SDK_SOURCE||bp();na(r,"browser",["browser"],n),super(r);let{userInfo:o}=this.getDataCollectionOptions();r._metadata?.sdk&&(r._metadata.sdk.settings={infer_ip:o?"auto":"never",...r._metadata.sdk.settings});let{sendClientReports:i,enableLogs:s,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;P.document&&(i||s||c)&&P.document.addEventListener("visibilitychange",()=>{P.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&Si(this),c&&Qs(this))}),o&&this.on("beforeSendSession",Cp)}eventFromException(t,r){return nv(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return ov(this._options.stackParser,t,r,n,this._options.attachStacktrace)}_prepareEvent(t,r,n,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n,o)}};function Dk(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:P.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var We=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var O=L;var Pk=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Br=(e,t,r,n)=>{let o,i;return s=>{t.value>=0&&(s||n)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=Pk(t.value,r),e(t)))}};var on=(e=!0)=>{let t=O.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var tr=()=>on()?.activationStart??0;function rr(e,t,r){O.document&&O.addEventListener(e,t,r)}function No(e,t,r){O.document&&O.removeEventListener(e,t,r)}var bi=-1,iv=new Set,Uk=()=>O.document?.visibilityState==="hidden"&&!O.document?.prerendering?0:1/0,Sc=e=>{if(Bk(e)&&bi>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of iv)t();isFinite(bi)||(bi=e.type==="visibilitychange"?e.timeStamp:0,No("prerenderingchange",Sc,!0))}},Fr=()=>{if(O.document&&bi<0){let e=tr();bi=(O.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>e)[0]?.startTime)??Uk(),rr("visibilitychange",Sc,!0),rr("pagehide",Sc,!0),rr("prerenderingchange",Sc,!0)}return{get firstHiddenTime(){return bi},onHidden(e){iv.add(e)}}};function Bk(e){return e.type==="pagehide"||O.document?.visibilityState==="hidden"}var sv=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Hr=(e,t=-1)=>{let r=on(),n="navigate";return r&&(O.document?.prerendering||tr()>0?n="prerender":O.document?.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:sv(),navigationType:n}};var Wp=new WeakMap;function Ii(e,t){try{return Wp.get(e)||Wp.set(e,new t),Wp.get(e)}catch{return new t}}var yc=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;let r=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}};var nr=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}};var xi=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var Dn=e=>{O.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var Fk=[1800,3e3],av=(e,t={})=>{Dn(()=>{let r=Fr(),n=Hr("FCP"),o,s=nr("paint",a=>{for(let l of a)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<r.firstHiddenTime&&(n.value=Math.max(l.startTime-tr(),0),n.entries.push(l),o(!0)))});s&&(o=Br(e,n,Fk,t.reportAllChanges))})};var Hk=[.1,.25],lv=(e,t={})=>{av(xi(()=>{let r=Hr("CLS",0),n,o=Fr(),i=Ii(t,yc),s=l=>{for(let c of l)i._processEntry(c);i._sessionValue>r.value&&(r.value=i._sessionValue,r.entries=i._sessionEntries,n())},a=nr("layout-shift",s);a&&(n=Br(e,r,Hk,t.reportAllChanges),o.onHidden(()=>{s(a.takeRecords()),n(!0)}),O?.setTimeout?.(n))}))};var cv=0,Gp=1/0,vc=0,zk=e=>{e.forEach(t=>{t.interactionId&&(Gp=Math.min(Gp,t.interactionId),vc=Math.max(vc,t.interactionId),cv=vc?(vc-Gp)/7+1:0)})},Vp,Yp=()=>Vp?cv:performance.interactionCount||0,uv=()=>{"interactionCount"in performance||Vp||(Vp=nr("event",zk,{type:"event",buffered:!0,durationThreshold:0}))};var qp=10,dv=0,$k=()=>Yp()-dv,_c=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){dv=Yp(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor($k()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;let r=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(t.interactionId);if(n||this._longestInteractionList.length<qp||t.duration>r._latency){if(n?t.duration>n._latency?(n.entries=[t],n._latency=t.duration):t.duration===n._latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>qp){let o=this._longestInteractionList.splice(qp);for(let i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(n)}}};var Ec=e=>{let t=O.requestIdleCallback||O.setTimeout;O.document?.visibilityState==="hidden"?e():(e=xi(e),rr("visibilitychange",e,{once:!0,capture:!0}),rr("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),No("visibilitychange",e,{capture:!0}),No("pagehide",e,{capture:!0})}))};var jk=[200,500],Wk=40,pv=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let r=Fr();Dn(()=>{uv();let n=Hr("INP"),o,i=Ii(t,_c),s=l=>{Ec(()=>{for(let u of l)i._processEntry(u);let c=i._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,o())})},a=nr("event",s,{durationThreshold:t.durationThreshold??Wk});o=Br(e,n,jk,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{s(a.takeRecords()),o(!0)}))})};var Tc=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var Gk=[2500,4e3],fv=(e,t={})=>{Dn(()=>{let r=Fr(),n=Hr("LCP"),o,i=Ii(t,Tc),s=l=>{t.reportAllChanges||(l=l.slice(-1));for(let c of l)i._processEntry(c),c.startTime<r.firstHiddenTime&&(n.value=Math.max(c.startTime-tr(),0),n.entries=[c],o())},a=nr("largest-contentful-paint",s);if(a){o=Br(e,n,Gk,t.reportAllChanges);let l=xi(()=>{s(a.takeRecords()),a.disconnect(),o(!0)}),c=u=>{u.isTrusted&&(Ec(l),No(u.type,c,{capture:!0}))};for(let u of["keydown","click","visibilitychange"])rr(u,c,{capture:!0})}})};var Vk=[800,1800],Kp=e=>{O.document?.prerendering?Dn(()=>Kp(e)):O.document?.readyState!=="complete"?addEventListener("load",()=>Kp(e),!0):setTimeout(e)},mv=(e,t={})=>{let r=Hr("TTFB"),n=Br(e,r,Vk,t.reportAllChanges);Kp(()=>{let o=on();o&&(r.value=Math.max(o.responseStart-tr(),0),r.entries=[o],n(!0))})};var sa={},bc={},hv,gv,Sv,yv;function sn(e,t=!1){return Ic("cls",e,Yk,hv,t)}function an(e,t=!1){return Ic("lcp",e,qk,gv,t)}function Xp(e){return Ic("ttfb",e,Kk,Sv)}function Co(e){return Ic("inp",e,Xk,yv)}function Er(e,t){return vv(e,t),bc[e]||(Jk(e),bc[e]=!0),_v(e,t)}function aa(e,t){let r=sa[e];if(r?.length)for(let n of r)try{n(t)}catch(o){We&&T.error(`Error while triggering instrumentation handler.
|
|
16
|
+
`)}`)}function AS(e){if(!C)return;let{description:t="< unknown name >",op:r="< unknown op >"}=B(e),{spanId:n}=e.spanContext(),i=te(e)===e,s=`[Tracing] Finishing "${r}" ${i?"root ":""}span "${t}" with ID ${n}`;T.log(s)}function Kl(e,t,r,n=ie()){let o=n&&te(n);o&&(C&&T.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),o.addEvent(e,{[Er]:t,[_r]:r}))}function Xl(e){if(!e||e.length===0)return;let t={};return e.forEach(r=>{let n=r.attributes||{},o=n[_r],i=n[Er];typeof o=="string"&&typeof i=="number"&&(t[r.name]={value:i,unit:o})}),t}function Je(e){return e.getOptions().traceLifecycle==="stream"}var MS=1e3,An=class{constructor(t={}){this._traceId=t.traceId||ht(),this._spanId=t.spanId||st(),this._startTime=t.startTimestamp||ne(),this._links=t.links,this._attributes={},this.setAttributes({[Z]:"manual",[_e]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,r){}spanContext(){let{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?Ds:$l}}setAttribute(t,r){return r===void 0?delete this._attributes[t]:this._attributes[t]=r,this}setAttributes(t){return Object.keys(t).forEach(r=>this.setAttribute(r,t[r])),this}updateStartTime(t){this._startTime=xt(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Fe,"custom"),this}end(t){this._endTime||(this._endTime=xt(t),AS(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[_e],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Hs(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Z],profile_id:this._attributes[vo],exclusive_time:this._attributes[at],measurements:Xl(this._events),is_segment:this._isStandaloneSpan&&te(this)===this||void 0,segment_id:this._isStandaloneSpan?te(this).spanContext().spanId:void 0,links:Bs(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===te(this),status:ip(this._status),attributes:this._attributes,links:op(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,r,n){C&&T.log("[Tracing] Adding an event to span:",t);let o=LS(r)?r:n||ne(),i=LS(r)?{}:r||{},s={name:t,time:xt(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=M();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===te(this)))return;if(this._isStandaloneSpan){this._sampled?II(CS([this],t)):(C&&T.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Je(t)){t.emit("afterSegmentSpanEnd",this);return}let n=this._convertSpanToTransaction();n&&(_o(this).scope||U()).captureEvent(n)}_convertSpanToTransaction(){if(!OS(B(this)))return;this._name||(C&&T.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:r}=_o(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=tn(this).filter(u=>u!==this&&!kI(u)).map(u=>B(u)).filter(OS),s=this._attributes[Fe];delete this._attributes[ai];let a=!1;i.forEach(u=>{delete u.data[ai],u.op?.startsWith("gen_ai.")&&(a=!0)});let l={contexts:{trace:hS(this)},spans:i.length>MS?i.sort((u,p)=>u.start_timestamp-p.start_timestamp).slice(0,MS):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:r,dynamicSamplingContext:De(this),hasGenAiSpans:a},request:n,...s&&{transaction_info:{source:s}}},c=Xl(this._events);return c&&Object.keys(c).length&&(C&&T.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),l.measurements=c),l}};function LS(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function OS(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function kI(e){return e instanceof An&&e.isStandaloneSpan()}function II(e){let t=M();if(!t)return;let r=e[1];if(!r||r.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function PS(e,t,r){if(!He(e))return[!1];let n,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),n=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,n=!0);let i=Ft(o);if(i===void 0)return C&&T.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return C&&T.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,n];let s=r<i;return s||C&&T.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,n]}var dp="__SENTRY_SUPPRESS_TRACING__";function We(e){let t=US();if(t.startInactiveSpan)return t.startInactiveSpan(e);let r=xI(e),{forceTransaction:n,parentSpan:o}=e;return(e.scope?s=>Zt(e.scope,s):o!==void 0?s=>fi(o,s):s=>s())(()=>{let s=U(),a=CI(s,o),l=M();return e.onlyIfParent&&!a?(l?.recordDroppedEvent("no_parent_span","span"),new Xe):wI({parentSpan:a,spanArguments:r,forceTransaction:n,scope:s})})}function fi(e,t){let r=US();return r.withActiveSpan?r.withActiveSpan(e,t):Zt(n=>(Nn(n,e||void 0),t(n)))}function wI({parentSpan:e,spanArguments:t,forceTransaction:r,scope:n}){if(!He()){let a=new Xe;if(r||!e){let l={sampled:"false",sample_rate:"0",transaction:t.name,...De(a)};ui(a,l)}return a}let o=M();if(NI(o,t))return pp(n)||o?.recordDroppedEvent("ignored","span"),new Xe({dropReason:"ignored",traceId:e?.spanContext().traceId??n.getPropagationContext().traceId});let i=ke(),s;if(e&&!r)s=RI(e,n,t),zs(e,s);else if(e){let a=De(e),{traceId:l,spanId:c}=e.spanContext(),d=Rt(e);s=DS({traceId:l,parentSpanId:c,...t},n,d),ui(s,a)}else{let{traceId:a,dsc:l,parentSpanId:c,sampled:d}={...i.getPropagationContext(),...n.getPropagationContext()};s=DS({traceId:a,parentSpanId:c,...t},n,d),l&&ui(s,l)}return NS(s),aS(s,n,i),s}function xI(e){let r={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...r};return n.startTimestamp=xt(e.startTime),delete n.startTime,n}return r}function US(){let e=Ut();return Dr(e)}function DS(e,t,r){let n=M(),o=n?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};n?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??r,l=s.spanAttributes,c=t.getPropagationContext(),d=pp(t),[u,p,f]=d?[!1]:PS(o,{name:i,parentSampled:a,attributes:l,parentSampleRate:Ft(c.dsc?.sample_rate)},c.sampleRand),h=new An({...e,attributes:{[Fe]:"custom",[Qr]:p!==void 0&&f?p:void 0,...l},sampled:u});return!u&&n&&!d&&(C&&T.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),n.recordDroppedEvent("sample_rate",Je(n)?"span":"transaction")),n&&n.emit("spanStart",h),h}function RI(e,t,r){let{spanId:n,traceId:o}=e.spanContext(),i=pp(t),s=i?!1:Rt(e),a=s?new An({...r,parentSpanId:n,traceId:o,sampled:s}):new Xe({traceId:o});zs(e,a);let l=M();return l&&(Je(l)&&a instanceof Xe&&(e instanceof Xe&&e.dropReason?(a.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):i||(a.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",a),r.endTimestamp&&(l.emit("spanEnd",a),l.emit("afterSpanEnd",a))),a}function CI(e,t){if(t)return t;if(t===null)return;let r=yo(e);if(!r)return;let n=M();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?te(r):r}function NI(e,t){let r=e?.getOptions().ignoreSpans;return!e||!Je(e)||!r?.length?!1:rn({description:t.name||"",op:t.attributes?.[_e]||t.op,attributes:t.attributes},r)}function pp(e){return e.getScopeData().sdkProcessingMetadata[dp]===!0}var mi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},AI="heartbeatFailed",MI="idleTimeout",LI="finalTimeout",OI="externalFinish";function Jl(e,t={}){let r=new Map,n=!1,o,i=OI,s=!t.disableAutoFinish,a=[],{idleTimeout:l=mi.idleTimeout,finalTimeout:c=mi.finalTimeout,childSpanTimeout:d=mi.childSpanTimeout,beforeSpanEnd:u,trimIdleSpanEndTimestamp:p=!0}=t,f=M();if(!f||!He()){let _=new Xe,k={sample_rate:"0",sampled:"false",...De(_)};return ui(_,k),_}let h=U(),v=ie(),I=PI(e);I.end=new Proxy(I.end,{apply(_,k,z){if(u&&u(I),k instanceof Xe)return;let[w,...L]=z,$=w||ne(),Y=xt($),G=tn(I).filter(j=>j!==I),be=B(I);if(!G.length||!p)return E(Y),Reflect.apply(_,k,[Y,...L]);let ce=f.getOptions().ignoreSpans,ye=G?.reduce((j,K)=>{let pe=B(K);return!pe.timestamp||ce&&rn({description:pe.description,op:pe.op,attributes:pe.data},ce)?j:j?Math.max(j,pe.timestamp):pe.timestamp},void 0),N=be.start_timestamp,oe=Math.min(N?N+c/1e3:1/0,Math.max(N||-1/0,Math.min(Y,ye||1/0)));return E(oe),Reflect.apply(_,k,[oe,...L])}});function m(){o&&(clearTimeout(o),o=void 0)}function S(_){m(),o=setTimeout(()=>{!n&&r.size===0&&s&&(i=MI,I.end(_))},l)}function y(_){o=setTimeout(()=>{!n&&s&&(i=AI,I.end(_))},d)}function b(_){m(),r.set(_,!0);let k=ne();y(k+d/1e3)}function R(_){if(r.has(_)&&r.delete(_),r.size===0){let k=ne();S(k+l/1e3)}}function E(_){n=!0,r.clear(),a.forEach(G=>G()),Nn(h,v);let k=B(I),{start_timestamp:z}=k;if(!z)return;k.data[en]||I.setAttribute(en,i);let L=k.status;(!L||L==="unknown")&&I.setStatus({code:1}),T.log(`[Tracing] Idle span "${k.op}" finished`);let $=tn(I).filter(G=>G!==I),Y=0;$.forEach(G=>{G.isRecording()&&(G.setStatus({code:2,message:"cancelled"}),G.end(_),C&&T.log("[Tracing] Cancelling span since span ended early",JSON.stringify(G,void 0,2)));let be=B(G),{timestamp:ce=0,start_timestamp:ye=0}=be,N=ye<=_,oe=(c+l)/1e3,j=ce-ye<=oe;if(C){let K=JSON.stringify(G,void 0,2);N?j||T.log("[Tracing] Discarding span since it finished after idle span final timeout",K):T.log("[Tracing] Discarding span since it happened after idle span was finished",K)}(!j||!N)&&(ES(I,G),Y++)}),Y>0&&I.setAttribute("sentry.idle_span_discarded_spans",Y)}return a.push(f.on("spanStart",_=>{if(n||_===I||B(_).timestamp||_ instanceof An&&_.isStandaloneSpan())return;tn(I).includes(_)&&b(_.spanContext().spanId)})),a.push(f.on("spanEnd",_=>{n||R(_.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",_=>{_===I&&(s=!0,S(),r.size&&y())})),t.disableAutoFinish||S(),setTimeout(()=>{n||(I.setStatus({code:2,message:"deadline_exceeded"}),i=LI,I.end())},c),I}function PI(e){let t=We(e);return Nn(U(),t),C&&T.log("[Tracing] Started span is an idle span"),t}function FS(e,t){let{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;DI(e,t),n&&FI(e,n),HI(e,r),UI(e,o),BI(e,i)}function BS(e,t){let{extra:r,tags:n,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:d,eventProcessors:u,attachments:p,propagationContext:f,transactionName:h,span:v}=t;Gs(e,"extra",r),Gs(e,"tags",n),Gs(e,"attributes",o),Gs(e,"user",i),Gs(e,"contexts",s),e.sdkProcessingMetadata=Cn(e.sdkProcessingMetadata,l,2),a&&(e.level=a),h&&(e.transactionName=h),v&&(e.span=v),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function Gs(e,t,r){e[t]=Cn(e[t],r,1)}function Zl(e,t){let r=As().getScopeData();return e&&BS(r,e.getScopeData()),t&&BS(r,t.getScopeData()),r}function DI(e,t){let{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(n).length&&(e.tags={...n,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function UI(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function BI(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function FI(e,t){e.contexts={trace:Wl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:De(t),...e.sdkProcessingMetadata};let r=te(t),n=B(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function HI(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var zI="thismessage:/";function bo(e){return"isRelative"in e}function Ur(e,t){let r=e.indexOf("://")<=0&&e.indexOf("//")!==0,n=t??(r?zI:void 0);try{if("canParse"in URL&&!URL.canParse(e,n))return;let o=new URL(e,n);return r?{isRelative:r,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function hi(e){if(bo(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Qt(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function Ql(e){return e.split(/[?#]/,1)[0]}function lt(e,t=!0){if(e.startsWith("data:")){let r=e.match(/^data:([^;,]+)/),n=r?r[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),s="";if(t&&i!==-1){let a=e.slice(i+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${n}${o?",base64":""}${s?`,${s}`:""}`}return e}function Mn(e,t){let r=e.attributes??(e.attributes={});Object.entries(t).forEach(([n,o])=>{o!=null&&!(n in r)&&(r[n]=o)})}var fp=0,HS=1,zS=2;function Br(e){return new Vs(t=>{t(e)})}function ko(e){return new Vs((t,r)=>{r(e)})}var Vs=class e{constructor(t){this._state=fp,this._handlers=[],this._runExecutor(t)}then(t,r){return new e((n,o)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){o(s)}},i=>{if(!r)o(i);else try{n(r(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new e((r,n)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){n(o);return}r(o)})})}_executeHandlers(){if(this._state===fp)return;let t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===HS&&r[1](this._value),this._state===zS&&r[2](this._value),r[0]=!0)})}_runExecutor(t){let r=(i,s)=>{if(this._state===fp){if(Sr(s)){s.then(n,o);return}this._state=i,this._value=s,this._executeHandlers()}},n=i=>{r(HS,i)},o=i=>{r(zS,i)};try{t(n,o)}catch(i){o(i)}}};function $S(e,t,r,n=0){try{let o=mp(t,r,e,n);return Sr(o)?o:Br(o)}catch(o){return ko(o)}}function mp(e,t,r,n){let o=r[n];if(!e||!o)return e;let i=o({...e},t);return C&&i===null&&T.log(`Event processor "${o.id||"?"}" dropped event`),Sr(i)?i.then(s=>mp(s,t,r,n+1)):mp(i,t,r,n+1)}var Io,WS,jS,Ln;function GS(e){let t=O._sentryDebugIds,r=O._debugIds;if(!t&&!r)return{};let n=t?Object.keys(t):[],o=r?Object.keys(r):[];if(Ln&&n.length===WS&&o.length===jS)return Ln;WS=n.length,jS=o.length,Ln={},Io||(Io={});let i=(s,a)=>{for(let l of s){let c=a[l],d=Io?.[l];if(d&&Ln&&c)Ln[d[0]]=c,Io&&(Io[l]=[d[0],c]);else if(c){let u=e(l);for(let p=u.length-1;p>=0;p--){let h=u[p]?.filename;if(h&&Ln&&Io){Ln[h]=c,Io[l]=[h,c];break}}}}};return t&&i(n,t),r&&i(o,r),Ln}function Ys(e,t,r,n,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||r.event_id||Ae(),timestamp:t.timestamp||It()},c=r.integrations||e.integrations.map(m=>m.name);$I(l,e),GI(l,c),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&WI(l,e.stackParser);let d=YI(n,r.captureContext);r.mechanism&&Jt(l,r.mechanism);let u=o?o.getEventProcessors():[],p=Zl(i,d),f=[...r.attachments||[],...p.attachments];f.length&&(r.attachments=f),FS(l,p);let h=[...u,...p.eventProcessors];return(r.data&&r.data.__sentry__===!0?Br(l):$S(h,l,r)).then(m=>(m&&jI(m),typeof s=="number"&&s>0?VI(m,s,a):m))}function $I(e,t){let{environment:r,release:n,dist:o,maxValueLength:i}=t;e.environment=e.environment||r||ci,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o);let s=e.request;s?.url&&i&&(s.url=go(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=go(a.value,i))})}function WI(e,t){let r=GS(t);e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=r[o.filename])})})}function jI(e){let t={};if(e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(t).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function GI(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function VI(e,t,r){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:it(o.data,t,r)}}))},...e.user&&{user:it(e.user,t,r)},...e.contexts&&{contexts:it(e.contexts,t,r)},...e.extra&&{extra:it(e.extra,t,r)}};return e.contexts?.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=it(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:it(o.data,t,r)}}))),e.contexts?.flags&&n.contexts&&(n.contexts.flags=it(e.contexts.flags,3,r)),n}function YI(e,t){if(!t)return e;let r=e?e.clone():new wt;return r.update(t),r}function VS(e){if(e)return qI(e)?{captureContext:e}:XI(e)?{captureContext:e}:e}function qI(e){return e instanceof wt||typeof e=="function"}var KI=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function XI(e){return Object.keys(e).some(t=>KI.includes(t))}function nn(e,t){return U().captureException(e,VS(t))}function gi(e,t){return U().captureEvent(e,t)}function wo(e,t){ke().setContext(e,t)}function qs(){return ke().lastEventId()}function Ks(){let e=M();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Xs(e){ke().addEventProcessor(e)}function Si(e){let t=ke(),{user:r}=Zl(t,U()),{userAgent:n}=O.navigator||{},o=Kg({user:r,...n&&{userAgent:n},...e}),i=t.getSession();return i?.status==="ok"&&Zr(i,{status:"exited"}),Js(),t.setSession(o),o}function Js(){let e=ke(),r=U().getSession()||e.getSession();r&&Xg(r),YS(),e.setSession()}function YS(){let e=ke(),t=M(),r=e.getSession();r&&t&&t.captureSession(r)}function xo(e=!1){if(e){Js();return}YS()}var qS="7";function KS(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function JI(e){return`${KS(e)}${e.projectId}/envelope/`}function ZI(e,t){let r={sentry_version:qS};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function gp(e,t,r){return t||`${JI(e)}?${ZI(e,r)}`}function Sp(e,t){let r=Hl(e);if(!r)return"";let n=`${KS(r)}embed/error-page/`,o=`dsn=${Bt(r)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${o}`}var yp=[];function QI(e){let t={};return e.forEach(r=>{let{name:n}=r,o=t[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function vp(e){let t=e.defaultIntegrations||[],r=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){let o=r(t);n=Array.isArray(o)?o:[o]}else n=t;return QI(n)}function XS(e,t){let r={};return t.forEach(n=>{n?.beforeSetup&&n.beforeSetup(e)}),t.forEach(n=>{n&&Ep(e,n,r)}),r}function _p(e,t){for(let r of t)r?.afterAllSetup&&r.afterAllSetup(e)}function Ep(e,t,r){if(r[t.name]){C&&T.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!yp.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),yp.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>n(o,i,e))}if(typeof t.processEvent=="function"){let n=t.processEvent.bind(t),o=Object.assign((i,s)=>n(i,s,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(n=>{let o=t[n];typeof o=="function"&&e.on(n,i=>o.call(t,i,e))}),C&&T.log(`Integration installed: ${t.name}`)}function Tp(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function bp(){return"npm"}function JS(){return!Tp()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function er(){return typeof window<"u"&&(!JS()||ew())}function ew(){return O.process?.type==="renderer"}function tw(e,t){let r=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...er()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function ZS(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=Bt(n)),gt(i,[tw(e,o)])}function yi(e,t){let r=t??rw(e)??[];if(r.length===0)return;let n=e.getOptions(),o=ZS(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);QS().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function rw(e){return QS().get(e)}function QS(){return gr("clientToLogBufferMap",()=>new WeakMap)}function nw(e,t){let r=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...er()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function ey(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=Bt(n)),gt(i,[nw(e,o)])}function Zs(e,t){let r=t??ow(e)??[];if(r.length===0)return;let n=e.getOptions(),o=ey(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ty().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function ow(e){return ty().get(e)}function ty(){return gr("clientToMetricBufferMap",()=>new WeakMap)}function ry(e){let t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return yS(t)}function ny(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Je(t))return;let r=[],n=[];for(let i of e.spans)i.op?.startsWith("gen_ai.")?r.push(ry(i)):n.push(i);if(r.length===0)return;e.spans=n;let o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:r.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...er()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:r}]}function ec(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var vi=Symbol.for("SentryBufferFullError");function Ro(e=100){let t=new Set;function r(){return t.size<e}function n(s){t.delete(s)}function o(s){if(!r())return ko(vi);let a=s();return t.add(a),a.then(()=>n(a),()=>n(a)),a}function i(s){if(!t.size)return Br(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let l=[a,new Promise(c=>ec(setTimeout(()=>c(!1),s)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:o,drain:i}}var oy=60*1e3;function iy(e,t=ho()){let r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${e}`);return isNaN(n)?oy:n-t}function sy(e,t){return e[t]||e.all||0}function Qs(e,t,r=ho()){return sy(e,t)>r}function ea(e,{statusCode:t,headers:r},n=ho()){let o={...e},i=r?.["x-sentry-rate-limits"],s=r?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[l,c,,,d]=a.split(":",5),u=parseInt(l,10),p=(isNaN(u)?60:u)*1e3;if(!c)o.all=n+p;else for(let f of c.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[f]=n+p):o[f]=n+p}else s?o.all=n+iy(s,n):t===429&&(o.all=n+60*1e3);return o}var kp=64;function tc(e,t,r=Ro(e.bufferSize||kp)){let n={},o=s=>r.drain(s);function i(s){let a=[];if(Ws(s,(u,p)=>{let f=ql(p);Qs(n,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(u)}),a.length===0)return Promise.resolve({});let l=gt(s[0],a),c=u=>{if(ap(l,["client_report"])){C&&T.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);return}Ws(l,(p,f)=>{e.recordDroppedEvent(u,ql(f))})},d=()=>t({body:lp(l)}).then(u=>u.statusCode===413?(C&&T.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),u):(C&&u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&T.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),n=ea(n,u),u),u=>{throw c("network_error"),C&&T.error("Encountered error running transport request:",u),u});return r.add(d).then(u=>u,u=>{if(u===vi)return C&&T.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw u})}return{send:i,flush:o}}function ay(e,t,r){let n=[{type:"client_report"},{timestamp:r||It(),discarded_events:e}];return gt(t?{dsn:t}:{},[n])}function rc(e){let t=[];e.message&&t.push(e.message);try{let r=e.exception.values[e.exception.values.length-1];r?.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`))}catch{}return t}function ly(e){let{trace_id:t,parent_span_id:r,span_id:n,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:r,span_id:n??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[vo],exclusive_time:s?.[at],measurements:e.measurements,is_segment:!0}}function cy(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[vo]:e.profile_id},...e.exclusive_time&&{[at]:e.exclusive_time}}}},measurements:e.measurements}}var ta=["forwarded","-ip","remote-","via","-user"];function uy(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5}:{userInfo:!1,cookies:{deny:ta},httpHeaders:{request:{deny:ta},response:{deny:ta}},httpBodies:[],queryParams:{deny:ta},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:5}}var iw={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function dy(e){let t=e.dataCollection!=null?iw:uy(e.sendDefaultPii),r=e.dataCollection??{};return{userInfo:r.userInfo??t.userInfo,cookies:r.cookies??t.cookies,httpHeaders:{request:r.httpHeaders?.request??t.httpHeaders.request,response:r.httpHeaders?.response??t.httpHeaders.response},httpBodies:r.httpBodies??t.httpBodies,queryParams:r.queryParams??t.queryParams,genAI:{inputs:r.genAI?.inputs??t.genAI.inputs,outputs:r.genAI?.outputs??t.genAI.outputs},stackFrameVariables:r.stackFrameVariables??t.stackFrameVariables,frameContextLines:r.frameContextLines??t.frameContextLines}}var py="Not capturing exception because it's already been captured.",fy="Discarded session because of missing or non-string release",vy=Symbol.for("SentryInternalError"),_y=Symbol.for("SentryDoNotSendEventError"),sw=5e3;function nc(e){return{message:e,[vy]:!0}}function Ip(e){return{message:e,[_y]:!0}}function my(e){return!!e&&typeof e=="object"&&vy in e}function hy(e){return!!e&&typeof e=="object"&&_y in e}function gy(e,t,r,n,o){let i=0,s,a=!1;e.on(r,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,l=>{if(i+=n(l),i>=8e5)o(e);else if(!a){let c=e.getOptions()._flushInterval??sw;c>0&&(a=!0,s=ec(setTimeout(()=>{o(e)},c)))}}),e.on("flush",()=>{o(e)})}var ra=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Ro(t.transportOptions?.bufferSize??kp),this._dataCollection=dy(t),t.dsn?this._dsn=Hl(t.dsn):C&&T.warn("No DSN provided, client will not send events."),this._dsn){let n=gp(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&gy(this,"afterCaptureLog","flushLogs",uw,yi),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&gy(this,"afterCaptureMetric","flushMetrics",cw,Zs)}captureException(t,r,n){let o=Ae();if(Ns(t))return C&&T.log(py),o;let i={event_id:o,...r};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,n)).then(s=>s),"error"),i.event_id}captureMessage(t,r,n,o){let i={event_id:Ae(),...n},s=In(t)?t:String(t),a=kt(t),l=a?this.eventFromMessage(s,r,i):this.eventFromException(t,i);return this._process(()=>l.then(c=>this._captureEvent(c,i,o)),a?"unknown":"error"),i.event_id}captureEvent(t,r,n){let o=Ae();if(r?.originalException&&Ns(r.originalException))return C&&T.log(py),o;let i={event_id:o,...r},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,l=s.capturedSpanIsolationScope,c=Sy(t.type);return this._process(()=>this._captureEvent(t,i,a||n,l),c),i.event_id}captureSession(t){this.sendSession(t),Zr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let r=this._transport;if(this.emit("flush"),!r)return!0;let n=await this._isClientDoneProcessing(t),o=await r.flush(t);return n&&o}async close(t){yi(this);let r=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),r}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){let r=this._integrations[t.name];!r&&t.beforeSetup&&t.beforeSetup(this),Ep(this,t,this._integrations),r||_p(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=ny(t,this),o=RS(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of r.attachments||[])o=Yl(o,up(i));n&&(o=Yl(o,n)),this.sendEnvelope(o).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){let{release:r,environment:n=ci}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!r){C&&T.warn(fy);return}i.release=i.release||r,i.environment=i.environment||n,t.attrs=i}else{if(!t.release&&!r){C&&T.warn(fy);return}t.release=t.release||r,t.environment=t.environment||n}this.emit("beforeSendSession",t);let o=xS(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,r,n=1){if(this._options.sendClientReports){let o=`${t}:${r}`;C&&T.log(`Recording outcome: "${o}"${n>1?` (${n} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+n}}on(t,r){let n=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>r(...i);return n.add(o),()=>{n.delete(o)}}emit(t,...r){let n=this._hooks[t];n&&n.forEach(o=>o(...r))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(r){return C&&T.error("Error while sending envelope:",r),{}}return C&&T.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=XS(this,t),_p(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",o=!1,i=r.exception?.values;if(i){o=!0,n=!1;for(let l of i)if(l.mechanism?.handled===!1){n=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Zr(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}async _isClientDoneProcessing(t){let r=0;for(;!t||r<t;){if(await new Promise(n=>setTimeout(n,1)),!this._numProcessing)return!0;r++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,o){let i=this.getOptions(),s=this.getIntegrationNames();return!r.integrations&&s.length&&(r.integrations=s),this.emit("preprocessEvent",t,r),t.type||o.setLastEventId(t.event_id||r.event_id),Ys(i,t,r,n,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,r),a.contexts={trace:{...a.contexts?.trace,...Dl(n)},...a.contexts};let l=di(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,r={},n=U(),o=ke()){return C&&wp(t)&&T.log(`Captured error event \`${rc(t)[0]||"<unknown>"}\``),this._processEvent(t,r,n,o).then(i=>i.event_id,i=>{C&&(hy(i)?T.log(i.message):my(i)?T.warn(i.message):T.warn(i))})}_processEvent(t,r,n,o){let i=this.getOptions(),{sampleRate:s}=i,a=Ey(t),l=wp(t),d=`before send for type \`${t.type||"error"}\``,u=typeof s>"u"?void 0:Ft(s);if(l&&typeof u=="number"&&Xt()>u)return this.recordDroppedEvent("sample_rate","error"),ko(Ip(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let p=Sy(t.type);return this._prepareEvent(t,r,n,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),Ip("An event processor returned `null`, will not send event.");if(r.data?.__sentry__===!0)return f;let v=lw(this,i,f,r);return aw(v,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){let m=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",m)}throw Ip(`${d} returned \`null\`, will not send event.`)}let h=n.getSession()||o.getSession();if(l&&h&&this._updateSessionFromEvent(h,f),a){let I=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,m=f.spans?f.spans.length:0,S=I-m;S>0&&this.recordDroppedEvent("before_send","span",S)}let v=f.transaction_info;if(a&&v&&f.transaction!==t.transaction){let I="custom";f.transaction_info={...v,source:I}}return this.sendEvent(f,r),f}).then(null,f=>{throw hy(f)||my(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),nc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
17
|
+
Reason: ${f}`))})}_process(t,r){this._numProcessing++,this._promiseBuffer.add(t).then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n===vi&&this.recordDroppedEvent("queue_overflow",r),n))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{let[o,i]=r.split(":");return{reason:o,category:i,quantity:n}})}_flushOutcomes(){C&&T.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){C&&T.log("No outcomes to send");return}if(!this._dsn){C&&T.log("No dsn provided, will not send outcomes");return}C&&T.log("Sending outcomes:",t);let r=ay(t,this._options.tunnel&&Bt(this._dsn));this.sendEnvelope(r)}};function Sy(e){return e==="replay_event"?"replay":e||"error"}function aw(e,t){let r=`${t} must return \`null\` or a valid event.`;if(Sr(e))return e.then(n=>{if(!Kt(n)&&n!==null)throw nc(r);return n},n=>{throw nc(`${t} rejected with ${n}`)});if(!Kt(e)&&e!==null)throw nc(r);return e}function lw(e,t,r,n){let{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,a=!Vl(t.beforeSendSpan)&&t.beforeSendSpan,l=r;if(wp(l)&&o)return o(l,n);if(Ey(l)){if(a||s){let c=ly(l);if(s?.length&&rn({description:c.description,op:c.op,attributes:c.data},s))return null;if(a){let d=a(c);d?l=Cn(r,cy(d)):$s()}if(l.spans){let d=[],u=l.spans;for(let f of u){if(s?.length&&rn({description:f.description,op:f.op,attributes:f.data},s)){kS(u,f);continue}if(a){let h=a(f);h?d.push(h):($s(),d.push(f))}else d.push(f)}let p=l.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),l.spans=d}}if(i){if(l.spans){let c=l.spans.length;l.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return i(l,n)}}return l}function wp(e){return e.type===void 0}function Ey(e){return e.type==="transaction"}function cw(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Ty(e.attributes)}function uw(e){let t=0;return e.message&&(t+=e.message.length*2),t+Ty(e.attributes)}function Ty(e){if(!e)return 0;let t=0;return Object.values(e).forEach(r=>{Array.isArray(r)?t+=r.length*yy(r[0]):kt(r)?t+=yy(r):t+=100}),t}function yy(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function xp(e,t){t.debug===!0&&(C?T.enable():qe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),U().update(t.initialScope);let n=new e(t);return Rp(n),n.init(),n}function Rp(e){U().setClient(e)}function Cp(e,t){let r=t?.getDsn(),n=t?.getOptions().tunnel;return pw(e,r)||dw(e,n)}function dw(e,t){return t?by(e)===by(t):!1}function pw(e,t){let r=Ur(e);return!r||bo(r)||!t?!1:fw(r.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(r.search)}function fw(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function by(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Np(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function na(e,t,r=[t],n="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=r.map(i=>({name:`${n}:@sentry/${i}`,version:Pr})),o.version=Pr)}function _i(e={}){let t=e.client||M();if(!Ks()||!t)return{};let r=Ut(),n=Dr(r);if(n.getTraceData)return n.getTraceData(e);let o=e.scope||U(),i=e.span||ie();if(!i&&Pl())return{};let s=i?Us(i):mw(o),a=i?De(i):di(t,o),l=ep(a);if(!zl.test(s))return T.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let d={"sentry-trace":s,baggage:l};return e.propagateTraceparent&&(d.traceparent=i?gS(i):hw(o)),d}function mw(e){let{traceId:t,sampled:r,propagationSpanId:n}=e.getPropagationContext();return Ls(t,n,r)}function hw(e){let{traceId:t,sampled:r,propagationSpanId:n}=e.getPropagationContext();return Os(t,n,r)}function Ap(e,t,r){let n,o,i,s=r?.maxWait?Math.max(r.maxWait,t):0,a=r?.setTimeoutImpl||setTimeout;function l(){return c(),n=e(),n}function c(){o!==void 0&&clearTimeout(o),i!==void 0&&clearTimeout(i),o=i=void 0}function d(){return o!==void 0||i!==void 0?l():n}function u(){return o&&clearTimeout(o),o=a(l,t),s&&i===void 0&&(i=a(l,s)),n}return u.cancel=c,u.flush=d,u}var gw=100;function Ht(e,t){let r=M(),n=ke();if(!r)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=gw}=r.getOptions();if(i<=0)return;let a={timestamp:It(),...e},l=o?qe(()=>o(a,t)):a;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,i))}var ky,Sw="FunctionToString",Iy=new WeakMap,yw=(()=>({name:Sw,setupOnce(){ky=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=xn(this),r=Iy.has(M())&&t!==void 0?t:this;return ky.apply(r,e)}}catch{}},setup(e){Iy.set(e,!0)}})),oc=yw;var vw=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],_w="EventFilters",Mp=(e={})=>{let t;return{name:_w,setup(r){let n=r.getOptions();t=wy(e,n)},processEvent(r,n,o){if(!t){let i=o.getOptions();t=wy(e,i)}return Ew(r,t)?null:r}}},sc=((e={})=>({...Mp(e),name:"InboundFilters"}));function wy(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:vw],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ew(e,t){if(e.type){if(e.type==="transaction"&&bw(e,t.ignoreTransactions))return C&&T.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
18
|
+
Event: ${vr(e)}`),!0}else{if(Tw(e,t.ignoreErrors))return C&&T.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
19
|
+
Event: ${vr(e)}`),!0;if(xw(e))return C&&T.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
20
|
+
Event: ${vr(e)}`),!0;if(kw(e,t.denyUrls))return C&&T.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
21
|
+
Event: ${vr(e)}.
|
|
22
|
+
Url: ${ic(e)}`),!0;if(!Iw(e,t.allowUrls))return C&&T.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
23
|
+
Event: ${vr(e)}.
|
|
24
|
+
Url: ${ic(e)}`),!0}return!1}function Tw(e,t){return t?.length?rc(e).some(r=>Ke(r,t)):!1}function bw(e,t){if(!t?.length)return!1;let r=e.transaction;return r?Ke(r,t):!1}function kw(e,t){if(!t?.length)return!1;let r=ic(e);return r?Ke(r,t):!1}function Iw(e,t){if(!t?.length)return!0;let r=ic(e);return r?Ke(r,t):!0}function ww(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function ic(e){try{let r=[...e.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?ww(r):null}catch{return C&&T.error(`Cannot extract url for event ${vr(e)}`),null}}function xw(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Op(e,t,r,n,o,i){if(!o.exception?.values||!i||!yr(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Lp(e,t,n,i.originalException,r,o.exception.values,s,0))}function Lp(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let l=[...i];if(yr(n[o],Error)){xy(s,a,n);let c=e(t,n[o]),d=l.length;Ry(c,o,d,a),l=Lp(e,t,r,n[o],o,[c,...l],c,d)}return Cy(n)&&n.errors.forEach((c,d)=>{if(yr(c,Error)){xy(s,a,n);let u=e(t,c),p=l.length;Ry(u,`errors[${d}]`,p,a),l=Lp(e,t,r,c,o,[u,...l],u,p)}}),l}function Cy(e){return Array.isArray(e.errors)}function xy(e,t,r){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Cy(r)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ry(e,t,r,n){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function Rw(e){return qt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ac(e){return Rw(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Ny=new Set([]);function Pp(e){let t="console",r=rt(t,e);return nt(t,Cw),r}function Cw(){"console"in O&&xl.forEach(function(e){e in O.console&&Ne(O.console,e,function(t){return fo[e]=t,function(...r){let n=r[0],o=fo[e],i=Ny.size&&typeof n=="string"&&Ke(n,Ny);i||Pe("console",{args:r,level:e}),(!i||C&&T.isEnabled())&&o?.apply(O.console,r)}})})}function Ei(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var Nw="Dedupe",Aw=(()=>{let e;return{name:Nw,processEvent(t){if(t.type)return t;try{if(Mw(t,e))return C&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),lc=Aw;function Mw(e,t){return t?!!(Lw(e,t)||Ow(e,t)):!1}function Lw(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Ly(e,t)||!My(e,t))}function Ow(e,t){let r=Ay(t),n=Ay(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Ly(e,t)||!My(e,t))}function My(e,t){let r=_s(e),n=_s(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Ly(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Ay(e){return e.exception?.values?.[0]}var Pw="ConversationId",Dw=(()=>({name:Pw,setup(e){e.on("spanStart",t=>{let r=U().getScopeData(),n=ke().getScopeData(),o=r.conversationId||n.conversationId;if(o){let{op:i,data:s,description:a}=B(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(Bl,o)}})}})),Dp=Dw;function Up(e,t,r,n,o){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=He()&&t(s);if(e.endTimestamp){let h=e.fetchData.__span;if(!h)return;let v=n[h];v&&(a&&(Bw(v,e),Uw(v,e,o)),delete n[h]);return}let{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof o=="object"?o:{spanOrigin:o},d=M(),p=!!ie()||!!d&&Je(d),f=a&&p?We(zw(s,i,l)):new Xe;if(a&&!p&&d?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,n[f.spanContext().spanId]=f,r(e.fetchData.url)){let h=e.args[0],v={...e.args[1]||{}},I=Py(h,v,He()&&p?f:void 0,c);I&&(e.args[1]=v,v.headers=I)}if(d){let h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",f,h)}return f}function Uw(e,t,r){(typeof r=="object"&&r!==null?r.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Py(e,t,r,n){let o=_i({span:r,propagateTraceparent:n}),i=o["sentry-trace"],s=o.baggage,a=o.traceparent;if(!i)return;let l=t.headers||(Is(e)?e.headers:void 0);if(l)if(Fw(l)){let c=new Headers(l);if(c.get("sentry-trace")||c.set("sentry-trace",i),n&&a&&!c.get("traceparent")&&c.set("traceparent",a),s){let d=c.get("baggage");d?cc(d)||c.set("baggage",`${d},${s}`):c.set("baggage",s)}return c}else if(Hw(l)){let c=[...l];c.find(u=>u[0]==="sentry-trace")||c.push(["sentry-trace",i]),n&&a&&!c.find(u=>u[0]==="traceparent")&&c.push(["traceparent",a]);let d=l.find(u=>u[0]==="baggage"&&typeof u[1]=="string"&&cc(u[1]));return s&&!d&&c.push(["baggage",s]),c}else{let c="sentry-trace"in l?l["sentry-trace"]:void 0,d="traceparent"in l?l.traceparent:void 0,u="baggage"in l?l.baggage:void 0,p=u?Array.isArray(u)?[...u]:[u]:[],f=u&&(Array.isArray(u)?u.find(v=>cc(v)):cc(u));s&&!f&&p.push(s);let h=Object.assign({},l,{"sentry-trace":c??i,baggage:p.length>0?p.join(","):void 0});return n&&a&&!d&&(h.traceparent=a),h}else return{...o}}function Bw(e,t){if(t.response){li(e,t.response.status);let r=t.response?.headers?.get("content-length");if(r){let n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}function cc(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Ms))}function Fw(e){return typeof Headers<"u"&&yr(e,Headers)}function Hw(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function zw(e,t,r){if(e.startsWith("data:")){let i=lt(e);return{name:`${t} ${i}`,attributes:Oy(e,void 0,t,r)}}let n=Ur(e),o=n?hi(n):e;return{name:`${t} ${o}`,attributes:Oy(e,n,t,r)}}function Oy(e,t,r,n){let o={url:lt(e),type:"fetch","http.method":r,[Z]:n,[_e]:"http.client"};return t&&(bo(t)||(o["http.url"]=lt(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function uc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var oa=O;function Bp(){return"history"in oa&&!!oa.history}function $w(){if(!("fetch"in oa))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function ia(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fp(){if(typeof EdgeRuntime=="string")return!0;if(!$w())return!1;if(ia(oa.fetch))return!0;let e=!1,t=oa.document;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow?.fetch&&(e=ia(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){C&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function On(e,t){let r="fetch",n=rt(r,e);return nt(r,()=>Uy(void 0,t)),n}function pc(e){let t="fetch-body-resolved",r=rt(t,e);return nt(t,()=>Uy(jw)),r}function Uy(e,t=!1){t&&!Fp()||Ne(O,"fetch",function(r){return function(...n){let o=new Error,{method:i,url:s}=Gw(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:ne()*1e3,virtualError:o,headers:Vw(n)};return e||Pe("fetch",{...a}),r.apply(O,n).then(async l=>(e?e(l):Pe("fetch",{...a,endTimestamp:ne()*1e3,response:l}),l),l=>{Pe("fetch",{...a,endTimestamp:ne()*1e3,error:l}),qt(l)&&l.stack===void 0&&(l.stack=o.stack,ve(l,"framesToPop",1));let d=M()?.getOptions().enhanceFetchErrorMessages??"always";if(d!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{let f=new URL(a.fetchData.url).host;d==="always"?l.message=`${l.message} (${f})`:ve(l,"__sentry_fetch_url_host__",f)}catch{}throw l})}})}async function Ww(e,t){if(e?.body){let r=e.body,n=r.getReader(),o=setTimeout(()=>{r.cancel().then(null,()=>{})},90*1e3),i=!0;for(;i;){let s;try{s=setTimeout(()=>{r.cancel().then(null,()=>{})},5e3);let{done:a}=await n.read();clearTimeout(s),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),n.releaseLock(),r.cancel().then(null,()=>{})}}function jw(e){let t;try{t=e.clone()}catch{return}Ww(t,()=>{Pe("fetch-body-resolved",{endTimestamp:ne()*1e3,response:e})})}function dc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Dy(e){return typeof e=="string"?e:e?dc(e,"url")?e.url:e.toString?e.toString():"":""}function Gw(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[r,n]=e;return{url:Dy(r),method:dc(n,"method")?String(n.method).toUpperCase():Is(r)&&dc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Dy(t),method:dc(t,"method")?String(t.method).toUpperCase():"GET"}}function Vw(e){let[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(Is(t))return new Headers(t.headers)}catch{}}var By=O;function Ct(){try{return By.document.location.href}catch{return""}}function Ti(e,t=5){if(!By.HTMLElement)return null;let r=e;for(let n=0;n<t;n++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}var D=O,Hp=0;function zp(){return Hp>0}function wx(){Hp++,setTimeout(()=>{Hp--})}function Co(e,t={}){function r(o){return typeof o=="function"}if(!r(e))return e;try{let o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(xn(e))return e}catch{return e}let n=function(...o){O._sentryWrappedDepth=(O._sentryWrappedDepth||0)+1;try{let i=o.map(s=>Co(s,t));return e.apply(this,i)}catch(i){throw wx(),Zt(s=>{s.addEventProcessor(a=>(t.mechanism&&(So(a,void 0,void 0),Jt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),nn(i)}),i}finally{O._sentryWrappedDepth=(O._sentryWrappedDepth||0)-1}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}ws(n,e),ve(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}function bi(){let e=Ct(),{referrer:t}=D.document||{},{userAgent:r}=D.navigator||{},n={...t&&{Referer:t},...r&&{"User-Agent":r}};return{url:e,headers:n}}function fc(e,t){let r=mc(e,t),n={type:Ax(t),value:Mx(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function xx(e,t,r,n){let i=M()?.getOptions().normalizeDepth,s=Px(t),a={__serialized__:Rs(t,i)};if(s)return{exception:{values:[fc(e,s)]},extra:a};let l={exception:{values:[{type:wn(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Lx(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=mc(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function $p(e,t){return{exception:{values:[fc(e,t)]}}}function mc(e,t){let r=t.stacktrace||t.stack||"",n=Cx(t),o=Nx(t);try{return e(r,n,o)}catch{}return[]}var Rx=/Minified React error #\d+;/i;function Cx(e){return e&&Rx.test(e.message)?1:0}function Nx(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function rv(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Ax(e){let t=e?.name;return!t&&rv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Mx(e){let t=e?.message;return rv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?ac(t.error):ac(e):"No error message"}function nv(e,t,r,n){let o=r?.syntheticException||void 0,i=hc(e,t,o,n);return Jt(i),i.level="error",r?.event_id&&(i.event_id=r.event_id),Br(i)}function ov(e,t,r="info",n,o){let i=n?.syntheticException||void 0,s=Wp(e,t,i,o);return s.level=r,n?.event_id&&(s.event_id=n.event_id),Br(s)}function hc(e,t,r,n,o){let i;if(ri(t)&&t.error)return $p(e,t.error);if(ks(t)||Nl(t)){let s=t;if("stack"in t){i=$p(e,t);let a=i.exception?.values?.[0];if(n&&r&&a&&!a.stacktrace){let l=mc(e,r);l.length&&(a.stacktrace={frames:l},Jt(i,{synthetic:!0}))}}else{let a=s.name||(ks(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;i=Wp(e,l,r,n),So(i,l)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return qt(t)?$p(e,t):Kt(t)||wn(t)?(i=xx(e,t,r,o),Jt(i,{synthetic:!0}),i):(i=Wp(e,t,r,n),So(i,`${t}`,void 0),Jt(i,{synthetic:!0}),i)}function Wp(e,t,r,n){let o={};if(n&&r){let i=mc(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Jt(o,{synthetic:!0})}if(In(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function Lx(e,{isUnhandledRejection:t}){let r=Ml(e),n=t?"promise rejection":"exception";return ri(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:wn(e)?`Event \`${Ox(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Ox(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Px(e){return Object.values(e).find(t=>t instanceof Error)}var gc=class extends ra{constructor(t){let r=Dx(t),n=D.SENTRY_SDK_SOURCE||bp();na(r,"browser",["browser"],n),super(r);let{userInfo:o}=this.getDataCollectionOptions();r._metadata?.sdk&&(r._metadata.sdk.settings={infer_ip:o?"auto":"never",...r._metadata.sdk.settings});let{sendClientReports:i,enableLogs:s,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;D.document&&(i||s||c)&&D.document.addEventListener("visibilitychange",()=>{D.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&yi(this),c&&Zs(this))}),o&&this.on("beforeSendSession",Np)}eventFromException(t,r){return nv(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return ov(this._options.stackParser,t,r,n,this._options.attachStacktrace)}_prepareEvent(t,r,n,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n,o)}};function Dx(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:D.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var P=O;var Ux=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Fr=(e,t,r,n)=>{let o,i;return s=>{t.value>=0&&(s||n)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=Ux(t.value,r),e(t)))}};var sn=(e=!0)=>{let t=P.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var tr=()=>sn()?.activationStart??0;function rr(e,t,r){P.document&&P.addEventListener(e,t,r)}function No(e,t,r){P.document&&P.removeEventListener(e,t,r)}var ki=-1,iv=new Set,Bx=()=>P.document?.visibilityState==="hidden"&&!P.document?.prerendering?0:1/0,Sc=e=>{if(Fx(e)&&ki>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of iv)t();isFinite(ki)||(ki=e.type==="visibilitychange"?e.timeStamp:0,No("prerenderingchange",Sc,!0))}},Hr=()=>{if(P.document&&ki<0){let e=tr();ki=(P.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>e)[0]?.startTime)??Bx(),rr("visibilitychange",Sc,!0),rr("pagehide",Sc,!0),rr("prerenderingchange",Sc,!0)}return{get firstHiddenTime(){return ki},onHidden(e){iv.add(e)}}};function Fx(e){return e.type==="pagehide"||P.document?.visibilityState==="hidden"}var sv=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var zr=(e,t=-1)=>{let r=sn(),n="navigate";return r&&(P.document?.prerendering||tr()>0?n="prerender":P.document?.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:sv(),navigationType:n}};var jp=new WeakMap;function Ii(e,t){try{return jp.get(e)||jp.set(e,new t),jp.get(e)}catch{return new t}}var yc=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;let r=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}};var nr=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}};var wi=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var Dn=e=>{P.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var Hx=[1800,3e3],av=(e,t={})=>{Dn(()=>{let r=Hr(),n=zr("FCP"),o,s=nr("paint",a=>{for(let l of a)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<r.firstHiddenTime&&(n.value=Math.max(l.startTime-tr(),0),n.entries.push(l),o(!0)))});s&&(o=Fr(e,n,Hx,t.reportAllChanges))})};var zx=[.1,.25],lv=(e,t={})=>{av(wi(()=>{let r=zr("CLS",0),n,o=Hr(),i=Ii(t,yc),s=l=>{for(let c of l)i._processEntry(c);i._sessionValue>r.value&&(r.value=i._sessionValue,r.entries=i._sessionEntries,n())},a=nr("layout-shift",s);a&&(n=Fr(e,r,zx,t.reportAllChanges),o.onHidden(()=>{s(a.takeRecords()),n(!0)}),P?.setTimeout?.(n))}))};var cv=0,Gp=1/0,vc=0,$x=e=>{e.forEach(t=>{t.interactionId&&(Gp=Math.min(Gp,t.interactionId),vc=Math.max(vc,t.interactionId),cv=vc?(vc-Gp)/7+1:0)})},Vp,Yp=()=>Vp?cv:performance.interactionCount||0,uv=()=>{"interactionCount"in performance||Vp||(Vp=nr("event",$x,{type:"event",buffered:!0,durationThreshold:0}))};var qp=10,dv=0,Wx=()=>Yp()-dv,_c=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){dv=Yp(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor(Wx()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;let r=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(t.interactionId);if(n||this._longestInteractionList.length<qp||t.duration>r._latency){if(n?t.duration>n._latency?(n.entries=[t],n._latency=t.duration):t.duration===n._latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>qp){let o=this._longestInteractionList.splice(qp);for(let i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(n)}}};var Ec=e=>{let t=P.requestIdleCallback||P.setTimeout;P.document?.visibilityState==="hidden"?e():(e=wi(e),rr("visibilitychange",e,{once:!0,capture:!0}),rr("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),No("visibilitychange",e,{capture:!0}),No("pagehide",e,{capture:!0})}))};var jx=[200,500],Gx=40,pv=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let r=Hr();Dn(()=>{uv();let n=zr("INP"),o,i=Ii(t,_c),s=l=>{Ec(()=>{for(let d of l)i._processEntry(d);let c=i._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,o())})},a=nr("event",s,{durationThreshold:t.durationThreshold??Gx});o=Fr(e,n,jx,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{s(a.takeRecords()),o(!0)}))})};var Tc=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var Vx=[2500,4e3],fv=(e,t={})=>{Dn(()=>{let r=Hr(),n=zr("LCP"),o,i=Ii(t,Tc),s=l=>{t.reportAllChanges||(l=l.slice(-1));for(let c of l)i._processEntry(c),c.startTime<r.firstHiddenTime&&(n.value=Math.max(c.startTime-tr(),0),n.entries=[c],o())},a=nr("largest-contentful-paint",s);if(a){o=Fr(e,n,Vx,t.reportAllChanges);let l=wi(()=>{s(a.takeRecords()),a.disconnect(),o(!0)}),c=d=>{d.isTrusted&&(Ec(l),No(d.type,c,{capture:!0}))};for(let d of["keydown","click","visibilitychange"])rr(d,c,{capture:!0})}})};var Yx=[800,1800],Kp=e=>{P.document?.prerendering?Dn(()=>Kp(e)):P.document?.readyState!=="complete"?addEventListener("load",()=>Kp(e),!0):setTimeout(e)},mv=(e,t={})=>{let r=zr("TTFB"),n=Fr(e,r,Yx,t.reportAllChanges);Kp(()=>{let o=sn();o&&(r.value=Math.max(o.responseStart-tr(),0),r.entries=[o],n(!0))})};var sa={},bc={},hv,gv,Sv,yv;function an(e,t=!1){return kc("cls",e,qx,hv,t)}function ln(e,t=!1){return kc("lcp",e,Kx,gv,t)}function Xp(e){return kc("ttfb",e,Xx,Sv)}function Ao(e){return kc("inp",e,Jx,yv)}function Tr(e,t){return vv(e,t),bc[e]||(Zx(e),bc[e]=!0),_v(e,t)}function aa(e,t){let r=sa[e];if(r?.length)for(let n of r)try{n(t)}catch(o){je&&T.error(`Error while triggering instrumentation handler.
|
|
25
25
|
Type: ${e}
|
|
26
|
-
Name: ${
|
|
27
|
-
Error:`,o)}}function Yk(){return lv(e=>{aa("cls",{metric:e}),hv=e},{reportAllChanges:!0})}function qk(){return fv(e=>{aa("lcp",{metric:e}),gv=e},{reportAllChanges:!0})}function Kk(){return mv(e=>{aa("ttfb",{metric:e}),Sv=e})}function Xk(){return pv(e=>{aa("inp",{metric:e}),yv=e})}function Ic(e,t,r,n,o=!1){vv(e,t);let i;return bc[e]||(i=r(),bc[e]=!0),n&&t({metric:n}),_v(e,t,o?i:void 0)}function Jk(e){let t={};e==="event"&&(t.durationThreshold=0),nr(e,r=>{aa(e,{entries:r})},t)}function vv(e,t){sa[e]=sa[e]||[],sa[e].push(t)}function _v(e,t,r){return()=>{r&&r();let n=sa[e];if(!n)return;let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}function Ev(e){return"duration"in e}var Qk=80;function le(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,o=[],i=0,s=0,a=" > ",l=a.length,c,u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Qk;for(;r&&i++<n&&(c=Zk(r,u),!(c==="html"||i>1&&s+o.length*l+c.length>=d));)o.push(c),s+=c.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Zk(e,t){let r=e,n=[];if(!r?.tagName)return"";if(typeof HTMLElement<"u"&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let o=t?.length?t.filter(i=>r.getAttribute(i)).map(i=>[i,r.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{n.push(`[${i[0]}="${i[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let i=r.className;if(i&&nt(i)){let s=i.split(/\s+/);for(let a of s)n.push(`.${a}`)}}for(let i of["aria-label","type","name","title","alt"]){let s=r.getAttribute(i);s&&n.push(`[${i}="${s}"]`)}return n.join("")}var Tv=e=>{let t=r=>{(r.type==="pagehide"||O.document?.visibilityState==="hidden")&&e(r)};rr("visibilitychange",t,{capture:!0,once:!0}),rr("pagehide",t,{capture:!0,once:!0})};function xc(e){return typeof e=="number"&&isFinite(e)}function ln(e,t,r,{...n}){let o=B(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),pi(e,()=>{let i=je({startTime:t,...n});return i&&i.end(r),i})}function ki(e){let t=M();if(!t)return;let{name:r,transaction:n,attributes:o,startTime:i}=e,{release:s,environment:a}=t.getOptions(),{userInfo:l}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),d=U(),p=d.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0,h;try{h=d.getScopeData().contexts.profile.profile_id}catch{}let y={release:s,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:u||void 0,transaction:n,"user_agent.original":O.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...o};return je({name:r,attributes:y,startTime:i,experimental:{standalone:!0}})}function cn(){return O.addEventListener&&O.performance}function se(e){return e/1e3}function bv(e){let t="unknown",r="unknown",n="";for(let o of e){if(o==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(o))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=o}return n===e&&(t=n),{name:t,version:r}}function Ao(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Mo(e,t){let r,n=!1;function o(a){!n&&r&&t(a,r.spanContext().spanId,r),n=!0}Tv(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",a=>{r=a,s()})}function Iv(e){let t=0,r;if(!Ao("layout-shift"))return;let n=sn(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Mo(e,(o,i)=>{ew(t,r,i,o),n()})}function ew(e,t,r,n){We&&T.log(`Sending CLS span (${e})`);let o=t?se((ue()||0)+t.startTime):ne(),i=U().getScopeData().transactionName,s=t?le(t.sources[0]?.node):"Layout shift",a={[J]:"auto.http.browser.cls",[_e]:"ui.webvital.cls",[st]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t?.sources&&t.sources.forEach((c,u)=>{a[`cls.source.${u+1}`]=le(c.node)});let l=ki({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("cls",{[vr]:"",[_r]:e}),l.end(o))}var tw=6e4;function Lo(e){return e!=null&&e>0&&e<=tw}function xv(e){let t=0,r;if(!Ao("largest-contentful-paint"))return;let n=an(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Lo(o.value)||(t=o.value,r=i)},!0);Mo(e,(o,i)=>{rw(t,r,i,o),n()})}function rw(e,t,r,n){if(!Lo(e))return;We&&T.log(`Sending LCP span (${e})`);let o=se((ue()||0)+(t?.startTime||0)),i=U().getScopeData().transactionName,s=t?le(t.element):"Largest contentful paint",a={[J]:"auto.http.browser.lcp",[_e]:"ui.webvital.lcp",[st]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t&&(t.element&&(a["lcp.element"]=le(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));let l=ki({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("lcp",{[vr]:"millisecond",[_r]:e}),l.end(o))}function or(e){return e&&((ue()||performance.timeOrigin)+e)/1e3}function la(e){let t={};if(e.nextHopProtocol!=null){let{name:r,version:n}=bv(e.nextHopProtocol);t["network.protocol.version"]=n,t["network.protocol.name"]=r}return ue()||cn()?.timeOrigin?nw({...t,"http.request.redirect_start":or(e.redirectStart),"http.request.redirect_end":or(e.redirectEnd),"http.request.worker_start":or(e.workerStart),"http.request.fetch_start":or(e.fetchStart),"http.request.domain_lookup_start":or(e.domainLookupStart),"http.request.domain_lookup_end":or(e.domainLookupEnd),"http.request.connect_start":or(e.connectStart),"http.request.secure_connection_start":or(e.secureConnectionStart),"http.request.connection_end":or(e.connectEnd),"http.request.request_start":or(e.requestStart),"http.request.response_start":or(e.responseStart),"http.request.response_end":or(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function nw(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var ow=2147483647,kv=0,gt={},Nt,wc;function Jp({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:r}){let n=cn();if(n&&ue()){n.mark&&O.performance.mark("sentry-tracing-init");let o=t?xv(r):t===!1?sw():void 0,i=e?Iv(r):e===!1?iw():void 0,s=aw();return()=>{s(),o?.(),i?.()}}return()=>{}}function Qp(){Er("longtask",({entries:e})=>{let t=ie();if(!t)return;let{op:r,start_timestamp:n}=B(t);for(let o of e){let i=se(ue()+o.startTime),s=se(o.duration);r==="navigation"&&n&&i<n||ln(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[J]:"auto.ui.browser.metrics"}})}})}function Zp(){new PerformanceObserver(t=>{let r=ie();if(r)for(let n of t.getEntries()){if(!n.scripts[0])continue;let o=se(ue()+n.startTime),{start_timestamp:i,op:s}=B(r);if(s==="navigation"&&i&&o<i)continue;let a=se(n.duration),l={[J]:"auto.ui.browser.metrics"},c=n.scripts[0],{invoker:u,invokerType:d,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=c;l["browser.script.invoker"]=u,l["browser.script.invoker_type"]=d,p&&(l["code.filepath"]=p),f&&(l["code.function"]=f),h!==-1&&(l["browser.script.source_char_position"]=h),ln(r,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function ef(){Er("event",({entries:e})=>{let t=ie();if(t){for(let r of e)if(r.name==="click"){let n=se(ue()+r.startTime),o=se(r.duration),i={name:le(r.target),op:`ui.interaction.${r.name}`,startTime:n,attributes:{[J]:"auto.ui.browser.metrics"}},s=Ei(r.target);s&&(i.attributes["ui.component_name"]=s),ln(t,n,n+o,i)}}})}function iw(){return sn(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(gt.cls={value:e.value,unit:""},wc=t)},!0)}function sw(){return an(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!Lo(e.value)||(gt.lcp={value:e.value,unit:"millisecond"},Nt=t)},!0)}function aw(){return Xp(({metric:e})=>{e.entries[e.entries.length-1]&&(gt.ttfb={value:e.value,unit:"millisecond"})})}function tf(e,t){let r=cn(),n=ue();if(!r?.getEntries||!n)return;let{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:l}=t,c=se(n),u=r.getEntries(),{op:d,start_timestamp:p}=B(e);if(u.slice(kv).forEach(f=>{let h=se(f.startTime),y=se(Math.max(0,f.duration));if(!(d==="navigation"&&p&&c+h<p))switch(f.entryType){case"navigation":{dw(e,f,c);break}case"mark":case"paint":case"measure":{cw(e,f,h,y,c,i);let E=Fr(),m=f.startTime<E.firstHiddenTime;f.name==="first-paint"&&m&&(gt.fp={value:f.startTime,unit:"millisecond"}),f.name==="first-contentful-paint"&&m&&(gt.fcp={value:f.startTime,unit:"millisecond"});break}case"resource":{mw(e,f,f.name,h,y,c,s);break}}}),kv=Math.max(u.length-1,0),hw(e,o),d==="pageload"){if(yw(gt),o){let f=(h,y,E)=>{let m=E??`browser.web_vital.${h}.value`;e.setAttribute(m,y),We&&T.log("Setting web vital attribute",{[m]:y},"on pageload span")};["ttfb","fp","fcp"].forEach(h=>{gt[h]&&f(h,gt[h].value)}),gt["ttfb.requestTime"]&&f("ttfb.requestTime",gt["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete gt.cls,l||delete gt.lcp,Object.entries(gt).forEach(([f,h])=>{Kl(f,h.value,h.unit)}),gw(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",tr())}Nt=void 0,wc=void 0,gt={}}function lw(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function cw(e,t,r,n,o,i){if(lw(t)||["mark","measure"].includes(t.entryType)&&Ke(t.name,i))return;let s=on(!1),a=se(s?s.requestStart:0),l=o+Math.max(r,a),c=o+r,u=c+n,d={[J]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),uw(d,t),l<=u&&ln(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function uw(e,t){try{let r=t.detail;if(!r)return;if(typeof r=="object"){for(let[n,o]of Object.entries(r))if(o&&bt(o))e[`sentry.browser.measure.detail.${n}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${n}`]=JSON.stringify(o)}catch{}return}if(bt(r)){e["sentry.browser.measure.detail"]=r;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(r)}catch{}}catch{}}function dw(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{kc(e,t,n,r)}),kc(e,t,"secureConnection",r,"TLS/SSL"),kc(e,t,"fetch",r,"cache"),kc(e,t,"domainLookup",r,"DNS"),fw(e,t,r)}function kc(e,t,r,n,o=r){let i=pw(r),s=t[i],a=t[`${r}Start`];!a||!s||ln(e,n+se(a),n+se(s),{op:`browser.${o}`,name:t.name,attributes:{[J]:"auto.ui.browser.metrics",...r==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function pw(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function fw(e,t,r){let n=r+se(t.requestStart),o=r+se(t.responseEnd),i=r+se(t.responseStart);t.responseEnd&&(ln(e,n,o,{op:"browser.request",name:t.name,attributes:{[J]:"auto.ui.browser.metrics"}}),ln(e,i,o,{op:"browser.response",name:t.name,attributes:{[J]:"auto.ui.browser.metrics"}}))}function mw(e,t,r,n,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;let l={[J]:"auto.resource.browser.metrics"},c=Zt(r);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=r.includes(O.location.origin),Sw(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let u={...l,...la(t)},d=i+n,p=d+o;ln(e,d,p,{name:r.replace(O.location.origin,""),op:a,attributes:u})}function hw(e,t){let r=O.navigator;if(!r)return;let n=r.connection;n&&(n.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute(t?"network.connection.type":"connectionType",n.type),xc(n.rtt)&&(gt["connection.rtt"]={value:n.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",n.rtt))),xc(r.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",r.deviceMemory):e.setAttribute("deviceMemory",`${r.deviceMemory} GB`)),xc(r.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",r.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(r.hardwareConcurrency)))}function gw(e,t){Nt&&t.recordLcpOnPageloadSpan&&(Nt.element&&e.setAttribute("lcp.element",le(Nt.element)),Nt.id&&e.setAttribute("lcp.id",Nt.id),Nt.url&&e.setAttribute("lcp.url",Nt.url.trim().slice(0,200)),Nt.loadTime!=null&&e.setAttribute("lcp.loadTime",Nt.loadTime),Nt.renderTime!=null&&e.setAttribute("lcp.renderTime",Nt.renderTime),e.setAttribute("lcp.size",Nt.size)),wc?.sources&&t.recordClsOnPageloadSpan&&wc.sources.forEach((r,n)=>e.setAttribute(`cls.source.${n+1}`,le(r.node)))}function Sw(e,t,r){r.forEach(([n,o])=>{let i=e[n];i!=null&&(typeof i=="number"&&i<ow||typeof i=="string")&&(t[o]=i)})}function yw(e){let t=on(!1);if(!t)return;let{responseStart:r,requestStart:n}=t;n<=r&&(e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}var rf=[],ca=new Map,wi=new Map,nf=60;function of(){if(cn()&&ue()){let t=vw();return()=>{t()}}return()=>{}}var Ri={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function vw(){return Co(_w)}var _w=({metric:e})=>{if(e.value==null)return;let t=se(e.value);if(t>nf)return;let r=e.entries.find(h=>h.duration===e.value&&Ri[h.name]);if(!r)return;let{interactionId:n}=r,o=Ri[r.name],i=se(ue()+r.startTime),s=ie(),a=s?te(s):void 0,l=n!=null?ca.get(n):void 0,c=l?.span||a,u=c?B(c).description:U().getScopeData().transactionName,d=l?.elementName||le(r.target),p={[J]:"auto.http.browser.inp",[_e]:`ui.interaction.${o}`,[st]:r.duration},f=ki({name:d,transaction:u,attributes:p,startTime:i});f&&(f.addEvent("inp",{[vr]:"millisecond",[_r]:e.value}),f.end(i+t))};function wv(e){return e!=null?ca.get(e):void 0}function sf(){let e=Object.keys(Ri);er()&&e.forEach(o=>{O.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){let i=o.target;if(!i)return;let s=le(i),a=Math.round(o.timeStamp);if(wi.set(a,s),wi.size>50){let l=wi.keys().next().value;l!==void 0&&wi.delete(l)}}function r(o){let i=Math.round(o.startTime),s=wi.get(i);if(!s)for(let a=-5;a<=5;a++){let l=wi.get(i+a);if(l){s=l;break}}return s||"<unknown>"}let n=({entries:o})=>{let i=ie(),s=i&&te(i);o.forEach(a=>{if(!Ev(a))return;let l=a.interactionId;if(l==null||ca.has(l))return;let c=a.target?le(a.target):r(a);if(rf.length>10){let u=rf.shift();ca.delete(u)}rf.push(l),ca.set(l,{span:s,elementName:c})})};Er("event",n),Er("first-input",n)}function af(e){let{name:t,op:r,origin:n,metricName:o,value:i,attributes:s,parentSpan:a,reportEvent:l,startTime:c,endTime:u}=e,d=U().getScopeData().transactionName,p={[J]:n,[_e]:r,[st]:0,[`browser.web_vital.${o}.value`]:i,"sentry.transaction":d,"user_agent.original":O.navigator?.userAgent,...s};a&&Fs(a).attributes?.[_e]==="pageload"&&(p["sentry.pageload.span_id"]=a.spanContext().spanId),l&&(p[`browser.web_vital.${o}.report_event`]=l);let f=je({name:t,attributes:p,startTime:c,parentSpan:a});f&&f.end(u??c)}function lf(e){let t=0,r;if(!Ao("largest-contentful-paint"))return;let n=an(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Lo(o.value)||(t=o.value,r=i)},!0);Mo(e,(o,i,s)=>{Ew(t,r,s,o),n()})}function Ew(e,t,r,n){if(!Lo(e))return;We&&T.log(`Sending LCP span (${e})`);let o=ue()||0,i=se(o),s=se(o+(t?.startTime||0)),a=t?le(t.element):"Largest contentful paint",l={};t?.element&&(l["browser.web_vital.lcp.element"]=le(t.element)),t?.id&&(l["browser.web_vital.lcp.id"]=t.id),t?.url&&(l["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(l["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(l["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(l["browser.web_vital.lcp.size"]=t.size),af({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:l,parentSpan:r,reportEvent:n,startTime:i,endTime:s})}function cf(e){let t=0,r;if(!Ao("layout-shift"))return;let n=sn(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Mo(e,(o,i,s)=>{Tw(t,r,s,o),n()})}function Tw(e,t,r,n){We&&T.log(`Sending CLS span (${e})`);let o=t?se((ue()||0)+t.startTime):ne(),i=t?le(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,l)=>{s[`browser.web_vital.cls.source.${l+1}`]=le(a.node)}),af({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:r,reportEvent:n,startTime:o})}function uf(){if(!cn()||!ue())return;Co(({metric:r})=>{if(r.value==null||se(r.value)>nf)return;let o=r.entries.find(i=>i.duration===r.value&&Ri[i.name]);o&&bw(r.value,o)})}function bw(e,t){We&&T.log(`Sending INP span (${e})`);let r=se(ue()+t.startTime),n=se(e),o=Ri[t.name],i=wv(t.interactionId),s=ie(),a=s?te(s):void 0,l=i?.span||a,c=l?Fs(l).name:U().getScopeData().transactionName,u=i?.elementName||le(t.target);af({name:u,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[st]:t.duration,"sentry.transaction":c},startTime:r,endTime:r+n,parentSpan:l})}var Iw=1e3,Rv,df,pf;function ua(e){tt("dom",e),rt("dom",xw)}function xw(){if(!O.document)return;let e=Oe.bind(null,"dom"),t=Nv(e,!0);O.document.addEventListener("click",t,!1),O.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let o=O[r]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ne(o,"addEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[s]=c[s]||{refCount:0};if(!u.handler){let d=Nv(e);u.handler=d,i.call(this,s,d,l)}u.refCount++}catch{}return i.call(this,s,a,l)}}),Ne(o,"removeEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__||{},u=c[s];u&&(u.refCount--,u.refCount<=0&&(i.call(this,s,u.handler,l),u.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,l)}}))})}function kw(e){if(e.type!==df)return!1;try{if(!e.target||e.target._sentryId!==pf)return!1}catch{}return!0}function ww(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Nv(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Rw(r);if(ww(r.type,n))return;ve(r,"_sentryCaptured",!0),n&&!n._sentryId&&ve(n,"_sentryId",Ce());let o=r.type==="keypress"?"input":r.type;kw(r)||(e({event:r,name:o,global:t}),df=r.type,pf=n?n._sentryId:void 0),clearTimeout(Rv),Rv=O.setTimeout(()=>{pf=void 0,df=void 0},Iw)}}function Rw(e){try{return e.target}catch{return null}}var Rc;function un(e){let t="history";tt(t,e),rt(t,Nw)}function Nw(){if(O.addEventListener("popstate",()=>{let t=O.location.href,r=Rc;if(Rc=t,r===t)return;Oe("history",{from:r,to:t})}),!Bp())return;function e(t){return function(...r){let n=r.length>2?r[2]:void 0;if(n){let o=Rc,i=Cw(String(n));if(Rc=i,o===i)return t.apply(this,r);Oe("history",{from:o,to:i})}return t.apply(this,r)}}Ne(O.history,"pushState",e),Ne(O.history,"replaceState",e)}function Cw(e){try{return new URL(e,O.location.origin).toString()}catch{return e}}var Nc={};function Cc(e){let t=Nc[e];if(t)return t;let r=O[e];if(ia(r))return Nc[e]=r.bind(O);let n=O.document;if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i?.[e]&&(r=i[e]),n.head.removeChild(o)}catch(o){We&&T.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Nc[e]=r.bind(O))}function ff(e){Nc[e]=void 0}function Oo(...e){return Cc("setTimeout")(...e)}var Tr="__sentry_xhr_v3__";function da(e){tt("xhr",e),rt("xhr",Aw)}function Aw(){if(!O.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){let o=new Error,i=ne()*1e3,s=nt(n[0])?n[0].toUpperCase():void 0,a=Mw(n[1]);if(!s||!a)return t.apply(r,n);r[Tr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);let l=()=>{let c=r[Tr];if(c&&r.readyState===4){try{c.status_code=r.status}catch{}let u={endTimestamp:ne()*1e3,startTimestamp:i,xhr:r,virtualError:o};Oe("xhr",u)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(c,u,d){let[p,f]=d,h=u[Tr];return h&&nt(p)&&nt(f)&&(h.request_headers[p.toLowerCase()]=f),c.apply(u,d)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){let o=r[Tr];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);let i={startTimestamp:ne()*1e3,xhr:r};return Oe("xhr",i),t.apply(r,n)}})}function Mw(e){if(nt(e))return e;try{return e.toString()}catch{}}var Lw=Symbol.for("sentry__originalRequestBody");function Ac(e){return new URLSearchParams(e).toString()}function Mc(e,t=T){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ac(e)];if(!e)return[void 0]}catch(r){return We&&t.error(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return We&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Lc(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let r=e[0][Lw];return r!==void 0?r:void 0}}function pa(e){let t;try{t=e.getAllResponseHeaders()}catch(r){return We&&T.error(r,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
28
|
-
`).reduce((r,n)=>{let[o,i]=n.split(": ");return i&&(r[o.toLowerCase()]=i),r},{}):{}}function mf(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}var Ow=40;function Cv(e,t=Cc("fetch")){let r=0,n=0;async function o(i){let s=i.body.length;r+=s,n++;let a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{let l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw ff("fetch"),l}finally{r-=s,n--}}return tc(e,o,wo(e.bufferSize||Ow))}var xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Dw=30;var Pw=50;function hf(e,t,r,n){let o={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var Uw=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Bw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fw=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hw=/at (.+?) ?\(data:(.+?),/,zw=e=>{let t=e.match(Hw);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let r=Uw.exec(e);if(r){let[,o,i,s]=r;return hf(o,"?",+i,+s)}let n=Bw.exec(e);if(n){if(n[2]?.indexOf("eval")===0){let a=Fw.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[i,s]=Mv(n[1]||"?",n[2]);return hf(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},$w=[Dw,zw],jw=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ww=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Gw=e=>{let t=jw.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=Ww.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],o=t[1]||"?";return[o,n]=Mv(o,n),hf(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Vw=[Pw,Gw];var Yw=[$w,Vw],Av=vs(...Yw),Mv=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Oc=1024,qw="Breadcrumbs",Kw=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:qw,setup(r){t.console&&Dp(Qw(r)),t.dom&&ua(Jw(r,t.dom)),t.xhr&&da(Zw(r)),t.fetch&&Ln(eR(r)),t.history&&un(tR(r)),t.sentry&&r.on("beforeSendEvent",Xw(r))}}}),Lv=Kw;function Xw(e){return function(r){M()===e&&Ht({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:yr(r)},{event:r})}}function Jw(e,t){return function(n){if(M()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Oc&&(xe&&T.warn(`\`dom.maxStringLength\` cannot exceed ${Oc}, but a value of ${a} was configured. Sentry will use ${Oc} instead.`),a=Oc),typeof s=="string"&&(s=[s]);try{let c=n.event,u=rR(c)?c.target:c;o=le(u,{keyAttrs:s,maxStringLength:a}),i=Ei(u)}catch{o="<unknown>"}if(o.length===0)return;let l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),Ht(l,{event:n.event,name:n.name,global:n.global})}}function Qw(e){return function(r){if(M()!==e)return;let n={category:"console",data:{arguments:r.args,logger:"console"},level:_i(r.level),message:Ns(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Ns(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Ht(n,{input:r.args,level:r.level})}}function Zw(e){return function(r){if(M()!==e)return;let{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[Tr];if(!n||!o||!i)return;let{method:s,url:a,status_code:l,body:c}=i,u={method:s,url:a,status_code:l},d={xhr:r.xhr,input:c,startTimestamp:n,endTimestamp:o},p={category:"xhr",data:u,type:"http",level:uc(l)};e.emit("beforeOutgoingRequestBreadcrumb",p,d),Ht(p,d)}}function eR(e){return function(r){if(M()!==e)return;let{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){let i={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o},s={category:"fetch",data:r.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,i),Ht(s,i)}else{let i=r.response,s={...r.fetchData,status_code:i?.status},a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},l={category:"fetch",data:s,type:"http",level:uc(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Ht(l,a)}}}function tR(e){return function(r){if(M()!==e)return;let n=r.from,o=r.to,i=Zt(P.location.href),s=n?Zt(n):void 0,a=Zt(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Ht({category:"navigation",data:{from:n,to:o}})}}function rR(e){return!!e&&!!e.target}var nR="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),oR="BrowserApiErrors",iR=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:oR,setupOnce(){t.setTimeout&&Ne(P,"setTimeout",Ov),t.setInterval&&Ne(P,"setInterval",Ov),t.requestAnimationFrame&&Ne(P,"requestAnimationFrame",sR),t.XMLHttpRequest&&"XMLHttpRequest"in P&&Ne(XMLHttpRequest.prototype,"send",aR);let r=t.eventTarget;r&&(Array.isArray(r)?r:nR).forEach(o=>lR(o,t))}}}),Dv=iR;function Ov(e){return function(...t){let r=t[0];return t[0]=Ro(r,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ft(e)}`}}),e.apply(this,t)}}function sR(e){return function(t){return e.apply(this,[Ro(t,{mechanism:{data:{handler:ft(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function aR(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&Ne(r,o,function(i){let s={mechanism:{data:{handler:ft(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=kn(i);return a&&(s.mechanism.data.handler=ft(a)),Ro(i,s)})}),e.apply(this,t)}}function lR(e,t){let n=P[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ne(n,"addEventListener",function(o){return function(i,s,a){try{cR(s)&&(s.handleEvent=Ro(s.handleEvent,{mechanism:{data:{handler:ft(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&uR(this,i,s),o.apply(this,[i,Ro(s,{mechanism:{data:{handler:ft(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ne(n,"removeEventListener",function(o){return function(i,s,a){try{let l=s.__sentry_wrapped__;l&&o.call(this,i,l,a)}catch{}return o.call(this,i,s,a)}}))}function cR(e){return typeof e.handleEvent=="function"}function uR(e,t,r){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,r)}var Pv=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof P.document>"u"){xe&&T.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}gi({ignoreDuration:!0}),ko();let r=be(),n=r.getUser();r.addScopeListener(o=>{let i=o.getUser();(n?.id!==i?.id||n?.ip_address!==i?.ip_address)&&(ko(),n=i)}),t==="route"&&un(({from:o,to:i})=>{o!==i&&(gi({ignoreDuration:!0}),ko())})}}};var dR="CultureContext",pR=(()=>({name:dR,preprocessEvent(e){let t=Uv();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Uv();t&&An(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),Bv=pR;function Uv(){try{let e=P.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var fR="GlobalHandlers",mR=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:fR,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(hR(r),Fv("onerror")),t.onunhandledrejection&&(gR(r),Fv("onunhandledrejection"))}}}),Hv=mR;function hR(e){Ts(t=>{let{stackParser:r,attachStacktrace:n}=zv();if(M()!==e||zp())return;let{msg:o,url:i,line:s,column:a,error:l}=t,c=vR(hc(r,l||o,void 0,n,!1),i,s,a);c.level="error",hi(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function gR(e){bs(t=>{let{stackParser:r,attachStacktrace:n}=zv();if(M()!==e||zp())return;let o=SR(t),i=bt(o)?yR(o):hc(r,o,void 0,n,!0);i.level="error",hi(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function SR(e){if(bt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function yR(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function vR(e,t,r,n){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:n,lineno:r,filename:_R(t)??Rt(),function:"?",in_app:!0}),e}function Fv(e){xe&&T.log(`Global Handler attached: ${e}`)}function zv(){return M()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function _R(e){if(!(!nt(e)||e.length===0))return e.startsWith("data:")?`<${at(e,!1)}>`:e}var $v=()=>({name:"HttpContext",preprocessEvent(e){if(!P.navigator&&!P.location&&!P.document)return;let t=Ti(),r={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:r}},processSegmentSpan(e){if(!P.navigator&&!P.location&&!P.document)return;let t=Ti();An(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}});var ER="cause",TR=5,bR="LinkedErrors",IR=((e={})=>{let t=e.limit||TR,r=e.key||ER;return{name:bR,preprocessEvent(n,o,i){let s=i.getOptions();Op(fc,s.stackParser,r,t,n,o)}}}),jv=IR;var xR=/^HTML(\w*)Element$/;function fa(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(mf(e)){let t=kR(e);if(xR.test(t))return`[HTMLElement: ${le(e)}]`}}function kR(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Wv(){return wR()?(xe&&qe(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function wR(){if(typeof P.window>"u")return!1;let e=P;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let r=Rt();return!(P===P.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}function Gv(e){return[sc(),oc(),Pp(),Dv(),Lv(),Hv(),jv(),lc(),$v(),Bv(),Pv()]}function gf(e={}){let t=!e.skipBrowserExtensionCheck&&Wv(),r=e.defaultIntegrations==null?Gv():e.defaultIntegrations,n={...e,enabled:t?!1:e.enabled,stackParser:Nl(e.stackParser||Av),integrations:vp({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||Cv};return ni(fa),wp(gc,n)}function Dc(e={}){let t=P.document,r=t?.head||t?.body;if(!r){xe&&T.error("[showReportDialog] Global document not defined");return}let n=U(),i=M()?.getDsn();if(!i){xe&&T.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...n.getUser(),...e.user},eventId:e.eventId||qs()},a=P.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Sp(i,s);let{onLoad:l,onClose:c}=s;if(l&&(a.onload=l),c){let u=d=>{if(d.data==="__sentry_reportdialog_closed__")try{c()}finally{P.removeEventListener("message",u)}};P.addEventListener("message",u)}r.appendChild(a)}var he=L,Vf="sentryReplaySession",RR="replay_event",Yf="Unable to send Replay",NR=3e5,CR=9e5,AR=5e3,MR=5500,LR=6e4,OR=5e3,DR=3,Vv=15e4,Pc=5e3,PR=3e3,UR=300,qf=2e7,BR=4999,FR=5e4,Yv=36e5,HR=Object.defineProperty,zR=(e,t,r)=>t in e?HR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qv=(e,t,r)=>zR(e,typeof t!="symbol"?t+"":t,r),Pe=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Pe||{});function $R(e){return e.nodeType===e.ELEMENT_NODE}function ga(e){return e?.host?.shadowRoot===e}function Sa(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function jR(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function WR(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(" ")+";"}function zc(e){try{let t=e.rules||e.cssRules;return t?jR(Array.from(t,y_).join("")):null}catch{return null}}function GR(e){let t="";for(let r=0;r<e.style.length;r++){let n=e.style,o=n[r],i=n.getPropertyPriority(o);t+=`${o}:${n.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function y_(e){let t;if(YR(e))try{t=zc(e.styleSheet)||WR(e)}catch{}else if(qR(e)){let r=e.cssText,n=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(r=GR(e)),n&&(r=VR(r)),n||o)return r}return t||e.cssText}function VR(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function YR(e){return"styleSheet"in e}function qR(e){return"selectorText"in e}var $c=class{constructor(){qv(this,"idNodeMap",new Map),qv(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function KR(){return new $c}function ru({maskInputOptions:e,tagName:t,type:r}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||r==="password"||t==="INPUT"&&!r&&e.text)}function va({isMasked:e,element:t,value:r,maskInputFn:n}){let o=r||"";return e?(n&&(o=n(o,t)),"*".repeat(o.length)):o}function Pi(e){return e.toLowerCase()}function Tf(e){return e.toUpperCase()}var Kv="__rrweb_original__";function XR(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let o=0;o<e.height;o+=r){let i=t.getImageData,s=Kv in i?i[Kv]:i;if(new Uint32Array(s.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer).some(l=>l!==0))return!1}return!0}function Kf(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Pi(t):null}function jc(e,t,r){return t==="INPUT"&&(r==="radio"||r==="checkbox")?e.getAttribute("value")||"":e.value}function v_(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i;return r.pathname.match(n)?.[1]??null}var Xv={};function __(e){let t=Xv[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return Xv[e]=n.bind(window)}function bf(...e){return __("setTimeout")(...e)}function E_(...e){return __("clearTimeout")(...e)}function T_(e){try{return e.contentDocument}catch{}}function JR(e){try{return e.contentWindow}catch{}}var QR=1,ZR=new RegExp("[^a-z0-9-_:]"),_a=-2;function Xf(){return QR++}function eN(e){if(e instanceof HTMLFormElement)return"form";let t=Pi(e.tagName);return ZR.test(t)?"div":t}function tN(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ni,Jv,rN=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,nN=/^(?:[a-z+]+:)?\/\//i,oN=/^www\..*/i,iN=/^(data:)([^,]*),(.*)/i;function sN(e,t){if(!e||t.size===0)return e;try{let r=e.split(";"),n=[];for(let o of r){if(o=o.trim(),!o)continue;let i=o.indexOf(":");if(i===-1){n.push(o);continue}let s=o.slice(0,i).trim();t.has(s)||n.push(o)}return n.join("; ")+(n.length>0&&e.endsWith(";")?";":"")}catch(r){return console.warn("Error filtering CSS properties:",r),e}}function Wc(e,t){return(e||"").replace(rN,(r,n,o,i,s,a)=>{let l=o||s||a,c=n||i||"";if(!l)return r;if(nN.test(l)||oN.test(l))return`url(${c}${l}${c})`;if(iN.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${tN(t)+l}${c})`;let u=t.split("/"),d=l.split("/");u.pop();for(let p of d)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}var aN=/^[^ \t\n\r\u000c]+/,lN=/^[, \t\n\r\u000c]+/;function cN(e,t){if(t.trim()==="")return t;let r=0;function n(i){let s,a=i.exec(t.substring(r));return a?(s=a[0],r+=s.length,s):""}let o=[];for(;n(lN),!(r>=t.length);){let i=n(aN);if(i.slice(-1)===",")i=Mi(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Mi(e,i);let a=!1;for(;;){let l=t.charAt(r);if(l===""){o.push((i+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){r+=1,o.push((i+s).trim());break}else l==="("&&(a=!0);s+=l,r+=1}}}return o.join(", ")}var Qv=new WeakMap;function Mi(e,t){return!t||t.trim()===""?t:nu(e,t)}function uN(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function nu(e,t){let r=Qv.get(e);if(r||(r=e.createElement("a"),Qv.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function b_(e,t,r,n,o,i,s){if(!n)return n;if(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#"))return Mi(e,n);if(r==="xlink:href"&&n[0]!=="#")return Mi(e,n);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Mi(e,n);if(r==="srcset")return cN(e,n);if(r==="style"){let a=Wc(n,nu(e));return s&&s.size>0&&(a=sN(a,s)),a}else if(t==="object"&&r==="data")return Mi(e,n);return typeof i=="function"?i(r,n,o):n}function I_(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function dN(e,t,r,n){try{if(n&&e.matches(n))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function pN(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}function Do(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:Do(e.parentNode,t,r,n+1)}function Li(e,t){return r=>{let n=r;if(n===null)return!1;try{if(e){if(typeof e=="string"){if(n.matches(`.${e}`))return!0}else if(pN(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}function Ui(e,t,r,n,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let c=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let a=-1,l=-1;if(i){if(l=Do(s,Li(n,o)),l<0)return!0;a=Do(s,Li(t,r),l>=0?l:1/0)}else{if(a=Do(s,Li(t,r)),a<0)return!1;l=Do(s,Li(n,o),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function fN(e,t,r){let n=JR(e);if(!n)return;let o=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){let a=bf(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{E_(a),o=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return bf(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function mN(e,t,r){let n=!1,o;try{o=e.sheet}catch{o=null}if(o)return;let i=bf(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{E_(i),n=!0,t()})}function hN(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:y,maskInputFn:E,dataURLOptions:m={},inlineImages:g,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:k=!1,ignoreCSSAttributes:w}=t,_=gN(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Pe.Document,childNodes:[],compatMode:e.compatMode}:{type:Pe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Pe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return yN(e,{doc:r,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:h,maskInputFn:E,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:k,rootId:_,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:w});case e.TEXT_NODE:return SN(e,{doc:r,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:y,maskInputOptions:h,maskInputFn:E,rootId:_});case e.CDATA_SECTION_NODE:return{type:Pe.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Pe.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function gN(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function SN(e,t){let{maskAllText:r,maskTextClass:n,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,p=e.textContent,f=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,y=d==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=zc(e.parentNode.sheet))}catch(m){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`,e)}p=Wc(p,nu(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");let E=Ui(e,n,i,o,s,r);if(!f&&!h&&!y&&p&&E&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),y&&p&&(l.textarea||E)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p){let m=ru({type:null,tagName:d,maskInputOptions:l});p=va({isMasked:Ui(e,n,i,o,s,m),element:e,value:p,maskInputFn:c})}return{type:Pe.Text,textContent:p||"",isStyle:f,rootId:u}}function yN(e,t){let{doc:r,blockClass:n,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:y,maskTextClass:E,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:v,ignoreCSSAttributes:b}=t,k=dN(e,n,o,i),w=eN(e),_={},I=e.attributes.length;for(let x=0;x<I;x++){let D=e.attributes[x];D.name&&!I_(w,D.name,D.value)&&(_[D.name]=b_(r,w,Pi(D.name),D.value,e,l,b))}if(w==="link"&&s){let x=Array.from(r.styleSheets).find(Y=>Y.href===e.href),D=null;x&&(D=zc(x)),D&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=Wc(D,x.href))}if(w==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let x=zc(e.sheet);x&&(_._cssText=Wc(x,nu(r)))}if(w==="input"||w==="textarea"||w==="select"||w==="option"){let x=e,D=Kf(x),Y=jc(x,Tf(w),D),ee=x.checked;if(D!=="submit"&&D!=="button"&&Y){let G=Ui(x,E,g,m,v,ru({type:D,tagName:Tf(w),maskInputOptions:a}));_.value=va({isMasked:G,element:x,value:Y,maskInputFn:c})}ee&&(_.checked=ee)}if(w==="option"&&(e.selected&&!a.select?_.selected=!0:delete _.selected),w==="canvas"&&p){if(e.__context==="2d")XR(e)||(_.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let x=e.toDataURL(u.type,u.quality),D=r.createElement("canvas");D.width=e.width,D.height=e.height;let Y=D.toDataURL(u.type,u.quality);x!==Y&&(_.rr_dataURL=x)}}if(w==="img"&&d){Ni||(Ni=r.createElement("canvas"),Jv=Ni.getContext("2d"));let x=e,D=x.currentSrc||x.getAttribute("src")||"<unknown-src>",Y=x.crossOrigin,ee=()=>{x.removeEventListener("load",ee);try{Ni.width=x.naturalWidth,Ni.height=x.naturalHeight,Jv.drawImage(x,0,0),_.rr_dataURL=Ni.toDataURL(u.type,u.quality)}catch(G){if(x.crossOrigin!=="anonymous"){x.crossOrigin="anonymous",x.complete&&x.naturalWidth!==0?ee():x.addEventListener("load",ee);return}else console.warn(`Cannot inline img src=${D}! Error: ${G}`)}x.crossOrigin==="anonymous"&&(Y?_.crossOrigin=Y:x.removeAttribute("crossorigin"))};x.complete&&x.naturalWidth!==0?ee():x.addEventListener("load",ee)}if((w==="audio"||w==="video")&&(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),k){let{width:x,height:D}=e.getBoundingClientRect();_={class:_.class,rr_width:`${x}px`,rr_height:`${D}px`}}w==="iframe"&&!f(_.src)&&(!k&&!T_(e)&&(_.rr_src=_.src),delete _.src);let j;try{customElements.get(w)&&(j=!0)}catch{}return{type:Pe.Element,tagName:w,attributes:_,childNodes:[],isSVG:uN(e)||void 0,needBlock:k,rootId:y,isCustom:j}}function me(e){return e==null?"":e.toLowerCase()}function vN(e,t){if(t.comment&&e.type===Pe.Comment)return!0;if(e.type===Pe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&v_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(me(e.attributes.name).match(/^msapplication-tile(image|color)$/)||me(e.attributes.name)==="application-name"||me(e.attributes.rel)==="icon"||me(e.attributes.rel)==="apple-touch-icon"||me(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&me(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(me(e.attributes.property).match(/^(og|twitter|fb):/)||me(e.attributes.name).match(/^(og|twitter):/)||me(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(me(e.attributes.name)==="robots"||me(e.attributes.name)==="googlebot"||me(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(me(e.attributes.name)==="author"||me(e.attributes.name)==="generator"||me(e.attributes.name)==="framework"||me(e.attributes.name)==="publisher"||me(e.attributes.name)==="progid"||me(e.attributes.property).match(/^article:/)||me(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(me(e.attributes.name)==="google-site-verification"||me(e.attributes.name)==="yandex-verification"||me(e.attributes.name)==="csrf-token"||me(e.attributes.name)==="p:domain_verify"||me(e.attributes.name)==="verify-v1"||me(e.attributes.name)==="verification"||me(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Oi(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:k=!1,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I=5e3,onBlockedImageLoad:j,onStylesheetLoad:x,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:Y=()=>!1,newlyAddedElement:ee=!1,ignoreCSSAttributes:G}=t,{preserveWhiteSpace:Be=!0}=t,ce=hN(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,dataURLOptions:v,inlineImages:b,recordCanvas:k,keepIframeSrcFn:Y,newlyAddedElement:ee,ignoreCSSAttributes:G});if(!ce)return console.warn(e,"not serialized"),null;let ye;n.hasNode(e)?ye=n.getId(e):vN(ce,g)||!Be&&ce.type===Pe.Text&&!ce.isStyle&&!ce.textContent.trim().length?ye=_a:ye=Xf();let C=Object.assign(ce,{id:ye});if(n.add(e,C),ye===_a)return null;w&&w(e);let oe=!p;if(C.type===Pe.Element){oe=oe&&!C.needBlock;let $=e.shadowRoot;$&&Sa($)&&(C.isShadowHost=!0)}if((C.type===Pe.Document||C.type===Pe.Element)&&oe){g.headWhitespace&&C.type===Pe.Element&&C.tagName==="head"&&(Be=!1);let $={doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:k,preserveWhiteSpace:Be,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onBlockedImageLoad:j,onStylesheetLoad:x,stylesheetLoadTimeout:D,keepIframeSrcFn:Y,ignoreCSSAttributes:G},q=e.childNodes?Array.from(e.childNodes):[];for(let pe of q){let fe=Oi(pe,$);fe&&C.childNodes.push(fe)}if($R(e)&&e.shadowRoot)for(let pe of Array.from(e.shadowRoot.childNodes)){let fe=Oi(pe,$);fe&&(Sa(e.shadowRoot)&&(fe.isShadow=!0),C.childNodes.push(fe))}}if(e.parentNode&&ga(e.parentNode)&&Sa(e.parentNode)&&(C.isShadow=!0),C.type===Pe.Element&&C.tagName==="iframe"&&!C.needBlock&&fN(e,()=>{let $=T_(e);if($&&_){let q=Oi($,{doc:$,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:k,preserveWhiteSpace:Be,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onStylesheetLoad:x,stylesheetLoadTimeout:D,keepIframeSrcFn:Y,ignoreCSSAttributes:G});q&&_(e,q)}},I),C.type===Pe.Element&&C.tagName==="img"&&!e.complete&&C.needBlock){let $=e,q=()=>{if($.isConnected&&!$.complete&&j)try{let pe=$.getBoundingClientRect();pe.width>0&&pe.height>0&&j($,C,pe)}catch{}$.removeEventListener("load",q)};$.isConnected&&$.addEventListener("load",q)}return C.type===Pe.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&v_(C.attributes.href)==="css")&&mN(e,()=>{if(x){let $=Oi(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:k,preserveWhiteSpace:Be,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onStylesheetLoad:x,stylesheetLoadTimeout:D,keepIframeSrcFn:Y,ignoreCSSAttributes:G});$&&x(e,$)}},D),C.type===Pe.Element&&delete C.needBlock,C}function _N(e,t){let{mirror:r=new $c,blockClass:n="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOM:g=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:_,onBlockedImageLoad:I,onStylesheetLoad:j,stylesheetLoadTimeout:x,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:Y=new Set([])}=t||{};return Oi(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:g==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:g===!1?{}:g,dataURLOptions:v,inlineImages:p,recordCanvas:f,preserveWhiteSpace:b,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:_,onBlockedImageLoad:I,onStylesheetLoad:j,stylesheetLoadTimeout:x,keepIframeSrcFn:D,newlyAddedElement:!1,ignoreCSSAttributes:Y})}function yt(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Ci=`Please stop import mirror directly. Instead of that,\r
|
|
26
|
+
Name: ${mt(n)}
|
|
27
|
+
Error:`,o)}}function qx(){return lv(e=>{aa("cls",{metric:e}),hv=e},{reportAllChanges:!0})}function Kx(){return fv(e=>{aa("lcp",{metric:e}),gv=e},{reportAllChanges:!0})}function Xx(){return mv(e=>{aa("ttfb",{metric:e}),Sv=e})}function Jx(){return pv(e=>{aa("inp",{metric:e}),yv=e})}function kc(e,t,r,n,o=!1){vv(e,t);let i;return bc[e]||(i=r(),bc[e]=!0),n&&t({metric:n}),_v(e,t,o?i:void 0)}function Zx(e){let t={};e==="event"&&(t.durationThreshold=0),nr(e,r=>{aa(e,{entries:r})},t)}function vv(e,t){sa[e]=sa[e]||[],sa[e].push(t)}function _v(e,t,r){return()=>{r&&r();let n=sa[e];if(!n)return;let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}function Ev(e){return"duration"in e}var Qx=80;function le(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,o=[],i=0,s=0,a=" > ",l=a.length,c,d=Array.isArray(t)?t:t.keyAttrs,u=!Array.isArray(t)&&t.maxStringLength||Qx;for(;r&&i++<n&&(c=e1(r,d),!(c==="html"||i>1&&s+o.length*l+c.length>=u));)o.push(c),s+=c.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function e1(e,t){let r=e,n=[];if(!r?.tagName)return"";if(typeof HTMLElement<"u"&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let o=t?.length?t.filter(i=>r.getAttribute(i)).map(i=>[i,r.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{n.push(`[${i[0]}="${i[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let i=r.className;if(i&&ot(i)){let s=i.split(/\s+/);for(let a of s)n.push(`.${a}`)}}for(let i of["aria-label","type","name","title","alt"]){let s=r.getAttribute(i);s&&n.push(`[${i}="${s}"]`)}return n.join("")}var Tv=e=>{let t=r=>{(r.type==="pagehide"||P.document?.visibilityState==="hidden")&&e(r)};rr("visibilitychange",t,{capture:!0,once:!0}),rr("pagehide",t,{capture:!0,once:!0})};function Ic(e){return typeof e=="number"&&isFinite(e)}function cn(e,t,r,{...n}){let o=B(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),fi(e,()=>{let i=We({startTime:t,...n});return i&&i.end(r),i})}function xi(e){let t=M();if(!t)return;let{name:r,transaction:n,attributes:o,startTime:i}=e,{release:s,environment:a}=t.getOptions(),{userInfo:l}=t.getDataCollectionOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),u=U(),p=u.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0,h;try{h=u.getScopeData().contexts.profile.profile_id}catch{}let v={release:s,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:n,"user_agent.original":P.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...o};return We({name:r,attributes:v,startTime:i,experimental:{standalone:!0}})}function un(){return P.addEventListener&&P.performance}function se(e){return e/1e3}function bv(e){let t="unknown",r="unknown",n="";for(let o of e){if(o==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(o))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=o}return n===e&&(t=n),{name:t,version:r}}function Mo(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Lo(e,t){let r,n=!1;function o(a){!n&&r&&t(a,r.spanContext().spanId,r),n=!0}Tv(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",a=>{r=a,s()})}function kv(e){let t=0,r;if(!Mo("layout-shift"))return;let n=an(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Lo(e,(o,i)=>{t1(t,r,i,o),n()})}function t1(e,t,r,n){je&&T.log(`Sending CLS span (${e})`);let o=t?se((ue()||0)+t.startTime):ne(),i=U().getScopeData().transactionName,s=t?le(t.sources[0]?.node):"Layout shift",a={[Z]:"auto.http.browser.cls",[_e]:"ui.webvital.cls",[at]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t?.sources&&t.sources.forEach((c,d)=>{a[`cls.source.${d+1}`]=le(c.node)});let l=xi({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("cls",{[_r]:"",[Er]:e}),l.end(o))}var r1=6e4;function Oo(e){return e!=null&&e>0&&e<=r1}function Iv(e){let t=0,r;if(!Mo("largest-contentful-paint"))return;let n=ln(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Oo(o.value)||(t=o.value,r=i)},!0);Lo(e,(o,i)=>{n1(t,r,i,o),n()})}function n1(e,t,r,n){if(!Oo(e))return;je&&T.log(`Sending LCP span (${e})`);let o=se((ue()||0)+(t?.startTime||0)),i=U().getScopeData().transactionName,s=t?le(t.element):"Largest contentful paint",a={[Z]:"auto.http.browser.lcp",[_e]:"ui.webvital.lcp",[at]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t&&(t.element&&(a["lcp.element"]=le(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));let l=xi({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("lcp",{[_r]:"millisecond",[Er]:e}),l.end(o))}function or(e){return e&&((ue()||performance.timeOrigin)+e)/1e3}function la(e){let t={};if(e.nextHopProtocol!=null){let{name:r,version:n}=bv(e.nextHopProtocol);t["network.protocol.version"]=n,t["network.protocol.name"]=r}return ue()||un()?.timeOrigin?o1({...t,"http.request.redirect_start":or(e.redirectStart),"http.request.redirect_end":or(e.redirectEnd),"http.request.worker_start":or(e.workerStart),"http.request.fetch_start":or(e.fetchStart),"http.request.domain_lookup_start":or(e.domainLookupStart),"http.request.domain_lookup_end":or(e.domainLookupEnd),"http.request.connect_start":or(e.connectStart),"http.request.secure_connection_start":or(e.secureConnectionStart),"http.request.connection_end":or(e.connectEnd),"http.request.request_start":or(e.requestStart),"http.request.response_start":or(e.responseStart),"http.request.response_end":or(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function o1(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var i1=2147483647,wv=0,St={},Nt,xc;function Jp({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:r}){let n=un();if(n&&ue()){n.mark&&P.performance.mark("sentry-tracing-init");let o=t?Iv(r):t===!1?a1():void 0,i=e?kv(r):e===!1?s1():void 0,s=l1();return()=>{s(),o?.(),i?.()}}return()=>{}}function Zp(){Tr("longtask",({entries:e})=>{let t=ie();if(!t)return;let{op:r,start_timestamp:n}=B(t);for(let o of e){let i=se(ue()+o.startTime),s=se(o.duration);r==="navigation"&&n&&i<n||cn(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Z]:"auto.ui.browser.metrics"}})}})}function Qp(){new PerformanceObserver(t=>{let r=ie();if(r)for(let n of t.getEntries()){if(!n.scripts[0])continue;let o=se(ue()+n.startTime),{start_timestamp:i,op:s}=B(r);if(s==="navigation"&&i&&o<i)continue;let a=se(n.duration),l={[Z]:"auto.ui.browser.metrics"},c=n.scripts[0],{invoker:d,invokerType:u,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=c;l["browser.script.invoker"]=d,l["browser.script.invoker_type"]=u,p&&(l["code.filepath"]=p),f&&(l["code.function"]=f),h!==-1&&(l["browser.script.source_char_position"]=h),cn(r,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function ef(){Tr("event",({entries:e})=>{let t=ie();if(t){for(let r of e)if(r.name==="click"){let n=se(ue()+r.startTime),o=se(r.duration),i={name:le(r.target),op:`ui.interaction.${r.name}`,startTime:n,attributes:{[Z]:"auto.ui.browser.metrics"}},s=Ti(r.target);s&&(i.attributes["ui.component_name"]=s),cn(t,n,n+o,i)}}})}function s1(){return an(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(St.cls={value:e.value,unit:""},xc=t)},!0)}function a1(){return ln(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!Oo(e.value)||(St.lcp={value:e.value,unit:"millisecond"},Nt=t)},!0)}function l1(){return Xp(({metric:e})=>{e.entries[e.entries.length-1]&&(St.ttfb={value:e.value,unit:"millisecond"})})}function tf(e,t){let r=un(),n=ue();if(!r?.getEntries||!n)return;let{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:l}=t,c=se(n),d=r.getEntries(),{op:u,start_timestamp:p}=B(e);if(d.slice(wv).forEach(f=>{let h=se(f.startTime),v=se(Math.max(0,f.duration));if(!(u==="navigation"&&p&&c+h<p))switch(f.entryType){case"navigation":{p1(e,f,c);break}case"mark":case"paint":case"measure":{u1(e,f,h,v,c,i);let I=Hr(),m=f.startTime<I.firstHiddenTime;f.name==="first-paint"&&m&&(St.fp={value:f.startTime,unit:"millisecond"}),f.name==="first-contentful-paint"&&m&&(St.fcp={value:f.startTime,unit:"millisecond"});break}case"resource":{h1(e,f,f.name,h,v,c,s);break}}}),wv=Math.max(d.length-1,0),g1(e,o),u==="pageload"){if(v1(St),o){let f=(h,v,I)=>{let m=I??`browser.web_vital.${h}.value`;e.setAttribute(m,v),je&&T.log("Setting web vital attribute",{[m]:v},"on pageload span")};["ttfb","fp","fcp"].forEach(h=>{St[h]&&f(h,St[h].value)}),St["ttfb.requestTime"]&&f("ttfb.requestTime",St["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete St.cls,l||delete St.lcp,Object.entries(St).forEach(([f,h])=>{Kl(f,h.value,h.unit)}),S1(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",tr())}Nt=void 0,xc=void 0,St={}}function c1(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function u1(e,t,r,n,o,i){if(c1(t)||["mark","measure"].includes(t.entryType)&&Ke(t.name,i))return;let s=sn(!1),a=se(s?s.requestStart:0),l=o+Math.max(r,a),c=o+r,d=c+n,u={[Z]:"auto.resource.browser.metrics"};l!==c&&(u["sentry.browser.measure_happened_before_request"]=!0,u["sentry.browser.measure_start_time"]=l),d1(u,t),l<=d&&cn(e,l,d,{name:t.name,op:t.entryType,attributes:u})}function d1(e,t){try{let r=t.detail;if(!r)return;if(typeof r=="object"){for(let[n,o]of Object.entries(r))if(o&&kt(o))e[`sentry.browser.measure.detail.${n}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${n}`]=JSON.stringify(o)}catch{}return}if(kt(r)){e["sentry.browser.measure.detail"]=r;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(r)}catch{}}catch{}}function p1(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{wc(e,t,n,r)}),wc(e,t,"secureConnection",r,"TLS/SSL"),wc(e,t,"fetch",r,"cache"),wc(e,t,"domainLookup",r,"DNS"),m1(e,t,r)}function wc(e,t,r,n,o=r){let i=f1(r),s=t[i],a=t[`${r}Start`];!a||!s||cn(e,n+se(a),n+se(s),{op:`browser.${o}`,name:t.name,attributes:{[Z]:"auto.ui.browser.metrics",...r==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function f1(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function m1(e,t,r){let n=r+se(t.requestStart),o=r+se(t.responseEnd),i=r+se(t.responseStart);t.responseEnd&&(cn(e,n,o,{op:"browser.request",name:t.name,attributes:{[Z]:"auto.ui.browser.metrics"}}),cn(e,i,o,{op:"browser.response",name:t.name,attributes:{[Z]:"auto.ui.browser.metrics"}}))}function h1(e,t,r,n,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;let l={[Z]:"auto.resource.browser.metrics"},c=Qt(r);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=r.includes(P.location.origin),y1(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let d={...l,...la(t)},u=i+n,p=u+o;cn(e,u,p,{name:r.replace(P.location.origin,""),op:a,attributes:d})}function g1(e,t){let r=P.navigator;if(!r)return;let n=r.connection;n&&(n.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute(t?"network.connection.type":"connectionType",n.type),Ic(n.rtt)&&(St["connection.rtt"]={value:n.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",n.rtt))),Ic(r.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",r.deviceMemory):e.setAttribute("deviceMemory",`${r.deviceMemory} GB`)),Ic(r.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",r.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(r.hardwareConcurrency)))}function S1(e,t){Nt&&t.recordLcpOnPageloadSpan&&(Nt.element&&e.setAttribute("lcp.element",le(Nt.element)),Nt.id&&e.setAttribute("lcp.id",Nt.id),Nt.url&&e.setAttribute("lcp.url",Nt.url.trim().slice(0,200)),Nt.loadTime!=null&&e.setAttribute("lcp.loadTime",Nt.loadTime),Nt.renderTime!=null&&e.setAttribute("lcp.renderTime",Nt.renderTime),e.setAttribute("lcp.size",Nt.size)),xc?.sources&&t.recordClsOnPageloadSpan&&xc.sources.forEach((r,n)=>e.setAttribute(`cls.source.${n+1}`,le(r.node)))}function y1(e,t,r){r.forEach(([n,o])=>{let i=e[n];i!=null&&(typeof i=="number"&&i<i1||typeof i=="string")&&(t[o]=i)})}function v1(e){let t=sn(!1);if(!t)return;let{responseStart:r,requestStart:n}=t;n<=r&&(e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}var rf=[],ca=new Map,Ri=new Map,nf=60;function of(){if(un()&&ue()){let t=_1();return()=>{t()}}return()=>{}}var Ci={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function _1(){return Ao(E1)}var E1=({metric:e})=>{if(e.value==null)return;let t=se(e.value);if(t>nf)return;let r=e.entries.find(h=>h.duration===e.value&&Ci[h.name]);if(!r)return;let{interactionId:n}=r,o=Ci[r.name],i=se(ue()+r.startTime),s=ie(),a=s?te(s):void 0,l=n!=null?ca.get(n):void 0,c=l?.span||a,d=c?B(c).description:U().getScopeData().transactionName,u=l?.elementName||le(r.target),p={[Z]:"auto.http.browser.inp",[_e]:`ui.interaction.${o}`,[at]:r.duration},f=xi({name:u,transaction:d,attributes:p,startTime:i});f&&(f.addEvent("inp",{[_r]:"millisecond",[Er]:e.value}),f.end(i+t))};function xv(e){return e!=null?ca.get(e):void 0}function sf(){let e=Object.keys(Ci);er()&&e.forEach(o=>{P.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){let i=o.target;if(!i)return;let s=le(i),a=Math.round(o.timeStamp);if(Ri.set(a,s),Ri.size>50){let l=Ri.keys().next().value;l!==void 0&&Ri.delete(l)}}function r(o){let i=Math.round(o.startTime),s=Ri.get(i);if(!s)for(let a=-5;a<=5;a++){let l=Ri.get(i+a);if(l){s=l;break}}return s||"<unknown>"}let n=({entries:o})=>{let i=ie(),s=i&&te(i);o.forEach(a=>{if(!Ev(a))return;let l=a.interactionId;if(l==null||ca.has(l))return;let c=a.target?le(a.target):r(a);if(rf.length>10){let d=rf.shift();ca.delete(d)}rf.push(l),ca.set(l,{span:s,elementName:c})})};Tr("event",n),Tr("first-input",n)}function af(e){let{name:t,op:r,origin:n,metricName:o,value:i,attributes:s,parentSpan:a,reportEvent:l,startTime:c,endTime:d}=e,u=U().getScopeData().transactionName,p={[Z]:n,[_e]:r,[at]:0,[`browser.web_vital.${o}.value`]:i,"sentry.transaction":u,"user_agent.original":P.navigator?.userAgent,...s};a&&Fs(a).attributes?.[_e]==="pageload"&&(p["sentry.pageload.span_id"]=a.spanContext().spanId),l&&(p[`browser.web_vital.${o}.report_event`]=l);let f=We({name:t,attributes:p,startTime:c,parentSpan:a});f&&f.end(d??c)}function lf(e){let t=0,r;if(!Mo("largest-contentful-paint"))return;let n=ln(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Oo(o.value)||(t=o.value,r=i)},!0);Lo(e,(o,i,s)=>{T1(t,r,s,o),n()})}function T1(e,t,r,n){if(!Oo(e))return;je&&T.log(`Sending LCP span (${e})`);let o=ue()||0,i=se(o),s=se(o+(t?.startTime||0)),a=t?le(t.element):"Largest contentful paint",l={};t?.element&&(l["browser.web_vital.lcp.element"]=le(t.element)),t?.id&&(l["browser.web_vital.lcp.id"]=t.id),t?.url&&(l["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(l["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(l["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(l["browser.web_vital.lcp.size"]=t.size),af({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:l,parentSpan:r,reportEvent:n,startTime:i,endTime:s})}function cf(e){let t=0,r;if(!Mo("layout-shift"))return;let n=an(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Lo(e,(o,i,s)=>{b1(t,r,s,o),n()})}function b1(e,t,r,n){je&&T.log(`Sending CLS span (${e})`);let o=t?se((ue()||0)+t.startTime):ne(),i=t?le(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,l)=>{s[`browser.web_vital.cls.source.${l+1}`]=le(a.node)}),af({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:r,reportEvent:n,startTime:o})}function uf(){if(!un()||!ue())return;Ao(({metric:r})=>{if(r.value==null||se(r.value)>nf)return;let o=r.entries.find(i=>i.duration===r.value&&Ci[i.name]);o&&k1(r.value,o)})}function k1(e,t){je&&T.log(`Sending INP span (${e})`);let r=se(ue()+t.startTime),n=se(e),o=Ci[t.name],i=xv(t.interactionId),s=ie(),a=s?te(s):void 0,l=i?.span||a,c=l?Fs(l).name:U().getScopeData().transactionName,d=i?.elementName||le(t.target);af({name:d,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[at]:t.duration,"sentry.transaction":c},startTime:r,endTime:r+n,parentSpan:l})}var I1=1e3,Rv,df,pf;function ua(e){rt("dom",e),nt("dom",w1)}function w1(){if(!P.document)return;let e=Pe.bind(null,"dom"),t=Cv(e,!0);P.document.addEventListener("click",t,!1),P.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let o=P[r]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ne(o,"addEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=c[s]=c[s]||{refCount:0};if(!d.handler){let u=Cv(e);d.handler=u,i.call(this,s,u,l)}d.refCount++}catch{}return i.call(this,s,a,l)}}),Ne(o,"removeEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__||{},d=c[s];d&&(d.refCount--,d.refCount<=0&&(i.call(this,s,d.handler,l),d.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,l)}}))})}function x1(e){if(e.type!==df)return!1;try{if(!e.target||e.target._sentryId!==pf)return!1}catch{}return!0}function R1(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Cv(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=C1(r);if(R1(r.type,n))return;ve(r,"_sentryCaptured",!0),n&&!n._sentryId&&ve(n,"_sentryId",Ae());let o=r.type==="keypress"?"input":r.type;x1(r)||(e({event:r,name:o,global:t}),df=r.type,pf=n?n._sentryId:void 0),clearTimeout(Rv),Rv=P.setTimeout(()=>{pf=void 0,df=void 0},I1)}}function C1(e){try{return e.target}catch{return null}}var Rc;function dn(e){let t="history";rt(t,e),nt(t,N1)}function N1(){if(P.addEventListener("popstate",()=>{let t=P.location.href,r=Rc;if(Rc=t,r===t)return;Pe("history",{from:r,to:t})}),!Bp())return;function e(t){return function(...r){let n=r.length>2?r[2]:void 0;if(n){let o=Rc,i=A1(String(n));if(Rc=i,o===i)return t.apply(this,r);Pe("history",{from:o,to:i})}return t.apply(this,r)}}Ne(P.history,"pushState",e),Ne(P.history,"replaceState",e)}function A1(e){try{return new URL(e,P.location.origin).toString()}catch{return e}}var Cc={};function Nc(e){let t=Cc[e];if(t)return t;let r=P[e];if(ia(r))return Cc[e]=r.bind(P);let n=P.document;if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i?.[e]&&(r=i[e]),n.head.removeChild(o)}catch(o){je&&T.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Cc[e]=r.bind(P))}function ff(e){Cc[e]=void 0}function Po(...e){return Nc("setTimeout")(...e)}var br="__sentry_xhr_v3__";function da(e){rt("xhr",e),nt("xhr",M1)}function M1(){if(!P.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){let o=new Error,i=ne()*1e3,s=ot(n[0])?n[0].toUpperCase():void 0,a=L1(n[1]);if(!s||!a)return t.apply(r,n);r[br]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);let l=()=>{let c=r[br];if(c&&r.readyState===4){try{c.status_code=r.status}catch{}let d={endTimestamp:ne()*1e3,startTimestamp:i,xhr:r,virtualError:o};Pe("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(c,d,u){return l(),c.apply(d,u)}}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(c,d,u){let[p,f]=u,h=d[br];return h&&ot(p)&&ot(f)&&(h.request_headers[p.toLowerCase()]=f),c.apply(d,u)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){let o=r[br];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);let i={startTimestamp:ne()*1e3,xhr:r};return Pe("xhr",i),t.apply(r,n)}})}function L1(e){if(ot(e))return e;try{return e.toString()}catch{}}var O1=Symbol.for("sentry__originalRequestBody");function Ac(e){return new URLSearchParams(e).toString()}function Mc(e,t=T){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ac(e)];if(!e)return[void 0]}catch(r){return je&&t.error(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return je&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Lc(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let r=e[0][O1];return r!==void 0?r:void 0}}function pa(e){let t;try{t=e.getAllResponseHeaders()}catch(r){return je&&T.error(r,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
28
|
+
`).reduce((r,n)=>{let[o,i]=n.split(": ");return i&&(r[o.toLowerCase()]=i),r},{}):{}}function mf(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}var P1=40;function Nv(e,t=Nc("fetch")){let r=0,n=0;async function o(i){let s=i.body.length;r+=s,n++;let a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{let l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw ff("fetch"),l}finally{r-=s,n--}}return tc(e,o,Ro(e.bufferSize||P1))}var we=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var D1=30;var U1=50;function hf(e,t,r,n){let o={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var B1=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,F1=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,H1=/\((\S*)(?::(\d+))(?::(\d+))\)/,z1=/at (.+?) ?\(data:(.+?),/,$1=e=>{let t=e.match(z1);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let r=B1.exec(e);if(r){let[,o,i,s]=r;return hf(o,"?",+i,+s)}let n=F1.exec(e);if(n){if(n[2]?.indexOf("eval")===0){let a=H1.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[i,s]=Mv(n[1]||"?",n[2]);return hf(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},W1=[D1,$1],j1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,G1=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,V1=e=>{let t=j1.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=G1.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],o=t[1]||"?";return[o,n]=Mv(o,n),hf(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Y1=[U1,V1];var q1=[W1,Y1],Av=vs(...q1),Mv=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Oc=1024,K1="Breadcrumbs",X1=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:K1,setup(r){t.console&&Pp(Q1(r)),t.dom&&ua(Z1(r,t.dom)),t.xhr&&da(eR(r)),t.fetch&&On(tR(r)),t.history&&dn(rR(r)),t.sentry&&r.on("beforeSendEvent",J1(r))}}}),Lv=X1;function J1(e){return function(r){M()===e&&Ht({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:vr(r)},{event:r})}}function Z1(e,t){return function(n){if(M()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Oc&&(we&&T.warn(`\`dom.maxStringLength\` cannot exceed ${Oc}, but a value of ${a} was configured. Sentry will use ${Oc} instead.`),a=Oc),typeof s=="string"&&(s=[s]);try{let c=n.event,d=nR(c)?c.target:c;o=le(d,{keyAttrs:s,maxStringLength:a}),i=Ti(d)}catch{o="<unknown>"}if(o.length===0)return;let l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),Ht(l,{event:n.event,name:n.name,global:n.global})}}function Q1(e){return function(r){if(M()!==e)return;let n={category:"console",data:{arguments:r.args,logger:"console"},level:Ei(r.level),message:Cs(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Cs(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Ht(n,{input:r.args,level:r.level})}}function eR(e){return function(r){if(M()!==e)return;let{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[br];if(!n||!o||!i)return;let{method:s,url:a,status_code:l,body:c}=i,d={method:s,url:a,status_code:l},u={xhr:r.xhr,input:c,startTimestamp:n,endTimestamp:o},p={category:"xhr",data:d,type:"http",level:uc(l)};e.emit("beforeOutgoingRequestBreadcrumb",p,u),Ht(p,u)}}function tR(e){return function(r){if(M()!==e)return;let{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){let i={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o},s={category:"fetch",data:r.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,i),Ht(s,i)}else{let i=r.response,s={...r.fetchData,status_code:i?.status},a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},l={category:"fetch",data:s,type:"http",level:uc(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Ht(l,a)}}}function rR(e){return function(r){if(M()!==e)return;let n=r.from,o=r.to,i=Qt(D.location.href),s=n?Qt(n):void 0,a=Qt(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Ht({category:"navigation",data:{from:n,to:o}})}}function nR(e){return!!e&&!!e.target}var oR="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),iR="BrowserApiErrors",sR=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:iR,setupOnce(){t.setTimeout&&Ne(D,"setTimeout",Ov),t.setInterval&&Ne(D,"setInterval",Ov),t.requestAnimationFrame&&Ne(D,"requestAnimationFrame",aR),t.XMLHttpRequest&&"XMLHttpRequest"in D&&Ne(XMLHttpRequest.prototype,"send",lR);let r=t.eventTarget;r&&(Array.isArray(r)?r:oR).forEach(o=>cR(o,t))}}}),Pv=sR;function Ov(e){return function(...t){let r=t[0];return t[0]=Co(r,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${mt(e)}`}}),e.apply(this,t)}}function aR(e){return function(t){return e.apply(this,[Co(t,{mechanism:{data:{handler:mt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function lR(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&Ne(r,o,function(i){let s={mechanism:{data:{handler:mt(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=xn(i);return a&&(s.mechanism.data.handler=mt(a)),Co(i,s)})}),e.apply(this,t)}}function cR(e,t){let n=D[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ne(n,"addEventListener",function(o){return function(i,s,a){try{uR(s)&&(s.handleEvent=Co(s.handleEvent,{mechanism:{data:{handler:mt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&dR(this,i,s),o.apply(this,[i,Co(s,{mechanism:{data:{handler:mt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ne(n,"removeEventListener",function(o){return function(i,s,a){try{let l=s.__sentry_wrapped__;l&&o.call(this,i,l,a)}catch{}return o.call(this,i,s,a)}}))}function uR(e){return typeof e.handleEvent=="function"}function dR(e,t,r){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,r)}var Dv=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof D.document>"u"){we&&T.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Si({ignoreDuration:!0}),xo();let r=ke(),n=r.getUser();r.addScopeListener(o=>{let i=o.getUser();(n?.id!==i?.id||n?.ip_address!==i?.ip_address)&&(xo(),n=i)}),t==="route"&&dn(({from:o,to:i})=>{o!==i&&(Si({ignoreDuration:!0}),xo())})}}};var pR="CultureContext",fR=(()=>({name:pR,preprocessEvent(e){let t=Uv();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Uv();t&&Mn(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),Bv=fR;function Uv(){try{let e=D.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var mR="GlobalHandlers",hR=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:mR,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(gR(r),Fv("onerror")),t.onunhandledrejection&&(SR(r),Fv("onunhandledrejection"))}}}),Hv=hR;function gR(e){Ts(t=>{let{stackParser:r,attachStacktrace:n}=zv();if(M()!==e||zp())return;let{msg:o,url:i,line:s,column:a,error:l}=t,c=_R(hc(r,l||o,void 0,n,!1),i,s,a);c.level="error",gi(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function SR(e){bs(t=>{let{stackParser:r,attachStacktrace:n}=zv();if(M()!==e||zp())return;let o=yR(t),i=kt(o)?vR(o):hc(r,o,void 0,n,!0);i.level="error",gi(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function yR(e){if(kt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function vR(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function _R(e,t,r,n){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:n,lineno:r,filename:ER(t)??Ct(),function:"?",in_app:!0}),e}function Fv(e){we&&T.log(`Global Handler attached: ${e}`)}function zv(){return M()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function ER(e){if(!(!ot(e)||e.length===0))return e.startsWith("data:")?`<${lt(e,!1)}>`:e}var $v=()=>({name:"HttpContext",preprocessEvent(e){if(!D.navigator&&!D.location&&!D.document)return;let t=bi(),r={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:r}},processSegmentSpan(e){if(!D.navigator&&!D.location&&!D.document)return;let t=bi();Mn(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}});var TR="cause",bR=5,kR="LinkedErrors",IR=((e={})=>{let t=e.limit||bR,r=e.key||TR;return{name:kR,preprocessEvent(n,o,i){let s=i.getOptions();Op(fc,s.stackParser,r,t,n,o)}}}),Wv=IR;var wR=/^HTML(\w*)Element$/;function fa(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(mf(e)){let t=xR(e);if(wR.test(t))return`[HTMLElement: ${le(e)}]`}}function xR(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function jv(){return RR()?(we&&qe(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function RR(){if(typeof D.window>"u")return!1;let e=D;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let r=Ct();return!(D===D.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}function Gv(e){return[sc(),oc(),Dp(),Pv(),Lv(),Hv(),Wv(),lc(),$v(),Bv(),Dv()]}function gf(e={}){let t=!e.skipBrowserExtensionCheck&&jv(),r=e.defaultIntegrations==null?Gv():e.defaultIntegrations,n={...e,enabled:t?!1:e.enabled,stackParser:Cl(e.stackParser||Av),integrations:vp({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||Nv};return oi(fa),xp(gc,n)}function Pc(e={}){let t=D.document,r=t?.head||t?.body;if(!r){we&&T.error("[showReportDialog] Global document not defined");return}let n=U(),i=M()?.getDsn();if(!i){we&&T.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...n.getUser(),...e.user},eventId:e.eventId||qs()},a=D.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Sp(i,s);let{onLoad:l,onClose:c}=s;if(l&&(a.onload=l),c){let d=u=>{if(u.data==="__sentry_reportdialog_closed__")try{c()}finally{D.removeEventListener("message",d)}};D.addEventListener("message",d)}r.appendChild(a)}var he=O,Vf="sentryReplaySession",CR="replay_event",Yf="Unable to send Replay",NR=3e5,AR=9e5,MR=5e3,LR=5500,OR=6e4,PR=5e3,DR=3,Vv=15e4,Dc=5e3,UR=3e3,BR=300,qf=2e7,FR=4999,HR=5e4,Yv=36e5,zR=Object.defineProperty,$R=(e,t,r)=>t in e?zR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qv=(e,t,r)=>$R(e,typeof t!="symbol"?t+"":t,r),Ue=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ue||{});function WR(e){return e.nodeType===e.ELEMENT_NODE}function ga(e){return e?.host?.shadowRoot===e}function Sa(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function jR(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function GR(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(" ")+";"}function zc(e){try{let t=e.rules||e.cssRules;return t?jR(Array.from(t,y_).join("")):null}catch{return null}}function VR(e){let t="";for(let r=0;r<e.style.length;r++){let n=e.style,o=n[r],i=n.getPropertyPriority(o);t+=`${o}:${n.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function y_(e){let t;if(qR(e))try{t=zc(e.styleSheet)||GR(e)}catch{}else if(KR(e)){let r=e.cssText,n=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(r=VR(e)),n&&(r=YR(r)),n||o)return r}return t||e.cssText}function YR(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function qR(e){return"styleSheet"in e}function KR(e){return"selectorText"in e}var $c=class{constructor(){qv(this,"idNodeMap",new Map),qv(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function XR(){return new $c}function ru({maskInputOptions:e,tagName:t,type:r}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||r==="password"||t==="INPUT"&&!r&&e.text)}function va({isMasked:e,element:t,value:r,maskInputFn:n}){let o=r||"";return e?(n&&(o=n(o,t)),"*".repeat(o.length)):o}function Ui(e){return e.toLowerCase()}function Tf(e){return e.toUpperCase()}var Kv="__rrweb_original__";function JR(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let o=0;o<e.height;o+=r){let i=t.getImageData,s=Kv in i?i[Kv]:i;if(new Uint32Array(s.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer).some(l=>l!==0))return!1}return!0}function Kf(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ui(t):null}function Wc(e,t,r){return t==="INPUT"&&(r==="radio"||r==="checkbox")?e.getAttribute("value")||"":e.value}function v_(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i;return r.pathname.match(n)?.[1]??null}var Xv={};function __(e){let t=Xv[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return Xv[e]=n.bind(window)}function bf(...e){return __("setTimeout")(...e)}function E_(...e){return __("clearTimeout")(...e)}function T_(e){try{return e.contentDocument}catch{}}function ZR(e){try{return e.contentWindow}catch{}}var QR=1,eC=new RegExp("[^a-z0-9-_:]"),_a=-2;function Xf(){return QR++}function tC(e){if(e instanceof HTMLFormElement)return"form";let t=Ui(e.tagName);return eC.test(t)?"div":t}function rC(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ni,Jv,nC=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,oC=/^(?:[a-z+]+:)?\/\//i,iC=/^www\..*/i,sC=/^(data:)([^,]*),(.*)/i;function aC(e,t){if(!e||t.size===0)return e;try{let r=e.split(";"),n=[];for(let o of r){if(o=o.trim(),!o)continue;let i=o.indexOf(":");if(i===-1){n.push(o);continue}let s=o.slice(0,i).trim();t.has(s)||n.push(o)}return n.join("; ")+(n.length>0&&e.endsWith(";")?";":"")}catch(r){return console.warn("Error filtering CSS properties:",r),e}}function jc(e,t){return(e||"").replace(nC,(r,n,o,i,s,a)=>{let l=o||s||a,c=n||i||"";if(!l)return r;if(oC.test(l)||iC.test(l))return`url(${c}${l}${c})`;if(sC.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${rC(t)+l}${c})`;let d=t.split("/"),u=l.split("/");d.pop();for(let p of u)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${c}${d.join("/")}${c})`})}var lC=/^[^ \t\n\r\u000c]+/,cC=/^[, \t\n\r\u000c]+/;function uC(e,t){if(t.trim()==="")return t;let r=0;function n(i){let s,a=i.exec(t.substring(r));return a?(s=a[0],r+=s.length,s):""}let o=[];for(;n(cC),!(r>=t.length);){let i=n(lC);if(i.slice(-1)===",")i=Li(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Li(e,i);let a=!1;for(;;){let l=t.charAt(r);if(l===""){o.push((i+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){r+=1,o.push((i+s).trim());break}else l==="("&&(a=!0);s+=l,r+=1}}}return o.join(", ")}var Zv=new WeakMap;function Li(e,t){return!t||t.trim()===""?t:nu(e,t)}function dC(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function nu(e,t){let r=Zv.get(e);if(r||(r=e.createElement("a"),Zv.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function b_(e,t,r,n,o,i,s){if(!n)return n;if(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#"))return Li(e,n);if(r==="xlink:href"&&n[0]!=="#")return Li(e,n);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Li(e,n);if(r==="srcset")return uC(e,n);if(r==="style"){let a=jc(n,nu(e));return s&&s.size>0&&(a=aC(a,s)),a}else if(t==="object"&&r==="data")return Li(e,n);return typeof i=="function"?i(r,n,o):n}function k_(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function pC(e,t,r,n){try{if(n&&e.matches(n))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function fC(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}function Do(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:Do(e.parentNode,t,r,n+1)}function Oi(e,t){return r=>{let n=r;if(n===null)return!1;try{if(e){if(typeof e=="string"){if(n.matches(`.${e}`))return!0}else if(fC(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}function Bi(e,t,r,n,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let c=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let a=-1,l=-1;if(i){if(l=Do(s,Oi(n,o)),l<0)return!0;a=Do(s,Oi(t,r),l>=0?l:1/0)}else{if(a=Do(s,Oi(t,r)),a<0)return!1;l=Do(s,Oi(n,o),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function mC(e,t,r){let n=ZR(e);if(!n)return;let o=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){let a=bf(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{E_(a),o=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return bf(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function hC(e,t,r){let n=!1,o;try{o=e.sheet}catch{o=null}if(o)return;let i=bf(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{E_(i),n=!0,t()})}function gC(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:v,maskInputFn:I,dataURLOptions:m={},inlineImages:S,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:R=!1,ignoreCSSAttributes:E}=t,_=SC(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ue.Document,childNodes:[],compatMode:e.compatMode}:{type:Ue.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ue.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return vC(e,{doc:r,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:h,maskInputFn:I,dataURLOptions:m,inlineImages:S,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:R,rootId:_,maskTextClass:c,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:p,ignoreCSSAttributes:E});case e.TEXT_NODE:return yC(e,{doc:r,maskAllText:a,maskTextClass:c,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:p,maskTextFn:v,maskInputOptions:h,maskInputFn:I,rootId:_});case e.CDATA_SECTION_NODE:return{type:Ue.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Ue.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function SC(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function yC(e,t){let{maskAllText:r,maskTextClass:n,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:d}=t,u=e.parentNode&&e.parentNode.tagName,p=e.textContent,f=u==="STYLE"?!0:void 0,h=u==="SCRIPT"?!0:void 0,v=u==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=zc(e.parentNode.sheet))}catch(m){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`,e)}p=jc(p,nu(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");let I=Bi(e,n,i,o,s,r);if(!f&&!h&&!v&&p&&I&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),v&&p&&(l.textarea||I)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*")),u==="OPTION"&&p){let m=ru({type:null,tagName:u,maskInputOptions:l});p=va({isMasked:Bi(e,n,i,o,s,m),element:e,value:p,maskInputFn:c})}return{type:Ue.Text,textContent:p||"",isStyle:f,rootId:d}}function vC(e,t){let{doc:r,blockClass:n,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:d={},inlineImages:u,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:v,maskTextClass:I,unmaskTextClass:m,maskTextSelector:S,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,R=pC(e,n,o,i),E=tC(e),_={},k=e.attributes.length;for(let w=0;w<k;w++){let L=e.attributes[w];L.name&&!k_(E,L.name,L.value)&&(_[L.name]=b_(r,E,Ui(L.name),L.value,e,l,b))}if(E==="link"&&s){let w=Array.from(r.styleSheets).find($=>$.href===e.href),L=null;w&&(L=zc(w)),L&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=jc(L,w.href))}if(E==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let w=zc(e.sheet);w&&(_._cssText=jc(w,nu(r)))}if(E==="input"||E==="textarea"||E==="select"||E==="option"){let w=e,L=Kf(w),$=Wc(w,Tf(E),L),Y=w.checked;if(L!=="submit"&&L!=="button"&&$){let G=Bi(w,I,S,m,y,ru({type:L,tagName:Tf(E),maskInputOptions:a}));_.value=va({isMasked:G,element:w,value:$,maskInputFn:c})}Y&&(_.checked=Y)}if(E==="option"&&(e.selected&&!a.select?_.selected=!0:delete _.selected),E==="canvas"&&p){if(e.__context==="2d")JR(e)||(_.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let w=e.toDataURL(d.type,d.quality),L=r.createElement("canvas");L.width=e.width,L.height=e.height;let $=L.toDataURL(d.type,d.quality);w!==$&&(_.rr_dataURL=w)}}if(E==="img"&&u){Ni||(Ni=r.createElement("canvas"),Jv=Ni.getContext("2d"));let w=e,L=w.currentSrc||w.getAttribute("src")||"<unknown-src>",$=w.crossOrigin,Y=()=>{w.removeEventListener("load",Y);try{Ni.width=w.naturalWidth,Ni.height=w.naturalHeight,Jv.drawImage(w,0,0),_.rr_dataURL=Ni.toDataURL(d.type,d.quality)}catch(G){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?Y():w.addEventListener("load",Y);return}else console.warn(`Cannot inline img src=${L}! Error: ${G}`)}w.crossOrigin==="anonymous"&&($?_.crossOrigin=$:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?Y():w.addEventListener("load",Y)}if((E==="audio"||E==="video")&&(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),R){let{width:w,height:L}=e.getBoundingClientRect();_={class:_.class,rr_width:`${w}px`,rr_height:`${L}px`}}E==="iframe"&&!f(_.src)&&(!R&&!T_(e)&&(_.rr_src=_.src),delete _.src);let z;try{customElements.get(E)&&(z=!0)}catch{}return{type:Ue.Element,tagName:E,attributes:_,childNodes:[],isSVG:dC(e)||void 0,needBlock:R,rootId:v,isCustom:z}}function me(e){return e==null?"":e.toLowerCase()}function _C(e,t){if(t.comment&&e.type===Ue.Comment)return!0;if(e.type===Ue.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&v_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(me(e.attributes.name).match(/^msapplication-tile(image|color)$/)||me(e.attributes.name)==="application-name"||me(e.attributes.rel)==="icon"||me(e.attributes.rel)==="apple-touch-icon"||me(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&me(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(me(e.attributes.property).match(/^(og|twitter|fb):/)||me(e.attributes.name).match(/^(og|twitter):/)||me(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(me(e.attributes.name)==="robots"||me(e.attributes.name)==="googlebot"||me(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(me(e.attributes.name)==="author"||me(e.attributes.name)==="generator"||me(e.attributes.name)==="framework"||me(e.attributes.name)==="publisher"||me(e.attributes.name)==="progid"||me(e.attributes.property).match(/^article:/)||me(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(me(e.attributes.name)==="google-site-verification"||me(e.attributes.name)==="yandex-verification"||me(e.attributes.name)==="csrf-token"||me(e.attributes.name)==="p:domain_verify"||me(e.attributes.name)==="verify-v1"||me(e.attributes.name)==="verification"||me(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pi(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:u,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:v,maskTextFn:I,maskInputFn:m,slimDOMOptions:S,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:R=!1,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k=5e3,onBlockedImageLoad:z,onStylesheetLoad:w,stylesheetLoadTimeout:L=5e3,keepIframeSrcFn:$=()=>!1,newlyAddedElement:Y=!1,ignoreCSSAttributes:G}=t,{preserveWhiteSpace:be=!0}=t,ce=gC(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:u,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:v,maskTextFn:I,maskInputFn:m,dataURLOptions:y,inlineImages:b,recordCanvas:R,keepIframeSrcFn:$,newlyAddedElement:Y,ignoreCSSAttributes:G});if(!ce)return console.warn(e,"not serialized"),null;let ye;n.hasNode(e)?ye=n.getId(e):_C(ce,S)||!be&&ce.type===Ue.Text&&!ce.isStyle&&!ce.textContent.trim().length?ye=_a:ye=Xf();let N=Object.assign(ce,{id:ye});if(n.add(e,N),ye===_a)return null;E&&E(e);let oe=!p;if(N.type===Ue.Element){oe=oe&&!N.needBlock;let j=e.shadowRoot;j&&Sa(j)&&(N.isShadowHost=!0)}if((N.type===Ue.Document||N.type===Ue.Element)&&oe){S.headWhitespace&&N.type===Ue.Element&&N.tagName==="head"&&(be=!1);let j={doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:u,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:v,maskTextFn:I,maskInputFn:m,slimDOMOptions:S,dataURLOptions:y,inlineImages:b,recordCanvas:R,preserveWhiteSpace:be,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k,onBlockedImageLoad:z,onStylesheetLoad:w,stylesheetLoadTimeout:L,keepIframeSrcFn:$,ignoreCSSAttributes:G},K=e.childNodes?Array.from(e.childNodes):[];for(let pe of K){let fe=Pi(pe,j);fe&&N.childNodes.push(fe)}if(WR(e)&&e.shadowRoot)for(let pe of Array.from(e.shadowRoot.childNodes)){let fe=Pi(pe,j);fe&&(Sa(e.shadowRoot)&&(fe.isShadow=!0),N.childNodes.push(fe))}}if(e.parentNode&&ga(e.parentNode)&&Sa(e.parentNode)&&(N.isShadow=!0),N.type===Ue.Element&&N.tagName==="iframe"&&!N.needBlock&&mC(e,()=>{let j=T_(e);if(j&&_){let K=Pi(j,{doc:j,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:v,maskTextFn:I,maskInputFn:m,slimDOMOptions:S,dataURLOptions:y,inlineImages:b,recordCanvas:R,preserveWhiteSpace:be,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k,onStylesheetLoad:w,stylesheetLoadTimeout:L,keepIframeSrcFn:$,ignoreCSSAttributes:G});K&&_(e,K)}},k),N.type===Ue.Element&&N.tagName==="img"&&!e.complete&&N.needBlock){let j=e,K=()=>{if(j.isConnected&&!j.complete&&z)try{let pe=j.getBoundingClientRect();pe.width>0&&pe.height>0&&z(j,N,pe)}catch{}j.removeEventListener("load",K)};j.isConnected&&j.addEventListener("load",K)}return N.type===Ue.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&v_(N.attributes.href)==="css")&&hC(e,()=>{if(w){let j=Pi(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:v,maskTextFn:I,maskInputFn:m,slimDOMOptions:S,dataURLOptions:y,inlineImages:b,recordCanvas:R,preserveWhiteSpace:be,onSerialize:E,onIframeLoad:_,iframeLoadTimeout:k,onStylesheetLoad:w,stylesheetLoadTimeout:L,keepIframeSrcFn:$,ignoreCSSAttributes:G});j&&w(e,j)}},L),N.type===Ue.Element&&delete N.needBlock,N}function EC(e,t){let{mirror:r=new $c,blockClass:n="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:d=null,inlineStylesheet:u=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:v,maskTextFn:I,maskInputFn:m,slimDOM:S=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:R,onIframeLoad:E,iframeLoadTimeout:_,onBlockedImageLoad:k,onStylesheetLoad:z,stylesheetLoadTimeout:w,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:$=new Set([])}=t||{};return Pi(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:u,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:v,maskTextFn:I,maskInputFn:m,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:y,inlineImages:p,recordCanvas:f,preserveWhiteSpace:b,onSerialize:R,onIframeLoad:E,iframeLoadTimeout:_,onBlockedImageLoad:k,onStylesheetLoad:z,stylesheetLoadTimeout:w,keepIframeSrcFn:L,newlyAddedElement:!1,ignoreCSSAttributes:$})}function vt(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Ai=`Please stop import mirror directly. Instead of that,\r
|
|
29
29
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
30
|
-
or you can use record.mirror to access the mirror instance during recording.`,Zv={map:{},getId(){return console.error(Ci),-1},getNode(){return console.error(Ci),null},removeNodeFromMap(){console.error(Ci)},has(){return console.error(Ci),!1},reset(){console.error(Ci)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Zv=new Proxy(Zv,{get(e,t,r){return t==="map"&&console.error(Ci),Reflect.get(e,t,r)}}));function Ea(e,t,r={}){let n=null,o=0;return function(...i){let s=Date.now();!o&&r.leading===!1&&(o=s);let a=t-(s-o),l=this;a<=0||a>t?(n&&(kN(n),n=null),o=s,e.apply(l,i)):!n&&r.trailing!==!1&&(n=ou(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(l,i)},a))}}function x_(e,t,r,n,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(s){ou(()=>{r.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>x_(e,t,i||{},!0)}function Jf(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}var Gc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gc=()=>new Date().getTime());function k_(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function w_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function R_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function N_(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function zt(e,t,r,n,o){if(!e)return!1;let i=N_(e);if(!i)return!1;let s=Li(t,r);if(!o){let c=n&&i.matches(n);return s(i)&&!c}let a=Do(i,s),l=-1;return a<0?!1:(n&&(l=Do(i,Li(null,n))),a>-1&&l<0?!0:a<l)}function EN(e,t){return t.getId(e)!==-1}function Sf(e,t){return t.getId(e)===_a}function C_(e,t){if(ga(e))return!1;let r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?C_(e.parentNode,t):!0:!0}function If(e){return!!e.changedTouches}function TN(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=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function A_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function M_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function xf(e){return!!e?.shadowRoot}var kf=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function L_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function bN(e){let t=e,r;for(;r=L_(t);)t=r;return t}function IN(e){let t=e.ownerDocument;if(!t)return!1;let r=bN(e);return t.contains(r)}function O_(e){let t=e.ownerDocument;return t?t.contains(e)||IN(e):!1}var e_={};function Qf(e){let t=e_[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return e_[e]=n.bind(window)}function xN(...e){return Qf("requestAnimationFrame")(...e)}function ou(...e){return Qf("setTimeout")(...e)}function kN(...e){return Qf("clearTimeout")(...e)}var W=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(W||{}),z=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(z||{}),St=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(St||{}),dn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(dn||{}),Ai=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ai||{}),ya;function wN(e){ya=e}function RN(){ya=void 0}var Q=e=>ya?((...r)=>{try{return e(...r)}catch(n){if(ya&&ya(n)===!0)return()=>{};throw n}}):e,t_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ma=0;ma<t_.length;ma++)NN[t_.charCodeAt(ma)]=ma;var ma,Vc=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Zf(e){try{return e.contentDocument}catch{}}function Ta(e){try{return e.contentWindow}catch{}}var wf=class{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{let r=new CSSStyleSheet;r.replaceSync(`x { ${t} }`);let n=r.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(t){let r=this.getUnattachedDoc().createElement("span");return r.setAttribute("style",t),r.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function r_(e){return"__ln"in e}var Rf=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&r_(t.previousSibling)){let n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&r_(t.nextSibling)&&t.nextSibling.__ln.previous){let n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){let r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},n_=(e,t)=>`${e}@${t}`,Nf=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,n=new Rf,o=l=>{let c=l,u=_a;for(;u===_a;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=l=>{if(!l.parentNode||!O_(l))return;let c=ga(l.parentNode)?this.mirror.getId(L_(l)):this.mirror.getId(l.parentNode),u=o(l);if(c===-1||u===-1)return n.addNode(l);let d=Oi(l,{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:p=>{A_(p,this.mirror)&&!zt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),M_(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),xf(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(zt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(p,f);let h=Ta(p);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:y})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${y}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:c,nextId:u,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)o_(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(let l of this.addedSet)!i_(this.droppedSet,l)&&!o_(this.removes,l,this.mirror)||i_(this.movedSet,l)?i(l):this.droppedSet.add(l);let s=null;for(;n.length;){let l=null;if(s){let c=this.mirror.getId(s.value.parentNode),u=o(s.value);c!==-1&&u!==-1&&(l=s)}if(!l){let c=n.tail;for(;c;){let u=c;if(c=c.previous,u){let d=this.mirror.getId(u.value.parentNode);if(o(u.value)===-1)continue;if(d!==-1){l=u;break}else{let f=u.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=f.parentNode.host;if(this.mirror.getId(h)!==-1){l=u;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),i(l.value)}let a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:c}=l;if(typeof c.style=="string"){let u=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!Sf(t.target,this.mirror))switch(t.type){case"characterData":{let r=t.target.textContent;!zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Ui(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r,N_(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,o=t.target.getAttribute(n);if(n==="value"){let s=Kf(r),a=r.tagName;o=jc(r,a,s);let l=ru({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),c=Ui(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);o=va({isMasked:c,element:r,value:o,maskInputFn:this.maskInputFn})}if(zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(o))if(!Zf(r))n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!I_(r.tagName,n)&&(i.attributes[n]=b_(this.doc,Pi(r.tagName),Pi(n),o,r,this.maskAttributeFn),n==="style")){let s=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(let a of Array.from(r.style)){let l=r.style.getPropertyValue(a),c=r.style.getPropertyPriority(a);l!==(s?.getPropertyValue(a)||"")||c!==(s?.getPropertyPriority(a)||"")?c===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,c]:i._unchangedStyles[a]=[l,c]}if(s)for(let a of Array.from(s))r.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let n=this.mirror.getId(r),o=ga(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Sf(r,this.mirror)||!EN(r,this.mirror)||(this.addedSet.has(r)?(Cf(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||C_(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[n_(n,o)]?Cf(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:ga(t.target)&&Sa(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Sf(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[n_(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);zt(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(n=>this.genAdds(n)),xf(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}}}init(t){["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(r=>{this[r]=t[r]}),this.styleDeclarationParser=new wf(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 Cf(e,t){e.delete(t),t.childNodes?.forEach(r=>Cf(e,r))}function o_(e,t,r){return e.length===0?!1:CN(e,t,r)}function CN(e,t,r){let n=t.parentNode;for(;n;){let o=r.getId(n);if(e.some(i=>i.id===o))return!0;n=n.parentNode}return!1}function i_(e,t){return e.size===0?!1:D_(e,t)}function D_(e,t){let{parentNode:r}=t;return r?e.has(r)?!0:D_(e,r):!1}var Di=[];function wa(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 P_(e,t){let r=new Nf;Di.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver,o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(n=window[o]);let i=new n(Q(s=>{e.onMutation&&e.onMutation(s)===!1||r.processMutations.bind(r)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function AN({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,l=Ea(Q(d=>{let p=Date.now()-a;e(s.map(f=>(f.timeOffset-=p,f)),d),s=[],a=null}),i),c=Q(Ea(Q(d=>{let p=wa(d),{clientX:f,clientY:h}=If(d)?d.changedTouches[0]:d;a||(a=Gc()),s.push({x:f,y:h,id:n.getId(p),timeOffset:Gc()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?z.Drag:d instanceof MouseEvent?z.MouseMove:z.TouchMove)}),o,{trailing:!1})),u=[yt("mousemove",c,r),yt("touchmove",c,r),yt("drag",c,r)];return Q(()=>{u.forEach(d=>d())})}function MN({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[],c=null,u=d=>p=>{let f=wa(p);if(zt(f,n,o,i,!0))return;let h=null,y=d;if("pointerType"in p){switch(p.pointerType){case"mouse":h=dn.Mouse;break;case"touch":h=dn.Touch;break;case"pen":h=dn.Pen;break}h===dn.Touch?St[d]===St.MouseDown?y="TouchStart":St[d]===St.MouseUp&&(y="TouchEnd"):dn.Pen}else If(p)&&(h=dn.Touch);h!==null?(c=h,(y.startsWith("Touch")&&h===dn.Touch||y.startsWith("Mouse")&&h===dn.Mouse)&&(h=null)):St[d]===St.Click&&(h=c,c=null);let E=If(p)?p.changedTouches[0]:p;if(!E)return;let m=r.getId(f),{clientX:g,clientY:v}=E;Q(e)({type:St[y],id:m,x:g,y:v,...h!==null&&{pointerType:h}})};return Object.keys(St).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let p=Pi(d),f=u(d);if(window.PointerEvent)switch(St[d]){case St.MouseDown:case St.MouseUp:p=p.replace("mouse","pointer");break;case St.TouchStart:case St.TouchEnd:return}l.push(yt(p,f,t))}),Q(()=>{l.forEach(d=>d())})}function U_({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){let a=Q(Ea(Q(l=>{let c=wa(l);if(!c||zt(c,n,o,i,!0))return;let u=r.getId(c);if(c===t&&t.defaultView){let d=k_(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return yt("scroll",a,t)}function LN({viewportResizeCb:e},{win:t}){let r=-1,n=-1,o=Q(Ea(Q(()=>{let i=w_(),s=R_();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return yt("resize",o,t)}var ON=["INPUT","TEXTAREA","SELECT"],s_=new WeakMap;function DN({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:y}){function E(_){let I=wa(_),j=_.isTrusted,x=I&&Tf(I.tagName);if(x==="OPTION"&&(I=I.parentElement),!I||!x||ON.indexOf(x)<0||zt(I,n,o,i,!0))return;let D=I;if(D.classList.contains(s)||a&&D.matches(a))return;let Y=Kf(I),ee=jc(D,x,Y),G=!1,Be=ru({maskInputOptions:l,tagName:x,type:Y}),ce=Ui(I,p,h,f,y,Be);(Y==="radio"||Y==="checkbox")&&(G=I.checked),ee=va({isMasked:ce,element:I,value:ee,maskInputFn:c}),m(I,d?{text:ee,isChecked:G,userTriggered:j}:{text:ee,isChecked:G});let ye=I.name;Y==="radio"&&ye&&G&&t.querySelectorAll(`input[type="radio"][name="${ye}"]`).forEach(C=>{if(C!==I){let oe=va({isMasked:ce,element:C,value:jc(C,x,Y),maskInputFn:c});m(C,d?{text:oe,isChecked:!G,userTriggered:!1}:{text:oe,isChecked:!G})}})}function m(_,I){let j=s_.get(_);if(!j||j.text!==I.text||j.isChecked!==I.isChecked){s_.set(_,I);let x=r.getId(_);Q(e)({...I,id:x})}}let v=(u.input==="last"?["change"]:["input","change"]).map(_=>yt(_,Q(E),t)),b=t.defaultView;if(!b)return()=>{v.forEach(_=>_())};let k=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return k&&k.set&&v.push(...w.map(_=>x_(_[0],_[1],{set(){Q(E)({target:this,isTrusted:!1})}},!1,b))),Q(()=>{v.forEach(_=>_())})}function Yc(e){let t=[];function r(n,o){if(Uc("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Uc("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Uc("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Uc("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(s)}return o}return r(e,t)}function Pn(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function PN({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Q((u,d,p)=>{let[f,h]=p,{id:y,styleId:E}=Pn(d,t,r.styleMirror);return(y&&y!==-1||E&&E!==-1)&&e({id:y,styleId:E,adds:[{rule:f,index:h}]}),u.apply(d,p)})});let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Q((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Pn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,removes:[{index:f}]}),u.apply(d,p)})});let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Q((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Pn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replace:f}),u.apply(d,p)})}));let a;n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Q((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Pn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replaceSync:f}),u.apply(d,p)})}));let l={};Bc("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(Bc("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),Bc("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),Bc("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:Q((p,f,h)=>{let[y,E]=h,{id:m,styleId:g}=Pn(f.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:y,index:[...Yc(f),E||0]}]}),p.apply(f,h)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:Q((p,f,h)=>{let[y]=h,{id:E,styleId:m}=Pn(f.parentStyleSheet,t,r.styleMirror);return(E&&E!==-1||m&&m!==-1)&&e({id:E,styleId:m,removes:[{index:[...Yc(f),y]}]}),p.apply(f,h)})})}),Q(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=i,s&&(n.CSSStyleSheet.prototype.replace=s),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function B_({mirror:e,stylesheetManager:t},r){let n=null;r.nodeName==="#document"?n=e.getId(r):n=e.getId(r.host);let o=r.nodeName==="#document"?r.defaultView?.Document:r.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!o||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){let a=i.set?.call(this,s);if(n!==null&&n!==-1)try{t.adoptStyleSheets(s,n)}catch{}return a}}),Q(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function UN({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Q((a,l,c)=>{let[u,d,p]=c;if(r.has(u))return i.apply(l,[u,d,p]);let{id:f,styleId:h}=Pn(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:u,value:d,priority:p},index:Yc(l.parentRule)}),a.apply(l,c)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Q((a,l,c)=>{let[u]=c;if(r.has(u))return s.apply(l,[u]);let{id:d,styleId:p}=Pn(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(d&&d!==-1||p&&p!==-1)&&e({id:d,styleId:p,remove:{property:u},index:Yc(l.parentRule)}),a.apply(l,c)})}),Q(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function BN({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:o,sampling:i,doc:s}){let a=Q(c=>Ea(Q(u=>{let d=wa(u);if(!d||zt(d,t,r,n,!0))return;let{currentTime:p,volume:f,muted:h,playbackRate:y}=d;e({type:c,id:o.getId(d),currentTime:p,volume:f,muted:h,playbackRate:y})}),i.media||500)),l=[yt("play",a(Ai.Play),s),yt("pause",a(Ai.Pause),s),yt("seeked",a(Ai.Seeked),s),yt("volumechange",a(Ai.VolumeChange),s),yt("ratechange",a(Ai.RateChange),s)];return Q(()=>{l.forEach(c=>c())})}function FN({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(l,c,u){let d=new i(l,c,u);return o.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};let s=Jf(t.fonts,"add",function(a){return function(l){return ou(Q(()=>{let c=o.get(l);c&&(e(c),o.delete(l))}),0),a.apply(this,[l])}});return n.push(()=>{r.FontFace=i}),n.push(s),Q(()=>{n.forEach(a=>a())})}function HN(e){let{doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,l=Q(()=>{let c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;let u=[],d=c.rangeCount||0;for(let p=0;p<d;p++){let f=c.getRangeAt(p),{startContainer:h,startOffset:y,endContainer:E,endOffset:m}=f;zt(h,n,o,i,!0)||zt(E,n,o,i,!0)||u.push({start:r.getId(h),startOffset:y,end:r.getId(E),endOffset:m})}s({ranges:u})});return l(),yt("selectionchange",l)}function zN({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Jf(r.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function $N(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};let n;e.recordDOM&&(n=P_(e,e.doc));let o=AN(e),i=MN(e),s=U_(e),a=LN(e,{win:r}),l=DN(e),c=BN(e),u=()=>{},d=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(u=PN(e,{win:r}),d=B_(e,e.doc),p=UN(e,{win:r}),e.collectFonts&&(f=FN(e)));let h=HN(e),y=zN(e),E=[];for(let m of e.plugins)E.push(m.observer(m.callback,r,m.options));return Q(()=>{Di.forEach(m=>m.reset()),n?.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),p(),f(),h(),y(),E.forEach(m=>m())})}function Uc(e){return typeof window[e]<"u"}function Bc(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var ba=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,o){let i=n||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(r);return a||(a=this.generateIdFn(),i.set(r,a),s.set(a,r)),a}getIds(t,r){let n=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,o))}getRemoteId(t,r,n){let o=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let i=o.get(r);return i||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getRemoteId(t,o,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},Af=class{constructor(){this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Mf=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ba(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0);let r=Ta(t);r&&this.crossOriginIframeMap.set(r,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&Ta(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);let n=Zf(t);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){switch(r.type){case W.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:W.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case W.Meta:case W.Load:case W.DomContentLoaded:return!1;case W.Plugin:return r;case W.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case W.IncrementalSnapshot:switch(r.data.source){case z.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(n.node,o)}),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case z.Drag:case z.TouchMove:case z.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(r.data,t,["id"]),r;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case z.Font:return r;case z.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),r;case z.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),r.data.styles?.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),r}}return!1}replace(t,r,n,o){for(let i of o)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Pe.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},Lf=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Of=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Sa(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let n=P_({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(U_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),ou(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(B_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){let r=Zf(t),n=Ta(t);!r||!n||this.patchAttachShadow(n.Element,r)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(Jf(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&O_(this)&&n.addShadowRoot(this.shadowRoot,r),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},Df=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new kf,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:y_(a),index:l}))})),n.styleIds.push(s)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Pf=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.active||(this.active=!0,xN(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Ae,qc;try{if(Array.from([1],e=>e*2)[0]!==2){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)}var br=KR();function Ir(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:y,maskInputOptions:E,slimDOMOptions:m,maskAttributeFn:g,maskInputFn:v,maskTextFn:b,maxCanvasSize:k=null,packFn:w,sampling:_={},dataURLOptions:I={},mousemoveWait:j,recordDOM:x=!0,recordCanvas:D=!1,recordCrossOriginIframes:Y=!1,recordAfter:ee=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:Be=!1,inlineImages:ce=!1,plugins:ye,keepIframeSrcFn:C=()=>!1,ignoreCSSAttributes:oe=new Set([]),errorHandler:$,onMutation:q,getCanvasManager:pe}=e;wN($);let fe=Y?window.parent===window:!0,Pt=!1;if(!fe)try{window.parent.document&&(Pt=!1)}catch{Pt=!0}if(fe&&!t)throw new Error("emit function is required");if(!fe&&!Pt)return()=>{};j!==void 0&&_.mousemove===void 0&&(_.mousemove=j),br.reset();let pr=y===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:E!==void 0?E:{},Lr=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};TN();let Kr,so=0,Ss=re=>{for(let fr of ye||[])fr.eventProcessor&&(re=fr.eventProcessor(re));return w&&!Pt&&(re=w(re)),re};Ae=(re,fr)=>{let K=re;if(K.timestamp=Gc(),Di[0]?.isFrozen()&&K.type!==W.FullSnapshot&&!(K.type===W.IncrementalSnapshot&&K.data.source===z.Mutation)&&Di.forEach(Ye=>Ye.unfreeze()),fe)t?.(Ss(K),fr);else if(Pt){let Ye={type:"rrweb",event:Ss(K),origin:window.location.origin,isCheckout:fr};window.parent.postMessage(Ye,"*")}if(K.type===W.FullSnapshot)Kr=K,so=0;else if(K.type===W.IncrementalSnapshot){if(K.data.source===z.Mutation&&K.data.isAttachIframe)return;so++;let Ye=n&&so>=n,X=r&&Kr&&K.timestamp-Kr.timestamp>r;(Ye||X)&&Pd(!0)}};let ao=re=>{Ae({type:W.IncrementalSnapshot,data:{source:z.Mutation,...re}})},Pg=re=>Ae({type:W.IncrementalSnapshot,data:{source:z.Scroll,...re}}),RI=re=>Ae({type:W.IncrementalSnapshot,data:{source:z.CanvasMutation,...re}}),NI=re=>Ae({type:W.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...re}}),lo=new Df({mutationCb:ao,adoptedStyleSheetCb:NI}),co=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Af:new Mf({mirror:br,mutationCb:ao,stylesheetManager:lo,recordCrossOriginIframes:Y,wrappedEmit:Ae});for(let re of ye||[])re.getMirror&&re.getMirror({nodeMirror:br,crossOriginIframeMirror:co.crossOriginIframeMirror,crossOriginIframeStyleMirror:co.crossOriginIframeStyleMirror});let Od=new Pf,Dd=WN(pe,{mirror:br,win:window,mutationCb:re=>Ae({type:W.IncrementalSnapshot,data:{source:z.CanvasMutation,...re}}),recordCanvas:D,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:k,sampling:_.canvas,dataURLOptions:I,errorHandler:$}),kl=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lf:new Of({mutationCb:ao,scrollCb:Pg,bypassOptions:{onMutation:q,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:pr,dataURLOptions:I,maskAttributeFn:g,maskTextFn:b,maskInputFn:v,recordCanvas:D,inlineImages:ce,sampling:_,slimDOMOptions:Lr,iframeManager:co,stylesheetManager:lo,canvasManager:Dd,keepIframeSrcFn:C,processedNodeManager:Od,ignoreCSSAttributes:oe},mirror:br}),Pd=(re=!1)=>{if(!x)return;Ae({type:W.Meta,data:{href:window.location.href,width:R_(),height:w_()}},re),lo.reset(),kl.init(),Di.forEach(K=>K.lock());let fr=_N(document,{mirror:br,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:pr,maskAttributeFn:g,maskInputFn:v,maskTextFn:b,slimDOM:Lr,dataURLOptions:I,recordCanvas:D,inlineImages:ce,onSerialize:K=>{A_(K,br)&&co.addIframe(K),M_(K,br)&&lo.trackLinkElement(K),xf(K)&&kl.addShadowRoot(K.shadowRoot,document)},onIframeLoad:(K,Ye)=>{co.attachIframe(K,Ye);let X=Ta(K);X&&Dd.addWindow(X),kl.observeAttachShadow(K)},onStylesheetLoad:(K,Ye)=>{lo.attachLinkElement(K,Ye)},onBlockedImageLoad:(K,Ye,{width:X,height:ys})=>{ao({adds:[],removes:[],texts:[],attributes:[{id:Ye.id,attributes:{style:{width:`${X}px`,height:`${ys}px`}}}]})},keepIframeSrcFn:C,ignoreCSSAttributes:oe});if(!fr)return console.warn("Failed to snapshot the document");Ae({type:W.FullSnapshot,data:{node:fr,initialOffset:k_(window)}}),Di.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&lo.adoptStyleSheets(document.adoptedStyleSheets,br.getId(document))};qc=Pd;try{let re=[],fr=Ye=>Q($N)({onMutation:q,mutationCb:ao,mousemoveCb:(X,ys)=>Ae({type:W.IncrementalSnapshot,data:{source:ys,positions:X}}),mouseInteractionCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.MouseInteraction,...X}}),scrollCb:Pg,viewportResizeCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.ViewportResize,...X}}),inputCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.Input,...X}}),mediaInteractionCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.MediaInteraction,...X}}),styleSheetRuleCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.StyleSheetRule,...X}}),styleDeclarationCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.StyleDeclaration,...X}}),canvasMutationCb:RI,fontCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.Font,...X}}),selectionCb:X=>{Ae({type:W.IncrementalSnapshot,data:{source:z.Selection,...X}})},customElementCb:X=>{Ae({type:W.IncrementalSnapshot,data:{source:z.CustomElement,...X}})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:pr,inlineStylesheet:h,sampling:_,recordDOM:x,recordCanvas:D,inlineImages:ce,userTriggeredOnInput:G,collectFonts:Be,doc:Ye,maskAttributeFn:g,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:C,blockSelector:i,unblockSelector:s,slimDOMOptions:Lr,dataURLOptions:I,mirror:br,iframeManager:co,stylesheetManager:lo,shadowDomManager:kl,processedNodeManager:Od,canvasManager:Dd,ignoreCSSAttributes:oe,plugins:ye?.filter(X=>X.observer)?.map(X=>({observer:X.observer,options:X.options,callback:ys=>Ae({type:W.Plugin,data:{plugin:X.name,payload:ys}})}))||[]},{});co.addLoadListener(Ye=>{try{re.push(fr(Ye.contentDocument))}catch(X){console.warn(X)}});let K=()=>{Pd(),re.push(fr(document))};return document.readyState==="interactive"||document.readyState==="complete"?K():(re.push(yt("DOMContentLoaded",()=>{Ae({type:W.DomContentLoaded,data:{}}),ee==="DOMContentLoaded"&&K()})),re.push(yt("load",()=>{Ae({type:W.Load,data:{}}),ee==="load"&&K()},window))),()=>{re.forEach(Ye=>Ye()),Od.destroy(),qc=void 0,RN()}}catch(re){console.warn(re)}}function jN(e){if(!qc)throw new Error("please take full snapshot after start recording");qc(e)}Ir.mirror=br;Ir.takeFullSnapshot=jN;function WN(e,t){try{return e?e(t):new Vc}catch{return console.warn("Unable to initialize CanvasManager"),new Vc}}var a_;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(a_||(a_={}));var GN=3,VN=5;function em(e){return e>9999999999?e:e*1e3}function yf(e){return e>9999999999?e/1e3:e}function Ra(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:W.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ot(t,10,1e3)}}),t.category==="console")))}var YN="button,a";function F_(e){return e.closest(YN)||e}function H_(e){let t=z_(e);return!t||!(t instanceof Element)?t:F_(t)}function z_(e){return qN(e)?e.target:e}function qN(e){return typeof e=="object"&&!!e&&"target"in e}var Un;function KN(e){return Un||(Un=[],XN()),Un.push(e),()=>{let t=Un?Un.indexOf(e):-1;t>-1&&Un.splice(t,1)}}function XN(){Ne(he,"open",function(e){return function(...t){if(Un)try{Un.forEach(r=>r())}catch{}return e.apply(he,t)}})}var JN=new Set([z.Mutation,z.StyleSheetRule,z.StyleDeclaration,z.AdoptedStyleSheet,z.CanvasMutation,z.Selection,z.MediaInteraction]);function QN(e,t,r){e.handleClick(t,r)}var Uf=class{constructor(t,r,n=Ra){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=r.timeout/1e3,this._threshold=r.threshold/1e3,this._scrollTimeout=r.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=r.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let t=KN(()=>{this._lastMutation=l_()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,r){if(eC(r,this._ignoreSelector)||!tC(t))return;let n={timestamp:yf(t.timestamp),clickBreadcrumb:t,clickCount:0,node:r};this._clicks.some(o=>o.node===n.node&&Math.abs(o.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=yf(t)}registerScroll(t=Date.now()){this._lastScroll=yf(t)}registerClick(t){let r=F_(t);this._handleMultiClick(r)}_handleMultiClick(t){this._getClicks(t).forEach(r=>{r.clickCount++})}_getClicks(t){return this._clicks.filter(r=>r.node===t)}_checkClicks(){let t=[],r=l_();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=r&&t.push(n)});for(let n of t){let o=this._clicks.indexOf(n);o>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let r=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!n&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:s||1}};this._addBreadcrumbEvent(r,u);return}if(s>1){let l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(r,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Oo(()=>this._checkClicks(),1e3)}},ZN=["A","BUTTON","INPUT"];function eC(e,t){return!!(!ZN.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function tC(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function l_(){return Date.now()/1e3}function rC(e,t){try{if(!nC(t))return;let{source:r}=t.data;if(JN.has(r)&&e.registerMutation(t.timestamp),r===z.Scroll&&e.registerScroll(t.timestamp),oC(t)){let{type:n,id:o}=t.data,i=Ir.mirror.getNode(o);i instanceof HTMLElement&&n===St.Click&&e.registerClick(i)}}catch{}}function nC(e){return e.type===GN}function oC(e){return e.data.source===z.MouseInteraction}function zr(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var iu=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(iu||{}),iC=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function sC(e){let t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(let r in e)if(iC.has(r)){let n=r;(r==="data-testid"||r==="data-test-id")&&(n="testId"),t[n]=e[r]}return t}var aC=e=>t=>{if(!e.isEnabled())return;let r=lC(t);if(!r)return;let n=t.name==="click",o=n?t.event:void 0;n&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&QN(e.clickDetector,r,H_(t.event)),Ra(e,r)};function $_(e,t){let r=Ir.mirror.getId(e),n=r&&Ir.mirror.getNode(r),o=n&&Ir.mirror.getMeta(n),i=o&&uC(o)?o:null;return{message:t,data:i?{nodeId:r,node:{id:r,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===iu.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:sC(i.attributes)}}:{}}}function lC(e){let{target:t,message:r}=cC(e);return zr({category:`ui.${e.name}`,...$_(t,r)})}function cC(e){let t=e.name==="click",r,n=null;try{n=t?H_(e.event):z_(e.event),r=le(n,{maxStringLength:200})||"<unknown>"}catch{r="<unknown>"}return{target:n,message:r}}function uC(e){return e.type===iu.Element}function dC(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=pC(t);r&&Ra(e,r)}function pC(e){let{metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i,target:s}=e;if(!s||fC(s)||!i)return null;let a=t||n||o,l=i.length===1;if(!a&&l)return null;let c=le(s,{maxStringLength:200})||"<unknown>",u=$_(s,c);return zr({category:"ui.keyDown",message:c,data:{...u.data,metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i}})}function fC(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var mC={resource:vC,paint:SC,navigation:yC};function vf(e,t){return({metric:r})=>{t.replayPerformanceEntries.push(e(r))}}function hC(e){return e.map(gC).filter(Boolean)}function gC(e){let t=mC[e.entryType];return t?t(e):null}function Bi(e){return((ue()||he.performance.timeOrigin)+e)/1e3}function SC(e){let{duration:t,entryType:r,name:n,startTime:o}=e,i=Bi(o);return{type:r,name:n,start:i,end:i+t,data:void 0}}function yC(e){let{entryType:t,name:r,decodedBodySize:n,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:y}=e;return o===0?null:{type:`${t}.${y}`,start:Bi(f),end:Bi(i),name:r,data:{size:h,decodedBodySize:n,encodedBodySize:s,duration:o,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:i,redirectCount:p}}}function vC(e){let{entryType:t,initiatorType:r,name:n,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:Bi(i),end:Bi(o),name:n,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}}function _C(e){let t=e.entries[e.entries.length-1],r=t?.element?[t.element]:void 0;return tm(e,"largest-contentful-paint",r)}function EC(e){return e.sources!==void 0}function TC(e){let t=[],r=[];for(let n of e.entries)if(EC(n)){let o=[];for(let i of n.sources)if(i.node){r.push(i.node);let s=Ir.mirror.getId(i.node);s&&o.push(s)}t.push({value:n.value,nodeIds:o.length?o:void 0})}return tm(e,"cumulative-layout-shift",r,t)}function bC(e){let t=e.entries[e.entries.length-1],r=t?.target?[t.target]:void 0;return tm(e,"interaction-to-next-paint",r)}function tm(e,t,r,n){let o=e.value,i=e.rating,s=Bi(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:r?r.map(a=>Ir.mirror.getId(a)):void 0,attributions:n}}}function IC(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function r({entries:o}){o.forEach(t)}let n=[];return["navigation","paint","resource"].forEach(o=>{n.push(Er(o,r))}),n.push(an(vf(_C,e)),sn(vf(TC,e)),Co(vf(bC,e))),()=>{n.forEach(o=>o())}}var F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xC='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),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 n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(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 n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-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 n(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(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[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,n){return t.f-n.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 n(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,n){return p[n.s]-p[t.s]||t.f-n.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,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++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:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,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 n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=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(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(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 n(32768),x=c.h||new n(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 r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=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),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}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,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.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(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.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=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.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 n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function kC(){let e=new Blob([xC]);return URL.createObjectURL(e)}var c_=["log","warn","error"],Hc="[Replay] ";function _f(e,t="info"){Ht({category:"console",data:{logger:"replay"},level:t,message:`${Hc}${e}`},{level:t})}function wC(){let e=!1,t=!1,r={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return F?(c_.forEach(n=>{r[n]=(...o)=>{T[n](Hc,...o),t&&_f(o.join(""),_i(n))}}),r.exception=(n,...o)=>{o.length&&r.error&&r.error(...o),T.error(Hc,n),e?rn(n,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&_f(n,"error")},r.infoTick=(...n)=>{T.log(Hc,...n),t&&setTimeout(()=>_f(n[0]),0)}):c_.forEach(n=>{r[n]=()=>{}}),r}var H=wC(),Ia=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${qf}.`)}},Kc=class{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(t){let r=JSON.stringify(t).length;if(this._totalSize+=r,this._totalSize>qf)throw new Ia;this.events.push(t)}finish(){return new Promise(t=>{let r=this.events;this.clear(),t(JSON.stringify(r))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(let{timestamp:r}of this.events)(t===null||r<t)&&(t=r);return t===null?t:em(t)}},Bf=class{constructor(t){this._onMessage=({data:r})=>{let n=r;if(typeof n.id!="number")return;let o=this._pending.get(n.id);if(!(!o||o.method!==n.method)){if(this._pending.delete(n.id),!n.success){F&&H.error("Error in compression worker: ",n.response),o.reject(new Error("Error in compression worker"));return}o.resolve(n.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,r)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():(F&&H.warn("Received worker message with unsuccessful status",n),r(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",n=>{F&&H.warn("Failed to load Replay compression worker",n),r(new Error(`Failed to load Replay compression worker: ${n instanceof ErrorEvent&&n.message?n.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(){F&&H.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,r){let n=this._getAndIncrementId();return new Promise((o,i)=>{this._pending.set(n,{method:t,resolve:o,reject:i});try{this._worker.postMessage({id:n,method:t,arg:r})}catch(s){this._pending.delete(n),i(s)}})}_getAndIncrementId(){return this._id++}},Ff=class{constructor(t){this._worker=new Bf(t),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(t){let r=em(t.timestamp);(!this._earliestTimestamp||r<this._earliestTimestamp)&&(this._earliestTimestamp=r);let n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>qf?Promise.reject(new Ia):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{F&&H.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},Hf=class{constructor(t){this._fallback=new Kc,this._compression=new Ff(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){F&&H.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:r,waitForCheckout:n}=this._fallback,o=[];for(let i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=r,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){F&&H.exception(i,"Failed to add events when switching buffers.")}}};function RC({useCompression:e,workerUrl:t}){if(e&&window.Worker){let r=NC(t);if(r)return r}return F&&H.log("Using simple buffer"),new Kc}function NC(e){try{let t=e||CC();if(!t)return;F&&H.log(`Using compression worker${e?` from ${e}`:""}`);let r=new Worker(t);return new Hf(r)}catch(t){F&&H.exception(t,"Failed to create compression worker")}}function CC(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?kC():""}function rm(){try{return"sessionStorage"in he&&!!he.sessionStorage}catch{return!1}}function AC(e){MC(),e.session=void 0}function MC(){if(rm())try{he.sessionStorage.removeItem(Vf)}catch{}}function j_(e){return e===void 0?!1:Math.random()<e}function su(e){if(rm())try{he.sessionStorage.setItem(Vf,JSON.stringify(e))}catch{}}function W_(e){let t=Date.now(),r=e.id||Ce(),n=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:r,started:n,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a,dirty:l}}function LC(e,t){return j_(e)?"session":t?"buffer":!1}function u_({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){let o=LC(e,t),i=W_({sampled:o,previousSessionId:n});return r&&su(i),i}function OC(){if(!rm())return null;try{let e=he.sessionStorage.getItem(Vf);if(!e)return null;let t=JSON.parse(e);return F&&H.infoTick("Loading existing session"),W_(t)}catch{return null}}function zf(e,t,r=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=r}function DC(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return zf(e.started,t,n)||zf(e.lastActivity,r,n)}function Xc(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!(!DC(e,{sessionIdleExpire:t,maxReplayDuration:r})||e.sampled==="buffer"&&e.segmentId===0)}function Ef({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){let o=n.stickySession&&OC();return o?Xc(o,{sessionIdleExpire:e,maxReplayDuration:t})?(F&&H.infoTick("Session in sessionStorage is expired, creating new one..."),u_(n,{previousSessionId:o.id})):o:(F&&H.infoTick("Creating new session"),u_(n,{previousSessionId:r}))}function PC(e){return e.type===W.Custom}function nm(e,t,r){return V_(e,t)?(G_(e,t,r),!0):!1}function UC(e,t,r){return V_(e,t)?G_(e,t,r):Promise.resolve(null)}async function G_(e,t,r){let{eventBuffer:n}=e;if(!n||n.waitForCheckout&&!r)return null;let o=e.recordingMode==="buffer";try{r&&o&&n.clear(),r&&(n.hasCheckout=!0,n.waitForCheckout=!1);let i=e.getOptions(),s=BC(t,i.beforeAddRecordingEvent);return s?await n.addEvent(s):void 0}catch(i){let s=i&&i instanceof Ia,a=s?"eventBufferOverflow":"eventBufferError",l=M();if(l){let c=s?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(c,"replay")}if(s&&o)return n.clear(),n.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a})}}function V_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let r=em(t.timestamp);return r+e.timeouts.sessionIdlePause<Date.now()?!1:r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(F&&H.infoTick(`Skipping event with timestamp ${r} because it is after maxReplayDuration`),!1):!0}function BC(e,t){try{if(typeof t=="function"&&PC(e))return t(e)}catch(r){return F&&H.exception(r,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function om(e){return!e.type}function $f(e){return e.type==="transaction"}function FC(e){return e.type==="replay_event"}function d_(e){return e.type==="feedback"}function HC(e){return(t,r)=>{if(!e.isEnabled()||!om(t)&&!$f(t))return;let n=r.statusCode;if(!(!n||n<200||n>=300)){if($f(t)){zC(e,t);return}$C(e,t)}}}function zC(e,t){let r=e.getContext();t.contexts?.trace?.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}function $C(e,t){let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;let{beforeErrorSampling:n}=e.getOptions();typeof n=="function"&&!n(t)||Oo(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function jC(e){return t=>{!e.isEnabled()||!om(t)||WC(e,t)}}function WC(e,t){let r=t.exception?.values?.[0]?.value;if(typeof r=="string"&&(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let n=zr({category:"replay.hydrate-error",data:{url:Rt()}});Ra(e,n)}}function GC(e){let t=M();t&&t.on("beforeAddBreadcrumb",r=>VC(e,r))}function VC(e,t){if(!e.isEnabled()||!Y_(t))return;let r=YC(t);r&&Ra(e,r)}function YC(e){return!Y_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?qC(e):zr(e)}function qC(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return zr(e);let r=!1,n=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Pc?(r=!0,`${o.slice(0,Pc)}\u2026`):o;if(typeof o=="object")try{let i=ot(o,7);return JSON.stringify(i).length>Pc?(r=!0,`${JSON.stringify(i,null,2).slice(0,Pc)}\u2026`):i}catch{}return o});return zr({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Y_(e){return!!e.category}function KC(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Jc(){let e=U().getPropagationContext().dsc;e&&delete e.replay_id;let t=ie();if(t){let r=De(t);delete r.replay_id}}function p_(e){let t=U().getPropagationContext().dsc;t&&(t.replay_id=e);let r=ie();if(r){let n=De(r);n.replay_id=e}}function XC(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:W.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function JC(e,t){return e.recordingMode!=="buffer"||t.message===Yf||!t.exception||t.type?!1:j_(e.getOptions().errorSampleRate)}function QC(e){return Object.assign((t,r)=>{if(e.session&&Xc(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Jc(),!e.isEnabled()||e.isPaused())return t;if(FC(t))return delete t.breadcrumbs,t;if(!om(t)&&!$f(t)&&!d_(t))return t;if(!e.checkAndHandleExpiredSession())return Jc(),t;if(d_(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),XC(e,t),t;if(KC(t,r)&&!e.getOptions()._experiments.captureExceptions)return F&&H.log("Ignoring error from rrweb internals",t),null;let o=JC(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){let s=e.session;s.dirty=!0,e.getOptions().stickySession&&su(s)}return t},{id:"Replay"})}function au(e,t){return t.map(({type:r,start:n,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:W.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:r,description:i,startTimestamp:n,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function ZC(e){let{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}function eA(e){return t=>{if(!e.isEnabled())return;let r=ZC(t);r!==null&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(au(e,[r]),!1)))}}function tA(e,t){return F&&e.getOptions()._experiments.traceInternals?!1:Np(t,M())}function q_(e,t){e.isEnabled()&&t!==null&&(tA(e,t.name)||e.addUpdate(()=>(au(e,[t]),!0)))}function lu(e){if(!e)return;let t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let r=Ac(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function K_(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Qc(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 X_(e,t){if(!t)return null;let{startTimestamp:r,endTimestamp:n,url:o,method:i,statusCode:s,request:a,response:l}=t;return{type:e,start:r/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s,request:a,response:l}}}function xa(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Bn(e,t,r){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};let n={headers:e,size:t},{body:o,warnings:i}=rA(r);return n.body=o,i?.length&&(n._meta={warnings:i}),n}function jf(e,t){return Object.entries(e).reduce((r,[n,o])=>{let i=n.toLowerCase();return t.includes(i)&&e[n]&&(r[i]=o),r},{})}function rA(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Vv,r=nA(e);if(t){let n=e.slice(0,Vv);return r?{body:n,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${n}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(r)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function nA(e){let t=e[0],r=e[e.length-1];return t==="["&&r==="]"||t==="{"&&r==="}"}function Zc(e,t){let r=oA(e);return Ke(r,t)}function oA(e,t=he.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(he.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}async function iA(e,t,r){try{let n=await aA(e,t,r),o=X_("resource.fetch",n);q_(r.replay,o)}catch(n){F&&H.exception(n,"Failed to capture fetch breadcrumb")}}function sA(e,t){let{input:r,response:n}=t,o=r?Lc(r):void 0,i=lu(o),s=n?K_(n.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function aA(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n}=t,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=Zc(s,r.networkDetailAllowUrls)&&!Zc(s,r.networkDetailDenyUrls),p=d?lA(r,t.input,c):xa(c),f=await cA(d,r,t.response,u);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:l,request:p,response:f}}function lA({networkCaptureBodies:e,networkRequestHeaders:t},r,n){let o=r?pA(r,t):{};if(!e)return Bn(o,n,void 0);let i=Lc(r),[s,a]=Mc(i,H),l=Bn(o,n,s);return a?Qc(l,a):l}async function cA(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,o){if(!e&&o!==void 0)return xa(o);let i=n?J_(n.headers,r):{};if(!n||!t&&o!==void 0)return Bn(i,o,void 0);let[s,a]=await dA(n),l=uA(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?Qc(l,a):l}function uA(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:o}){try{let i=e?.length&&r===void 0?lu(e):r;return n?t?Bn(o,i,e):Bn(o,i,void 0):xa(i)}catch(i){return F&&H.exception(i,"Failed to serialize response body"),Bn(o,r,void 0)}}async function dA(e){let t=fA(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await mA(t)]}catch(r){return r instanceof Error&&r.message.indexOf("Timeout")>-1?(F&&H.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(F&&H.exception(r,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function J_(e,t){let r={};return t.forEach(n=>{e.get(n)&&(r[n]=e.get(n))}),r}function pA(e,t){return e.length===1&&typeof e[0]!="string"?f_(e[0],t):e.length===2?f_(e[1],t):{}}function f_(e,t){if(!e)return{};let r=e.headers;return r?r instanceof Headers?J_(r,t):Array.isArray(r)?{}:jf(r,t):{}}function fA(e){try{return e.clone()}catch(t){F&&H.exception(t,"Failed to clone response body")}}function mA(e){return new Promise((t,r)=>{let n=Oo(()=>r(new Error("Timeout while trying to read response body")),500);hA(e).then(o=>t(o),o=>r(o)).finally(()=>clearTimeout(n))})}async function hA(e){return await e.text()}async function gA(e,t,r){try{let n=yA(e,t,r),o=X_("resource.xhr",n);q_(r.replay,o)}catch(n){F&&H.exception(n,"Failed to capture xhr breadcrumb")}}function SA(e,t){let{xhr:r,input:n}=t;if(!r)return;let o=lu(n),i=r.getResponseHeader("content-length")?K_(r.getResponseHeader("content-length")):EA(r.response,r.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function yA(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n,input:s,xhr:a}=t,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!l)return null;if(!a||!Zc(l,r.networkDetailAllowUrls)||Zc(l,r.networkDetailDenyUrls)){let w=xa(d),_=xa(p);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:w,response:_}}let f=a[Tr],h=f?jf(f.request_headers,r.networkRequestHeaders):{},y=jf(pa(a),r.networkResponseHeaders),[E,m]=r.networkCaptureBodies?Mc(s,H):[void 0],[g,v]=r.networkCaptureBodies?vA(a):[void 0],b=Bn(h,d,E),k=Bn(y,p,g);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:m?Qc(b,m):b,response:v?Qc(k,v):k}}function vA(e){let t=[];try{return[e.responseText]}catch(r){t.push(r)}try{return _A(e.response,e.responseType)}catch(r){t.push(r)}return F&&H.warn("Failed to get xhr response body",...t),[void 0]}function _A(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(r){return F&&H.exception(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return F&&H.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function EA(e,t){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return lu(r)}catch{return}}function TA(e){let t=M();try{let{networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(l,c)=>bA(a,l,c))}catch{}}function bA(e,t,r){if(t.data)try{IA(t)&&kA(r)&&(SA(t,r),gA(t,r,e)),xA(t)&&wA(r)&&(sA(t,r),iA(t,r,e))}catch(n){F&&H.exception(n,"Error when enriching network breadcrumb")}}function IA(e){return e.category==="xhr"}function xA(e){return e.category==="fetch"}function kA(e){return e?.xhr}function wA(e){return e?.input!==void 0}function RA(e){let t=M();ua(aC(e)),un(eA(e)),GC(e),TA(e);let r=QC(e);Xs(r),t&&(t.on("beforeSendEvent",jC(e)),t.on("afterSendEvent",HC(e)),t.on("createDsc",n=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(n.replay_id=o)}),t.on("spanStart",n=>{e.lastActiveSpan=n}),t.on("spanEnd",n=>{e.lastActiveSpan=n}),t.on("beforeSendFeedback",async(n,o)=>{let i=e.getSessionId();o?.includeReplay&&e.isEnabled()&&i&&n.contexts?.feedback&&(n.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),n.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function NA(e){try{return Promise.all(au(e,[CA(he.performance.memory)]))}catch{return[]}}function CA(e){let{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}function AA(e,t,r){return Ap(e,t,{...r,setTimeoutImpl:Oo})}var Fc=L.navigator;function MA(){return/iPhone|iPad|iPod/i.test(Fc?.userAgent??"")||/Macintosh/i.test(Fc?.userAgent??"")&&Fc?.maxTouchPoints&&Fc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function LA(e){let t=!1;return(r,n)=>{if(!e.checkAndHandleExpiredSession()){F&&H.warn("Received replay event after session expired.");return}let o=n||!t;t=!0,OA(r),e.clickDetector&&rC(e.clickDetector,r),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!nm(e,r,o))return!0;if(!o)return!1;let i=e.session;if(PA(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){let s=e.eventBuffer.getEarliestTimestamp();s&&(F&&H.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&su(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function OA(e){let t=e.data;if(!(e.type!==W.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==z.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(let r of t.attributes){let n=Ir.mirror.getNode(r.id),o=n&&Ir.mirror.getMeta(n);if(o?.type===iu.Element)for(let[i,s]of Object.entries(r.attributes))s===null?delete o.attributes[i]:o.attributes[i]=s}}function DA(e){let t=e.getOptions();return{type:W.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function PA(e,t){!t||e.session?.segmentId!==0||nm(e,DA(e),!1)}function UA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function BA(e,t,r,n){return ht(Ws(e,di(e),n,r),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function FA({recordingData:e,headers:t}){let r,n=`${JSON.stringify(t)}
|
|
31
|
-
`;if(typeof e=="string")r=`${n}${e}`;else{let i=new TextEncoder().encode(n);r=new Uint8Array(i.length+e.length),r.set(i),r.set(e,i.length)}return r}async function HA({client:e,scope:t,replayId:r,event:n}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:r,integrations:o};e.emit("preprocessEvent",n,i);let s=await Ys(e.getOptions(),n,i,t,e,be());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:l,version:c,settings:u}=a?.sdk||{};return s.sdk={...s.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}async function zA({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:o,session:i}){let s=FA({recordingData:e,headers:{segment_id:r}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=n,d=M(),p=U(),f=d?.getTransport(),h=d?.getDsn();if(!d||!f||!h||!i.sampled)return Promise.resolve({});let y={type:RR,replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:t,segment_id:r,replay_type:i.sampled},E=await HA({scope:p,client:d,replayId:t,event:y});if(!E)return d.recordDroppedEvent("event_processor","replay"),F&&H.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete E.sdkProcessingMetadata;let m=BA(E,s,h,d.getOptions().tunnel),g;try{g=await f.send(m)}catch(b){let k=new Error(Yf);try{k.cause=b}catch{}throw k}let v=ea({},g);if(Zs(v,"replay"))throw new ka(v);if(typeof g.statusCode=="number"&&(g.statusCode<200||g.statusCode>=300))throw new eu(g.statusCode);return g}var eu=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},ka=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}},tu=class extends Error{constructor(){super("Session is too long, not sending replay")}};async function Q_(e,t={count:0,interval:OR}){let{recordingData:r,onError:n}=e;if(r.length)try{return await zA(e),!0}catch(o){if(o instanceof eu||o instanceof ka)throw o;if(xo("Replays",{_retryCount:t.count}),n&&n(o),t.count>=DR){let i=new Error(`${Yf} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Oo(async()=>{try{await Q_(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var Z_="__THROTTLED",$A="__SKIPPED";function jA(e,t,r){let n=new Map,o=a=>{let l=a-r;n.forEach((c,u)=>{u<l&&n.delete(u)})},i=()=>[...n.values()].reduce((a,l)=>a+l,0),s=!1;return(...a)=>{let l=Math.floor(Date.now()/1e3);if(o(l),i()>=t){let u=s;return s=!0,u?$A:Z_}s=!1;let c=n.get(l)||0;return n.set(l,c+1),e(...a)}}var Wf=class{constructor({options:t,recordingOptions:r}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:NR,sessionIdleExpire:CR},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=r,this._options=t,this._debouncedFlush=AA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=jA((s,a)=>UC(this,s,a),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:o}=this.getOptions(),i=n?{threshold:Math.min(PR,n),timeout:n,scrollTimeout:UR,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Uf(this,i)),F){let s=t._experiments;H.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{he.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=zr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=zr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{dC(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){F&&H.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){let{errorSampleRate:r,sessionSampleRate:n}=this._options,o=r<=0&&n<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){F&&H.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",F&&H.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){F&&H.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){F&&H.log("Buffering is in progress, call `flush()` to save the replay");return}F&&H.infoTick("Starting replay in session mode"),this._updateUserActivity();let t=Ef({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){F&&H.log("Buffering is in progress, call `flush()` to save the replay");return}F&&H.infoTick("Starting replay in buffer mode");let t=Ef({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let t=this._canvas;this._stopRecording=Ir({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:LR}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:LA(this),...MA(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:r}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";let n=r??"manual";M()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{F&&H.log(`Stopping Replay triggered by ${n}`),Jc(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,AC(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),F&&H.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),F&&H.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let r=Date.now();F&&H.log("Converting buffer to session"),await this.flushImmediate();let n=this.stopRecording();!t||!n||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(r),this._updateSessionActivity(r),this._maybeSaveSession(),p_(this.session.id)),this.startRecording())}addUpdate(t){let r=t();this.recordingMode==="buffer"||!this._isEnabled||r!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&zf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${he.location.pathname}${he.location.hash}${he.location.search}`,r=`${he.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=r,this._context.initialTimestamp=Date.now(),this._context.urls.push(r)}throttledAddEvent(t,r){let n=this._throttledAddEvent(t,r);if(n===Z_){let o=zr({category:"replay.throttled"});this.addUpdate(()=>!nm(this,{type:VN,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return n}getCurrentRoute(){let t=this.lastActiveSpan||ie(),r=t&&te(t),o=(r&&B(r).data||{})[Fe];if(!(!r||!o||!["route","custom"].includes(o)))return B(r).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=RC({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&M()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&p_(this.session.id)}_initializeSessionForSampling(t){let r=this._options.errorSampleRate>0,n=Ef({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:r});this.session=n}_checkSession(){if(!this.session)return!1;let t=this.session;return Xc(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{he.document.addEventListener("visibilitychange",this._handleVisibilityChange),he.addEventListener("blur",this._handleWindowBlur),he.addEventListener("focus",this._handleWindowFocus),he.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(RA(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=IC(this)}_removeListeners(){try{he.document.removeEventListener("visibilitychange",this._handleVisibilityChange),he.removeEventListener("blur",this._handleWindowBlur),he.removeEventListener("focus",this._handleWindowFocus),he.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(Xc(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Jc();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){F&&H.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:W.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=hC(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let r=this._context.initialTimestamp/1e3;t=t.filter(n=>n.start>=r)}return Promise.all(au(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:r}=this;if(!t||!r||this._requiresManualStart||t.segmentId)return;let n=r.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){F&&H.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await NA(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new tu;let n=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await Q_({replayId:t,recordingData:i,segmentId:o,eventContext:n,session:this.session,timestamp:r,onError:s=>this.handleException(s)})}catch(r){this.handleException(r),this.stop({reason:"sendError"});let n=M();if(n){let o;r instanceof ka?o="ratelimit_backoff":r instanceof tu?o="invalid":o="send_error",n.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){F&&H.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let r=this.session.started,o=Date.now()-r;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){F&&H.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&F&&H.log("Flushing initial segment without checkout.");let l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&su(this.session)}_onMutationHandler(t){let{ignoreMutations:r}=this._options._experiments;if(r?.length&&t.some(a=>{let l=UA(a.target),c=r.join(",");return l?.matches(c)}))return!1;let n=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&n>o;if(n>i||s){let a=zr({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function ha(e,t){return[...e,...t].join(",")}function WA({mask:e,unmask:t,block:r,unblock:n,ignore:o}){let i=["base","iframe[srcdoc]:not([src])"],s=ha(e,[".sentry-mask","[data-sentry-mask]"]),a=ha(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ha(r,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:ha(n,[]),ignoreSelector:ha(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function GA({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:o,value:i}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return i;let s=r.includes(t),a=n&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?i.replace(/[\S]/g,"*"):i}var m_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',VA=["content-length","content-type","accept"],YA=Symbol.for("sentry__originalRequestBody"),h_=!1,g_=!1;function qA(){if(typeof Request>"u"||g_)return;let e=Request;try{let t=function(r,n){let o=new e(r,n);return n?.body!=null&&(o[YA]=n.body),o};t.prototype=e.prototype,L.Request=t,g_=!0}catch{}}var im=(e=>new Gf(e)),Gf=class{constructor({flushMinDelay:t=AR,flushMaxDelay:r=MR,minReplayDuration:n=BR,maxReplayDuration:o=Yv,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:l={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:y=[],networkDetailAllowUrls:E=[],networkDetailDenyUrls:m=[],networkCaptureBodies:g=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:k=[],maskAttributes:w=["title","placeholder","aria-label"],unmask:_=[],block:I=[],unblock:j=[],ignore:x=[],maskFn:D,beforeAddRecordingEvent:Y,beforeErrorSampling:ee,onError:G,attachRawBodyFromRequest:Be=!1}={}){this.name="Replay";let ce=WA({mask:k,unmask:_,block:I,unblock:j,ignore:x});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:D,maskInputFn:D,maskAttributeFn:(ye,C,oe)=>GA({maskAttributes:w,maskAllText:c,privacyOptions:ce,key:ye,value:C,el:oe}),...ce,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ye=>{try{ye.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:r,minReplayDuration:Math.min(n,FR),maxReplayDuration:Math.min(o,Yv),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:y,networkDetailAllowUrls:E,networkDetailDenyUrls:m,networkCaptureBodies:g,networkRequestHeaders:S_(v),networkResponseHeaders:S_(b),beforeAddRecordingEvent:Y,beforeErrorSampling:ee,onError:G,attachRawBodyFromRequest:Be,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${m_}`:m_,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&er())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return h_}set _isInitialized(t){h_=t}afterAllSetup(t){!er()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&qA(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){let r=this.getReplayId(!0);r&&An(t,{"sentry.replay_id":r})}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let r=KA(this._initialOptions,t);this._replay=new Wf({options:r,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let r=t.getIntegrationByName("ReplayCanvas");if(!r)return;this._replay._canvas=r.getOptions()}catch{}}};function KA(e,t){let r=t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...e},o=Ft(r.replaysSessionSampleRate),i=Ft(r.replaysOnErrorSampleRate);return o==null&&i==null&&qe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(n.sessionSampleRate=o),i!=null&&(n.errorSampleRate=i),n}function S_(e){return[...VA,...e.map(t=>t.toLowerCase())]}function e0(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function sm(e){try{return new URL(e,P.location.origin).href}catch{return}}function t0(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function am(e){try{return new Headers(e)}catch{return}}var lm={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function n0(e,t){let{traceFetch:r,traceXHR:n,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:s,onRequestSpanStart:a,onRequestSpanEnd:l}={...lm,...t},c=typeof o=="function"?o:f=>!0,u=f=>JA(f,s),d={},p=e.getOptions().propagateTraceparent;r&&Ln(f=>{let h=Up(f,c,u,d,{propagateTraceparent:p,onRequestSpanEnd:l});if(h){let y=sm(f.fetchData.url),E=y?Zt(y).host:void 0;h.setAttributes({"http.url":y?at(y):void 0,"server.address":E}),i&&r0(h,e),a?.(h,{headers:f.headers})}}),n&&da(f=>{let h=QA(f,c,u,d,p,l);h&&(i&&r0(h,e),a?.(h,{headers:am(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}var XA=300;function r0(e,t){let{url:r}=B(e).data;if(!r||typeof r!="string")return;let n=()=>{setTimeout(o)};if(Je(t)){let i=e.end.bind(e);e.end=s=>{let a=s??ne(),l=!1,c=()=>{l||(l=!0,setTimeout(o),i(a),clearTimeout(u))};n=c;let u=setTimeout(c,XA)}}let o=Er("resource",({entries:i})=>{i.forEach(s=>{t0(s)&&s.name.endsWith(r)&&(e.setAttributes(la(s)),n())})})}function JA(e,t){let r=Rt();if(r){let n,o;try{n=new URL(e,r),o=new URL(r).origin}catch{return!1}let i=n.origin===o;return t?Ke(n.toString(),t)||i&&Ke(n.pathname,t):i}else{let n=!!e.match(/^\/(?!\/)/);return t?Ke(e,t):n}}function QA(e,t,r,n,o,i){let s=e.xhr,a=s?.[Tr];if(!s||s.__sentry_own_request__||!a)return;let{url:l,method:c}=a,u=He()&&t(l);if(e.endTimestamp){let g=s.__sentry_xhr_span_id__;if(!g)return;let v=n[g];v&&(u&&a.status_code!==void 0&&(ai(v,a.status_code),v.end(),i?.(v,{headers:am(pa(s)),error:e.error})),delete n[g]);return}let d=sm(l),p=d?Zt(d):Zt(l),f=at(Zl(l)),h=M(),E=!!ie()||!!h&&Je(h),m=u&&E?je({name:`${c} ${f}`,attributes:{url:at(l),type:"xhr","http.method":c,"http.url":d?at(d):void 0,"server.address":p?.host,[J]:"auto.http.browser",[_e]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Xe;return u&&!E&&h?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=m.spanContext().spanId,n[s.__sentry_xhr_span_id__]=m,r(l)&&ZA(s,He()&&E?m:void 0,o),h&&h.emit("beforeOutgoingRequestSpan",m,e),m}function ZA(e,t,r){let{"sentry-trace":n,baggage:o,traceparent:i}=vi({span:t,propagateTraceparent:r});n&&eM(e,n,o,i)}function eM(e,t,r,n){let o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),n&&!o?.traceparent&&e.setRequestHeader("traceparent",n),r){let i=o?.baggage;(!i||!e0(i))&&e.setRequestHeader("baggage",r)}}catch{}}var o0=new WeakMap,i0=new WeakMap,tM=9e4,rM=["text/event-stream","application/x-ndjson","application/stream+json"],s0=()=>({name:"FetchStreamPerformance",setup(){pc(e=>{if(e.response){let t=o0.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let r=i0.get(e.response);r&&clearTimeout(r)}}}),Ln(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!rM.some(l=>t.startsWith(l)))return;let r=e.fetchData?.url||"",n=e.fetchData?.method||"GET",o=Pr(r),i=r.startsWith("data:")?at(r):o?mi(o):r,s=je({name:`${n} ${i}`,startTime:e.endTimestamp,attributes:{url:at(r),"http.method":n,type:"fetch",[_e]:"http.client.stream",[J]:"auto.http.browser.stream"}});o0.set(e.response,s);let a=setTimeout(()=>{s.isRecording()&&s.end()},tM);i0.set(e.response,a)}})}});function a0(){P.document?P.document.addEventListener("visibilitychange",()=>{let e=ie();if(!e)return;let t=te(e);if(P.document.hidden&&t){let r="cancelled",{op:n,status:o}=B(t);xe&&T.log(`[Tracing] Transaction: ${r} -> since tab moved to the background, op: ${n}`),o||t.setStatus({code:2,message:r}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):xe&&T.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var nM=3600,l0="sentry_previous_trace",oM="sentry.previous_trace";function c0(e,{linkPreviousTrace:t,consistentTraceSampling:r}){let n=t==="session-storage",o=n?aM():void 0;e.on("spanStart",s=>{if(te(s)!==s)return;let a=U().getPropagationContext();o=iM(o,s,a),n&&sM(o)});let i=!0;r&&e.on("beforeSampling",s=>{if(!o)return;let a=U(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(o.sampleRate),sampled:String(cm(o.spanContext))},sampleRand:o.sampleRand}),s.parentSampled=cm(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes={...s.spanAttributes,[ii]:o.sampleRate}})}function iM(e,t,r){let n=B(t);function o(){try{let a=Number(n.data?.[Qr]??r.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}let i={spanContext:t.spanContext(),startTimestamp:n.start_timestamp,sampleRate:o(),sampleRand:r.sampleRand};if(!e)return i;let s=e.spanContext;return s.traceId===n.trace_id?e:(Date.now()/1e3-e.startTimestamp<=nM&&(xe&&T.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:n.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[Ul]:"previous_trace"}}),t.setAttribute(oM,`${s.traceId}-${s.spanId}-${cm(s)?1:0}`)),i)}function sM(e){try{P.sessionStorage.setItem(l0,JSON.stringify(e))}catch(t){xe&&T.warn("Could not store previous trace in sessionStorage",t)}}function aM(){try{let e=P.sessionStorage?.getItem(l0);return JSON.parse(e)}catch{return}}function cm(e){return e.traceFlags===1}var lM="BrowserTracing",cM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function m0(){let e=P.navigator;return e?.userAgent?cM.test(e.userAgent):!1}var uM={...fi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...lm},um=((e={})=>{"enableElementTiming"in e&&qe(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},r=P.document,{enableInp:n,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:l},beforeStartSpan:c,idleTimeout:u,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:h,traceXHR:y,trackFetchStreamPerformance:E,shouldCreateSpanForRequest:m,enableHTTPTimings:g,ignoreResourceSpans:v,ignorePerformanceApiSpans:b,instrumentPageLoad:k,instrumentNavigation:w,detectRedirects:_,linkPreviousTrace:I,consistentTraceSampling:j,enableReportPageLoaded:x,onRequestSpanStart:D,onRequestSpanEnd:Y}={...uM,...e},ee=m0(),G,Be,ce;function ye(C,oe,$=!0){let q=oe.op==="pageload",pe=oe.name,fe=c?c(oe):oe,Pt=fe.attributes||{};if(pe!==fe.name&&(Pt[Fe]="custom",fe.attributes=Pt),!$){let Kr=It();je({...fe,startTime:Kr}).end(Kr);return}t.name=fe.name,t.source=Pt[Fe];let pr=Jl(fe,{idleTimeout:u,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:q,beforeSpanEnd:Kr=>{G?.();let so=Je(C);tf(Kr,{recordClsOnPageloadSpan:!so&&!a,recordLcpOnPageloadSpan:!so&&!l,ignoreResourceSpans:v,ignorePerformanceApiSpans:b,spanStreamingEnabled:so}),p0(C,void 0);let Ss=U(),ao=Ss.getPropagationContext();Ss.setPropagationContext({...ao,traceId:pr.spanContext().traceId,sampled:wt(pr),dsc:De(Kr)}),q&&(ce=void 0)},trimIdleSpanEndTimestamp:!x});q&&x&&(ce=pr),p0(C,pr);function Lr(){r&&["interactive","complete"].includes(r.readyState)&&C.emit("idleSpanEnableAutoFinish",pr)}q&&!x&&r&&(r.addEventListener("readystatechange",()=>{Lr()}),Lr())}return{name:lM,setup(C){if(ee){xe&&T.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}Wl();let oe=Je(C);if(G=Jp({recordClsStandaloneSpans:oe?void 0:a||!1,recordLcpStandaloneSpans:oe?void 0:l||!1,client:C}),oe?(lf(C),cf(C),n&&uf()):n&&of(),i&&L.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Zp():o&&Qp(),s&&ef(),_&&r){let q=()=>{Be=ne()};addEventListener("click",q,{capture:!0}),addEventListener("keydown",q,{capture:!0,passive:!0})}function $(){let q=Na(C);q&&!B(q).timestamp&&(xe&&T.log(`[Tracing] Finishing current active span with op: ${B(q).op}`),q.setAttribute(Zr,"cancelled"),q.end())}C.on("startNavigationSpan",(q,pe)=>{if(M()!==C)return;if(pe?.isRedirect){xe&&T.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),ye(C,{op:"navigation.redirect",...q},!1);return}Be=void 0,$(),be().setPropagationContext({traceId:mt(),sampleRand:Math.random(),propagationSpanId:He()?void 0:it()});let fe=U();fe.setPropagationContext({traceId:mt(),sampleRand:Math.random(),propagationSpanId:He()?void 0:it()}),fe.setSDKProcessingMetadata({normalizedRequest:void 0}),ye(C,{op:"navigation",...q,parentSpan:null,forceTransaction:!0})}),C.on("startPageLoadSpan",(q,pe={})=>{if(M()!==C)return;$();let fe=pe.sentryTrace||u0("sentry-trace")||d0("sentry-trace"),Pt=pe.baggage||u0("baggage")||d0("baggage"),pr=tp(fe,Pt),Lr=U();Lr.setPropagationContext(pr),He()||(Lr.getPropagationContext().propagationSpanId=it()),Lr.setSDKProcessingMetadata({normalizedRequest:Ti()}),ye(C,{op:"pageload",...q})}),C.on("endPageloadSpan",()=>{x&&ce&&(ce.setAttribute(Zr,"reportPageLoaded"),ce.end())})},afterAllSetup(C){if(ee)return;let oe=Rt();if(I!=="off"&&c0(C,{linkPreviousTrace:I,consistentTraceSampling:j}),P.location){if(k){let $=ue();h0(C,{name:P.location.pathname,startTime:$?$/1e3:void 0,attributes:{[Fe]:"url",[J]:"auto.pageload.browser"}})}w&&un(({to:$,from:q})=>{if(q===void 0&&oe?.indexOf($)!==-1){oe=void 0;return}oe=void 0;let pe=Pr($),fe=Na(C),Pt=fe&&_&&pM(fe,Be);g0(C,{name:pe?.pathname||P.location.pathname,attributes:{[Fe]:"url",[J]:"auto.navigation.browser"}},{url:$,isRedirect:Pt})})}f&&a0(),s&&dM(C,u,d,p,t),n&&sf(),n0(C,{traceFetch:h,traceXHR:y,tracePropagationTargets:C.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:g,onRequestSpanStart:D,onRequestSpanEnd:Y}),E&&C.addIntegration(s0())}}});function h0(e,t,r){e.emit("startPageLoadSpan",t,r),U().setTransactionName(t.name);let n=Na(e);return n&&e.emit("afterStartPageLoadSpan",n),n}function g0(e,t,r){let{url:n,isRedirect:o}=r||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=U();return i.setTransactionName(t.name),n&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...Ti(),url:n}}),Na(e)}function u0(e){return P.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function d0(e){return P.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(n=>n.name===e)?.description}function dM(e,t,r,n,o){let i=P.document,s,a=()=>{let l="ui.action.click",c=Na(e);if(c){let u=B(c).op;if(["navigation","pageload"].includes(u)){xe&&T.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Zr,"interactionInterrupted"),s.end(),s=void 0),!o.name){xe&&T.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}s=Jl({name:o.name,op:l,attributes:{[Fe]:o.source||"url"}},{idleTimeout:t,finalTimeout:r,childSpanTimeout:n})};i&&addEventListener("click",a,{capture:!0})}var S0="_sentry_idleSpan";function Na(e){return e[S0]}function p0(e,t){ve(e,S0,t)}var f0=1.5;function pM(e,t){let r=B(e),n=It(),o=r.start_timestamp;return!(n-o>f0||t&&n-t<=f0)}var M0=mr(pn(),1);function A0(e){return Kt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function gm(e){let t={...e};na(t,"react"),xo("react",{version:M0.version});let r=gf(t);return ni(RM),r}function RM(e){return A0(e)?"[SyntheticEvent]":fa(e)}var L0=mr(pn(),1);function NM(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function CM(e,t){let r=new WeakSet;function n(o,i){if(!r.has(o)){if(o.cause)return r.add(o),n(o.cause,i);o.cause=i}}n(e,t)}function O0(e,{componentStack:t},r){if(NM(L0.version)&&qt(e)&&t){let n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,CM(e,n)}return Qt(n=>(n.setContext("react",{componentStack:t}),rn(e,r)))}var Po=mr(pn(),1);var D0=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Sm={componentStack:null,error:null,eventId:null},Aa=class extends Po.Component{constructor(t){super(t),this.state=Sm,this._openFallbackReportDialog=!0;let r=M();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&Dc({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){let{componentStack:n}=r,{beforeCapture:o,onError:i,showDialog:s,dialogOptions:a}=this.props;Qt(l=>{o&&o(l,t,n);let c=this.props.handled!=null?this.props.handled:!!this.props.fallback,u=O0(t,r,{mechanism:{handled:c,type:"auto.function.react.error_boundary"}});i&&i(t,n,u),s&&(this._lastEventId=u,this._openFallbackReportDialog&&Dc({...a,eventId:u})),this.setState({error:t,componentStack:n,eventId:u})})}componentDidMount(){let{onMount:t}=this.props;t&&t()}componentWillUnmount(){let{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:o}=this.props;o&&(this.state===Sm?o(null,null,null):o(t,r,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){let{onReset:t}=this.props,{error:r,componentStack:n,eventId:o}=this.state;t&&t(r,n,o),this.setState(Sm)}render(){let{fallback:t,children:r}=this.props,n=this.state;if(n.componentStack===null)return typeof r=="function"?r():r;let o=typeof t=="function"?Po.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return Po.isValidElement(o)?o:(t&&D0&&T.warn("fallback did not produce a valid ReactElement"),null)}};function ym(e,t){if(e==null||e==="")return t;let r=typeof e=="number"?e:Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}var fn=window.__vidfarmSentry,U0=fn?.dsn?.trim()||"";if(U0){let e=fn?.environment?.trim()||"development",t=e==="production"?.1:1,r=e==="production"?.1:1,n=["localhost",window.location.origin,`${window.location.origin}/api`],o=Array.from(new Set([...n,...fn?.tracePropagationTargets??[]].filter(Boolean)));gm({dsn:U0,environment:e,release:fn?.release?.trim()||void 0,integrations:[um(),im({maskAllText:!0,blockAllMedia:!0})],tracesSampleRate:ym(fn?.tracesSampleRate,t),tracePropagationTargets:o,replaysSessionSampleRate:ym(fn?.replaysSessionSampleRate,r),replaysOnErrorSampleRate:ym(fn?.replaysOnErrorSampleRate,1),enableLogs:fn?.enableLogs??!0,sendDefaultPii:fn?.sendDefaultPii??!0})}var Dt=mr(pn(),1),kI=mr(oI(),1);var iI=e=>{let t,r=new Set,n=(c,u)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let p=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(f=>f(t,p))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c))},l=t=e(n,o,a);return a},sI=(e=>e?iI(e):iI);var bl=mr(pn(),1);var LL=e=>e;function Qo(e,t=LL){let r=bl.default.useSyncExternalStore(e.subscribe,bl.default.useCallback(()=>t(e.getState()),[e,t]),bl.default.useCallback(()=>t(e.getInitialState()),[e,t]));return bl.default.useDebugValue(r),r}var OL="[vidfarm]";function DL(e){if(e!=="debug")return!0;if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("debug")||window.localStorage?.getItem("VIDFARM_DEBUG")==="1"}catch{return!1}}function aI(e,t,r){let n={event:t,detail:r,timestamp:new Date().toISOString()};typeof window<"u"&&(window.__VIDFARM_DEBUG_LOGS__=window.__VIDFARM_DEBUG_LOGS__??[],window.__VIDFARM_DEBUG_LOGS__.push(n),window.__VIDFARM_DEBUG_LOGS__.length>1e3&&window.__VIDFARM_DEBUG_LOGS__.splice(0,window.__VIDFARM_DEBUG_LOGS__.length-1e3)),DL(e)&&console[e==="debug"?"log":e](OL,t,r??"")}function Il(e,t){aI("info",e,t)}function hs(e,t){aI("error",e,t)}function lI(){typeof window>"u"||window.__VIDFARM_DEBUG_HOOKS__||(window.__VIDFARM_DEBUG_HOOKS__=!0,Il("boot.hooks-installed",{href:window.location.href,readyState:document.readyState,userAgent:navigator.userAgent}),window.addEventListener("error",e=>{hs("window.error",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error:e.error instanceof Error?e.error.stack:e.error})}),window.addEventListener("unhandledrejection",e=>{hs("window.unhandledrejection",{reason:e.reason instanceof Error?e.reason.stack:e.reason})}))}var de=mr(pn(),1);function qr(e,t){if(!t||!e.startsWith("/"))return e;let r=new URL(e,"https://vidfarm.local");return r.pathname.startsWith("/u/")?`${r.pathname}${r.search}${r.hash}`:r.pathname==="/discover"||r.pathname.startsWith("/discover/")||r.pathname==="/help"?`${r.pathname}${r.search}${r.hash}`:`/u/${encodeURIComponent(t)}${r.pathname}${r.search}${r.hash}`}function cI(e){let t=e?.email?.trim()||"",r=e?.displayName?.trim()||"";return r||(t?t.split("@")[0].replace(/[._-]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()):"")}function Ad(e){return!!(e&&/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e))}var S=mr(xl(),1);function fI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M10 3v4"}),(0,S.jsx)("path",{d:"M10 13v4"}),(0,S.jsx)("path",{d:"M3 10h4"}),(0,S.jsx)("path",{d:"M13 10h4"}),(0,S.jsx)("path",{d:"m5.8 5.8 2.3 2.3"}),(0,S.jsx)("path",{d:"m11.9 11.9 2.3 2.3"}),(0,S.jsx)("path",{d:"m14.2 5.8-2.3 2.3"}),(0,S.jsx)("path",{d:"m8.1 11.9-2.3 2.3"})]})}function $L(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M4.5 4.5h3v11h-3z"}),(0,S.jsx)("path",{d:"M8.7 4.5h3v11h-3z"}),(0,S.jsx)("path",{d:"m13.4 5.1 2.3-.6 2.2 10.7-2.3.6z"})]})}function jL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("circle",{cx:"10",cy:"10",r:"7.2"}),(0,S.jsx)("path",{d:"M10 6.3v4.1l2.8 1.7"})]})}function mI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M14.8 15.2a5.4 5.4 0 1 0-9.6 0"}),(0,S.jsx)("circle",{cx:"10",cy:"6.8",r:"3.1"})]})}function gI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:[(0,S.jsx)("circle",{cx:"4.2",cy:"10",r:"1.45"}),(0,S.jsx)("circle",{cx:"10",cy:"10",r:"1.45"}),(0,S.jsx)("circle",{cx:"15.8",cy:"10",r:"1.45"})]})}function WL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",children:[(0,S.jsx)("path",{d:"M3.5 5.5h13"}),(0,S.jsx)("path",{d:"M3.5 10h13"}),(0,S.jsx)("path",{d:"M3.5 14.5h13"})]})}function GL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.8"}),(0,S.jsx)("path",{d:"m13 13 4.2 4.2"})]})}function VL(){return(0,S.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:(0,S.jsx)("path",{d:"M6 3.8h8a1 1 0 0 1 1 1v11.4l-5-2.9-5 2.9V4.8a1 1 0 0 1 1-1Z"})})}function YL(e){let t=e?.trim();if(!(!t||typeof window>"u"))try{let r="vidfarm:agency:accounts:index",n=window.localStorage.getItem(r),o=n?JSON.parse(n):[];Array.isArray(o)&&window.localStorage.setItem(r,JSON.stringify(o.filter(i=>typeof i=="string"&&i!==t))),window.localStorage.removeItem(`vidfarm:agency:account_${t}`),window.localStorage.removeItem(`vidfarm:flockposter-cache:v1_${t}`),window.localStorage.removeItem(`vidfarm:discover-bookmarks:v1_${t}`)}catch{}}function qL({account:e}){let t=(0,de.useRef)(null),r=e.isLoggedIn?[{id:"discover",href:qr("/discover",e.userId),label:"Discover",icon:(0,S.jsx)(fI,{})},{id:"library",href:qr("/library",e.userId),label:"Library",icon:(0,S.jsx)($L,{})},{id:"calendar",href:qr("/calendar",e.userId),label:"Calendar",icon:(0,S.jsx)(jL,{})},{id:"settings",href:qr("/settings",e.userId),label:"Settings",icon:(0,S.jsx)(mI,{})}]:[{id:"discover",href:"/discover",label:"Discover",icon:(0,S.jsx)(fI,{})},{id:"login",href:"/login",label:"Login",icon:(0,S.jsx)(mI,{})}],n=e.isLoggedIn?[{id:"chat",href:qr("/chat",e.userId),label:"Chat"},{id:"job-runs",href:qr("/job-runs",e.userId),label:"Run History"},{id:"inpaint",href:qr("/inpaint",e.userId),label:"Inpaint"},{id:"help",href:"/help",label:"Help"},{id:"logout",action:"logout",label:"Log Out"}]:[{id:"help",href:"/help",label:"Help"},{id:"login",href:"/login",label:"Login"}],o=r.filter(i=>!n.some(s=>s.id===i.id));return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("nav",{className:"primary-nav","aria-label":"Primary",children:[r.map(i=>(0,S.jsxs)("a",{className:`nav-link${i.id==="discover"?" is-active":""}`,href:i.href,children:[(0,S.jsx)("span",{className:"nav-icon","aria-hidden":"true",children:i.icon}),(0,S.jsx)("span",{children:i.label})]},i.id)),n.map(i=>"href"in i?(0,S.jsx)("a",{className:"nav-link nav-mobile-extra",href:i.href,children:(0,S.jsx)("span",{children:i.label})},`mobile-${i.id}`):(0,S.jsx)("button",{type:"button",className:"nav-link nav-mobile-extra nav-action-link",onClick:()=>{t.current?.open||t.current?.showModal()},children:(0,S.jsx)("span",{children:i.label})},`mobile-${i.id}`)),n.length?(0,S.jsxs)("details",{className:"nav-menu",children:[(0,S.jsxs)("summary",{className:"nav-link nav-menu-trigger","aria-label":"Open navigation menu",children:[(0,S.jsx)("span",{className:"nav-icon nav-menu-desktop-icon","aria-hidden":"true",children:(0,S.jsx)(gI,{})}),(0,S.jsx)("span",{className:"nav-icon nav-menu-mobile-icon","aria-hidden":"true",children:(0,S.jsx)(WL,{})}),(0,S.jsx)("span",{className:"nav-menu-label",children:"Menu"})]}),(0,S.jsxs)("div",{className:"nav-menu-panel",role:"menu",children:[o.map(i=>(0,S.jsx)("a",{className:`nav-menu-item nav-menu-mobile-only${i.id==="discover"?" is-active":""}`,role:"menuitem",href:i.href,children:i.label},`menu-mobile-${i.id}`)),n.map(i=>"href"in i?(0,S.jsx)("a",{className:"nav-menu-item",role:"menuitem",href:i.href,children:i.label},i.id):(0,S.jsx)("button",{type:"button",className:"nav-menu-item nav-menu-button",role:"menuitem",onClick:()=>{t.current?.open||t.current?.showModal()},children:i.label},i.id))]})]}):null]}),e.isLoggedIn?(0,S.jsxs)("dialog",{className:"logout-dialog",ref:t,onClick:i=>{let s=t.current;if(!s)return;let a=s.getBoundingClientRect();(i.clientX<a.left||i.clientX>a.right||i.clientY<a.top||i.clientY>a.bottom)&&s.close()},children:[(0,S.jsxs)("div",{className:"logout-dialog-head",children:[(0,S.jsx)("div",{className:"label logout-dialog-kicker",children:"Log out"}),(0,S.jsx)("h3",{children:"Log out of this browser?"}),(0,S.jsx)("p",{children:"This clears the stored developer key, workspace access, and local session state for the current browser."})]}),(0,S.jsxs)("div",{className:"toolbar logout-dialog-actions",children:[(0,S.jsx)("button",{type:"button",className:"secondary",onClick:()=>t.current?.close(),children:"Cancel"}),(0,S.jsxs)("form",{method:"post",action:"/logout",onSubmit:()=>YL(e.userId),children:[(0,S.jsx)("input",{type:"hidden",name:"account",value:e.userId??""}),(0,S.jsx)("button",{type:"submit",className:"danger",children:"Yes, log out"})]})]})]}):null]})}function KL({account:e}){let t=e.email?.trim()||"",r=cI({displayName:e.displayName,email:e.email}),n=qr("/discover",e.userId);return(0,S.jsxs)("a",{className:"brand-lockup",href:n,children:[(0,S.jsx)("img",{className:"brand-logo-image",src:"/assets/logo-vidfarm.png",alt:"VidFarm AI"}),(0,S.jsxs)("div",{className:"brand-copy",children:[(0,S.jsxs)("div",{className:"brand-title brand-title-static",children:["VidFarm",(0,S.jsx)("span",{className:"brand-title-mobile-hidden",children:" AI"})]}),t?(0,S.jsxs)("div",{className:"brand-account-meta",children:[r," ",(0,S.jsxs)("span",{children:["(",t,")"]})]}):null]})]})}function SI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:[(0,S.jsx)("path",{d:"m5 5 10 10"}),(0,S.jsx)("path",{d:"m15 5-10 10"})]})}function XL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M10 3v9"}),(0,S.jsx)("path",{d:"m6.5 8.5 3.5 3.5 3.5-3.5"}),(0,S.jsx)("path",{d:"M4 16h12"})]})}function JL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M8.4 11.6a3.2 3.2 0 0 0 4.5 0l2.2-2.2a3.2 3.2 0 0 0-4.5-4.5L9.4 6.1"}),(0,S.jsx)("path",{d:"M11.6 8.4a3.2 3.2 0 0 0-4.5 0L4.9 10.6a3.2 3.2 0 0 0 4.5 4.5l1.2-1.2"})]})}function QL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,S.jsx)("path",{d:"M12.4 7.6a3.4 3.4 0 0 1 0 4.8"}),(0,S.jsx)("path",{d:"M14.6 5.4a6.5 6.5 0 0 1 0 9.2"})]})}function ZL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,S.jsx)("path",{d:"m12.6 8 4 4"}),(0,S.jsx)("path",{d:"m16.6 8-4 4"})]})}var yI="vidfarm:discover-muted",gs=typeof window<"u"&&window.localStorage?.getItem(yI)==="1",Lg=new Set;function vI(e){gs=e;try{window.localStorage.setItem(yI,e?"1":"0")}catch{}for(let t of Lg)t()}function _I(e){return Lg.add(e),()=>{Lg.delete(e)}}function EI(){return(0,de.useSyncExternalStore)(_I,()=>gs,()=>!1)}var Og=!1,Dg=new Set;function hI(e){Og=e;for(let t of Dg)t()}function eO({src:e,controls:t=!0}){let r=(0,de.useRef)(null);return(0,de.useEffect)(()=>{let n=r.current;if(!n)return;let o=()=>{!n.dataset.src||n.getAttribute("src")||(n.setAttribute("src",n.dataset.src),n.load())},i=!1,s=()=>{Og||(o(),n.muted=gs,n.play().then(()=>{delete n.dataset.mutedFallback}).catch(()=>{n.muted||(n.dataset.mutedFallback="1",n.muted=!0,n.play().catch(()=>{}))}))},a=()=>{!gs&&n.dataset.mutedFallback==="1"&&!n.paused&&(n.muted=!1,delete n.dataset.mutedFallback)};window.addEventListener("pointerdown",a),window.addEventListener("keydown",a);let c=_I(()=>{gs?(delete n.dataset.mutedFallback,n.muted=!0):n.paused||(n.muted=!1)}),u=()=>{Og?n.paused||n.pause():i&&s()};Dg.add(u);let d=()=>{window.removeEventListener("pointerdown",a),window.removeEventListener("keydown",a),c(),Dg.delete(u)};if(!("IntersectionObserver"in window))return i=!0,s(),d;let p=new IntersectionObserver(h=>{for(let y of h)y.isIntersecting&&(o(),p.unobserve(y.target))},{rootMargin:"240px 0px"}),f=new IntersectionObserver(h=>{for(let y of h)i=y.isIntersecting,y.isIntersecting?s():n.paused||n.pause()},{threshold:.5});return p.observe(n),f.observe(n),()=>{p.disconnect(),f.disconnect(),d()}},[]),(0,S.jsx)("video",{ref:r,className:"preview","data-src":e,preload:"metadata",playsInline:!0,loop:!0,controls:t})}function tO(){let e=EI();return(0,S.jsxs)("button",{type:"button",className:"discover-mute-toggle","aria-pressed":e,"aria-label":e?"Unmute video previews":"Mute video previews",title:e?"Unmute previews":"Mute previews",onClick:()=>vI(!e),children:[e?(0,S.jsx)(ZL,{}):(0,S.jsx)(QL,{}),(0,S.jsx)("span",{className:"discover-mute-toggle-label",children:e?"Muted":"Sound on"})]})}function rO({text:e,label:t}){let[r,n]=(0,de.useState)(""),o=async()=>{try{await navigator.clipboard.writeText(e),n("done")}catch{n("error")}window.setTimeout(()=>n(""),1600)};return(0,S.jsxs)("button",{className:"pill-tag copy-inline",type:"button","data-state":r,"aria-label":r==="done"?`${t} copied`:t,onClick:()=>{o()},children:[(0,S.jsx)("span",{className:"copy-inline-label",children:t}),(0,S.jsx)("span",{className:"copy-inline-feedback","aria-hidden":"true",children:r==="error"?"Couldn\u2019t copy":"Copied"})]})}function TI(e,t){return e.startsWith("hyperframes:")||e.startsWith("template_")?`/editor/${encodeURIComponent(e.replace(/^hyperframes:/,""))}${t?`?account=${encodeURIComponent(t)}`:""}`:qr(`/templates/${encodeURIComponent(e)}/editor/docs`,t)}function nO({templateId:e,accountUserId:t}){return(0,S.jsx)("a",{className:"cta-button",href:TI(e,t),children:"Editor"})}function oO(e){let{template:t}=e,[r,n]=(0,de.useState)(!1),[o,i]=(0,de.useState)(!1),[s,a]=(0,de.useState)(!1),l=(0,de.useRef)(null),c=t.status==="processing"||t.status==="failed",u=t.visibility==="private"&&!!e.onDeleteTemplate;(0,de.useEffect)(()=>{if(!r)return;let f=y=>{l.current&&!l.current.contains(y.target)&&n(!1)},h=y=>{y.key==="Escape"&&n(!1)};return window.addEventListener("mousedown",f),window.addEventListener("keydown",h),()=>{window.removeEventListener("mousedown",f),window.removeEventListener("keydown",h)}},[r]);let d=async()=>{try{await navigator.clipboard.writeText(t.templateId),i(!0),window.setTimeout(()=>{i(!1),n(!1)},900)}catch{n(!1)}},p=async()=>{if(!window.confirm(`Delete "${t.title}"? This removes it from your Discover feed permanently.`))return;a(!0);let f=await(e.onDeleteTemplate?.(t.templateId)??Promise.resolve({ok:!1,error:"Delete unavailable."}));a(!1),f.ok?n(!1):window.alert(f.error||"Unable to delete this template.")};return(0,S.jsxs)("div",{className:"discover-card-menu",ref:l,children:[(0,S.jsx)("button",{type:"button",className:"discover-card-menu-trigger","aria-haspopup":"menu","aria-expanded":r,"aria-label":`More actions for ${t.title}`,title:"More actions",onClick:()=>n(f=>!f),children:(0,S.jsx)(gI,{})}),r?(0,S.jsxs)("div",{className:"discover-card-menu-panel",role:"menu",children:[(0,S.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{d()},children:o?"Copied!":"Copy ID"}),c?(0,S.jsx)("span",{className:"discover-card-menu-item is-disabled",role:"menuitem","aria-disabled":"true",children:"Open in Editor"}):(0,S.jsx)("a",{className:"discover-card-menu-item",role:"menuitem",href:TI(t.templateId,e.accountUserId),children:"Open in Editor"}),(0,S.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{e.onToggleBookmark?.(t.templateId),n(!1)},children:e.isBookmarked?"Remove Bookmark":"Bookmark"}),u?(0,S.jsx)("button",{type:"button",className:"discover-card-menu-item is-danger",role:"menuitem",disabled:s,onClick:()=>{p()},children:s?"Deleting\u2026":"Delete"}):null]}):null]})}function iO(e){let t=`${e.isBookmarked?"Remove bookmark for ":"Bookmark "}${e.title}`;return(0,S.jsx)("button",{className:"bookmark-button",type:"button","data-active":e.isBookmarked?"true":"false","aria-label":t,"aria-pressed":e.isBookmarked,title:t,onClick:()=>e.onToggleBookmark?.(e.templateId),children:(0,S.jsx)(VL,{})})}function sO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function aO(e){let t=typeof e.layerCount=="number"?e.layerCount:null,r=typeof e.sourceAssetCount=="number"?e.sourceAssetCount:null,n=typeof e.durationSeconds=="number"&&Number.isFinite(e.durationSeconds)?e.durationSeconds>=60?`${Math.floor(e.durationSeconds/60)}:${String(Math.round(e.durationSeconds%60)).padStart(2,"0")}`:`${e.durationSeconds.toFixed(e.durationSeconds>=10?1:2)}s`:null,o=[t===null?null:`${t} layer${t===1?"":"s"}`,r===null?null:`${r} source${r===1?"":"s"}`,n].filter(Boolean);return o.length?o.join(" / "):e.previewUrl?"Draft composition with editable layers.":"Layer recipe with editable timeline."}function lO(e){let{template:t}=e,r=t.status==="processing"||t.status==="failed",n=t.previewUrl?Ad(t.previewUrl)?(0,S.jsx)(eO,{src:t.previewUrl,controls:!1}):(0,S.jsx)("img",{className:"preview",src:t.previewUrl,alt:`${t.title} preview`,loading:"lazy",decoding:"async"}):(0,S.jsx)("div",{className:"preview preview-empty",children:t.status==="processing"?"Downloading\u2026":"No preview"});return(0,S.jsxs)("li",{className:"discover-card row","data-template-id":t.templateId,children:[t.previewUrl?(0,S.jsxs)("button",{className:"discover-card-media discover-card-media-button",type:"button","aria-label":`Open ${t.title} preview`,onClick:()=>e.onOpenPreview?.(t),children:[n,(0,S.jsx)("span",{className:"discover-card-media-affordance","aria-hidden":"true",children:"View"})]}):(0,S.jsx)("div",{className:"discover-card-media",children:n}),(0,S.jsxs)("div",{className:"discover-card-copy",children:[(0,S.jsxs)("div",{className:"discover-card-head",children:[(0,S.jsxs)("div",{className:"discover-card-title-wrap",children:[(0,S.jsx)("h2",{children:t.title}),(0,S.jsx)("p",{className:"discover-card-meta",children:aO(t)})]}),(0,S.jsxs)("div",{className:"discover-card-actions",children:[(0,S.jsx)(iO,{templateId:t.templateId,title:t.title,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark}),r?(0,S.jsx)("span",{className:"cta-button discover-card-cta-disabled","aria-disabled":"true",children:t.status==="failed"?"Failed":"Preparing\u2026"}):(0,S.jsx)(nO,{templateId:t.templateId,accountUserId:e.accountUserId}),(0,S.jsx)(oO,{template:t,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.accountUserId})]})]}),(0,S.jsx)("div",{className:"discover-card-body",children:(0,S.jsx)("p",{children:String(t.viralDna||"").trim()||"No layer strategy provided for this composition yet."})}),(0,S.jsxs)("div",{className:"discover-card-tags",children:[t.origin==="raw"?(0,S.jsx)("div",{className:"pill-tag origin-pill",title:"Your own project \u2014 created from a prompt or your raw clips, not an imported inspiration",children:"Your project"}):null,t.visibility==="private"?(0,S.jsx)("div",{className:"pill-tag private-pill",title:"Only visible to your account",children:"Only you"}):null,t.status==="processing"?(0,S.jsx)("div",{className:"pill-tag processing-pill",children:"Processing"}):t.status==="failed"?(0,S.jsx)("div",{className:"pill-tag failed-pill",children:"Download failed"}):null,(0,S.jsx)("div",{className:"pill-tag difficulty-pill","data-difficulty":t.difficulty,children:sO(t.difficulty)}),(0,S.jsx)("div",{className:"pill-tag",children:t.sourceType||(Ad(t.previewUrl)?"Video source":"Image sequence")}),(0,S.jsx)(rO,{text:t.templateId,label:t.templateId})]})]})]})}function cO(e){let{onClose:t,template:r}=e,n=r.previewUrl||"",o=Ad(n),[i,s]=(0,de.useState)(""),a=EI();(0,de.useEffect)(()=>(hI(!0),()=>hI(!1)),[]);let l=async()=>{try{await navigator.clipboard.writeText(n),s("done")}catch{s("error")}window.setTimeout(()=>s(""),1600)};return(0,de.useEffect)(()=>{let c=d=>{d.key==="Escape"&&t()},u=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",c),()=>{document.body.style.overflow=u,window.removeEventListener("keydown",c)}},[t]),(0,S.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,S.jsxs)("div",{className:"discover-media-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-media-modal-title",onClick:c=>c.stopPropagation(),children:[(0,S.jsxs)("div",{className:"discover-media-modal-head",children:[(0,S.jsx)("h2",{id:"discover-media-modal-title",children:r.title}),(0,S.jsxs)("div",{className:"discover-media-modal-actions",children:[(0,S.jsx)("a",{className:"discover-media-modal-action",href:n,download:!0,"aria-label":`Download ${r.title} preview`,title:"Download",onClick:c=>c.stopPropagation(),children:(0,S.jsx)(XL,{})}),(0,S.jsx)("button",{className:"discover-media-modal-action",type:"button","data-state":i,"aria-label":i==="done"?"Media URL copied":i==="error"?"Unable to copy media URL":`Copy ${r.title} preview URL`,title:i==="done"?"Copied":i==="error"?"Copy failed":"Copy link",onClick:()=>{l()},children:(0,S.jsx)(JL,{})}),(0,S.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close preview",title:"Close",onClick:t,children:(0,S.jsx)(SI,{})})]})]}),(0,S.jsx)("div",{className:"discover-media-modal-stage",children:o?(0,S.jsx)("video",{src:n,controls:!0,autoPlay:!0,playsInline:!0,preload:"metadata",muted:a,onVolumeChange:c=>{let u=c.currentTarget.muted;u!==gs&&vI(u)}}):(0,S.jsx)("img",{src:n,alt:`${r.title} preview`})})]})})}function uO(e){let{onClose:t}=e,[r,n]=(0,de.useState)(""),[o,i]=(0,de.useState)(null),[s,a]=(0,de.useState)(""),[l,c]=(0,de.useState)(""),[u,d]=(0,de.useState)(""),[p,f]=(0,de.useState)(!1),[h,y]=(0,de.useState)(null);(0,de.useEffect)(()=>{let m=v=>{v.key==="Escape"&&t()},g=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",m),()=>{document.body.style.overflow=g,window.removeEventListener("keydown",m)}},[t]);let E=async()=>{let m=r.trim();if(!m&&!o){y("Paste a TikTok, YouTube, Twitter/X, or Instagram video URL \u2014 or upload a video file.");return}if(o&&o.size>200*1024*1024){y("Video uploads can be at most 200 MB.");return}f(!0),y(null);let g=await(e.onAddTemplate?.({sourceUrl:o?"":m,file:o,title:s.trim(),tagline:l.trim(),notes:u.trim()})??Promise.resolve({ok:!1,error:"Adding templates is unavailable right now."}));f(!1),g.ok?t():y(g.error||"Unable to add that video. Try again.")};return(0,S.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,S.jsxs)("div",{className:"discover-media-modal discover-add-template-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-add-template-title",onClick:m=>m.stopPropagation(),children:[(0,S.jsxs)("div",{className:"discover-media-modal-head",children:[(0,S.jsx)("h2",{id:"discover-add-template-title",children:"Add Template"}),(0,S.jsx)("div",{className:"discover-media-modal-actions",children:(0,S.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close",title:"Close",onClick:t,children:(0,S.jsx)(SI,{})})})]}),(0,S.jsxs)("form",{className:"discover-add-template-form",onSubmit:m=>{m.preventDefault(),E()},children:[(0,S.jsx)("p",{className:"discover-add-template-hint",children:"Paste a link to a TikTok, YouTube, Twitter/X, or Instagram video \u2014 or upload a video file from your computer. We add it to your Discover feed, visible only to your account."}),(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsx)("label",{className:"label",htmlFor:"add-template-url",children:"Video URL"}),(0,S.jsx)("input",{id:"add-template-url",type:"url",required:!o,disabled:!!o,placeholder:"https://www.tiktok.com/@creator/video/\u2026",autoComplete:"off",value:r,onChange:m=>n(m.target.value)})]}),(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-file",children:["Or upload a video ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"MP4 / MOV / WebM, up to 200 MB"})]}),o?(0,S.jsxs)("div",{className:"discover-add-template-file-chip",children:[(0,S.jsx)("span",{className:"discover-add-template-file-name",children:o.name}),(0,S.jsxs)("span",{className:"discover-add-template-file-size",children:[(o.size/(1024*1024)).toFixed(1)," MB"]}),(0,S.jsx)("button",{type:"button",className:"discover-add-template-file-clear","aria-label":"Remove selected file",onClick:()=>i(null),children:"\u2715"})]}):(0,S.jsx)("input",{id:"add-template-file",type:"file",accept:"video/mp4,video/quicktime,video/webm,.mp4,.m4v,.mov,.webm",onChange:m=>{let g=m.target.files?.[0]??null;g&&(i(g),n(""),y(null))}})]}),o?(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-title",children:["Title ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"optional \u2014 defaults to the template id"})]}),(0,S.jsx)("input",{id:"add-template-title",type:"text",placeholder:"Name this template\u2026",autoComplete:"off",maxLength:140,value:s,onChange:m=>a(m.target.value)})]}):null,(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-tagline",children:["Tagline ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,S.jsx)("input",{id:"add-template-tagline",type:"text",placeholder:"What makes this video work?",autoComplete:"off",maxLength:140,value:l,onChange:m=>c(m.target.value)})]}),(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-notes",children:["Notes ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,S.jsx)("textarea",{id:"add-template-notes",rows:4,placeholder:"Ideas for how you want to remix this\u2026",maxLength:2e3,value:u,onChange:m=>d(m.target.value)})]}),h?(0,S.jsx)("p",{className:"discover-add-template-error",role:"alert",children:h}):null,(0,S.jsxs)("div",{className:"toolbar discover-add-template-actions",children:[(0,S.jsx)("button",{type:"button",className:"secondary",onClick:t,disabled:p,children:"Cancel"}),(0,S.jsx)("button",{type:"submit",className:"cta-button discover-add-template-submit",disabled:p,children:p?o?"Uploading\u2026":"Adding\u2026":"Add Template"})]})]})]})})}function bI(e){let t=!e.loading&&!e.error&&e.templates.length>0&&e.visibleTemplates.length===0,[r,n]=(0,de.useState)(null),[o,i]=(0,de.useState)(!1),s=e.loading||e.error?"Search Templates":`Search ${e.visibleTemplates.length} Template${e.visibleTemplates.length===1?"":"s"}`,a=!0,l=e.account.isLoggedIn;return(0,S.jsxs)("section",{className:`frame discover-frame${a?" has-chat-rail":""}`,children:[(0,S.jsxs)("header",{className:"topbar",children:[(0,S.jsx)(KL,{account:e.account}),(0,S.jsx)("div",{className:"topbar-actions",children:(0,S.jsx)(qL,{account:e.account})})]}),(0,S.jsx)("div",{className:"frame-body",children:(0,S.jsxs)("section",{className:"discover-shell",children:[(0,S.jsxs)("div",{className:"discover-filter-bar",role:"toolbar","aria-label":"Composition filters",children:[(0,S.jsxs)("div",{className:"discover-filter-search search-field",children:[(0,S.jsx)("span",{className:"search-icon","aria-hidden":"true",children:(0,S.jsx)(GL,{})}),(0,S.jsx)("input",{id:"search",type:"search",placeholder:s,autoComplete:"off",value:e.searchQuery,onChange:c=>e.onSearchQueryChange?.(c.target.value)})]}),(0,S.jsxs)("label",{className:"discover-filter-toggle",htmlFor:"bookmarks-only","data-active":e.bookmarksOnly?"true":"false",children:[(0,S.jsx)("span",{className:"discover-filter-toggle-label",children:"Saved"}),(0,S.jsxs)("span",{className:"switch-shell","data-active":e.bookmarksOnly?"true":"false",children:[(0,S.jsx)("input",{id:"bookmarks-only",className:"switch-input",type:"checkbox",checked:e.bookmarksOnly,onChange:c=>e.onBookmarksOnlyChange?.(c.target.checked)}),(0,S.jsx)("span",{className:"switch-knob"})]})]}),e.account.isLoggedIn?(0,S.jsx)("button",{type:"button",className:"discover-add-template-button",onClick:()=>i(!0),children:"Add Template"}):(0,S.jsx)("a",{className:"discover-add-template-button",href:"/login",children:"Add Template"}),(0,S.jsx)(tO,{})]}),(0,S.jsx)("section",{className:"discover-results",children:(0,S.jsx)("div",{className:"discover-results-scroll",children:(0,S.jsxs)("div",{className:"discover-list-scroll",children:[(0,S.jsx)("ul",{className:"discover-list",id:"template-list",children:e.loading?(0,S.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading compositions..."}):e.error?(0,S.jsx)("li",{className:"empty-state discover-loading-card",children:"Unable to load compositions."}):e.templates.length===0?(0,S.jsx)("li",{className:"empty-state discover-loading-card",children:"No compositions available."}):e.visibleTemplates.map(c=>(0,S.jsx)(lO,{template:c,isBookmarked:e.bookmarks.has(c.templateId),onToggleBookmark:e.onToggleBookmark,onOpenPreview:n,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.account.userId},c.templateId))}),(0,S.jsx)("div",{className:"empty-state empty",id:"empty-state","data-visible":t?"true":"false",children:"No compositions match the current search and filter combination."})]})})})]})}),a?(0,S.jsx)("aside",{className:"editor-right-rail","aria-label":"Discover copilot",children:l?(0,S.jsx)("div",{className:"editor-chat-panel","data-template-editor-chat-root":!0}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("a",{className:"vf-editor-chat-mobile-fab",href:"/login","aria-label":"Log in to chat with Vidfarm",children:(0,S.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,S.jsx)("path",{d:"M20 11.5a7.5 7.5 0 0 1-9.8 7.1L4 20l1.5-5.3A7.5 7.5 0 1 1 20 11.5Z"})})}),(0,S.jsxs)("div",{className:"editor-chat-panel editor-chat-panel--logged-out",style:{display:"flex",flexDirection:"column",height:"100%",padding:"20px",gap:"16px",boxSizing:"border-box"},children:[(0,S.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[(0,S.jsx)("span",{className:"label",style:{fontSize:"0.68rem",fontWeight:800,letterSpacing:"0.14em",textTransform:"uppercase",color:"#a9884a"},children:"Vidfarm copilot"}),(0,S.jsx)("h3",{style:{margin:0,fontSize:"1.05rem",color:"#2f3748"},children:"Chat with Vidfarm"}),(0,S.jsx)("p",{style:{margin:0,fontSize:"0.9rem",color:"#74829c"},children:"Ask for hooks, angles, and remixes tailored to compositions in your library."})]}),(0,S.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginTop:"14px"},"aria-hidden":"true",children:["Give me 10 hooks for this coffee-shop template","Which awareness stage fits my product?","Remix this into an ad for my brand"].map(c=>(0,S.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 14px",borderRadius:"14px",border:"1px dashed rgba(191, 164, 109, 0.45)",background:"rgba(250, 245, 234, 0.65)",color:"#74829c",fontSize:"0.85rem",lineHeight:1.35},children:[(0,S.jsx)("span",{style:{color:"#bfa46d",fontWeight:700},children:"\u201C"}),c]},c))}),(0,S.jsxs)("div",{style:{marginTop:"auto",display:"flex",flexDirection:"column",gap:"10px"},children:[(0,S.jsx)("textarea",{rows:3,placeholder:"Log in to chat with Vidfarm\u2026",disabled:!0,"aria-label":"Chat with Vidfarm (log in to enable)",style:{width:"100%",resize:"none",padding:"10px 12px",borderRadius:"10px",border:"1px solid rgba(191, 164, 109, 0.36)",background:"rgba(250, 245, 234, 0.9)",color:"#74829c",fontFamily:"inherit",fontSize:"0.9rem",cursor:"not-allowed",boxSizing:"border-box"}}),(0,S.jsx)("a",{href:"/login",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:"38px",padding:"0 16px",borderRadius:"999px",background:"#bfa46d",color:"#1a1409",fontWeight:700,fontSize:"0.9rem",textDecoration:"none"},children:"Log in to chat"})]})]})]})}):null,r?(0,S.jsx)(cO,{template:r,onClose:()=>n(null)}):null,o?(0,S.jsx)(uO,{onClose:()=>i(!1),onAddTemplate:e.onAddTemplate}):null]})}function II(e){return sI(t=>({templates:e.templates,searchQuery:"",bookmarksOnly:!1,bookmarks:new Set,loading:e.templates.length===0,error:null,setTemplates:r=>t({templates:r,loading:!1,error:null}),setSearchQuery:r=>t({searchQuery:r}),setBookmarksOnly:r=>t({bookmarksOnly:r}),setBookmarks:r=>t({bookmarks:new Set(r)}),toggleBookmark:r=>t(n=>{let o=new Set(n.bookmarks);return o.has(r)?o.delete(r):o.add(r),{bookmarks:o}}),setLoading:r=>t({loading:r}),setError:r=>t({error:r,loading:!1})}))}var Zo=mr(xl(),1);lI();var dO="vidfarm:discover-bookmarks:v1",pO="public";function fO(){let e=document.getElementById("homepage-boot");return e?.textContent?JSON.parse(e.textContent):{templates:[],account:{isLoggedIn:!1},loadEndpoint:"/discover/feed",skillEndpointPrefix:"/discover/skills/"}}function wI(e){return`${dO}_${e?.trim()||pO}`}function mO(e){try{let t=window.localStorage.getItem(wI(e));if(!t)return new Set;let r=JSON.parse(t);return Array.isArray(r)?new Set(r.filter(n=>typeof n=="string")):new Set}catch{return new Set}}function hO(e,t){try{window.localStorage.setItem(wI(t),JSON.stringify(Array.from(e)))}catch{}}function gO(e){let t=e.searchQuery.trim().toLowerCase();return e.templates.filter(r=>{let n=!t||`${r.templateId} ${r.title} ${r.slugId} ${r.difficulty}`.toLowerCase().includes(t),o=!e.bookmarksOnly||e.bookmarks.has(r.templateId);return n&&o})}function SO({boot:e}){let t=(0,Dt.useMemo)(()=>II(e),[e]),r=Qo(t,y=>y.templates),n=Qo(t,y=>y.searchQuery),o=Qo(t,y=>y.bookmarksOnly),i=Qo(t,y=>y.bookmarks),s=Qo(t,y=>y.loading),a=Qo(t,y=>y.error),[l,c]=(0,Dt.useState)(!1),u=(0,Dt.useMemo)(()=>gO({templates:r,searchQuery:n,bookmarksOnly:o,bookmarks:i}),[r,n,o,i]);(0,Dt.useEffect)(()=>{t.getState().setBookmarks(mO(e.account.userId)),c(!0)},[e.account.userId,t]),(0,Dt.useEffect)(()=>{l&&hO(i,e.account.userId)},[e.account.userId,i,l]);let d=(0,Dt.useCallback)(async y=>{y?.showLoading&&t.getState().setLoading(!0);try{let E=await fetch(e.loadEndpoint,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),m=await E.json().catch(()=>({}));if(!E.ok)throw new Error(typeof m.error=="string"&&m.error?m.error:"Unable to load formats.");t.getState().setTemplates(Array.isArray(m.templates)?m.templates:[])}catch(E){y?.showLoading?t.getState().setError(E instanceof Error?E.message:"Unable to load formats."):hs("homepage.feed_refresh_failed",{message:E instanceof Error?E.message:String(E)})}},[e.loadEndpoint,t]);(0,Dt.useEffect)(()=>{e.templates.length>0||d({showLoading:!0})},[e.templates.length,d]);let p=r.some(y=>y.status==="processing");(0,Dt.useEffect)(()=>{if(!p)return;let y=window.setInterval(()=>{d()},8e3);return()=>window.clearInterval(y)},[p,d]);let f=(0,Dt.useCallback)(async y=>{try{let E=await fetch(`/discover/templates/${encodeURIComponent(y)}`,{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json"}}),m=await E.json().catch(()=>({}));return E.ok?(Il("homepage.template_deleted",{template_id:y}),await d(),{ok:!0}):{ok:!1,error:typeof m.error=="string"&&m.error?m.error:"Unable to delete this template."}}catch(E){return{ok:!1,error:E instanceof Error?E.message:"Unable to delete this template."}}},[d]),h=(0,Dt.useCallback)(async y=>{try{let E=null;if(y.file){let v=y.file,b=await fetch("/discover/templates/upload/presign",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({file_name:v.name,content_type:v.type||null,size_bytes:v.size})}),k=await b.json().catch(()=>({}));if(!b.ok)return{ok:!1,error:k.error||"Unable to start the video upload."};if(k.transport==="presigned"&&k.upload?.url&&k.storage_key){let w=await fetch(k.upload.url,{method:k.upload.method||"PUT",headers:k.upload.headers||{},body:v});if(!w.ok)return{ok:!1,error:`Video upload failed (${w.status}). Try again.`};E={storage_key:k.storage_key,file_name:k.file_name||v.name}}else{let w=new FormData;w.append("file",v,k.file_name||v.name);let _=await fetch(k.upload?.url||"/discover/templates/upload",{method:"POST",credentials:"same-origin",body:w}),I=await _.json().catch(()=>({}));if(!_.ok||!I.storage_key)return{ok:!1,error:I.error||"Video upload failed. Try again."};E={storage_key:I.storage_key,file_name:I.file_name||v.name}}}let m=await fetch("/discover/templates",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(E?{upload:E,title:y.title||null,tagline:y.tagline||null,notes:y.notes||null}:{source_url:y.sourceUrl,tagline:y.tagline||null,notes:y.notes||null})}),g=await m.json().catch(()=>({}));return m.ok?(Il("homepage.template_added",E?{storage_key:E.storage_key}:{source_url:y.sourceUrl}),await d(),{ok:!0}):{ok:!1,error:typeof g.error=="string"&&g.error?g.error:"Unable to add that video."}}catch(E){return{ok:!1,error:E instanceof Error?E.message:"Unable to add that video."}}},[d]);return(0,Zo.jsx)(bI,{account:e.account,templates:r,visibleTemplates:u,searchQuery:n,bookmarksOnly:o,bookmarks:i,loading:s,error:a,skillEndpointPrefix:e.skillEndpointPrefix,onSearchQueryChange:y=>t.getState().setSearchQuery(y),onBookmarksOnlyChange:y=>t.getState().setBookmarksOnly(y),onToggleBookmark:y=>t.getState().toggleBookmark(y),onAddTemplate:h,onDeleteTemplate:f})}var Ld=fO(),xI=document.getElementById("homepage-root");Il("homepage.boot",{is_logged_in:Ld.account?.isLoggedIn??!1,template_count:Ld.templates?.length??0,load_endpoint:Ld.loadEndpoint});xI?(0,kI.hydrateRoot)(xI,(0,Zo.jsx)(Aa,{fallback:(0,Zo.jsx)(Zo.Fragment,{}),onError:e=>hs("homepage.render_error",{message:e instanceof Error?e.message:String(e)}),children:(0,Zo.jsx)(SO,{boot:Ld})})):hs("homepage.no_root_element",{});
|
|
30
|
+
or you can use record.mirror to access the mirror instance during recording.`,Qv={map:{},getId(){return console.error(Ai),-1},getNode(){return console.error(Ai),null},removeNodeFromMap(){console.error(Ai)},has(){return console.error(Ai),!1},reset(){console.error(Ai)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Qv=new Proxy(Qv,{get(e,t,r){return t==="map"&&console.error(Ai),Reflect.get(e,t,r)}}));function Ea(e,t,r={}){let n=null,o=0;return function(...i){let s=Date.now();!o&&r.leading===!1&&(o=s);let a=t-(s-o),l=this;a<=0||a>t?(n&&(xC(n),n=null),o=s,e.apply(l,i)):!n&&r.trailing!==!1&&(n=ou(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(l,i)},a))}}function I_(e,t,r,n,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(s){ou(()=>{r.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>I_(e,t,i||{},!0)}function Jf(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}var Gc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gc=()=>new Date().getTime());function w_(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function x_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function R_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function C_(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function zt(e,t,r,n,o){if(!e)return!1;let i=C_(e);if(!i)return!1;let s=Oi(t,r);if(!o){let c=n&&i.matches(n);return s(i)&&!c}let a=Do(i,s),l=-1;return a<0?!1:(n&&(l=Do(i,Oi(null,n))),a>-1&&l<0?!0:a<l)}function TC(e,t){return t.getId(e)!==-1}function Sf(e,t){return t.getId(e)===_a}function N_(e,t){if(ga(e))return!1;let r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?N_(e.parentNode,t):!0:!0}function kf(e){return!!e.changedTouches}function bC(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=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function A_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function M_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function If(e){return!!e?.shadowRoot}var wf=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function L_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function kC(e){let t=e,r;for(;r=L_(t);)t=r;return t}function IC(e){let t=e.ownerDocument;if(!t)return!1;let r=kC(e);return t.contains(r)}function O_(e){let t=e.ownerDocument;return t?t.contains(e)||IC(e):!1}var e_={};function Zf(e){let t=e_[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return e_[e]=n.bind(window)}function wC(...e){return Zf("requestAnimationFrame")(...e)}function ou(...e){return Zf("setTimeout")(...e)}function xC(...e){return Zf("clearTimeout")(...e)}var V=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(V||{}),W=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(W||{}),yt=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(yt||{}),pn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(pn||{}),Mi=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Mi||{}),ya;function RC(e){ya=e}function CC(){ya=void 0}var Q=e=>ya?((...r)=>{try{return e(...r)}catch(n){if(ya&&ya(n)===!0)return()=>{};throw n}}):e,t_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ma=0;ma<t_.length;ma++)NC[t_.charCodeAt(ma)]=ma;var ma,Vc=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Qf(e){try{return e.contentDocument}catch{}}function Ta(e){try{return e.contentWindow}catch{}}var xf=class{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{let r=new CSSStyleSheet;r.replaceSync(`x { ${t} }`);let n=r.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(t){let r=this.getUnattachedDoc().createElement("span");return r.setAttribute("style",t),r.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function r_(e){return"__ln"in e}var Rf=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&r_(t.previousSibling)){let n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&r_(t.nextSibling)&&t.nextSibling.__ln.previous){let n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){let r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},n_=(e,t)=>`${e}@${t}`,Cf=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,n=new Rf,o=l=>{let c=l,d=_a;for(;d===_a;)c=c&&c.nextSibling,d=c&&this.mirror.getId(c);return d},i=l=>{if(!l.parentNode||!O_(l))return;let c=ga(l.parentNode)?this.mirror.getId(L_(l)):this.mirror.getId(l.parentNode),d=o(l);if(c===-1||d===-1)return n.addNode(l);let u=Pi(l,{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:p=>{A_(p,this.mirror)&&!zt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),M_(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),If(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(zt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(p,f);let h=Ta(p);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:v})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${v}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});u&&(t.push({parentId:c,nextId:d,node:u}),r.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)o_(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(let l of this.addedSet)!i_(this.droppedSet,l)&&!o_(this.removes,l,this.mirror)||i_(this.movedSet,l)?i(l):this.droppedSet.add(l);let s=null;for(;n.length;){let l=null;if(s){let c=this.mirror.getId(s.value.parentNode),d=o(s.value);c!==-1&&d!==-1&&(l=s)}if(!l){let c=n.tail;for(;c;){let d=c;if(c=c.previous,d){let u=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(u!==-1){l=d;break}else{let f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=f.parentNode.host;if(this.mirror.getId(h)!==-1){l=d;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),i(l.value)}let a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:c}=l;if(typeof c.style=="string"){let d=JSON.stringify(l.styleDiff),u=JSON.stringify(l._unchangedStyles);d.length<c.style.length&&(d+u).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!Sf(t.target,this.mirror))switch(t.type){case"characterData":{let r=t.target.textContent;!zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Bi(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r,C_(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,o=t.target.getAttribute(n);if(n==="value"){let s=Kf(r),a=r.tagName;o=Wc(r,a,s);let l=ru({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),c=Bi(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);o=va({isMasked:c,element:r,value:o,maskInputFn:this.maskInputFn})}if(zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(o))if(!Qf(r))n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!k_(r.tagName,n)&&(i.attributes[n]=b_(this.doc,Ui(r.tagName),Ui(n),o,r,this.maskAttributeFn),n==="style")){let s=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(let a of Array.from(r.style)){let l=r.style.getPropertyValue(a),c=r.style.getPropertyPriority(a);l!==(s?.getPropertyValue(a)||"")||c!==(s?.getPropertyPriority(a)||"")?c===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,c]:i._unchangedStyles[a]=[l,c]}if(s)for(let a of Array.from(s))r.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let n=this.mirror.getId(r),o=ga(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Sf(r,this.mirror)||!TC(r,this.mirror)||(this.addedSet.has(r)?(Nf(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||N_(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[n_(n,o)]?Nf(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:ga(t.target)&&Sa(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Sf(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[n_(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);zt(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(n=>this.genAdds(n)),If(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}}}init(t){["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(r=>{this[r]=t[r]}),this.styleDeclarationParser=new xf(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 Nf(e,t){e.delete(t),t.childNodes?.forEach(r=>Nf(e,r))}function o_(e,t,r){return e.length===0?!1:AC(e,t,r)}function AC(e,t,r){let n=t.parentNode;for(;n;){let o=r.getId(n);if(e.some(i=>i.id===o))return!0;n=n.parentNode}return!1}function i_(e,t){return e.size===0?!1:P_(e,t)}function P_(e,t){let{parentNode:r}=t;return r?e.has(r)?!0:P_(e,r):!1}var Di=[];function xa(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 D_(e,t){let r=new Cf;Di.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver,o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(n=window[o]);let i=new n(Q(s=>{e.onMutation&&e.onMutation(s)===!1||r.processMutations.bind(r)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function MC({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,l=Ea(Q(u=>{let p=Date.now()-a;e(s.map(f=>(f.timeOffset-=p,f)),u),s=[],a=null}),i),c=Q(Ea(Q(u=>{let p=xa(u),{clientX:f,clientY:h}=kf(u)?u.changedTouches[0]:u;a||(a=Gc()),s.push({x:f,y:h,id:n.getId(p),timeOffset:Gc()-a}),l(typeof DragEvent<"u"&&u instanceof DragEvent?W.Drag:u instanceof MouseEvent?W.MouseMove:W.TouchMove)}),o,{trailing:!1})),d=[vt("mousemove",c,r),vt("touchmove",c,r),vt("drag",c,r)];return Q(()=>{d.forEach(u=>u())})}function LC({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[],c=null,d=u=>p=>{let f=xa(p);if(zt(f,n,o,i,!0))return;let h=null,v=u;if("pointerType"in p){switch(p.pointerType){case"mouse":h=pn.Mouse;break;case"touch":h=pn.Touch;break;case"pen":h=pn.Pen;break}h===pn.Touch?yt[u]===yt.MouseDown?v="TouchStart":yt[u]===yt.MouseUp&&(v="TouchEnd"):pn.Pen}else kf(p)&&(h=pn.Touch);h!==null?(c=h,(v.startsWith("Touch")&&h===pn.Touch||v.startsWith("Mouse")&&h===pn.Mouse)&&(h=null)):yt[u]===yt.Click&&(h=c,c=null);let I=kf(p)?p.changedTouches[0]:p;if(!I)return;let m=r.getId(f),{clientX:S,clientY:y}=I;Q(e)({type:yt[v],id:m,x:S,y,...h!==null&&{pointerType:h}})};return Object.keys(yt).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let p=Ui(u),f=d(u);if(window.PointerEvent)switch(yt[u]){case yt.MouseDown:case yt.MouseUp:p=p.replace("mouse","pointer");break;case yt.TouchStart:case yt.TouchEnd:return}l.push(vt(p,f,t))}),Q(()=>{l.forEach(u=>u())})}function U_({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){let a=Q(Ea(Q(l=>{let c=xa(l);if(!c||zt(c,n,o,i,!0))return;let d=r.getId(c);if(c===t&&t.defaultView){let u=w_(t.defaultView);e({id:d,x:u.left,y:u.top})}else e({id:d,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return vt("scroll",a,t)}function OC({viewportResizeCb:e},{win:t}){let r=-1,n=-1,o=Q(Ea(Q(()=>{let i=x_(),s=R_();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return vt("resize",o,t)}var PC=["INPUT","TEXTAREA","SELECT"],s_=new WeakMap;function DC({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:d,userTriggeredOnInput:u,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:v}){function I(_){let k=xa(_),z=_.isTrusted,w=k&&Tf(k.tagName);if(w==="OPTION"&&(k=k.parentElement),!k||!w||PC.indexOf(w)<0||zt(k,n,o,i,!0))return;let L=k;if(L.classList.contains(s)||a&&L.matches(a))return;let $=Kf(k),Y=Wc(L,w,$),G=!1,be=ru({maskInputOptions:l,tagName:w,type:$}),ce=Bi(k,p,h,f,v,be);($==="radio"||$==="checkbox")&&(G=k.checked),Y=va({isMasked:ce,element:k,value:Y,maskInputFn:c}),m(k,u?{text:Y,isChecked:G,userTriggered:z}:{text:Y,isChecked:G});let ye=k.name;$==="radio"&&ye&&G&&t.querySelectorAll(`input[type="radio"][name="${ye}"]`).forEach(N=>{if(N!==k){let oe=va({isMasked:ce,element:N,value:Wc(N,w,$),maskInputFn:c});m(N,u?{text:oe,isChecked:!G,userTriggered:!1}:{text:oe,isChecked:!G})}})}function m(_,k){let z=s_.get(_);if(!z||z.text!==k.text||z.isChecked!==k.isChecked){s_.set(_,k);let w=r.getId(_);Q(e)({...k,id:w})}}let y=(d.input==="last"?["change"]:["input","change"]).map(_=>vt(_,Q(I),t)),b=t.defaultView;if(!b)return()=>{y.forEach(_=>_())};let R=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),E=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return R&&R.set&&y.push(...E.map(_=>I_(_[0],_[1],{set(){Q(I)({target:this,isTrusted:!1})}},!1,b))),Q(()=>{y.forEach(_=>_())})}function Yc(e){let t=[];function r(n,o){if(Uc("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Uc("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Uc("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Uc("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(s)}return o}return r(e,t)}function Un(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function UC({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Q((d,u,p)=>{let[f,h]=p,{id:v,styleId:I}=Un(u,t,r.styleMirror);return(v&&v!==-1||I&&I!==-1)&&e({id:v,styleId:I,adds:[{rule:f,index:h}]}),d.apply(u,p)})});let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Q((d,u,p)=>{let[f]=p,{id:h,styleId:v}=Un(u,t,r.styleMirror);return(h&&h!==-1||v&&v!==-1)&&e({id:h,styleId:v,removes:[{index:f}]}),d.apply(u,p)})});let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Q((d,u,p)=>{let[f]=p,{id:h,styleId:v}=Un(u,t,r.styleMirror);return(h&&h!==-1||v&&v!==-1)&&e({id:h,styleId:v,replace:f}),d.apply(u,p)})}));let a;n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Q((d,u,p)=>{let[f]=p,{id:h,styleId:v}=Un(u,t,r.styleMirror);return(h&&h!==-1||v&&v!==-1)&&e({id:h,styleId:v,replaceSync:f}),d.apply(u,p)})}));let l={};Bc("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(Bc("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),Bc("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),Bc("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(l).forEach(([d,u])=>{c[d]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(c[d].insertRule,{apply:Q((p,f,h)=>{let[v,I]=h,{id:m,styleId:S}=Un(f.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||S&&S!==-1)&&e({id:m,styleId:S,adds:[{rule:v,index:[...Yc(f),I||0]}]}),p.apply(f,h)})}),u.prototype.deleteRule=new Proxy(c[d].deleteRule,{apply:Q((p,f,h)=>{let[v]=h,{id:I,styleId:m}=Un(f.parentStyleSheet,t,r.styleMirror);return(I&&I!==-1||m&&m!==-1)&&e({id:I,styleId:m,removes:[{index:[...Yc(f),v]}]}),p.apply(f,h)})})}),Q(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=i,s&&(n.CSSStyleSheet.prototype.replace=s),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([d,u])=>{u.prototype.insertRule=c[d].insertRule,u.prototype.deleteRule=c[d].deleteRule})})}function B_({mirror:e,stylesheetManager:t},r){let n=null;r.nodeName==="#document"?n=e.getId(r):n=e.getId(r.host);let o=r.nodeName==="#document"?r.defaultView?.Document:r.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!o||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){let a=i.set?.call(this,s);if(n!==null&&n!==-1)try{t.adoptStyleSheets(s,n)}catch{}return a}}),Q(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function BC({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Q((a,l,c)=>{let[d,u,p]=c;if(r.has(d))return i.apply(l,[d,u,p]);let{id:f,styleId:h}=Un(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:d,value:u,priority:p},index:Yc(l.parentRule)}),a.apply(l,c)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Q((a,l,c)=>{let[d]=c;if(r.has(d))return s.apply(l,[d]);let{id:u,styleId:p}=Un(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(u&&u!==-1||p&&p!==-1)&&e({id:u,styleId:p,remove:{property:d},index:Yc(l.parentRule)}),a.apply(l,c)})}),Q(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function FC({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:o,sampling:i,doc:s}){let a=Q(c=>Ea(Q(d=>{let u=xa(d);if(!u||zt(u,t,r,n,!0))return;let{currentTime:p,volume:f,muted:h,playbackRate:v}=u;e({type:c,id:o.getId(u),currentTime:p,volume:f,muted:h,playbackRate:v})}),i.media||500)),l=[vt("play",a(Mi.Play),s),vt("pause",a(Mi.Pause),s),vt("seeked",a(Mi.Seeked),s),vt("volumechange",a(Mi.VolumeChange),s),vt("ratechange",a(Mi.RateChange),s)];return Q(()=>{l.forEach(c=>c())})}function HC({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(l,c,d){let u=new i(l,c,d);return o.set(u,{family:l,buffer:typeof c!="string",descriptors:d,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=Jf(t.fonts,"add",function(a){return function(l){return ou(Q(()=>{let c=o.get(l);c&&(e(c),o.delete(l))}),0),a.apply(this,[l])}});return n.push(()=>{r.FontFace=i}),n.push(s),Q(()=>{n.forEach(a=>a())})}function zC(e){let{doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,l=Q(()=>{let c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;let d=[],u=c.rangeCount||0;for(let p=0;p<u;p++){let f=c.getRangeAt(p),{startContainer:h,startOffset:v,endContainer:I,endOffset:m}=f;zt(h,n,o,i,!0)||zt(I,n,o,i,!0)||d.push({start:r.getId(h),startOffset:v,end:r.getId(I),endOffset:m})}s({ranges:d})});return l(),vt("selectionchange",l)}function $C({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Jf(r.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function WC(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};let n;e.recordDOM&&(n=D_(e,e.doc));let o=MC(e),i=LC(e),s=U_(e),a=OC(e,{win:r}),l=DC(e),c=FC(e),d=()=>{},u=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(d=UC(e,{win:r}),u=B_(e,e.doc),p=BC(e,{win:r}),e.collectFonts&&(f=HC(e)));let h=zC(e),v=$C(e),I=[];for(let m of e.plugins)I.push(m.observer(m.callback,r,m.options));return Q(()=>{Di.forEach(m=>m.reset()),n?.disconnect(),o(),i(),s(),a(),l(),c(),d(),u(),p(),f(),h(),v(),I.forEach(m=>m())})}function Uc(e){return typeof window[e]<"u"}function Bc(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var ba=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,o){let i=n||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(r);return a||(a=this.generateIdFn(),i.set(r,a),s.set(a,r)),a}getIds(t,r){let n=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,o))}getRemoteId(t,r,n){let o=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let i=o.get(r);return i||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getRemoteId(t,o,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},Af=class{constructor(){this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Mf=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ba(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0);let r=Ta(t);r&&this.crossOriginIframeMap.set(r,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&Ta(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);let n=Qf(t);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){switch(r.type){case V.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:V.IncrementalSnapshot,data:{source:W.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return r;case V.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case V.IncrementalSnapshot:switch(r.data.source){case W.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(n.node,o)}),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case W.Drag:case W.TouchMove:case W.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case W.ViewportResize:return!1;case W.MediaInteraction:case W.MouseInteraction:case W.Scroll:case W.CanvasMutation:case W.Input:return this.replaceIds(r.data,t,["id"]),r;case W.StyleSheetRule:case W.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case W.Font:return r;case W.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),r;case W.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),r.data.styles?.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),r}}return!1}replace(t,r,n,o){for(let i of o)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Ue.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},Lf=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Of=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Sa(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let n=D_({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(U_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),ou(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(B_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){let r=Qf(t),n=Ta(t);!r||!n||this.patchAttachShadow(n.Element,r)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(Jf(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&O_(this)&&n.addShadowRoot(this.shadowRoot,r),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},Pf=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new wf,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:y_(a),index:l}))})),n.styleIds.push(s)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Df=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.active||(this.active=!0,wC(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Me,qc;try{if(Array.from([1],e=>e*2)[0]!==2){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)}var kr=XR();function Ir(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:d="rr-mask",unmaskTextClass:u=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:v,maskInputOptions:I,slimDOMOptions:m,maskAttributeFn:S,maskInputFn:y,maskTextFn:b,maxCanvasSize:R=null,packFn:E,sampling:_={},dataURLOptions:k={},mousemoveWait:z,recordDOM:w=!0,recordCanvas:L=!1,recordCrossOriginIframes:$=!1,recordAfter:Y=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:be=!1,inlineImages:ce=!1,plugins:ye,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:oe=new Set([]),errorHandler:j,onMutation:K,getCanvasManager:pe}=e;RC(j);let fe=$?window.parent===window:!0,Dt=!1;if(!fe)try{window.parent.document&&(Dt=!1)}catch{Dt=!0}if(fe&&!t)throw new Error("emit function is required");if(!fe&&!Dt)return()=>{};z!==void 0&&_.mousemove===void 0&&(_.mousemove=z),kr.reset();let fr=v===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:I!==void 0?I:{},Or=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};bC();let Xr,ao=0,Ss=re=>{for(let mr of ye||[])mr.eventProcessor&&(re=mr.eventProcessor(re));return E&&!Dt&&(re=E(re)),re};Me=(re,mr)=>{let X=re;if(X.timestamp=Gc(),Di[0]?.isFrozen()&&X.type!==V.FullSnapshot&&!(X.type===V.IncrementalSnapshot&&X.data.source===W.Mutation)&&Di.forEach(Ye=>Ye.unfreeze()),fe)t?.(Ss(X),mr);else if(Dt){let Ye={type:"rrweb",event:Ss(X),origin:window.location.origin,isCheckout:mr};window.parent.postMessage(Ye,"*")}if(X.type===V.FullSnapshot)Xr=X,ao=0;else if(X.type===V.IncrementalSnapshot){if(X.data.source===W.Mutation&&X.data.isAttachIframe)return;ao++;let Ye=n&&ao>=n,J=r&&Xr&&X.timestamp-Xr.timestamp>r;(Ye||J)&&Dd(!0)}};let lo=re=>{Me({type:V.IncrementalSnapshot,data:{source:W.Mutation,...re}})},Dg=re=>Me({type:V.IncrementalSnapshot,data:{source:W.Scroll,...re}}),Ck=re=>Me({type:V.IncrementalSnapshot,data:{source:W.CanvasMutation,...re}}),Nk=re=>Me({type:V.IncrementalSnapshot,data:{source:W.AdoptedStyleSheet,...re}}),co=new Pf({mutationCb:lo,adoptedStyleSheetCb:Nk}),uo=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Af:new Mf({mirror:kr,mutationCb:lo,stylesheetManager:co,recordCrossOriginIframes:$,wrappedEmit:Me});for(let re of ye||[])re.getMirror&&re.getMirror({nodeMirror:kr,crossOriginIframeMirror:uo.crossOriginIframeMirror,crossOriginIframeStyleMirror:uo.crossOriginIframeStyleMirror});let Od=new Df,Pd=GC(pe,{mirror:kr,win:window,mutationCb:re=>Me({type:V.IncrementalSnapshot,data:{source:W.CanvasMutation,...re}}),recordCanvas:L,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:R,sampling:_.canvas,dataURLOptions:k,errorHandler:j}),wl=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lf:new Of({mutationCb:lo,scrollCb:Dg,bypassOptions:{onMutation:K,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:d,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:fr,dataURLOptions:k,maskAttributeFn:S,maskTextFn:b,maskInputFn:y,recordCanvas:L,inlineImages:ce,sampling:_,slimDOMOptions:Or,iframeManager:uo,stylesheetManager:co,canvasManager:Pd,keepIframeSrcFn:N,processedNodeManager:Od,ignoreCSSAttributes:oe},mirror:kr}),Dd=(re=!1)=>{if(!w)return;Me({type:V.Meta,data:{href:window.location.href,width:R_(),height:x_()}},re),co.reset(),wl.init(),Di.forEach(X=>X.lock());let mr=EC(document,{mirror:kr,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:d,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:fr,maskAttributeFn:S,maskInputFn:y,maskTextFn:b,slimDOM:Or,dataURLOptions:k,recordCanvas:L,inlineImages:ce,onSerialize:X=>{A_(X,kr)&&uo.addIframe(X),M_(X,kr)&&co.trackLinkElement(X),If(X)&&wl.addShadowRoot(X.shadowRoot,document)},onIframeLoad:(X,Ye)=>{uo.attachIframe(X,Ye);let J=Ta(X);J&&Pd.addWindow(J),wl.observeAttachShadow(X)},onStylesheetLoad:(X,Ye)=>{co.attachLinkElement(X,Ye)},onBlockedImageLoad:(X,Ye,{width:J,height:ys})=>{lo({adds:[],removes:[],texts:[],attributes:[{id:Ye.id,attributes:{style:{width:`${J}px`,height:`${ys}px`}}}]})},keepIframeSrcFn:N,ignoreCSSAttributes:oe});if(!mr)return console.warn("Failed to snapshot the document");Me({type:V.FullSnapshot,data:{node:mr,initialOffset:w_(window)}}),Di.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&co.adoptStyleSheets(document.adoptedStyleSheets,kr.getId(document))};qc=Dd;try{let re=[],mr=Ye=>Q(WC)({onMutation:K,mutationCb:lo,mousemoveCb:(J,ys)=>Me({type:V.IncrementalSnapshot,data:{source:ys,positions:J}}),mouseInteractionCb:J=>Me({type:V.IncrementalSnapshot,data:{source:W.MouseInteraction,...J}}),scrollCb:Dg,viewportResizeCb:J=>Me({type:V.IncrementalSnapshot,data:{source:W.ViewportResize,...J}}),inputCb:J=>Me({type:V.IncrementalSnapshot,data:{source:W.Input,...J}}),mediaInteractionCb:J=>Me({type:V.IncrementalSnapshot,data:{source:W.MediaInteraction,...J}}),styleSheetRuleCb:J=>Me({type:V.IncrementalSnapshot,data:{source:W.StyleSheetRule,...J}}),styleDeclarationCb:J=>Me({type:V.IncrementalSnapshot,data:{source:W.StyleDeclaration,...J}}),canvasMutationCb:Ck,fontCb:J=>Me({type:V.IncrementalSnapshot,data:{source:W.Font,...J}}),selectionCb:J=>{Me({type:V.IncrementalSnapshot,data:{source:W.Selection,...J}})},customElementCb:J=>{Me({type:V.IncrementalSnapshot,data:{source:W.CustomElement,...J}})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:d,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:fr,inlineStylesheet:h,sampling:_,recordDOM:w,recordCanvas:L,inlineImages:ce,userTriggeredOnInput:G,collectFonts:be,doc:Ye,maskAttributeFn:S,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:N,blockSelector:i,unblockSelector:s,slimDOMOptions:Or,dataURLOptions:k,mirror:kr,iframeManager:uo,stylesheetManager:co,shadowDomManager:wl,processedNodeManager:Od,canvasManager:Pd,ignoreCSSAttributes:oe,plugins:ye?.filter(J=>J.observer)?.map(J=>({observer:J.observer,options:J.options,callback:ys=>Me({type:V.Plugin,data:{plugin:J.name,payload:ys}})}))||[]},{});uo.addLoadListener(Ye=>{try{re.push(mr(Ye.contentDocument))}catch(J){console.warn(J)}});let X=()=>{Dd(),re.push(mr(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():(re.push(vt("DOMContentLoaded",()=>{Me({type:V.DomContentLoaded,data:{}}),Y==="DOMContentLoaded"&&X()})),re.push(vt("load",()=>{Me({type:V.Load,data:{}}),Y==="load"&&X()},window))),()=>{re.forEach(Ye=>Ye()),Od.destroy(),qc=void 0,CC()}}catch(re){console.warn(re)}}function jC(e){if(!qc)throw new Error("please take full snapshot after start recording");qc(e)}Ir.mirror=kr;Ir.takeFullSnapshot=jC;function GC(e,t){try{return e?e(t):new Vc}catch{return console.warn("Unable to initialize CanvasManager"),new Vc}}var a_;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(a_||(a_={}));var VC=3,YC=5;function em(e){return e>9999999999?e:e*1e3}function yf(e){return e>9999999999?e/1e3:e}function Ra(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:V.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:it(t,10,1e3)}}),t.category==="console")))}var qC="button,a";function F_(e){return e.closest(qC)||e}function H_(e){let t=z_(e);return!t||!(t instanceof Element)?t:F_(t)}function z_(e){return KC(e)?e.target:e}function KC(e){return typeof e=="object"&&!!e&&"target"in e}var Bn;function XC(e){return Bn||(Bn=[],JC()),Bn.push(e),()=>{let t=Bn?Bn.indexOf(e):-1;t>-1&&Bn.splice(t,1)}}function JC(){Ne(he,"open",function(e){return function(...t){if(Bn)try{Bn.forEach(r=>r())}catch{}return e.apply(he,t)}})}var ZC=new Set([W.Mutation,W.StyleSheetRule,W.StyleDeclaration,W.AdoptedStyleSheet,W.CanvasMutation,W.Selection,W.MediaInteraction]);function QC(e,t,r){e.handleClick(t,r)}var Uf=class{constructor(t,r,n=Ra){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=r.timeout/1e3,this._threshold=r.threshold/1e3,this._scrollTimeout=r.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=r.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let t=XC(()=>{this._lastMutation=l_()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,r){if(tN(r,this._ignoreSelector)||!rN(t))return;let n={timestamp:yf(t.timestamp),clickBreadcrumb:t,clickCount:0,node:r};this._clicks.some(o=>o.node===n.node&&Math.abs(o.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=yf(t)}registerScroll(t=Date.now()){this._lastScroll=yf(t)}registerClick(t){let r=F_(t);this._handleMultiClick(r)}_handleMultiClick(t){this._getClicks(t).forEach(r=>{r.clickCount++})}_getClicks(t){return this._clicks.filter(r=>r.node===t)}_checkClicks(){let t=[],r=l_();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=r&&t.push(n)});for(let n of t){let o=this._clicks.indexOf(n);o>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let r=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!n&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:s||1}};this._addBreadcrumbEvent(r,d);return}if(s>1){let l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(r,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Po(()=>this._checkClicks(),1e3)}},eN=["A","BUTTON","INPUT"];function tN(e,t){return!!(!eN.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function rN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function l_(){return Date.now()/1e3}function nN(e,t){try{if(!oN(t))return;let{source:r}=t.data;if(ZC.has(r)&&e.registerMutation(t.timestamp),r===W.Scroll&&e.registerScroll(t.timestamp),iN(t)){let{type:n,id:o}=t.data,i=Ir.mirror.getNode(o);i instanceof HTMLElement&&n===yt.Click&&e.registerClick(i)}}catch{}}function oN(e){return e.type===VC}function iN(e){return e.data.source===W.MouseInteraction}function $r(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var iu=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(iu||{}),sN=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function aN(e){let t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(let r in e)if(sN.has(r)){let n=r;(r==="data-testid"||r==="data-test-id")&&(n="testId"),t[n]=e[r]}return t}var lN=e=>t=>{if(!e.isEnabled())return;let r=cN(t);if(!r)return;let n=t.name==="click",o=n?t.event:void 0;n&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&QC(e.clickDetector,r,H_(t.event)),Ra(e,r)};function $_(e,t){let r=Ir.mirror.getId(e),n=r&&Ir.mirror.getNode(r),o=n&&Ir.mirror.getMeta(n),i=o&&dN(o)?o:null;return{message:t,data:i?{nodeId:r,node:{id:r,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===iu.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:aN(i.attributes)}}:{}}}function cN(e){let{target:t,message:r}=uN(e);return $r({category:`ui.${e.name}`,...$_(t,r)})}function uN(e){let t=e.name==="click",r,n=null;try{n=t?H_(e.event):z_(e.event),r=le(n,{maxStringLength:200})||"<unknown>"}catch{r="<unknown>"}return{target:n,message:r}}function dN(e){return e.type===iu.Element}function pN(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=fN(t);r&&Ra(e,r)}function fN(e){let{metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i,target:s}=e;if(!s||mN(s)||!i)return null;let a=t||n||o,l=i.length===1;if(!a&&l)return null;let c=le(s,{maxStringLength:200})||"<unknown>",d=$_(s,c);return $r({category:"ui.keyDown",message:c,data:{...d.data,metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i}})}function mN(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var hN={resource:_N,paint:yN,navigation:vN};function vf(e,t){return({metric:r})=>{t.replayPerformanceEntries.push(e(r))}}function gN(e){return e.map(SN).filter(Boolean)}function SN(e){let t=hN[e.entryType];return t?t(e):null}function Fi(e){return((ue()||he.performance.timeOrigin)+e)/1e3}function yN(e){let{duration:t,entryType:r,name:n,startTime:o}=e,i=Fi(o);return{type:r,name:n,start:i,end:i+t,data:void 0}}function vN(e){let{entryType:t,name:r,decodedBodySize:n,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:d,loadEventEnd:u,redirectCount:p,startTime:f,transferSize:h,type:v}=e;return o===0?null:{type:`${t}.${v}`,start:Fi(f),end:Fi(i),name:r,data:{size:h,decodedBodySize:n,encodedBodySize:s,duration:o,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:d,loadEventEnd:u,domComplete:i,redirectCount:p}}}function _N(e){let{entryType:t,initiatorType:r,name:n,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:Fi(i),end:Fi(o),name:n,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}}function EN(e){let t=e.entries[e.entries.length-1],r=t?.element?[t.element]:void 0;return tm(e,"largest-contentful-paint",r)}function TN(e){return e.sources!==void 0}function bN(e){let t=[],r=[];for(let n of e.entries)if(TN(n)){let o=[];for(let i of n.sources)if(i.node){r.push(i.node);let s=Ir.mirror.getId(i.node);s&&o.push(s)}t.push({value:n.value,nodeIds:o.length?o:void 0})}return tm(e,"cumulative-layout-shift",r,t)}function kN(e){let t=e.entries[e.entries.length-1],r=t?.target?[t.target]:void 0;return tm(e,"interaction-to-next-paint",r)}function tm(e,t,r,n){let o=e.value,i=e.rating,s=Fi(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:r?r.map(a=>Ir.mirror.getId(a)):void 0,attributions:n}}}function IN(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function r({entries:o}){o.forEach(t)}let n=[];return["navigation","paint","resource"].forEach(o=>{n.push(Tr(o,r))}),n.push(ln(vf(EN,e)),an(vf(bN,e)),Ao(vf(kN,e))),()=>{n.forEach(o=>o())}}var F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wN='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),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 n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(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 n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-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 n(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(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[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,n){return t.f-n.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 n(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,n){return p[n.s]-p[t.s]||t.f-n.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,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++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:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,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 n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=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(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(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 n(32768),x=c.h||new n(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 r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=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),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}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,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.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(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.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=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.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 n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function xN(){let e=new Blob([wN]);return URL.createObjectURL(e)}var c_=["log","warn","error"],Hc="[Replay] ";function _f(e,t="info"){Ht({category:"console",data:{logger:"replay"},level:t,message:`${Hc}${e}`},{level:t})}function RN(){let e=!1,t=!1,r={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return F?(c_.forEach(n=>{r[n]=(...o)=>{T[n](Hc,...o),t&&_f(o.join(""),Ei(n))}}),r.exception=(n,...o)=>{o.length&&r.error&&r.error(...o),T.error(Hc,n),e?nn(n,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&_f(n,"error")},r.infoTick=(...n)=>{T.log(Hc,...n),t&&setTimeout(()=>_f(n[0]),0)}):c_.forEach(n=>{r[n]=()=>{}}),r}var H=RN(),ka=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${qf}.`)}},Kc=class{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(t){let r=JSON.stringify(t).length;if(this._totalSize+=r,this._totalSize>qf)throw new ka;this.events.push(t)}finish(){return new Promise(t=>{let r=this.events;this.clear(),t(JSON.stringify(r))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(let{timestamp:r}of this.events)(t===null||r<t)&&(t=r);return t===null?t:em(t)}},Bf=class{constructor(t){this._onMessage=({data:r})=>{let n=r;if(typeof n.id!="number")return;let o=this._pending.get(n.id);if(!(!o||o.method!==n.method)){if(this._pending.delete(n.id),!n.success){F&&H.error("Error in compression worker: ",n.response),o.reject(new Error("Error in compression worker"));return}o.resolve(n.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,r)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():(F&&H.warn("Received worker message with unsuccessful status",n),r(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",n=>{F&&H.warn("Failed to load Replay compression worker",n),r(new Error(`Failed to load Replay compression worker: ${n instanceof ErrorEvent&&n.message?n.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(){F&&H.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,r){let n=this._getAndIncrementId();return new Promise((o,i)=>{this._pending.set(n,{method:t,resolve:o,reject:i});try{this._worker.postMessage({id:n,method:t,arg:r})}catch(s){this._pending.delete(n),i(s)}})}_getAndIncrementId(){return this._id++}},Ff=class{constructor(t){this._worker=new Bf(t),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(t){let r=em(t.timestamp);(!this._earliestTimestamp||r<this._earliestTimestamp)&&(this._earliestTimestamp=r);let n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>qf?Promise.reject(new ka):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{F&&H.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},Hf=class{constructor(t){this._fallback=new Kc,this._compression=new Ff(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){F&&H.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:r,waitForCheckout:n}=this._fallback,o=[];for(let i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=r,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){F&&H.exception(i,"Failed to add events when switching buffers.")}}};function CN({useCompression:e,workerUrl:t}){if(e&&window.Worker){let r=NN(t);if(r)return r}return F&&H.log("Using simple buffer"),new Kc}function NN(e){try{let t=e||AN();if(!t)return;F&&H.log(`Using compression worker${e?` from ${e}`:""}`);let r=new Worker(t);return new Hf(r)}catch(t){F&&H.exception(t,"Failed to create compression worker")}}function AN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?xN():""}function rm(){try{return"sessionStorage"in he&&!!he.sessionStorage}catch{return!1}}function MN(e){LN(),e.session=void 0}function LN(){if(rm())try{he.sessionStorage.removeItem(Vf)}catch{}}function W_(e){return e===void 0?!1:Math.random()<e}function su(e){if(rm())try{he.sessionStorage.setItem(Vf,JSON.stringify(e))}catch{}}function j_(e){let t=Date.now(),r=e.id||Ae(),n=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:r,started:n,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a,dirty:l}}function ON(e,t){return W_(e)?"session":t?"buffer":!1}function u_({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){let o=ON(e,t),i=j_({sampled:o,previousSessionId:n});return r&&su(i),i}function PN(){if(!rm())return null;try{let e=he.sessionStorage.getItem(Vf);if(!e)return null;let t=JSON.parse(e);return F&&H.infoTick("Loading existing session"),j_(t)}catch{return null}}function zf(e,t,r=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=r}function DN(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return zf(e.started,t,n)||zf(e.lastActivity,r,n)}function Xc(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!(!DN(e,{sessionIdleExpire:t,maxReplayDuration:r})||e.sampled==="buffer"&&e.segmentId===0)}function Ef({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){let o=n.stickySession&&PN();return o?Xc(o,{sessionIdleExpire:e,maxReplayDuration:t})?(F&&H.infoTick("Session in sessionStorage is expired, creating new one..."),u_(n,{previousSessionId:o.id})):o:(F&&H.infoTick("Creating new session"),u_(n,{previousSessionId:r}))}function UN(e){return e.type===V.Custom}function nm(e,t,r){return V_(e,t)?(G_(e,t,r),!0):!1}function BN(e,t,r){return V_(e,t)?G_(e,t,r):Promise.resolve(null)}async function G_(e,t,r){let{eventBuffer:n}=e;if(!n||n.waitForCheckout&&!r)return null;let o=e.recordingMode==="buffer";try{r&&o&&n.clear(),r&&(n.hasCheckout=!0,n.waitForCheckout=!1);let i=e.getOptions(),s=FN(t,i.beforeAddRecordingEvent);return s?await n.addEvent(s):void 0}catch(i){let s=i&&i instanceof ka,a=s?"eventBufferOverflow":"eventBufferError",l=M();if(l){let c=s?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(c,"replay")}if(s&&o)return n.clear(),n.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a})}}function V_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let r=em(t.timestamp);return r+e.timeouts.sessionIdlePause<Date.now()?!1:r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(F&&H.infoTick(`Skipping event with timestamp ${r} because it is after maxReplayDuration`),!1):!0}function FN(e,t){try{if(typeof t=="function"&&UN(e))return t(e)}catch(r){return F&&H.exception(r,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function om(e){return!e.type}function $f(e){return e.type==="transaction"}function HN(e){return e.type==="replay_event"}function d_(e){return e.type==="feedback"}function zN(e){return(t,r)=>{if(!e.isEnabled()||!om(t)&&!$f(t))return;let n=r.statusCode;if(!(!n||n<200||n>=300)){if($f(t)){$N(e,t);return}WN(e,t)}}}function $N(e,t){let r=e.getContext();t.contexts?.trace?.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}function WN(e,t){let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;let{beforeErrorSampling:n}=e.getOptions();typeof n=="function"&&!n(t)||Po(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function jN(e){return t=>{!e.isEnabled()||!om(t)||GN(e,t)}}function GN(e,t){let r=t.exception?.values?.[0]?.value;if(typeof r=="string"&&(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let n=$r({category:"replay.hydrate-error",data:{url:Ct()}});Ra(e,n)}}function VN(e){let t=M();t&&t.on("beforeAddBreadcrumb",r=>YN(e,r))}function YN(e,t){if(!e.isEnabled()||!Y_(t))return;let r=qN(t);r&&Ra(e,r)}function qN(e){return!Y_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?KN(e):$r(e)}function KN(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return $r(e);let r=!1,n=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Dc?(r=!0,`${o.slice(0,Dc)}\u2026`):o;if(typeof o=="object")try{let i=it(o,7);return JSON.stringify(i).length>Dc?(r=!0,`${JSON.stringify(i,null,2).slice(0,Dc)}\u2026`):i}catch{}return o});return $r({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Y_(e){return!!e.category}function XN(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Jc(){let e=U().getPropagationContext().dsc;e&&delete e.replay_id;let t=ie();if(t){let r=De(t);delete r.replay_id}}function p_(e){let t=U().getPropagationContext().dsc;t&&(t.replay_id=e);let r=ie();if(r){let n=De(r);n.replay_id=e}}function JN(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:V.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function ZN(e,t){return e.recordingMode!=="buffer"||t.message===Yf||!t.exception||t.type?!1:W_(e.getOptions().errorSampleRate)}function QN(e){return Object.assign((t,r)=>{if(e.session&&Xc(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Jc(),!e.isEnabled()||e.isPaused())return t;if(HN(t))return delete t.breadcrumbs,t;if(!om(t)&&!$f(t)&&!d_(t))return t;if(!e.checkAndHandleExpiredSession())return Jc(),t;if(d_(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),JN(e,t),t;if(XN(t,r)&&!e.getOptions()._experiments.captureExceptions)return F&&H.log("Ignoring error from rrweb internals",t),null;let o=ZN(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){let s=e.session;s.dirty=!0,e.getOptions().stickySession&&su(s)}return t},{id:"Replay"})}function au(e,t){return t.map(({type:r,start:n,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:V.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:r,description:i,startTimestamp:n,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function eA(e){let{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}function tA(e){return t=>{if(!e.isEnabled())return;let r=eA(t);r!==null&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(au(e,[r]),!1)))}}function rA(e,t){return F&&e.getOptions()._experiments.traceInternals?!1:Cp(t,M())}function q_(e,t){e.isEnabled()&&t!==null&&(rA(e,t.name)||e.addUpdate(()=>(au(e,[t]),!0)))}function lu(e){if(!e)return;let t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let r=Ac(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function K_(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Zc(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 X_(e,t){if(!t)return null;let{startTimestamp:r,endTimestamp:n,url:o,method:i,statusCode:s,request:a,response:l}=t;return{type:e,start:r/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s,request:a,response:l}}}function Ia(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Fn(e,t,r){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};let n={headers:e,size:t},{body:o,warnings:i}=nA(r);return n.body=o,i?.length&&(n._meta={warnings:i}),n}function Wf(e,t){return Object.entries(e).reduce((r,[n,o])=>{let i=n.toLowerCase();return t.includes(i)&&e[n]&&(r[i]=o),r},{})}function nA(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Vv,r=oA(e);if(t){let n=e.slice(0,Vv);return r?{body:n,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${n}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(r)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function oA(e){let t=e[0],r=e[e.length-1];return t==="["&&r==="]"||t==="{"&&r==="}"}function Qc(e,t){let r=iA(e);return Ke(r,t)}function iA(e,t=he.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(he.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}async function sA(e,t,r){try{let n=await lA(e,t,r),o=X_("resource.fetch",n);q_(r.replay,o)}catch(n){F&&H.exception(n,"Failed to capture fetch breadcrumb")}}function aA(e,t){let{input:r,response:n}=t,o=r?Lc(r):void 0,i=lu(o),s=n?K_(n.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function lA(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n}=t,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:d}=e.data,u=Qc(s,r.networkDetailAllowUrls)&&!Qc(s,r.networkDetailDenyUrls),p=u?cA(r,t.input,c):Ia(c),f=await uA(u,r,t.response,d);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:l,request:p,response:f}}function cA({networkCaptureBodies:e,networkRequestHeaders:t},r,n){let o=r?fA(r,t):{};if(!e)return Fn(o,n,void 0);let i=Lc(r),[s,a]=Mc(i,H),l=Fn(o,n,s);return a?Zc(l,a):l}async function uA(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,o){if(!e&&o!==void 0)return Ia(o);let i=n?J_(n.headers,r):{};if(!n||!t&&o!==void 0)return Fn(i,o,void 0);let[s,a]=await pA(n),l=dA(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?Zc(l,a):l}function dA(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:o}){try{let i=e?.length&&r===void 0?lu(e):r;return n?t?Fn(o,i,e):Fn(o,i,void 0):Ia(i)}catch(i){return F&&H.exception(i,"Failed to serialize response body"),Fn(o,r,void 0)}}async function pA(e){let t=mA(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await hA(t)]}catch(r){return r instanceof Error&&r.message.indexOf("Timeout")>-1?(F&&H.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(F&&H.exception(r,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function J_(e,t){let r={};return t.forEach(n=>{e.get(n)&&(r[n]=e.get(n))}),r}function fA(e,t){return e.length===1&&typeof e[0]!="string"?f_(e[0],t):e.length===2?f_(e[1],t):{}}function f_(e,t){if(!e)return{};let r=e.headers;return r?r instanceof Headers?J_(r,t):Array.isArray(r)?{}:Wf(r,t):{}}function mA(e){try{return e.clone()}catch(t){F&&H.exception(t,"Failed to clone response body")}}function hA(e){return new Promise((t,r)=>{let n=Po(()=>r(new Error("Timeout while trying to read response body")),500);gA(e).then(o=>t(o),o=>r(o)).finally(()=>clearTimeout(n))})}async function gA(e){return await e.text()}async function SA(e,t,r){try{let n=vA(e,t,r),o=X_("resource.xhr",n);q_(r.replay,o)}catch(n){F&&H.exception(n,"Failed to capture xhr breadcrumb")}}function yA(e,t){let{xhr:r,input:n}=t;if(!r)return;let o=lu(n),i=r.getResponseHeader("content-length")?K_(r.getResponseHeader("content-length")):TA(r.response,r.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function vA(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n,input:s,xhr:a}=t,{url:l,method:c,status_code:d=0,request_body_size:u,response_body_size:p}=e.data;if(!l)return null;if(!a||!Qc(l,r.networkDetailAllowUrls)||Qc(l,r.networkDetailDenyUrls)){let E=Ia(u),_=Ia(p);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:d,request:E,response:_}}let f=a[br],h=f?Wf(f.request_headers,r.networkRequestHeaders):{},v=Wf(pa(a),r.networkResponseHeaders),[I,m]=r.networkCaptureBodies?Mc(s,H):[void 0],[S,y]=r.networkCaptureBodies?_A(a):[void 0],b=Fn(h,u,I),R=Fn(v,p,S);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:d,request:m?Zc(b,m):b,response:y?Zc(R,y):R}}function _A(e){let t=[];try{return[e.responseText]}catch(r){t.push(r)}try{return EA(e.response,e.responseType)}catch(r){t.push(r)}return F&&H.warn("Failed to get xhr response body",...t),[void 0]}function EA(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(r){return F&&H.exception(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return F&&H.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function TA(e,t){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return lu(r)}catch{return}}function bA(e){let t=M();try{let{networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(l,c)=>kA(a,l,c))}catch{}}function kA(e,t,r){if(t.data)try{IA(t)&&xA(r)&&(yA(t,r),SA(t,r,e)),wA(t)&&RA(r)&&(aA(t,r),sA(t,r,e))}catch(n){F&&H.exception(n,"Error when enriching network breadcrumb")}}function IA(e){return e.category==="xhr"}function wA(e){return e.category==="fetch"}function xA(e){return e?.xhr}function RA(e){return e?.input!==void 0}function CA(e){let t=M();ua(lN(e)),dn(tA(e)),VN(e),bA(e);let r=QN(e);Xs(r),t&&(t.on("beforeSendEvent",jN(e)),t.on("afterSendEvent",zN(e)),t.on("createDsc",n=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(n.replay_id=o)}),t.on("spanStart",n=>{e.lastActiveSpan=n}),t.on("spanEnd",n=>{e.lastActiveSpan=n}),t.on("beforeSendFeedback",async(n,o)=>{let i=e.getSessionId();o?.includeReplay&&e.isEnabled()&&i&&n.contexts?.feedback&&(n.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),n.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function NA(e){try{return Promise.all(au(e,[AA(he.performance.memory)]))}catch{return[]}}function AA(e){let{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}function MA(e,t,r){return Ap(e,t,{...r,setTimeoutImpl:Po})}var Fc=O.navigator;function LA(){return/iPhone|iPad|iPod/i.test(Fc?.userAgent??"")||/Macintosh/i.test(Fc?.userAgent??"")&&Fc?.maxTouchPoints&&Fc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function OA(e){let t=!1;return(r,n)=>{if(!e.checkAndHandleExpiredSession()){F&&H.warn("Received replay event after session expired.");return}let o=n||!t;t=!0,PA(r),e.clickDetector&&nN(e.clickDetector,r),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!nm(e,r,o))return!0;if(!o)return!1;let i=e.session;if(UA(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){let s=e.eventBuffer.getEarliestTimestamp();s&&(F&&H.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&su(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function PA(e){let t=e.data;if(!(e.type!==V.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==W.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(let r of t.attributes){let n=Ir.mirror.getNode(r.id),o=n&&Ir.mirror.getMeta(n);if(o?.type===iu.Element)for(let[i,s]of Object.entries(r.attributes))s===null?delete o.attributes[i]:o.attributes[i]=s}}function DA(e){let t=e.getOptions();return{type:V.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function UA(e,t){!t||e.session?.segmentId!==0||nm(e,DA(e),!1)}function BA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function FA(e,t,r,n){return gt(js(e,pi(e),n,r),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function HA({recordingData:e,headers:t}){let r,n=`${JSON.stringify(t)}
|
|
31
|
+
`;if(typeof e=="string")r=`${n}${e}`;else{let i=new TextEncoder().encode(n);r=new Uint8Array(i.length+e.length),r.set(i),r.set(e,i.length)}return r}async function zA({client:e,scope:t,replayId:r,event:n}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:r,integrations:o};e.emit("preprocessEvent",n,i);let s=await Ys(e.getOptions(),n,i,t,e,ke());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:l,version:c,settings:d}=a?.sdk||{};return s.sdk={...s.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0",settings:d},s}async function $A({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:o,session:i}){let s=HA({recordingData:e,headers:{segment_id:r}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:d}=n,u=M(),p=U(),f=u?.getTransport(),h=u?.getDsn();if(!u||!f||!h||!i.sampled)return Promise.resolve({});let v={type:CR,replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:t,segment_id:r,replay_type:i.sampled},I=await zA({scope:p,client:u,replayId:t,event:v});if(!I)return u.recordDroppedEvent("event_processor","replay"),F&&H.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete I.sdkProcessingMetadata;let m=FA(I,s,h,u.getOptions().tunnel),S;try{S=await f.send(m)}catch(b){let R=new Error(Yf);try{R.cause=b}catch{}throw R}let y=ea({},S);if(Qs(y,"replay"))throw new wa(y);if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new eu(S.statusCode);return S}var eu=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},wa=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}},tu=class extends Error{constructor(){super("Session is too long, not sending replay")}};async function Z_(e,t={count:0,interval:PR}){let{recordingData:r,onError:n}=e;if(r.length)try{return await $A(e),!0}catch(o){if(o instanceof eu||o instanceof wa)throw o;if(wo("Replays",{_retryCount:t.count}),n&&n(o),t.count>=DR){let i=new Error(`${Yf} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Po(async()=>{try{await Z_(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var Q_="__THROTTLED",WA="__SKIPPED";function jA(e,t,r){let n=new Map,o=a=>{let l=a-r;n.forEach((c,d)=>{d<l&&n.delete(d)})},i=()=>[...n.values()].reduce((a,l)=>a+l,0),s=!1;return(...a)=>{let l=Math.floor(Date.now()/1e3);if(o(l),i()>=t){let d=s;return s=!0,d?WA:Q_}s=!1;let c=n.get(l)||0;return n.set(l,c+1),e(...a)}}var jf=class{constructor({options:t,recordingOptions:r}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:NR,sessionIdleExpire:AR},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=r,this._options=t,this._debouncedFlush=MA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=jA((s,a)=>BN(this,s,a),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:o}=this.getOptions(),i=n?{threshold:Math.min(UR,n),timeout:n,scrollTimeout:BR,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Uf(this,i)),F){let s=t._experiments;H.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{he.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=$r({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=$r({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{pN(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){F&&H.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){let{errorSampleRate:r,sessionSampleRate:n}=this._options,o=r<=0&&n<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){F&&H.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",F&&H.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){F&&H.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){F&&H.log("Buffering is in progress, call `flush()` to save the replay");return}F&&H.infoTick("Starting replay in session mode"),this._updateUserActivity();let t=Ef({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){F&&H.log("Buffering is in progress, call `flush()` to save the replay");return}F&&H.infoTick("Starting replay in buffer mode");let t=Ef({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{let t=this._canvas;this._stopRecording=Ir({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:OR}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:OA(this),...LA(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:r}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";let n=r??"manual";M()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{F&&H.log(`Stopping Replay triggered by ${n}`),Jc(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,MN(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),F&&H.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),F&&H.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let r=Date.now();F&&H.log("Converting buffer to session"),await this.flushImmediate();let n=this.stopRecording();!t||!n||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(r),this._updateSessionActivity(r),this._maybeSaveSession(),p_(this.session.id)),this.startRecording())}addUpdate(t){let r=t();this.recordingMode==="buffer"||!this._isEnabled||r!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&zf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${he.location.pathname}${he.location.hash}${he.location.search}`,r=`${he.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=r,this._context.initialTimestamp=Date.now(),this._context.urls.push(r)}throttledAddEvent(t,r){let n=this._throttledAddEvent(t,r);if(n===Q_){let o=$r({category:"replay.throttled"});this.addUpdate(()=>!nm(this,{type:YC,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return n}getCurrentRoute(){let t=this.lastActiveSpan||ie(),r=t&&te(t),o=(r&&B(r).data||{})[Fe];if(!(!r||!o||!["route","custom"].includes(o)))return B(r).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=CN({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&M()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&p_(this.session.id)}_initializeSessionForSampling(t){let r=this._options.errorSampleRate>0,n=Ef({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:r});this.session=n}_checkSession(){if(!this.session)return!1;let t=this.session;return Xc(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{he.document.addEventListener("visibilitychange",this._handleVisibilityChange),he.addEventListener("blur",this._handleWindowBlur),he.addEventListener("focus",this._handleWindowFocus),he.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(CA(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=IN(this)}_removeListeners(){try{he.document.removeEventListener("visibilitychange",this._handleVisibilityChange),he.removeEventListener("blur",this._handleWindowBlur),he.removeEventListener("focus",this._handleWindowFocus),he.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(Xc(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Jc();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){F&&H.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:V.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=gN(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let r=this._context.initialTimestamp/1e3;t=t.filter(n=>n.start>=r)}return Promise.all(au(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:r}=this;if(!t||!r||this._requiresManualStart||t.segmentId)return;let n=r.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){F&&H.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await NA(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new tu;let n=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await Z_({replayId:t,recordingData:i,segmentId:o,eventContext:n,session:this.session,timestamp:r,onError:s=>this.handleException(s)})}catch(r){this.handleException(r),this.stop({reason:"sendError"});let n=M();if(n){let o;r instanceof wa?o="ratelimit_backoff":r instanceof tu?o="invalid":o="send_error",n.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){F&&H.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let r=this.session.started,o=Date.now()-r;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){F&&H.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&F&&H.log("Flushing initial segment without checkout.");let l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&su(this.session)}_onMutationHandler(t){let{ignoreMutations:r}=this._options._experiments;if(r?.length&&t.some(a=>{let l=BA(a.target),c=r.join(",");return l?.matches(c)}))return!1;let n=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&n>o;if(n>i||s){let a=$r({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function ha(e,t){return[...e,...t].join(",")}function GA({mask:e,unmask:t,block:r,unblock:n,ignore:o}){let i=["base","iframe[srcdoc]:not([src])"],s=ha(e,[".sentry-mask","[data-sentry-mask]"]),a=ha(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ha(r,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:ha(n,[]),ignoreSelector:ha(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function VA({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:o,value:i}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return i;let s=r.includes(t),a=n&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?i.replace(/[\S]/g,"*"):i}var m_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',YA=["content-length","content-type","accept"],qA=Symbol.for("sentry__originalRequestBody"),h_=!1,g_=!1;function KA(){if(typeof Request>"u"||g_)return;let e=Request;try{let t=function(r,n){let o=new e(r,n);return n?.body!=null&&(o[qA]=n.body),o};t.prototype=e.prototype,O.Request=t,g_=!0}catch{}}var im=(e=>new Gf(e)),Gf=class{constructor({flushMinDelay:t=MR,flushMaxDelay:r=LR,minReplayDuration:n=FR,maxReplayDuration:o=Yv,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:l={},maskAllText:c=!0,maskAllInputs:d=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:v=[],networkDetailAllowUrls:I=[],networkDetailDenyUrls:m=[],networkCaptureBodies:S=!0,networkRequestHeaders:y=[],networkResponseHeaders:b=[],mask:R=[],maskAttributes:E=["title","placeholder","aria-label"],unmask:_=[],block:k=[],unblock:z=[],ignore:w=[],maskFn:L,beforeAddRecordingEvent:$,beforeErrorSampling:Y,onError:G,attachRawBodyFromRequest:be=!1}={}){this.name="Replay";let ce=GA({mask:R,unmask:_,block:k,unblock:z,ignore:w});if(this._recordingOptions={maskAllInputs:d,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:L,maskInputFn:L,maskAttributeFn:(ye,N,oe)=>VA({maskAttributes:E,maskAllText:c,privacyOptions:ce,key:ye,value:N,el:oe}),...ce,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ye=>{try{ye.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:r,minReplayDuration:Math.min(n,HR),maxReplayDuration:Math.min(o,Yv),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:u,maskAllInputs:d,maskAllText:c,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:v,networkDetailAllowUrls:I,networkDetailDenyUrls:m,networkCaptureBodies:S,networkRequestHeaders:S_(y),networkResponseHeaders:S_(b),beforeAddRecordingEvent:$,beforeErrorSampling:Y,onError:G,attachRawBodyFromRequest:be,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${m_}`:m_,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&er())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return h_}set _isInitialized(t){h_=t}afterAllSetup(t){!er()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&KA(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){let r=this.getReplayId(!0);r&&Mn(t,{"sentry.replay_id":r})}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let r=XA(this._initialOptions,t);this._replay=new jf({options:r,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let r=t.getIntegrationByName("ReplayCanvas");if(!r)return;this._replay._canvas=r.getOptions()}catch{}}};function XA(e,t){let r=t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...e},o=Ft(r.replaysSessionSampleRate),i=Ft(r.replaysOnErrorSampleRate);return o==null&&i==null&&qe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(n.sessionSampleRate=o),i!=null&&(n.errorSampleRate=i),n}function S_(e){return[...YA,...e.map(t=>t.toLowerCase())]}function eE(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function sm(e){try{return new URL(e,D.location.origin).href}catch{return}}function tE(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function am(e){try{return new Headers(e)}catch{return}}var lm={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function nE(e,t){let{traceFetch:r,traceXHR:n,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:s,onRequestSpanStart:a,onRequestSpanEnd:l}={...lm,...t},c=typeof o=="function"?o:f=>!0,d=f=>ZA(f,s),u={},p=e.getOptions().propagateTraceparent;r&&On(f=>{let h=Up(f,c,d,u,{propagateTraceparent:p,onRequestSpanEnd:l});if(h){let v=sm(f.fetchData.url),I=v?Qt(v).host:void 0;h.setAttributes({"http.url":v?lt(v):void 0,"server.address":I}),i&&rE(h,e),a?.(h,{headers:f.headers})}}),n&&da(f=>{let h=QA(f,c,d,u,p,l);h&&(i&&rE(h,e),a?.(h,{headers:am(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}var JA=300;function rE(e,t){let{url:r}=B(e).data;if(!r||typeof r!="string")return;let n=()=>{setTimeout(o)};if(Je(t)){let i=e.end.bind(e);e.end=s=>{let a=s??ne(),l=!1,c=()=>{l||(l=!0,setTimeout(o),i(a),clearTimeout(d))};n=c;let d=setTimeout(c,JA)}}let o=Tr("resource",({entries:i})=>{i.forEach(s=>{tE(s)&&s.name.endsWith(r)&&(e.setAttributes(la(s)),n())})})}function ZA(e,t){let r=Ct();if(r){let n,o;try{n=new URL(e,r),o=new URL(r).origin}catch{return!1}let i=n.origin===o;return t?Ke(n.toString(),t)||i&&Ke(n.pathname,t):i}else{let n=!!e.match(/^\/(?!\/)/);return t?Ke(e,t):n}}function QA(e,t,r,n,o,i){let s=e.xhr,a=s?.[br];if(!s||s.__sentry_own_request__||!a)return;let{url:l,method:c}=a,d=He()&&t(l);if(e.endTimestamp){let S=s.__sentry_xhr_span_id__;if(!S)return;let y=n[S];y&&(d&&a.status_code!==void 0&&(li(y,a.status_code),y.end(),i?.(y,{headers:am(pa(s)),error:e.error})),delete n[S]);return}let u=sm(l),p=u?Qt(u):Qt(l),f=lt(Ql(l)),h=M(),I=!!ie()||!!h&&Je(h),m=d&&I?We({name:`${c} ${f}`,attributes:{url:lt(l),type:"xhr","http.method":c,"http.url":u?lt(u):void 0,"server.address":p?.host,[Z]:"auto.http.browser",[_e]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Xe;return d&&!I&&h?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=m.spanContext().spanId,n[s.__sentry_xhr_span_id__]=m,r(l)&&eM(s,He()&&I?m:void 0,o),h&&h.emit("beforeOutgoingRequestSpan",m,e),m}function eM(e,t,r){let{"sentry-trace":n,baggage:o,traceparent:i}=_i({span:t,propagateTraceparent:r});n&&tM(e,n,o,i)}function tM(e,t,r,n){let o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),n&&!o?.traceparent&&e.setRequestHeader("traceparent",n),r){let i=o?.baggage;(!i||!eE(i))&&e.setRequestHeader("baggage",r)}}catch{}}var oE=new WeakMap,iE=new WeakMap,rM=9e4,nM=["text/event-stream","application/x-ndjson","application/stream+json"],sE=()=>({name:"FetchStreamPerformance",setup(){pc(e=>{if(e.response){let t=oE.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let r=iE.get(e.response);r&&clearTimeout(r)}}}),On(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!nM.some(l=>t.startsWith(l)))return;let r=e.fetchData?.url||"",n=e.fetchData?.method||"GET",o=Ur(r),i=r.startsWith("data:")?lt(r):o?hi(o):r,s=We({name:`${n} ${i}`,startTime:e.endTimestamp,attributes:{url:lt(r),"http.method":n,type:"fetch",[_e]:"http.client.stream",[Z]:"auto.http.browser.stream"}});oE.set(e.response,s);let a=setTimeout(()=>{s.isRecording()&&s.end()},rM);iE.set(e.response,a)}})}});function aE(){D.document?D.document.addEventListener("visibilitychange",()=>{let e=ie();if(!e)return;let t=te(e);if(D.document.hidden&&t){let r="cancelled",{op:n,status:o}=B(t);we&&T.log(`[Tracing] Transaction: ${r} -> since tab moved to the background, op: ${n}`),o||t.setStatus({code:2,message:r}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):we&&T.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var oM=3600,lE="sentry_previous_trace",iM="sentry.previous_trace";function cE(e,{linkPreviousTrace:t,consistentTraceSampling:r}){let n=t==="session-storage",o=n?lM():void 0;e.on("spanStart",s=>{if(te(s)!==s)return;let a=U().getPropagationContext();o=sM(o,s,a),n&&aM(o)});let i=!0;r&&e.on("beforeSampling",s=>{if(!o)return;let a=U(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(o.sampleRate),sampled:String(cm(o.spanContext))},sampleRand:o.sampleRand}),s.parentSampled=cm(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes={...s.spanAttributes,[si]:o.sampleRate}})}function sM(e,t,r){let n=B(t);function o(){try{let a=Number(n.data?.[Qr]??r.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}let i={spanContext:t.spanContext(),startTimestamp:n.start_timestamp,sampleRate:o(),sampleRand:r.sampleRand};if(!e)return i;let s=e.spanContext;return s.traceId===n.trace_id?e:(Date.now()/1e3-e.startTimestamp<=oM&&(we&&T.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:n.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[Ul]:"previous_trace"}}),t.setAttribute(iM,`${s.traceId}-${s.spanId}-${cm(s)?1:0}`)),i)}function aM(e){try{D.sessionStorage.setItem(lE,JSON.stringify(e))}catch(t){we&&T.warn("Could not store previous trace in sessionStorage",t)}}function lM(){try{let e=D.sessionStorage?.getItem(lE);return JSON.parse(e)}catch{return}}function cm(e){return e.traceFlags===1}var cM="BrowserTracing",uM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function mE(){let e=D.navigator;return e?.userAgent?uM.test(e.userAgent):!1}var dM={...mi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...lm},um=((e={})=>{"enableElementTiming"in e&&qe(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},r=D.document,{enableInp:n,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:l},beforeStartSpan:c,idleTimeout:d,finalTimeout:u,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:h,traceXHR:v,trackFetchStreamPerformance:I,shouldCreateSpanForRequest:m,enableHTTPTimings:S,ignoreResourceSpans:y,ignorePerformanceApiSpans:b,instrumentPageLoad:R,instrumentNavigation:E,detectRedirects:_,linkPreviousTrace:k,consistentTraceSampling:z,enableReportPageLoaded:w,onRequestSpanStart:L,onRequestSpanEnd:$}={...dM,...e},Y=mE(),G,be,ce;function ye(N,oe,j=!0){let K=oe.op==="pageload",pe=oe.name,fe=c?c(oe):oe,Dt=fe.attributes||{};if(pe!==fe.name&&(Dt[Fe]="custom",fe.attributes=Dt),!j){let Xr=It();We({...fe,startTime:Xr}).end(Xr);return}t.name=fe.name,t.source=Dt[Fe];let fr=Jl(fe,{idleTimeout:d,finalTimeout:u,childSpanTimeout:p,disableAutoFinish:K,beforeSpanEnd:Xr=>{G?.();let ao=Je(N);tf(Xr,{recordClsOnPageloadSpan:!ao&&!a,recordLcpOnPageloadSpan:!ao&&!l,ignoreResourceSpans:y,ignorePerformanceApiSpans:b,spanStreamingEnabled:ao}),pE(N,void 0);let Ss=U(),lo=Ss.getPropagationContext();Ss.setPropagationContext({...lo,traceId:fr.spanContext().traceId,sampled:Rt(fr),dsc:De(Xr)}),K&&(ce=void 0)},trimIdleSpanEndTimestamp:!w});K&&w&&(ce=fr),pE(N,fr);function Or(){r&&["interactive","complete"].includes(r.readyState)&&N.emit("idleSpanEnableAutoFinish",fr)}K&&!w&&r&&(r.addEventListener("readystatechange",()=>{Or()}),Or())}return{name:cM,setup(N){if(Y){we&&T.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}jl();let oe=Je(N);if(G=Jp({recordClsStandaloneSpans:oe?void 0:a||!1,recordLcpStandaloneSpans:oe?void 0:l||!1,client:N}),oe?(lf(N),cf(N),n&&uf()):n&&of(),i&&O.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Qp():o&&Zp(),s&&ef(),_&&r){let K=()=>{be=ne()};addEventListener("click",K,{capture:!0}),addEventListener("keydown",K,{capture:!0,passive:!0})}function j(){let K=Ca(N);K&&!B(K).timestamp&&(we&&T.log(`[Tracing] Finishing current active span with op: ${B(K).op}`),K.setAttribute(en,"cancelled"),K.end())}N.on("startNavigationSpan",(K,pe)=>{if(M()!==N)return;if(pe?.isRedirect){we&&T.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),ye(N,{op:"navigation.redirect",...K},!1);return}be=void 0,j(),ke().setPropagationContext({traceId:ht(),sampleRand:Math.random(),propagationSpanId:He()?void 0:st()});let fe=U();fe.setPropagationContext({traceId:ht(),sampleRand:Math.random(),propagationSpanId:He()?void 0:st()}),fe.setSDKProcessingMetadata({normalizedRequest:void 0}),ye(N,{op:"navigation",...K,parentSpan:null,forceTransaction:!0})}),N.on("startPageLoadSpan",(K,pe={})=>{if(M()!==N)return;j();let fe=pe.sentryTrace||uE("sentry-trace")||dE("sentry-trace"),Dt=pe.baggage||uE("baggage")||dE("baggage"),fr=tp(fe,Dt),Or=U();Or.setPropagationContext(fr),He()||(Or.getPropagationContext().propagationSpanId=st()),Or.setSDKProcessingMetadata({normalizedRequest:bi()}),ye(N,{op:"pageload",...K})}),N.on("endPageloadSpan",()=>{w&&ce&&(ce.setAttribute(en,"reportPageLoaded"),ce.end())})},afterAllSetup(N){if(Y)return;let oe=Ct();if(k!=="off"&&cE(N,{linkPreviousTrace:k,consistentTraceSampling:z}),D.location){if(R){let j=ue();hE(N,{name:D.location.pathname,startTime:j?j/1e3:void 0,attributes:{[Fe]:"url",[Z]:"auto.pageload.browser"}})}E&&dn(({to:j,from:K})=>{if(K===void 0&&oe?.indexOf(j)!==-1){oe=void 0;return}oe=void 0;let pe=Ur(j),fe=Ca(N),Dt=fe&&_&&fM(fe,be);gE(N,{name:pe?.pathname||D.location.pathname,attributes:{[Fe]:"url",[Z]:"auto.navigation.browser"}},{url:j,isRedirect:Dt})})}f&&aE(),s&&pM(N,d,u,p,t),n&&sf(),nE(N,{traceFetch:h,traceXHR:v,tracePropagationTargets:N.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:S,onRequestSpanStart:L,onRequestSpanEnd:$}),I&&N.addIntegration(sE())}}});function hE(e,t,r){e.emit("startPageLoadSpan",t,r),U().setTransactionName(t.name);let n=Ca(e);return n&&e.emit("afterStartPageLoadSpan",n),n}function gE(e,t,r){let{url:n,isRedirect:o}=r||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=U();return i.setTransactionName(t.name),n&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...bi(),url:n}}),Ca(e)}function uE(e){return D.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function dE(e){return D.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(n=>n.name===e)?.description}function pM(e,t,r,n,o){let i=D.document,s,a=()=>{let l="ui.action.click",c=Ca(e);if(c){let d=B(c).op;if(["navigation","pageload"].includes(d)){we&&T.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(en,"interactionInterrupted"),s.end(),s=void 0),!o.name){we&&T.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}s=Jl({name:o.name,op:l,attributes:{[Fe]:o.source||"url"}},{idleTimeout:t,finalTimeout:r,childSpanTimeout:n})};i&&addEventListener("click",a,{capture:!0})}var SE="_sentry_idleSpan";function Ca(e){return e[SE]}function pE(e,t){ve(e,SE,t)}var fE=1.5;function fM(e,t){let r=B(e),n=It(),o=r.start_timestamp;return!(n-o>fE||t&&n-t<=fE)}var ME=hr(fn(),1);function AE(e){return Kt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function gm(e){let t={...e};na(t,"react"),wo("react",{version:ME.version});let r=gf(t);return oi(CM),r}function CM(e){return AE(e)?"[SyntheticEvent]":fa(e)}var LE=hr(fn(),1);function NM(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function AM(e,t){let r=new WeakSet;function n(o,i){if(!r.has(o)){if(o.cause)return r.add(o),n(o.cause,i);o.cause=i}}n(e,t)}function OE(e,{componentStack:t},r){if(NM(LE.version)&&qt(e)&&t){let n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,AM(e,n)}return Zt(n=>(n.setContext("react",{componentStack:t}),nn(e,r)))}var Uo=hr(fn(),1);var PE=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Sm={componentStack:null,error:null,eventId:null},Aa=class extends Uo.Component{constructor(t){super(t),this.state=Sm,this._openFallbackReportDialog=!0;let r=M();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&Pc({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){let{componentStack:n}=r,{beforeCapture:o,onError:i,showDialog:s,dialogOptions:a}=this.props;Zt(l=>{o&&o(l,t,n);let c=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=OE(t,r,{mechanism:{handled:c,type:"auto.function.react.error_boundary"}});i&&i(t,n,d),s&&(this._lastEventId=d,this._openFallbackReportDialog&&Pc({...a,eventId:d})),this.setState({error:t,componentStack:n,eventId:d})})}componentDidMount(){let{onMount:t}=this.props;t&&t()}componentWillUnmount(){let{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:o}=this.props;o&&(this.state===Sm?o(null,null,null):o(t,r,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){let{onReset:t}=this.props,{error:r,componentStack:n,eventId:o}=this.state;t&&t(r,n,o),this.setState(Sm)}render(){let{fallback:t,children:r}=this.props,n=this.state;if(n.componentStack===null)return typeof r=="function"?r():r;let o=typeof t=="function"?Uo.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return Uo.isValidElement(o)?o:(t&&PE&&T.warn("fallback did not produce a valid ReactElement"),null)}};function ym(e,t){if(e==null||e==="")return t;let r=typeof e=="number"?e:Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}var mn=window.__vidfarmSentry,UE=mn?.dsn?.trim()||"";if(UE){let e=mn?.environment?.trim()||"development",t=e==="production"?.1:1,r=e==="production"?.1:1,n=["localhost",window.location.origin,`${window.location.origin}/api`],o=Array.from(new Set([...n,...mn?.tracePropagationTargets??[]].filter(Boolean)));gm({dsn:UE,environment:e,release:mn?.release?.trim()||void 0,integrations:[um(),im({maskAllText:!0,blockAllMedia:!0})],tracesSampleRate:ym(mn?.tracesSampleRate,t),tracePropagationTargets:o,replaysSessionSampleRate:ym(mn?.replaysSessionSampleRate,r),replaysOnErrorSampleRate:ym(mn?.replaysOnErrorSampleRate,1),enableLogs:mn?.enableLogs??!0,sendDefaultPii:mn?.sendDefaultPii??!0})}var tt=hr(fn(),1),xk=hr(ok(),1);var ik=e=>{let t,r=new Set,n=(c,d)=>{let u=typeof c=="function"?c(t):c;if(!Object.is(u,t)){let p=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),r.forEach(f=>f(t,p))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c))},l=t=e(n,o,a);return a},sk=(e=>e?ik(e):ik);var bl=hr(fn(),1);var OL=e=>e;function pr(e,t=OL){let r=bl.default.useSyncExternalStore(e.subscribe,bl.default.useCallback(()=>t(e.getState()),[e,t]),bl.default.useCallback(()=>t(e.getInitialState()),[e,t]));return bl.default.useDebugValue(r),r}var PL="[vidfarm]";function DL(e){if(e!=="debug")return!0;if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("debug")||window.localStorage?.getItem("VIDFARM_DEBUG")==="1"}catch{return!1}}function ak(e,t,r){let n={event:t,detail:r,timestamp:new Date().toISOString()};typeof window<"u"&&(window.__VIDFARM_DEBUG_LOGS__=window.__VIDFARM_DEBUG_LOGS__??[],window.__VIDFARM_DEBUG_LOGS__.push(n),window.__VIDFARM_DEBUG_LOGS__.length>1e3&&window.__VIDFARM_DEBUG_LOGS__.splice(0,window.__VIDFARM_DEBUG_LOGS__.length-1e3)),DL(e)&&console[e==="debug"?"log":e](PL,t,r??"")}function kl(e,t){ak("info",e,t)}function Qo(e,t){ak("error",e,t)}function lk(){typeof window>"u"||window.__VIDFARM_DEBUG_HOOKS__||(window.__VIDFARM_DEBUG_HOOKS__=!0,kl("boot.hooks-installed",{href:window.location.href,readyState:document.readyState,userAgent:navigator.userAgent}),window.addEventListener("error",e=>{Qo("window.error",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error:e.error instanceof Error?e.error.stack:e.error})}),window.addEventListener("unhandledrejection",e=>{Qo("window.unhandledrejection",{reason:e.reason instanceof Error?e.reason.stack:e.reason})}))}var de=hr(fn(),1);function Kr(e,t){if(!t||!e.startsWith("/"))return e;let r=new URL(e,"https://vidfarm.local");return r.pathname.startsWith("/u/")?`${r.pathname}${r.search}${r.hash}`:r.pathname==="/discover"||r.pathname.startsWith("/discover/")||r.pathname==="/help"?`${r.pathname}${r.search}${r.hash}`:`/u/${encodeURIComponent(t)}${r.pathname}${r.search}${r.hash}`}function ck(e){let t=e?.email?.trim()||"",r=e?.displayName?.trim()||"";return r||(t?t.split("@")[0].replace(/[._-]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()):"")}function Ad(e){return!!(e&&/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e))}var g=hr(Il(),1);function fk(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M10 3v4"}),(0,g.jsx)("path",{d:"M10 13v4"}),(0,g.jsx)("path",{d:"M3 10h4"}),(0,g.jsx)("path",{d:"M13 10h4"}),(0,g.jsx)("path",{d:"m5.8 5.8 2.3 2.3"}),(0,g.jsx)("path",{d:"m11.9 11.9 2.3 2.3"}),(0,g.jsx)("path",{d:"m14.2 5.8-2.3 2.3"}),(0,g.jsx)("path",{d:"m8.1 11.9-2.3 2.3"})]})}function WL(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M4.5 4.5h3v11h-3z"}),(0,g.jsx)("path",{d:"M8.7 4.5h3v11h-3z"}),(0,g.jsx)("path",{d:"m13.4 5.1 2.3-.6 2.2 10.7-2.3.6z"})]})}function jL(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("circle",{cx:"10",cy:"10",r:"7.2"}),(0,g.jsx)("path",{d:"M10 6.3v4.1l2.8 1.7"})]})}function mk(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M14.8 15.2a5.4 5.4 0 1 0-9.6 0"}),(0,g.jsx)("circle",{cx:"10",cy:"6.8",r:"3.1"})]})}function gk(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:[(0,g.jsx)("circle",{cx:"4.2",cy:"10",r:"1.45"}),(0,g.jsx)("circle",{cx:"10",cy:"10",r:"1.45"}),(0,g.jsx)("circle",{cx:"15.8",cy:"10",r:"1.45"})]})}function GL(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",children:[(0,g.jsx)("path",{d:"M3.5 5.5h13"}),(0,g.jsx)("path",{d:"M3.5 10h13"}),(0,g.jsx)("path",{d:"M3.5 14.5h13"})]})}function VL(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.8"}),(0,g.jsx)("path",{d:"m13 13 4.2 4.2"})]})}function YL(){return(0,g.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:(0,g.jsx)("path",{d:"M6 3.8h8a1 1 0 0 1 1 1v11.4l-5-2.9-5 2.9V4.8a1 1 0 0 1 1-1Z"})})}function qL(e){let t=e?.trim();if(!(!t||typeof window>"u"))try{let r="vidfarm:agency:accounts:index",n=window.localStorage.getItem(r),o=n?JSON.parse(n):[];Array.isArray(o)&&window.localStorage.setItem(r,JSON.stringify(o.filter(i=>typeof i=="string"&&i!==t))),window.localStorage.removeItem(`vidfarm:agency:account_${t}`),window.localStorage.removeItem(`vidfarm:flockposter-cache:v1_${t}`),window.localStorage.removeItem(`vidfarm:discover-bookmarks:v1_${t}`)}catch{}}function KL({account:e}){let t=(0,de.useRef)(null),r=e.isLoggedIn?[{id:"discover",href:Kr("/discover",e.userId),label:"Discover",icon:(0,g.jsx)(fk,{})},{id:"library",href:Kr("/library",e.userId),label:"Library",icon:(0,g.jsx)(WL,{})},{id:"calendar",href:Kr("/calendar",e.userId),label:"Calendar",icon:(0,g.jsx)(jL,{})},{id:"settings",href:Kr("/settings",e.userId),label:"Settings",icon:(0,g.jsx)(mk,{})}]:[{id:"discover",href:"/discover",label:"Discover",icon:(0,g.jsx)(fk,{})},{id:"login",href:"/login",label:"Login",icon:(0,g.jsx)(mk,{})}],n=e.isLoggedIn?[{id:"chat",href:Kr("/chat",e.userId),label:"Chat"},{id:"job-runs",href:Kr("/job-runs",e.userId),label:"Run History"},{id:"inpaint",href:Kr("/inpaint",e.userId),label:"Inpaint"},{id:"help",href:"/help",label:"Help"},{id:"logout",action:"logout",label:"Log Out"}]:[{id:"help",href:"/help",label:"Help"},{id:"login",href:"/login",label:"Login"}],o=r.filter(i=>!n.some(s=>s.id===i.id));return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("nav",{className:"primary-nav","aria-label":"Primary",children:[r.map(i=>(0,g.jsxs)("a",{className:`nav-link${i.id==="discover"?" is-active":""}`,href:i.href,children:[(0,g.jsx)("span",{className:"nav-icon","aria-hidden":"true",children:i.icon}),(0,g.jsx)("span",{children:i.label})]},i.id)),n.map(i=>"href"in i?(0,g.jsx)("a",{className:"nav-link nav-mobile-extra",href:i.href,children:(0,g.jsx)("span",{children:i.label})},`mobile-${i.id}`):(0,g.jsx)("button",{type:"button",className:"nav-link nav-mobile-extra nav-action-link",onClick:()=>{t.current?.open||t.current?.showModal()},children:(0,g.jsx)("span",{children:i.label})},`mobile-${i.id}`)),n.length?(0,g.jsxs)("details",{className:"nav-menu",children:[(0,g.jsxs)("summary",{className:"nav-link nav-menu-trigger","aria-label":"Open navigation menu",children:[(0,g.jsx)("span",{className:"nav-icon nav-menu-desktop-icon","aria-hidden":"true",children:(0,g.jsx)(gk,{})}),(0,g.jsx)("span",{className:"nav-icon nav-menu-mobile-icon","aria-hidden":"true",children:(0,g.jsx)(GL,{})}),(0,g.jsx)("span",{className:"nav-menu-label",children:"Menu"})]}),(0,g.jsxs)("div",{className:"nav-menu-panel",role:"menu",children:[o.map(i=>(0,g.jsx)("a",{className:`nav-menu-item nav-menu-mobile-only${i.id==="discover"?" is-active":""}`,role:"menuitem",href:i.href,children:i.label},`menu-mobile-${i.id}`)),n.map(i=>"href"in i?(0,g.jsx)("a",{className:"nav-menu-item",role:"menuitem",href:i.href,children:i.label},i.id):(0,g.jsx)("button",{type:"button",className:"nav-menu-item nav-menu-button",role:"menuitem",onClick:()=>{t.current?.open||t.current?.showModal()},children:i.label},i.id))]})]}):null]}),e.isLoggedIn?(0,g.jsxs)("dialog",{className:"logout-dialog",ref:t,onClick:i=>{let s=t.current;if(!s)return;let a=s.getBoundingClientRect();(i.clientX<a.left||i.clientX>a.right||i.clientY<a.top||i.clientY>a.bottom)&&s.close()},children:[(0,g.jsxs)("div",{className:"logout-dialog-head",children:[(0,g.jsx)("div",{className:"label logout-dialog-kicker",children:"Log out"}),(0,g.jsx)("h3",{children:"Log out of this browser?"}),(0,g.jsx)("p",{children:"This clears the stored developer key, workspace access, and local session state for the current browser."})]}),(0,g.jsxs)("div",{className:"toolbar logout-dialog-actions",children:[(0,g.jsx)("button",{type:"button",className:"secondary",onClick:()=>t.current?.close(),children:"Cancel"}),(0,g.jsxs)("form",{method:"post",action:"/logout",onSubmit:()=>qL(e.userId),children:[(0,g.jsx)("input",{type:"hidden",name:"account",value:e.userId??""}),(0,g.jsx)("button",{type:"submit",className:"danger",children:"Yes, log out"})]})]})]}):null]})}function XL({account:e}){let t=e.email?.trim()||"",r=ck({displayName:e.displayName,email:e.email}),n=Kr("/discover",e.userId);return(0,g.jsxs)("a",{className:"brand-lockup",href:n,children:[(0,g.jsx)("img",{className:"brand-logo-image",src:"/assets/logo-vidfarm.png",alt:"VidFarm AI"}),(0,g.jsxs)("div",{className:"brand-copy",children:[(0,g.jsxs)("div",{className:"brand-title brand-title-static",children:["VidFarm",(0,g.jsx)("span",{className:"brand-title-mobile-hidden",children:" AI"})]}),t?(0,g.jsxs)("div",{className:"brand-account-meta",children:[r," ",(0,g.jsxs)("span",{children:["(",t,")"]})]}):null]})]})}function Sk(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:[(0,g.jsx)("path",{d:"m5 5 10 10"}),(0,g.jsx)("path",{d:"m15 5-10 10"})]})}function JL(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M10 3v9"}),(0,g.jsx)("path",{d:"m6.5 8.5 3.5 3.5 3.5-3.5"}),(0,g.jsx)("path",{d:"M4 16h12"})]})}function ZL(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M8.4 11.6a3.2 3.2 0 0 0 4.5 0l2.2-2.2a3.2 3.2 0 0 0-4.5-4.5L9.4 6.1"}),(0,g.jsx)("path",{d:"M11.6 8.4a3.2 3.2 0 0 0-4.5 0L4.9 10.6a3.2 3.2 0 0 0 4.5 4.5l1.2-1.2"})]})}function QL(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,g.jsx)("path",{d:"M12.4 7.6a3.4 3.4 0 0 1 0 4.8"}),(0,g.jsx)("path",{d:"M14.6 5.4a6.5 6.5 0 0 1 0 9.2"})]})}function eO(){return(0,g.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,g.jsx)("path",{d:"m12.6 8 4 4"}),(0,g.jsx)("path",{d:"m16.6 8-4 4"})]})}var yk="vidfarm:discover-muted",gs=typeof window<"u"&&window.localStorage?.getItem(yk)==="1",Lg=new Set;function vk(e){gs=e;try{window.localStorage.setItem(yk,e?"1":"0")}catch{}for(let t of Lg)t()}function _k(e){return Lg.add(e),()=>{Lg.delete(e)}}function Ek(){return(0,de.useSyncExternalStore)(_k,()=>gs,()=>!1)}var Og=!1,Pg=new Set;function hk(e){Og=e;for(let t of Pg)t()}function tO({src:e,controls:t=!0}){let r=(0,de.useRef)(null);return(0,de.useEffect)(()=>{let n=r.current;if(!n)return;let o=()=>{!n.dataset.src||n.getAttribute("src")||(n.setAttribute("src",n.dataset.src),n.load())},i=!1,s=()=>{Og||(o(),n.muted=gs,n.play().then(()=>{delete n.dataset.mutedFallback}).catch(()=>{n.muted||(n.dataset.mutedFallback="1",n.muted=!0,n.play().catch(()=>{}))}))},a=()=>{!gs&&n.dataset.mutedFallback==="1"&&!n.paused&&(n.muted=!1,delete n.dataset.mutedFallback)};window.addEventListener("pointerdown",a),window.addEventListener("keydown",a);let c=_k(()=>{gs?(delete n.dataset.mutedFallback,n.muted=!0):n.paused||(n.muted=!1)}),d=()=>{Og?n.paused||n.pause():i&&s()};Pg.add(d);let u=()=>{window.removeEventListener("pointerdown",a),window.removeEventListener("keydown",a),c(),Pg.delete(d)};if(!("IntersectionObserver"in window))return i=!0,s(),u;let p=new IntersectionObserver(h=>{for(let v of h)v.isIntersecting&&(o(),p.unobserve(v.target))},{rootMargin:"240px 0px"}),f=new IntersectionObserver(h=>{for(let v of h)i=v.isIntersecting,v.isIntersecting?s():n.paused||n.pause()},{threshold:.5});return p.observe(n),f.observe(n),()=>{p.disconnect(),f.disconnect(),u()}},[]),(0,g.jsx)("video",{ref:r,className:"preview","data-src":e,preload:"metadata",playsInline:!0,loop:!0,controls:t})}function rO(){let e=Ek();return(0,g.jsx)("button",{type:"button",className:"discover-mute-toggle","aria-pressed":e,"aria-label":e?"Unmute video previews":"Mute video previews",title:e?"Unmute previews":"Mute previews",onClick:()=>vk(!e),children:e?(0,g.jsx)(eO,{}):(0,g.jsx)(QL,{})})}function nO({text:e,label:t}){let[r,n]=(0,de.useState)(""),o=async()=>{try{await navigator.clipboard.writeText(e),n("done")}catch{n("error")}window.setTimeout(()=>n(""),1600)};return(0,g.jsxs)("button",{className:"pill-tag copy-inline",type:"button","data-state":r,"aria-label":r==="done"?`${t} copied`:t,onClick:()=>{o()},children:[(0,g.jsx)("span",{className:"copy-inline-label",children:t}),(0,g.jsx)("span",{className:"copy-inline-feedback","aria-hidden":"true",children:r==="error"?"Couldn\u2019t copy":"Copied"})]})}function Tk(e,t){return e.startsWith("hyperframes:")||e.startsWith("template_")?`/editor/${encodeURIComponent(e.replace(/^hyperframes:/,""))}${t?`?account=${encodeURIComponent(t)}`:""}`:Kr(`/templates/${encodeURIComponent(e)}/editor/docs`,t)}function oO({templateId:e,accountUserId:t}){return(0,g.jsx)("a",{className:"cta-button",href:Tk(e,t),children:"Editor"})}function iO(e){let{template:t}=e,[r,n]=(0,de.useState)(!1),[o,i]=(0,de.useState)(!1),[s,a]=(0,de.useState)(!1),l=(0,de.useRef)(null),c=t.status==="processing"||t.status==="failed",d=t.visibility==="private"&&!!e.onDeleteTemplate;(0,de.useEffect)(()=>{if(!r)return;let f=v=>{l.current&&!l.current.contains(v.target)&&n(!1)},h=v=>{v.key==="Escape"&&n(!1)};return window.addEventListener("mousedown",f),window.addEventListener("keydown",h),()=>{window.removeEventListener("mousedown",f),window.removeEventListener("keydown",h)}},[r]);let u=async()=>{try{await navigator.clipboard.writeText(t.templateId),i(!0),window.setTimeout(()=>{i(!1),n(!1)},900)}catch{n(!1)}},p=async()=>{if(!window.confirm(`Delete "${t.title}"? This removes it from your Discover feed permanently.`))return;a(!0);let f=await(e.onDeleteTemplate?.(t.templateId)??Promise.resolve({ok:!1,error:"Delete unavailable."}));a(!1),f.ok?n(!1):window.alert(f.error||"Unable to delete this template.")};return(0,g.jsxs)("div",{className:"discover-card-menu",ref:l,children:[(0,g.jsx)("button",{type:"button",className:"discover-card-menu-trigger","aria-haspopup":"menu","aria-expanded":r,"aria-label":`More actions for ${t.title}`,title:"More actions",onClick:()=>n(f=>!f),children:(0,g.jsx)(gk,{})}),r?(0,g.jsxs)("div",{className:"discover-card-menu-panel",role:"menu",children:[(0,g.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{u()},children:o?"Copied!":"Copy ID"}),c?(0,g.jsx)("span",{className:"discover-card-menu-item is-disabled",role:"menuitem","aria-disabled":"true",children:"Open in Editor"}):(0,g.jsx)("a",{className:"discover-card-menu-item",role:"menuitem",href:Tk(t.templateId,e.accountUserId),children:"Open in Editor"}),(0,g.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{e.onToggleBookmark?.(t.templateId),n(!1)},children:e.isBookmarked?"Remove Bookmark":"Bookmark"}),d?(0,g.jsx)("button",{type:"button",className:"discover-card-menu-item is-danger",role:"menuitem",disabled:s,onClick:()=>{p()},children:s?"Deleting\u2026":"Delete"}):null]}):null]})}function sO(e){let t=`${e.isBookmarked?"Remove bookmark for ":"Bookmark "}${e.title}`;return(0,g.jsx)("button",{className:"bookmark-button",type:"button","data-active":e.isBookmarked?"true":"false","aria-label":t,"aria-pressed":e.isBookmarked,title:t,onClick:()=>e.onToggleBookmark?.(e.templateId),children:(0,g.jsx)(YL,{})})}function aO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function lO(e){let t=typeof e.layerCount=="number"?e.layerCount:null,r=typeof e.sourceAssetCount=="number"?e.sourceAssetCount:null,n=typeof e.durationSeconds=="number"&&Number.isFinite(e.durationSeconds)?e.durationSeconds>=60?`${Math.floor(e.durationSeconds/60)}:${String(Math.round(e.durationSeconds%60)).padStart(2,"0")}`:`${e.durationSeconds.toFixed(e.durationSeconds>=10?1:2)}s`:null,o=[t===null?null:`${t} layer${t===1?"":"s"}`,r===null?null:`${r} source${r===1?"":"s"}`,n].filter(Boolean);return o.length?o.join(" / "):e.previewUrl?"Draft composition with editable layers.":"Layer recipe with editable timeline."}function bk(e){let{template:t}=e,r=t.status==="processing"||t.status==="failed",n=t.previewUrl?Ad(t.previewUrl)?(0,g.jsx)(tO,{src:t.previewUrl,controls:!1}):(0,g.jsx)("img",{className:"preview",src:t.previewUrl,alt:`${t.title} preview`,loading:"lazy",decoding:"async"}):(0,g.jsx)("div",{className:"preview preview-empty",children:t.status==="processing"?"Downloading\u2026":"No preview"});return(0,g.jsxs)("li",{className:"discover-card row","data-template-id":t.templateId,children:[t.previewUrl?(0,g.jsxs)("button",{className:"discover-card-media discover-card-media-button",type:"button","aria-label":`Open ${t.title} preview`,onClick:()=>e.onOpenPreview?.(t),children:[n,(0,g.jsx)("span",{className:"discover-card-media-affordance","aria-hidden":"true",children:"View"})]}):(0,g.jsx)("div",{className:"discover-card-media",children:n}),(0,g.jsxs)("div",{className:"discover-card-copy",children:[(0,g.jsxs)("div",{className:"discover-card-head",children:[(0,g.jsxs)("div",{className:"discover-card-title-wrap",children:[(0,g.jsx)("h2",{children:t.title}),(0,g.jsx)("p",{className:"discover-card-meta",children:lO(t)})]}),(0,g.jsxs)("div",{className:"discover-card-actions",children:[(0,g.jsx)(sO,{templateId:t.templateId,title:t.title,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark}),r?(0,g.jsx)("span",{className:"cta-button discover-card-cta-disabled","aria-disabled":"true",children:t.status==="failed"?"Failed":"Preparing\u2026"}):(0,g.jsx)(oO,{templateId:t.templateId,accountUserId:e.accountUserId}),(0,g.jsx)(iO,{template:t,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.accountUserId})]})]}),(0,g.jsx)("div",{className:"discover-card-body",children:(0,g.jsx)("p",{children:String(t.viralDna||"").trim()||"No layer strategy provided for this composition yet."})}),(0,g.jsxs)("div",{className:"discover-card-tags",children:[t.origin==="raw"?(0,g.jsx)("div",{className:"pill-tag origin-pill",title:"Your own project \u2014 created from a prompt or your raw clips, not an imported inspiration",children:"Your project"}):null,t.visibility==="private"?(0,g.jsx)("div",{className:"pill-tag private-pill",title:"Only visible to your account",children:"Only you"}):null,t.status==="processing"?(0,g.jsx)("div",{className:"pill-tag processing-pill",children:"Processing"}):t.status==="failed"?(0,g.jsx)("div",{className:"pill-tag failed-pill",children:"Download failed"}):null,(0,g.jsx)("div",{className:"pill-tag difficulty-pill","data-difficulty":t.difficulty,children:aO(t.difficulty)}),(0,g.jsx)("div",{className:"pill-tag",children:t.sourceType||(Ad(t.previewUrl)?"Video source":"Image sequence")}),(0,g.jsx)(nO,{text:t.templateId,label:t.templateId})]})]})]})}function cO(e){let{onClose:t,template:r}=e,n=r.previewUrl||"",o=Ad(n),[i,s]=(0,de.useState)(""),a=Ek();(0,de.useEffect)(()=>(hk(!0),()=>hk(!1)),[]);let l=async()=>{try{await navigator.clipboard.writeText(n),s("done")}catch{s("error")}window.setTimeout(()=>s(""),1600)};return(0,de.useEffect)(()=>{let c=u=>{u.key==="Escape"&&t()},d=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",c),()=>{document.body.style.overflow=d,window.removeEventListener("keydown",c)}},[t]),(0,g.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,g.jsxs)("div",{className:"discover-media-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-media-modal-title",onClick:c=>c.stopPropagation(),children:[(0,g.jsxs)("div",{className:"discover-media-modal-head",children:[(0,g.jsx)("h2",{id:"discover-media-modal-title",children:r.title}),(0,g.jsxs)("div",{className:"discover-media-modal-actions",children:[(0,g.jsx)("a",{className:"discover-media-modal-action",href:n,download:!0,"aria-label":`Download ${r.title} preview`,title:"Download",onClick:c=>c.stopPropagation(),children:(0,g.jsx)(JL,{})}),(0,g.jsx)("button",{className:"discover-media-modal-action",type:"button","data-state":i,"aria-label":i==="done"?"Media URL copied":i==="error"?"Unable to copy media URL":`Copy ${r.title} preview URL`,title:i==="done"?"Copied":i==="error"?"Copy failed":"Copy link",onClick:()=>{l()},children:(0,g.jsx)(ZL,{})}),(0,g.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close preview",title:"Close",onClick:t,children:(0,g.jsx)(Sk,{})})]})]}),(0,g.jsx)("div",{className:"discover-media-modal-stage",children:o?(0,g.jsx)("video",{src:n,controls:!0,autoPlay:!0,playsInline:!0,preload:"metadata",muted:a,onVolumeChange:c=>{let d=c.currentTarget.muted;d!==gs&&vk(d)}}):(0,g.jsx)("img",{src:n,alt:`${r.title} preview`})})]})})}function uO(e){let{onClose:t}=e,[r,n]=(0,de.useState)(""),[o,i]=(0,de.useState)(null),[s,a]=(0,de.useState)(""),[l,c]=(0,de.useState)(""),[d,u]=(0,de.useState)(""),[p,f]=(0,de.useState)(!1),[h,v]=(0,de.useState)(null);(0,de.useEffect)(()=>{let m=y=>{y.key==="Escape"&&t()},S=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",m),()=>{document.body.style.overflow=S,window.removeEventListener("keydown",m)}},[t]);let I=async()=>{let m=r.trim();if(!m&&!o){v("Paste a TikTok, YouTube, Twitter/X, or Instagram video URL \u2014 or upload a video file.");return}if(o&&o.size>200*1024*1024){v("Video uploads can be at most 200 MB.");return}f(!0),v(null);let S=await(e.onAddTemplate?.({sourceUrl:o?"":m,file:o,title:s.trim(),tagline:l.trim(),notes:d.trim()})??Promise.resolve({ok:!1,error:"Adding templates is unavailable right now."}));f(!1),S.ok?t():v(S.error||"Unable to add that video. Try again.")};return(0,g.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,g.jsxs)("div",{className:"discover-media-modal discover-add-template-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-add-template-title",onClick:m=>m.stopPropagation(),children:[(0,g.jsxs)("div",{className:"discover-media-modal-head",children:[(0,g.jsx)("h2",{id:"discover-add-template-title",children:"Add Template"}),(0,g.jsx)("div",{className:"discover-media-modal-actions",children:(0,g.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close",title:"Close",onClick:t,children:(0,g.jsx)(Sk,{})})})]}),(0,g.jsxs)("form",{className:"discover-add-template-form",onSubmit:m=>{m.preventDefault(),I()},children:[(0,g.jsx)("p",{className:"discover-add-template-hint",children:"Paste a link to a TikTok, YouTube, Twitter/X, or Instagram video \u2014 or upload a video file from your computer. We add it to your Discover feed, visible only to your account."}),(0,g.jsxs)("div",{className:"discover-add-template-field",children:[(0,g.jsx)("label",{className:"label",htmlFor:"add-template-url",children:"Video URL"}),(0,g.jsx)("input",{id:"add-template-url",type:"url",required:!o,disabled:!!o,placeholder:"https://www.tiktok.com/@creator/video/\u2026",autoComplete:"off",value:r,onChange:m=>n(m.target.value)})]}),(0,g.jsxs)("div",{className:"discover-add-template-field",children:[(0,g.jsxs)("label",{className:"label",htmlFor:"add-template-file",children:["Or upload a video ",(0,g.jsx)("span",{className:"discover-add-template-optional",children:"MP4 / MOV / WebM, up to 200 MB"})]}),o?(0,g.jsxs)("div",{className:"discover-add-template-file-chip",children:[(0,g.jsx)("span",{className:"discover-add-template-file-name",children:o.name}),(0,g.jsxs)("span",{className:"discover-add-template-file-size",children:[(o.size/(1024*1024)).toFixed(1)," MB"]}),(0,g.jsx)("button",{type:"button",className:"discover-add-template-file-clear","aria-label":"Remove selected file",onClick:()=>i(null),children:"\u2715"})]}):(0,g.jsx)("input",{id:"add-template-file",type:"file",accept:"video/mp4,video/quicktime,video/webm,.mp4,.m4v,.mov,.webm",onChange:m=>{let S=m.target.files?.[0]??null;S&&(i(S),n(""),v(null))}})]}),o?(0,g.jsxs)("div",{className:"discover-add-template-field",children:[(0,g.jsxs)("label",{className:"label",htmlFor:"add-template-title",children:["Title ",(0,g.jsx)("span",{className:"discover-add-template-optional",children:"optional \u2014 defaults to the template id"})]}),(0,g.jsx)("input",{id:"add-template-title",type:"text",placeholder:"Name this template\u2026",autoComplete:"off",maxLength:140,value:s,onChange:m=>a(m.target.value)})]}):null,(0,g.jsxs)("div",{className:"discover-add-template-field",children:[(0,g.jsxs)("label",{className:"label",htmlFor:"add-template-tagline",children:["Tagline ",(0,g.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,g.jsx)("input",{id:"add-template-tagline",type:"text",placeholder:"What makes this video work?",autoComplete:"off",maxLength:140,value:l,onChange:m=>c(m.target.value)})]}),(0,g.jsxs)("div",{className:"discover-add-template-field",children:[(0,g.jsxs)("label",{className:"label",htmlFor:"add-template-notes",children:["Notes ",(0,g.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,g.jsx)("textarea",{id:"add-template-notes",rows:4,placeholder:"Ideas for how you want to remix this\u2026",maxLength:2e3,value:d,onChange:m=>u(m.target.value)})]}),h?(0,g.jsx)("p",{className:"discover-add-template-error",role:"alert",children:h}):null,(0,g.jsxs)("div",{className:"toolbar discover-add-template-actions",children:[(0,g.jsx)("button",{type:"button",className:"secondary",onClick:t,disabled:p,children:"Cancel"}),(0,g.jsx)("button",{type:"submit",className:"cta-button discover-add-template-submit",disabled:p,children:p?o?"Uploading\u2026":"Adding\u2026":"Add Template"})]})]})]})})}function dO(e){if(e.loading)return(0,g.jsx)("ul",{className:"discover-list",children:(0,g.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading popular formats\u2026"})});if(e.error)return(0,g.jsx)("ul",{className:"discover-list",children:(0,g.jsx)("li",{className:"empty-state discover-loading-card",children:e.error})});let t=e.searchQuery.trim().toLowerCase(),r=t?e.templates.filter(o=>`${o.title} ${o.templateId} ${o.popularGroup??""}`.toLowerCase().includes(t)):e.templates;if(r.length===0)return(0,g.jsx)("ul",{className:"discover-list",children:(0,g.jsx)("li",{className:"empty-state discover-loading-card",children:t?"No popular formats match your search.":"No popular formats yet."})});let n=[];for(let o of r){let i=(o.popularGroup||"Popular").trim()||"Popular",s=n.find(a=>a.label===i);s||(s={label:i,items:[]},n.push(s)),s.items.push(o)}return(0,g.jsx)("div",{className:"discover-popular",children:n.map(o=>(0,g.jsxs)("section",{className:"discover-popular-group",children:[(0,g.jsx)("h3",{className:"discover-popular-group-label",children:o.label}),(0,g.jsx)("ul",{className:"discover-list",children:o.items.map(i=>(0,g.jsx)(bk,{template:i,isBookmarked:e.bookmarks.has(i.templateId),onToggleBookmark:e.onToggleBookmark,onOpenPreview:e.onOpenPreview,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.accountUserId},i.templateId))})]},o.label))})}function kk(e){let t=!e.loading&&!e.error&&e.templates.length>0&&e.visibleTemplates.length===0,[r,n]=(0,de.useState)(null),[o,i]=(0,de.useState)(!1),s=e.view==="popular",a=u=>e.onViewChange?.(u),l=s?"Search popular formats":e.loading||e.error?"Search Templates":`Search ${e.visibleTemplates.length} Template${e.visibleTemplates.length===1?"":"s"}`,c=!0,d=e.account.isLoggedIn;return(0,g.jsxs)("section",{className:`frame discover-frame${c?" has-chat-rail":""}`,children:[(0,g.jsxs)("header",{className:"topbar",children:[(0,g.jsx)(XL,{account:e.account}),(0,g.jsx)("div",{className:"topbar-actions",children:(0,g.jsx)(KL,{account:e.account})})]}),(0,g.jsx)("div",{className:"frame-body",children:(0,g.jsxs)("section",{className:"discover-shell",children:[(0,g.jsxs)("div",{className:"discover-filter-bar",role:"toolbar","aria-label":"Composition filters",children:[(0,g.jsxs)("div",{className:"view-toggle discover-view-toggle",role:"tablist","aria-label":"Discover view",children:[(0,g.jsx)("button",{type:"button",className:`view-toggle-tab${s?"":" is-active"}`,role:"tab","aria-selected":!s,onClick:()=>a("feed"),children:"Feed"}),(0,g.jsx)("button",{type:"button",className:`view-toggle-tab${s?" is-active":""}`,role:"tab","aria-selected":s,onClick:()=>a("popular"),children:"Popular"})]}),(0,g.jsx)(rO,{}),(0,g.jsxs)("div",{className:"discover-filter-search search-field",children:[(0,g.jsx)("span",{className:"search-icon","aria-hidden":"true",children:(0,g.jsx)(VL,{})}),(0,g.jsx)("input",{id:"search",type:"search",placeholder:l,autoComplete:"off",value:e.searchQuery,onChange:u=>e.onSearchQueryChange?.(u.target.value)})]}),s?null:(0,g.jsxs)("label",{className:"discover-filter-toggle",htmlFor:"bookmarks-only","data-active":e.bookmarksOnly?"true":"false",children:[(0,g.jsx)("span",{className:"discover-filter-toggle-label",children:"Saved"}),(0,g.jsxs)("span",{className:"switch-shell","data-active":e.bookmarksOnly?"true":"false",children:[(0,g.jsx)("input",{id:"bookmarks-only",className:"switch-input",type:"checkbox",checked:e.bookmarksOnly,onChange:u=>e.onBookmarksOnlyChange?.(u.target.checked)}),(0,g.jsx)("span",{className:"switch-knob"})]})]}),e.account.isLoggedIn?(0,g.jsx)("button",{type:"button",className:"discover-add-template-button",onClick:()=>i(!0),children:"Add Template"}):(0,g.jsx)("a",{className:"discover-add-template-button",href:"/login",children:"Add Template"})]}),(0,g.jsx)("section",{className:"discover-results",children:(0,g.jsx)("div",{className:"discover-results-scroll",children:(0,g.jsx)("div",{className:"discover-list-scroll",children:s?(0,g.jsx)(dO,{templates:e.popularTemplates,loading:e.popularLoading,error:e.popularError,searchQuery:e.searchQuery,bookmarks:e.bookmarks,onToggleBookmark:e.onToggleBookmark,onOpenPreview:n,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.account.userId}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("ul",{className:"discover-list",id:"template-list",children:e.loading?(0,g.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading compositions..."}):e.error?(0,g.jsx)("li",{className:"empty-state discover-loading-card",children:"Unable to load compositions."}):e.templates.length===0?(0,g.jsx)("li",{className:"empty-state discover-loading-card",children:"No compositions available."}):e.visibleTemplates.map(u=>(0,g.jsx)(bk,{template:u,isBookmarked:e.bookmarks.has(u.templateId),onToggleBookmark:e.onToggleBookmark,onOpenPreview:n,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.account.userId},u.templateId))}),(0,g.jsx)("div",{className:"empty-state empty",id:"empty-state","data-visible":t?"true":"false",children:"No compositions match the current search and filter combination."})]})})})})]})}),c?(0,g.jsx)("aside",{className:"editor-right-rail","aria-label":"Discover copilot",children:d?(0,g.jsx)("div",{className:"editor-chat-panel","data-template-editor-chat-root":!0}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("a",{className:"vf-editor-chat-mobile-fab",href:"/login","aria-label":"Log in to chat with Vidfarm",children:(0,g.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,g.jsx)("path",{d:"M20 11.5a7.5 7.5 0 0 1-9.8 7.1L4 20l1.5-5.3A7.5 7.5 0 1 1 20 11.5Z"})})}),(0,g.jsxs)("div",{className:"editor-chat-panel editor-chat-panel--logged-out",style:{display:"flex",flexDirection:"column",height:"100%",padding:"20px",gap:"16px",boxSizing:"border-box"},children:[(0,g.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[(0,g.jsx)("span",{className:"label",style:{fontSize:"0.68rem",fontWeight:800,letterSpacing:"0.14em",textTransform:"uppercase",color:"#a9884a"},children:"Vidfarm copilot"}),(0,g.jsx)("h3",{style:{margin:0,fontSize:"1.05rem",color:"#2f3748"},children:"Chat with Vidfarm"}),(0,g.jsx)("p",{style:{margin:0,fontSize:"0.9rem",color:"#74829c"},children:"Ask for hooks, angles, and remixes tailored to compositions in your library."})]}),(0,g.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginTop:"14px"},"aria-hidden":"true",children:["Give me 10 hooks for this coffee-shop template","Which awareness stage fits my product?","Remix this into an ad for my brand"].map(u=>(0,g.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 14px",borderRadius:"14px",border:"1px dashed rgba(191, 164, 109, 0.45)",background:"rgba(250, 245, 234, 0.65)",color:"#74829c",fontSize:"0.85rem",lineHeight:1.35},children:[(0,g.jsx)("span",{style:{color:"#bfa46d",fontWeight:700},children:"\u201C"}),u]},u))}),(0,g.jsxs)("div",{style:{marginTop:"auto",display:"flex",flexDirection:"column",gap:"10px"},children:[(0,g.jsx)("textarea",{rows:3,placeholder:"Log in to chat with Vidfarm\u2026",disabled:!0,"aria-label":"Chat with Vidfarm (log in to enable)",style:{width:"100%",resize:"none",padding:"10px 12px",borderRadius:"10px",border:"1px solid rgba(191, 164, 109, 0.36)",background:"rgba(250, 245, 234, 0.9)",color:"#74829c",fontFamily:"inherit",fontSize:"0.9rem",cursor:"not-allowed",boxSizing:"border-box"}}),(0,g.jsx)("a",{href:"/login",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:"38px",padding:"0 16px",borderRadius:"999px",background:"#bfa46d",color:"#1a1409",fontWeight:700,fontSize:"0.9rem",textDecoration:"none"},children:"Log in to chat"})]})]})]})}):null,r?(0,g.jsx)(cO,{template:r,onClose:()=>n(null)}):null,o?(0,g.jsx)(uO,{onClose:()=>i(!1),onAddTemplate:e.onAddTemplate}):null]})}function Ik(e){return sk(t=>({templates:e.templates,searchQuery:"",bookmarksOnly:!1,bookmarks:new Set,loading:e.templates.length===0,error:null,view:"feed",popularTemplates:[],popularLoading:!1,popularLoaded:!1,popularError:null,setTemplates:r=>t({templates:r,loading:!1,error:null}),setSearchQuery:r=>t({searchQuery:r}),setBookmarksOnly:r=>t({bookmarksOnly:r}),setBookmarks:r=>t({bookmarks:new Set(r)}),toggleBookmark:r=>t(n=>{let o=new Set(n.bookmarks);return o.has(r)?o.delete(r):o.add(r),{bookmarks:o}}),setLoading:r=>t({loading:r}),setError:r=>t({error:r,loading:!1}),setView:r=>t({view:r}),setPopularTemplates:r=>t({popularTemplates:r,popularLoading:!1,popularLoaded:!0,popularError:null}),setPopularLoading:r=>t({popularLoading:r}),setPopularError:r=>t({popularError:r,popularLoading:!1})}))}var ei=hr(Il(),1);lk();var pO="vidfarm:discover-bookmarks:v1",fO="public";function mO(){let e=document.getElementById("homepage-boot");return e?.textContent?JSON.parse(e.textContent):{templates:[],account:{isLoggedIn:!1},loadEndpoint:"/discover/feed",skillEndpointPrefix:"/discover/skills/"}}function Rk(e){return`${pO}_${e?.trim()||fO}`}function hO(e){try{let t=window.localStorage.getItem(Rk(e));if(!t)return new Set;let r=JSON.parse(t);return Array.isArray(r)?new Set(r.filter(n=>typeof n=="string")):new Set}catch{return new Set}}function gO(e,t){try{window.localStorage.setItem(Rk(t),JSON.stringify(Array.from(e)))}catch{}}function SO(e){let t=e.searchQuery.trim().toLowerCase();return e.templates.filter(r=>{let n=!t||`${r.templateId} ${r.title} ${r.slugId} ${r.difficulty}`.toLowerCase().includes(t),o=!e.bookmarksOnly||e.bookmarks.has(r.templateId);return n&&o})}function yO({boot:e}){let t=(0,tt.useMemo)(()=>Ik(e),[e]),r=pr(t,E=>E.templates),n=pr(t,E=>E.searchQuery),o=pr(t,E=>E.bookmarksOnly),i=pr(t,E=>E.bookmarks),s=pr(t,E=>E.loading),a=pr(t,E=>E.error),l=pr(t,E=>E.view),c=pr(t,E=>E.popularTemplates),d=pr(t,E=>E.popularLoading),u=pr(t,E=>E.popularError),[p,f]=(0,tt.useState)(!1),h=(0,tt.useMemo)(()=>SO({templates:r,searchQuery:n,bookmarksOnly:o,bookmarks:i}),[r,n,o,i]);(0,tt.useEffect)(()=>{t.getState().setBookmarks(hO(e.account.userId)),f(!0)},[e.account.userId,t]),(0,tt.useEffect)(()=>{p&&gO(i,e.account.userId)},[e.account.userId,i,p]);let v=(0,tt.useCallback)(async E=>{E?.showLoading&&t.getState().setLoading(!0);try{let _=await fetch(e.loadEndpoint,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),k=await _.json().catch(()=>({}));if(!_.ok)throw new Error(typeof k.error=="string"&&k.error?k.error:"Unable to load formats.");t.getState().setTemplates(Array.isArray(k.templates)?k.templates:[])}catch(_){E?.showLoading?t.getState().setError(_ instanceof Error?_.message:"Unable to load formats."):Qo("homepage.feed_refresh_failed",{message:_ instanceof Error?_.message:String(_)})}},[e.loadEndpoint,t]);(0,tt.useEffect)(()=>{e.templates.length>0||v({showLoading:!0})},[e.templates.length,v]);let I=r.some(E=>E.status==="processing");(0,tt.useEffect)(()=>{if(!I)return;let E=window.setInterval(()=>{v()},8e3);return()=>window.clearInterval(E)},[I,v]);let m=(0,tt.useCallback)(async E=>{E?.showLoading&&t.getState().setPopularLoading(!0);try{let _=await fetch("/discover/popular",{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),k=await _.json().catch(()=>({}));if(!_.ok)throw new Error(typeof k.error=="string"&&k.error?k.error:"Unable to load popular formats.");t.getState().setPopularTemplates(Array.isArray(k.templates)?k.templates:[])}catch(_){E?.showLoading?t.getState().setPopularError(_ instanceof Error?_.message:"Unable to load popular formats."):Qo("homepage.popular_refresh_failed",{message:_ instanceof Error?_.message:String(_)})}},[t]),S=pr(t,E=>E.popularLoaded);(0,tt.useEffect)(()=>{l!=="popular"||S||m({showLoading:!0})},[l,S,m]);let y=l==="popular"&&c.some(E=>E.status==="processing");(0,tt.useEffect)(()=>{if(!y)return;let E=window.setInterval(()=>{m()},8e3);return()=>window.clearInterval(E)},[y,m]);let b=(0,tt.useCallback)(async E=>{try{let _=await fetch(`/discover/templates/${encodeURIComponent(E)}`,{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json"}}),k=await _.json().catch(()=>({}));return _.ok?(kl("homepage.template_deleted",{template_id:E}),await v(),{ok:!0}):{ok:!1,error:typeof k.error=="string"&&k.error?k.error:"Unable to delete this template."}}catch(_){return{ok:!1,error:_ instanceof Error?_.message:"Unable to delete this template."}}},[v]),R=(0,tt.useCallback)(async E=>{try{let _=null;if(E.file){let w=E.file,L=await fetch("/discover/templates/upload/presign",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({file_name:w.name,content_type:w.type||null,size_bytes:w.size})}),$=await L.json().catch(()=>({}));if(!L.ok)return{ok:!1,error:$.error||"Unable to start the video upload."};if($.transport==="presigned"&&$.upload?.url&&$.storage_key){let Y=await fetch($.upload.url,{method:$.upload.method||"PUT",headers:$.upload.headers||{},body:w});if(!Y.ok)return{ok:!1,error:`Video upload failed (${Y.status}). Try again.`};_={storage_key:$.storage_key,file_name:$.file_name||w.name}}else{let Y=new FormData;Y.append("file",w,$.file_name||w.name);let G=await fetch($.upload?.url||"/discover/templates/upload",{method:"POST",credentials:"same-origin",body:Y}),be=await G.json().catch(()=>({}));if(!G.ok||!be.storage_key)return{ok:!1,error:be.error||"Video upload failed. Try again."};_={storage_key:be.storage_key,file_name:be.file_name||w.name}}}let k=await fetch("/discover/templates",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(_?{upload:_,title:E.title||null,tagline:E.tagline||null,notes:E.notes||null}:{source_url:E.sourceUrl,tagline:E.tagline||null,notes:E.notes||null})}),z=await k.json().catch(()=>({}));return k.ok?(kl("homepage.template_added",_?{storage_key:_.storage_key}:{source_url:E.sourceUrl}),await v(),{ok:!0}):{ok:!1,error:typeof z.error=="string"&&z.error?z.error:"Unable to add that video."}}catch(_){return{ok:!1,error:_ instanceof Error?_.message:"Unable to add that video."}}},[v]);return(0,ei.jsx)(kk,{account:e.account,templates:r,visibleTemplates:h,searchQuery:n,bookmarksOnly:o,bookmarks:i,loading:s,error:a,view:l,popularTemplates:c,popularLoading:d,popularError:u,skillEndpointPrefix:e.skillEndpointPrefix,onSearchQueryChange:E=>t.getState().setSearchQuery(E),onBookmarksOnlyChange:E=>t.getState().setBookmarksOnly(E),onViewChange:E=>t.getState().setView(E),onToggleBookmark:E=>t.getState().toggleBookmark(E),onAddTemplate:R,onDeleteTemplate:b})}var Ld=mO(),wk=document.getElementById("homepage-root");kl("homepage.boot",{is_logged_in:Ld.account?.isLoggedIn??!1,template_count:Ld.templates?.length??0,load_endpoint:Ld.loadEndpoint});wk?(0,xk.hydrateRoot)(wk,(0,ei.jsx)(Aa,{fallback:(0,ei.jsx)(ei.Fragment,{}),onError:e=>Qo("homepage.render_error",{message:e instanceof Error?e.message:String(e)}),children:(0,ei.jsx)(yO,{boot:Ld})})):Qo("homepage.no_root_element",{});
|
|
32
32
|
/*! Bundled license information:
|
|
33
33
|
|
|
34
34
|
react/cjs/react.production.min.js:
|