@mevdragon/vidfarm-devcli 0.16.0 → 0.18.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/.agents/skills/farmville-saas-ux/SKILL.md +156 -0
- package/.agents/skills/farmville-saas-ux/assets/starter.html +294 -0
- package/.agents/skills/farmville-saas-ux/references/components.md +340 -0
- package/.agents/skills/farmville-saas-ux/references/porting-guide.md +121 -0
- package/.agents/skills/farmville-saas-ux/references/tokens.md +271 -0
- package/.agents/skills/vidfarm-media/SKILL.md +4 -3
- package/.agents/skills/vidfarm-media/references/tts.md +20 -1
- package/SKILL.director.md +20 -20
- package/SKILL.platform.md +4 -4
- package/dist/src/account-pages-legacy.js +2 -2
- package/dist/src/app.js +721 -101
- package/dist/src/cli.js +11 -10
- package/dist/src/devcli/clips.js +64 -64
- package/dist/src/editor-chat.js +2 -2
- package/dist/src/frontend/homepage-client.js +162 -2
- package/dist/src/frontend/homepage-store.js +30 -1
- package/dist/src/frontend/homepage-view.js +111 -4
- package/dist/src/homepage.js +184 -1
- package/dist/src/landing-page.js +367 -0
- package/dist/src/primitive-registry.js +278 -2
- package/dist/src/reskin/agency-page.js +299 -0
- package/dist/src/reskin/calendar-page.js +567 -0
- package/dist/src/reskin/chat-page.js +607 -0
- package/dist/src/reskin/discover-page.js +1096 -0
- package/dist/src/reskin/document.js +663 -0
- package/dist/src/reskin/help-page.js +356 -0
- package/dist/src/reskin/index-page.js +62 -0
- package/dist/src/reskin/inpaint-page.js +541 -0
- package/dist/src/reskin/job-runs-page.js +477 -0
- package/dist/src/reskin/library-page.js +688 -0
- package/dist/src/reskin/login-page.js +262 -0
- package/dist/src/reskin/pricing-page.js +388 -0
- package/dist/src/reskin/settings-page.js +687 -0
- package/dist/src/reskin/theme.js +362 -0
- package/dist/src/services/serverless-records.js +54 -0
- package/dist/src/services/swipe-customize.js +434 -0
- package/package.json +1 -1
- package/public/assets/homepage-client-app.js +22 -22
|
@@ -1,34 +1,34 @@
|
|
|
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`
|
|
1
|
+
var Mk=Object.create;var Uh=Object.defineProperty;var Lk=Object.getOwnPropertyDescriptor;var Ok=Object.getOwnPropertyNames;var Pk=Object.getPrototypeOf,Dk=Object.prototype.hasOwnProperty;var Zr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Uk=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ok(t))!Dk.call(e,o)&&o!==r&&Uh(e,o,{get:()=>t[o],enumerable:!(n=Lk(t,o))||n.enumerable});return e};var vr=(e,t,r)=>(r=e!=null?Mk(Pk(e)):{},Uk(t||!e||!e.__esModule?Uh(r,"default",{value:e,enumerable:!0}):r,e));var CE=Zr(X=>{"use strict";var Na=Symbol.for("react.element"),gM=Symbol.for("react.portal"),hM=Symbol.for("react.fragment"),SM=Symbol.for("react.strict_mode"),vM=Symbol.for("react.profiler"),yM=Symbol.for("react.provider"),_M=Symbol.for("react.context"),EM=Symbol.for("react.forward_ref"),TM=Symbol.for("react.suspense"),bM=Symbol.for("react.memo"),kM=Symbol.for("react.lazy"),vE=Symbol.iterator;function wM(e){return e===null||typeof e!="object"?null:(e=vE&&e[vE]||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 yE=Array.isArray,wE=Object.prototype.hasOwnProperty,mm={current:null},IE={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)wE.call(t,n)&&!IE.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 gm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Na}function xM(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?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 Na:case gM:s=!0}}if(s)return s=e,o=o(s),e=n===""?"."+dm(s,0):n,yE(o)?(r="",e!=null&&(r=e.replace(_E,"$&/")+"/"),uu(o,t,r,"",function(c){return c})):o!=null&&(gm(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+":",yE(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=wM(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 RM(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 kt={current:null},du={transition:null},CM={ReactCurrentDispatcher:kt,ReactCurrentBatchConfig:du,ReactCurrentOwner:mm};function RE(){throw Error("act(...) is not supported in production builds of React.")}X.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(!gm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=Hi;X.Fragment=hM;X.Profiler=vM;X.PureComponent=pm;X.StrictMode=SM;X.Suspense=TM;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CM;X.act=RE;X.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)wE.call(t,l)&&!IE.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}};X.createContext=function(e){return e={$$typeof:_M,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:yM,_context:e},e.Consumer=e};X.createElement=xE;X.createFactory=function(e){var t=xE.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:EM,render:e}};X.isValidElement=gm;X.lazy=function(e){return{$$typeof:kM,_payload:{_status:-1,_result:e},_init:RM}};X.memo=function(e,t){return{$$typeof:bM,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=du.transition;du.transition={};try{e()}finally{du.transition=t}};X.unstable_act=RE;X.useCallback=function(e,t){return kt.current.useCallback(e,t)};X.useContext=function(e){return kt.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return kt.current.useDeferredValue(e)};X.useEffect=function(e,t){return kt.current.useEffect(e,t)};X.useId=function(){return kt.current.useId()};X.useImperativeHandle=function(e,t,r){return kt.current.useImperativeHandle(e,t,r)};X.useInsertionEffect=function(e,t){return kt.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return kt.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return kt.current.useMemo(e,t)};X.useReducer=function(e,t,r){return kt.current.useReducer(e,t,r)};X.useRef=function(e){return kt.current.useRef(e)};X.useState=function(e){return kt.current.useState(e)};X.useSyncExternalStore=function(e,t,r){return kt.current.useSyncExternalStore(e,t,r)};X.useTransition=function(){return kt.current.useTransition()};X.version="18.3.1"});var mn=Zr((PW,NE)=>{"use strict";NE.exports=CE()});var YE=Zr(Se=>{"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 Cr(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,Se.unstable_now=function(){return BE.now()}):(ym=Date,FE=ym.now(),Se.unstable_now=function(){return ym.now()-FE});var BE,ym,FE,Gr=[],$n=[],LM=1,ur=null,ft=3,gu=!1,Fo=!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=Cr($n);t!==null;){if(t.callback===null)mu($n);else if(t.startTime<=e)mu($n),t.sortIndex=t.expirationTime,Tm(Gr,t);else break;t=Cr($n)}}function km(e){if(La=!1,bm(e),!Fo)if(Cr(Gr)!==null)Fo=!0,Im(wm);else{var t=Cr($n);t!==null&&xm(km,t.startTime-e)}}function wm(e,t){Fo=!1,La&&(La=!1,WE(Oa),Oa=-1),gu=!0;var r=ft;try{for(bm(t),ur=Cr(Gr);ur!==null&&(!(ur.expirationTime>t)||e&&!VE());){var n=ur.callback;if(typeof n=="function"){ur.callback=null,ft=ur.priorityLevel;var o=n(ur.expirationTime<=t);t=Se.unstable_now(),typeof o=="function"?ur.callback=o:ur===Cr(Gr)&&mu(Gr),bm(t)}else mu(Gr);ur=Cr(Gr)}if(ur!==null)var i=!0;else{var s=Cr($n);s!==null&&xm(km,s.startTime-t),i=!1}return i}finally{ur=null,ft=r,gu=!1}}var hu=!1,fu=null,Oa=-1,jE=5,GE=-1;function VE(){return!(Se.unstable_now()-GE<jE)}function _m(){if(fu!==null){var e=Se.unstable_now();GE=e;var t=!0;try{t=fu(!0,e)}finally{t?Ma():(hu=!1,fu=null)}}else hu=!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 Im(e){fu=e,hu||(hu=!0,Ma())}function xm(e,t){Oa=$E(function(){e(Se.unstable_now())},t)}Se.unstable_IdlePriority=5;Se.unstable_ImmediatePriority=1;Se.unstable_LowPriority=4;Se.unstable_NormalPriority=3;Se.unstable_Profiling=null;Se.unstable_UserBlockingPriority=2;Se.unstable_cancelCallback=function(e){e.callback=null};Se.unstable_continueExecution=function(){Fo||gu||(Fo=!0,Im(wm))};Se.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};Se.unstable_getCurrentPriorityLevel=function(){return ft};Se.unstable_getFirstCallbackNode=function(){return Cr(Gr)};Se.unstable_next=function(e){switch(ft){case 1:case 2:case 3:var t=3;break;default:t=ft}var r=ft;ft=t;try{return e()}finally{ft=r}};Se.unstable_pauseExecution=function(){};Se.unstable_requestPaint=function(){};Se.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=ft;ft=e;try{return t()}finally{ft=r}};Se.unstable_scheduleCallback=function(e,t,r){var n=Se.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:LM++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,Tm($n,e),Cr(Gr)===null&&e===Cr($n)&&(La?(WE(Oa),Oa=-1):La=!0,xm(km,r-n))):(e.sortIndex=o,Tm(Gr,e),Fo||gu||(Fo=!0,Im(wm))),e};Se.unstable_shouldYield=VE;Se.unstable_wrapCallback=function(e){var t=ft;return function(){var r=ft;ft=t;try{return e.apply(this,arguments)}finally{ft=r}}}});var KE=Zr((rj,qE)=>{"use strict";qE.exports=YE()});var Qb=Zr(Xt=>{"use strict";var OM=mn(),qt=KE();function N(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 Zo(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 En=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xm=Object.prototype.hasOwnProperty,PM=/^[: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 DM(e){return Xm.call(JE,e)?!0:Xm.call(XE,e)?!1:PM.test(e)?JE[e]=!0:(XE[e]=!0,!1)}function UM(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 BM(e,t,r,n){if(t===null||typeof t>"u"||UM(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 xt(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 nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nt[e]=new xt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nt[t]=new xt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nt[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nt[e]=new xt(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){nt[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nt[e]=new xt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nt[e]=new xt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nt[e]=new xt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nt[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)});var $g=/[\-:]([a-z])/g;function Wg(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($g,Wg);nt[t]=new xt(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($g,Wg);nt[t]=new xt(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($g,Wg);nt[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nt[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)});nt.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nt[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)});function jg(e,t,r,n){var o=nt.hasOwnProperty(t)?nt[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(BM(t,r,o,n)&&(r=null),n||o===null?DM(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 wn=OM.__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"),Gg=Symbol.for("react.strict_mode"),Jm=Symbol.for("react.profiler"),nT=Symbol.for("react.provider"),oT=Symbol.for("react.context"),Vg=Symbol.for("react.forward_ref"),Zm=Symbol.for("react.suspense"),Qm=Symbol.for("react.suspense_list"),Yg=Symbol.for("react.memo"),jn=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 Ne=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
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{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=`
|
|
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 FM(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 eg(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 Gg: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 Vg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yg:return t=e.displayName||null,t!==null?t:eg(e.type)||"Memo";case jn:t=e._payload,e=e._init;try{return eg(e(t))}catch{}}return null}function HM(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 eg(t);case 8:return t===Gg?"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 oo(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 zM(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 vu(e){e._valueTracker||(e._valueTracker=zM(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 tg(e,t){var r=t.checked;return Ne({},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=oo(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&&jg(e,"checked",t,!1)}function rg(e,t){lT(e,t);var r=oo(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")?ng(e,t.type,r):t.hasOwnProperty("defaultValue")&&ng(e,t.type,oo(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 ng(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=""+oo(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 og(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return Ne({},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(N(92));if(ja(r)){if(1<r.length)throw Error(N(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:oo(r)}}function cT(e,t){var r=oo(t.value),n=oo(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 ig(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 yu,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(yu=yu||document.createElement("div"),yu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yu.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},$M=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){$M.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 WM=Ne({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 sg(e,t){if(t){if(WM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function ag(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 lg=null;function qg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cg=null,rs=null,ns=null;function n0(e){if(e=El(e)){if(typeof cg!="function")throw Error(N(280));var t=e.stateNode;t&&(t=_d(t),cg(e.stateNode,e.type,t))}}function mT(e){rs?ns?ns.push(e):ns=[e]:rs=e}function gT(){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 hT(e,t){return e(t)}function ST(){}var Am=!1;function vT(e,t,r){if(Am)return e(t,r);Am=!0;try{return hT(e,t,r)}finally{Am=!1,(rs!==null||ns!==null)&&(ST(),gT())}}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(N(231,t,typeof r));return r}var ug=!1;if(En)try{zi={},Object.defineProperty(zi,"passive",{get:function(){ug=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{ug=!1}var zi;function jM(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,dg=null,GM={onError:function(e){qa=!0,Yu=e}};function VM(e,t,r,n,o,i,s,a,l){qa=!1,Yu=null,jM.apply(GM,arguments)}function YM(e,t,r,n,o,i,s,a,l){if(VM.apply(this,arguments),qa){if(qa){var c=Yu;qa=!1,Yu=null}else throw Error(N(198));qu||(qu=!0,dg=c)}}function Qo(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 yT(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(Qo(e)!==e)throw Error(N(188))}function qM(e){var t=e.alternate;if(!t){if(t=Qo(e),t===null)throw Error(N(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(N(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(N(189))}}if(r.alternate!==n)throw Error(N(190))}if(r.tag!==3)throw Error(N(188));return r.stateNode.current===r?e:t}function _T(e){return e=qM(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=qt.unstable_scheduleCallback,i0=qt.unstable_cancelCallback,KM=qt.unstable_shouldYield,XM=qt.unstable_requestPaint,De=qt.unstable_now,JM=qt.unstable_getCurrentPriorityLevel,Kg=qt.unstable_ImmediatePriority,bT=qt.unstable_UserBlockingPriority,Ku=qt.unstable_NormalPriority,ZM=qt.unstable_LowPriority,kT=qt.unstable_IdlePriority,hd=null,Kr=null;function QM(e){if(Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(hd,e,void 0,(e.current.flags&128)===128)}catch{}}var Or=Math.clz32?Math.clz32:rL,eL=Math.log,tL=Math.LN2;function rL(e){return e>>>=0,e===0?32:31-(eL(e)/tL|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-Or(t),o=1<<r,n|=e[r],t&=~o;return n}function nL(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 oL(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Or(i),a=1<<s,l=o[s];l===-1?((a&r)===0||(a&n)!==0)&&(o[s]=nL(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function pg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function wT(){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 yl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Or(t),e[t]=r}function iL(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-Or(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function Xg(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Or(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var de=0;function IT(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var xT,Jg,RT,CT,NT,fg=!1,Tu=[],Xn=null,Jn=null,Zn=null,il=new Map,sl=new Map,Vn=[],sL="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":Xn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":Zn=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&&Jg(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function aL(e,t,r,n,o){switch(t){case"focusin":return Xn=Da(Xn,e,t,r,n,o),!0;case"dragenter":return Jn=Da(Jn,e,t,r,n,o),!0;case"mouseover":return Zn=Da(Zn,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=$o(e.target);if(t!==null){var r=Qo(t);if(r!==null){if(t=r.tag,t===13){if(t=yT(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=mg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);lg=n,r.target.dispatchEvent(n),lg=null}else return t=El(r),t!==null&&Jg(t),e.blockedOn=r,!1;t.shift()}return!0}function a0(e,t,r){Du(e)&&r.delete(t)}function lL(){fg=!1,Xn!==null&&Du(Xn)&&(Xn=null),Jn!==null&&Du(Jn)&&(Jn=null),Zn!==null&&Du(Zn)&&(Zn=null),il.forEach(a0),sl.forEach(a0)}function Ua(e,t){e.blockedOn===t&&(e.blockedOn=null,fg||(fg=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,lL)))}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(Xn!==null&&Ua(Xn,e),Jn!==null&&Ua(Jn,e),Zn!==null&&Ua(Zn,e),il.forEach(t),sl.forEach(t),r=0;r<Vn.length;r++)n=Vn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Vn.length&&(r=Vn[0],r.blockedOn===null);)AT(r),r.blockedOn===null&&Vn.shift()}var os=wn.ReactCurrentBatchConfig,Ju=!0;function cL(e,t,r,n){var o=de,i=os.transition;os.transition=null;try{de=1,Zg(e,t,r,n)}finally{de=o,os.transition=i}}function uL(e,t,r,n){var o=de,i=os.transition;os.transition=null;try{de=4,Zg(e,t,r,n)}finally{de=o,os.transition=i}}function Zg(e,t,r,n){if(Ju){var o=mg(e,t,r,n);if(o===null)Fm(e,t,n,Zu,r),s0(e,n);else if(aL(o,e,t,r,n))n.stopPropagation();else if(s0(e,n),t&4&&-1<sL.indexOf(e)){for(;o!==null;){var i=El(o);if(i!==null&&xT(i),i=mg(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 mg(e,t,r,n){if(Zu=null,e=qg(n),e=$o(e),e!==null)if(t=Qo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=yT(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(JM()){case Kg:return 1;case bT:return 4;case Ku:case ZM:return 16;case kT:return 536870912;default:return 16}default:return 16}}var qn=null,Qg=null,Uu=null;function LT(){if(Uu)return Uu;var e,t=Qg,r=t.length,n,o="value"in qn?qn.value:qn.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 Kt(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 Ne(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},eh=Kt(ms),_l=Ne({},ms,{view:0,detail:0}),dL=Kt(_l),Lm,Om,Ba,Sd=Ne({},_l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:th,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=Kt(Sd),pL=Ne({},Sd,{dataTransfer:0}),fL=Kt(pL),mL=Ne({},_l,{relatedTarget:0}),Pm=Kt(mL),gL=Ne({},ms,{animationName:0,elapsedTime:0,pseudoElement:0}),hL=Kt(gL),SL=Ne({},ms,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vL=Kt(SL),yL=Ne({},ms,{data:0}),u0=Kt(yL),_L={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EL={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"},TL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=TL[e])?!!t[e]:!1}function th(){return bL}var kL=Ne({},_l,{key:function(e){if(e.key){var t=_L[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"?EL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:th,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}}),wL=Kt(kL),IL=Ne({},Sd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),d0=Kt(IL),xL=Ne({},_l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:th}),RL=Kt(xL),CL=Ne({},ms,{propertyName:0,elapsedTime:0,pseudoElement:0}),NL=Kt(CL),AL=Ne({},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}),ML=Kt(AL),LL=[9,13,27,32],rh=En&&"CompositionEvent"in window,Ka=null;En&&"documentMode"in document&&(Ka=document.documentMode);var OL=En&&"TextEvent"in window&&!Ka,OT=En&&(!rh||Ka&&8<Ka&&11>=Ka),p0=" ",f0=!1;function PT(e,t){switch(e){case"keyup":return LL.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 PL(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 DL(e,t){if(Gi)return e==="compositionend"||!rh&&PT(e,t)?(e=LT(),Uu=Qg=qn=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 UL={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"?!!UL[e.type]:t==="textarea"}function UT(e,t,r,n){mT(n),t=Qu(t,"onChange"),0<t.length&&(r=new eh("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Xa=null,ll=null;function BL(e){qT(e,0)}function vd(e){var t=qi(e);if(aT(t))return e}function FL(e,t){if(e==="change")return t}var BT=!1;En&&(En?(wu="oninput"in document,wu||(Dm=document.createElement("div"),Dm.setAttribute("oninput","return;"),wu=typeof Dm.oninput=="function"),ku=wu):ku=!1,BT=ku&&(!document.documentMode||9<document.documentMode));var ku,wu,Dm;function g0(){Xa&&(Xa.detachEvent("onpropertychange",FT),ll=Xa=null)}function FT(e){if(e.propertyName==="value"&&vd(ll)){var t=[];UT(t,ll,e,qg(e)),vT(BL,t)}}function HL(e,t,r){e==="focusin"?(g0(),Xa=t,ll=r,Xa.attachEvent("onpropertychange",FT)):e==="focusout"&&g0()}function zL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vd(ll)}function $L(e,t){if(e==="click")return vd(t)}function WL(e,t){if(e==="input"||e==="change")return vd(t)}function jL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dr=typeof Object.is=="function"?Object.is:jL;function cl(e,t){if(Dr(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)||!Dr(e[o],t[o]))return!1}return!0}function h0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function S0(e,t){var r=h0(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=h0(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 nh(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 GL(e){var t=zT(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HT(r.ownerDocument.documentElement,r)){if(n!==null&&nh(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 VL=En&&"documentMode"in document&&11>=document.documentMode,Vi=null,gg=null,Ja=null,hg=!1;function v0(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;hg||Vi==null||Vi!==Vu(n)||(n=Vi,"selectionStart"in n&&nh(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(gg,"onSelect"),0<n.length&&(t=new eh("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Vi)))}function Iu(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Yi={animationend:Iu("Animation","AnimationEnd"),animationiteration:Iu("Animation","AnimationIteration"),animationstart:Iu("Animation","AnimationStart"),transitionend:Iu("Transition","TransitionEnd")},Um={},$T={};En&&($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 yd(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=yd("animationend"),jT=yd("animationiteration"),GT=yd("animationstart"),VT=yd("transitionend"),YT=new Map,y0="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 so(e,t){YT.set(e,t),Zo(t,[e])}for(xu=0;xu<y0.length;xu++)Ru=y0[xu],_0=Ru.toLowerCase(),E0=Ru[0].toUpperCase()+Ru.slice(1),so(_0,"on"+E0);var Ru,_0,E0,xu;so(WT,"onAnimationEnd");so(jT,"onAnimationIteration");so(GT,"onAnimationStart");so("dblclick","onDoubleClick");so("focusin","onFocus");so("focusout","onBlur");so(VT,"onTransitionEnd");as("onMouseEnter",["mouseout","mouseover"]);as("onMouseLeave",["mouseout","mouseover"]);as("onPointerEnter",["pointerout","pointerover"]);as("onPointerLeave",["pointerout","pointerover"]);Zo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zo("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(" "),YL=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,YM(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=dg,qu=!1,dg=null,e}function Ee(e,t){var r=t[Eg];r===void 0&&(r=t[Eg]=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"&&(YL.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=cL;break;case 4:o=uL;break;default:o=Zg}r=o.bind(null,t,r,e),o=void 0,!ug||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=$o(a),s===null)return;if(l=s.tag,l===5||l===6){n=i=s;continue e}a=a.parentNode}}n=n.return}vT(function(){var c=i,u=qg(r),d=[];e:{var p=YT.get(e);if(p!==void 0){var f=eh,h=e;switch(e){case"keypress":if(Bu(r)===0)break e;case"keydown":case"keyup":f=wL;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=fL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=RL;break;case WT:case jT:case GT:f=hL;break;case VT:f=NL;break;case"scroll":f=dL;break;case"wheel":f=ML;break;case"copy":case"cut":case"paste":f=vL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=d0}var y=(t&4)!==0,k=!y&&e==="scroll",g=y?p!==null?p+"Capture":null:p;y=[];for(var S=c,v;S!==null;){v=S;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,g!==null&&(E=ol(S,g),E!=null&&y.push(dl(S,E,v)))),k)break;S=S.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!==lg&&(h=r.relatedTarget||r.fromElement)&&($o(h)||h[Tn]))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?$o(h):null,h!==null&&(k=Qo(h),h!==k||h.tag!==5&&h.tag!==6)&&(h=null)):(f=null,h=c),f!==h)){if(y=c0,E="onMouseLeave",g="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(y=d0,E="onPointerLeave",g="onPointerEnter",S="pointer"),k=f==null?p:qi(f),v=h==null?p:qi(h),p=new y(E,S+"leave",f,r,u),p.target=k,p.relatedTarget=v,E=null,$o(u)===c&&(y=new y(g,S+"enter",h,r,u),y.target=v,y.relatedTarget=k,E=y),k=E,f&&h)t:{for(y=f,g=h,S=0,v=y;v;v=$i(v))S++;for(v=0,E=g;E;E=$i(E))v++;for(;0<S-v;)y=$i(y),S--;for(;0<v-S;)g=$i(g),v--;for(;S--;){if(y===g||g!==null&&y===g.alternate)break t;y=$i(y),g=$i(g)}y=null}else y=null;f!==null&&b0(d,p,f,y,!1),h!==null&&k!==null&&b0(d,k,h,y,!0)}}e:{if(p=c?qi(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var C=FL;else if(m0(p))if(BT)C=WL;else{C=zL;var R=HL}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=$L);if(C&&(C=C(e,c))){UT(d,C,r,u);break e}R&&R(e,p,c),e==="focusout"&&(R=p._wrapperState)&&R.controlled&&p.type==="number"&&ng(p,"number",p.value)}switch(R=c?qi(c):window,e){case"focusin":(m0(R)||R.contentEditable==="true")&&(Vi=R,gg=c,Ja=null);break;case"focusout":Ja=gg=Vi=null;break;case"mousedown":hg=!0;break;case"contextmenu":case"mouseup":case"dragend":hg=!1,v0(d,r,u);break;case"selectionchange":if(VL)break;case"keydown":case"keyup":v0(d,r,u)}var _;if(rh)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Gi?PT(e,r)&&(w="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(w="onCompositionStart");w&&(OT&&r.locale!=="ko"&&(Gi||w!=="onCompositionStart"?w==="onCompositionEnd"&&Gi&&(_=LT()):(qn=u,Qg="value"in qn?qn.value:qn.textContent,Gi=!0)),R=Qu(c,w),0<R.length&&(w=new u0(w,e,null,r,u),d.push({event:w,listeners:R}),_?w.data=_:(_=DT(r),_!==null&&(w.data=_)))),(_=OL?PL(e,r):DL(e,r))&&(c=Qu(c,"onBeforeInput"),0<c.length&&(u=new u0("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 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 qL=/\r\n?/g,KL=/\u0000|\uFFFD/g;function k0(e){return(typeof e=="string"?e:""+e).replace(qL,`
|
|
6
|
+
`).replace(KL,"")}function Nu(e,t,r){if(t=k0(t),k0(e)!==t&&r)throw Error(N(425))}function ed(){}var Sg=null,vg=null;function yg(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 _g=typeof setTimeout=="function"?setTimeout:void 0,XL=typeof clearTimeout=="function"?clearTimeout:void 0,w0=typeof Promise=="function"?Promise:void 0,JL=typeof queueMicrotask=="function"?queueMicrotask:typeof w0<"u"?function(e){return w0.resolve(null).then(e).catch(ZL)}:_g;function ZL(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 Qn(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 I0(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 gs=Math.random().toString(36).slice(2),qr="__reactFiber$"+gs,pl="__reactProps$"+gs,Tn="__reactContainer$"+gs,Eg="__reactEvents$"+gs,QL="__reactListeners$"+gs,e2="__reactHandles$"+gs;function $o(e){var t=e[qr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Tn]||r[qr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=I0(e);e!==null;){if(r=e[qr])return r;e=I0(e)}return t}e=r,r=e.parentNode}return null}function El(e){return e=e[qr]||e[Tn],!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(N(33))}function _d(e){return e[pl]||null}var Tg=[],Ki=-1;function ao(e){return{current:e}}function Te(e){0>Ki||(e.current=Tg[Ki],Tg[Ki]=null,Ki--)}function ve(e,t){Ki++,Tg[Ki]=e.current,e.current=t}var io={},St=ao(io),Ut=ao(!1),Yo=io;function ls(e,t){var r=e.type.contextTypes;if(!r)return io;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 Bt(e){return e=e.childContextTypes,e!=null}function td(){Te(Ut),Te(St)}function x0(e,t,r){if(St.current!==io)throw Error(N(168));ve(St,t),ve(Ut,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(N(108,HM(e)||"Unknown",o));return Ne({},r,n)}function rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||io,Yo=St.current,ve(St,e),ve(Ut,Ut.current),!0}function R0(e,t,r){var n=e.stateNode;if(!n)throw Error(N(169));r?(e=XT(e,t,Yo),n.__reactInternalMemoizedMergedChildContext=e,Te(Ut),Te(St),ve(St,e)):Te(Ut),ve(Ut,r)}var Sn=null,Ed=!1,zm=!1;function JT(e){Sn===null?Sn=[e]:Sn.push(e)}function t2(e){Ed=!0,JT(e)}function lo(){if(!zm&&Sn!==null){zm=!0;var e=0,t=de;try{var r=Sn;for(de=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Sn=null,Ed=!1}catch(o){throw Sn!==null&&(Sn=Sn.slice(e+1)),TT(Kg,lo),o}finally{de=t,zm=!1}}return null}var Xi=[],Ji=0,nd=null,od=0,dr=[],pr=0,qo=null,vn=1,yn="";function Ho(e,t){Xi[Ji++]=od,Xi[Ji++]=nd,nd=e,od=t}function ZT(e,t,r){dr[pr++]=vn,dr[pr++]=yn,dr[pr++]=qo,qo=e;var n=vn;e=yn;var o=32-Or(n)-1;n&=~(1<<o),r+=1;var i=32-Or(t)+o;if(30<i){var s=o-o%5;i=(n&(1<<s)-1).toString(32),n>>=s,o-=s,vn=1<<32-Or(t)+o|r<<o|n,yn=i+e}else vn=1<<i|r<<o|n,yn=e}function oh(e){e.return!==null&&(Ho(e,1),ZT(e,1,0))}function ih(e){for(;e===nd;)nd=Xi[--Ji],Xi[Ji]=null,od=Xi[--Ji],Xi[Ji]=null;for(;e===qo;)qo=dr[--pr],dr[pr]=null,yn=dr[--pr],dr[pr]=null,vn=dr[--pr],dr[pr]=null}var Yt=null,Vt=null,ke=!1,Lr=null;function QT(e,t){var r=fr(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,Yt=e,Vt=Qn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Yt=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=qo!==null?{id:vn,overflow:yn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=fr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Yt=e,Vt=null,!0):!1;default:return!1}}function bg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kg(e){if(ke){var t=Vt;if(t){var r=t;if(!C0(e,t)){if(bg(e))throw Error(N(418));t=Qn(r.nextSibling);var n=Yt;t&&C0(e,t)?QT(n,r):(e.flags=e.flags&-4097|2,ke=!1,Yt=e)}}else{if(bg(e))throw Error(N(418));e.flags=e.flags&-4097|2,ke=!1,Yt=e}}}function N0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Yt=e}function Au(e){if(e!==Yt)return!1;if(!ke)return N0(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yg(e.type,e.memoizedProps)),t&&(t=Vt)){if(bg(e))throw eb(),Error(N(418));for(;t;)QT(e,t),t=Qn(t.nextSibling)}if(N0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Vt=Qn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Yt?Qn(e.stateNode.nextSibling):null;return!0}function eb(){for(var e=Vt;e;)e=Qn(e.nextSibling)}function cs(){Vt=Yt=null,ke=!1}function sh(e){Lr===null?Lr=[e]:Lr.push(e)}var r2=wn.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(N(309));var n=r.stateNode}if(!n)throw Error(N(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(N(284));if(!r._owner)throw Error(N(290,e))}return e}function Mu(e,t){throw e=Object.prototype.toString.call(t),Error(N(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(g,S){if(e){var v=g.deletions;v===null?(g.deletions=[S],g.flags|=16):v.push(S)}}function r(g,S){if(!e)return null;for(;S!==null;)t(g,S),S=S.sibling;return null}function n(g,S){for(g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function o(g,S){return g=no(g,S),g.index=0,g.sibling=null,g}function i(g,S,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<S?(g.flags|=2,S):v):(g.flags|=2,S)):(g.flags|=1048576,S)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,S,v,E){return S===null||S.tag!==6?(S=qm(v,g.mode,E),S.return=g,S):(S=o(S,v),S.return=g,S)}function l(g,S,v,E){var C=v.type;return C===ji?u(g,S,v.props.children,E,v.key):S!==null&&(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jn&&A0(C)===S.type)?(E=o(S,v.props),E.ref=Fa(g,S,v),E.return=g,E):(E=Gu(v.type,v.key,v.props,null,g.mode,E),E.ref=Fa(g,S,v),E.return=g,E)}function c(g,S,v,E){return S===null||S.tag!==4||S.stateNode.containerInfo!==v.containerInfo||S.stateNode.implementation!==v.implementation?(S=Km(v,g.mode,E),S.return=g,S):(S=o(S,v.children||[]),S.return=g,S)}function u(g,S,v,E,C){return S===null||S.tag!==7?(S=Vo(v,g.mode,E,C),S.return=g,S):(S=o(S,v),S.return=g,S)}function d(g,S,v){if(typeof S=="string"&&S!==""||typeof S=="number")return S=qm(""+S,g.mode,v),S.return=g,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Su:return v=Gu(S.type,S.key,S.props,null,g.mode,v),v.ref=Fa(g,null,S),v.return=g,v;case Wi:return S=Km(S,g.mode,v),S.return=g,S;case jn:var E=S._init;return d(g,E(S._payload),v)}if(ja(S)||Pa(S))return S=Vo(S,g.mode,v,null),S.return=g,S;Mu(g,S)}return null}function p(g,S,v,E){var C=S!==null?S.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return C!==null?null:a(g,S,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:return v.key===C?l(g,S,v,E):null;case Wi:return v.key===C?c(g,S,v,E):null;case jn:return C=v._init,p(g,S,C(v._payload),E)}if(ja(v)||Pa(v))return C!==null?null:u(g,S,v,E,null);Mu(g,v)}return null}function f(g,S,v,E,C){if(typeof E=="string"&&E!==""||typeof E=="number")return g=g.get(v)||null,a(S,g,""+E,C);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Su:return g=g.get(E.key===null?v:E.key)||null,l(S,g,E,C);case Wi:return g=g.get(E.key===null?v:E.key)||null,c(S,g,E,C);case jn:var R=E._init;return f(g,S,v,R(E._payload),C)}if(ja(E)||Pa(E))return g=g.get(v)||null,u(S,g,E,C,null);Mu(S,E)}return null}function h(g,S,v,E){for(var C=null,R=null,_=S,w=S=0,z=null;_!==null&&w<v.length;w++){_.index>w?(z=_,_=null):z=_.sibling;var I=p(g,_,v[w],E);if(I===null){_===null&&(_=z);break}e&&_&&I.alternate===null&&t(g,_),S=i(I,S,w),R===null?C=I:R.sibling=I,R=I,_=z}if(w===v.length)return r(g,_),ke&&Ho(g,w),C;if(_===null){for(;w<v.length;w++)_=d(g,v[w],E),_!==null&&(S=i(_,S,w),R===null?C=_:R.sibling=_,R=_);return ke&&Ho(g,w),C}for(_=n(g,_);w<v.length;w++)z=f(_,g,w,v[w],E),z!==null&&(e&&z.alternate!==null&&_.delete(z.key===null?w:z.key),S=i(z,S,w),R===null?C=z:R.sibling=z,R=z);return e&&_.forEach(function(P){return t(g,P)}),ke&&Ho(g,w),C}function y(g,S,v,E){var C=Pa(v);if(typeof C!="function")throw Error(N(150));if(v=C.call(v),v==null)throw Error(N(151));for(var R=C=null,_=S,w=S=0,z=null,I=v.next();_!==null&&!I.done;w++,I=v.next()){_.index>w?(z=_,_=null):z=_.sibling;var P=p(g,_,I.value,E);if(P===null){_===null&&(_=z);break}e&&_&&P.alternate===null&&t(g,_),S=i(P,S,w),R===null?C=P:R.sibling=P,R=P,_=z}if(I.done)return r(g,_),ke&&Ho(g,w),C;if(_===null){for(;!I.done;w++,I=v.next())I=d(g,I.value,E),I!==null&&(S=i(I,S,w),R===null?C=I:R.sibling=I,R=I);return ke&&Ho(g,w),C}for(_=n(g,_);!I.done;w++,I=v.next())I=f(_,g,w,I.value,E),I!==null&&(e&&I.alternate!==null&&_.delete(I.key===null?w:I.key),S=i(I,S,w),R===null?C=I:R.sibling=I,R=I);return e&&_.forEach(function(W){return t(g,W)}),ke&&Ho(g,w),C}function k(g,S,v,E){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 C=v.key,R=S;R!==null;){if(R.key===C){if(C=v.type,C===ji){if(R.tag===7){r(g,R.sibling),S=o(R,v.props.children),S.return=g,g=S;break e}}else if(R.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jn&&A0(C)===R.type){r(g,R.sibling),S=o(R,v.props),S.ref=Fa(g,R,v),S.return=g,g=S;break e}r(g,R);break}else t(g,R);R=R.sibling}v.type===ji?(S=Vo(v.props.children,g.mode,E,v.key),S.return=g,g=S):(E=Gu(v.type,v.key,v.props,null,g.mode,E),E.ref=Fa(g,S,v),E.return=g,g=E)}return s(g);case Wi:e:{for(R=v.key;S!==null;){if(S.key===R)if(S.tag===4&&S.stateNode.containerInfo===v.containerInfo&&S.stateNode.implementation===v.implementation){r(g,S.sibling),S=o(S,v.children||[]),S.return=g,g=S;break e}else{r(g,S);break}else t(g,S);S=S.sibling}S=Km(v,g.mode,E),S.return=g,g=S}return s(g);case jn:return R=v._init,k(g,S,R(v._payload),E)}if(ja(v))return h(g,S,v,E);if(Pa(v))return y(g,S,v,E);Mu(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,S!==null&&S.tag===6?(r(g,S.sibling),S=o(S,v),S.return=g,g=S):(r(g,S),S=qm(v,g.mode,E),S.return=g,g=S),s(g)):r(g,S)}return k}var us=tb(!0),rb=tb(!1),id=ao(null),sd=null,Zi=null,ah=null;function lh(){ah=Zi=sd=null}function ch(e){var t=id.current;Te(id),e._currentValue=t}function wg(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,ah=Zi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Dt=!0),e.firstContext=null)}function gr(e){var t=e._currentValue;if(ah!==e)if(e={context:e,memoizedValue:t,next:null},Zi===null){if(sd===null)throw Error(N(308));Zi=e,sd.dependencies={lanes:0,firstContext:e}}else Zi=Zi.next=e;return t}var Wo=null;function uh(e){Wo===null?Wo=[e]:Wo.push(e)}function nb(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,uh(t)):(r.next=o.next,o.next=r),t.interleaved=r,bn(e,n)}function bn(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 Gn=!1;function dh(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 _n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function eo(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ne&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,bn(e,r)}return o=n.interleaved,o===null?(t.next=t,uh(n)):(t.next=o.next,o.next=t),n.interleaved=t,bn(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,Xg(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;Gn=!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=Ne({},d,p);break e;case 2:Gn=!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);Xo|=s,e.lanes=s,e.memoizedState=d}}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(N(191,o));o.call(n)}}}var Tl={},Xr=ao(Tl),fl=ao(Tl),ml=ao(Tl);function jo(e){if(e===Tl)throw Error(N(174));return e}function ph(e,t){switch(ve(ml,t),ve(fl,e),ve(Xr,Tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ig(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ig(t,e)}Te(Xr),ve(Xr,t)}function ds(){Te(Xr),Te(fl),Te(ml)}function ib(e){jo(ml.current);var t=jo(Xr.current),r=ig(t,e.type);t!==r&&(ve(fl,e),ve(Xr,r))}function fh(e){fl.current===e&&(Te(Xr),Te(fl))}var Re=ao(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 mh(){for(var e=0;e<$m.length;e++)$m[e]._workInProgressVersionPrimary=null;$m.length=0}var Hu=wn.ReactCurrentDispatcher,Wm=wn.ReactCurrentBatchConfig,Ko=0,Ce=null,je=null,qe=null,cd=!1,Za=!1,gl=0,n2=0;function mt(){throw Error(N(321))}function gh(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Dr(e[r],t[r]))return!1;return!0}function hh(e,t,r,n,o,i){if(Ko=i,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hu.current=e===null||e.memoizedState===null?a2:l2,e=r(n,o),Za){i=0;do{if(Za=!1,gl=0,25<=i)throw Error(N(301));i+=1,qe=je=null,t.updateQueue=null,Hu.current=c2,e=r(n,o)}while(Za)}if(Hu.current=ud,t=je!==null&&je.next!==null,Ko=0,qe=je=Ce=null,cd=!1,t)throw Error(N(300));return e}function Sh(){var e=gl!==0;return gl=0,e}function Yr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Ce.memoizedState=qe=e:qe=qe.next=e,qe}function hr(){if(je===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=qe===null?Ce.memoizedState:qe.next;if(t!==null)qe=t,je=e;else{if(e===null)throw Error(N(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},qe===null?Ce.memoizedState=qe=e:qe=qe.next=e}return qe}function hl(e,t){return typeof t=="function"?t(e):t}function jm(e){var t=hr(),r=t.queue;if(r===null)throw Error(N(311));r.lastRenderedReducer=e;var n=je,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((Ko&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,Ce.lanes|=u,Xo|=u}c=c.next}while(c!==null&&c!==i);l===null?s=n:l.next=a,Dr(n,t.memoizedState)||(Dt=!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,Ce.lanes|=i,Xo|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Gm(e){var t=hr(),r=t.queue;if(r===null)throw Error(N(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);Dr(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function sb(){}function ab(e,t){var r=Ce,n=hr(),o=t(),i=!Dr(n.memoizedState,o);if(i&&(n.memoizedState=o,Dt=!0),n=n.queue,vh(ub.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||qe!==null&&qe.memoizedState.tag&1){if(r.flags|=2048,Sl(9,cb.bind(null,r,n,o,t),void 0,null),Ke===null)throw Error(N(349));(Ko&30)!==0||lb(r,t,o)}return o}function lb(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.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!Dr(e,r)}catch{return!0}}function pb(e){var t=bn(e,1);t!==null&&Pr(t,e,1,-1)}function O0(e){var t=Yr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:e},t.queue=e,e=e.dispatch=s2.bind(null,Ce,e),[t.memoizedState,e]}function Sl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.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 hr().memoizedState}function zu(e,t,r,n){var o=Yr();Ce.flags|=e,o.memoizedState=Sl(1|t,r,void 0,n===void 0?null:n)}function Td(e,t,r,n){var o=hr();n=n===void 0?null:n;var i=void 0;if(je!==null){var s=je.memoizedState;if(i=s.destroy,n!==null&&gh(n,s.deps)){o.memoizedState=Sl(t,r,i,n);return}}Ce.flags|=e,o.memoizedState=Sl(1|t,r,i,n)}function P0(e,t){return zu(8390656,8,e,t)}function vh(e,t){return Td(2048,8,e,t)}function mb(e,t){return Td(4,2,e,t)}function gb(e,t){return Td(4,4,e,t)}function hb(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,hb.bind(null,t,e),r)}function yh(){}function vb(e,t){var r=hr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gh(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function yb(e,t){var r=hr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gh(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function _b(e,t,r){return(Ko&21)===0?(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=r):(Dr(r,t)||(r=wT(),Ce.lanes|=r,Xo|=r,e.baseState=!0),t)}function o2(e,t){var r=de;de=r!==0&&4>r?r:4,e(!0);var n=Wm.transition;Wm.transition={};try{e(!1),t()}finally{de=r,Wm.transition=n}}function Eb(){return hr().memoizedState}function i2(e,t,r){var n=ro(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=It();Pr(r,e,n,o),kb(r,t,n)}}function s2(e,t,r){var n=ro(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,Dr(a,s)){var l=t.interleaved;l===null?(o.next=o,uh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=nb(e,t,o,n),r!==null&&(o=It(),Pr(r,e,n,o),kb(r,t,n))}}function Tb(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}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,Xg(e,r)}}var ud={readContext:gr,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},a2={readContext:gr,useCallback:function(e,t){return Yr().memoizedState=[e,t===void 0?null:t],e},useContext:gr,useEffect:P0,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zu(4194308,4,hb.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=Yr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Yr();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=i2.bind(null,Ce,e),[n.memoizedState,e]},useRef:function(e){var t=Yr();return e={current:e},t.memoizedState=e},useState:O0,useDebugValue:yh,useDeferredValue:function(e){return Yr().memoizedState=e},useTransition:function(){var e=O0(!1),t=e[0];return e=o2.bind(null,e[1]),Yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ce,o=Yr();if(ke){if(r===void 0)throw Error(N(407));r=r()}else{if(r=t(),Ke===null)throw Error(N(349));(Ko&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=Yr(),t=Ke.identifierPrefix;if(ke){var r=yn,n=vn;r=(n&~(1<<32-Or(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=gl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=n2++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},l2={readContext:gr,useCallback:vb,useContext:gr,useEffect:vh,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:gb,useMemo:yb,useReducer:jm,useRef:fb,useState:function(){return jm(hl)},useDebugValue:yh,useDeferredValue:function(e){var t=hr();return _b(t,je.memoizedState,e)},useTransition:function(){var e=jm(hl)[0],t=hr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1},c2={readContext:gr,useCallback:vb,useContext:gr,useEffect:vh,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:gb,useMemo:yb,useReducer:Gm,useRef:fb,useState:function(){return Gm(hl)},useDebugValue:yh,useDeferredValue:function(e){var t=hr();return je===null?t.memoizedState=e:_b(t,je.memoizedState,e)},useTransition:function(){var e=Gm(hl)[0],t=hr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1};function Ar(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ig(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ne({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bd={isMounted:function(e){return(e=e._reactInternals)?Qo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=It(),o=ro(e),i=_n(n,o);i.payload=t,r!=null&&(i.callback=r),t=eo(e,i,o),t!==null&&(Pr(t,e,o,n),Fu(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=It(),o=ro(e),i=_n(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=eo(e,i,o),t!==null&&(Pr(t,e,o,n),Fu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=It(),n=ro(e),o=_n(r,n);o.tag=2,t!=null&&(o.callback=t),t=eo(e,o,n),t!==null&&(Pr(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 wb(e,t,r){var n=!1,o=io,i=t.contextType;return typeof i=="object"&&i!==null?i=gr(i):(o=Bt(t)?Yo:St.current,n=t.contextTypes,i=(n=n!=null)?ls(e,o):io),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 xg(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},dh(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=gr(i):(i=Bt(t)?Yo:St.current,o.context=ls(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ig(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+=FM(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 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=
|
|
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 Rg(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var u2=typeof WeakMap=="function"?WeakMap:Map;function Ib(e,t,r){r=_n(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){pd||(pd=!0,Bg=n),Rg(e,t)},r}function xb(e,t,r){r=_n(-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(){Rg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Rg(e,t),typeof n!="function"&&(to===null?to=new Set([this]):to.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 u2;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=k2.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=_n(-1,1),t.tag=2,eo(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var d2=wn.ReactCurrentOwner,Dt=!1;function wt(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=hh(e,t,r,n,i,o),r=Sh(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,kn(e,t,o)):(ke&&r&&oh(t),t.flags|=1,wt(e,t,n,o),t.child)}function $0(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!xh(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 kn(e,t,o)}return t.flags|=1,e=no(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(Dt=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,kn(e,t,o)}return Cg(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},ve(es,Gt),Gt|=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,ve(es,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,ve(es,Gt),Gt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,ve(es,Gt),Gt|=n;return wt(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 Cg(e,t,r,n,o){var i=Bt(r)?Yo:St.current;return i=ls(t,i),is(t,o),r=hh(e,t,r,n,i,o),n=Sh(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,kn(e,t,o)):(ke&&n&&oh(t),t.flags|=1,wt(e,t,r,o),t.child)}function W0(e,t,r,n,o){if(Bt(r)){var i=!0;rd(t)}else i=!1;if(is(t,o),t.stateNode===null)$u(e,t),wb(t,r,n),xg(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=gr(c):(c=Bt(r)?Yo:St.current,c=ls(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)&&U0(t,s,n,c),Gn=!1;var p=t.memoizedState;s.state=p,ad(t,n,s,o),l=t.memoizedState,a!==n||p!==l||Ut.current||Gn?(typeof u=="function"&&(Ig(t,r,u,n),l=t.memoizedState),(a=Gn||D0(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:Ar(t.type,a),s.props=c,d=t.pendingProps,p=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=gr(l):(l=Bt(r)?Yo:St.current,l=ls(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)&&U0(t,s,n,l),Gn=!1,p=t.memoizedState,s.state=p,ad(t,n,s,o);var h=t.memoizedState;a!==d||p!==h||Ut.current||Gn?(typeof f=="function"&&(Ig(t,r,f,n),h=t.memoizedState),(c=Gn||D0(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 Ng(e,t,r,n,i,o)}function Ng(e,t,r,n,o,i){Nb(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return o&&R0(t,r,!1),kn(e,t,i);n=t.stateNode,d2.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)):wt(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),ph(e,t.containerInfo)}function j0(e,t,r,n,o){return cs(),sh(o),t.flags|=256,wt(e,t,r,n),t.child}var Ag={dehydrated:null,treeContext:null,retryLane:0};function Mg(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mb(e,t,r){var n=t.pendingProps,o=Re.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),ve(Re,o&1),e===null)return kg(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=Id(s,n,0,null),e=Vo(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mg(r),t.memoizedState=Ag,e):_h(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return p2(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=no(o,l),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=no(a,i):(i=Vo(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?Mg(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=Ag,n}return i=e.child,e=i.sibling,n=no(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 _h(e,t){return t=Id({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lu(e,t,r,n){return n!==null&&sh(n),us(t,e.child,null,r),e=_h(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function p2(e,t,r,n,o,i,s){if(r)return t.flags&256?(t.flags&=-257,n=Vm(Error(N(422))),Lu(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=Id({mode:"visible",children:n.children},o,0,null),i=Vo(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=Mg(s),t.memoizedState=Ag,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(N(419)),n=Vm(i,n,void 0),Lu(e,t,s,n)}if(a=(s&e.childLanes)!==0,Dt||a){if(n=Ke,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,bn(e,o),Pr(n,e,o,-1))}return Ih(),n=Vm(Error(N(421))),Lu(e,t,s,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=w2.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Vt=Qn(o.nextSibling),Yt=t,ke=!0,Lr=null,e!==null&&(dr[pr++]=vn,dr[pr++]=yn,dr[pr++]=qo,vn=e.id,yn=e.overflow,qo=t),t=_h(t,n.children),t.flags|=4096,t)}function G0(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),wg(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(wt(e,t,n.children,r),n=Re.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(ve(Re,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 kn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Xo|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,r=no(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=no(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function f2(e,t,r){switch(t.tag){case 3:Ab(t),cs();break;case 5:ib(t);break;case 1:Bt(t.type)&&rd(t);break;case 4:ph(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;ve(id,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ve(Re,Re.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Mb(e,t,r):(ve(Re,Re.current&1),e=kn(e,t,r),e!==null?e.sibling:null);ve(Re,Re.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),ve(Re,Re.current),n)break;return null;case 22:case 23:return t.lanes=0,Cb(e,t,r)}return kn(e,t,r)}var Ob,Lg,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}};Lg=function(){};Pb=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,jo(Xr.current);var i=null;switch(r){case"input":o=tg(e,o),n=tg(e,n),i=[];break;case"select":o=Ne({},o,{value:void 0}),n=Ne({},n,{value:void 0}),i=[];break;case"textarea":o=og(e,o),n=og(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ed)}sg(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(!ke)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 gt(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 m2(e,t,r){var n=t.pendingProps;switch(ih(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return Bt(t.type)&&td(),gt(t),null;case 3:return n=t.stateNode,ds(),Te(Ut),Te(St),mh(),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,Lr!==null&&(zg(Lr),Lr=null))),Lg(e,t),gt(t),null;case 5:fh(t);var o=jo(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(N(166));return gt(t),null}if(e=jo(Xr.current),Au(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[qr]=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)}sg(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":vu(n),e0(n,i,!0);break;case"textarea":vu(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[qr]=t,e[pl]=n,Ob(e,t,!1,!1),t.stateNode=e;e:{switch(s=ag(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=tg(e,n),Ee("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=Ne({},n,{value:void 0}),Ee("invalid",e);break;case"textarea":t0(e,n),o=og(e,n),Ee("invalid",e);break;default:o=n}sg(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&&jg(e,i,l,s))}switch(r){case"input":vu(e),e0(e,n,!1);break;case"textarea":vu(e),r0(e);break;case"option":n.value!=null&&e.setAttribute("value",""+oo(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 gt(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(N(166));if(r=jo(ml.current),jo(Xr.current),Au(t)){if(n=t.stateNode,r=t.memoizedProps,n[qr]=t,(i=n.nodeValue!==r)&&(e=Yt,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[qr]=t,t.stateNode=n}return gt(t),null;case 13:if(Te(Re),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&Vt!==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(N(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(N(317));i[qr]=t}else cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),i=!1}else Lr!==null&&(zg(Lr),Lr=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||(Re.current&1)!==0?Ge===0&&(Ge=3):Ih())),t.updateQueue!==null&&(t.flags|=4),gt(t),null);case 4:return ds(),Lg(e,t),e===null&&ul(t.stateNode.containerInfo),gt(t),null;case 10:return ch(t.type._context),gt(t),null;case 17:return Bt(t.type)&&td(),gt(t),null;case 19:if(Te(Re),i=t.memoizedState,i===null)return gt(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)Ha(i,!1);else{if(Ge!==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 ve(Re,Re.current&1|2),t.child}e=e.sibling}i.tail!==null&&De()>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&&!ke)return gt(t),null}else 2*De()-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=De(),t.sibling=null,r=Re.current,ve(Re,n?r&1|2:r&1),t):(gt(t),null);case 22:case 23:return wh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(Gt&1073741824)!==0&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function g2(e,t){switch(ih(t),t.tag){case 1:return Bt(t.type)&&td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ds(),Te(Ut),Te(St),mh(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return fh(t),null;case 13:if(Te(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Re),null;case 4:return ds(),null;case 10:return ch(t.type._context),null;case 22:case 23:return wh(),null;case 24:return null;default:return null}}var Ou=!1,ht=!1,h2=typeof WeakSet=="function"?WeakSet:Set,O=null;function Qi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Oe(e,t,n)}else r.current=null}function Og(e,t,r){try{r()}catch(n){Oe(e,t,n)}}var V0=!1;function S2(e,t){if(Sg=Ju,e=zT(),nh(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(vg={focusedElem:e,selectionRange:r},Ju=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;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,k=h.memoizedState,g=t.stateNode,S=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ar(t.type,y),k);g.__reactInternalSnapshotBeforeUpdate=S}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(N(163))}}catch(E){Oe(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=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&&Og(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 Pg(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[qr],delete t[pl],delete t[Eg],delete t[QL],delete t[e2])),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 Dg(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(Dg(e,t,r),e=e.sibling;e!==null;)Dg(e,t,r),e=e.sibling}function Ug(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(Ug(e,t,r),e=e.sibling;e!==null;)Ug(e,t,r),e=e.sibling}var tt=null,Mr=!1;function Wn(e,t,r){for(r=r.child;r!==null;)Fb(e,t,r),r=r.sibling}function Fb(e,t,r){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(hd,r)}catch{}switch(r.tag){case 5:ht||Qi(r,t);case 6:var n=tt,o=Mr;tt=null,Wn(e,t,r),tt=n,Mr=o,tt!==null&&(Mr?(e=tt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):tt.removeChild(r.stateNode));break;case 18:tt!==null&&(Mr?(e=tt,r=r.stateNode,e.nodeType===8?Hm(e.parentNode,r):e.nodeType===1&&Hm(e,r),al(e)):Hm(tt,r.stateNode));break;case 4:n=tt,o=Mr,tt=r.stateNode.containerInfo,Mr=!0,Wn(e,t,r),tt=n,Mr=o;break;case 0:case 11:case 14:case 15:if(!ht&&(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)&&Og(r,t,s),o=o.next}while(o!==n)}Wn(e,t,r);break;case 1:if(!ht&&(Qi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Oe(r,t,a)}Wn(e,t,r);break;case 21:Wn(e,t,r);break;case 22:r.mode&1?(ht=(n=ht)||r.memoizedState!==null,Wn(e,t,r),ht=n):Wn(e,t,r);break;default:Wn(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 h2),t.forEach(function(n){var o=I2.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Nr(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:tt=a.stateNode,Mr=!1;break e;case 3:tt=a.stateNode.containerInfo,Mr=!0;break e;case 4:tt=a.stateNode.containerInfo,Mr=!0;break e}a=a.return}if(tt===null)throw Error(N(160));Fb(i,s,o),tt=null,Mr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Oe(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(Nr(t,e),Vr(e),n&4){try{Qa(3,e,e.return),kd(3,e)}catch(y){Oe(e,e.return,y)}try{Qa(5,e,e.return)}catch(y){Oe(e,e.return,y)}}break;case 1:Nr(t,e),Vr(e),n&512&&r!==null&&Qi(r,r.return);break;case 5:if(Nr(t,e),Vr(e),n&512&&r!==null&&Qi(r,r.return),e.flags&32){var o=e.stateNode;try{nl(o,"")}catch(y){Oe(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),ag(a,s);var c=ag(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):jg(o,u,d,c)}switch(a){case"input":rg(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(y){Oe(e,e.return,y)}}break;case 6:if(Nr(t,e),Vr(e),n&4){if(e.stateNode===null)throw Error(N(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(y){Oe(e,e.return,y)}}break;case 3:if(Nr(t,e),Vr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{al(t.containerInfo)}catch(y){Oe(e,e.return,y)}break;case 4:Nr(t,e),Vr(e);break;case 13:Nr(t,e),Vr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(bh=De())),n&4&&q0(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(ht=(c=ht)||u,Nr(t,e),ht=c):Nr(t,e),Vr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(O=e,u=e.child;u!==null;){for(d=O=u;O!==null;){switch(p=O,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(y){Oe(n,r,y)}}break;case 5:Qi(p,p.return);break;case 22:if(p.memoizedState!==null){X0(d);continue}}f!==null?(f.return=p,O=f):X0(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){Oe(e,e.return,y)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(y){Oe(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:Nr(t,e),Vr(e),n&4&&q0(e);break;case 21:break;default:Nr(t,e),Vr(e)}}function Vr(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(N(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(nl(o,""),n.flags&=-33);var i=Y0(e);Ug(e,i,o);break;case 3:case 4:var s=n.stateNode.containerInfo,a=Y0(e);Dg(e,a,s);break;default:throw Error(N(161))}}catch(l){Oe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function v2(e,t,r){O=e,zb(e,t,r)}function zb(e,t,r){for(var n=(e.mode&1)!==0;O!==null;){var o=O,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||ht;a=Ou;var c=ht;if(Ou=s,(ht=l)&&!c)for(O=o;O!==null;)s=O,l=s.child,s.tag===22&&s.memoizedState!==null?J0(o):l!==null?(l.return=s,O=l):J0(o);for(;i!==null;)O=i,zb(i,t,r),i=i.sibling;O=o,Ou=a,ht=c}K0(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,O=i):K0(e,t,r)}}function K0(e){for(;O!==null;){var t=O;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ht||kd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!ht)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Ar(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 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(N(163))}ht||t.flags&512&&Pg(t)}catch(p){Oe(t,t.return,p)}}if(t===e){O=null;break}if(r=t.sibling,r!==null){r.return=t.return,O=r;break}O=t.return}}function X0(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var r=t.sibling;if(r!==null){r.return=t.return,O=r;break}O=t.return}}function J0(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{kd(4,t)}catch(l){Oe(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){Oe(t,o,l)}}var i=t.return;try{Pg(t)}catch(l){Oe(t,i,l)}break;case 5:var s=t.return;try{Pg(t)}catch(l){Oe(t,s,l)}}}catch(l){Oe(t,t.return,l)}if(t===e){O=null;break}var a=t.sibling;if(a!==null){a.return=t.return,O=a;break}O=t.return}}var y2=Math.ceil,dd=wn.ReactCurrentDispatcher,Eh=wn.ReactCurrentOwner,mr=wn.ReactCurrentBatchConfig,ne=0,Ke=null,He=null,rt=0,Gt=0,es=ao(0),Ge=0,vl=null,Xo=0,wd=0,Th=0,el=null,Pt=null,bh=0,fs=1/0,hn=null,pd=!1,Bg=null,to=null,Pu=!1,Kn=null,fd=0,tl=0,Fg=null,Wu=-1,ju=0;function It(){return(ne&6)!==0?De():Wu!==-1?Wu:Wu=De()}function ro(e){return(e.mode&1)===0?1:(ne&2)!==0&&rt!==0?rt&-rt:r2.transition!==null?(ju===0&&(ju=wT()),ju):(e=de,e!==0||(e=window.event,e=e===void 0?16:MT(e.type)),e)}function Pr(e,t,r,n){if(50<tl)throw tl=0,Fg=null,Error(N(185));yl(e,r,n),((ne&2)===0||e!==Ke)&&(e===Ke&&((ne&2)===0&&(wd|=r),Ge===4&&Yn(e,rt)),Ft(e,n),r===1&&ne===0&&(t.mode&1)===0&&(fs=De()+500,Ed&&lo()))}function Ft(e,t){var r=e.callbackNode;oL(e,t);var n=Xu(e,e===Ke?rt: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?t2(Z0.bind(null,e)):JT(Z0.bind(null,e)),JL(function(){(ne&6)===0&&lo()}),r=null;else{switch(IT(n)){case 1:r=Kg;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,(ne&6)!==0)throw Error(N(327));var r=e.callbackNode;if(ss()&&e.callbackNode!==r)return null;var n=Xu(e,e===Ke?rt:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=md(e,n);else{t=n;var o=ne;ne|=2;var i=jb();(Ke!==e||rt!==t)&&(hn=null,fs=De()+500,Go(e,t));do try{T2();break}catch(a){Wb(e,a)}while(!0);lh(),dd.current=i,ne=o,He!==null?t=0:(Ke=null,rt=0,t=Ge)}if(t!==0){if(t===2&&(o=pg(e),o!==0&&(n=o,t=Hg(e,o))),t===1)throw r=vl,Go(e,0),Yn(e,n),Ft(e,De()),r;if(t===6)Yn(e,n);else{if(o=e.current.alternate,(n&30)===0&&!_2(o)&&(t=md(e,n),t===2&&(i=pg(e),i!==0&&(n=i,t=Hg(e,i))),t===1))throw r=vl,Go(e,0),Yn(e,n),Ft(e,De()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(N(345));case 2:zo(e,Pt,hn);break;case 3:if(Yn(e,n),(n&130023424)===n&&(t=bh+500-De(),10<t)){if(Xu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){It(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_g(zo.bind(null,e,Pt,hn),t);break}zo(e,Pt,hn);break;case 4:if(Yn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-Or(n);i=1<<s,s=t[s],s>o&&(o=s),n&=~i}if(n=o,n=De()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*y2(n/1960))-n,10<n){e.timeoutHandle=_g(zo.bind(null,e,Pt,hn),n);break}zo(e,Pt,hn);break;case 5:zo(e,Pt,hn);break;default:throw Error(N(329))}}}return Ft(e,De()),e.callbackNode===r?$b.bind(null,e):null}function Hg(e,t){var r=el;return e.current.memoizedState.isDehydrated&&(Go(e,t).flags|=256),e=md(e,t),e!==2&&(t=Pt,Pt=r,t!==null&&zg(t)),e}function zg(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function _2(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(!Dr(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 Yn(e,t){for(t&=~Th,t&=~wd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Or(t),n=1<<r;e[r]=-1,t&=~n}}function Z0(e){if((ne&6)!==0)throw Error(N(327));ss();var t=Xu(e,0);if((t&1)===0)return Ft(e,De()),null;var r=md(e,t);if(e.tag!==0&&r===2){var n=pg(e);n!==0&&(t=n,r=Hg(e,n))}if(r===1)throw r=vl,Go(e,0),Yn(e,t),Ft(e,De()),r;if(r===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zo(e,Pt,hn),Ft(e,De()),null}function kh(e,t){var r=ne;ne|=1;try{return e(t)}finally{ne=r,ne===0&&(fs=De()+500,Ed&&lo())}}function Jo(e){Kn!==null&&Kn.tag===0&&(ne&6)===0&&ss();var t=ne;ne|=1;var r=mr.transition,n=de;try{if(mr.transition=null,de=1,e)return e()}finally{de=n,mr.transition=r,ne=t,(ne&6)===0&&lo()}}function wh(){Gt=es.current,Te(es)}function Go(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,XL(r)),He!==null)for(r=He.return;r!==null;){var n=r;switch(ih(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&td();break;case 3:ds(),Te(Ut),Te(St),mh();break;case 5:fh(n);break;case 4:ds();break;case 13:Te(Re);break;case 19:Te(Re);break;case 10:ch(n.type._context);break;case 22:case 23:wh()}r=r.return}if(Ke=e,He=e=no(e.current,null),rt=Gt=t,Ge=0,vl=null,Th=wd=Xo=0,Pt=el=null,Wo!==null){for(t=0;t<Wo.length;t++)if(r=Wo[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}Wo=null}return e}function Wb(e,t){do{var r=He;try{if(lh(),Hu.current=ud,cd){for(var n=Ce.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}cd=!1}if(Ko=0,qe=je=Ce=null,Za=!1,gl=0,Eh.current=null,r===null||r.return===null){Ge=1,vl=t,He=null;break}e:{var i=e,s=r.return,a=r,l=t;if(t=rt,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=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 y=new Set;y.add(l),t.updateQueue=y}else h.add(l);break e}else{if((t&1)===0){B0(i,c,t),Ih();break e}l=Error(N(426))}}else if(ke&&a.mode&1){var k=F0(s);if(k!==null){(k.flags&65536)===0&&(k.flags|=256),H0(k,s,a,i,t),sh(ps(l,a));break e}}i=l=ps(l,a),Ge!==4&&(Ge=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 g=Ib(i,l,t);M0(i,g);break e;case 1:a=l;var S=i.type,v=i.stateNode;if((i.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(to===null||!to.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var E=xb(i,a,t);M0(i,E);break e}}i=i.return}while(i!==null)}Vb(r)}catch(C){t=C,He===r&&r!==null&&(He=r=r.return);continue}break}while(!0)}function jb(){var e=dd.current;return dd.current=ud,e===null?ud:e}function Ih(){(Ge===0||Ge===3||Ge===2)&&(Ge=4),Ke===null||(Xo&268435455)===0&&(wd&268435455)===0||Yn(Ke,rt)}function md(e,t){var r=ne;ne|=2;var n=jb();(Ke!==e||rt!==t)&&(hn=null,Go(e,t));do try{E2();break}catch(o){Wb(e,o)}while(!0);if(lh(),ne=r,dd.current=n,He!==null)throw Error(N(261));return Ke=null,rt=0,Ge}function E2(){for(;He!==null;)Gb(He)}function T2(){for(;He!==null&&!KM();)Gb(He)}function Gb(e){var t=qb(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?Vb(e):He=t,Eh.current=null}function Vb(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=m2(r,t,Gt),r!==null){He=r;return}}else{if(r=g2(r,t),r!==null){r.flags&=32767,He=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ge=6,He=null;return}}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);Ge===0&&(Ge=5)}function zo(e,t,r){var n=de,o=mr.transition;try{mr.transition=null,de=1,b2(e,t,r,n)}finally{mr.transition=o,de=n}return null}function b2(e,t,r,n){do ss();while(Kn!==null);if((ne&6)!==0)throw Error(N(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(N(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(iL(e,i),e===Ke&&(He=Ke=null,rt=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=mr.transition,mr.transition=null;var s=de;de=1;var a=ne;ne|=4,Eh.current=null,S2(e,r),Hb(r,e),GL(vg),Ju=!!Sg,vg=Sg=null,e.current=r,v2(r,e,o),XM(),ne=a,de=s,mr.transition=i}else e.current=r;if(Pu&&(Pu=!1,Kn=e,fd=o),i=e.pendingLanes,i===0&&(to=null),QM(r.stateNode,n),Ft(e,De()),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=Bg,Bg=null,e;return(fd&1)!==0&&e.tag!==0&&ss(),i=e.pendingLanes,(i&1)!==0?e===Fg?tl++:(tl=0,Fg=e):tl=0,lo(),null}function ss(){if(Kn!==null){var e=IT(fd),t=mr.transition,r=de;try{if(mr.transition=null,de=16>e?16:e,Kn===null)var n=!1;else{if(e=Kn,Kn=null,fd=0,(ne&6)!==0)throw Error(N(331));var o=ne;for(ne|=4,O=e.current;O!==null;){var i=O,s=i.child;if((O.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(O=c;O!==null;){var u=O;switch(u.tag){case 0:case 11:case 15:Qa(8,u,i)}var d=u.child;if(d!==null)d.return=u,O=d;else for(;O!==null;){u=O;var p=u.sibling,f=u.return;if(Ub(u),u===c){O=null;break}if(p!==null){p.return=f,O=p;break}O=f}}}var h=i.alternate;if(h!==null){var y=h.child;if(y!==null){h.child=null;do{var k=y.sibling;y.sibling=null,y=k}while(y!==null)}}O=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,O=s;else e:for(;O!==null;){if(i=O,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Qa(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,O=g;break e}O=i.return}}var S=e.current;for(O=S;O!==null;){s=O;var v=s.child;if((s.subtreeFlags&2064)!==0&&v!==null)v.return=s,O=v;else e:for(s=S;O!==null;){if(a=O,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:kd(9,a)}}catch(C){Oe(a,a.return,C)}if(a===s){O=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,O=E;break e}O=a.return}}if(ne=o,lo(),Kr&&typeof Kr.onPostCommitFiberRoot=="function")try{Kr.onPostCommitFiberRoot(hd,e)}catch{}n=!0}return n}finally{de=r,mr.transition=t}}return!1}function Q0(e,t,r){t=ps(r,t),t=Ib(e,t,1),e=eo(e,t,1),t=It(),e!==null&&(yl(e,1,t),Ft(e,t))}function Oe(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"&&(to===null||!to.has(n))){e=ps(r,e),e=xb(t,e,1),t=eo(t,e,1),e=It(),t!==null&&(yl(t,1,e),Ft(t,e));break}}t=t.return}}function k2(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=It(),e.pingedLanes|=e.suspendedLanes&r,Ke===e&&(rt&r)===r&&(Ge===4||Ge===3&&(rt&130023424)===rt&&500>De()-bh?Go(e,0):Th|=r),Ft(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=It();e=bn(e,t),e!==null&&(yl(e,t,r),Ft(e,r))}function w2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Yb(e,r)}function I2(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(N(314))}n!==null&&n.delete(t),Yb(e,r)}var qb;qb=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ut.current)Dt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Dt=!1,f2(e,t,r);Dt=(e.flags&131072)!==0}else Dt=!1,ke&&(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,St.current);is(t,r),o=hh(null,t,n,e,o,r);var i=Sh();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,Bt(n)?(i=!0,rd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dh(t),o.updater=bd,t.stateNode=o,o._reactInternals=t,xg(t,n,e,r),t=Ng(null,t,n,!0,i,r)):(t.tag=0,ke&&i&&oh(t),wt(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=R2(n),e=Ar(n,e),o){case 0:t=Cg(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,Ar(n.type,e),r);break e}throw Error(N(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ar(n,o),Cg(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ar(n,o),W0(e,t,n,o,r);case 3:e:{if(Ab(t),e===null)throw Error(N(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(N(423)),t),t=j0(e,t,n,r,o);break e}else if(n!==o){o=ps(Error(N(424)),t),t=j0(e,t,n,r,o);break e}else for(Vt=Qn(t.stateNode.containerInfo.firstChild),Yt=t,ke=!0,Lr=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=kn(e,t,r);break e}wt(e,t,n,r)}t=t.child}return t;case 5:return ib(t),e===null&&kg(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,yg(n,o)?s=null:i!==null&&yg(n,i)&&(t.flags|=32),Nb(e,t),wt(e,t,s,r),t.child;case 6:return e===null&&kg(t),null;case 13:return Mb(e,t,r);case 4:return ph(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=us(t,null,n,r):wt(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ar(n,o),z0(e,t,n,o,r);case 7:return wt(e,t,t.pendingProps,r),t.child;case 8:return wt(e,t,t.pendingProps.children,r),t.child;case 12:return wt(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,ve(id,n._currentValue),n._currentValue=s,i!==null)if(Dr(i.value,s)){if(i.children===o.children&&!Ut.current){t=kn(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=_n(-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),wg(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(N(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),wg(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}wt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,is(t,r),o=gr(o),n=n(o),t.flags|=1,wt(e,t,n,r),t.child;case 14:return n=t.type,o=Ar(n,t.pendingProps),o=Ar(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:Ar(n,o),$u(e,t),t.tag=1,Bt(n)?(e=!0,rd(t)):e=!1,is(t,r),wb(t,n,o),xg(t,n,o,r),Ng(null,t,n,!0,e,r);case 19:return Lb(e,t,r);case 22:return Cb(e,t,r)}throw Error(N(156,t.tag))};function Kb(e,t){return TT(e,t)}function x2(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 fr(e,t,r,n){return new x2(e,t,r,n)}function xh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R2(e){if(typeof e=="function")return xh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vg)return 11;if(e===Yg)return 14}return 2}function no(e,t){var r=e.alternate;return r===null?(r=fr(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")xh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ji:return Vo(r.children,o,i,t);case Gg:s=8,o|=8;break;case Jm:return e=fr(12,r,t,o|2),e.elementType=Jm,e.lanes=i,e;case Zm:return e=fr(13,r,t,o),e.elementType=Zm,e.lanes=i,e;case Qm:return e=fr(19,r,t,o),e.elementType=Qm,e.lanes=i,e;case iT:return Id(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 Vg:s=11;break e;case Yg:s=14;break e;case jn:s=16,n=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=fr(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Vo(e,t,r,n){return e=fr(7,e,n,t),e.lanes=r,e}function Id(e,t,r,n){return e=fr(22,e,n,t),e.elementType=iT,e.lanes=r,e.stateNode={isHidden:!1},e}function qm(e,t,r){return e=fr(6,e,null,t),e.lanes=r,e}function Km(e,t,r){return t=fr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function C2(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 Rh(e,t,r,n,o,i,s,a,l){return e=new C2(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=fr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dh(i),e}function N2(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 io;e=e._reactInternals;e:{if(Qo(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var r=e.type;if(Bt(r))return XT(e,r,t)}return t}function Jb(e,t,r,n,o,i,s,a,l){return e=Rh(r,n,!0,e,o,i,s,a,l),e.context=Xb(null),r=e.current,n=It(),o=ro(r),i=_n(n,o),i.callback=t??null,eo(r,i,o),e.current.lanes=o,yl(e,o,n),Ft(e,n),e}function xd(e,t,r,n){var o=t.current,i=It(),s=ro(o);return r=Xb(r),t.context===null?t.context=r:t.pendingContext=r,t=_n(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=eo(o,t,s),e!==null&&(Pr(e,o,s,i),Fu(e,o,s)),s}function gd(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 Ch(e,t){eT(e,t),(e=e.alternate)&&eT(e,t)}function A2(){return null}var Zb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nh(e){this._internalRoot=e}Rd.prototype.render=Nh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));xd(e,t,null,null)};Rd.prototype.unmount=Nh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jo(function(){xd(null,e,null,null)}),t[Tn]=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<Vn.length&&t!==0&&t<Vn[r].priority;r++);Vn.splice(r,0,e),r===0&&AT(e)}};function Ah(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 M2(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=gd(s);i.call(c)}}var s=Jb(t,n,e,0,null,!1,!1,"",tT);return e._reactRootContainer=s,e[Tn]=s.current,ul(e.nodeType===8?e.parentNode:e),Jo(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var a=n;n=function(){var c=gd(l);a.call(c)}}var l=Rh(e,0,!1,null,null,!1,!1,"",tT);return e._reactRootContainer=l,e[Tn]=l.current,ul(e.nodeType===8?e.parentNode:e),Jo(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=gd(s);a.call(l)}}xd(t,s,e,o)}else s=M2(r,t,e,o,n);return gd(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&&(Xg(t,r|1),Ft(t,De()),(ne&6)===0&&(fs=De()+500,lo()))}break;case 13:Jo(function(){var n=bn(e,1);if(n!==null){var o=It();Pr(n,e,1,o)}}),Ch(e,1)}};Jg=function(e){if(e.tag===13){var t=bn(e,134217728);if(t!==null){var r=It();Pr(t,e,134217728,r)}Ch(e,134217728)}};RT=function(e){if(e.tag===13){var t=ro(e),r=bn(e,t);if(r!==null){var n=It();Pr(r,e,t,n)}Ch(e,t)}};CT=function(){return de};NT=function(e,t){var r=de;try{return de=e,t()}finally{de=r}};cg=function(e,t,r){switch(t){case"input":if(rg(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(N(90));aT(n),rg(n,o)}}}break;case"textarea":cT(e,r);break;case"select":t=r.value,t!=null&&ts(e,!!r.multiple,t,!1)}};hT=kh;ST=Jo;var L2={usingClientEntryPoint:!1,Events:[El,qi,_d,mT,gT,kh]},za={findFiberByHostInstance:$o,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},O2={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:wn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_T(e),e===null?null:e.stateNode},findFiberByHostInstance:za.findFiberByHostInstance||A2,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{hd=$a.inject(O2),Kr=$a}catch{}var $a;Xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L2;Xt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ah(t))throw Error(N(200));return N2(e,t,null,r)};Xt.createRoot=function(e,t){if(!Ah(e))throw Error(N(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=Rh(e,1,!1,null,null,r,!1,n,o),e[Tn]=t.current,ul(e.nodeType===8?e.parentNode:e),new Nh(t)};Xt.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(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=_T(t),e=e===null?null:e.stateNode,e};Xt.flushSync=function(e){return Jo(e)};Xt.hydrate=function(e,t,r){if(!Cd(t))throw Error(N(200));return Nd(null,e,t,!0,r)};Xt.hydrateRoot=function(e,t,r){if(!Ah(e))throw Error(N(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[Tn]=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)};Xt.render=function(e,t,r){if(!Cd(t))throw Error(N(200));return Nd(null,e,t,!1,r)};Xt.unmountComponentAtNode=function(e){if(!Cd(e))throw Error(N(40));return e._reactRootContainer?(Jo(function(){Nd(null,null,e,!1,function(){e._reactRootContainer=null,e[Tn]=null})}),!0):!1};Xt.unstable_batchedUpdates=kh;Xt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Cd(r))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return Nd(e,t,r,!1,n)};Xt.version="18.3.1-next-f1338f8080-20240426"});var rk=Zr((oj,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=Zr(Mh=>{"use strict";var nk=rk();Mh.createRoot=nk.createRoot,Mh.hydrateRoot=nk.hydrateRoot;var ij});var dk=Zr(Md=>{"use strict";var B2=mn(),F2=Symbol.for("react.element"),H2=Symbol.for("react.fragment"),z2=Object.prototype.hasOwnProperty,$2=B2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,W2={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)z2.call(t,n)&&!W2.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:F2,type:e,key:i,ref:s,props:o,_owner:$2.current}}Md.Fragment=H2;Md.jsx=uk;Md.jsxs=uk});var wl=Zr((hj,pk)=>{"use strict";pk.exports=dk()});var M=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var U=globalThis;var Ur="10.56.0";function Ht(){return fo(U),U}function fo(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ur,t[Ur]=t[Ur]||{}}function yr(e,t,r=U){let n=r.__SENTRY__=r.__SENTRY__||{},o=n[Ur]=n[Ur]||{};return o[e]||(o[e]=t())}var xl=["debug","info","warn","error","log","assert","trace"],Bk="Sentry Logger ",mo={};function Je(e){if(!("console"in U))return e();let t=U.console,r={},n=Object.keys(mo);n.forEach(o=>{let i=mo[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function Fk(){Bd().enabled=!0}function Hk(){Bd().enabled=!1}function Bh(){return Bd().enabled}function zk(...e){Ud("log",...e)}function $k(...e){Ud("warn",...e)}function Wk(...e){Ud("error",...e)}function Ud(e,...t){M&&Bh()&&Je(()=>{U.console[e](`${Bk}[${e}]:`,...t)})}function Bd(){return M?yr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var T={enable:Fk,disable:Hk,isEnabled:Bh,log:zk,warn:$k,error:Wk};var Fh=/\(error: (.*)\)/,Hh=/captureMessage|captureException/;function ys(...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=Fh.test(l)?l.replace(Fh,"$1"):l;if(!c.includes("Error: ")){for(let u of t){let d=u(c);if(d){i.push(d);break}}if(i.length>=50+o)break}}return Hd(i.slice(o))}}function Cl(e){return Array.isArray(e)?ys(...e):e}function Hd(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Rl(t).function||"")&&t.pop(),t.reverse(),Hh.test(Rl(t).function||"")&&(t.pop(),Hh.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 vt(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={},zh={};function st(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 at(e,t){if(!zh[e]){zh[e]=!0;try{t()}catch(r){M&&T.error(`Error while instrumenting ${e}`,r)}}}function Ue(e,t){let r=e&&Es[e];if(r)for(let n of r)try{n(t)}catch(o){M&&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";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(`
|
|
11
|
+
Name: ${vt(n)}
|
|
12
|
+
Error:`,o)}}var zd=null;function Ts(e){let t="error";st(t,e),at(t,jk)}function jk(){zd=U.onerror,U.onerror=function(e,t,r,n,o){return Ue("error",{column:n,error:o,line:r,msg:e,url:t}),zd?zd.apply(this,arguments):!1},U.onerror.__SENTRY_INSTRUMENTED__=!0}var $d=null;function bs(e){let t="unhandledrejection";st(t,e),at(t,Gk)}function Gk(){$d=U.onunhandledrejection,U.onunhandledrejection=function(e){return Ue("unhandledrejection",e),$d?$d.apply(this,arguments):!0},U.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var $h=Object.prototype.toString;function Qt(e){switch($h.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Er(e,Error)}}function ti(e,t){return $h.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 lt(e){return ti(e,"String")}function xn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Rt(e){return e===null||xn(e)||typeof e!="object"&&typeof e!="function"}function er(e){return ti(e,"Object")}function Rn(e){return typeof Event<"u"&&Er(e,Event)}function Al(e){return ti(e,"RegExp")}function _r(e){return!!(e?.then&&typeof e.then=="function")}function Er(e,t){try{return e instanceof t}catch{return!1}}function ws(e){return typeof Request<"u"&&Er(e,Request)}function Ae(e,t,r){if(!(t in e))return;let n=e[t];if(typeof n!="function")return;let o=r(n);typeof o=="function"&&Is(o,n);try{e[t]=o}catch{M&&T.log(`Failed to replace method "${t}" in object`,e)}}function ye(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{M&&T.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Is(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,ye(e,"__sentry_original__",t)}catch{}}function Cn(e){return e.__sentry_original__}function xs(e){if(Qt(e))return{message:e.message,name:e.name,stack:e.stack,...Wh(e)};if(Rn(e)){let{type:t,target:r,currentTarget:n,detail:o}=e;return{type:t,target:r,currentTarget:n,...o?{detail:o}:{},...Wh(e)}}return e}function Wh(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 go(e){if(ni!==void 0)return ni?ni(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=U;return t in r&&typeof r[t]=="function"?(ni=r[t],ni(e)):(ni=null,e())}function tr(){return go(()=>Math.random())}function ho(){return go(()=>Date.now())}var Vk=Symbol.for("sentry.skipNormalization"),Yk=Symbol.for("sentry.overrideNormalizationDepth");function jh(e){return!!e[Vk]}function Gh(e){let t=e[Yk];return typeof t=="number"?t:void 0}var Wd;function oi(e){Wd=e}function ct(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=ct(e,t);return Xk(n)>r?Rs(e,t-1,r):n}function jd(e,t,r=1/0,n=1/0,o=Jk()){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(jh(t))return t;let l=Gh(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 jd("",h,c-1,n,o)}catch{}let d=Array.isArray(t)?[]:{},p=0,f=xs(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]=jd(h,y,c-1,n,o),p++}return s(t),d}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: ${vt(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${qk(t)}]`}catch(r){return`**non-serializable** (${r})`}}function qk(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Kk(e){return~-encodeURI(e).split(/%..|./).length}function Xk(e){return Kk(JSON.stringify(e))}function Jk(){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 So(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];Rt(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 Nn(e,t,r=!1){return lt(e)?Al(t)?t.test(e):lt(t)?r?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Ze(e,t=[],r=!1){for(let n of t)if(Nn(e,n,r))return!0;return!1}function Zk(){let e=U;return e.crypto||e.msCrypto}var Vd;function Qk(){return tr()*16}function Me(e=Zk()){try{if(e?.randomUUID)return go(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Vd||(Vd="10000000100040008000"+1e11),Vd.replace(/[018]/g,t=>(t^(Qk()&15)>>t/4).toString(16))}function Vh(e){return e.exception?.values?.[0]}function Tr(e){let{message:t,event_id:r}=e;if(t)return t;let n=Vh(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function vo(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 rr(e,t){let r=Vh(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{ye(e,"__sentry_captured__",!0)}catch{}return!1}function Yd(e){try{return e.__sentry_captured__}catch{}}var qh=1e3;function Ct(){return ho()/qh}function ew(){let{performance:e}=U;if(!e?.now||!e.timeOrigin)return Ct;let t=e.timeOrigin;return()=>(t+go(()=>e.now()))/qh}var Yh;function ae(){return(Yh??(Yh=ew()))()}var qd=null;function tw(){let{performance:e}=U;if(!e?.now)return;let t=3e5,r=go(()=>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 me(){return qd===null&&(qd=tw()),qd}function Kh(e){let t=ae(),r={sid:Me(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>rw(r)};return e&&Qr(r,e),r}function Qr(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||ae(),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:Me()),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 Xh(e,t){let r={};t?r={status:t}:e.status==="ok"&&(r={status:"exited"}),Qr(e,r)}function rw(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 An(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]=An(n[o],t[o],r-1));return n}function yt(){return Me()}function ut(){return Me().substring(16)}function Ll(e){try{let t=U.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 Mn(e,t){t?ye(e,Kd,Ll(t)):delete e[Kd]}function yo(e){return Ol(e[Kd])}var nw=100,Nt=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:yt(),sampleRand:tr()}}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,Mn(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&&Qr(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():er(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,Mn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:yt(),sampleRand:tr()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){let n=typeof r=="number"?r:nw;if(n<=0)return this;let o={timestamp:Ct(),...t,message:t.message?So(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=An(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){let n=r?.event_id||Me();if(!this._client)return M&&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||Me();if(!this._client)return M&&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||Me();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(M&&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 Jh(){return yr("defaultCurrentScope",()=>new Nt)}function Zh(){return yr("defaultIsolationScope",()=>new Nt)}var Qh=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 Qh(n)&&Qh(e)?n:ow(e,n)},ow=(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 Nt;let o;r?o=r:o=new Nt,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 _r(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=Ht(),t=fo(e);return t.stack=t.stack||new Xd(Jh(),Zh())}function iw(e){return ii().withScope(e)}function sw(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:iw,withSetScope:sw,withSetIsolationScope:(e,t)=>rS(t),getCurrentScope:()=>ii().getScope(),getIsolationScope:()=>ii().getIsolationScope()}}function Br(e){let t=fo(e);return t.acs?t.acs:nS()}function aw(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function lw(e,t){let{value:r,unit:n}=aw(e)?e:{value:e,unit:void 0},o=cw(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=lw(o,t);i&&(r[n]=i)}return r}function cw(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 H(){let e=Ht();return Br(e).getCurrentScope()}function be(){let e=Ht();return Br(e).getIsolationScope()}function As(){return yr("globalScope",()=>new Nt)}function nr(...e){let t=Ht(),r=Br(t);if(e.length===2){let[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function D(){return H().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||ut()};return o&&(s.parent_span_id=o),s}var $e="sentry.source",en="sentry.sample_rate",si="sentry.previous_trace_sample_rate",_e="sentry.op",ee="sentry.origin",tn="sentry.idle_span_finish_reason",br="sentry.measurement_unit",kr="sentry.measurement_value";var ai="sentry.custom_span_name",_o="sentry.profile_id",dt="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&&(ye(e,sS,Ll(r)),ye(e,iS,t))}function Eo(e){let t=e;return{scope:t[iS],isolationScope:Ol(t[sS])}}var Ms="sentry-";var uw=8192;function Fl(e){let t=dw(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 pw(t)}function dw(e){if(!(!e||!lt(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 pw(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>uw?(M&&T.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}var fw=/^o(\d+)\./,mw=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function gw(e){return e==="http"||e==="https"}function zt(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 hw(e){let t=mw.exec(e);if(!t){Je(()=>{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 Sw(e){if(!M)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+$/)?gw(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 vw(e){return e.match(fw)?.[1]}function uS(e){let t=e.getOptions(),{host:r}=e.getDsn()||{},n;return t.orgId?n=String(t.orgId):r&&(n=vw(r)),n}function Hl(e){let t=typeof e=="string"?hw(e):cS(e);if(!(!t||!Sw(t)))return t}function $t(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:yt(),sampleRand:tr()};let o=yw(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=yt(),t=ut(),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function Os(e=yt(),t=ut(),r){return`00-${e}-${t}-${r?"01":"00"}`}function yw(e,t){let r=$t(t?.sample_rand);if(r!==void 0)return r;let n=$t(t?.sample_rate);return n&&e?.parentSampled!==void 0?e.parentSampled?tr()*n:n+tr()*(1-n):tr()}var $l=0,Ds=1,pS=!1;function gS(e){let{spanId:t,traceId:r}=e.spanContext(),{data:n,op:o,parent_span_id:i,status:s,origin:a,links:l}=$(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:$(e).parent_span_id,i=Eo(e).scope,s=n?i?.getPropagationContext().propagationSpanId||ut():t;return{parent_span_id:o,span_id:s,trace_id:r}}function Us(e){let{traceId:t,spanId:r}=e.spanContext(),n=Mt(e);return Ls(t,r,n)}function hS(e){let{traceId:t,spanId:r}=e.spanContext(),n=Mt(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 At(e){return typeof e=="number"?fS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?fS(e.getTime()):ae()}function fS(e){return e>9999999999?e/1e3:e}function $(e){if(_S(e))return e.getSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(yS(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:At(o),timestamp:At(s)||void 0,status:Hs(a),op:n[_e],origin:n[ee],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(yS(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:At(o),end_timestamp:At(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 vS(e){return{...e,attributes:Jd(e.attributes),links:e.links?.map(t=>({...t,attributes:Jd(t.attributes)}))}}function yS(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _S(e){return typeof e.getSpanJSON=="function"}function Mt(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 To="_sentryChildSpans",rp="_sentryRootSpan";function zs(e,t){let r=e[rp]||e;ye(t,rp,r),e[To]?e[To].add(t):ye(e,To,new Set([t]))}function ES(e,t){e[To]&&e[To].delete(t)}function rn(e){let t=new Set;function r(n){if(!t.has(n)&&Mt(n)){t.add(n);let o=n[To]?Array.from(n[To]):[];for(let i of o)r(i)}}return r(e),Array.from(t)}var ie=Ps;function Ps(e){return e[rp]||e}function le(){let e=Ht(),t=Br(e);return t.getActiveSpan?t.getActiveSpan():yo(H())}function $s(){pS||(Je(()=>{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=le(),r=t&&ie(t);if(r){let n="internal_error";M&&T.log(`[Tracing] Root span: ${n} -> Global error occurred`),r.setStatus({code:2,message:n})}}TS=!0,Ts(e),bs(e)}function We(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||D()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function bS(e){T.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function nn(e,t){if(!t?.length)return!1;for(let r of t){if(Ew(r)){if(e.description&&Nn(e.description,r))return M&&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&&Nn(e.description,r.name):!0,i=r.op?e.op&&Nn(e.op,r.op):!0,s=r.attributes?Object.entries(r.attributes).every(([a,l])=>_w(e.attributes?.[a],l)):!0;if(o&&i&&s)return M&&bS(e),!0}return!1}function _w(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Nn(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 Ew(e){return typeof e=="string"||e instanceof RegExp}var ci="production";var wS="_frozenDsc";function ui(e,t){ye(e,wS,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 Be(e){let t=D();if(!t)return{};let r=ie(e),n=$(r),o=n.data,i=r.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[en]??o[si];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let l=r[wS];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[$e]??o["sentry.span.source"],f=n.description;return p!=="url"&&f&&(d.transaction=f),We()&&(d.sampled=String(Mt(r)),d.sample_rand=i?.get("sentry.sample_rand")??Eo(r).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,r),d}var Qe=class{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||ut(),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 _t(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=fo(U);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(ct(a))}o(l)}}return typeof n=="string"?n:Tw(n)}function Tw(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 IS={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 bw(e){return e in IS}function ql(e){return bw(e)?IS[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:zt(n)},...o&&{trace:o}}}function kw(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:zt(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return _t(i,[s])}function RS(e,t,r,n){let o=pi(r),i=e.type&&e.type!=="replay_event"?e.type:"event";kw(e,r?.sdk);let s=js(e,o,n,t);return delete e.sdkProcessingMetadata,_t(s,[[{type:i},e]])}function CS(e,t){function r(f){return!!f.trace_id&&!!f.public_key}let n=Be(e[0]),o=t?.getDsn(),i=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...r(n)&&{trace:n},...!!i&&o&&{dsn:zt(o)}},{beforeSendSpan:a,ignoreSpans:l}=t?.getOptions()||{},c=l?.length?e.filter(f=>{let h=$(f);return!nn({description:h.description,op:h.op,attributes:h.data},l)}):e,u=e.length-c.length;u&&t?.recordDroppedEvent("before_send","span",u);let d=a?f=>{let h=$(f),y=Vl(a)?h:a(h);return y||($s(),h)}:$,p=[];for(let f of c){let h=d(f);h&&p.push(cp(h))}return _t(s,p)}function NS(e){if(!M)return;let{description:t="< unknown name >",op:r="< unknown op >",parent_span_id:n}=$(e),{spanId:o}=e.spanContext(),i=Mt(e),s=ie(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:u,description:d}=$(s);c.push(`root ID: ${s.spanContext().spanId}`),u&&c.push(`root op: ${u}`),d&&c.push(`root description: ${d}`)}T.log(`${l}
|
|
15
15
|
${c.join(`
|
|
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===
|
|
18
|
-
Event: ${
|
|
19
|
-
Event: ${
|
|
20
|
-
Event: ${
|
|
21
|
-
Event: ${
|
|
22
|
-
Url: ${ic(e)}`),!0;if(!
|
|
23
|
-
Event: ${
|
|
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.
|
|
16
|
+
`)}`)}function AS(e){if(!M)return;let{description:t="< unknown name >",op:r="< unknown op >"}=$(e),{spanId:n}=e.spanContext(),i=ie(e)===e,s=`[Tracing] Finishing "${r}" ${i?"root ":""}span "${t}" with ID ${n}`;T.log(s)}function Kl(e,t,r,n=le()){let o=n&&ie(n);o&&(M&&T.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),o.addEvent(e,{[kr]:t,[br]:r}))}function Xl(e){if(!e||e.length===0)return;let t={};return e.forEach(r=>{let n=r.attributes||{},o=n[br],i=n[kr];typeof o=="string"&&typeof i=="number"&&(t[r.name]={value:i,unit:o})}),t}function et(e){return e.getOptions().traceLifecycle==="stream"}var MS=1e3,Ln=class{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||ut(),this._startTime=t.startTimestamp||ae(),this._links=t.links,this._attributes={},this.setAttributes({[ee]:"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=At(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute($e,"custom"),this}end(t){this._endTime||(this._endTime=At(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[ee],profile_id:this._attributes[_o],exclusive_time:this._attributes[dt],measurements:Xl(this._events),is_segment:this._isStandaloneSpan&&ie(this)===this||void 0,segment_id:this._isStandaloneSpan?ie(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===ie(this),status:ip(this._status),attributes:this._attributes,links:op(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,r,n){M&&T.log("[Tracing] Adding an event to span:",t);let o=LS(r)?r:n||ae(),i=LS(r)?{}:r||{},s={name:t,time:At(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=D();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===ie(this)))return;if(this._isStandaloneSpan){this._sampled?Iw(CS([this],t)):(M&&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&&et(t)){t.emit("afterSegmentSpanEnd",this);return}let n=this._convertSpanToTransaction();n&&(Eo(this).scope||H()).captureEvent(n)}_convertSpanToTransaction(){if(!OS($(this)))return;this._name||(M&&T.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:r}=Eo(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=rn(this).filter(d=>d!==this&&!ww(d)).map(d=>$(d)).filter(OS),s=this._attributes[$e];delete this._attributes[ai];let a=!1;i.forEach(d=>{delete d.data[ai],d.op?.startsWith("gen_ai.")&&(a=!0)});let l={contexts:{trace:gS(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:Be(this),hasGenAiSpans:a},request:n,...s&&{transaction_info:{source:s}}},c=Xl(this._events);return c&&Object.keys(c).length&&(M&&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 ww(e){return e instanceof Ln&&e.isStandaloneSpan()}function Iw(e){let t=D();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(!We(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=$t(o);if(i===void 0)return M&&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 M&&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||M&&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 Ve(e){let t=US();if(t.startInactiveSpan)return t.startInactiveSpan(e);let r=Rw(e),{forceTransaction:n,parentSpan:o}=e;return(e.scope?s=>nr(e.scope,s):o!==void 0?s=>fi(o,s):s=>s())(()=>{let s=H(),a=Nw(s,o),l=D();return e.onlyIfParent&&!a?(l?.recordDroppedEvent("no_parent_span","span"),new Qe):xw({parentSpan:a,spanArguments:r,forceTransaction:n,scope:s})})}function fi(e,t){let r=US();return r.withActiveSpan?r.withActiveSpan(e,t):nr(n=>(Mn(n,e||void 0),t(n)))}function xw({parentSpan:e,spanArguments:t,forceTransaction:r,scope:n}){if(!We()){let a=new Qe;if(r||!e){let l={sampled:"false",sample_rate:"0",transaction:t.name,...Be(a)};ui(a,l)}return a}let o=D();if(Aw(o,t))return pp(n)||o?.recordDroppedEvent("ignored","span"),new Qe({dropReason:"ignored",traceId:e?.spanContext().traceId??n.getPropagationContext().traceId});let i=be(),s;if(e&&!r)s=Cw(e,n,t),zs(e,s);else if(e){let a=Be(e),{traceId:l,spanId:c}=e.spanContext(),u=Mt(e);s=DS({traceId:l,parentSpanId:c,...t},n,u),ui(s,a)}else{let{traceId:a,dsc:l,parentSpanId:c,sampled:u}={...i.getPropagationContext(),...n.getPropagationContext()};s=DS({traceId:a,parentSpanId:c,...t},n,u),l&&ui(s,l)}return NS(s),aS(s,n,i),s}function Rw(e){let r={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...r};return n.startTimestamp=At(e.startTime),delete n.startTime,n}return r}function US(){let e=Ht();return Br(e)}function DS(e,t,r){let n=D(),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]:PS(o,{name:i,parentSampled:a,attributes:l,parentSampleRate:$t(c.dsc?.sample_rate)},c.sampleRand),h=new Ln({...e,attributes:{[$e]:"custom",[en]:p!==void 0&&f?p:void 0,...l},sampled:d});return!d&&n&&!u&&(M&&T.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),n.recordDroppedEvent("sample_rate",et(n)?"span":"transaction")),n&&n.emit("spanStart",h),h}function Cw(e,t,r){let{spanId:n,traceId:o}=e.spanContext(),i=pp(t),s=i?!1:Mt(e),a=s?new Ln({...r,parentSpanId:n,traceId:o,sampled:s}):new Qe({traceId:o});zs(e,a);let l=D();return l&&(et(l)&&a instanceof Qe&&(e instanceof Qe&&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 Nw(e,t){if(t)return t;if(t===null)return;let r=yo(e);if(!r)return;let n=D();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ie(r):r}function Aw(e,t){let r=e?.getOptions().ignoreSpans;return!e||!et(e)||!r?.length?!1:nn({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},Mw="heartbeatFailed",Lw="idleTimeout",Ow="finalTimeout",Pw="externalFinish";function Jl(e,t={}){let r=new Map,n=!1,o,i=Pw,s=!t.disableAutoFinish,a=[],{idleTimeout:l=mi.idleTimeout,finalTimeout:c=mi.finalTimeout,childSpanTimeout:u=mi.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,f=D();if(!f||!We()){let _=new Qe,w={sample_rate:"0",sampled:"false",...Be(_)};return ui(_,w),_}let h=H(),y=le(),k=Dw(e);k.end=new Proxy(k.end,{apply(_,w,z){if(d&&d(k),w instanceof Qe)return;let[I,...P]=z,W=I||ae(),K=At(W),V=rn(k).filter(x=>x!==k),Pe=$(k);if(!V.length||!p)return R(K),Reflect.apply(_,w,[K,...P]);let ue=f.getOptions().ignoreSpans,fe=V?.reduce((x,A)=>{let oe=$(A);return!oe.timestamp||ue&&nn({description:oe.description,op:oe.op,attributes:oe.data},ue)?x:x?Math.max(x,oe.timestamp):oe.timestamp},void 0),L=Pe.start_timestamp,b=Math.min(L?L+c/1e3:1/0,Math.max(L||-1/0,Math.min(K,fe||1/0)));return R(b),Reflect.apply(_,w,[b,...P])}});function g(){o&&(clearTimeout(o),o=void 0)}function S(_){g(),o=setTimeout(()=>{!n&&r.size===0&&s&&(i=Lw,k.end(_))},l)}function v(_){o=setTimeout(()=>{!n&&s&&(i=Mw,k.end(_))},u)}function E(_){g(),r.set(_,!0);let w=ae();v(w+u/1e3)}function C(_){if(r.has(_)&&r.delete(_),r.size===0){let w=ae();S(w+l/1e3)}}function R(_){n=!0,r.clear(),a.forEach(V=>V()),Mn(h,y);let w=$(k),{start_timestamp:z}=w;if(!z)return;w.data[tn]||k.setAttribute(tn,i);let P=w.status;(!P||P==="unknown")&&k.setStatus({code:1}),T.log(`[Tracing] Idle span "${w.op}" finished`);let W=rn(k).filter(V=>V!==k),K=0;W.forEach(V=>{V.isRecording()&&(V.setStatus({code:2,message:"cancelled"}),V.end(_),M&&T.log("[Tracing] Cancelling span since span ended early",JSON.stringify(V,void 0,2)));let Pe=$(V),{timestamp:ue=0,start_timestamp:fe=0}=Pe,L=fe<=_,b=(c+l)/1e3,x=ue-fe<=b;if(M){let A=JSON.stringify(V,void 0,2);L?x||T.log("[Tracing] Discarding span since it finished after idle span final timeout",A):T.log("[Tracing] Discarding span since it happened after idle span was finished",A)}(!x||!L)&&(ES(k,V),K++)}),K>0&&k.setAttribute("sentry.idle_span_discarded_spans",K)}return a.push(f.on("spanStart",_=>{if(n||_===k||$(_).timestamp||_ instanceof Ln&&_.isStandaloneSpan())return;rn(k).includes(_)&&E(_.spanContext().spanId)})),a.push(f.on("spanEnd",_=>{n||C(_.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",_=>{_===k&&(s=!0,S(),r.size&&v())})),t.disableAutoFinish||S(),setTimeout(()=>{n||(k.setStatus({code:2,message:"deadline_exceeded"}),i=Ow,k.end())},c),k}function Dw(e){let t=Ve(e);return Mn(H(),t),M&&T.log("[Tracing] Started span is an idle span"),t}function FS(e,t){let{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;Uw(e,t),n&&Hw(e,n),zw(e,r),Bw(e,o),Fw(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=An(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]=An(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 Uw(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 Bw(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Fw(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Hw(e,t){e.contexts={trace:Wl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Be(t),...e.sdkProcessingMetadata};let r=ie(t),n=$(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function zw(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 $w="thismessage:/";function ko(e){return"isRelative"in e}function Fr(e,t){let r=e.indexOf("://")<=0&&e.indexOf("//")!==0,n=t??(r?$w: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 gi(e){if(ko(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 or(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 pt(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 On(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 Hr(e){return new Vs(t=>{t(e)})}function wo(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(_r(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 _r(o)?o:Hr(o)}catch(o){return wo(o)}}function mp(e,t,r,n){let o=r[n];if(!e||!o)return e;let i=o({...e},t);return M&&i===null&&T.log(`Event processor "${o.id||"?"}" dropped event`),_r(i)?i.then(s=>mp(s,t,r,n+1)):mp(i,t,r,n+1)}var Io,WS,jS,Pn;function GS(e){let t=U._sentryDebugIds,r=U._debugIds;if(!t&&!r)return{};let n=t?Object.keys(t):[],o=r?Object.keys(r):[];if(Pn&&n.length===WS&&o.length===jS)return Pn;WS=n.length,jS=o.length,Pn={},Io||(Io={});let i=(s,a)=>{for(let l of s){let c=a[l],u=Io?.[l];if(u&&Pn&&c)Pn[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&&Pn&&Io){Pn[h]=c,Io[l]=[h,c];break}}}}};return t&&i(n,t),r&&i(o,r),Pn}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||Me(),timestamp:t.timestamp||Ct()},c=r.integrations||e.integrations.map(g=>g.name);Ww(l,e),Vw(l,c),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&jw(l,e.stackParser);let u=qw(n,r.captureContext);r.mechanism&&rr(l,r.mechanism);let d=o?o.getEventProcessors():[],p=Zl(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?Hr(l):$S(h,l,r)).then(g=>(g&&Gw(g),typeof s=="number"&&s>0?Yw(g,s,a):g))}function Ww(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=So(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=So(a.value,i))})}function jw(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 Gw(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 Vw(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Yw(e,t,r){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))},...e.user&&{user:ct(e.user,t,r)},...e.contexts&&{contexts:ct(e.contexts,t,r)},...e.extra&&{extra:ct(e.extra,t,r)}};return e.contexts?.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=ct(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))),e.contexts?.flags&&n.contexts&&(n.contexts.flags=ct(e.contexts.flags,3,r)),n}function qw(e,t){if(!t)return e;let r=e?e.clone():new Nt;return r.update(t),r}function VS(e){if(e)return Kw(e)?{captureContext:e}:Jw(e)?{captureContext:e}:e}function Kw(e){return e instanceof Nt||typeof e=="function"}var Xw=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jw(e){return Object.keys(e).some(t=>Xw.includes(t))}function on(e,t){return H().captureException(e,VS(t))}function hi(e,t){return H().captureEvent(e,t)}function xo(e,t){be().setContext(e,t)}function qs(){return be().lastEventId()}function Ks(){let e=D();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Xs(e){be().addEventProcessor(e)}function Si(e){let t=be(),{user:r}=Zl(t,H()),{userAgent:n}=U.navigator||{},o=Kh({user:r,...n&&{userAgent:n},...e}),i=t.getSession();return i?.status==="ok"&&Qr(i,{status:"exited"}),Js(),t.setSession(o),o}function Js(){let e=be(),r=H().getSession()||e.getSession();r&&Xh(r),YS(),e.setSession()}function YS(){let e=be(),t=D(),r=e.getSession();r&&t&&t.captureSession(r)}function Ro(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 Zw(e){return`${KS(e)}${e.projectId}/envelope/`}function Qw(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 hp(e,t,r){return t||`${Zw(e)}?${Qw(e,r)}`}function Sp(e,t){let r=Hl(e);if(!r)return"";let n=`${KS(r)}embed/error-page/`,o=`dsn=${zt(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 vp=[];function eI(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 yp(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 eI(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]){M&&T.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!vp.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),vp.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))}),M&&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 ir(){return typeof window<"u"&&(!JS()||tI())}function tI(){return U.process?.type==="renderer"}function rI(e,t){let r=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ir()&&{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=zt(n)),_t(i,[rI(e,o)])}function vi(e,t){let r=t??nI(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 nI(e){return QS().get(e)}function QS(){return yr("clientToLogBufferMap",()=>new WeakMap)}function oI(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,...ir()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function ev(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=zt(n)),_t(i,[oI(e,o)])}function Zs(e,t){let r=t??iI(e)??[];if(r.length===0)return;let n=e.getOptions(),o=ev(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);tv().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function iI(e){return tv().get(e)}function tv(){return yr("clientToMetricBufferMap",()=>new WeakMap)}function rv(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 vS(t)}function nv(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||et(t))return;let r=[],n=[];for(let i of e.spans)i.op?.startsWith("gen_ai.")?r.push(rv(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,...ir()&&{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 Co(e=100){let t=new Set;function r(){return t.size<e}function n(s){t.delete(s)}function o(s){if(!r())return wo(yi);let a=s();return t.add(a),a.then(()=>n(a),()=>n(a)),a}function i(s){if(!t.size)return Hr(!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 ov=60*1e3;function iv(e,t=ho()){let r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${e}`);return isNaN(n)?ov:n-t}function sv(e,t){return e[t]||e.all||0}function Qs(e,t,r=ho()){return sv(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,,,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+iv(s,n):t===429&&(o.all=n+60*1e3);return o}var kp=64;function tc(e,t,r=Co(e.bufferSize||kp)){let n={},o=s=>r.drain(s);function i(s){let a=[];if(Ws(s,(d,p)=>{let f=ql(p);Qs(n,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(d)}),a.length===0)return Promise.resolve({});let l=_t(s[0],a),c=d=>{if(ap(l,["client_report"])){M&&T.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}Ws(l,(p,f)=>{e.recordDroppedEvent(d,ql(f))})},u=()=>t({body:lp(l)}).then(d=>d.statusCode===413?(M&&T.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),d):(M&&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"),M&&T.error("Encountered error running transport request:",d),d});return r.add(u).then(d=>d,d=>{if(d===yi)return M&&T.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function av(e,t,r){let n=[{type:"client_report"},{timestamp:r||Ct(),discarded_events:e}];return _t(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 lv(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?.[_o],exclusive_time:s?.[dt],measurements:e.measurements,is_segment:!0}}function cv(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&&{[_o]:e.profile_id},...e.exclusive_time&&{[dt]:e.exclusive_time}}}},measurements:e.measurements}}var ta=["forwarded","-ip","remote-","via","-user"];function uv(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 sI={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function dv(e){let t=e.dataCollection!=null?sI:uv(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 pv="Not capturing exception because it's already been captured.",fv="Discarded session because of missing or non-string release",yv=Symbol.for("SentryInternalError"),_v=Symbol.for("SentryDoNotSendEventError"),aI=5e3;function nc(e){return{message:e,[yv]:!0}}function wp(e){return{message:e,[_v]:!0}}function mv(e){return!!e&&typeof e=="object"&&yv in e}function gv(e){return!!e&&typeof e=="object"&&_v in e}function hv(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??aI;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=Co(t.transportOptions?.bufferSize??kp),this._dataCollection=dv(t),t.dsn?this._dsn=Hl(t.dsn):M&&T.warn("No DSN provided, client will not send events."),this._dsn){let n=hp(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&&hv(this,"afterCaptureLog","flushLogs",dI,vi),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&hv(this,"afterCaptureMetric","flushMetrics",uI,Zs)}captureException(t,r,n){let o=Me();if(Ns(t))return M&&T.log(pv),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:Me(),...n},s=xn(t)?t:String(t),a=Rt(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=Me();if(r?.originalException&&Ns(r.originalException))return M&&T.log(pv),o;let i={event_id:o,...r},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,l=s.capturedSpanIsolationScope,c=Sv(t.type);return this._process(()=>this._captureEvent(t,i,a||n,l),c),i.event_id}captureSession(t){this.sendSession(t),Qr(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){vi(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=nv(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){M&&T.warn(fv);return}i.release=i.release||r,i.environment=i.environment||n,t.attrs=i}else{if(!t.release&&!r){M&&T.warn(fv);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}`;M&&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 M&&T.error("Error while sending envelope:",r),{}}return M&&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)&&(Qr(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=H(),o=be()){return M&&Ip(t)&&T.log(`Captured error event \`${rc(t)[0]||"<unknown>"}\``),this._processEvent(t,r,n,o).then(i=>i.event_id,i=>{M&&(gv(i)?T.log(i.message):mv(i)?T.warn(i.message):T.warn(i))})}_processEvent(t,r,n,o){let i=this.getOptions(),{sampleRate:s}=i,a=Ev(t),l=Ip(t),u=`before send for type \`${t.type||"error"}\``,d=typeof s>"u"?void 0:$t(s);if(l&&typeof d=="number"&&tr()>d)return this.recordDroppedEvent("sample_rate","error"),wo(wp(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let p=Sv(t.type);return this._prepareEvent(t,r,n,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),wp("An event processor returned `null`, will not send event.");if(r.data?.__sentry__===!0)return f;let y=cI(this,i,f,r);return lI(y,u)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){let g=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",g)}throw wp(`${u} returned \`null\`, will not send event.`)}let h=n.getSession()||o.getSession();if(l&&h&&this._updateSessionFromEvent(h,f),a){let k=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,g=f.spans?f.spans.length:0,S=k-g;S>0&&this.recordDroppedEvent("before_send","span",S)}let y=f.transaction_info;if(a&&y&&f.transaction!==t.transaction){let k="custom";f.transaction_info={...y,source:k}}return this.sendEvent(f,r),f}).then(null,f=>{throw gv(f)||mv(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===yi&&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(){M&&T.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){M&&T.log("No outcomes to send");return}if(!this._dsn){M&&T.log("No dsn provided, will not send outcomes");return}M&&T.log("Sending outcomes:",t);let r=av(t,this._options.tunnel&&zt(this._dsn));this.sendEnvelope(r)}};function Sv(e){return e==="replay_event"?"replay":e||"error"}function lI(e,t){let r=`${t} must return \`null\` or a valid event.`;if(_r(e))return e.then(n=>{if(!er(n)&&n!==null)throw nc(r);return n},n=>{throw nc(`${t} rejected with ${n}`)});if(!er(e)&&e!==null)throw nc(r);return e}function cI(e,t,r,n){let{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,a=!Vl(t.beforeSendSpan)&&t.beforeSendSpan,l=r;if(Ip(l)&&o)return o(l,n);if(Ev(l)){if(a||s){let c=lv(l);if(s?.length&&nn({description:c.description,op:c.op,attributes:c.data},s))return null;if(a){let u=a(c);u?l=An(r,cv(u)):$s()}if(l.spans){let u=[],d=l.spans;for(let f of d){if(s?.length&&nn({description:f.description,op:f.op,attributes:f.data},s)){kS(d,f);continue}if(a){let h=a(f);h?u.push(h):($s(),u.push(f))}else u.push(f)}let p=l.spans.length-u.length;p&&e.recordDroppedEvent("before_send","span",p),l.spans=u}}if(i){if(l.spans){let c=l.spans.length;l.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return i(l,n)}}return l}function Ip(e){return e.type===void 0}function Ev(e){return e.type==="transaction"}function uI(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Tv(e.attributes)}function dI(e){let t=0;return e.message&&(t+=e.message.length*2),t+Tv(e.attributes)}function Tv(e){if(!e)return 0;let t=0;return Object.values(e).forEach(r=>{Array.isArray(r)?t+=r.length*vv(r[0]):Rt(r)?t+=vv(r):t+=100}),t}function vv(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function xp(e,t){t.debug===!0&&(M?T.enable():Je(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),H().update(t.initialScope);let n=new e(t);return Rp(n),n.init(),n}function Rp(e){H().setClient(e)}function Cp(e,t){let r=t?.getDsn(),n=t?.getOptions().tunnel;return fI(e,r)||pI(e,n)}function pI(e,t){return t?bv(e)===bv(t):!1}function fI(e,t){let r=Fr(e);return!r||ko(r)||!t?!1:mI(r.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(r.search)}function mI(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function bv(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:Ur})),o.version=Ur)}function _i(e={}){let t=e.client||D();if(!Ks()||!t)return{};let r=Ht(),n=Br(r);if(n.getTraceData)return n.getTraceData(e);let o=e.scope||H(),i=e.span||le();if(!i&&Pl())return{};let s=i?Us(i):gI(o),a=i?Be(i):di(t,o),l=ep(a);if(!zl.test(s))return T.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let u={"sentry-trace":s,baggage:l};return e.propagateTraceparent&&(u.traceparent=i?hS(i):hI(o)),u}function gI(e){let{traceId:t,sampled:r,propagationSpanId:n}=e.getPropagationContext();return Ls(t,n,r)}function hI(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 u(){return o!==void 0||i!==void 0?l():n}function d(){return o&&clearTimeout(o),o=a(l,t),s&&i===void 0&&(i=a(l,s)),n}return d.cancel=c,d.flush=u,d}var SI=100;function Wt(e,t){let r=D(),n=be();if(!r)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=SI}=r.getOptions();if(i<=0)return;let a={timestamp:Ct(),...e},l=o?Je(()=>o(a,t)):a;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,i))}var kv,vI="FunctionToString",wv=new WeakMap,yI=(()=>({name:vI,setupOnce(){kv=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Cn(this),r=wv.has(D())&&t!==void 0?t:this;return kv.apply(r,e)}}catch{}},setup(e){wv.set(e,!0)}})),oc=yI;var _I=[/^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$/],EI="EventFilters",Mp=(e={})=>{let t;return{name:EI,setup(r){let n=r.getOptions();t=Iv(e,n)},processEvent(r,n,o){if(!t){let i=o.getOptions();t=Iv(e,i)}return TI(r,t)?null:r}}},sc=((e={})=>({...Mp(e),name:"InboundFilters"}));function Iv(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:_I],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function TI(e,t){if(e.type){if(e.type==="transaction"&&kI(e,t.ignoreTransactions))return M&&T.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
18
|
+
Event: ${Tr(e)}`),!0}else{if(bI(e,t.ignoreErrors))return M&&T.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
19
|
+
Event: ${Tr(e)}`),!0;if(RI(e))return M&&T.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
20
|
+
Event: ${Tr(e)}`),!0;if(wI(e,t.denyUrls))return M&&T.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
21
|
+
Event: ${Tr(e)}.
|
|
22
|
+
Url: ${ic(e)}`),!0;if(!II(e,t.allowUrls))return M&&T.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
23
|
+
Event: ${Tr(e)}.
|
|
24
|
+
Url: ${ic(e)}`),!0}return!1}function bI(e,t){return t?.length?rc(e).some(r=>Ze(r,t)):!1}function kI(e,t){if(!t?.length)return!1;let r=e.transaction;return r?Ze(r,t):!1}function wI(e,t){if(!t?.length)return!1;let r=ic(e);return r?Ze(r,t):!1}function II(e,t){if(!t?.length)return!0;let r=ic(e);return r?Ze(r,t):!0}function xI(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?xI(r):null}catch{return M&&T.error(`Cannot extract url for event ${Tr(e)}`),null}}function RI(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||!Er(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(Er(n[o],Error)){xv(s,a,n);let c=e(t,n[o]),u=l.length;Rv(c,o,u,a),l=Lp(e,t,r,n[o],o,[c,...l],c,u)}return Cv(n)&&n.errors.forEach((c,u)=>{if(Er(c,Error)){xv(s,a,n);let d=e(t,c),p=l.length;Rv(d,`errors[${u}]`,p,a),l=Lp(e,t,r,c,o,[d,...l],d,p)}}),l}function Cv(e){return Array.isArray(e.errors)}function xv(e,t,r){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Cv(r)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Rv(e,t,r,n){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function CI(e){return Qt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ac(e){return CI(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Nv=new Set([]);function Pp(e){let t="console",r=st(t,e);return at(t,NI),r}function NI(){"console"in U&&xl.forEach(function(e){e in U.console&&Ae(U.console,e,function(t){return mo[e]=t,function(...r){let n=r[0],o=mo[e],i=Nv.size&&typeof n=="string"&&Ze(n,Nv);i||Ue("console",{args:r,level:e}),(!i||M&&T.isEnabled())&&o?.apply(U.console,r)}})})}function Ei(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var AI="Dedupe",MI=(()=>{let e;return{name:AI,processEvent(t){if(t.type)return t;try{if(LI(t,e))return M&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),lc=MI;function LI(e,t){return t?!!(OI(e,t)||PI(e,t)):!1}function OI(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Lv(e,t)||!Mv(e,t))}function PI(e,t){let r=Av(t),n=Av(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Lv(e,t)||!Mv(e,t))}function Mv(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 Lv(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 Av(e){return e.exception?.values?.[0]}var DI="ConversationId",UI=(()=>({name:DI,setup(e){e.on("spanStart",t=>{let r=H().getScopeData(),n=be().getScopeData(),o=r.conversationId||n.conversationId;if(o){let{op:i,data:s,description:a}=$(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(Bl,o)}})}})),Dp=UI;function Up(e,t,r,n,o){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=We()&&t(s);if(e.endTimestamp){let h=e.fetchData.__span;if(!h)return;let y=n[h];y&&(a&&(FI(y,e),BI(y,e,o)),delete n[h]);return}let{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof o=="object"?o:{spanOrigin:o},u=D(),p=!!le()||!!u&&et(u),f=a&&p?Ve($I(s,i,l)):new Qe;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]||{}},k=Pv(h,y,We()&&p?f:void 0,c);k&&(e.args[1]=y,y.headers=k)}if(u){let h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",f,h)}return f}function BI(e,t,r){(typeof r=="object"&&r!==null?r.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Pv(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||(ws(e)?e.headers:void 0);if(l)if(HI(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(zI(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 FI(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 HI(e){return typeof Headers<"u"&&Er(e,Headers)}function zI(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function $I(e,t,r){if(e.startsWith("data:")){let i=pt(e);return{name:`${t} ${i}`,attributes:Ov(e,void 0,t,r)}}let n=Fr(e),o=n?gi(n):e;return{name:`${t} ${o}`,attributes:Ov(e,n,t,r)}}function Ov(e,t,r,n){let o={url:pt(e),type:"fetch","http.method":r,[ee]:n,[_e]:"http.client"};return t&&(ko(t)||(o["http.url"]=pt(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=U;function Bp(){return"history"in oa&&!!oa.history}function WI(){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(!WI())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){M&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Dn(e,t){let r="fetch",n=st(r,e);return at(r,()=>Uv(void 0,t)),n}function pc(e){let t="fetch-body-resolved",r=st(t,e);return at(t,()=>Uv(GI)),r}function Uv(e,t=!1){t&&!Fp()||Ae(U,"fetch",function(r){return function(...n){let o=new Error,{method:i,url:s}=VI(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:ae()*1e3,virtualError:o,headers:YI(n)};return e||Ue("fetch",{...a}),r.apply(U,n).then(async l=>(e?e(l):Ue("fetch",{...a,endTimestamp:ae()*1e3,response:l}),l),l=>{Ue("fetch",{...a,endTimestamp:ae()*1e3,error:l}),Qt(l)&&l.stack===void 0&&(l.stack=o.stack,ye(l,"framesToPop",1));let u=D()?.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})`:ye(l,"__sentry_fetch_url_host__",f)}catch{}throw l})}})}async function jI(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 GI(e){let t;try{t=e.clone()}catch{return}jI(t,()=>{Ue("fetch-body-resolved",{endTimestamp:ae()*1e3,response:e})})}function dc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Dv(e){return typeof e=="string"?e:e?dc(e,"url")?e.url:e.toString?e.toString():"":""}function VI(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[r,n]=e;return{url:Dv(r),method:dc(n,"method")?String(n.method).toUpperCase():ws(r)&&dc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Dv(t),method:dc(t,"method")?String(t.method).toUpperCase():"GET"}}function YI(e){let[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(ws(t))return new Headers(t.headers)}catch{}}var Bv=U;function Lt(){try{return Bv.document.location.href}catch{return""}}function Ti(e,t=5){if(!Bv.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 F=U,Hp=0;function zp(){return Hp>0}function xx(){Hp++,setTimeout(()=>{Hp--})}function No(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(Cn(e))return e}catch{return e}let n=function(...o){U._sentryWrappedDepth=(U._sentryWrappedDepth||0)+1;try{let i=o.map(s=>No(s,t));return e.apply(this,i)}catch(i){throw xx(),nr(s=>{s.addEventProcessor(a=>(t.mechanism&&(vo(a,void 0,void 0),rr(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),on(i)}),i}finally{U._sentryWrappedDepth=(U._sentryWrappedDepth||0)-1}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}Is(n,e),ye(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=Lt(),{referrer:t}=F.document||{},{userAgent:r}=F.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:Mx(t),value:Lx(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Rx(e,t,r,n){let i=D()?.getOptions().normalizeDepth,s=Dx(t),a={__serialized__:Rs(t,i)};if(s)return{exception:{values:[fc(e,s)]},extra:a};let l={exception:{values:[{type:Rn(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Ox(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=Nx(t),o=Ax(t);try{return e(r,n,o)}catch{}return[]}var Cx=/Minified React error #\d+;/i;function Nx(e){return e&&Cx.test(e.message)?1:0}function Ax(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function ry(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Mx(e){let t=e?.name;return!t&&ry(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Lx(e){let t=e?.message;return ry(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 ny(e,t,r,n){let o=r?.syntheticException||void 0,i=gc(e,t,o,n);return rr(i),i.level="error",r?.event_id&&(i.event_id=r.event_id),Hr(i)}function oy(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),Hr(s)}function gc(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},rr(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),vo(i,l)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Qt(t)?$p(e,t):er(t)||Rn(t)?(i=Rx(e,t,r,o),rr(i,{synthetic:!0}),i):(i=Wp(e,t,r,n),vo(i,`${t}`,void 0),rr(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}}]}),rr(o,{synthetic:!0})}if(xn(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 Ox(e,{isUnhandledRejection:t}){let r=Ml(e),n=t?"promise rejection":"exception";return ri(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Rn(e)?`Event \`${Px(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Px(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Dx(e){return Object.values(e).find(t=>t instanceof Error)}var hc=class extends ra{constructor(t){let r=Ux(t),n=F.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;F.document&&(i||s||c)&&F.document.addEventListener("visibilitychange",()=>{F.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&vi(this),c&&Zs(this))}),o&&this.on("beforeSendSession",Np)}eventFromException(t,r){return ny(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return oy(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 Ux(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:F.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Ye=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var B=U;var Bx=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",zr=(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=Bx(t.value,r),e(t)))}};var an=(e=!0)=>{let t=B.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var sr=()=>an()?.activationStart??0;function ar(e,t,r){B.document&&B.addEventListener(e,t,r)}function Ao(e,t,r){B.document&&B.removeEventListener(e,t,r)}var ki=-1,iy=new Set,Fx=()=>B.document?.visibilityState==="hidden"&&!B.document?.prerendering?0:1/0,Sc=e=>{if(Hx(e)&&ki>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of iy)t();isFinite(ki)||(ki=e.type==="visibilitychange"?e.timeStamp:0,Ao("prerenderingchange",Sc,!0))}},$r=()=>{if(B.document&&ki<0){let e=sr();ki=(B.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>e)[0]?.startTime)??Fx(),ar("visibilitychange",Sc,!0),ar("pagehide",Sc,!0),ar("prerenderingchange",Sc,!0)}return{get firstHiddenTime(){return ki},onHidden(e){iy.add(e)}}};function Hx(e){return e.type==="pagehide"||B.document?.visibilityState==="hidden"}var sy=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Wr=(e,t=-1)=>{let r=an(),n="navigate";return r&&(B.document?.prerendering||sr()>0?n="prerender":B.document?.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:sy(),navigationType:n}};var jp=new WeakMap;function wi(e,t){try{return jp.get(e)||jp.set(e,new t),jp.get(e)}catch{return new t}}var vc=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 lr=(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 Ii=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var Bn=e=>{B.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var zx=[1800,3e3],ay=(e,t={})=>{Bn(()=>{let r=$r(),n=Wr("FCP"),o,s=lr("paint",a=>{for(let l of a)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<r.firstHiddenTime&&(n.value=Math.max(l.startTime-sr(),0),n.entries.push(l),o(!0)))});s&&(o=zr(e,n,zx,t.reportAllChanges))})};var $x=[.1,.25],ly=(e,t={})=>{ay(Ii(()=>{let r=Wr("CLS",0),n,o=$r(),i=wi(t,vc),s=l=>{for(let c of l)i._processEntry(c);i._sessionValue>r.value&&(r.value=i._sessionValue,r.entries=i._sessionEntries,n())},a=lr("layout-shift",s);a&&(n=zr(e,r,$x,t.reportAllChanges),o.onHidden(()=>{s(a.takeRecords()),n(!0)}),B?.setTimeout?.(n))}))};var cy=0,Gp=1/0,yc=0,Wx=e=>{e.forEach(t=>{t.interactionId&&(Gp=Math.min(Gp,t.interactionId),yc=Math.max(yc,t.interactionId),cy=yc?(yc-Gp)/7+1:0)})},Vp,Yp=()=>Vp?cy:performance.interactionCount||0,uy=()=>{"interactionCount"in performance||Vp||(Vp=lr("event",Wx,{type:"event",buffered:!0,durationThreshold:0}))};var qp=10,dy=0,jx=()=>Yp()-dy,_c=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){dy=Yp(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor(jx()/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=B.requestIdleCallback||B.setTimeout;B.document?.visibilityState==="hidden"?e():(e=Ii(e),ar("visibilitychange",e,{once:!0,capture:!0}),ar("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Ao("visibilitychange",e,{capture:!0}),Ao("pagehide",e,{capture:!0})}))};var Gx=[200,500],Vx=40,py=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let r=$r();Bn(()=>{uy();let n=Wr("INP"),o,i=wi(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=lr("event",s,{durationThreshold:t.durationThreshold??Vx});o=zr(e,n,Gx,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 Yx=[2500,4e3],fy=(e,t={})=>{Bn(()=>{let r=$r(),n=Wr("LCP"),o,i=wi(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-sr(),0),n.entries=[c],o())},a=lr("largest-contentful-paint",s);if(a){o=zr(e,n,Yx,t.reportAllChanges);let l=Ii(()=>{s(a.takeRecords()),a.disconnect(),o(!0)}),c=u=>{u.isTrusted&&(Ec(l),Ao(u.type,c,{capture:!0}))};for(let u of["keydown","click","visibilitychange"])ar(u,c,{capture:!0})}})};var qx=[800,1800],Kp=e=>{B.document?.prerendering?Bn(()=>Kp(e)):B.document?.readyState!=="complete"?addEventListener("load",()=>Kp(e),!0):setTimeout(e)},my=(e,t={})=>{let r=Wr("TTFB"),n=zr(e,r,qx,t.reportAllChanges);Kp(()=>{let o=an();o&&(r.value=Math.max(o.responseStart-sr(),0),r.entries=[o],n(!0))})};var sa={},bc={},gy,hy,Sy,vy;function ln(e,t=!1){return kc("cls",e,Kx,gy,t)}function cn(e,t=!1){return kc("lcp",e,Xx,hy,t)}function Xp(e){return kc("ttfb",e,Jx,Sy)}function Mo(e){return kc("inp",e,Zx,vy)}function wr(e,t){return yy(e,t),bc[e]||(Qx(e),bc[e]=!0),_y(e,t)}function aa(e,t){let r=sa[e];if(r?.length)for(let n of r)try{n(t)}catch(o){Ye&&T.error(`Error while triggering instrumentation handler.
|
|
25
25
|
Type: ${e}
|
|
26
|
-
Name: ${
|
|
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
|
|
26
|
+
Name: ${vt(n)}
|
|
27
|
+
Error:`,o)}}function Kx(){return ly(e=>{aa("cls",{metric:e}),gy=e},{reportAllChanges:!0})}function Xx(){return fy(e=>{aa("lcp",{metric:e}),hy=e},{reportAllChanges:!0})}function Jx(){return my(e=>{aa("ttfb",{metric:e}),Sy=e})}function Zx(){return py(e=>{aa("inp",{metric:e}),vy=e})}function kc(e,t,r,n,o=!1){yy(e,t);let i;return bc[e]||(i=r(),bc[e]=!0),n&&t({metric:n}),_y(e,t,o?i:void 0)}function Qx(e){let t={};e==="event"&&(t.durationThreshold=0),lr(e,r=>{aa(e,{entries:r})},t)}function yy(e,t){sa[e]=sa[e]||[],sa[e].push(t)}function _y(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 Ey(e){return"duration"in e}var e1=80;function pe(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||e1;for(;r&&i++<n&&(c=t1(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 t1(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&<(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 Ty=e=>{let t=r=>{(r.type==="pagehide"||B.document?.visibilityState==="hidden")&&e(r)};ar("visibilitychange",t,{capture:!0,once:!0}),ar("pagehide",t,{capture:!0,once:!0})};function wc(e){return typeof e=="number"&&isFinite(e)}function un(e,t,r,{...n}){let o=$(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),fi(e,()=>{let i=Ve({startTime:t,...n});return i&&i.end(r),i})}function xi(e){let t=D();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=H(),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":B.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...o};return Ve({name:r,attributes:y,startTime:i,experimental:{standalone:!0}})}function dn(){return B.addEventListener&&B.performance}function ce(e){return e/1e3}function by(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 Lo(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Oo(e,t){let r,n=!1;function o(a){!n&&r&&t(a,r.spanContext().spanId,r),n=!0}Ty(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",a=>{r=a,s()})}function ky(e){let t=0,r;if(!Lo("layout-shift"))return;let n=ln(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Oo(e,(o,i)=>{r1(t,r,i,o),n()})}function r1(e,t,r,n){Ye&&T.log(`Sending CLS span (${e})`);let o=t?ce((me()||0)+t.startTime):ae(),i=H().getScopeData().transactionName,s=t?pe(t.sources[0]?.node):"Layout shift",a={[ee]:"auto.http.browser.cls",[_e]:"ui.webvital.cls",[dt]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t?.sources&&t.sources.forEach((c,u)=>{a[`cls.source.${u+1}`]=pe(c.node)});let l=xi({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("cls",{[br]:"",[kr]:e}),l.end(o))}var n1=6e4;function Po(e){return e!=null&&e>0&&e<=n1}function wy(e){let t=0,r;if(!Lo("largest-contentful-paint"))return;let n=cn(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Po(o.value)||(t=o.value,r=i)},!0);Oo(e,(o,i)=>{o1(t,r,i,o),n()})}function o1(e,t,r,n){if(!Po(e))return;Ye&&T.log(`Sending LCP span (${e})`);let o=ce((me()||0)+(t?.startTime||0)),i=H().getScopeData().transactionName,s=t?pe(t.element):"Largest contentful paint",a={[ee]:"auto.http.browser.lcp",[_e]:"ui.webvital.lcp",[dt]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t&&(t.element&&(a["lcp.element"]=pe(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",{[br]:"millisecond",[kr]:e}),l.end(o))}function cr(e){return e&&((me()||performance.timeOrigin)+e)/1e3}function la(e){let t={};if(e.nextHopProtocol!=null){let{name:r,version:n}=by(e.nextHopProtocol);t["network.protocol.version"]=n,t["network.protocol.name"]=r}return me()||dn()?.timeOrigin?i1({...t,"http.request.redirect_start":cr(e.redirectStart),"http.request.redirect_end":cr(e.redirectEnd),"http.request.worker_start":cr(e.workerStart),"http.request.fetch_start":cr(e.fetchStart),"http.request.domain_lookup_start":cr(e.domainLookupStart),"http.request.domain_lookup_end":cr(e.domainLookupEnd),"http.request.connect_start":cr(e.connectStart),"http.request.secure_connection_start":cr(e.secureConnectionStart),"http.request.connection_end":cr(e.connectEnd),"http.request.request_start":cr(e.requestStart),"http.request.response_start":cr(e.responseStart),"http.request.response_end":cr(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function i1(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var s1=2147483647,Iy=0,Et={},Ot,xc;function Jp({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:r}){let n=dn();if(n&&me()){n.mark&&B.performance.mark("sentry-tracing-init");let o=t?wy(r):t===!1?l1():void 0,i=e?ky(r):e===!1?a1():void 0,s=c1();return()=>{s(),o?.(),i?.()}}return()=>{}}function Zp(){wr("longtask",({entries:e})=>{let t=le();if(!t)return;let{op:r,start_timestamp:n}=$(t);for(let o of e){let i=ce(me()+o.startTime),s=ce(o.duration);r==="navigation"&&n&&i<n||un(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[ee]:"auto.ui.browser.metrics"}})}})}function Qp(){new PerformanceObserver(t=>{let r=le();if(r)for(let n of t.getEntries()){if(!n.scripts[0])continue;let o=ce(me()+n.startTime),{start_timestamp:i,op:s}=$(r);if(s==="navigation"&&i&&o<i)continue;let a=ce(n.duration),l={[ee]:"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),un(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(){wr("event",({entries:e})=>{let t=le();if(t){for(let r of e)if(r.name==="click"){let n=ce(me()+r.startTime),o=ce(r.duration),i={name:pe(r.target),op:`ui.interaction.${r.name}`,startTime:n,attributes:{[ee]:"auto.ui.browser.metrics"}},s=Ti(r.target);s&&(i.attributes["ui.component_name"]=s),un(t,n,n+o,i)}}})}function a1(){return ln(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Et.cls={value:e.value,unit:""},xc=t)},!0)}function l1(){return cn(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!Po(e.value)||(Et.lcp={value:e.value,unit:"millisecond"},Ot=t)},!0)}function c1(){return Xp(({metric:e})=>{e.entries[e.entries.length-1]&&(Et.ttfb={value:e.value,unit:"millisecond"})})}function tf(e,t){let r=dn(),n=me();if(!r?.getEntries||!n)return;let{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:l}=t,c=ce(n),u=r.getEntries(),{op:d,start_timestamp:p}=$(e);if(u.slice(Iy).forEach(f=>{let h=ce(f.startTime),y=ce(Math.max(0,f.duration));if(!(d==="navigation"&&p&&c+h<p))switch(f.entryType){case"navigation":{f1(e,f,c);break}case"mark":case"paint":case"measure":{d1(e,f,h,y,c,i);let k=$r(),g=f.startTime<k.firstHiddenTime;f.name==="first-paint"&&g&&(Et.fp={value:f.startTime,unit:"millisecond"}),f.name==="first-contentful-paint"&&g&&(Et.fcp={value:f.startTime,unit:"millisecond"});break}case"resource":{h1(e,f,f.name,h,y,c,s);break}}}),Iy=Math.max(u.length-1,0),S1(e,o),d==="pageload"){if(_1(Et),o){let f=(h,y,k)=>{let g=k??`browser.web_vital.${h}.value`;e.setAttribute(g,y),Ye&&T.log("Setting web vital attribute",{[g]:y},"on pageload span")};["ttfb","fp","fcp"].forEach(h=>{Et[h]&&f(h,Et[h].value)}),Et["ttfb.requestTime"]&&f("ttfb.requestTime",Et["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete Et.cls,l||delete Et.lcp,Object.entries(Et).forEach(([f,h])=>{Kl(f,h.value,h.unit)}),v1(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",sr())}Ot=void 0,xc=void 0,Et={}}function u1(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function d1(e,t,r,n,o,i){if(u1(t)||["mark","measure"].includes(t.entryType)&&Ze(t.name,i))return;let s=an(!1),a=ce(s?s.requestStart:0),l=o+Math.max(r,a),c=o+r,u=c+n,d={[ee]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),p1(d,t),l<=u&&un(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function p1(e,t){try{let r=t.detail;if(!r)return;if(typeof r=="object"){for(let[n,o]of Object.entries(r))if(o&&Rt(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(Rt(r)){e["sentry.browser.measure.detail"]=r;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(r)}catch{}}catch{}}function f1(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{Ic(e,t,n,r)}),Ic(e,t,"secureConnection",r,"TLS/SSL"),Ic(e,t,"fetch",r,"cache"),Ic(e,t,"domainLookup",r,"DNS"),g1(e,t,r)}function Ic(e,t,r,n,o=r){let i=m1(r),s=t[i],a=t[`${r}Start`];!a||!s||un(e,n+ce(a),n+ce(s),{op:`browser.${o}`,name:t.name,attributes:{[ee]:"auto.ui.browser.metrics",...r==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function m1(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function g1(e,t,r){let n=r+ce(t.requestStart),o=r+ce(t.responseEnd),i=r+ce(t.responseStart);t.responseEnd&&(un(e,n,o,{op:"browser.request",name:t.name,attributes:{[ee]:"auto.ui.browser.metrics"}}),un(e,i,o,{op:"browser.response",name:t.name,attributes:{[ee]:"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={[ee]:"auto.resource.browser.metrics"},c=or(r);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=r.includes(B.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 u={...l,...la(t)},d=i+n,p=d+o;un(e,d,p,{name:r.replace(B.location.origin,""),op:a,attributes:u})}function S1(e,t){let r=B.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),wc(n.rtt)&&(Et["connection.rtt"]={value:n.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",n.rtt))),wc(r.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",r.deviceMemory):e.setAttribute("deviceMemory",`${r.deviceMemory} GB`)),wc(r.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",r.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(r.hardwareConcurrency)))}function v1(e,t){Ot&&t.recordLcpOnPageloadSpan&&(Ot.element&&e.setAttribute("lcp.element",pe(Ot.element)),Ot.id&&e.setAttribute("lcp.id",Ot.id),Ot.url&&e.setAttribute("lcp.url",Ot.url.trim().slice(0,200)),Ot.loadTime!=null&&e.setAttribute("lcp.loadTime",Ot.loadTime),Ot.renderTime!=null&&e.setAttribute("lcp.renderTime",Ot.renderTime),e.setAttribute("lcp.size",Ot.size)),xc?.sources&&t.recordClsOnPageloadSpan&&xc.sources.forEach((r,n)=>e.setAttribute(`cls.source.${n+1}`,pe(r.node)))}function y1(e,t,r){r.forEach(([n,o])=>{let i=e[n];i!=null&&(typeof i=="number"&&i<s1||typeof i=="string")&&(t[o]=i)})}function _1(e){let t=an(!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(dn()&&me()){let t=E1();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 E1(){return Mo(T1)}var T1=({metric:e})=>{if(e.value==null)return;let t=ce(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=ce(me()+r.startTime),s=le(),a=s?ie(s):void 0,l=n!=null?ca.get(n):void 0,c=l?.span||a,u=c?$(c).description:H().getScopeData().transactionName,d=l?.elementName||pe(r.target),p={[ee]:"auto.http.browser.inp",[_e]:`ui.interaction.${o}`,[dt]:r.duration},f=xi({name:d,transaction:u,attributes:p,startTime:i});f&&(f.addEvent("inp",{[br]:"millisecond",[kr]:e.value}),f.end(i+t))};function xy(e){return e!=null?ca.get(e):void 0}function sf(){let e=Object.keys(Ci);ir()&&e.forEach(o=>{B.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){let i=o.target;if(!i)return;let s=pe(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=le(),s=i&&ie(i);o.forEach(a=>{if(!Ey(a))return;let l=a.interactionId;if(l==null||ca.has(l))return;let c=a.target?pe(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})})};wr("event",n),wr("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=H().getScopeData().transactionName,p={[ee]:n,[_e]:r,[dt]:0,[`browser.web_vital.${o}.value`]:i,"sentry.transaction":d,"user_agent.original":B.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=Ve({name:t,attributes:p,startTime:c,parentSpan:a});f&&f.end(u??c)}function lf(e){let t=0,r;if(!Lo("largest-contentful-paint"))return;let n=cn(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Po(o.value)||(t=o.value,r=i)},!0);Oo(e,(o,i,s)=>{b1(t,r,s,o),n()})}function b1(e,t,r,n){if(!Po(e))return;Ye&&T.log(`Sending LCP span (${e})`);let o=me()||0,i=ce(o),s=ce(o+(t?.startTime||0)),a=t?pe(t.element):"Largest contentful paint",l={};t?.element&&(l["browser.web_vital.lcp.element"]=pe(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(!Lo("layout-shift"))return;let n=ln(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Oo(e,(o,i,s)=>{k1(t,r,s,o),n()})}function k1(e,t,r,n){Ye&&T.log(`Sending CLS span (${e})`);let o=t?ce((me()||0)+t.startTime):ae(),i=t?pe(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,l)=>{s[`browser.web_vital.cls.source.${l+1}`]=pe(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(!dn()||!me())return;Mo(({metric:r})=>{if(r.value==null||ce(r.value)>nf)return;let o=r.entries.find(i=>i.duration===r.value&&Ci[i.name]);o&&w1(r.value,o)})}function w1(e,t){Ye&&T.log(`Sending INP span (${e})`);let r=ce(me()+t.startTime),n=ce(e),o=Ci[t.name],i=xy(t.interactionId),s=le(),a=s?ie(s):void 0,l=i?.span||a,c=l?Fs(l).name:H().getScopeData().transactionName,u=i?.elementName||pe(t.target);af({name:u,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[dt]:t.duration,"sentry.transaction":c},startTime:r,endTime:r+n,parentSpan:l})}var I1=1e3,Ry,df,pf;function ua(e){st("dom",e),at("dom",x1)}function x1(){if(!B.document)return;let e=Ue.bind(null,"dom"),t=Cy(e,!0);B.document.addEventListener("click",t,!1),B.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let o=B[r]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ae(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=Cy(e);u.handler=d,i.call(this,s,d,l)}u.refCount++}catch{}return i.call(this,s,a,l)}}),Ae(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 R1(e){if(e.type!==df)return!1;try{if(!e.target||e.target._sentryId!==pf)return!1}catch{}return!0}function C1(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Cy(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=N1(r);if(C1(r.type,n))return;ye(r,"_sentryCaptured",!0),n&&!n._sentryId&&ye(n,"_sentryId",Me());let o=r.type==="keypress"?"input":r.type;R1(r)||(e({event:r,name:o,global:t}),df=r.type,pf=n?n._sentryId:void 0),clearTimeout(Ry),Ry=B.setTimeout(()=>{pf=void 0,df=void 0},I1)}}function N1(e){try{return e.target}catch{return null}}var Rc;function pn(e){let t="history";st(t,e),at(t,A1)}function A1(){if(B.addEventListener("popstate",()=>{let t=B.location.href,r=Rc;if(Rc=t,r===t)return;Ue("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=M1(String(n));if(Rc=i,o===i)return t.apply(this,r);Ue("history",{from:o,to:i})}return t.apply(this,r)}}Ae(B.history,"pushState",e),Ae(B.history,"replaceState",e)}function M1(e){try{return new URL(e,B.location.origin).toString()}catch{return e}}var Cc={};function Nc(e){let t=Cc[e];if(t)return t;let r=B[e];if(ia(r))return Cc[e]=r.bind(B);let n=B.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){Ye&&T.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Cc[e]=r.bind(B))}function ff(e){Cc[e]=void 0}function Do(...e){return Nc("setTimeout")(...e)}var Ir="__sentry_xhr_v3__";function da(e){st("xhr",e),at("xhr",L1)}function L1(){if(!B.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){let o=new Error,i=ae()*1e3,s=lt(n[0])?n[0].toUpperCase():void 0,a=O1(n[1]);if(!s||!a)return t.apply(r,n);r[Ir]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);let l=()=>{let c=r[Ir];if(c&&r.readyState===4){try{c.status_code=r.status}catch{}let u={endTimestamp:ae()*1e3,startTimestamp:i,xhr:r,virtualError:o};Ue("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[Ir];return h&<(p)&<(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[Ir];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);let i={startTimestamp:ae()*1e3,xhr:r};return Ue("xhr",i),t.apply(r,n)}})}function O1(e){if(lt(e))return e;try{return e.toString()}catch{}}var P1=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 Ye&&t.error(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ye&&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][P1];return r!==void 0?r:void 0}}function pa(e){let t;try{t=e.getAllResponseHeaders()}catch(r){return Ye&&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 D1=40;function Ny(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,Co(e.bufferSize||D1))}var xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var U1=30;var B1=50;function gf(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 F1=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,H1=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,z1=/\((\S*)(?::(\d+))(?::(\d+))\)/,$1=/at (.+?) ?\(data:(.+?),/,W1=e=>{let t=e.match($1);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let r=F1.exec(e);if(r){let[,o,i,s]=r;return gf(o,"?",+i,+s)}let n=H1.exec(e);if(n){if(n[2]?.indexOf("eval")===0){let a=z1.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[i,s]=My(n[1]||"?",n[2]);return gf(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},j1=[U1,W1],G1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,V1=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Y1=e=>{let t=G1.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=V1.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]=My(o,n),gf(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},q1=[B1,Y1];var K1=[j1,q1],Ay=ys(...K1),My=(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,X1="Breadcrumbs",J1=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:X1,setup(r){t.console&&Pp(eR(r)),t.dom&&ua(Q1(r,t.dom)),t.xhr&&da(tR(r)),t.fetch&&Dn(rR(r)),t.history&&pn(nR(r)),t.sentry&&r.on("beforeSendEvent",Z1(r))}}}),Ly=J1;function Z1(e){return function(r){D()===e&&Wt({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Tr(r)},{event:r})}}function Q1(e,t){return function(n){if(D()!==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=oR(c)?c.target:c;o=pe(u,{keyAttrs:s,maxStringLength:a}),i=Ti(u)}catch{o="<unknown>"}if(o.length===0)return;let l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),Wt(l,{event:n.event,name:n.name,global:n.global})}}function eR(e){return function(r){if(D()!==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;Wt(n,{input:r.args,level:r.level})}}function tR(e){return function(r){if(D()!==e)return;let{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[Ir];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),Wt(p,d)}}function rR(e){return function(r){if(D()!==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),Wt(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),Wt(l,a)}}}function nR(e){return function(r){if(D()!==e)return;let n=r.from,o=r.to,i=or(F.location.href),s=n?or(n):void 0,a=or(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),Wt({category:"navigation",data:{from:n,to:o}})}}function oR(e){return!!e&&!!e.target}var iR="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(","),sR="BrowserApiErrors",aR=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:sR,setupOnce(){t.setTimeout&&Ae(F,"setTimeout",Oy),t.setInterval&&Ae(F,"setInterval",Oy),t.requestAnimationFrame&&Ae(F,"requestAnimationFrame",lR),t.XMLHttpRequest&&"XMLHttpRequest"in F&&Ae(XMLHttpRequest.prototype,"send",cR);let r=t.eventTarget;r&&(Array.isArray(r)?r:iR).forEach(o=>uR(o,t))}}}),Py=aR;function Oy(e){return function(...t){let r=t[0];return t[0]=No(r,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${vt(e)}`}}),e.apply(this,t)}}function lR(e){return function(t){return e.apply(this,[No(t,{mechanism:{data:{handler:vt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function cR(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&Ae(r,o,function(i){let s={mechanism:{data:{handler:vt(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Cn(i);return a&&(s.mechanism.data.handler=vt(a)),No(i,s)})}),e.apply(this,t)}}function uR(e,t){let n=F[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ae(n,"addEventListener",function(o){return function(i,s,a){try{dR(s)&&(s.handleEvent=No(s.handleEvent,{mechanism:{data:{handler:vt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&pR(this,i,s),o.apply(this,[i,No(s,{mechanism:{data:{handler:vt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ae(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 dR(e){return typeof e.handleEvent=="function"}function pR(e,t,r){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,r)}var Dy=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof F.document>"u"){xe&&T.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Si({ignoreDuration:!0}),Ro();let r=be(),n=r.getUser();r.addScopeListener(o=>{let i=o.getUser();(n?.id!==i?.id||n?.ip_address!==i?.ip_address)&&(Ro(),n=i)}),t==="route"&&pn(({from:o,to:i})=>{o!==i&&(Si({ignoreDuration:!0}),Ro())})}}};var fR="CultureContext",mR=(()=>({name:fR,preprocessEvent(e){let t=Uy();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Uy();t&&On(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),By=mR;function Uy(){try{let e=F.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var gR="GlobalHandlers",hR=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:gR,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(SR(r),Fy("onerror")),t.onunhandledrejection&&(vR(r),Fy("onunhandledrejection"))}}}),Hy=hR;function SR(e){Ts(t=>{let{stackParser:r,attachStacktrace:n}=zy();if(D()!==e||zp())return;let{msg:o,url:i,line:s,column:a,error:l}=t,c=ER(gc(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 vR(e){bs(t=>{let{stackParser:r,attachStacktrace:n}=zy();if(D()!==e||zp())return;let o=yR(t),i=Rt(o)?_R(o):gc(r,o,void 0,n,!0);i.level="error",hi(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function yR(e){if(Rt(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 _R(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ER(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:TR(t)??Lt(),function:"?",in_app:!0}),e}function Fy(e){xe&&T.log(`Global Handler attached: ${e}`)}function zy(){return D()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function TR(e){if(!(!lt(e)||e.length===0))return e.startsWith("data:")?`<${pt(e,!1)}>`:e}var $y=()=>({name:"HttpContext",preprocessEvent(e){if(!F.navigator&&!F.location&&!F.document)return;let t=bi(),r={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:r}},processSegmentSpan(e){if(!F.navigator&&!F.location&&!F.document)return;let t=bi();On(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}});var bR="cause",kR=5,wR="LinkedErrors",IR=((e={})=>{let t=e.limit||kR,r=e.key||bR;return{name:wR,preprocessEvent(n,o,i){let s=i.getOptions();Op(fc,s.stackParser,r,t,n,o)}}}),Wy=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=RR(e);if(xR.test(t))return`[HTMLElement: ${pe(e)}]`}}function RR(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function jy(){return CR()?(xe&&Je(()=>{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 CR(){if(typeof F.window>"u")return!1;let e=F;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let r=Lt();return!(F===F.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}function Gy(e){return[sc(),oc(),Dp(),Py(),Ly(),Hy(),Wy(),lc(),$y(),By(),Dy()]}function hf(e={}){let t=!e.skipBrowserExtensionCheck&&jy(),r=e.defaultIntegrations==null?Gy():e.defaultIntegrations,n={...e,enabled:t?!1:e.enabled,stackParser:Cl(e.stackParser||Ay),integrations:yp({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||Ny};return oi(fa),xp(hc,n)}function Pc(e={}){let t=F.document,r=t?.head||t?.body;if(!r){xe&&T.error("[showReportDialog] Global document not defined");return}let n=H(),i=D()?.getDsn();if(!i){xe&&T.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...n.getUser(),...e.user},eventId:e.eventId||qs()},a=F.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{F.removeEventListener("message",u)}};F.addEventListener("message",u)}r.appendChild(a)}var he=U,Vf="sentryReplaySession",NR="replay_event",Yf="Unable to send Replay",AR=3e5,MR=9e5,LR=5e3,OR=5500,PR=6e4,DR=5e3,UR=3,Vy=15e4,Dc=5e3,BR=3e3,FR=300,qf=2e7,HR=4999,zR=5e4,Yy=36e5,$R=Object.defineProperty,WR=(e,t,r)=>t in e?$R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qy=(e,t,r)=>WR(e,typeof t!="symbol"?t+"":t,r),Fe=(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))(Fe||{});function jR(e){return e.nodeType===e.ELEMENT_NODE}function ha(e){return e?.host?.shadowRoot===e}function Sa(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function GR(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 VR(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?GR(Array.from(t,v_).join("")):null}catch{return null}}function YR(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 v_(e){let t;if(KR(e))try{t=zc(e.styleSheet)||VR(e)}catch{}else if(XR(e)){let r=e.cssText,n=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(r=YR(e)),n&&(r=qR(r)),n||o)return r}return t||e.cssText}function qR(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function KR(e){return"styleSheet"in e}function XR(e){return"selectorText"in e}var $c=class{constructor(){qy(this,"idNodeMap",new Map),qy(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 JR(){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 ya({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 Ky="__rrweb_original__";function ZR(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=Ky in i?i[Ky]: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 y_(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 Xy={};function __(e){let t=Xy[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 Xy[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 QR(e){try{return e.contentWindow}catch{}}var eC=1,tC=new RegExp("[^a-z0-9-_:]"),_a=-2;function Xf(){return eC++}function rC(e){if(e instanceof HTMLFormElement)return"form";let t=Ui(e.tagName);return tC.test(t)?"div":t}function nC(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,Jy,oC=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,iC=/^(?:[a-z+]+:)?\/\//i,sC=/^www\..*/i,aC=/^(data:)([^,]*),(.*)/i;function lC(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(oC,(r,n,o,i,s,a)=>{let l=o||s||a,c=n||i||"";if(!l)return r;if(iC.test(l)||sC.test(l))return`url(${c}${l}${c})`;if(aC.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${nC(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 cC=/^[^ \t\n\r\u000c]+/,uC=/^[, \t\n\r\u000c]+/;function dC(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(uC),!(r>=t.length);){let i=n(cC);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 Zy=new WeakMap;function Li(e,t){return!t||t.trim()===""?t:nu(e,t)}function pC(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function nu(e,t){let r=Zy.get(e);if(r||(r=e.createElement("a"),Zy.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 dC(e,n);if(r==="style"){let a=jc(n,nu(e));return s&&s.size>0&&(a=lC(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 fC(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 mC(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}function Uo(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:Uo(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(mC(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=Uo(s,Oi(n,o)),l<0)return!0;a=Uo(s,Oi(t,r),l>=0?l:1/0)}else{if(a=Uo(s,Oi(t,r)),a<0)return!1;l=Uo(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 gC(e,t,r){let n=QR(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 SC(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:k,dataURLOptions:g={},inlineImages:S,recordCanvas:v,keepIframeSrcFn:E,newlyAddedElement:C=!1,ignoreCSSAttributes:R}=t,_=vC(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Fe.Document,childNodes:[],compatMode:e.compatMode}:{type:Fe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Fe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return _C(e,{doc:r,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:h,maskInputFn:k,dataURLOptions:g,inlineImages:S,recordCanvas:v,keepIframeSrcFn:E,newlyAddedElement:C,rootId:_,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:R});case e.TEXT_NODE:return yC(e,{doc:r,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:y,maskInputOptions:h,maskInputFn:k,rootId:_});case e.CDATA_SECTION_NODE:return{type:Fe.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Fe.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function vC(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: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(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}p=jc(p,nu(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");let k=Bi(e,n,i,o,s,r);if(!f&&!h&&!y&&p&&k&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),y&&p&&(l.textarea||k)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p){let g=ru({type:null,tagName:d,maskInputOptions:l});p=ya({isMasked:Bi(e,n,i,o,s,g),element:e,value:p,maskInputFn:c})}return{type:Fe.Text,textContent:p||"",isStyle:f,rootId:u}}function _C(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:k,unmaskTextClass:g,maskTextSelector:S,unmaskTextSelector:v,ignoreCSSAttributes:E}=t,C=fC(e,n,o,i),R=rC(e),_={},w=e.attributes.length;for(let I=0;I<w;I++){let P=e.attributes[I];P.name&&!k_(R,P.name,P.value)&&(_[P.name]=b_(r,R,Ui(P.name),P.value,e,l,E))}if(R==="link"&&s){let I=Array.from(r.styleSheets).find(W=>W.href===e.href),P=null;I&&(P=zc(I)),P&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=jc(P,I.href))}if(R==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let I=zc(e.sheet);I&&(_._cssText=jc(I,nu(r)))}if(R==="input"||R==="textarea"||R==="select"||R==="option"){let I=e,P=Kf(I),W=Wc(I,Tf(R),P),K=I.checked;if(P!=="submit"&&P!=="button"&&W){let V=Bi(I,k,S,g,v,ru({type:P,tagName:Tf(R),maskInputOptions:a}));_.value=ya({isMasked:V,element:I,value:W,maskInputFn:c})}K&&(_.checked=K)}if(R==="option"&&(e.selected&&!a.select?_.selected=!0:delete _.selected),R==="canvas"&&p){if(e.__context==="2d")ZR(e)||(_.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let I=e.toDataURL(u.type,u.quality),P=r.createElement("canvas");P.width=e.width,P.height=e.height;let W=P.toDataURL(u.type,u.quality);I!==W&&(_.rr_dataURL=I)}}if(R==="img"&&d){Ni||(Ni=r.createElement("canvas"),Jy=Ni.getContext("2d"));let I=e,P=I.currentSrc||I.getAttribute("src")||"<unknown-src>",W=I.crossOrigin,K=()=>{I.removeEventListener("load",K);try{Ni.width=I.naturalWidth,Ni.height=I.naturalHeight,Jy.drawImage(I,0,0),_.rr_dataURL=Ni.toDataURL(u.type,u.quality)}catch(V){if(I.crossOrigin!=="anonymous"){I.crossOrigin="anonymous",I.complete&&I.naturalWidth!==0?K():I.addEventListener("load",K);return}else console.warn(`Cannot inline img src=${P}! Error: ${V}`)}I.crossOrigin==="anonymous"&&(W?_.crossOrigin=W:I.removeAttribute("crossorigin"))};I.complete&&I.naturalWidth!==0?K():I.addEventListener("load",K)}if((R==="audio"||R==="video")&&(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),C){let{width:I,height:P}=e.getBoundingClientRect();_={class:_.class,rr_width:`${I}px`,rr_height:`${P}px`}}R==="iframe"&&!f(_.src)&&(!C&&!T_(e)&&(_.rr_src=_.src),delete _.src);let z;try{customElements.get(R)&&(z=!0)}catch{}return{type:Fe.Element,tagName:R,attributes:_,childNodes:[],isSVG:pC(e)||void 0,needBlock:C,rootId:y,isCustom:z}}function ge(e){return e==null?"":e.toLowerCase()}function EC(e,t){if(t.comment&&e.type===Fe.Comment)return!0;if(e.type===Fe.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"&&y_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ge(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ge(e.attributes.name)==="application-name"||ge(e.attributes.rel)==="icon"||ge(e.attributes.rel)==="apple-touch-icon"||ge(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ge(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ge(e.attributes.property).match(/^(og|twitter|fb):/)||ge(e.attributes.name).match(/^(og|twitter):/)||ge(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ge(e.attributes.name)==="robots"||ge(e.attributes.name)==="googlebot"||ge(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ge(e.attributes.name)==="author"||ge(e.attributes.name)==="generator"||ge(e.attributes.name)==="framework"||ge(e.attributes.name)==="publisher"||ge(e.attributes.name)==="progid"||ge(e.attributes.property).match(/^article:/)||ge(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ge(e.attributes.name)==="google-site-verification"||ge(e.attributes.name)==="yandex-verification"||ge(e.attributes.name)==="csrf-token"||ge(e.attributes.name)==="p:domain_verify"||ge(e.attributes.name)==="verify-v1"||ge(e.attributes.name)==="verification"||ge(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:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:y,maskTextFn:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w=5e3,onBlockedImageLoad:z,onStylesheetLoad:I,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:W=()=>!1,newlyAddedElement:K=!1,ignoreCSSAttributes:V}=t,{preserveWhiteSpace:Pe=!0}=t,ue=SC(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:k,maskInputFn:g,dataURLOptions:v,inlineImages:E,recordCanvas:C,keepIframeSrcFn:W,newlyAddedElement:K,ignoreCSSAttributes:V});if(!ue)return console.warn(e,"not serialized"),null;let fe;n.hasNode(e)?fe=n.getId(e):EC(ue,S)||!Pe&&ue.type===Fe.Text&&!ue.isStyle&&!ue.textContent.trim().length?fe=_a:fe=Xf();let L=Object.assign(ue,{id:fe});if(n.add(e,L),fe===_a)return null;R&&R(e);let b=!p;if(L.type===Fe.Element){b=b&&!L.needBlock;let x=e.shadowRoot;x&&Sa(x)&&(L.isShadowHost=!0)}if((L.type===Fe.Document||L.type===Fe.Element)&&b){S.headWhitespace&&L.type===Fe.Element&&L.tagName==="head"&&(Pe=!1);let x={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:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v,inlineImages:E,recordCanvas:C,preserveWhiteSpace:Pe,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w,onBlockedImageLoad:z,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:W,ignoreCSSAttributes:V},A=e.childNodes?Array.from(e.childNodes):[];for(let oe of A){let J=Pi(oe,x);J&&L.childNodes.push(J)}if(jR(e)&&e.shadowRoot)for(let oe of Array.from(e.shadowRoot.childNodes)){let J=Pi(oe,x);J&&(Sa(e.shadowRoot)&&(J.isShadow=!0),L.childNodes.push(J))}}if(e.parentNode&&ha(e.parentNode)&&Sa(e.parentNode)&&(L.isShadow=!0),L.type===Fe.Element&&L.tagName==="iframe"&&!L.needBlock&&gC(e,()=>{let x=T_(e);if(x&&_){let A=Pi(x,{doc:x,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:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v,inlineImages:E,recordCanvas:C,preserveWhiteSpace:Pe,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:W,ignoreCSSAttributes:V});A&&_(e,A)}},w),L.type===Fe.Element&&L.tagName==="img"&&!e.complete&&L.needBlock){let x=e,A=()=>{if(x.isConnected&&!x.complete&&z)try{let oe=x.getBoundingClientRect();oe.width>0&&oe.height>0&&z(x,L,oe)}catch{}x.removeEventListener("load",A)};x.isConnected&&x.addEventListener("load",A)}return L.type===Fe.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&y_(L.attributes.href)==="css")&&hC(e,()=>{if(I){let x=Pi(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:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v,inlineImages:E,recordCanvas:C,preserveWhiteSpace:Pe,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:W,ignoreCSSAttributes:V});x&&I(e,x)}},P),L.type===Fe.Element&&delete L.needBlock,L}function TC(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:k,maskInputFn:g,slimDOM:S=!1,dataURLOptions:v,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:_,onBlockedImageLoad:w,onStylesheetLoad:z,stylesheetLoadTimeout:I,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:W=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: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:k,maskInputFn:g,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:v,inlineImages:p,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:_,onBlockedImageLoad:w,onStylesheetLoad:z,stylesheetLoadTimeout:I,keepIframeSrcFn:P,newlyAddedElement:!1,ignoreCSSAttributes:W})}function bt(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.`,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",{});
|
|
30
|
+
or you can use record.mirror to access the mirror instance during recording.`,Qy={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&&(Qy=new Proxy(Qy,{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&&(RC(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 w_(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)}}),()=>w_(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 I_(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 jt(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=Uo(i,s),l=-1;return a<0?!1:(n&&(l=Uo(i,Oi(null,n))),a>-1&&l<0?!0:a<l)}function bC(e,t){return t.getId(e)!==-1}function Sf(e,t){return t.getId(e)===_a}function N_(e,t){if(ha(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 kC(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 wf(e){return!!e?.shadowRoot}var If=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 wC(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=wC(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 xC(...e){return Zf("requestAnimationFrame")(...e)}function ou(...e){return Zf("setTimeout")(...e)}function RC(...e){return Zf("clearTimeout")(...e)}var q=(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))(q||{}),Y=(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))(Y||{}),Tt=(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))(Tt||{}),fn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(fn||{}),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||{}),va;function CC(e){va=e}function NC(){va=void 0}var te=e=>va?((...r)=>{try{return e(...r)}catch(n){if(va&&va(n)===!0)return()=>{};throw n}}):e,t_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",AC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ma=0;ma<t_.length;ma++)AC[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,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=ha(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=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)&&!jt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),M_(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),wf(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(jt(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;!jt(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=ya({isMasked:c,element:r,value:o,maskInputFn:this.maskInputFn})}if(jt(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(jt(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=ha(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);jt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Sf(r,this.mirror)||!bC(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:ha(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);jt(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(n=>this.genAdds(n)),wf(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:MC(e,t,r)}function MC(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(te(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 LC({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(te(d=>{let p=Date.now()-a;e(s.map(f=>(f.timeOffset-=p,f)),d),s=[],a=null}),i),c=te(Ea(te(d=>{let p=xa(d),{clientX:f,clientY:h}=kf(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?Y.Drag:d instanceof MouseEvent?Y.MouseMove:Y.TouchMove)}),o,{trailing:!1})),u=[bt("mousemove",c,r),bt("touchmove",c,r),bt("drag",c,r)];return te(()=>{u.forEach(d=>d())})}function OC({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=xa(p);if(jt(f,n,o,i,!0))return;let h=null,y=d;if("pointerType"in p){switch(p.pointerType){case"mouse":h=fn.Mouse;break;case"touch":h=fn.Touch;break;case"pen":h=fn.Pen;break}h===fn.Touch?Tt[d]===Tt.MouseDown?y="TouchStart":Tt[d]===Tt.MouseUp&&(y="TouchEnd"):fn.Pen}else kf(p)&&(h=fn.Touch);h!==null?(c=h,(y.startsWith("Touch")&&h===fn.Touch||y.startsWith("Mouse")&&h===fn.Mouse)&&(h=null)):Tt[d]===Tt.Click&&(h=c,c=null);let k=kf(p)?p.changedTouches[0]:p;if(!k)return;let g=r.getId(f),{clientX:S,clientY:v}=k;te(e)({type:Tt[y],id:g,x:S,y:v,...h!==null&&{pointerType:h}})};return Object.keys(Tt).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let p=Ui(d),f=u(d);if(window.PointerEvent)switch(Tt[d]){case Tt.MouseDown:case Tt.MouseUp:p=p.replace("mouse","pointer");break;case Tt.TouchStart:case Tt.TouchEnd:return}l.push(bt(p,f,t))}),te(()=>{l.forEach(d=>d())})}function U_({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){let a=te(Ea(te(l=>{let c=xa(l);if(!c||jt(c,n,o,i,!0))return;let u=r.getId(c);if(c===t&&t.defaultView){let d=I_(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 bt("scroll",a,t)}function PC({viewportResizeCb:e},{win:t}){let r=-1,n=-1,o=te(Ea(te(()=>{let i=x_(),s=R_();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return bt("resize",o,t)}var DC=["INPUT","TEXTAREA","SELECT"],s_=new WeakMap;function UC({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 k(_){let w=xa(_),z=_.isTrusted,I=w&&Tf(w.tagName);if(I==="OPTION"&&(w=w.parentElement),!w||!I||DC.indexOf(I)<0||jt(w,n,o,i,!0))return;let P=w;if(P.classList.contains(s)||a&&P.matches(a))return;let W=Kf(w),K=Wc(P,I,W),V=!1,Pe=ru({maskInputOptions:l,tagName:I,type:W}),ue=Bi(w,p,h,f,y,Pe);(W==="radio"||W==="checkbox")&&(V=w.checked),K=ya({isMasked:ue,element:w,value:K,maskInputFn:c}),g(w,d?{text:K,isChecked:V,userTriggered:z}:{text:K,isChecked:V});let fe=w.name;W==="radio"&&fe&&V&&t.querySelectorAll(`input[type="radio"][name="${fe}"]`).forEach(L=>{if(L!==w){let b=ya({isMasked:ue,element:L,value:Wc(L,I,W),maskInputFn:c});g(L,d?{text:b,isChecked:!V,userTriggered:!1}:{text:b,isChecked:!V})}})}function g(_,w){let z=s_.get(_);if(!z||z.text!==w.text||z.isChecked!==w.isChecked){s_.set(_,w);let I=r.getId(_);te(e)({...w,id:I})}}let v=(u.input==="last"?["change"]:["input","change"]).map(_=>bt(_,te(k),t)),E=t.defaultView;if(!E)return()=>{v.forEach(_=>_())};let C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),R=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&v.push(...R.map(_=>w_(_[0],_[1],{set(){te(k)({target:this,isTrusted:!1})}},!1,E))),te(()=>{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 Fn(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function BC({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:te((u,d,p)=>{let[f,h]=p,{id:y,styleId:k}=Fn(d,t,r.styleMirror);return(y&&y!==-1||k&&k!==-1)&&e({id:y,styleId:k,adds:[{rule:f,index:h}]}),u.apply(d,p)})});let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:te((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Fn(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:te((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Fn(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:te((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Fn(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:te((p,f,h)=>{let[y,k]=h,{id:g,styleId:S}=Fn(f.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,adds:[{rule:y,index:[...Yc(f),k||0]}]}),p.apply(f,h)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:te((p,f,h)=>{let[y]=h,{id:k,styleId:g}=Fn(f.parentStyleSheet,t,r.styleMirror);return(k&&k!==-1||g&&g!==-1)&&e({id:k,styleId:g,removes:[{index:[...Yc(f),y]}]}),p.apply(f,h)})})}),te(()=>{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}}),te(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function FC({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:te((a,l,c)=>{let[u,d,p]=c;if(r.has(u))return i.apply(l,[u,d,p]);let{id:f,styleId:h}=Fn(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:te((a,l,c)=>{let[u]=c;if(r.has(u))return s.apply(l,[u]);let{id:d,styleId:p}=Fn(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)})}),te(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function HC({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:o,sampling:i,doc:s}){let a=te(c=>Ea(te(u=>{let d=xa(u);if(!d||jt(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=[bt("play",a(Mi.Play),s),bt("pause",a(Mi.Pause),s),bt("seeked",a(Mi.Seeked),s),bt("volumechange",a(Mi.VolumeChange),s),bt("ratechange",a(Mi.RateChange),s)];return te(()=>{l.forEach(c=>c())})}function zC({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(te(()=>{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),te(()=>{n.forEach(a=>a())})}function $C(e){let{doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,l=te(()=>{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:k,endOffset:g}=f;jt(h,n,o,i,!0)||jt(k,n,o,i,!0)||u.push({start:r.getId(h),startOffset:y,end:r.getId(k),endOffset:g})}s({ranges:u})});return l(),bt("selectionchange",l)}function WC({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 jC(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};let n;e.recordDOM&&(n=D_(e,e.doc));let o=LC(e),i=OC(e),s=U_(e),a=PC(e,{win:r}),l=UC(e),c=HC(e),u=()=>{},d=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(u=BC(e,{win:r}),d=B_(e,e.doc),p=FC(e,{win:r}),e.collectFonts&&(f=zC(e)));let h=$C(e),y=WC(e),k=[];for(let g of e.plugins)k.push(g.observer(g.callback,r,g.options));return te(()=>{Di.forEach(g=>g.reset()),n?.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),p(),f(),h(),y(),k.forEach(g=>g())})}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 q.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:q.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case q.Meta:case q.Load:case q.DomContentLoaded:return!1;case q.Plugin:return r;case q.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case q.IncrementalSnapshot:switch(r.data.source){case Y.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 Y.Drag:case Y.TouchMove:case Y.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case Y.ViewportResize:return!1;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(r.data,t,["id"]),r;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case Y.Font:return r;case Y.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),r;case Y.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!==Fe.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 If,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:v_(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,xC(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Le,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 xr=JR();function Rr(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:k,slimDOMOptions:g,maskAttributeFn:S,maskInputFn:v,maskTextFn:E,maxCanvasSize:C=null,packFn:R,sampling:_={},dataURLOptions:w={},mousemoveWait:z,recordDOM:I=!0,recordCanvas:P=!1,recordCrossOriginIframes:W=!1,recordAfter:K=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Pe=!1,inlineImages:ue=!1,plugins:fe,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:b=new Set([]),errorHandler:x,onMutation:A,getCanvasManager:oe}=e;CC(x);let J=W?window.parent===window:!0,ot=!1;if(!J)try{window.parent.document&&(ot=!1)}catch{ot=!0}if(J&&!t)throw new Error("emit function is required");if(!J&&!ot)return()=>{};z!==void 0&&_.mousemove===void 0&&(_.mousemove=z),xr.reset();let Ie=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}:k!==void 0?k:{},it=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};kC();let Jt,Zt=0,Ss=se=>{for(let Sr of fe||[])Sr.eventProcessor&&(se=Sr.eventProcessor(se));return R&&!ot&&(se=R(se)),se};Le=(se,Sr)=>{let Z=se;if(Z.timestamp=Gc(),Di[0]?.isFrozen()&&Z.type!==q.FullSnapshot&&!(Z.type===q.IncrementalSnapshot&&Z.data.source===Y.Mutation)&&Di.forEach(Xe=>Xe.unfreeze()),J)t?.(Ss(Z),Sr);else if(ot){let Xe={type:"rrweb",event:Ss(Z),origin:window.location.origin,isCheckout:Sr};window.parent.postMessage(Xe,"*")}if(Z.type===q.FullSnapshot)Jt=Z,Zt=0;else if(Z.type===q.IncrementalSnapshot){if(Z.data.source===Y.Mutation&&Z.data.isAttachIframe)return;Zt++;let Xe=n&&Zt>=n,Q=r&&Jt&&Z.timestamp-Jt.timestamp>r;(Xe||Q)&&Dd(!0)}};let co=se=>{Le({type:q.IncrementalSnapshot,data:{source:Y.Mutation,...se}})},Dh=se=>Le({type:q.IncrementalSnapshot,data:{source:Y.Scroll,...se}}),Nk=se=>Le({type:q.IncrementalSnapshot,data:{source:Y.CanvasMutation,...se}}),Ak=se=>Le({type:q.IncrementalSnapshot,data:{source:Y.AdoptedStyleSheet,...se}}),uo=new Pf({mutationCb:co,adoptedStyleSheetCb:Ak}),po=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Af:new Mf({mirror:xr,mutationCb:co,stylesheetManager:uo,recordCrossOriginIframes:W,wrappedEmit:Le});for(let se of fe||[])se.getMirror&&se.getMirror({nodeMirror:xr,crossOriginIframeMirror:po.crossOriginIframeMirror,crossOriginIframeStyleMirror:po.crossOriginIframeStyleMirror});let Od=new Df,Pd=VC(oe,{mirror:xr,win:window,mutationCb:se=>Le({type:q.IncrementalSnapshot,data:{source:Y.CanvasMutation,...se}}),recordCanvas:P,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:C,sampling:_.canvas,dataURLOptions:w,errorHandler:x}),Il=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lf:new Of({mutationCb:co,scrollCb:Dh,bypassOptions:{onMutation:A,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:Ie,dataURLOptions:w,maskAttributeFn:S,maskTextFn:E,maskInputFn:v,recordCanvas:P,inlineImages:ue,sampling:_,slimDOMOptions:it,iframeManager:po,stylesheetManager:uo,canvasManager:Pd,keepIframeSrcFn:L,processedNodeManager:Od,ignoreCSSAttributes:b},mirror:xr}),Dd=(se=!1)=>{if(!I)return;Le({type:q.Meta,data:{href:window.location.href,width:R_(),height:x_()}},se),uo.reset(),Il.init(),Di.forEach(Z=>Z.lock());let Sr=TC(document,{mirror:xr,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:Ie,maskAttributeFn:S,maskInputFn:v,maskTextFn:E,slimDOM:it,dataURLOptions:w,recordCanvas:P,inlineImages:ue,onSerialize:Z=>{A_(Z,xr)&&po.addIframe(Z),M_(Z,xr)&&uo.trackLinkElement(Z),wf(Z)&&Il.addShadowRoot(Z.shadowRoot,document)},onIframeLoad:(Z,Xe)=>{po.attachIframe(Z,Xe);let Q=Ta(Z);Q&&Pd.addWindow(Q),Il.observeAttachShadow(Z)},onStylesheetLoad:(Z,Xe)=>{uo.attachLinkElement(Z,Xe)},onBlockedImageLoad:(Z,Xe,{width:Q,height:vs})=>{co({adds:[],removes:[],texts:[],attributes:[{id:Xe.id,attributes:{style:{width:`${Q}px`,height:`${vs}px`}}}]})},keepIframeSrcFn:L,ignoreCSSAttributes:b});if(!Sr)return console.warn("Failed to snapshot the document");Le({type:q.FullSnapshot,data:{node:Sr,initialOffset:I_(window)}}),Di.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&uo.adoptStyleSheets(document.adoptedStyleSheets,xr.getId(document))};qc=Dd;try{let se=[],Sr=Xe=>te(jC)({onMutation:A,mutationCb:co,mousemoveCb:(Q,vs)=>Le({type:q.IncrementalSnapshot,data:{source:vs,positions:Q}}),mouseInteractionCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.MouseInteraction,...Q}}),scrollCb:Dh,viewportResizeCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.ViewportResize,...Q}}),inputCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.Input,...Q}}),mediaInteractionCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.MediaInteraction,...Q}}),styleSheetRuleCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.StyleSheetRule,...Q}}),styleDeclarationCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.StyleDeclaration,...Q}}),canvasMutationCb:Nk,fontCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.Font,...Q}}),selectionCb:Q=>{Le({type:q.IncrementalSnapshot,data:{source:Y.Selection,...Q}})},customElementCb:Q=>{Le({type:q.IncrementalSnapshot,data:{source:Y.CustomElement,...Q}})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:Ie,inlineStylesheet:h,sampling:_,recordDOM:I,recordCanvas:P,inlineImages:ue,userTriggeredOnInput:V,collectFonts:Pe,doc:Xe,maskAttributeFn:S,maskInputFn:v,maskTextFn:E,keepIframeSrcFn:L,blockSelector:i,unblockSelector:s,slimDOMOptions:it,dataURLOptions:w,mirror:xr,iframeManager:po,stylesheetManager:uo,shadowDomManager:Il,processedNodeManager:Od,canvasManager:Pd,ignoreCSSAttributes:b,plugins:fe?.filter(Q=>Q.observer)?.map(Q=>({observer:Q.observer,options:Q.options,callback:vs=>Le({type:q.Plugin,data:{plugin:Q.name,payload:vs}})}))||[]},{});po.addLoadListener(Xe=>{try{se.push(Sr(Xe.contentDocument))}catch(Q){console.warn(Q)}});let Z=()=>{Dd(),se.push(Sr(document))};return document.readyState==="interactive"||document.readyState==="complete"?Z():(se.push(bt("DOMContentLoaded",()=>{Le({type:q.DomContentLoaded,data:{}}),K==="DOMContentLoaded"&&Z()})),se.push(bt("load",()=>{Le({type:q.Load,data:{}}),K==="load"&&Z()},window))),()=>{se.forEach(Xe=>Xe()),Od.destroy(),qc=void 0,NC()}}catch(se){console.warn(se)}}function GC(e){if(!qc)throw new Error("please take full snapshot after start recording");qc(e)}Rr.mirror=xr;Rr.takeFullSnapshot=GC;function VC(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 YC=3,qC=5;function em(e){return e>9999999999?e:e*1e3}function vf(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:q.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ct(t,10,1e3)}}),t.category==="console")))}var KC="button,a";function F_(e){return e.closest(KC)||e}function H_(e){let t=z_(e);return!t||!(t instanceof Element)?t:F_(t)}function z_(e){return XC(e)?e.target:e}function XC(e){return typeof e=="object"&&!!e&&"target"in e}var Hn;function JC(e){return Hn||(Hn=[],ZC()),Hn.push(e),()=>{let t=Hn?Hn.indexOf(e):-1;t>-1&&Hn.splice(t,1)}}function ZC(){Ae(he,"open",function(e){return function(...t){if(Hn)try{Hn.forEach(r=>r())}catch{}return e.apply(he,t)}})}var QC=new Set([Y.Mutation,Y.StyleSheetRule,Y.StyleDeclaration,Y.AdoptedStyleSheet,Y.CanvasMutation,Y.Selection,Y.MediaInteraction]);function eN(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=JC(()=>{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(rN(r,this._ignoreSelector)||!nN(t))return;let n={timestamp:vf(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=vf(t)}registerScroll(t=Date.now()){this._lastScroll=vf(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=Do(()=>this._checkClicks(),1e3)}},tN=["A","BUTTON","INPUT"];function rN(e,t){return!!(!tN.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 nN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function l_(){return Date.now()/1e3}function oN(e,t){try{if(!iN(t))return;let{source:r}=t.data;if(QC.has(r)&&e.registerMutation(t.timestamp),r===Y.Scroll&&e.registerScroll(t.timestamp),sN(t)){let{type:n,id:o}=t.data,i=Rr.mirror.getNode(o);i instanceof HTMLElement&&n===Tt.Click&&e.registerClick(i)}}catch{}}function iN(e){return e.type===YC}function sN(e){return e.data.source===Y.MouseInteraction}function jr(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||{}),aN=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function lN(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(aN.has(r)){let n=r;(r==="data-testid"||r==="data-test-id")&&(n="testId"),t[n]=e[r]}return t}var cN=e=>t=>{if(!e.isEnabled())return;let r=uN(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&&eN(e.clickDetector,r,H_(t.event)),Ra(e,r)};function $_(e,t){let r=Rr.mirror.getId(e),n=r&&Rr.mirror.getNode(r),o=n&&Rr.mirror.getMeta(n),i=o&&pN(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:lN(i.attributes)}}:{}}}function uN(e){let{target:t,message:r}=dN(e);return jr({category:`ui.${e.name}`,...$_(t,r)})}function dN(e){let t=e.name==="click",r,n=null;try{n=t?H_(e.event):z_(e.event),r=pe(n,{maxStringLength:200})||"<unknown>"}catch{r="<unknown>"}return{target:n,message:r}}function pN(e){return e.type===iu.Element}function fN(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=mN(t);r&&Ra(e,r)}function mN(e){let{metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i,target:s}=e;if(!s||gN(s)||!i)return null;let a=t||n||o,l=i.length===1;if(!a&&l)return null;let c=pe(s,{maxStringLength:200})||"<unknown>",u=$_(s,c);return jr({category:"ui.keyDown",message:c,data:{...u.data,metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i}})}function gN(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var hN={resource:EN,paint:yN,navigation:_N};function yf(e,t){return({metric:r})=>{t.replayPerformanceEntries.push(e(r))}}function SN(e){return e.map(vN).filter(Boolean)}function vN(e){let t=hN[e.entryType];return t?t(e):null}function Fi(e){return((me()||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 _N(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:Fi(f),end:Fi(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 EN(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 TN(e){let t=e.entries[e.entries.length-1],r=t?.element?[t.element]:void 0;return tm(e,"largest-contentful-paint",r)}function bN(e){return e.sources!==void 0}function kN(e){let t=[],r=[];for(let n of e.entries)if(bN(n)){let o=[];for(let i of n.sources)if(i.node){r.push(i.node);let s=Rr.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 wN(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=>Rr.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(wr(o,r))}),n.push(cn(yf(TN,e)),ln(yf(kN,e)),Mo(yf(wN,e))),()=>{n.forEach(o=>o())}}var j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xN='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 RN(){let e=new Blob([xN]);return URL.createObjectURL(e)}var c_=["log","warn","error"],Hc="[Replay] ";function _f(e,t="info"){Wt({category:"console",data:{logger:"replay"},level:t,message:`${Hc}${e}`},{level:t})}function CN(){let e=!1,t=!1,r={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return j?(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?on(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 G=CN(),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){j&&G.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():(j&&G.warn("Received worker message with unsuccessful status",n),r(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",n=>{j&&G.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(){j&&G.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=>{j&&G.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){j&&G.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){j&&G.exception(i,"Failed to add events when switching buffers.")}}};function NN({useCompression:e,workerUrl:t}){if(e&&window.Worker){let r=AN(t);if(r)return r}return j&&G.log("Using simple buffer"),new Kc}function AN(e){try{let t=e||MN();if(!t)return;j&&G.log(`Using compression worker${e?` from ${e}`:""}`);let r=new Worker(t);return new Hf(r)}catch(t){j&&G.exception(t,"Failed to create compression worker")}}function MN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?RN():""}function rm(){try{return"sessionStorage"in he&&!!he.sessionStorage}catch{return!1}}function LN(e){ON(),e.session=void 0}function ON(){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||Me(),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 PN(e,t){return W_(e)?"session":t?"buffer":!1}function u_({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){let o=PN(e,t),i=j_({sampled:o,previousSessionId:n});return r&&su(i),i}function DN(){if(!rm())return null;try{let e=he.sessionStorage.getItem(Vf);if(!e)return null;let t=JSON.parse(e);return j&&G.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 UN(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!(!UN(e,{sessionIdleExpire:t,maxReplayDuration:r})||e.sampled==="buffer"&&e.segmentId===0)}function Ef({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){let o=n.stickySession&&DN();return o?Xc(o,{sessionIdleExpire:e,maxReplayDuration:t})?(j&&G.infoTick("Session in sessionStorage is expired, creating new one..."),u_(n,{previousSessionId:o.id})):o:(j&&G.infoTick("Creating new session"),u_(n,{previousSessionId:r}))}function BN(e){return e.type===q.Custom}function nm(e,t,r){return V_(e,t)?(G_(e,t,r),!0):!1}function FN(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=HN(t,i.beforeAddRecordingEvent);return s?await n.addEvent(s):void 0}catch(i){let s=i&&i instanceof ka,a=s?"eventBufferOverflow":"eventBufferError",l=D();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?(j&&G.infoTick(`Skipping event with timestamp ${r} because it is after maxReplayDuration`),!1):!0}function HN(e,t){try{if(typeof t=="function"&&BN(e))return t(e)}catch(r){return j&&G.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 zN(e){return e.type==="replay_event"}function d_(e){return e.type==="feedback"}function $N(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)){WN(e,t);return}jN(e,t)}}}function WN(e,t){let r=e.getContext();t.contexts?.trace?.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}function jN(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)||Do(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function GN(e){return t=>{!e.isEnabled()||!om(t)||VN(e,t)}}function VN(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=jr({category:"replay.hydrate-error",data:{url:Lt()}});Ra(e,n)}}function YN(e){let t=D();t&&t.on("beforeAddBreadcrumb",r=>qN(e,r))}function qN(e,t){if(!e.isEnabled()||!Y_(t))return;let r=KN(t);r&&Ra(e,r)}function KN(e){return!Y_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?XN(e):jr(e)}function XN(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return jr(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=ct(o,7);return JSON.stringify(i).length>Dc?(r=!0,`${JSON.stringify(i,null,2).slice(0,Dc)}\u2026`):i}catch{}return o});return jr({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Y_(e){return!!e.category}function JN(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Jc(){let e=H().getPropagationContext().dsc;e&&delete e.replay_id;let t=le();if(t){let r=Be(t);delete r.replay_id}}function p_(e){let t=H().getPropagationContext().dsc;t&&(t.replay_id=e);let r=le();if(r){let n=Be(r);n.replay_id=e}}function ZN(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:q.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 QN(e,t){return e.recordingMode!=="buffer"||t.message===Yf||!t.exception||t.type?!1:W_(e.getOptions().errorSampleRate)}function eA(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(zN(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(),ZN(e,t),t;if(JN(t,r)&&!e.getOptions()._experiments.captureExceptions)return j&&G.log("Ignoring error from rrweb internals",t),null;let o=QN(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:q.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 tA(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 rA(e){return t=>{if(!e.isEnabled())return;let r=tA(t);r!==null&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(au(e,[r]),!1)))}}function nA(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:Cp(t,D())}function q_(e,t){e.isEnabled()&&t!==null&&(nA(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 wa(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function zn(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}=oA(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 oA(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Vy,r=iA(e);if(t){let n=e.slice(0,Vy);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 iA(e){let t=e[0],r=e[e.length-1];return t==="["&&r==="]"||t==="{"&&r==="}"}function Qc(e,t){let r=sA(e);return Ze(r,t)}function sA(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 aA(e,t,r){try{let n=await cA(e,t,r),o=X_("resource.fetch",n);q_(r.replay,o)}catch(n){j&&G.exception(n,"Failed to capture fetch breadcrumb")}}function lA(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 cA(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=Qc(s,r.networkDetailAllowUrls)&&!Qc(s,r.networkDetailDenyUrls),p=d?uA(r,t.input,c):wa(c),f=await dA(d,r,t.response,u);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:l,request:p,response:f}}function uA({networkCaptureBodies:e,networkRequestHeaders:t},r,n){let o=r?mA(r,t):{};if(!e)return zn(o,n,void 0);let i=Lc(r),[s,a]=Mc(i,G),l=zn(o,n,s);return a?Zc(l,a):l}async function dA(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,o){if(!e&&o!==void 0)return wa(o);let i=n?J_(n.headers,r):{};if(!n||!t&&o!==void 0)return zn(i,o,void 0);let[s,a]=await fA(n),l=pA(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?Zc(l,a):l}function pA(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:o}){try{let i=e?.length&&r===void 0?lu(e):r;return n?t?zn(o,i,e):zn(o,i,void 0):wa(i)}catch(i){return j&&G.exception(i,"Failed to serialize response body"),zn(o,r,void 0)}}async function fA(e){let t=gA(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?(j&&G.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(j&&G.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 mA(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 gA(e){try{return e.clone()}catch(t){j&&G.exception(t,"Failed to clone response body")}}function hA(e){return new Promise((t,r)=>{let n=Do(()=>r(new Error("Timeout while trying to read response body")),500);SA(e).then(o=>t(o),o=>r(o)).finally(()=>clearTimeout(n))})}async function SA(e){return await e.text()}async function vA(e,t,r){try{let n=_A(e,t,r),o=X_("resource.xhr",n);q_(r.replay,o)}catch(n){j&&G.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")):bA(r.response,r.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function _A(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||!Qc(l,r.networkDetailAllowUrls)||Qc(l,r.networkDetailDenyUrls)){let R=wa(d),_=wa(p);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:R,response:_}}let f=a[Ir],h=f?Wf(f.request_headers,r.networkRequestHeaders):{},y=Wf(pa(a),r.networkResponseHeaders),[k,g]=r.networkCaptureBodies?Mc(s,G):[void 0],[S,v]=r.networkCaptureBodies?EA(a):[void 0],E=zn(h,d,k),C=zn(y,p,S);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:g?Zc(E,g):E,response:v?Zc(C,v):C}}function EA(e){let t=[];try{return[e.responseText]}catch(r){t.push(r)}try{return TA(e.response,e.responseType)}catch(r){t.push(r)}return j&&G.warn("Failed to get xhr response body",...t),[void 0]}function TA(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 j&&G.exception(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&G.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function bA(e,t){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return lu(r)}catch{return}}function kA(e){let t=D();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)=>wA(a,l,c))}catch{}}function wA(e,t,r){if(t.data)try{IA(t)&&RA(r)&&(yA(t,r),vA(t,r,e)),xA(t)&&CA(r)&&(lA(t,r),aA(t,r,e))}catch(n){j&&G.exception(n,"Error when enriching network breadcrumb")}}function IA(e){return e.category==="xhr"}function xA(e){return e.category==="fetch"}function RA(e){return e?.xhr}function CA(e){return e?.input!==void 0}function NA(e){let t=D();ua(cN(e)),pn(rA(e)),YN(e),kA(e);let r=eA(e);Xs(r),t&&(t.on("beforeSendEvent",GN(e)),t.on("afterSendEvent",$N(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 AA(e){try{return Promise.all(au(e,[MA(he.performance.memory)]))}catch{return[]}}function MA(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 LA(e,t,r){return Ap(e,t,{...r,setTimeoutImpl:Do})}var Fc=U.navigator;function OA(){return/iPhone|iPad|iPod/i.test(Fc?.userAgent??"")||/Macintosh/i.test(Fc?.userAgent??"")&&Fc?.maxTouchPoints&&Fc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function PA(e){let t=!1;return(r,n)=>{if(!e.checkAndHandleExpiredSession()){j&&G.warn("Received replay event after session expired.");return}let o=n||!t;t=!0,DA(r),e.clickDetector&&oN(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(BA(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){let s=e.eventBuffer.getEarliestTimestamp();s&&(j&&G.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 DA(e){let t=e.data;if(!(e.type!==q.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Y.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(let r of t.attributes){let n=Rr.mirror.getNode(r.id),o=n&&Rr.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 UA(e){let t=e.getOptions();return{type:q.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 BA(e,t){!t||e.session?.segmentId!==0||nm(e,UA(e),!1)}function FA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function HA(e,t,r,n){return _t(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 zA({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 $A({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 WA({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:o,session:i}){let s=zA({recordingData:e,headers:{segment_id:r}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=n,d=D(),p=H(),f=d?.getTransport(),h=d?.getDsn();if(!d||!f||!h||!i.sampled)return Promise.resolve({});let y={type:NR,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},k=await $A({scope:p,client:d,replayId:t,event:y});if(!k)return d.recordDroppedEvent("event_processor","replay"),j&&G.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete k.sdkProcessingMetadata;let g=HA(k,s,h,d.getOptions().tunnel),S;try{S=await f.send(g)}catch(E){let C=new Error(Yf);try{C.cause=E}catch{}throw C}let v=ea({},S);if(Qs(v,"replay"))throw new Ia(v);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}`)}},Ia=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:DR}){let{recordingData:r,onError:n}=e;if(r.length)try{return await WA(e),!0}catch(o){if(o instanceof eu||o instanceof Ia)throw o;if(xo("Replays",{_retryCount:t.count}),n&&n(o),t.count>=UR){let i=new Error(`${Yf} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Do(async()=>{try{await Z_(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var Q_="__THROTTLED",jA="__SKIPPED";function GA(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?jA: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:AR,sessionIdleExpire:MR},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=LA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=GA((s,a)=>FN(this,s,a),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:o}=this.getOptions(),i=n?{threshold:Math.min(BR,n),timeout:n,scrollTimeout:FR,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Uf(this,i)),j){let s=t._experiments;G.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{he.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=jr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=jr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{fN(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){j&&G.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){j&&G.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",j&&G.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){j&&G.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){j&&G.log("Buffering is in progress, call `flush()` to save the replay");return}j&&G.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){j&&G.log("Buffering is in progress, call `flush()` to save the replay");return}j&&G.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=Rr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:PR}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:PA(this),...OA(),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";D()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{j&&G.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,LN(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),j&&G.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),j&&G.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let r=Date.now();j&&G.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=jr({category:"replay.throttled"});this.addUpdate(()=>!nm(this,{type:qC,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return n}getCurrentRoute(){let t=this.lastActiveSpan||le(),r=t&&ie(t),o=(r&&$(r).data||{})[$e];if(!(!r||!o||!["route","custom"].includes(o)))return $(r).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=NN({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&D()?.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||(NA(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()){j&&G.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:q.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=SN(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){j&&G.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await AA(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=D();if(n){let o;r instanceof Ia?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()){j&&G.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){j&&G.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&&j&&G.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=FA(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=jr({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function ga(e,t){return[...e,...t].join(",")}function VA({mask:e,unmask:t,block:r,unblock:n,ignore:o}){let i=["base","iframe[srcdoc]:not([src])"],s=ga(e,[".sentry-mask","[data-sentry-mask]"]),a=ga(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ga(r,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:ga(n,[]),ignoreSelector:ga(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function YA({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"]',qA=["content-length","content-type","accept"],KA=Symbol.for("sentry__originalRequestBody"),g_=!1,h_=!1;function XA(){if(typeof Request>"u"||h_)return;let e=Request;try{let t=function(r,n){let o=new e(r,n);return n?.body!=null&&(o[KA]=n.body),o};t.prototype=e.prototype,U.Request=t,h_=!0}catch{}}var im=(e=>new Gf(e)),Gf=class{constructor({flushMinDelay:t=LR,flushMaxDelay:r=OR,minReplayDuration:n=HR,maxReplayDuration:o=Yy,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:k=[],networkDetailDenyUrls:g=[],networkCaptureBodies:S=!0,networkRequestHeaders:v=[],networkResponseHeaders:E=[],mask:C=[],maskAttributes:R=["title","placeholder","aria-label"],unmask:_=[],block:w=[],unblock:z=[],ignore:I=[],maskFn:P,beforeAddRecordingEvent:W,beforeErrorSampling:K,onError:V,attachRawBodyFromRequest:Pe=!1}={}){this.name="Replay";let ue=VA({mask:C,unmask:_,block:w,unblock:z,ignore:I});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(fe,L,b)=>YA({maskAttributes:R,maskAllText:c,privacyOptions:ue,key:fe,value:L,el:b}),...ue,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:fe=>{try{fe.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:r,minReplayDuration:Math.min(n,zR),maxReplayDuration:Math.min(o,Yy),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:y,networkDetailAllowUrls:k,networkDetailDenyUrls:g,networkCaptureBodies:S,networkRequestHeaders:S_(v),networkResponseHeaders:S_(E),beforeAddRecordingEvent:W,beforeErrorSampling:K,onError:V,attachRawBodyFromRequest:Pe,_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&&ir())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return g_}set _isInitialized(t){g_=t}afterAllSetup(t){!ir()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&XA(),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&&On(t,{"sentry.replay_id":r})}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let r=JA(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 JA(e,t){let r=t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...e},o=$t(r.replaysSessionSampleRate),i=$t(r.replaysOnErrorSampleRate);return o==null&&i==null&&Je(()=>{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[...qA,...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,F.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,u=f=>QA(f,s),d={},p=e.getOptions().propagateTraceparent;r&&Dn(f=>{let h=Up(f,c,u,d,{propagateTraceparent:p,onRequestSpanEnd:l});if(h){let y=sm(f.fetchData.url),k=y?or(y).host:void 0;h.setAttributes({"http.url":y?pt(y):void 0,"server.address":k}),i&&rE(h,e),a?.(h,{headers:f.headers})}}),n&&da(f=>{let h=eM(f,c,u,d,p,l);h&&(i&&rE(h,e),a?.(h,{headers:am(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}var ZA=300;function rE(e,t){let{url:r}=$(e).data;if(!r||typeof r!="string")return;let n=()=>{setTimeout(o)};if(et(t)){let i=e.end.bind(e);e.end=s=>{let a=s??ae(),l=!1,c=()=>{l||(l=!0,setTimeout(o),i(a),clearTimeout(u))};n=c;let u=setTimeout(c,ZA)}}let o=wr("resource",({entries:i})=>{i.forEach(s=>{tE(s)&&s.name.endsWith(r)&&(e.setAttributes(la(s)),n())})})}function QA(e,t){let r=Lt();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?Ze(n.toString(),t)||i&&Ze(n.pathname,t):i}else{let n=!!e.match(/^\/(?!\/)/);return t?Ze(e,t):n}}function eM(e,t,r,n,o,i){let s=e.xhr,a=s?.[Ir];if(!s||s.__sentry_own_request__||!a)return;let{url:l,method:c}=a,u=We()&&t(l);if(e.endTimestamp){let S=s.__sentry_xhr_span_id__;if(!S)return;let v=n[S];v&&(u&&a.status_code!==void 0&&(li(v,a.status_code),v.end(),i?.(v,{headers:am(pa(s)),error:e.error})),delete n[S]);return}let d=sm(l),p=d?or(d):or(l),f=pt(Ql(l)),h=D(),k=!!le()||!!h&&et(h),g=u&&k?Ve({name:`${c} ${f}`,attributes:{url:pt(l),type:"xhr","http.method":c,"http.url":d?pt(d):void 0,"server.address":p?.host,[ee]:"auto.http.browser",[_e]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Qe;return u&&!k&&h?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=g.spanContext().spanId,n[s.__sentry_xhr_span_id__]=g,r(l)&&tM(s,We()&&k?g:void 0,o),h&&h.emit("beforeOutgoingRequestSpan",g,e),g}function tM(e,t,r){let{"sentry-trace":n,baggage:o,traceparent:i}=_i({span:t,propagateTraceparent:r});n&&rM(e,n,o,i)}function rM(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,nM=9e4,oM=["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)}}}),Dn(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!oM.some(l=>t.startsWith(l)))return;let r=e.fetchData?.url||"",n=e.fetchData?.method||"GET",o=Fr(r),i=r.startsWith("data:")?pt(r):o?gi(o):r,s=Ve({name:`${n} ${i}`,startTime:e.endTimestamp,attributes:{url:pt(r),"http.method":n,type:"fetch",[_e]:"http.client.stream",[ee]:"auto.http.browser.stream"}});oE.set(e.response,s);let a=setTimeout(()=>{s.isRecording()&&s.end()},nM);iE.set(e.response,a)}})}});function aE(){F.document?F.document.addEventListener("visibilitychange",()=>{let e=le();if(!e)return;let t=ie(e);if(F.document.hidden&&t){let r="cancelled",{op:n,status:o}=$(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 iM=3600,lE="sentry_previous_trace",sM="sentry.previous_trace";function cE(e,{linkPreviousTrace:t,consistentTraceSampling:r}){let n=t==="session-storage",o=n?cM():void 0;e.on("spanStart",s=>{if(ie(s)!==s)return;let a=H().getPropagationContext();o=aM(o,s,a),n&&lM(o)});let i=!0;r&&e.on("beforeSampling",s=>{if(!o)return;let a=H(),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 aM(e,t,r){let n=$(t);function o(){try{let a=Number(n.data?.[en]??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<=iM&&(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(sM,`${s.traceId}-${s.spanId}-${cm(s)?1:0}`)),i)}function lM(e){try{F.sessionStorage.setItem(lE,JSON.stringify(e))}catch(t){xe&&T.warn("Could not store previous trace in sessionStorage",t)}}function cM(){try{let e=F.sessionStorage?.getItem(lE);return JSON.parse(e)}catch{return}}function cm(e){return e.traceFlags===1}var uM="BrowserTracing",dM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function mE(){let e=F.navigator;return e?.userAgent?dM.test(e.userAgent):!1}var pM={...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&&Je(()=>{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=F.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:k,shouldCreateSpanForRequest:g,enableHTTPTimings:S,ignoreResourceSpans:v,ignorePerformanceApiSpans:E,instrumentPageLoad:C,instrumentNavigation:R,detectRedirects:_,linkPreviousTrace:w,consistentTraceSampling:z,enableReportPageLoaded:I,onRequestSpanStart:P,onRequestSpanEnd:W}={...pM,...e},K=mE(),V,Pe,ue;function fe(L,b,x=!0){let A=b.op==="pageload",oe=b.name,J=c?c(b):b,ot=J.attributes||{};if(oe!==J.name&&(ot[$e]="custom",J.attributes=ot),!x){let Jt=Ct();Ve({...J,startTime:Jt}).end(Jt);return}t.name=J.name,t.source=ot[$e];let Ie=Jl(J,{idleTimeout:u,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:A,beforeSpanEnd:Jt=>{V?.();let Zt=et(L);tf(Jt,{recordClsOnPageloadSpan:!Zt&&!a,recordLcpOnPageloadSpan:!Zt&&!l,ignoreResourceSpans:v,ignorePerformanceApiSpans:E,spanStreamingEnabled:Zt}),pE(L,void 0);let Ss=H(),co=Ss.getPropagationContext();Ss.setPropagationContext({...co,traceId:Ie.spanContext().traceId,sampled:Mt(Ie),dsc:Be(Jt)}),A&&(ue=void 0)},trimIdleSpanEndTimestamp:!I});A&&I&&(ue=Ie),pE(L,Ie);function it(){r&&["interactive","complete"].includes(r.readyState)&&L.emit("idleSpanEnableAutoFinish",Ie)}A&&!I&&r&&(r.addEventListener("readystatechange",()=>{it()}),it())}return{name:uM,setup(L){if(K){xe&&T.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}jl();let b=et(L);if(V=Jp({recordClsStandaloneSpans:b?void 0:a||!1,recordLcpStandaloneSpans:b?void 0:l||!1,client:L}),b?(lf(L),cf(L),n&&uf()):n&&of(),i&&U.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Qp():o&&Zp(),s&&ef(),_&&r){let A=()=>{Pe=ae()};addEventListener("click",A,{capture:!0}),addEventListener("keydown",A,{capture:!0,passive:!0})}function x(){let A=Ca(L);A&&!$(A).timestamp&&(xe&&T.log(`[Tracing] Finishing current active span with op: ${$(A).op}`),A.setAttribute(tn,"cancelled"),A.end())}L.on("startNavigationSpan",(A,oe)=>{if(D()!==L)return;if(oe?.isRedirect){xe&&T.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),fe(L,{op:"navigation.redirect",...A},!1);return}Pe=void 0,x(),be().setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:We()?void 0:ut()});let J=H();J.setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:We()?void 0:ut()}),J.setSDKProcessingMetadata({normalizedRequest:void 0}),fe(L,{op:"navigation",...A,parentSpan:null,forceTransaction:!0})}),L.on("startPageLoadSpan",(A,oe={})=>{if(D()!==L)return;x();let J=oe.sentryTrace||uE("sentry-trace")||dE("sentry-trace"),ot=oe.baggage||uE("baggage")||dE("baggage"),Ie=tp(J,ot),it=H();it.setPropagationContext(Ie),We()||(it.getPropagationContext().propagationSpanId=ut()),it.setSDKProcessingMetadata({normalizedRequest:bi()}),fe(L,{op:"pageload",...A})}),L.on("endPageloadSpan",()=>{I&&ue&&(ue.setAttribute(tn,"reportPageLoaded"),ue.end())})},afterAllSetup(L){if(K)return;let b=Lt();if(w!=="off"&&cE(L,{linkPreviousTrace:w,consistentTraceSampling:z}),F.location){if(C){let x=me();gE(L,{name:F.location.pathname,startTime:x?x/1e3:void 0,attributes:{[$e]:"url",[ee]:"auto.pageload.browser"}})}R&&pn(({to:x,from:A})=>{if(A===void 0&&b?.indexOf(x)!==-1){b=void 0;return}b=void 0;let oe=Fr(x),J=Ca(L),ot=J&&_&&mM(J,Pe);hE(L,{name:oe?.pathname||F.location.pathname,attributes:{[$e]:"url",[ee]:"auto.navigation.browser"}},{url:x,isRedirect:ot})})}f&&aE(),s&&fM(L,u,d,p,t),n&&sf(),nE(L,{traceFetch:h,traceXHR:y,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:g,enableHTTPTimings:S,onRequestSpanStart:P,onRequestSpanEnd:W}),k&&L.addIntegration(sE())}}});function gE(e,t,r){e.emit("startPageLoadSpan",t,r),H().setTransactionName(t.name);let n=Ca(e);return n&&e.emit("afterStartPageLoadSpan",n),n}function hE(e,t,r){let{url:n,isRedirect:o}=r||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=H();return i.setTransactionName(t.name),n&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...bi(),url:n}}),Ca(e)}function uE(e){return F.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function dE(e){return F.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(n=>n.name===e)?.description}function fM(e,t,r,n,o){let i=F.document,s,a=()=>{let l="ui.action.click",c=Ca(e);if(c){let u=$(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(tn,"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:{[$e]: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){ye(e,SE,t)}var fE=1.5;function mM(e,t){let r=$(e),n=Ct(),o=r.start_timestamp;return!(n-o>fE||t&&n-t<=fE)}var ME=vr(mn(),1);function AE(e){return er(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function hm(e){let t={...e};na(t,"react"),xo("react",{version:ME.version});let r=hf(t);return oi(NM),r}function NM(e){return AE(e)?"[SyntheticEvent]":fa(e)}var LE=vr(mn(),1);function AM(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function MM(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(AM(LE.version)&&Qt(e)&&t){let n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,MM(e,n)}return nr(n=>(n.setContext("react",{componentStack:t}),on(e,r)))}var Bo=vr(mn(),1);var PE=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Sm={componentStack:null,error:null,eventId:null},Aa=class extends Bo.Component{constructor(t){super(t),this.state=Sm,this._openFallbackReportDialog=!0;let r=D();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;nr(l=>{o&&o(l,t,n);let c=this.props.handled!=null?this.props.handled:!!this.props.fallback,u=OE(t,r,{mechanism:{handled:c,type:"auto.function.react.error_boundary"}});i&&i(t,n,u),s&&(this._lastEventId=u,this._openFallbackReportDialog&&Pc({...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"?Bo.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return Bo.isValidElement(o)?o:(t&&PE&&T.warn("fallback did not produce a valid ReactElement"),null)}};function vm(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 gn=window.__vidfarmSentry,UE=gn?.dsn?.trim()||"";if(UE){let e=gn?.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,...gn?.tracePropagationTargets??[]].filter(Boolean)));hm({dsn:UE,environment:e,release:gn?.release?.trim()||void 0,integrations:[um(),im({maskAllText:!0,blockAllMedia:!0})],tracesSampleRate:vm(gn?.tracesSampleRate,t),tracePropagationTargets:o,replaysSessionSampleRate:vm(gn?.replaysSessionSampleRate,r),replaysOnErrorSampleRate:vm(gn?.replaysOnErrorSampleRate,1),enableLogs:gn?.enableLogs??!0,sendDefaultPii:gn?.sendDefaultPii??!0})}var we=vr(mn(),1),Rk=vr(ok(),1);var ik=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},sk=(e=>e?ik(e):ik);var bl=vr(mn(),1);var P2=e=>e;function ze(e,t=P2){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 D2="[vidfarm]";function U2(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)),U2(e)&&console[e==="debug"?"log":e](D2,t,r??"")}function kl(e,t){ak("info",e,t)}function In(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=>{In("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=>{In("window.unhandledrejection",{reason:e.reason instanceof Error?e.reason.stack:e.reason})}))}var re=vr(mn(),1);function Jr(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 m=vr(wl(),1);function fk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M10 3v4"}),(0,m.jsx)("path",{d:"M10 13v4"}),(0,m.jsx)("path",{d:"M3 10h4"}),(0,m.jsx)("path",{d:"M13 10h4"}),(0,m.jsx)("path",{d:"m5.8 5.8 2.3 2.3"}),(0,m.jsx)("path",{d:"m11.9 11.9 2.3 2.3"}),(0,m.jsx)("path",{d:"m14.2 5.8-2.3 2.3"}),(0,m.jsx)("path",{d:"m8.1 11.9-2.3 2.3"})]})}function j2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M4.5 4.5h3v11h-3z"}),(0,m.jsx)("path",{d:"M8.7 4.5h3v11h-3z"}),(0,m.jsx)("path",{d:"m13.4 5.1 2.3-.6 2.2 10.7-2.3.6z"})]})}function G2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("circle",{cx:"10",cy:"10",r:"7.2"}),(0,m.jsx)("path",{d:"M10 6.3v4.1l2.8 1.7"})]})}function mk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M14.8 15.2a5.4 5.4 0 1 0-9.6 0"}),(0,m.jsx)("circle",{cx:"10",cy:"6.8",r:"3.1"})]})}function hk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:[(0,m.jsx)("circle",{cx:"4.2",cy:"10",r:"1.45"}),(0,m.jsx)("circle",{cx:"10",cy:"10",r:"1.45"}),(0,m.jsx)("circle",{cx:"15.8",cy:"10",r:"1.45"})]})}function V2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",children:[(0,m.jsx)("path",{d:"M3.5 5.5h13"}),(0,m.jsx)("path",{d:"M3.5 10h13"}),(0,m.jsx)("path",{d:"M3.5 14.5h13"})]})}function Y2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.8"}),(0,m.jsx)("path",{d:"m13 13 4.2 4.2"})]})}function q2(){return(0,m.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:(0,m.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 K2(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 X2({account:e}){let t=(0,re.useRef)(null),r=e.isLoggedIn?[{id:"discover",href:Jr("/discover",e.userId),label:"Discover",icon:(0,m.jsx)(fk,{})},{id:"library",href:Jr("/library",e.userId),label:"Library",icon:(0,m.jsx)(j2,{})},{id:"calendar",href:Jr("/calendar",e.userId),label:"Calendar",icon:(0,m.jsx)(G2,{})},{id:"settings",href:Jr("/settings",e.userId),label:"Settings",icon:(0,m.jsx)(mk,{})}]:[{id:"discover",href:"/discover",label:"Discover",icon:(0,m.jsx)(fk,{})},{id:"login",href:"/login",label:"Login",icon:(0,m.jsx)(mk,{})}],n=e.isLoggedIn?[{id:"chat",href:Jr("/chat",e.userId),label:"Chat"},{id:"job-runs",href:Jr("/job-runs",e.userId),label:"Run History"},{id:"inpaint",href:Jr("/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,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("nav",{className:"primary-nav","aria-label":"Primary",children:[r.map(i=>(0,m.jsxs)("a",{className:`nav-link${i.id==="discover"?" is-active":""}`,href:i.href,children:[(0,m.jsx)("span",{className:"nav-icon","aria-hidden":"true",children:i.icon}),(0,m.jsx)("span",{children:i.label})]},i.id)),n.map(i=>"href"in i?(0,m.jsx)("a",{className:"nav-link nav-mobile-extra",href:i.href,children:(0,m.jsx)("span",{children:i.label})},`mobile-${i.id}`):(0,m.jsx)("button",{type:"button",className:"nav-link nav-mobile-extra nav-action-link",onClick:()=>{t.current?.open||t.current?.showModal()},children:(0,m.jsx)("span",{children:i.label})},`mobile-${i.id}`)),n.length?(0,m.jsxs)("details",{className:"nav-menu",children:[(0,m.jsxs)("summary",{className:"nav-link nav-menu-trigger","aria-label":"Open navigation menu",children:[(0,m.jsx)("span",{className:"nav-icon nav-menu-desktop-icon","aria-hidden":"true",children:(0,m.jsx)(hk,{})}),(0,m.jsx)("span",{className:"nav-icon nav-menu-mobile-icon","aria-hidden":"true",children:(0,m.jsx)(V2,{})}),(0,m.jsx)("span",{className:"nav-menu-label",children:"Menu"})]}),(0,m.jsxs)("div",{className:"nav-menu-panel",role:"menu",children:[o.map(i=>(0,m.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,m.jsx)("a",{className:"nav-menu-item",role:"menuitem",href:i.href,children:i.label},i.id):(0,m.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,m.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,m.jsxs)("div",{className:"logout-dialog-head",children:[(0,m.jsx)("div",{className:"label logout-dialog-kicker",children:"Log out"}),(0,m.jsx)("h3",{children:"Log out of this browser?"}),(0,m.jsx)("p",{children:"This clears the stored developer key, workspace access, and local session state for the current browser."})]}),(0,m.jsxs)("div",{className:"toolbar logout-dialog-actions",children:[(0,m.jsx)("button",{type:"button",className:"secondary",onClick:()=>t.current?.close(),children:"Cancel"}),(0,m.jsxs)("form",{method:"post",action:"/logout",onSubmit:()=>K2(e.userId),children:[(0,m.jsx)("input",{type:"hidden",name:"account",value:e.userId??""}),(0,m.jsx)("button",{type:"submit",className:"danger",children:"Yes, log out"})]})]})]}):null]})}function J2({account:e}){let t=e.email?.trim()||"",r=ck({displayName:e.displayName,email:e.email}),n=Jr("/discover",e.userId);return(0,m.jsxs)("a",{className:"brand-lockup",href:n,children:[(0,m.jsx)("img",{className:"brand-logo-image",src:"/assets/logo-vidfarm.png",alt:"VidFarm AI"}),(0,m.jsxs)("div",{className:"brand-copy",children:[(0,m.jsxs)("div",{className:"brand-title brand-title-static",children:["VidFarm",(0,m.jsx)("span",{className:"brand-title-mobile-hidden",children:" AI"})]}),t?(0,m.jsxs)("div",{className:"brand-account-meta",children:[r," ",(0,m.jsxs)("span",{children:["(",t,")"]})]}):null]})]})}function Sk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:[(0,m.jsx)("path",{d:"m5 5 10 10"}),(0,m.jsx)("path",{d:"m15 5-10 10"})]})}function Z2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M10 3v9"}),(0,m.jsx)("path",{d:"m6.5 8.5 3.5 3.5 3.5-3.5"}),(0,m.jsx)("path",{d:"M4 16h12"})]})}function Q2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.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,m.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 eO(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,m.jsx)("path",{d:"M12.4 7.6a3.4 3.4 0 0 1 0 4.8"}),(0,m.jsx)("path",{d:"M14.6 5.4a6.5 6.5 0 0 1 0 9.2"})]})}function tO(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,m.jsx)("path",{d:"m12.6 8 4 4"}),(0,m.jsx)("path",{d:"m16.6 8-4 4"})]})}var vk="vidfarm:discover-muted",hs=typeof window<"u"&&window.localStorage?.getItem(vk)==="1",Lh=new Set;function yk(e){hs=e;try{window.localStorage.setItem(vk,e?"1":"0")}catch{}for(let t of Lh)t()}function _k(e){return Lh.add(e),()=>{Lh.delete(e)}}function Ek(){return(0,re.useSyncExternalStore)(_k,()=>hs,()=>!1)}var Oh=!1,Ph=new Set;function gk(e){Oh=e;for(let t of Ph)t()}function rO({src:e,controls:t=!0}){let r=(0,re.useRef)(null);return(0,re.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=()=>{Oh||(o(),n.muted=hs,n.play().then(()=>{delete n.dataset.mutedFallback}).catch(()=>{n.muted||(n.dataset.mutedFallback="1",n.muted=!0,n.play().catch(()=>{}))}))},a=()=>{!hs&&n.dataset.mutedFallback==="1"&&!n.paused&&(n.muted=!1,delete n.dataset.mutedFallback)};window.addEventListener("pointerdown",a),window.addEventListener("keydown",a);let c=_k(()=>{hs?(delete n.dataset.mutedFallback,n.muted=!0):n.paused||(n.muted=!1)}),u=()=>{Oh?n.paused||n.pause():i&&s()};Ph.add(u);let d=()=>{window.removeEventListener("pointerdown",a),window.removeEventListener("keydown",a),c(),Ph.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,m.jsx)("video",{ref:r,className:"preview","data-src":e,preload:"metadata",playsInline:!0,loop:!0,controls:t})}function nO(){let e=Ek();return(0,m.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:()=>yk(!e),children:e?(0,m.jsx)(tO,{}):(0,m.jsx)(eO,{})})}function oO({text:e,label:t}){let[r,n]=(0,re.useState)(""),o=async()=>{try{await navigator.clipboard.writeText(e),n("done")}catch{n("error")}window.setTimeout(()=>n(""),1600)};return(0,m.jsxs)("button",{className:"pill-tag copy-inline",type:"button","data-state":r,"aria-label":r==="done"?`${t} copied`:t,onClick:()=>{o()},children:[(0,m.jsx)("span",{className:"copy-inline-label",children:t}),(0,m.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)}`:""}`:Jr(`/templates/${encodeURIComponent(e)}/editor/docs`,t)}function iO({templateId:e,accountUserId:t}){return(0,m.jsx)("a",{className:"cta-button",href:Tk(e,t),children:"Editor"})}function sO(e){let{template:t}=e,[r,n]=(0,re.useState)(!1),[o,i]=(0,re.useState)(!1),[s,a]=(0,re.useState)(!1),l=(0,re.useRef)(null),c=t.status==="processing"||t.status==="failed",u=t.visibility==="private"&&!!e.onDeleteTemplate;(0,re.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,m.jsxs)("div",{className:"discover-card-menu",ref:l,children:[(0,m.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,m.jsx)(hk,{})}),r?(0,m.jsxs)("div",{className:"discover-card-menu-panel",role:"menu",children:[(0,m.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{d()},children:o?"Copied!":"Copy ID"}),c?(0,m.jsx)("span",{className:"discover-card-menu-item is-disabled",role:"menuitem","aria-disabled":"true",children:"Open in Editor"}):(0,m.jsx)("a",{className:"discover-card-menu-item",role:"menuitem",href:Tk(t.templateId,e.accountUserId),children:"Open in Editor"}),(0,m.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,m.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 aO(e){let t=`${e.isBookmarked?"Remove bookmark for ":"Bookmark "}${e.title}`;return(0,m.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,m.jsx)(q2,{})})}function lO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function cO(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,m.jsx)(rO,{src:t.previewUrl,controls:!1}):(0,m.jsx)("img",{className:"preview",src:t.previewUrl,alt:`${t.title} preview`,loading:"lazy",decoding:"async"}):(0,m.jsx)("div",{className:"preview preview-empty",children:t.status==="processing"?"Downloading\u2026":"No preview"});return(0,m.jsxs)("li",{className:"discover-card row","data-template-id":t.templateId,children:[t.previewUrl?(0,m.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,m.jsx)("span",{className:"discover-card-media-affordance","aria-hidden":"true",children:"View"})]}):(0,m.jsx)("div",{className:"discover-card-media",children:n}),(0,m.jsxs)("div",{className:"discover-card-copy",children:[(0,m.jsxs)("div",{className:"discover-card-head",children:[(0,m.jsxs)("div",{className:"discover-card-title-wrap",children:[(0,m.jsx)("h2",{children:t.title}),(0,m.jsx)("p",{className:"discover-card-meta",children:cO(t)})]}),(0,m.jsxs)("div",{className:"discover-card-actions",children:[(0,m.jsx)(aO,{templateId:t.templateId,title:t.title,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark}),r?(0,m.jsx)("span",{className:"cta-button discover-card-cta-disabled","aria-disabled":"true",children:t.status==="failed"?"Failed":"Preparing\u2026"}):(0,m.jsx)(iO,{templateId:t.templateId,accountUserId:e.accountUserId}),(0,m.jsx)(sO,{template:t,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.accountUserId})]})]}),(0,m.jsx)("div",{className:"discover-card-body",children:(0,m.jsx)("p",{children:String(t.viralDna||"").trim()||"No layer strategy provided for this composition yet."})}),(0,m.jsxs)("div",{className:"discover-card-tags",children:[t.origin==="raw"?(0,m.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,m.jsx)("div",{className:"pill-tag private-pill",title:"Only visible to your account",children:"Only you"}):null,t.status==="processing"?(0,m.jsx)("div",{className:"pill-tag processing-pill",children:"Processing"}):t.status==="failed"?(0,m.jsx)("div",{className:"pill-tag failed-pill",children:"Download failed"}):null,(0,m.jsx)("div",{className:"pill-tag difficulty-pill","data-difficulty":t.difficulty,children:lO(t.difficulty)}),(0,m.jsx)("div",{className:"pill-tag",children:t.sourceType||(Ad(t.previewUrl)?"Video source":"Image sequence")}),(0,m.jsx)(oO,{text:t.templateId,label:t.templateId})]})]})]})}function uO(e){let{onClose:t,template:r}=e,n=r.previewUrl||"",o=Ad(n),[i,s]=(0,re.useState)(""),a=Ek();(0,re.useEffect)(()=>(gk(!0),()=>gk(!1)),[]);let l=async()=>{try{await navigator.clipboard.writeText(n),s("done")}catch{s("error")}window.setTimeout(()=>s(""),1600)};return(0,re.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,m.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,m.jsxs)("div",{className:"discover-media-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-media-modal-title",onClick:c=>c.stopPropagation(),children:[(0,m.jsxs)("div",{className:"discover-media-modal-head",children:[(0,m.jsx)("h2",{id:"discover-media-modal-title",children:r.title}),(0,m.jsxs)("div",{className:"discover-media-modal-actions",children:[(0,m.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,m.jsx)(Z2,{})}),(0,m.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,m.jsx)(Q2,{})}),(0,m.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close preview",title:"Close",onClick:t,children:(0,m.jsx)(Sk,{})})]})]}),(0,m.jsx)("div",{className:"discover-media-modal-stage",children:o?(0,m.jsx)("video",{src:n,controls:!0,autoPlay:!0,playsInline:!0,preload:"metadata",muted:a,onVolumeChange:c=>{let u=c.currentTarget.muted;u!==hs&&yk(u)}}):(0,m.jsx)("img",{src:n,alt:`${r.title} preview`})})]})})}function dO(e){let{onClose:t}=e,[r,n]=(0,re.useState)(""),[o,i]=(0,re.useState)(null),[s,a]=(0,re.useState)(""),[l,c]=(0,re.useState)(""),[u,d]=(0,re.useState)(""),[p,f]=(0,re.useState)(!1),[h,y]=(0,re.useState)(null);(0,re.useEffect)(()=>{let g=v=>{v.key==="Escape"&&t()},S=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",g),()=>{document.body.style.overflow=S,window.removeEventListener("keydown",g)}},[t]);let k=async()=>{let g=r.trim();if(!g&&!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 S=await(e.onAddTemplate?.({sourceUrl:o?"":g,file:o,title:s.trim(),tagline:l.trim(),notes:u.trim()})??Promise.resolve({ok:!1,error:"Adding templates is unavailable right now."}));f(!1),S.ok?t():y(S.error||"Unable to add that video. Try again.")};return(0,m.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,m.jsxs)("div",{className:"discover-media-modal discover-add-template-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-add-template-title",onClick:g=>g.stopPropagation(),children:[(0,m.jsxs)("div",{className:"discover-media-modal-head",children:[(0,m.jsx)("h2",{id:"discover-add-template-title",children:"Add Template"}),(0,m.jsx)("div",{className:"discover-media-modal-actions",children:(0,m.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close",title:"Close",onClick:t,children:(0,m.jsx)(Sk,{})})})]}),(0,m.jsxs)("form",{className:"discover-add-template-form",onSubmit:g=>{g.preventDefault(),k()},children:[(0,m.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,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsx)("label",{className:"label",htmlFor:"add-template-url",children:"Video URL"}),(0,m.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:g=>n(g.target.value)})]}),(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-file",children:["Or upload a video ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"MP4 / MOV / WebM, up to 200 MB"})]}),o?(0,m.jsxs)("div",{className:"discover-add-template-file-chip",children:[(0,m.jsx)("span",{className:"discover-add-template-file-name",children:o.name}),(0,m.jsxs)("span",{className:"discover-add-template-file-size",children:[(o.size/(1024*1024)).toFixed(1)," MB"]}),(0,m.jsx)("button",{type:"button",className:"discover-add-template-file-clear","aria-label":"Remove selected file",onClick:()=>i(null),children:"\u2715"})]}):(0,m.jsx)("input",{id:"add-template-file",type:"file",accept:"video/mp4,video/quicktime,video/webm,.mp4,.m4v,.mov,.webm",onChange:g=>{let S=g.target.files?.[0]??null;S&&(i(S),n(""),y(null))}})]}),o?(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-title",children:["Title ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"optional \u2014 defaults to the template id"})]}),(0,m.jsx)("input",{id:"add-template-title",type:"text",placeholder:"Name this template\u2026",autoComplete:"off",maxLength:140,value:s,onChange:g=>a(g.target.value)})]}):null,(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-tagline",children:["Tagline ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,m.jsx)("input",{id:"add-template-tagline",type:"text",placeholder:"What makes this video work?",autoComplete:"off",maxLength:140,value:l,onChange:g=>c(g.target.value)})]}),(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-notes",children:["Notes ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,m.jsx)("textarea",{id:"add-template-notes",rows:4,placeholder:"Ideas for how you want to remix this\u2026",maxLength:2e3,value:u,onChange:g=>d(g.target.value)})]}),h?(0,m.jsx)("p",{className:"discover-add-template-error",role:"alert",children:h}):null,(0,m.jsxs)("div",{className:"toolbar discover-add-template-actions",children:[(0,m.jsx)("button",{type:"button",className:"secondary",onClick:t,disabled:p,children:"Cancel"}),(0,m.jsx)("button",{type:"submit",className:"cta-button discover-add-template-submit",disabled:p,children:p?o?"Uploading\u2026":"Adding\u2026":"Add Template"})]})]})]})})}function pO(e){if(e.loading)return(0,m.jsx)("ul",{className:"discover-list",children:(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading categories\u2026"})});if(e.error)return(0,m.jsx)("ul",{className:"discover-list",children:(0,m.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,m.jsx)("ul",{className:"discover-list",children:(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:t?"No categories match your search.":"No categories 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,m.jsx)("div",{className:"discover-popular",children:n.map(o=>(0,m.jsxs)("section",{className:"discover-popular-group",children:[(0,m.jsx)("h3",{className:"discover-popular-group-label",children:o.label}),(0,m.jsx)("ul",{className:"discover-list",children:o.items.map(i=>(0,m.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 fO(e){let[t,r]=(0,re.useState)(null),[n,o]=(0,re.useState)(null),[i,s]=(0,re.useState)(!1),[a,l]=(0,re.useState)(null),[c,u]=(0,re.useState)(!1),d=e.stack.length?e.stack[0].id:null;(0,re.useEffect)(()=>(window.__VF_SWIPE_SOUND__=c,window.__VF_SWIPE_SOUND_TOP__=d,()=>{window.__VF_SWIPE_SOUND__=!1,window.__VF_SWIPE_SOUND_TOP__=null}),[c,d]);let p=(0,re.useRef)(null),f=110,h=(g,S)=>{!g||i||(s(!0),l(null),o({id:g.id,dir:S}),window.setTimeout(async()=>{let v=S==="right"?e.onApprove:e.onReject;try{let E=await v?.(g.id);E&&!E.ok&&l(E.error??"Action failed.")}finally{o(null),r(null),p.current=null,s(!1)}},260))};if(!e.isLoggedIn)return(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"Swipe is for your product"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"Log in to auto-generate ads from viral templates and swipe to approve."}),(0,m.jsx)("a",{className:"swipe-empty-cta",href:"/login",children:"Log in"})]});if(!e.productSet)return(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"Tell us about your product"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"Swipe auto-recuts viral templates into ads for your product. Add a product / offer description in Settings to start the deck."}),(0,m.jsx)("a",{className:"swipe-empty-cta",href:"/settings",children:"Open Settings"})]});if(e.error)return(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"Couldn't load your deck"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:e.error})]});if(e.stack.length===0)return e.loading||e.customizing>0||e.refilling?(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("div",{className:"swipe-spinner","aria-hidden":"true"}),(0,m.jsx)("p",{className:"swipe-empty-title",children:"Customizing fresh clips\u2026"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"Recutting viral templates into ads for your product."})]}):(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"You're all caught up"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"No more templates to customize right now. Check back as new ones are added."})]});let y=e.stack.slice(0,4),k=y[0];return(0,m.jsxs)("div",{className:"swipe-deck-wrap",children:[(0,m.jsxs)("div",{className:"swipe-deck-row",children:[(0,m.jsx)("button",{type:"button",className:"swipe-action swipe-action-reject",disabled:i,onClick:()=>h(k,"left"),"aria-label":"Reject",children:"\u2715"}),(0,m.jsxs)("div",{className:"swipe-deck",children:[(0,m.jsx)("button",{type:"button",className:"swipe-sound",onClick:()=>u(g=>!g),"aria-label":c?"Mute preview":"Play preview with sound","aria-pressed":c,title:c?"Mute":"Sound on",children:c?"\u{1F50A}":"\u{1F507}"}),y.map((g,S)=>{let v=S===0,E=n?.id===g.id,C=v&&t?.id===g.id,R=S<=1&&!!g.previewUrl,_=C?t.dx:0,w=C?t.dy:0,z,I;E?(z=`translate(${n.dir==="right"?130:-130}%, ${w}px) rotate(${n.dir==="right"?22:-22}deg)`,I="transform 0.26s ease-in"):v?(z=`translate(${_}px, ${w*.25}px) rotate(${_/22}deg)`,I=C?"none":"transform 0.2s ease"):(z=`translateY(${S*12}px) scale(${1-S*.04})`,I="transform 0.2s ease");let P=C?t.dx>40?"approve":t.dx<-40?"reject":null:null;return(0,m.jsxs)("div",{className:"swipe-card",style:{transform:z,transition:I,zIndex:100-S},onPointerDown:v&&!i?W=>{p.current={x:W.clientX,y:W.clientY},W.currentTarget.setPointerCapture?.(W.pointerId)}:void 0,onPointerMove:v&&!i?W=>{p.current&&r({id:g.id,dx:W.clientX-p.current.x,dy:W.clientY-p.current.y})}:void 0,onPointerUp:v&&!i?()=>{let W=t?.id===g.id?t.dx:0;p.current=null,W>f?h(g,"right"):W<-f?h(g,"left"):r(null)}:void 0,onPointerCancel:v?()=>{p.current=null,r(null)}:void 0,children:[R?(0,m.jsx)("iframe",{className:"swipe-card-preview",src:g.previewUrl??void 0,title:g.title,loading:"lazy",scrolling:"no",allow:"autoplay",style:{pointerEvents:"none"}}):(0,m.jsx)("div",{className:"swipe-card-fallback",children:(0,m.jsx)("span",{children:g.title})}),(0,m.jsxs)("div",{className:"swipe-card-overlay",children:[(0,m.jsx)("div",{className:"swipe-card-title",children:g.title}),g.caption?(0,m.jsx)("div",{className:"swipe-card-caption",children:g.caption}):null]}),P==="approve"?(0,m.jsx)("div",{className:"swipe-stamp swipe-stamp-yes",children:"Approve"}):null,P==="reject"?(0,m.jsx)("div",{className:"swipe-stamp swipe-stamp-no",children:"Reject"}):null]},g.id)})]}),(0,m.jsx)("button",{type:"button",className:"swipe-action swipe-action-approve",disabled:i,onClick:()=>h(k,"right"),"aria-label":"Approve",children:"\u2713"})]}),(0,m.jsx)("div",{className:"swipe-status",children:e.customizing>0||e.refilling?"Customizing more\u2026":`${e.stack.length} ready`}),a?(0,m.jsx)("div",{className:"swipe-action-error",children:a}):null]})}function kk(e){let t=!e.loading&&!e.error&&e.templates.length>0&&e.visibleTemplates.length===0,[r,n]=(0,re.useState)(null),[o,i]=(0,re.useState)(!1),s=e.view==="popular",a=e.view==="swipe",l=p=>e.onViewChange?.(p),c=s?"Search categories":e.loading||e.error?"Search Templates":`Search ${e.visibleTemplates.length} Template${e.visibleTemplates.length===1?"":"s"}`,u=!0,d=e.account.isLoggedIn;return(0,m.jsxs)("section",{className:`frame discover-frame${u?" has-chat-rail":""}`,children:[(0,m.jsxs)("header",{className:"topbar",children:[(0,m.jsx)(J2,{account:e.account}),(0,m.jsx)("div",{className:"topbar-actions",children:(0,m.jsx)(X2,{account:e.account})})]}),(0,m.jsx)("div",{className:"frame-body",children:(0,m.jsxs)("section",{className:"discover-shell",children:[(0,m.jsxs)("div",{className:"discover-filter-bar",role:"toolbar","aria-label":"Composition filters",children:[(0,m.jsxs)("div",{className:"view-toggle discover-view-toggle",role:"tablist","aria-label":"Discover view",children:[(0,m.jsx)("button",{type:"button",className:`view-toggle-tab${!s&&!a?" is-active":""}`,role:"tab","aria-selected":!s&&!a,onClick:()=>l("feed"),children:"Feed"}),(0,m.jsx)("button",{type:"button",className:`view-toggle-tab${a?" is-active":""}`,role:"tab","aria-selected":a,onClick:()=>l("swipe"),children:"Swipe"}),(0,m.jsx)("button",{type:"button",className:`view-toggle-tab${s?" is-active":""}`,role:"tab","aria-selected":s,onClick:()=>l("popular"),children:"Category"})]}),(0,m.jsx)(nO,{}),(0,m.jsxs)("div",{className:"discover-filter-search search-field",children:[(0,m.jsx)("span",{className:"search-icon","aria-hidden":"true",children:(0,m.jsx)(Y2,{})}),(0,m.jsx)("input",{id:"search",type:"search",placeholder:c,autoComplete:"off",value:e.searchQuery,onChange:p=>e.onSearchQueryChange?.(p.target.value)})]}),!s&&!a?(0,m.jsxs)("label",{className:"discover-filter-toggle",htmlFor:"bookmarks-only","data-active":e.bookmarksOnly?"true":"false",children:[(0,m.jsx)("span",{className:"discover-filter-toggle-label",children:"Saved"}),(0,m.jsxs)("span",{className:"switch-shell","data-active":e.bookmarksOnly?"true":"false",children:[(0,m.jsx)("input",{id:"bookmarks-only",className:"switch-input",type:"checkbox",checked:e.bookmarksOnly,onChange:p=>e.onBookmarksOnlyChange?.(p.target.checked)}),(0,m.jsx)("span",{className:"switch-knob"})]})]}):null,e.account.isLoggedIn?(0,m.jsx)("button",{type:"button",className:"discover-add-template-button",onClick:()=>i(!0),children:"Add Template"}):(0,m.jsx)("a",{className:"discover-add-template-button",href:"/login",children:"Add Template"})]}),(0,m.jsx)("section",{className:"discover-results",children:(0,m.jsx)("div",{className:"discover-results-scroll",children:(0,m.jsx)("div",{className:"discover-list-scroll",children:a?(0,m.jsx)(fO,{stack:e.swipeStack,loading:e.swipeLoading,loaded:e.swipeLoaded,error:e.swipeError,customizing:e.swipeCustomizing,targetDepth:e.swipeTargetDepth,productSet:e.swipeProductSet,refilling:e.swipeRefilling,isLoggedIn:e.account.isLoggedIn,onApprove:e.onSwipeApprove,onReject:e.onSwipeReject}):s?(0,m.jsx)(pO,{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,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("ul",{className:"discover-list",id:"template-list",children:e.loading?(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading compositions..."}):e.error?(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"Unable to load compositions."}):e.templates.length===0?(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"No compositions available."}):e.visibleTemplates.map(p=>(0,m.jsx)(bk,{template:p,isBookmarked:e.bookmarks.has(p.templateId),onToggleBookmark:e.onToggleBookmark,onOpenPreview:n,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.account.userId},p.templateId))}),(0,m.jsx)("div",{className:"empty-state empty",id:"empty-state","data-visible":t?"true":"false",children:"No compositions match the current search and filter combination."})]})})})})]})}),u?(0,m.jsx)("aside",{className:"editor-right-rail","aria-label":"Discover copilot",children:d?(0,m.jsx)("div",{className:"editor-chat-panel","data-template-editor-chat-root":!0}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("a",{className:"vf-editor-chat-mobile-fab",href:"/login","aria-label":"Log in to chat with Vidfarm",children:(0,m.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,m.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,m.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,m.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[(0,m.jsx)("span",{className:"label",style:{fontSize:"0.68rem",fontWeight:800,letterSpacing:"0.14em",textTransform:"uppercase",color:"#a9884a"},children:"Vidfarm copilot"}),(0,m.jsx)("h3",{style:{margin:0,fontSize:"1.05rem",color:"#2f3748"},children:"Chat with Vidfarm"}),(0,m.jsx)("p",{style:{margin:0,fontSize:"0.9rem",color:"#74829c"},children:"Ask for hooks, angles, and remixes tailored to compositions in your library."})]}),(0,m.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(p=>(0,m.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,m.jsx)("span",{style:{color:"#bfa46d",fontWeight:700},children:"\u201C"}),p]},p))}),(0,m.jsxs)("div",{style:{marginTop:"auto",display:"flex",flexDirection:"column",gap:"10px"},children:[(0,m.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,m.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,m.jsx)(uO,{template:r,onClose:()=>n(null)}):null,o?(0,m.jsx)(dO,{onClose:()=>i(!1),onAddTemplate:e.onAddTemplate}):null]})}function wk(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,swipeStack:[],swipeLoading:!1,swipeLoaded:!1,swipeError:null,swipeCustomizing:0,swipeTargetDepth:5,swipeProductSet:!0,swipeRefilling:!1,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}),setSwipeLoading:r=>t({swipeLoading:r}),setSwipeError:r=>t({swipeError:r,swipeLoading:!1}),setSwipeStack:(r,n)=>t({swipeStack:r,swipeLoading:!1,swipeLoaded:!0,swipeError:null,...n?.customizing!==void 0?{swipeCustomizing:n.customizing}:{},...n?.targetDepth!==void 0?{swipeTargetDepth:n.targetDepth}:{},...n?.productSet!==void 0?{swipeProductSet:n.productSet}:{}}),setSwipeMeta:r=>t({...r.customizing!==void 0?{swipeCustomizing:r.customizing}:{},...r.targetDepth!==void 0?{swipeTargetDepth:r.targetDepth}:{},...r.productSet!==void 0?{swipeProductSet:r.productSet}:{}}),appendSwipeCard:r=>t(n=>n.swipeStack.some(o=>o.id===r.id)?{}:{swipeStack:[...n.swipeStack,r]}),removeSwipeCard:r=>t(n=>({swipeStack:n.swipeStack.filter(o=>o.id!==r)})),setSwipeRefilling:r=>t({swipeRefilling:r})}))}var ei=vr(wl(),1);lk();var mO="vidfarm:discover-bookmarks:v1",gO="public";function hO(){let e=document.getElementById("homepage-boot");return e?.textContent?JSON.parse(e.textContent):{templates:[],account:{isLoggedIn:!1},loadEndpoint:"/discover/feed",skillEndpointPrefix:"/discover/skills/"}}function Ck(e){return`${mO}_${e?.trim()||gO}`}function SO(e){try{let t=window.localStorage.getItem(Ck(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 vO(e,t){try{window.localStorage.setItem(Ck(t),JSON.stringify(Array.from(e)))}catch{}}function yO(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 Ik(e){return{id:String(e?.id??""),templateId:String(e?.template_id??""),forkId:e?.fork_id??null,sourceTitle:e?.source_title??null,title:String(e?.title??e?.source_title??"Untitled"),caption:String(e?.caption??""),pinnedComment:e?.pinned_comment??null,previewUrl:e?.preview_url??null,durationSeconds:typeof e?.duration_seconds=="number"?e.duration_seconds:null,status:String(e?.status??"ready")}}function _O({boot:e}){let t=(0,we.useMemo)(()=>wk(e),[e]),r=ze(t,b=>b.templates),n=ze(t,b=>b.searchQuery),o=ze(t,b=>b.bookmarksOnly),i=ze(t,b=>b.bookmarks),s=ze(t,b=>b.loading),a=ze(t,b=>b.error),l=ze(t,b=>b.view),c=ze(t,b=>b.popularTemplates),u=ze(t,b=>b.popularLoading),d=ze(t,b=>b.popularError),p=ze(t,b=>b.swipeStack),f=ze(t,b=>b.swipeLoading),h=ze(t,b=>b.swipeLoaded),y=ze(t,b=>b.swipeError),k=ze(t,b=>b.swipeCustomizing),g=ze(t,b=>b.swipeTargetDepth),S=ze(t,b=>b.swipeProductSet),v=ze(t,b=>b.swipeRefilling),E=(0,we.useRef)(!1),[C,R]=(0,we.useState)(!1),_=(0,we.useMemo)(()=>yO({templates:r,searchQuery:n,bookmarksOnly:o,bookmarks:i}),[r,n,o,i]);(0,we.useEffect)(()=>{t.getState().setBookmarks(SO(e.account.userId)),R(!0)},[e.account.userId,t]),(0,we.useEffect)(()=>{C&&vO(i,e.account.userId)},[e.account.userId,i,C]);let w=(0,we.useCallback)(async b=>{b?.showLoading&&t.getState().setLoading(!0);try{let x=await fetch(e.loadEndpoint,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok)throw new Error(typeof A.error=="string"&&A.error?A.error:"Unable to load formats.");t.getState().setTemplates(Array.isArray(A.templates)?A.templates:[])}catch(x){b?.showLoading?t.getState().setError(x instanceof Error?x.message:"Unable to load formats."):In("homepage.feed_refresh_failed",{message:x instanceof Error?x.message:String(x)})}},[e.loadEndpoint,t]);(0,we.useEffect)(()=>{e.templates.length>0||w({showLoading:!0})},[e.templates.length,w]);let z=r.some(b=>b.status==="processing");(0,we.useEffect)(()=>{if(!z)return;let b=window.setInterval(()=>{w()},8e3);return()=>window.clearInterval(b)},[z,w]);let I=(0,we.useCallback)(async b=>{b?.showLoading&&t.getState().setPopularLoading(!0);try{let x=await fetch("/discover/popular",{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok)throw new Error(typeof A.error=="string"&&A.error?A.error:"Unable to load popular formats.");t.getState().setPopularTemplates(Array.isArray(A.templates)?A.templates:[])}catch(x){b?.showLoading?t.getState().setPopularError(x instanceof Error?x.message:"Unable to load popular formats."):In("homepage.popular_refresh_failed",{message:x instanceof Error?x.message:String(x)})}},[t]),P=ze(t,b=>b.popularLoaded);(0,we.useEffect)(()=>{l!=="popular"||P||I({showLoading:!0})},[l,P,I]);let W=l==="popular"&&c.some(b=>b.status==="processing");(0,we.useEffect)(()=>{if(!W)return;let b=window.setInterval(()=>{I()},8e3);return()=>window.clearInterval(b)},[W,I]);let K=(0,we.useCallback)(async b=>{b?.showLoading&&t.getState().setSwipeLoading(!0);try{let x=await fetch("/discover/swipe/stack",{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok)throw new Error(typeof A.error=="string"&&A.error?A.error:"Unable to load your swipe deck.");let oe=Array.isArray(A.stack)?A.stack.map(Ik):[];t.getState().setSwipeStack(oe,{customizing:typeof A.customizing=="number"?A.customizing:0,targetDepth:typeof A.target_depth=="number"?A.target_depth:void 0,productSet:typeof A.product_description_set=="boolean"?A.product_description_set:void 0})}catch(x){b?.showLoading?t.getState().setSwipeError(x instanceof Error?x.message:"Unable to load your swipe deck."):In("homepage.swipe_refresh_failed",{message:x instanceof Error?x.message:String(x)})}},[t]),V=(0,we.useCallback)(async()=>{if(!E.current){E.current=!0,t.getState().setSwipeRefilling(!0);try{for(let b=0;b<8;b+=1){let x=await fetch("/discover/swipe/refill",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok){A?.need_product_description?t.getState().setSwipeMeta({productSet:!1}):t.getState().setSwipeError(typeof A.error=="string"&&A.error?A.error:"Customization failed.");break}if(A.filled&&A.record&&t.getState().appendSwipeCard(Ik(A.record)),!A.filled)break}}catch(b){In("homepage.swipe_refill_failed",{message:b instanceof Error?b.message:String(b)})}finally{E.current=!1,t.getState().setSwipeRefilling(!1),K()}}},[t,K]);(0,we.useEffect)(()=>{l!=="swipe"||h||(async()=>{await K({showLoading:!0});let b=t.getState();b.swipeProductSet&&b.swipeStack.length<b.swipeTargetDepth&&V()})()},[l,h,K,V,t]);let Pe=(0,we.useCallback)(async b=>{try{let x=await fetch(`/discover/swipe/${encodeURIComponent(b)}/approve`,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));return x.ok?(t.getState().removeSwipeCard(b),V(),{ok:!0}):A&&A.superseded?(t.getState().removeSwipeCard(b),V(),{ok:!0}):{ok:!1,error:typeof A.error=="string"&&A.error?A.error:"Unable to approve."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to approve."}}},[t,V]),ue=(0,we.useCallback)(async b=>{try{let x=await fetch(`/discover/swipe/${encodeURIComponent(b)}/reject`,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));return x.ok?(t.getState().removeSwipeCard(b),V(),{ok:!0}):A&&A.superseded?(t.getState().removeSwipeCard(b),V(),{ok:!0}):{ok:!1,error:typeof A.error=="string"&&A.error?A.error:"Unable to reject."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to reject."}}},[t,V]),fe=(0,we.useCallback)(async b=>{try{let x=await fetch(`/discover/templates/${encodeURIComponent(b)}`,{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));return x.ok?(kl("homepage.template_deleted",{template_id:b}),await w(),{ok:!0}):{ok:!1,error:typeof A.error=="string"&&A.error?A.error:"Unable to delete this template."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to delete this template."}}},[w]),L=(0,we.useCallback)(async b=>{try{let x=null;if(b.file){let J=b.file,ot=await fetch("/discover/templates/upload/presign",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({file_name:J.name,content_type:J.type||null,size_bytes:J.size})}),Ie=await ot.json().catch(()=>({}));if(!ot.ok)return{ok:!1,error:Ie.error||"Unable to start the video upload."};if(Ie.transport==="presigned"&&Ie.upload?.url&&Ie.storage_key){let it=await fetch(Ie.upload.url,{method:Ie.upload.method||"PUT",headers:Ie.upload.headers||{},body:J});if(!it.ok)return{ok:!1,error:`Video upload failed (${it.status}). Try again.`};x={storage_key:Ie.storage_key,file_name:Ie.file_name||J.name}}else{let it=new FormData;it.append("file",J,Ie.file_name||J.name);let Jt=await fetch(Ie.upload?.url||"/discover/templates/upload",{method:"POST",credentials:"same-origin",body:it}),Zt=await Jt.json().catch(()=>({}));if(!Jt.ok||!Zt.storage_key)return{ok:!1,error:Zt.error||"Video upload failed. Try again."};x={storage_key:Zt.storage_key,file_name:Zt.file_name||J.name}}}let A=await fetch("/discover/templates",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(x?{upload:x,title:b.title||null,tagline:b.tagline||null,notes:b.notes||null}:{source_url:b.sourceUrl,tagline:b.tagline||null,notes:b.notes||null})}),oe=await A.json().catch(()=>({}));return A.ok?(kl("homepage.template_added",x?{storage_key:x.storage_key}:{source_url:b.sourceUrl}),await w(),{ok:!0}):{ok:!1,error:typeof oe.error=="string"&&oe.error?oe.error:"Unable to add that video."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to add that video."}}},[w]);return(0,ei.jsx)(kk,{account:e.account,templates:r,visibleTemplates:_,searchQuery:n,bookmarksOnly:o,bookmarks:i,loading:s,error:a,view:l,popularTemplates:c,popularLoading:u,popularError:d,swipeStack:p,swipeLoading:f,swipeLoaded:h,swipeError:y,swipeCustomizing:k,swipeTargetDepth:g,swipeProductSet:S,swipeRefilling:v,skillEndpointPrefix:e.skillEndpointPrefix,onSearchQueryChange:b=>t.getState().setSearchQuery(b),onBookmarksOnlyChange:b=>t.getState().setBookmarksOnly(b),onViewChange:b=>t.getState().setView(b),onToggleBookmark:b=>t.getState().toggleBookmark(b),onAddTemplate:L,onDeleteTemplate:fe,onSwipeApprove:Pe,onSwipeReject:ue})}var Ld=hO(),xk=document.getElementById("homepage-root");kl("homepage.boot",{is_logged_in:Ld.account?.isLoggedIn??!1,template_count:Ld.templates?.length??0,load_endpoint:Ld.loadEndpoint});xk?(0,Rk.hydrateRoot)(xk,(0,ei.jsx)(Aa,{fallback:(0,ei.jsx)(ei.Fragment,{}),onError:e=>In("homepage.render_error",{message:e instanceof Error?e.message:String(e)}),children:(0,ei.jsx)(_O,{boot:Ld})})):In("homepage.no_root_element",{});
|
|
32
32
|
/*! Bundled license information:
|
|
33
33
|
|
|
34
34
|
react/cjs/react.production.min.js:
|