1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-BWiUjInJ.js","assets/ErrorBoundary-1S8O0UA5.js","assets/check-circle-BSwm_dya.js","assets/sparkles-CPIM7azG.js","assets/arrow-right-B8qYrZm8.js","assets/seoConfig-CYL5bEKu.js","assets/Survey-DTSXyehH.js","assets/SurveyContext-BRAw1Mmd.js","assets/index.esm-8ME-PCcM.js","assets/useQuery-CFRHvr6B.js","assets/accordion-Frq-0dos.js","assets/index-Drb0MhxH.js","assets/chevron-down-DWjUtmQz.js","assets/textarea-DaESpfB0.js","assets/radio-group-DC2hOhBs.js","assets/index-Dr9i9Gg3.js","assets/label-4yCU_Fe6.js","assets/card-CmzJNsl9.js","assets/SurveyCard-dkZk0fms.js","assets/checkbox-DEk7E7tu.js","assets/map-pin-g2VDpMf_.js","assets/chevron-left-C6CC-oum.js","assets/minus-DY45pb2c.js","assets/TripPlanLoadingModal-Dmiiv2mh.js","assets/progress-B6v_WtPz.js","assets/clock-vmOhb-gH.js","assets/map-DdngrOi4.js","assets/slider-Cdx8_wwb.js","assets/index-BdQq_4o_.js","assets/useMutation-mVmmL-ZM.js","assets/gift-BmTsBPGo.js","assets/SurveyContext-CE8Gc_K_.css","assets/authErrorUtils-BV_ce5MV.js","assets/eye-DRbNbSrO.js","assets/MyAccount-fP1cNLvb.js","assets/Footer-BdtbxtUG.js","assets/avatar-CKPa5Fi2.js","assets/use-file-upload-mutations-DC4Bra-f.js","assets/camera-Cct5Cx6e.js","assets/skeleton-BWqyNzJo.js","assets/external-link-BlCu5vci.js","assets/star-
1BkL6-lfT.js","assets/pen-square-PxYqa2nm.js","assets/mail-CgsIhOLA.js","assets/CreditPurchaseModal-DTOSckFZ.js","assets/use-create-query-BwucrTOR.js","assets/index-BAK4sUW3.js","assets/select-DfL8mw-x.js","assets/chevron-up-WCl-v3Ii.js","assets/credit-card-clgERJsi.js","assets/alert-triangle-Bq5uM0RI.js","assets/refresh-cw-BRIH3d9d.js","assets/loader-2-CJ4hw7_4.js","assets/stringUtils-CygDY7k1.js","assets/helper-nadWIPQ8.js","assets/alert-circle-B7AE5lPU.js","assets/tabs-BEOgU7EH.js","assets/trash-2-jaAqXgEN.js","assets/users-B3x5Ycdp.js","assets/crown-BTalMsfy.js","assets/plane-bnOghARa.js","assets/heart-BVa_PYNE.js","assets/carousel-BGnhSvXF.js","assets/embla-carousel-react.esm-GQMgTQHX.js","assets/arrow-left-_L-Vhm4I.js","assets/globe-C3SzhmLh.js","assets/bookmark-LNqlr3fO.js","assets/renderOptimizations-DsSRUwKs.js","assets/Login-B3bWkUMa.js","assets/AuthenticationForm-CnEwvW0z.js","assets/auth.services-pbRwsgWr.js","assets/ResetPassword-BgMt7j4P.js","assets/MyTrip-Ck4O4X9A.js","assets/TravelIdeas-Dn_jFk3J.js","assets/TripOptions-C1zDQO2o.js","assets/usePaymentOrchestrator-C7pGiKxm.js","assets/tag-CS9ByFQF.js","assets/dollar-sign-CE3Xt-GA.js","assets/thumbs-up-FqQyWQE4.js","assets/info-nbAqm9Tv.js","assets/Purchase-Bcknw8Mt.js","assets/utensils-BsmDBTLq.js","assets/message-square-C26kCt_9.js","assets/ProductsPricing-DvmdgZXd.js","assets/AirplaneDivider-XQEoLgaG.js","assets/pen-line-BGcN5Sn9.js","assets/RelatedResources-Cu0UxavV.js","assets/Explore-CySt6eDQ.js","assets/TripPlanHeader-CT77Q7E5.js","assets/TripPlanContext-P53O8MI7.js","assets/index-CPHZqxgD.js","assets/TripPlanSkeleton-BomiVMyS.js","assets/BottomNavigation-CFSXaiEg.js","assets/search-B_XnXE7M.js","assets/photo-carousel-Dr80ih4q.js","assets/use-cycle-0UGzJV45.js","assets/saved-places-utils-Cn9cAJ8E.js","assets/Explore-BIMIw227.css","assets/ItineraryPage-Bytcgpj9.js","assets/Timeline-6MBcjyud.js","assets/phone-BLgt-ytf.js","assets/SharedTripPlanLayout-DLcTVXFg.js","assets/index-B4ERy_vR.js","assets/TripSnapshot-B1AjhdXj.js","assets/TripSnapshot-CfbKS4BQ.css","assets/TravelTools-DWq0Tk6_.js","assets/use-localtips-queries-GID-lnEj.js","assets/TravelTools-D5yQ9VpK.css","assets/TripPlanOverview-DTBD_XD8.js","assets/DisclaimerFooter-CIh-bFK9.js","assets/shield-CyuFcYRw.js","assets/HowItWorks-bl7PE-ZZ.js","assets/AboutUs-DOsQudXW.js","assets/Privacy-BeNz-4VD.js","assets/TermsOfService-DzyrG4kx.js","assets/MysteryEscape-BRwo4-4p.js","assets/TravelExpertCollective-B_6Jls_m.js","assets/Concierge-DyjHLNTe.js","assets/TripPlanLayout-Cjwc0dzN.js","assets/Overview-B4CyuD1h.js","assets/Overview-DESY_lJv.css","assets/Itinerary-CJ6n5kjf.js"])))=>i.map(i=>d[i]); 2var l2=Object.defineProperty;var c2=(e,t,n)=>t in e?l2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xe=(e,t,n)=>c2(e,typeof t!="symbol"?t+"":t,n);function d2(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var uae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function o0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}
vendor: 9,543 bytes, lines 2-26
2var $C={exports:{}},vp={},BC={exports:{}},ye={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Dl=Symbol.for("react.element"),f2=Symbol.for("react.portal"),p2=Symbol.for("react.fragment"),h2=Symbol.for("react.strict_mode"),m2=Symbol.for("react.profiler"),g2=Symbol.for("react.provider"),v2=Symbol.for("react.context"),y2=Symbol.for("react.forward_ref"),b2=Symbol.for("react.suspense"),w2=Symbol.for("react.memo"),S2=Symbol.for("react.lazy"),fS=Symbol.iterator;function _2(e){return e===null||typeof e!="object"?null:(e=fS&&e[fS]||e["@@iterator"],typeof e=="function"?e:null)}var zC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HC=Object.assign,WC={};function Da(e,t,n){this.props=e,this.context=t,this.refs=WC,this.updater=n||zC}Da.prototype.isReactComponent={};Da.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")};Da.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qC(){}qC.prototype=Da.prototype;function s0(e,t,n){this.props=e,this.context=t,this.refs=WC,this.updater=n||zC}var a0=s0.prototype=new qC;a0.constructor=s0;HC(a0,Da.prototype);a0.isPureReactComponent=!0;var pS=Array.isArray,VC=Object.prototype.hasOwnProperty,u0={current:null},GC={key:!0,ref:!0,__self:!0,__source:!0};function KC(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)VC.call(t,r)&&!GC.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var u=Array(a),l=0;l<a;l++)u[l]=arguments[l+2];i.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Dl,type:e,key:o,ref:s,props:i,_owner:u0.current}}function E2(e,t){return{$$typeof:Dl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function l0(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dl}function T2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var hS=/\/+/g;function Ih(e,t){return typeof e=="object"&&e!==null&&e.key!=null?T2(""+e.key):t.toString(36)}function Ed(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Dl:case f2:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Ih(s,0):r,pS(i)?(n="",e!=null&&(n=e.replace(hS,"$&/")+"/"),Ed(i,t,n,"",function(l){return l})):i!=null&&(l0(i)&&(i=E2(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(hS,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",pS(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+Ih(o,a);s+=Ed(o,t,n,u,i)}else if(u=_2(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+Ih(o,a++),s+=Ed(o,t,n,u,i);else if(o==="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 yc(e,t,n){if(e==null)return e;var r=[],i=0;return Ed(e,r,"","",function(o){return t.call(n,o,i++)}),r}function x2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var nn={current:null},Td={transition:null},C2={ReactCurrentDispatcher:nn,ReactCurrentBatchConfig:Td,ReactCurrentOwner:u0};function YC(){throw Error("act(...) is not supported in production builds of React.")}ye.Children={map:yc,forEach:function(e,t,n){yc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return yc(e,function(){t++}),t},toArray:function(e){return yc(e,function(t){return t})||[]},only:function(e){if(!l0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=Da;ye.Fragment=p2;ye.Profiler=m2;ye.PureComponent=s0;ye.StrictMode=h2;ye.Suspense=b2;ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C2;ye.act=YC;ye.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=HC({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=u0.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)VC.call(t,u)&&!GC.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var l=0;l<u;l++)a[l]=arguments[l+2];r.children=a}return{$$typeof:Dl,type:e.type,key:i,ref:o,props:r,_owner:s}};ye.createContext=function(e){return e={$$typeof:v2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:g2,_context:e},e.Consumer=e};ye.createElement=KC;ye.createFactory=function(e){var t=KC.bind(null,e);return t.type=e,t};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:y2,render:e}};ye.isValidElement=l0;ye.lazy=function(e){return{$$typeof:S2,_payload:{_status:-1,_result:e},_init:x2}};ye.memo=function(e,t){return{$$typeof:w2,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=Td.transition;Td.transition={};try{e()}finally{Td.transition=t}};ye.unstable_act=YC;ye.useCallback=function(e,t){return nn.current.useCallback(e,t)};ye.useContext=function(e){return nn.current.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e){return nn.current.useDeferredValue(e)};ye.useEffect=function(e,t){return nn.current.useEffect(e,t)};ye.useId=function(){return nn.current.useId()};ye.useImperativeHandle=function(e,t,n){return nn.current.useImperativeHandle(e,t,n)};ye.useInsertionEffect=function(e,t){return nn.current.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return nn.current.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return nn.current.useMemo(e,t)};ye.useReducer=function(e,t,n){return nn.current.useReducer(e,t,n)};ye.useRef=function(e){return nn.current.useRef(e)};ye.useState=function(e){return nn.current.useState(e)};ye.useSyncExternalStore=function(e,t,n){return nn.current.useSyncExternalStore(e,t,n)};ye.useTransition=function(){return nn.current.useTransition()};ye.version="18.3.1";BC.exports=ye;var w=BC.exports;const j=o0(w),c0=d2({__proto__:null,default:j},[w]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var I2=w,R2=Symbol.for("react.element"),k2=Symbol.for("react.fragment"),P2=Object.prototype.hasOwnProperty,A2=I2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O2={key:!0,ref:!0,__self:!0,__source:!0};function XC(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)P2.call(t,r)&&!O2.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:R2,type:e,key:o,ref:s,props:i,_owner:A2.current}}vp.Fragment=k2;vp.jsx=XC;vp.jsxs=XC;$C.exports=vp;var E=$C.exports,Ng={},QC={exports:{}},Fn={},JC={exports:{}},ZC={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(P,k){var $=P.length;P.push(k);e:for(;0<$;){var z=$-1>>>1,H=P[z];if(0<i(H,k))P[z]=k,P[$]=H,$=z;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var k=P[0],$=P.pop();if($!==k){P[0]=$;e:for(var z=0,H=P.length,V=H>>>1;z<V;){var q=2*(z+1)-1,te=P[q],G=q+1,J=P[G];if(0>i(te,$))G<H&&0>i(J,te)?(P[z]=J,P[G]=$,z=G):(P[z]=te,P[q]=$,z=q);else if(G<H&&0>i(J,$))P[z]=J,P[G]=$,z=G;else break e}}return k}function i(P,k){var $=P.sortIndex-k.sortIndex;return $!==0?$:P.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],l=[],c=1,d=null,f=3,p=!1,h=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(P){for(var k=n(l);k!==null;){if(k.callback===null)r(l);else if(k.startTime<=P)r(l),k.sortIndex=k.expirationTime,t(u,k);else break;k=n(l)}}function S(P){if(m=!1,b(P),!h)if(n(u)!==null)h=!0,N(x);else{var k=n(l);k!==null&&A(S,k.startTime-P)}}function x(P,k){h=!1,m&&(m=!1,g(C),C=-1),p=!0;var $=f;try{for(b(k),d=n(u);d!==null&&(!(d.expirationTime>k)||P&&!D());
vendor: 9,171 bytes, lines 26-35
26){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var H=z(d.expirationTime<=k);k=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(u)&&r(u),b(k)}else r(u);d=n(u)}if(d!==null)var V=!0;else{var q=n(l);q!==null&&A(S,q.startTime-k),V=!1}return V}finally{d=null,f=$,p=!1}}var T=!1,_=null,C=-1,I=5,O=-1;function D(){return!(e.unstable_now()-O<I)}function L(){if(_!==null){var P=e.unstable_now();O=P;var k=!0;try{k=_(!0,P)}finally{k?F():(T=!1,_=null)}}else T=!1}var F;if(typeof v=="function")F=function(){v(L)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,R=M.port2;M.port1.onmessage=L,F=function(){R.postMessage(null)}}else F=function(){y(L,0)};function N(P){_=P,T||(T=!0,F())}function A(P,k){C=y(function(){P(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,N(x))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var k=3;break;default:k=f}var $=f;f=k;try{return P()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,k){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var $=f;f=P;try{return k()}finally{f=$}},e.unstable_scheduleCallback=function(P,k,$){var z=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?z+$:z):$=z,P){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=$+H,P={id:c++,callback:k,priorityLevel:P,startTime:$,expirationTime:H,sortIndex:-1},$>z?(P.sortIndex=$,t(l,P),n(u)===null&&P===n(l)&&(m?(g(C),C=-1):m=!0,A(S,$-z))):(P.sortIndex=H,t(u,P),h||p||(h=!0,N(x))),P},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(P){var k=f;return function(){var $=f;f=k;try{return P.apply(this,arguments)}finally{f=$}}}})(ZC);JC.exports=ZC;var M2=JC.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var N2=w,An=M2;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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 eI=new Set,Qu={};function fs(e,t){pa(e,t),pa(e+"Capture",t)}function pa(e,t){for(Qu[e]=t,e=0;e<t.length;e++)eI.add(t[e])}var ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dg=Object.prototype.hasOwnProperty,D2=/^[: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]*$/,mS={},gS={};function L2(e){return Dg.call(gS,e)?!0:Dg.call(mS,e)?!1:D2.test(e)?gS[e]=!0:(mS[e]=!0,!1)}function F2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j2(e,t,n,r){if(t===null||typeof t>"u"||F2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 rn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jt[e]=new rn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jt[t]=new rn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jt[e]=new rn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jt[e]=new rn(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){jt[e]=new rn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jt[e]=new rn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jt[e]=new rn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jt[e]=new rn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jt[e]=new rn(e,5,!1,e.toLowerCase(),null,!1,!1)});var d0=/[\-:]([a-z])/g;function f0(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(d0,f0);jt[t]=new rn(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(d0,f0);jt[t]=new rn(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(d0,f0);jt[t]=new rn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jt[e]=new rn(e,1,!1,e.toLowerCase(),null,!1,!1)});jt.xlinkHref=new rn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jt[e]=new rn(e,1,!1,e.toLowerCase(),null,!0,!0)});function p0(e,t,n,r){var i=jt.hasOwnProperty(t)?jt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(j2(t,n,i,r)&&(n=null),r||i===null?L2(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Si=N2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,bc=Symbol.for("react.element"),Fs=Symbol.for("react.portal"),js=Symbol.for("react.fragment"),h0=Symbol.for("react.strict_mode"),Lg=Symbol.for("react.profiler"),tI=Symbol.for("react.provider"),nI=Symbol.for("react.context"),m0=Symbol.for("react.forward_ref"),Fg=Symbol.for("react.suspense"),jg=Symbol.for("react.suspense_list"),g0=Symbol.for("react.memo"),Li=Symbol.for("react.lazy"),rI=Symbol.for("react.offscreen"),vS=Symbol.iterator;function eu(e){return e===null||typeof e!="object"?null:(e=vS&&e[vS]||e["@@iterator"],typeof e=="function"?e:null)}var at=Object.assign,Rh;function wu(e){if(Rh===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rh=t&&t[1]||""}return` 35`+Rh+e}var kh=!1;function Ph(e,t){if(!e||kh)return"";kh=!0;var n=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(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}
vendor: 1,435 bytes, lines 35-38
35catch(l){if(l&&r&&typeof l.stack=="string"){for(var i=l.stack.split(` 36`),o=r.stack.split(` 37`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var u=` 38`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{kh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wu(e):""}function U2(e){switch(e.tag){case 5:return wu(e.type);case 16:return wu("Lazy");case 13:return wu("Suspense");case 19:return wu("SuspenseList");case 0:case 2:case 15:return e=Ph(e.type,!1),e;case 11:return e=Ph(e.type.render,!1),e;case 1:return e=Ph(e.type,!0),e;default:return""}}function Ug(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 js:return"Fragment";case Fs:return"Portal";case Lg:return"Profiler";case h0:return"StrictMode";case Fg:return"Suspense";case jg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case nI:return(e.displayName||"Context")+".Consumer";case tI:return(e._context.displayName||"Context")+".Provider";case m0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case g0:return t=e.displayName||null,t!==null?t:Ug(e.type)||"Memo";case Li:t=e._payload,e=e._init;
vendor: 14,573 bytes, line 38
38try{return Ug(e(t))}catch{}}return null}function $2(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 Ug(t);case 8:return t===h0?"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 fo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function iI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function B2(e){var t=iI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wc(e){e._valueTracker||(e._valueTracker=B2(e))}function oI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=iI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function af(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 $g(e,t){var n=t.checked;return at({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function yS(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sI(e,t){t=t.checked,t!=null&&p0(e,"checked",t,!1)}function Bg(e,t){sI(e,t);var n=fo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zg(e,t.type,n):t.hasOwnProperty("defaultValue")&&zg(e,t.type,fo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bS(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zg(e,t,n){(t!=="number"||af(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Su=Array.isArray;function ta(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fo(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Hg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return at({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wS(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(K(92));if(Su(n)){if(1<n.length)throw Error(K(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fo(n)}}function aI(e,t){var n=fo(t.value),r=fo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function SS(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uI(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 Wg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Sc,lI=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Sc=Sc||document.createElement("div"),Sc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Sc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ju(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Iu={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},z2=["Webkit","ms","Moz","O"];Object.keys(Iu).forEach(function(e){z2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Iu[t]=Iu[e]})});function cI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Iu.hasOwnProperty(e)&&Iu[e]?(""+t).trim():t+"px"}function dI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=cI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var H2=at({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 qg(e,t){if(t){if(H2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Vg(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 Gg=null;function v0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kg=null,na=null,ra=null;function _S(e){if(e=jl(e)){if(typeof Kg!="function")throw Error(K(280));var t=e.stateNode;t&&(t=_p(t),Kg(e.stateNode,e.type,t))}}function fI(e){na?ra?ra.push(e):ra=[e]:na=e}function pI(){if(na){var e=na,t=ra;if(ra=na=null,_S(e),t)for(e=0;e<t.length;e++)_S(t[e])}}function hI(e,t){return e(t)}function mI(){}var Ah=!1;function gI(e,t,n){if(Ah)return e(t,n);Ah=!0;try{return hI(e,t,n)}finally{Ah=!1,(na!==null||ra!==null)&&(mI(),pI())}}function Zu(e,t){var n=e.stateNode;if(n===null)return null;var r=_p(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(K(231,t,typeof n));return n}var Yg=!1;if(ai)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){Yg=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{Yg=!1}function W2(e,t,n,r,i,o,s,a,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var Ru=!1,uf=null,lf=!1,Xg=null,q2={onError:function(e){Ru=!0,uf=e}};function V2(e,t,n,r,i,o,s,a,u){Ru=!1,uf=null,W2.apply(q2,arguments)}function G2(e,t,n,r,i,o,s,a,u){if(V2.apply(this,arguments),Ru){if(Ru){var l=uf;Ru=!1,uf=null}else throw Error(K(198));lf||(lf=!0,Xg=l)}}function ps(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vI(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 ES(e){if(ps(e)!==e)throw Error(K(188))}function K2(e){var t=e.alternate;if(!t){if(t=ps(e),t===null)throw Error(K(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ES(i),e;if(o===r)return ES(i),t;o=o.sibling}throw Error(K(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(K(189))}}if(n.alternate!==r)throw Error(K(190))}if(n.tag!==3)throw Error(K(188));return n.stateNode.current===n?e:t}function yI(e){return e=K2(e),e!==null?bI(e):null}function bI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=bI(e);if(t!==null)return t;e=e.sibling}return null}var wI=An.unstable_scheduleCallback,TS=An.unstable_cancelCallback,Y2=An.unstable_shouldYield,X2=An.unstable_requestPaint,pt=An.unstable_now,Q2=An.unstable_getCurrentPriorityLevel,y0=An.unstable_ImmediatePriority,SI=An.unstable_UserBlockingPriority,cf=An.unstable_NormalPriority,J2=An.unstable_LowPriority,_I=An.unstable_IdlePriority,yp=null,Fr=null;function Z2(e){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(yp,e,void 0,(e.current.flags&128)===128)}catch{}}var gr=Math.clz32?Math.clz32:nF,eF=Math.log,tF=Math.LN2;function nF(e){return e>>>=0,e===0?32:31-(eF(e)/tF|0)|0}var _c=64,Ec=4194304;function _u(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 df(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=_u(a):(o&=s,o!==0&&(r=_u(o)))}else s=n&~i,s!==0?r=_u(s):o!==0&&(r=_u(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-gr(t),i=1<<n,r|=e[n],t&=~i;return r}function rF(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 iF(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-gr(o),a=1<<s,u=i[s];u===-1?(!(a&n)||a&r)&&(i[s]=rF(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function Qg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function EI(){var e=_c;return _c<<=1,!(_c&4194240)&&(_c=64),e}function Oh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ll(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gr(t),e[t]=n}function oF(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-gr(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function b0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var je=0;function TI(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xI,w0,CI,II,RI,Jg=!1,Tc=[],Ji=null,Zi=null,eo=null,el=new Map,tl=new Map,Wi=[],sF="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 xS(e,t){switch(e){case"focusin":case"focusout":Ji=null;break;case"dragenter":case"dragleave":Zi=null;break;case"mouseover":case"mouseout":eo=null;break;case"pointerover":case"pointerout":el.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":tl.delete(t.pointerId)}}function nu(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=jl(t),t!==null&&w0(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function aF(e,t,n,r,i){switch(t){case"focusin":return Ji=nu(Ji,e,t,n,r,i),!0;case"dragenter":return Zi=nu(Zi,e,t,n,r,i),!0;case"mouseover":return eo=nu(eo,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return el.set(o,nu(el.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,tl.set(o,nu(tl.get(o)||null,e,t,n,r,i)),!0}return!1}function kI(e){var t=Fo(e.target);if(t!==null){var n=ps(t);
vendor: 12,570 bytes, line 38
38if(n!==null){if(t=n.tag,t===13){if(t=vI(n),t!==null){e.blockedOn=t,RI(e.priority,function(){CI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gg=r,n.target.dispatchEvent(r),Gg=null}else return t=jl(n),t!==null&&w0(t),e.blockedOn=n,!1;t.shift()}return!0}function CS(e,t,n){xd(e)&&n.delete(t)}function uF(){Jg=!1,Ji!==null&&xd(Ji)&&(Ji=null),Zi!==null&&xd(Zi)&&(Zi=null),eo!==null&&xd(eo)&&(eo=null),el.forEach(CS),tl.forEach(CS)}function ru(e,t){e.blockedOn===t&&(e.blockedOn=null,Jg||(Jg=!0,An.unstable_scheduleCallback(An.unstable_NormalPriority,uF)))}function nl(e){function t(i){return ru(i,e)}if(0<Tc.length){ru(Tc[0],e);for(var n=1;n<Tc.length;n++){var r=Tc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ji!==null&&ru(Ji,e),Zi!==null&&ru(Zi,e),eo!==null&&ru(eo,e),el.forEach(t),tl.forEach(t),n=0;n<Wi.length;n++)r=Wi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wi.length&&(n=Wi[0],n.blockedOn===null);)kI(n),n.blockedOn===null&&Wi.shift()}var ia=Si.ReactCurrentBatchConfig,ff=!0;function lF(e,t,n,r){var i=je,o=ia.transition;ia.transition=null;try{je=1,S0(e,t,n,r)}finally{je=i,ia.transition=o}}function cF(e,t,n,r){var i=je,o=ia.transition;ia.transition=null;try{je=4,S0(e,t,n,r)}finally{je=i,ia.transition=o}}function S0(e,t,n,r){if(ff){var i=Zg(e,t,n,r);if(i===null)zh(e,t,r,pf,n),xS(e,r);else if(aF(i,e,t,n,r))r.stopPropagation();else if(xS(e,r),t&4&&-1<sF.indexOf(e)){for(;i!==null;){var o=jl(i);if(o!==null&&xI(o),o=Zg(e,t,n,r),o===null&&zh(e,t,r,pf,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else zh(e,t,r,null,n)}}var pf=null;function Zg(e,t,n,r){if(pf=null,e=v0(r),e=Fo(e),e!==null)if(t=ps(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vI(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return pf=e,null}function PI(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(Q2()){case y0:return 1;case SI:return 4;case cf:case J2:return 16;case _I:return 536870912;default:return 16}default:return 16}}var Vi=null,_0=null,Cd=null;function AI(){if(Cd)return Cd;var e,t=_0,n=t.length,r,i="value"in Vi?Vi.value:Vi.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Cd=i.slice(e,1<r?1-r:void 0)}function Id(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 xc(){return!0}function IS(){return!1}function jn(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?xc:IS,this.isPropagationStopped=IS,this}return at(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=xc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=xc)},persist:function(){},isPersistent:xc}),t}var La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},E0=jn(La),Fl=at({},La,{view:0,detail:0}),dF=jn(Fl),Mh,Nh,iu,bp=at({},Fl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:T0,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!==iu&&(iu&&e.type==="mousemove"?(Mh=e.screenX-iu.screenX,Nh=e.screenY-iu.screenY):Nh=Mh=0,iu=e),Mh)},movementY:function(e){return"movementY"in e?e.movementY:Nh}}),RS=jn(bp),fF=at({},bp,{dataTransfer:0}),pF=jn(fF),hF=at({},Fl,{relatedTarget:0}),Dh=jn(hF),mF=at({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),gF=jn(mF),vF=at({},La,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yF=jn(vF),bF=at({},La,{data:0}),kS=jn(bF),wF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SF={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"},_F={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function EF(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_F[e])?!!t[e]:!1}function T0(){return EF}var TF=at({},Fl,{key:function(e){if(e.key){var t=wF[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Id(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?SF[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:T0,charCode:function(e){return e.type==="keypress"?Id(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Id(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xF=jn(TF),CF=at({},bp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),PS=jn(CF),IF=at({},Fl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:T0}),RF=jn(IF),kF=at({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),PF=jn(kF),AF=at({},bp,{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}),OF=jn(AF),MF=[9,13,27,32],x0=ai&&"CompositionEvent"in window,ku=null;ai&&"documentMode"in document&&(ku=document.documentMode);var NF=ai&&"TextEvent"in window&&!ku,OI=ai&&(!x0||ku&&8<ku&&11>=ku),AS=" ",OS=!1;function MI(e,t){switch(e){case"keyup":return MF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function NI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Us=!1;function DF(e,t){switch(e){case"compositionend":return NI(t);case"keypress":return t.which!==32?null:(OS=!0,AS);case"textInput":return e=t.data,e===AS&&OS?null:e;default:return null}}function LF(e,t){if(Us)return e==="compositionend"||!x0&&MI(e,t)?(e=AI(),Cd=_0=Vi=null,Us=!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 OI&&t.locale!=="ko"?null:t.data;default:return null}}var FF={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 MS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!FF[e.type]:t==="textarea"}function DI(e,t,n,r){fI(r),t=hf(t,"onChange"),0<t.length&&(n=new E0("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Pu=null,rl=null;function jF(e){VI(e,0)}function wp(e){var t=zs(e);if(oI(t))return e}function UF(e,t){if(e==="change")return t}var LI=!1;if(ai){var Lh;if(ai){var Fh="oninput"in document;if(!Fh){var NS=document.createElement("div");NS.setAttribute("oninput","return;"),Fh=typeof NS.oninput=="function"}Lh=Fh}else Lh=!1;LI=Lh&&(!document.documentMode||9<document.documentMode)}function DS(){Pu&&(Pu.detachEvent("onpropertychange",FI),rl=Pu=null)}function FI(e){if(e.propertyName==="value"&&wp(rl)){var t=[];DI(t,rl,e,v0(e)),gI(jF,t)}}function $F(e,t,n){e==="focusin"?(DS(),Pu=t,rl=n,Pu.attachEvent("onpropertychange",FI)):e==="focusout"&&DS()}function BF(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wp(rl)}function zF(e,t){if(e==="click")return wp(t)}function HF(e,t){if(e==="input"||e==="change")return wp(t)}function WF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var br=typeof Object.is=="function"?Object.is:WF;function il(e,t){if(br(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Dg.call(t,i)||!br(e[i],t[i]))return!1}return!0}function LS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function FS(e,t){var n=LS(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=LS(n)}}function jI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function UI(){for(var e=window,t=af();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=af(e.document)}return t}function C0(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 qF(e){var t=UI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jI(n.ownerDocument.documentElement,n)){if(r!==null&&C0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=FS(n,o);var s=FS(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var VF=ai&&"documentMode"in document&&11>=document.documentMode,$s=null,ev=null,Au=null,tv=!1;function jS(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tv||$s==null||$s!==af(r)||(r=$s,"selectionStart"in r&&C0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 38
38sNode:r.focusNode,focusOffset:r.focusOffset}),Au&&il(Au,r)||(Au=r,r=hf(ev,"onSelect"),0<r.length&&(t=new E0("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=$s)))}function Cc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bs={animationend:Cc("Animation","AnimationEnd"),animationiteration:Cc("Animation","AnimationIteration"),animationstart:Cc("Animation","AnimationStart"),transitionend:Cc("Transition","TransitionEnd")},jh={},$I={};ai&&($I=document.createElement("div").style,"AnimationEvent"in window||(delete Bs.animationend.animation,delete Bs.animationiteration.animation,delete Bs.animationstart.animation),"TransitionEvent"in window||delete Bs.transitionend.transition);function Sp(e){if(jh[e])return jh[e];if(!Bs[e])return e;var t=Bs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $I)return jh[e]=t[n];return e}var BI=Sp("animationend"),zI=Sp("animationiteration"),HI=Sp("animationstart"),WI=Sp("transitionend"),qI=new Map,US="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 wo(e,t){qI.set(e,t),fs(t,[e])}for(var Uh=0;Uh<US.length;Uh++){var $h=US[Uh],GF=$h.toLowerCase(),KF=$h[0].toUpperCase()+$h.slice(1);wo(GF,"on"+KF)}wo(BI,"onAnimationEnd");wo(zI,"onAnimationIteration");wo(HI,"onAnimationStart");wo("dblclick","onDoubleClick");wo("focusin","onFocus");wo("focusout","onBlur");wo(WI,"onTransitionEnd");pa("onMouseEnter",["mouseout","mouseover"]);pa("onMouseLeave",["mouseout","mouseover"]);pa("onPointerEnter",["pointerout","pointerover"]);pa("onPointerLeave",["pointerout","pointerover"]);fs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fs("onBeforeInput",["compositionend","keypress","textInput","paste"]);fs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eu="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(" "),YF=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eu));function $S(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,G2(r,t,void 0,e),e.currentTarget=null}function VI(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],u=a.instance,l=a.currentTarget;if(a=a.listener,u!==o&&i.isPropagationStopped())break e;$S(i,a,l),o=u}else for(s=0;s<r.length;s++){if(a=r[s],u=a.instance,l=a.currentTarget,a=a.listener,u!==o&&i.isPropagationStopped())break e;$S(i,a,l),o=u}}}if(lf)throw e=Xg,lf=!1,Xg=null,e}function Je(e,t){var n=t[sv];n===void 0&&(n=t[sv]=new Set);var r=e+"__bubble";n.has(r)||(GI(t,e,2,!1),n.add(r))}function Bh(e,t,n){var r=0;t&&(r|=4),GI(n,e,r,t)}var Ic="_reactListening"+Math.random().toString(36).slice(2);function ol(e){if(!e[Ic]){e[Ic]=!0,eI.forEach(function(n){n!=="selectionchange"&&(YF.has(n)||Bh(n,!1,e),Bh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ic]||(t[Ic]=!0,Bh("selectionchange",!1,t))}}function GI(e,t,n,r){switch(PI(t)){case 1:var i=lF;break;case 4:i=cF;break;default:i=S0}n=i.bind(null,t,n,e),i=void 0,!Yg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function zh(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;
vendor: 33,071 bytes, lines 38-41
38if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;a!==null;){if(s=Fo(a),s===null)return;if(u=s.tag,u===5||u===6){r=o=s;continue e}a=a.parentNode}}r=r.return}gI(function(){var l=o,c=v0(n),d=[];e:{var f=qI.get(e);if(f!==void 0){var p=E0,h=e;switch(e){case"keypress":if(Id(n)===0)break e;case"keydown":case"keyup":p=xF;break;case"focusin":h="focus",p=Dh;break;case"focusout":h="blur",p=Dh;break;case"beforeblur":case"afterblur":p=Dh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=RS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=pF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=RF;break;case BI:case zI:case HI:p=gF;break;case WI:p=PF;break;case"scroll":p=dF;break;case"wheel":p=OF;break;case"copy":case"cut":case"paste":p=yF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=PS}var m=(t&4)!==0,y=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var v=l,b;v!==null;){b=v;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,g!==null&&(S=Zu(v,g),S!=null&&m.push(sl(v,S,b)))),y)break;v=v.return}0<m.length&&(f=new p(f,h,null,n,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Gg&&(h=n.relatedTarget||n.fromElement)&&(Fo(h)||h[ui]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=l,h=h?Fo(h):null,h!==null&&(y=ps(h),h!==y||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=l),p!==h)){if(m=RS,S="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=PS,S="onPointerLeave",g="onPointerEnter",v="pointer"),y=p==null?f:zs(p),b=h==null?f:zs(h),f=new m(S,v+"leave",p,n,c),f.target=y,f.relatedTarget=b,S=null,Fo(c)===l&&(m=new m(g,v+"enter",h,n,c),m.target=b,m.relatedTarget=y,S=m),y=S,p&&h)t:{for(m=p,g=h,v=0,b=m;b;b=Ts(b))v++;for(b=0,S=g;S;S=Ts(S))b++;for(;0<v-b;)m=Ts(m),v--;for(;0<b-v;)g=Ts(g),b--;for(;v--;){if(m===g||g!==null&&m===g.alternate)break t;m=Ts(m),g=Ts(g)}m=null}else m=null;p!==null&&BS(d,f,p,m,!1),h!==null&&y!==null&&BS(d,y,h,m,!0)}}e:{if(f=l?zs(l):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var x=UF;else if(MS(f))if(LI)x=HF;else{x=BF;var T=$F}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(x=zF);if(x&&(x=x(e,l))){DI(d,x,n,c);break e}T&&T(e,f,l),e==="focusout"&&(T=f._wrapperState)&&T.controlled&&f.type==="number"&&zg(f,"number",f.value)}switch(T=l?zs(l):window,e){case"focusin":(MS(T)||T.contentEditable==="true")&&($s=T,ev=l,Au=null);break;case"focusout":Au=ev=$s=null;break;case"mousedown":tv=!0;break;case"contextmenu":case"mouseup":case"dragend":tv=!1,jS(d,n,c);break;case"selectionchange":if(VF)break;case"keydown":case"keyup":jS(d,n,c)}var _;if(x0)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Us?MI(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(OI&&n.locale!=="ko"&&(Us||C!=="onCompositionStart"?C==="onCompositionEnd"&&Us&&(_=AI()):(Vi=c,_0="value"in Vi?Vi.value:Vi.textContent,Us=!0)),T=hf(l,C),0<T.length&&(C=new kS(C,e,null,n,c),d.push({event:C,listeners:T}),_?C.data=_:(_=NI(n),_!==null&&(C.data=_)))),(_=NF?DF(e,n):LF(e,n))&&(l=hf(l,"onBeforeInput"),0<l.length&&(c=new kS("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:l}),c.data=_))}VI(d,t)})}function sl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hf(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Zu(e,n),o!=null&&r.unshift(sl(e,o,i)),o=Zu(e,t),o!=null&&r.push(sl(e,o,i))),e=e.return}return r}function Ts(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function BS(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,u=a.alternate,l=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&l!==null&&(a=l,i?(u=Zu(n,o),u!=null&&s.unshift(sl(n,u,a))):i||(u=Zu(n,o),u!=null&&s.push(sl(n,u,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var XF=/\r\n?/g,QF=/\u0000|\uFFFD/g;function zS(e){return(typeof e=="string"?e:""+e).replace(XF,` 39`).replace(QF,"")}function Rc(e,t,n){if(t=zS(t),zS(e)!==t&&n)throw Error(K(425))}function mf(){}var nv=null,rv=null;function iv(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 ov=typeof setTimeout=="function"?setTimeout:void 0,JF=typeof clearTimeout=="function"?clearTimeout:void 0,HS=typeof Promise=="function"?Promise:void 0,ZF=typeof queueMicrotask=="function"?queueMicrotask:typeof HS<"u"?function(e){return HS.resolve(null).then(e).catch(e3)}:ov;function e3(e){setTimeout(function(){throw e})}function Hh(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),nl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);nl(t)}function to(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 WS(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Fa=Math.random().toString(36).slice(2),Mr="__reactFiber$"+Fa,al="__reactProps$"+Fa,ui="__reactContainer$"+Fa,sv="__reactEvents$"+Fa,t3="__reactListeners$"+Fa,n3="__reactHandles$"+Fa;function Fo(e){var t=e[Mr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ui]||n[Mr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=WS(e);e!==null;){if(n=e[Mr])return n;e=WS(e)}return t}e=n,n=e.parentNode}return null}function jl(e){return e=e[Mr]||e[ui],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function _p(e){return e[al]||null}var av=[],Hs=-1;function So(e){return{current:e}}function et(e){0>Hs||(e.current=av[Hs],av[Hs]=null,Hs--)}function Ge(e,t){Hs++,av[Hs]=e.current,e.current=t}var po={},Gt=So(po),vn=So(!1),Qo=po;function ha(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yn(e){return e=e.childContextTypes,e!=null}function gf(){et(vn),et(Gt)}function qS(e,t,n){if(Gt.current!==po)throw Error(K(168));Ge(Gt,t),Ge(vn,n)}function KI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(K(108,$2(e)||"Unknown",i));return at({},n,r)}function vf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,Qo=Gt.current,Ge(Gt,e),Ge(vn,vn.current),!0}function VS(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=KI(e,t,Qo),r.__reactInternalMemoizedMergedChildContext=e,et(vn),et(Gt),Ge(Gt,e)):et(vn),Ge(vn,n)}var Qr=null,Ep=!1,Wh=!1;function YI(e){Qr===null?Qr=[e]:Qr.push(e)}function r3(e){Ep=!0,YI(e)}function _o(){if(!Wh&&Qr!==null){Wh=!0;var e=0,t=je;try{var n=Qr;for(je=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Qr=null,Ep=!1}catch(i){throw Qr!==null&&(Qr=Qr.slice(e+1)),wI(y0,_o),i}finally{je=t,Wh=!1}}return null}var Ws=[],qs=0,yf=null,bf=0,qn=[],Vn=0,Jo=null,Jr=1,Zr="";function Mo(e,t){Ws[qs++]=bf,Ws[qs++]=yf,yf=e,bf=t}function XI(e,t,n){qn[Vn++]=Jr,qn[Vn++]=Zr,qn[Vn++]=Jo,Jo=e;var r=Jr;e=Zr;var i=32-gr(r)-1;r&=~(1<<i),n+=1;var o=32-gr(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Jr=1<<32-gr(t)+i|n<<i|r,Zr=o+e}else Jr=1<<o|n<<i|r,Zr=e}function I0(e){e.return!==null&&(Mo(e,1),XI(e,1,0))}function R0(e){for(;e===yf;)yf=Ws[--qs],Ws[qs]=null,bf=Ws[--qs],Ws[qs]=null;for(;e===Jo;)Jo=qn[--Vn],qn[Vn]=null,Zr=qn[--Vn],qn[Vn]=null,Jr=qn[--Vn],qn[Vn]=null}var In=null,Cn=null,tt=!1,pr=null;function QI(e,t){var n=Gn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function GS(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,In=e,Cn=to(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,In=e,Cn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Jo!==null?{id:Jr,overflow:Zr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Gn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,In=e,Cn=null,!0):!1;default:return!1}}function uv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function lv(e){if(tt){var t=Cn;if(t){var n=t;if(!GS(e,t)){if(uv(e))throw Error(K(418));t=to(n.nextSibling);var r=In;t&&GS(e,t)?QI(r,n):(e.flags=e.flags&-4097|2,tt=!1,In=e)}}else{if(uv(e))throw Error(K(418));e.flags=e.flags&-4097|2,tt=!1,In=e}}}function KS(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;In=e}function kc(e){if(e!==In)return!1;if(!tt)return KS(e),tt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!iv(e.type,e.memoizedProps)),t&&(t=Cn)){if(uv(e))throw JI(),Error(K(418));for(;t;)QI(e,t),t=to(t.nextSibling)}if(KS(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(K(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Cn=to(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Cn=null}}else Cn=In?to(e.stateNode.nextSibling):null;return!0}function JI(){for(var e=Cn;e;)e=to(e.nextSibling)}function ma(){Cn=In=null,tt=!1}function k0(e){pr===null?pr=[e]:pr.push(e)}var i3=Si.ReactCurrentBatchConfig;function ou(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(K(309));var r=n.stateNode}if(!r)throw Error(K(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=i.refs;s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(K(284));if(!n._owner)throw Error(K(290,e))}return e}function Pc(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function YS(e){var t=e._init;return t(e._payload)}function ZI(e){function t(g,v){if(e){var b=g.deletions;b===null?(g.deletions=[v],g.flags|=16):b.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function r(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function i(g,v){return g=oo(g,v),g.index=0,g.sibling=null,g}function o(g,v,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<v?(g.flags|=2,v):b):(g.flags|=2,v)):(g.flags|=1048576,v)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,v,b,S){return v===null||v.tag!==6?(v=Qh(b,g.mode,S),v.return=g,v):(v=i(v,b),v.return=g,v)}function u(g,v,b,S){var x=b.type;return x===js?c(g,v,b.props.children,S,b.key):v!==null&&(v.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Li&&YS(x)===v.type)?(S=i(v,b.props),S.ref=ou(g,v,b),S.return=g,S):(S=Nd(b.type,b.key,b.props,null,g.mode,S),S.ref=ou(g,v,b),S.return=g,S)}function l(g,v,b,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Jh(b,g.mode,S),v.return=g,v):(v=i(v,b.children||[]),v.return=g,v)}function c(g,v,b,S,x){return v===null||v.tag!==7?(v=Wo(b,g.mode,S,x),v.return=g,v):(v=i(v,b),v.return=g,v)}function d(g,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Qh(""+v,g.mode,b),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case bc:return b=Nd(v.type,v.key,v.props,null,g.mode,b),b.ref=ou(g,null,v),b.return=g,b;case Fs:return v=Jh(v,g.mode,b),v.return=g,v;case Li:var S=v._init;return d(g,S(v._payload),b)}if(Su(v)||eu(v))return v=Wo(v,g.mode,b,null),v.return=g,v;Pc(g,v)}return null}function f(g,v,b,S){var x=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return x!==null?null:a(g,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case bc:return b.key===x?u(g,v,b,S):null;case Fs:return b.key===x?l(g,v,b,S):null;case Li:return x=b._init,f(g,v,x(b._payload),S)}if(Su(b)||eu(b))return x!==null?null:c(g,v,b,S,null);Pc(g,b)}return null}function p(g,v,b,S,x){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(b)||null,a(v,g,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case bc:return g=g.get(S.key===null?b:S.key)||null,u(v,g,S,x);case Fs:return g=g.get(S.key===null?b:S.key)||null,l(v,g,S,x);case Li:var T=S._init;return p(g,v,b,T(S._payload),x)}if(Su(S)||eu(S))return g=g.get(b)||null,c(v,g,S,x,null);Pc(v,S)}return null}function h(g,v,b,S){for(var x=null,T=null,_=v,C=v=0,I=null;_!==null&&C<b.length;C++){_.index>C?(I=_,_=null):I=_.sibling;var O=f(g,_,b[C],S);if(O===null){_===null&&(_=I);break}e&&_&&O.alternate===null&&t(g,_),v=o(O,v,C),T===null?x=O:T.sibling=O,T=O,_=I}if(C===b.length)return n(g,_),tt&&Mo(g,C),x;if(_===null){for(;C<b.length;C++)_=d(g,b[C],S),_!==null&&(v=o(_,v,C),T===null?x=_:T.sibling=_,T=_);return tt&&Mo(g,C),x}for(_=r(g,_);C<b.length;C++)I=p(_,g,C,b[C],S),I!==null&&(e&&I.alternate!==null&&_.delete(I.key===null?C:I.key),v=o(I,v,C),T===null?x=I:T.sibling=I,T=I);return e&&_.forEach(function(D){return t(g,D)}),tt&&Mo(g,C),x}function m(g,v,b,S){var x=eu(b);if(typeof x!="function")throw Error(K(150));if(b=x.call(b),b==null)throw Error(K(151));for(var T=x=null,_=v,C=v=0,I=null,O=b.next();_!==null&&!O.done;C++,O=b.next()){_.index>C?(I=_,_=null):I=_.sibling;var D=f(g,_,O.value,S);if(D===null){_===null&&(_=I);break}e&&_&&D.alternate===null&&t(g,_),v=o(D,v,C),T===null?x=D:T.sibling=D,T=D,_=I}if(O.done)return n(g,_),tt&&Mo(g,C),x;if(_===null){for(;!O.done;C++,O=b.next())O=d(g,O.value,S),O!==null&&(v=o(O,v,C),T===null?x=O:T.sibling=O,T=O);return tt&&Mo(g,C),x}for(_=r(g,_);!O.done;C++,O=b.next())O=p(_,g,C,O.value,S),O!==null&&(e&&O.alternate!==null&&_.delete(O.key===null?C:O.key),v=o(O,v,C),T===null?x=O:T.sibling=O,T=O);return e&&_.forEach(function(L){return t(g,L)}),tt&&Mo(g,C),x}function y(g,v,b,S){if(typeof b=="object"&&b!==null&&b.type===js&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case bc:e:{for(var x=b.key,T=v;T!==null;){if(T.key===x){if(x=b.type,x===js){if(T.tag===7){n(g,T.sibling),v=i(T,b.props.children),v.return=g,g=v;break e}}else if(T.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Li&&YS(x)===T.type){n(g,T.sibling),v=i(T,b.props),v.ref=ou(g,T,b),v.return=g,g=v;break e}n(g,T);break}else t(g,T);T=T.sibling}b.type===js?(v=Wo(b.props.children,g.mode,S,b.key),v.return=g,g=v):(S=Nd(b.type,b.key,b.props,null,g.mode,S),S.ref=ou(g,v,b),S.return=g,g=S)}return s(g);case Fs:e:{for(T=b.key;v!==null;){if(v.key===T)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=i(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=Jh(b,g.mode,S),v.return=g,g=v}return s(g);case Li:return T=b._init,y(g,v,T(b._payload),S)}if(Su(b))return h(g,v,b,S);if(eu(b))return m(g,v,b,S);Pc(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=i(v,b),v.return=g,g=v):(n(g,v),v=Qh(b,g.mode,S),v.return=g,g=v),s(g)):n(g,v)}return y}var ga=ZI(!0),eR=ZI(!1),wf=So(null),Sf=null,Vs=null,P0=null;function A0(){P0=Vs=Sf=null}function O0(e){var t=wf.current;et(wf),e._currentValue=t}function cv(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function oa(e,t){Sf=e,P0=Vs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(mn=!0),e.firstContext=null)}function Zn(e){var t=e._currentValue;if(P0!==e)if(e={context:e,memoizedValue:t,next:null},Vs===null){if(Sf===null)throw Error(K(308));Vs=e,Sf.dependencies={lanes:0,firstContext:e}}else Vs=Vs.next=e;return t}var jo=null;function M0(e){jo===null?jo=[e]:jo.push(e)}function tR(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,M0(t)):(n.next=i.next,i.next=n),t.interleaved=n,li(e,r)}function li(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fi=!1;function N0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nR(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 ei(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function no(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ie&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,li(e,n)}return i=r.interleaved,i===null?(t.next=t,M0(r)):(t.next=i.next,i.next=t),r.interleaved=t,li(e,n)}function Rd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,b0(e,n)}}function XS(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _f(e,t,n,r){var i=e.updateQueue;Fi=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,l=u.next;u.next=null,s===null?o=l:s.next=l,s=u;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=l:a.next=l,c.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;s=0,c=l=u=null,a=o;do{var f=a.lane,p=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(f=t,p=n,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=at({},d,f);break e;case 2:Fi=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(l=c=p,u=d):c=c.next=p,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);es|=s,e.lanes=s,e.memoizedState=d}}function QS(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(K(191,i));i.call(r)}}}var Ul={},jr=So(Ul),ul=So(Ul),ll=So(Ul);function Uo(e){if(e===Ul)throw Error(K(174));return e}function D0(e,t){switch(Ge(ll,t),Ge(ul,e),Ge(jr,Ul),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wg(t,e)}et(jr),Ge(jr,t)}function va(){et(jr),et(ul),et(ll)}function rR(e){Uo(ll.current);var t=Uo(jr.current),n=Wg(t,e.type);t!==n&&(Ge(ul,e),Ge(jr,n))}function L0(e){ul.current===e&&(et(jr),et(ul))}var ot=So(0);function Ef(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 qh=[];function F0(){for(var e=0;e<qh.length;e++)qh[e]._workInProgressVersionPrimary=null;qh.length=0}var kd=Si.ReactCurrentDispatcher,Vh=Si.ReactCurrentBatchConfig,Zo=0,st=null,xt=null,Pt=null,Tf=!1,Ou=!1,cl=0,o3=0;function Bt(){throw Error(K(321))}function j0(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function U0(e,t,n,r,i,o){if(Zo=o,st=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,kd.current=e===null||e.memoizedState===null?l3:c3,e=n(r,i),Ou){o=0;do{if(Ou=!1,cl=0,25<=o)throw Error(K(301));o+=1,Pt=xt=null,t.updateQueue=null,kd.current=d3,e=n(r,i)}while(Ou)}if(kd.current=xf,t=xt!==null&&xt.next!==null,Zo=0,Pt=xt=st=null,Tf=!1,t)throw Error(K(300));return e}function $0(){var e=cl!==0;return cl=0,e}function Ar(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?st.memoizedState=Pt=e:Pt=Pt.next=e,Pt}function er(){if(xt===null){var e=st.alternate;e=e!==null?e.memoizedState:null}else e=xt.next;var t=Pt===null?st.memoizedState:Pt.next;if(t!==null)Pt=t,xt=e;else{if(e===null)throw Error(K(310));xt=e,e={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},Pt===null?st.memoizedState=Pt=e:Pt=Pt.next=e}return Pt}function dl(e,t){return typeof t=="function"?t(e):t}function Gh(e){var t=er(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=xt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,u=null,l=o;do{var c=l.lane;if((Zo&c)===c)u!==null&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};u===null?(a=u=d,s=r):u=u.next=d,st.lanes|=c,es|=c}l=l.next}while(l!==null&&l!==o);u===null?s=r:u.next=a,br(r,t.memoizedState)||(mn=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,st.lanes|=o,es|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kh(e){var t=er(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);br(o,t.memoizedState)||(mn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function iR(){}function oR(e,t){var n=st,r=er(),i=t(),o=!br(r.memoizedState,i);if(o&&(r.memoizedState=i,mn=!0),r=r.queue,B0(uR.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Pt!==null&&Pt.memoizedState.tag&1){if(n.flags|=2048,fl(9,aR.bind(null,n,r,i,t),void 0,null),At===null)throw Error(K(349));Zo&30||sR(n,t,i)}return i}function sR(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=st.updateQueue,t===null?(t={lastEffect:null,stores:null},st.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function aR(e,t,n,r){t.value=n,t.getSnapshot=r,lR(t)&&cR(e)}function uR(e,t,n){return n(function(){lR(t)&&cR(e)})}function lR(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function cR(e){var t=li(e,1);t!==null&&vr(t,e,1,-1)}function JS(e){var t=Ar();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:dl,lastRenderedState:e},t.queue=e,e=e.dispatch=u3.bind(null,st,e),[t.memoizedState,e]}function fl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=st.updateQueue,t===null?(t={lastEffect:null,stores:null},st.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function dR(){return er().memoizedState}function Pd(e,t,n,r){var i=Ar();st.flags|=e,i.memoizedState=fl(1|t,n,void 0,r===void 0?null:r)}function Tp(e,t,n,r){var i=er();r=r===void 0?null:r;var o=void 0;if(xt!==null){var s=xt.memoizedState;if(o=s.destroy,r!==null&&j0(r,s.deps)){i.memoizedState=fl(t,n,o,r);return}}st.flags|=e,i.memoizedState=fl(1|t,n,o,r)}function ZS(e,t){return Pd(8390656,8,e,t)}function B0(e,t){return Tp(2048,8,e,t)}function fR(e,t){return Tp(4,2,e,t)}function pR(e,t){return Tp(4,4,e,t)}function hR(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 mR(e,t,n){return n=n!=null?n.concat([e]):null,Tp(4,4,hR.bind(null,t,e),n)}function z0(){}function gR(e,t){var n=er();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&j0(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vR(e,t){var n=er();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&j0(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yR(e,t,n){return Zo&21?(br(n,t)||(n=EI(),st.lanes|=n,es|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,mn=!0),e.memoizedState=n)}function s3(e,t){var n=je;je=n!==0&&4>n?n:4,e(!0);var r=Vh.transition;Vh.transition={};try{e(!1),t()}finally{je=n,Vh.transition=r}}function bR(){return er().memoizedState}function a3(e,t,n){var r=io(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wR(e))SR(t,n);else if(n=tR(e,t,n,r),n!==null){var i=tn();vr(n,e,r,i),_R(n,t,r)}}function u3(e,t,n){var r=io(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wR(e))SR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,br(a,s)){var u=t.interleaved;u===null?(i.next=i,M0(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=tR(e,t,i,r),n!==null&&(i=tn(),vr(n,e,r,i),_R(n,t,r))}}function wR(e){var t=e.alternate;return e===st||t!==null&&t===st}function SR(e,t){Ou=Tf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _R(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,b0(e,n)}}var xf={readContext:Zn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},l3={readContext:Zn,useCallback:function(e,t){return Ar().memoizedState=[e,t===void 0?null:t],e},useContext:Zn,useEffect:ZS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Pd(4194308,4,hR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pd(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pd(4,2,e,t)},useMemo:function(e,t){var n=Ar();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ar();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=a3.bind(null,st,e),[r.memoizedState,e]},useRef:function(e){var t=Ar();return e={current:e},t.memoizedState=e},useState:JS,useDebugValue:z0,useDeferredValue:function(e){return Ar().memoizedState=e},useTransition:function(){var e=JS(!1),t=e[0];return e=s3.bind(null,e[1]),Ar().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=st,i=Ar();if(tt){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),At===null)throw Error(K(349));Zo&30||sR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ZS(uR.bind(null,r,o,e),[e]),r.flags|=2048,fl(9,aR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ar(),t=At.identifierPrefix;if(tt){var n=Zr,r=Jr;n=(r&~(1<<32-gr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=o3++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},c3={readContext:Zn,useCallback:gR,useContext:Zn,useEffect:B0,useImperativeHandle:mR,useInsertionEffect:fR,useLayoutEffect:pR,useMemo:vR,useReducer:Gh,useRef:dR,useState:function(){return Gh(dl)},useDebugValue:z0,useDeferredValue:function(e){var t=er();return yR(t,xt.memoizedState,e)},useTransition:function(){var e=Gh(dl)[0],t=er().memoizedState;return[e,t]},useMutableSource:iR,useSyncExternalStore:oR,useId:bR,unstable_isNewReconciler:!1},d3={readContext:Zn,useCallback:gR,useContext:Zn,useEffect:B0,useImperativeHandle:mR,useInsertionEffect:fR,useLayoutEffect:pR,useMemo:vR,useReducer:Kh,useRef:dR,useState:function(){return Kh(dl)},useDebugValue:z0,useDeferredValue:function(e){var t=er();return xt===null?t.memoizedState=e:yR(t,xt.memoizedState,e)},useTransition:function(){var e=Kh(dl)[0],t=er().memoizedState;return[e,t]},useMutableSource:iR,useSyncExternalStore:oR,useId:bR,unstable_isNewReconciler:!1};function ur(e,t){if(e&&e.defaultProps){t=at({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function dv(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:at({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xp={isMounted:function(e){return(e=e._reactInternals)?ps(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tn(),i=io(e),o=ei(r,i);o.payload=t,n!=null&&(o.callback=n),t=no(e,o,i),t!==null&&(vr(t,e,i,r),Rd(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tn(),i=io(e),o=ei(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=no(e,o,i),t!==null&&(vr(t,e,i,r),Rd(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tn(),r=io(e),i=ei(n,r);i.tag=2,t!=null&&(i.callback=t),t=no(e,i,r),t!==null&&(vr(t,e,r,n),Rd(t,e,r))}};function e_(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!il(n,r)||!il(i,o):!0}function ER(e,t,n){var r=!1,i=po,o=t.contextType;return typeof o=="object"&&o!==null?o=Zn(o):(i=yn(t)?Qo:Gt.current,r=t.contextTypes,o=(r=r!=null)?ha(e,i):po),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xp,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function t_(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xp.enqueueReplaceState(t,t.state,null)}function fv(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},N0(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Zn(o):(o=yn(t)?Qo:Gt.current,i.context=ha(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(dv(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&xp.enqueueReplaceState(i,i.state,null),_f(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ya(e,t){try{var n="",r=t;do n+=U2(r),r=r.return;while(r);var i=n}catch(o){i=` 40Error generating stack: `+o.message+` 41`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Yh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pv(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var f3=typeof WeakMap=="function"?WeakMap:Map;function TR(e,t,n){n=ei(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){If||(If=!0,Ev=r),pv(e,t)},n}
vendor: 7,963 bytes, line 41
41function xR(e,t,n){n=ei(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){pv(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){pv(e,t),typeof r!="function"&&(ro===null?ro=new Set([this]):ro.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function n_(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new f3;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=C3.bind(null,e,t,n),t.then(e,e))}function r_(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 i_(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ei(-1,1),t.tag=2,no(n,t,1))),n.lanes|=1),e)}var p3=Si.ReactCurrentOwner,mn=!1;function Qt(e,t,n,r){t.child=e===null?eR(t,null,n,r):ga(t,e.child,n,r)}function o_(e,t,n,r,i){n=n.render;var o=t.ref;return oa(t,i),r=U0(e,t,n,r,o,i),n=$0(),e!==null&&!mn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ci(e,t,i)):(tt&&n&&I0(t),t.flags|=1,Qt(e,t,r,i),t.child)}function s_(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!X0(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,CR(e,t,o,r,i)):(e=Nd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:il,n(s,r)&&e.ref===t.ref)return ci(e,t,i)}return t.flags|=1,e=oo(o,r),e.ref=t.ref,e.return=t,t.child=e}function CR(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(il(o,r)&&e.ref===t.ref)if(mn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(mn=!0);else return t.lanes=e.lanes,ci(e,t,i)}return hv(e,t,n,r,i)}function IR(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(Ks,En),En|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ge(Ks,En),En|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ge(Ks,En),En|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ge(Ks,En),En|=r;return Qt(e,t,i,n),t.child}function RR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function hv(e,t,n,r,i){var o=yn(n)?Qo:Gt.current;return o=ha(t,o),oa(t,i),n=U0(e,t,n,r,o,i),r=$0(),e!==null&&!mn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ci(e,t,i)):(tt&&r&&I0(t),t.flags|=1,Qt(e,t,n,i),t.child)}function a_(e,t,n,r,i){if(yn(n)){var o=!0;vf(t)}else o=!1;if(oa(t,i),t.stateNode===null)Ad(e,t),ER(t,n,r),fv(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,l=n.contextType;typeof l=="object"&&l!==null?l=Zn(l):(l=yn(n)?Qo:Gt.current,l=ha(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==l)&&t_(t,s,r,l),Fi=!1;var f=t.memoizedState;s.state=f,_f(t,r,s,i),u=t.memoizedState,a!==r||f!==u||vn.current||Fi?(typeof c=="function"&&(dv(t,n,c,r),u=t.memoizedState),(a=Fi||e_(t,n,a,r,f,u,l))?(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=r,t.memoizedState=u),s.props=r,s.state=u,s.context=l,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,nR(e,t),a=t.memoizedProps,l=t.type===t.elementType?a:ur(t.type,a),s.props=l,d=t.pendingProps,f=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Zn(u):(u=yn(n)?Qo:Gt.current,u=ha(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==u)&&t_(t,s,r,u),Fi=!1,f=t.memoizedState,s.state=f,_f(t,r,s,i);var h=t.memoizedState;a!==d||f!==h||vn.current||Fi?(typeof p=="function"&&(dv(t,n,p,r),h=t.memoizedState),(l=Fi||e_(t,n,l,r,f,h,u)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=u,r=l):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return mv(e,t,n,r,o,i)}function mv(e,t,n,r,i,o){RR(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&VS(t,n,!1),ci(e,t,o);r=t.stateNode,p3.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ga(t,e.child,null,o),t.child=ga(t,null,a,o)):Qt(e,t,a,o),t.memoizedState=r.state,i&&VS(t,n,!0),t.child}function kR(e){var t=e.stateNode;t.pendingContext?qS(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qS(e,t.context,!1),D0(e,t.containerInfo)}function u_(e,t,n,r,i){return ma(),k0(i),t.flags|=256,Qt(e,t,n,r),t.child}var gv={dehydrated:null,treeContext:null,retryLane:0};function vv(e){return{baseLanes:e,cachePool:null,transitions:null}}function PR(e,t,n){var r=t.pendingProps,i=ot.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ge(ot,i&1),e===null)return lv(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Rp(s,r,0,null),e=Wo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=vv(n),t.memoizedState=gv,e):H0(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return h3(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=oo(i,u),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=oo(a,o):(o=Wo(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?vv(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=gv,r}return o=e.child,e=o.sibling,r=oo(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function H0(e,t){return t=Rp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ac(e,t,n,r){return r!==null&&k0(r),ga(t,e.child,null,n),e=H0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}
vendor: 5,098 bytes, line 41
41function h3(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Yh(Error(K(422))),Ac(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Rp({mode:"visible",children:r.children},i,0,null),o=Wo(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ga(t,e.child,null,s),t.child.memoizedState=vv(s),t.memoizedState=gv,o);if(!(t.mode&1))return Ac(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(K(419)),r=Yh(o,r,void 0),Ac(e,t,s,r)}if(a=(s&e.childLanes)!==0,mn||a){if(r=At,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,li(e,i),vr(r,e,i,-1))}return Y0(),r=Yh(Error(K(421))),Ac(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=I3.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Cn=to(i.nextSibling),In=t,tt=!0,pr=null,e!==null&&(qn[Vn++]=Jr,qn[Vn++]=Zr,qn[Vn++]=Jo,Jr=e.id,Zr=e.overflow,Jo=t),t=H0(t,r.children),t.flags|=4096,t)}function l_(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cv(e.return,t,n)}function Xh(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function AR(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Qt(e,t,r.children,n),r=ot.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&l_(e,n,t);else if(e.tag===19)l_(e,n,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}r&=1}if(Ge(ot,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ef(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Xh(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ef(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Xh(t,!0,n,null,o);break;case"together":Xh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ad(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ci(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),es|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(K(153));if(t.child!==null){for(e=t.child,n=oo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function m3(e,t,n){switch(t.tag){case 3:kR(t),ma();break;case 5:rR(t);break;case 1:yn(t.type)&&vf(t);break;case 4:D0(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ge(wf,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ge(ot,ot.current&1),t.flags|=128,null):n&t.child.childLanes?PR(e,t,n):(Ge(ot,ot.current&1),e=ci(e,t,n),e!==null?e.sibling:null);Ge(ot,ot.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return AR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ge(ot,ot.current),r)break;return null;case 22:case 23:return t.lanes=0,IR(e,t,n)}return ci(e,t,n)}var OR,yv,MR,NR;OR=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yv=function(){};MR=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Uo(jr.current);var o=null;switch(n){case"input":i=$g(e,i),r=$g(e,r),o=[];break;case"select":i=at({},i,{value:void 0}),r=at({},r,{value:void 0}),o=[];break;case"textarea":i=Hg(e,i),r=Hg(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=mf)}qg(n,r);var s;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var a=i[l];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Qu.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(a=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==a&&(u!=null||a!=null))if(l==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[s]!==u[s]&&(n||(n={}),n[s]=u[s])}
vendor: 5,029 bytes, line 41
41else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Qu.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&Je("scroll",e),o||a===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}};NR=function(e,t,n,r){n!==r&&(t.flags|=4)};function su(e,t){if(!tt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function g3(e,t,n){var r=t.pendingProps;switch(R0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(t),null;case 1:return yn(t.type)&&gf(),zt(t),null;case 3:return r=t.stateNode,va(),et(vn),et(Gt),F0(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(kc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pr!==null&&(Cv(pr),pr=null))),yv(e,t),zt(t),null;case 5:L0(t);var i=Uo(ll.current);if(n=t.type,e!==null&&t.stateNode!=null)MR(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(K(166));return zt(t),null}if(e=Uo(jr.current),kc(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Mr]=t,r[al]=o,e=(t.mode&1)!==0,n){case"dialog":Je("cancel",r),Je("close",r);break;case"iframe":case"object":case"embed":Je("load",r);break;case"video":case"audio":for(i=0;i<Eu.length;i++)Je(Eu[i],r);break;case"source":Je("error",r);break;case"img":case"image":case"link":Je("error",r),Je("load",r);break;case"details":Je("toggle",r);break;case"input":yS(r,o),Je("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Je("invalid",r);break;case"textarea":wS(r,o),Je("invalid",r)}qg(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Rc(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Rc(r.textContent,a,e),i=["children",""+a]):Qu.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Je("scroll",r)}switch(n){case"input":wc(r),bS(r,o,!0);break;case"textarea":wc(r),SS(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=mf)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uI(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Mr]=t,e[al]=r,OR(e,t,!1,!1),t.stateNode=e;e:{switch(s=Vg(n,r),n){case"dialog":Je("cancel",e),Je("close",e),i=r;break;case"iframe":case"object":case"embed":Je("load",e),i=r;break;case"video":case"audio":for(i=0;i<Eu.length;i++)Je(Eu[i],e);i=r;break;case"source":Je("error",e),i=r;break;case"img":case"image":case"link":Je("error",e),Je("load",e),i=r;break;case"details":Je("toggle",e),i=r;break;case"input":yS(e,r),i=$g(e,r),Je("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=at({},r,{value:void 0}),Je("invalid",e);break;case"textarea":wS(e,r),i=Hg(e,r),Je("invalid",e);break;default:i=r}qg(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?dI(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&lI(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Ju(e,u):typeof u=="number"&&Ju(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Qu.hasOwnProperty(o)?u!=null&&o==="onScroll"&&Je("scroll",e):u!=null&&p0(e,o,u,s))}switch(n){case"input":wc(e),bS(e,r,!1);break;case"textarea":wc(e),SS(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fo(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ta(e,!!r.multiple,o,!1):r.defaultValue!=null&&ta(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=mf)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}
vendor: 29,935 bytes, line 41
41return zt(t),null;case 6:if(e&&t.stateNode!=null)NR(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(K(166));if(n=Uo(ll.current),Uo(jr.current),kc(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mr]=t,(o=r.nodeValue!==n)&&(e=In,e!==null))switch(e.tag){case 3:Rc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Rc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mr]=t,t.stateNode=r}return zt(t),null;case 13:if(et(ot),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(tt&&Cn!==null&&t.mode&1&&!(t.flags&128))JI(),ma(),t.flags|=98560,o=!1;else if(o=kc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(K(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(K(317));o[Mr]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zt(t),o=!1}else pr!==null&&(Cv(pr),pr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ot.current&1?Ct===0&&(Ct=3):Y0())),t.updateQueue!==null&&(t.flags|=4),zt(t),null);case 4:return va(),yv(e,t),e===null&&ol(t.stateNode.containerInfo),zt(t),null;case 10:return O0(t.type._context),zt(t),null;case 17:return yn(t.type)&&gf(),zt(t),null;case 19:if(et(ot),o=t.memoizedState,o===null)return zt(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)su(o,!1);else{if(Ct!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ef(e),s!==null){for(t.flags|=128,su(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ge(ot,ot.current&1|2),t.child}e=e.sibling}o.tail!==null&&pt()>ba&&(t.flags|=128,r=!0,su(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ef(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),su(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!tt)return zt(t),null}else 2*pt()-o.renderingStartTime>ba&&n!==1073741824&&(t.flags|=128,r=!0,su(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=pt(),t.sibling=null,n=ot.current,Ge(ot,r?n&1|2:n&1),t):(zt(t),null);case 22:case 23:return K0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?En&1073741824&&(zt(t),t.subtreeFlags&6&&(t.flags|=8192)):zt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function v3(e,t){switch(R0(t),t.tag){case 1:return yn(t.type)&&gf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(),et(vn),et(Gt),F0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return L0(t),null;case 13:if(et(ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return et(ot),null;case 4:return va(),null;case 10:return O0(t.type._context),null;case 22:case 23:return K0(),null;case 24:return null;default:return null}}var Oc=!1,Wt=!1,y3=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Gs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){dt(e,t,r)}else n.current=null}function bv(e,t,n){try{n()}catch(r){dt(e,t,r)}}var c_=!1;function b3(e,t){if(nv=ff,e=UI(),C0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(a=s),f===o&&++c===r&&(u=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(rv={focusedElem:e,selectionRange:n},ff=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,y=h.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:ur(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){dt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return h=c_,c_=!1,h}function Mu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bv(t,n,o)}i=i.next}while(i!==r)}}function Cp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wv(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function DR(e){var t=e.alternate;t!==null&&(e.alternate=null,DR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mr],delete t[al],delete t[sv],delete t[t3],delete t[n3])),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 LR(e){return e.tag===5||e.tag===3||e.tag===4}function d_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||LR(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 Sv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mf));else if(r!==4&&(e=e.child,e!==null))for(Sv(e,t,n),e=e.sibling;e!==null;)Sv(e,t,n),e=e.sibling}function _v(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(_v(e,t,n),e=e.sibling;e!==null;)_v(e,t,n),e=e.sibling}var Nt=null,cr=!1;function Pi(e,t,n){for(n=n.child;n!==null;)FR(e,t,n),n=n.sibling}function FR(e,t,n){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(yp,n)}catch{}switch(n.tag){case 5:Wt||Gs(n,t);case 6:var r=Nt,i=cr;Nt=null,Pi(e,t,n),Nt=r,cr=i,Nt!==null&&(cr?(e=Nt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Nt.removeChild(n.stateNode));break;case 18:Nt!==null&&(cr?(e=Nt,n=n.stateNode,e.nodeType===8?Hh(e.parentNode,n):e.nodeType===1&&Hh(e,n),nl(e)):Hh(Nt,n.stateNode));break;case 4:r=Nt,i=cr,Nt=n.stateNode.containerInfo,cr=!0,Pi(e,t,n),Nt=r,cr=i;break;case 0:case 11:case 14:case 15:if(!Wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&bv(n,t,s),i=i.next}while(i!==r)}Pi(e,t,n);break;case 1:if(!Wt&&(Gs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){dt(n,t,a)}Pi(e,t,n);break;case 21:Pi(e,t,n);break;case 22:n.mode&1?(Wt=(r=Wt)||n.memoizedState!==null,Pi(e,t,n),Wt=r):Pi(e,t,n);break;default:Pi(e,t,n)}}function f_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new y3),t.forEach(function(r){var i=R3.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function or(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Nt=a.stateNode,cr=!1;break e;case 3:Nt=a.stateNode.containerInfo,cr=!0;break e;case 4:Nt=a.stateNode.containerInfo,cr=!0;break e}a=a.return}if(Nt===null)throw Error(K(160));FR(o,s,i),Nt=null,cr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){dt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jR(t,e),t=t.sibling}function jR(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(or(t,e),Ir(e),r&4){try{Mu(3,e,e.return),Cp(3,e)}catch(m){dt(e,e.return,m)}try{Mu(5,e,e.return)}catch(m){dt(e,e.return,m)}}break;case 1:or(t,e),Ir(e),r&512&&n!==null&&Gs(n,n.return);break;case 5:if(or(t,e),Ir(e),r&512&&n!==null&&Gs(n,n.return),e.flags&32){var i=e.stateNode;try{Ju(i,"")}catch(m){dt(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&sI(i,o),Vg(a,s);var l=Vg(a,o);for(s=0;s<u.length;s+=2){var c=u[s],d=u[s+1];c==="style"?dI(i,d):c==="dangerouslySetInnerHTML"?lI(i,d):c==="children"?Ju(i,d):p0(i,c,d,l)}switch(a){case"input":Bg(i,o);break;case"textarea":aI(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?ta(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?ta(i,!!o.multiple,o.defaultValue,!0):ta(i,!!o.multiple,o.multiple?[]:"",!1))}i[al]=o}catch(m){dt(e,e.return,m)}}break;case 6:if(or(t,e),Ir(e),r&4){if(e.stateNode===null)throw Error(K(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){dt(e,e.return,m)}}break;case 3:if(or(t,e),Ir(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{nl(t.containerInfo)}catch(m){dt(e,e.return,m)}break;case 4:or(t,e),Ir(e);break;case 13:or(t,e),Ir(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(V0=pt())),r&4&&f_(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Wt=(l=Wt)||c,or(t,e),Wt=l):or(t,e),Ir(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(Q=e,c=e.child;c!==null;){for(d=Q=c;Q!==null;){switch(f=Q,p=f.child,f.tag){case 0:case 11:case 14:case 15:Mu(4,f,f.return);break;case 1:Gs(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){dt(r,n,m)}}break;case 5:Gs(f,f.return);break;case 22:if(f.memoizedState!==null){h_(d);continue}}p!==null?(p.return=f,Q=p):h_(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=d.stateNode,u=d.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=cI("display",s))}catch(m){dt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(m){dt(e,e.return,m)}}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;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:or(t,e),Ir(e),r&4&&f_(e);break;case 21:break;default:or(t,e),Ir(e)}}function Ir(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(LR(n)){var r=n;break e}n=n.return}throw Error(K(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ju(i,""),r.flags&=-33);var o=d_(e);_v(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=d_(e);Sv(e,a,s);break;default:throw Error(K(161))}}catch(u){dt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function w3(e,t,n){Q=e,UR(e)}function UR(e,t,n){for(var r=(e.mode&1)!==0;Q!==null;){var i=Q,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Oc;if(!s){var a=i.alternate,u=a!==null&&a.memoizedState!==null||Wt;a=Oc;var l=Wt;if(Oc=s,(Wt=u)&&!l)for(Q=i;Q!==null;)s=Q,u=s.child,s.tag===22&&s.memoizedState!==null?m_(i):u!==null?(u.return=s,Q=u):m_(i);for(;o!==null;)Q=o,UR(o),o=o.sibling;Q=i,Oc=a,Wt=l}p_(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Q=o):p_(e)}}function p_(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Wt||Cp(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Wt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ur(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&QS(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}QS(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&nl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}Wt||t.flags&512&&wv(t)}catch(f){dt(t,t.return,f)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function h_(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function m_(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Cp(4,t)}catch(u){dt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){dt(t,i,u)}}var o=t.return;try{wv(t)}catch(u){dt(t,o,u)}break;case 5:var s=t.return;try{wv(t)}catch(u){dt(t,s,u)}}}catch(u){dt(t,t.return,u)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var S3=Math.ceil,Cf=Si.ReactCurrentDispatcher,W0=Si.ReactCurrentOwner,Kn=Si.ReactCurrentBatchConfig,Ie=0,At=null,yt=null,Lt=0,En=0,Ks=So(0),Ct=0,pl=null,es=0,Ip=0,q0=0,Nu=null,hn=null,V0=0,ba=1/0,Xr=null,If=!1,Ev=null,ro=null,Mc=!1,Gi=null,Rf=0,Du=0,Tv=null,Od=-1,Md=0;function tn(){return Ie&6?pt():Od!==-1?Od:Od=pt()}function io(e){return e.mode&1?Ie&2&&Lt!==0?Lt&-Lt:i3.transition!==null?(Md===0&&(Md=EI()),Md):(e=je,e!==0||(e=window.event,e=e===void 0?16:PI(e.type)),e):1}function vr(e,t,n,r){if(50<Du)throw Du=0,Tv=null,Error(K(185));Ll(e,n,r),(!(Ie&2)||e!==At)&&(e===At&&(!(Ie&2)&&(Ip|=n),Ct===4&&qi(e,Lt)),bn(e,r),n===1&&Ie===0&&!(t.mode&1)&&(ba=pt()+500,Ep&&_o()))}function bn(e,t){var n=e.callbackNode;iF(e,t);var r=df(e,e===At?Lt:0);if(r===0)n!==null&&TS(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&TS(n),t===1)e.tag===0?r3(g_.bind(null,e)):YI(g_.bind(null,e)),ZF(function(){!(Ie&6)&&_o()}),n=null;else{switch(TI(r)){case 1:n=y0;break;case 4:n=SI;break;case 16:n=cf;break;case 536870912:n=_I;break;default:n=cf}n=GR(n,$R.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $R(e,t){if(Od=-1,Md=0,Ie&6)throw Error(K(327));var n=e.callbackNode;if(sa()&&e.callbackNode!==n)return null;var r=df(e,e===At?Lt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=kf(e,r);else{t=r;var i=Ie;Ie|=2;var o=zR();(At!==e||Lt!==t)&&(Xr=null,ba=pt()+500,Ho(e,t));do try{T3();break}catch(a){BR(e,a)}while(!0);A0(),Cf.current=o,Ie=i,yt!==null?t=0:(At=null,Lt=0,t=Ct)}if(t!==0){if(t===2&&(i=Qg(e),i!==0&&(r=i,t=xv(e,i))),t===1)throw n=pl,Ho(e,0),qi(e,r),bn(e,pt()),n;if(t===6)qi(e,r);else{if(i=e.current.alternate,!(r&30)&&!_3(i)&&(t=kf(e,r),t===2&&(o=Qg(e),o!==0&&(r=o,t=xv(e,o))),t===1))throw n=pl,Ho(e,0),qi(e,r),bn(e,pt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(K(345));case 2:No(e,hn,Xr);break;case 3:if(qi(e,r),(r&130023424)===r&&(t=V0+500-pt(),10<t)){if(df(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){tn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ov(No.bind(null,e,hn,Xr),t);break}No(e,hn,Xr);break;case 4:if(qi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-gr(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=pt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*S3(r/1960))-r,10<r){e.timeoutHandle=ov(No.bind(null,e,hn,Xr),r);break}No(e,hn,Xr);break;case 5:No(e,hn,Xr);break;default:throw Error(K(329))}}}return bn(e,pt()),e.callbackNode===n?$R.bind(null,e):null}function xv(e,t){var n=Nu;return e.current.memoizedState.isDehydrated&&(Ho(e,t).flags|=256),e=kf(e,t),e!==2&&(t=hn,hn=n,t!==null&&Cv(t)),e}function Cv(e){hn===null?hn=e:hn.push.apply(hn,e)}function _3(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!br(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 qi(e,t){for(t&=~q0,t&=~Ip,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gr(t),r=1<<n;e[n]=-1,t&=~r}}function g_(e){if(Ie&6)throw Error(K(327));sa();var t=df(e,0);if(!(t&1))return bn(e,pt()),null;var n=kf(e,t);if(e.tag!==0&&n===2){var r=Qg(e);r!==0&&(t=r,n=xv(e,r))}if(n===1)throw n=pl,Ho(e,0),qi(e,t),bn(e,pt()),n;if(n===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,No(e,hn,Xr),bn(e,pt()),null}function G0(e,t){var n=Ie;Ie|=1;try{return e(t)}finally{Ie=n,Ie===0&&(ba=pt()+500,Ep&&_o())}}function ts(e){Gi!==null&&Gi.tag===0&&!(Ie&6)&&sa();var t=Ie;Ie|=1;var n=Kn.transition,r=je;try{if(Kn.transition=null,je=1,e)return e()}finally{je=r,Kn.transition=n,Ie=t,!(Ie&6)&&_o()}}function K0(){En=Ks.current,et(Ks)}function Ho(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,JF(n)),yt!==null)for(n=yt.return;n!==null;){var r=n;switch(R0(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&gf();break;case 3:va(),et(vn),et(Gt),F0();break;case 5:L0(r);break;case 4:va();break;case 13:et(ot);break;case 19:et(ot);break;case 10:O0(r.type._context);break;case 22:case 23:K0()}n=n.return}if(At=e,yt=e=oo(e.current,null),Lt=En=t,Ct=0,pl=null,q0=Ip=es=0,hn=Nu=null,jo!==null){for(t=0;t<jo.length;t++)if(n=jo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}jo=null}return e}function BR(e,t){do{var n=yt;try{if(A0(),kd.current=xf,Tf){for(var r=st.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Tf=!1}if(Zo=0,Pt=xt=st=null,Ou=!1,cl=0,W0.current=null,n===null||n.return===null){Ct=1,pl=t,yt=null;break}e:{var o=e,s=n.return,a=n,u=t;if(t=Lt,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=r_(s);if(p!==null){p.flags&=-257,i_(p,s,a,o,t),p.mode&1&&n_(o,l,t),t=p,u=l;var h=t.updateQueue;if(h===null){var m=new Set;m.add(u),t.updateQueue=m}else h.add(u);break e}else{if(!(t&1)){n_(o,l,t),Y0();break e}u=Error(K(426))}}else if(tt&&a.mode&1){var y=r_(s);if(y!==null){!(y.flags&65536)&&(y.flags|=256),i_(y,s,a,o,t),k0(ya(u,a));break e}}o=u=ya(u,a),Ct!==4&&(Ct=2),Nu===null?Nu=[o]:Nu.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=TR(o,u,t);XS(o,g);break e;case 1:a=u;var v=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ro===null||!ro.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=xR(o,a,t);XS(o,S);break e}}o=o.return}while(o!==null)}WR(n)}catch(x){t=x,yt===n&&n!==null&&(yt=n=n.return);continue}break}while(!0)}function zR(){var e=Cf.current;return Cf.current=xf,e===null?xf:e}function Y0(){(Ct===0||Ct===3||Ct===2)&&(Ct=4),At===null||!(es&268435455)&&!(Ip&268435455)||qi(At,Lt)}function kf(e,t){var n=Ie;Ie|=2;var r=zR();(At!==e||Lt!==t)&&(Xr=null,Ho(e,t));do try{E3();break}catch(i){BR(e,i)}while(!0);if(A0(),Ie=n,Cf.current=r,yt!==null)throw Error(K(261));return At=null,Lt=0,Ct}function E3(){for(;yt!==null;)HR(yt)}function T3(){for(;yt!==null&&!Y2();)HR(yt)}function HR(e){var t=VR(e.alternate,e,En);e.memoizedProps=e.pendingProps,t===null?WR(e):yt=t,W0.current=null}function WR(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=v3(n,t),n!==null){n.flags&=32767,yt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ct=6,yt=null;return}}else if(n=g3(n,t,En),n!==null){yt=n;return}if(t=t.sibling,t!==null){yt=t;return}yt=t=e}while(t!==null);Ct===0&&(Ct=5)}function No(e,t,n){var r=je,i=Kn.transition;try{Kn.transition=null,je=1,x3(e,t,n,r)}finally{Kn.transition=i,je=r}return null}function x3(e,t,n,r){do sa();while(Gi!==null);if(Ie&6)throw Error(K(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(K(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(oF(e,o),e===At&&(yt=At=null,Lt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Mc||(Mc=!0,GR(cf,function(){return sa(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Kn.transition,Kn.transition=null;var s=je;je=1;var a=Ie;Ie|=4,W0.current=null,b3(e,n),jR(n,e),qF(rv),ff=!!nv,rv=nv=null,e.current=n,w3(n),X2(),Ie=a,je=s,Kn.transition=o}else e.current=n;if(Mc&&(Mc=!1,Gi=e,Rf=i),o=e.pendingLanes,o===0&&(ro=null),Z2(n.stateNode),bn(e,pt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(If)throw If=!1,e=Ev,Ev=null,e;return Rf&1&&e.tag!==0&&sa(),o=e.pendingLanes,o&1?e===Tv?Du++:(Du=0,Tv=e):Du=0,_o(),null}function sa(){if(Gi!==null){var e=TI(Rf),t=Kn.transition,n=je;try{if(Kn.transition=null,je=16>e?16:e,Gi===null)var r=!1;else{if(e=Gi,Gi=null,Rf=0,Ie&6)throw Error(K(331));var i=Ie;for(Ie|=4,Q=e.current;Q!==null;){var o=Q,s=o.child;if(Q.flags&16){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var l=a[u];for(Q=l;Q!==null;){var c=Q;switch(c.tag){case 0:case 11:case 15:Mu(8,c,o)}var d=c.child;if(d!==null)d.return=c,Q=d;else for(;Q!==null;){c=Q;var f=c.sibling,p=c.return;if(DR(c),c===l){Q=null;break}if(f!==null){f.return=p,Q=f;break}Q=p}}}var h=o.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}Q=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Q=s;else e:for(;Q!==null;){if(o=Q,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Mu(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,Q=g;break e}Q=o.return}}var v=e.current;for(Q=v;Q!==null;){s=Q;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,Q=b;else e:for(s=v;Q!==null;){if(a=Q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Cp(9,a)}}catch(x){dt(a,a.return,x)}if(a===s){Q=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,Q=S;break e}Q=a.return}}if(Ie=i,_o(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(yp,e)}catch{}r=!0}return r}finally{je=n,Kn.transition=t}}return!1}function v_(e,t,n){t=ya(n,t),t=TR(e,t,1),e=no(e,t,1),t=tn(),e!==null&&(Ll(e,1,t),bn(e,t))}function dt(e,t,n){if(e.tag===3)v_(e,e,n);else for(;t!==null;){if(t.tag===3){v_(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ro===null||!ro.has(r))){e=ya(n,e),e=xR(t,e,1),t=no(t,e,1),e=tn(),t!==null&&(Ll(t,1,e),bn(t,e));break}}t=t.return}}function C3(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tn(),e.pingedLanes|=e.suspendedLanes&n,At===e&&(Lt&n)===n&&(Ct===4||Ct===3&&(Lt&130023424)===Lt&&500>pt()-V0?Ho(e,0):q0|=n),bn(e,t)}function qR(e,t){t===0&&(e.mode&1?(t=Ec,Ec<<=1,!(Ec&130023424)&&(Ec=4194304)):t=1);var n=tn();e=li(e,t),e!==null&&(Ll(e,t,n),bn(e,n))}function I3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qR(e,n)}function R3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(K(314))}r!==null&&r.delete(t),qR(e,n)}var VR;VR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vn.current)mn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return mn=!1,m3(e,t,n);mn=!!(e.flags&131072)}else mn=!1,tt&&t.flags&1048576&&XI(t,bf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ad(e,t),e=t.pendingProps;var i=ha(t,Gt.current);oa(t,n),i=U0(null,t,r,e,i,n);var o=$0();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(r)?(o=!0,vf(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,N0(t),i.updater=xp,t.stateNode=i,i._reactInternals=t,fv(t,r,e,n),t=mv(null,t,r,!0,o,n)):(t.tag=0,tt&&o&&I0(t),Qt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ad(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=P3(r),e=ur(r,e),i){case 0:t=hv(null,t,r,e,n);break e;case 1:t=a_(null,t,r,e,n);break e;case 11:t=o_(null,t,r,e,n);break e;case 14:t=s_(null,t,r,ur(r.type,e),n);break e}throw Error(K(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ur(r,i),hv(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ur(r,i),a_(e,t,r,i,n);case 3:e:{if(kR(t),e===null)throw Error(K(387));r=t.pendingProps,o=t.memoizedState,i=o.element,nR(e,t),_f(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ya(Error(K(423)),t),t=u_(e,t,r,n,i);break e}else if(r!==i){i=ya(Error(K(424)),t),t=u_(e,t,r,n,i);break e}else for(Cn=to(t.stateNode.containerInfo.firstChild),In=t,tt=!0,pr=null,n=eR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ma(),r===i){t=ci(e,t,n);break e}Qt(e,t,r,n)}t=t.child}return t;case 5:return rR(t),e===null&&lv(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,iv(r,i)?s=null:o!==null&&iv(r,o)&&(t.flags|=32),RR(e,t),Qt(e,t,s,n),t.child;case 6:return e===null&&lv(t),null;case 13:return PR(e,t,n);case 4:return D0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ga(t,null,r,n):Qt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ur(r,i),o_(e,t,r,i,n);case 7:return Qt(e,t,t.pendingProps,n),t.child;case 8:return Qt(e,t,t.pendingProps.children,n),t.child;case 12:return Qt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ge(wf,r._currentValue),r._currentValue=s,o!==null)if(br(o.value,s)){if(o.children===i.children&&!vn.current){t=ci(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=ei(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),cv(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(K(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),cv(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Qt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,oa(t,n),i=Zn(i),r=r(i),t.flags|=1,Qt(e,t,r,n),t.child;case 14:return r=t.type,i=ur(r,t.pendingProps),i=ur(r.type,i),s_(e,t,r,i,n);case 15:return CR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ur(r,i),Ad(e,t),t.tag=1,yn(r)?(e=!0,vf(t)):e=!1,oa(t,n),ER(t,r,i),fv(t,r,i,n),mv(null,t,r,!0,e,n);case 19:return AR(e,t,n);case 22:return IR(e,t,n)}throw Error(K(156,t.tag))};function GR(e,t){return wI(e,t)}function k3(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(e,t,n,r){return new k3(e,t,n,r)}function X0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function P3(e){if(typeof e=="function")return X0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===m0)return 11;if(e===g0)return 14}return 2}function oo(e,t){var n=e.alternate;return n===null?(n=Gn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 4,922 bytes, line 41
41ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nd(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")X0(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case js:return Wo(n.children,i,o,t);case h0:s=8,i|=8;break;case Lg:return e=Gn(12,n,t,i|2),e.elementType=Lg,e.lanes=o,e;case Fg:return e=Gn(13,n,t,i),e.elementType=Fg,e.lanes=o,e;case jg:return e=Gn(19,n,t,i),e.elementType=jg,e.lanes=o,e;case rI:return Rp(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tI:s=10;break e;case nI:s=9;break e;case m0:s=11;break e;case g0:s=14;break e;case Li:s=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Gn(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Wo(e,t,n,r){return e=Gn(7,e,r,t),e.lanes=n,e}function Rp(e,t,n,r){return e=Gn(22,e,r,t),e.elementType=rI,e.lanes=n,e.stateNode={isHidden:!1},e}function Qh(e,t,n){return e=Gn(6,e,null,t),e.lanes=n,e}function Jh(e,t,n){return t=Gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function A3(e,t,n,r,i){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=Oh(0),this.expirationTimes=Oh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Q0(e,t,n,r,i,o,s,a,u){return e=new A3(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Gn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},N0(o),e}function O3(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function KR(e){if(!e)return po;e=e._reactInternals;e:{if(ps(e)!==e||e.tag!==1)throw Error(K(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(K(171))}if(e.tag===1){var n=e.type;if(yn(n))return KI(e,n,t)}return t}function YR(e,t,n,r,i,o,s,a,u){return e=Q0(n,r,!0,e,i,o,s,a,u),e.context=KR(null),n=e.current,r=tn(),i=io(n),o=ei(r,i),o.callback=t??null,no(n,o,i),e.current.lanes=i,Ll(e,i,r),bn(e,r),e}function kp(e,t,n,r){var i=t.current,o=tn(),s=io(i);return n=KR(n),t.context===null?t.context=n:t.pendingContext=n,t=ei(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=no(i,t,s),e!==null&&(vr(e,i,s,o),Rd(e,i,s)),s}function Pf(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function y_(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function J0(e,t){y_(e,t),(e=e.alternate)&&y_(e,t)}function M3(){return null}var XR=typeof reportError=="function"?reportError:function(e){console.error(e)};function Z0(e){this._internalRoot=e}Pp.prototype.render=Z0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));kp(e,t,null,null)};Pp.prototype.unmount=Z0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ts(function(){kp(null,e,null,null)}),t[ui]=null}};function Pp(e){this._internalRoot=e}Pp.prototype.unstable_scheduleHydration=function(e){if(e){var t=II();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wi.length&&t!==0&&t<Wi[n].priority;n++);Wi.splice(n,0,e),n===0&&kI(e)}};function eb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ap(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function b_(){}function N3(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var l=Pf(s);o.call(l)}}var s=YR(t,r,e,0,null,!1,!1,"",b_);return e._reactRootContainer=s,e[ui]=s.current,ol(e.nodeType===8?e.parentNode:e),ts(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var l=Pf(u);a.call(l)}}var u=Q0(e,0,!1,null,null,!1,!1,"",b_);return e._reactRootContainer=u,e[ui]=u.current,ol(e.nodeType===8?e.parentNode:e),ts(function(){kp(t,u,n,r)}),u}function Op(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var u=Pf(s);
41a.call(u)}}kp(t,s,e,i)}else s=N3(n,t,e,i,r);return Pf(s)}xI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=_u(t.pendingLanes);n!==0&&(b0(t,n|1),bn(t,pt()),!(Ie&6)&&(ba=pt()+500,_o()))}break;case 13:ts(function(){var r=li(e,1);if(r!==null){var i=tn();vr(r,e,1,i)}}),J0(e,1)}};w0=function(e){if(e.tag===13){var t=li(e,134217728);if(t!==null){var n=tn();vr(t,e,134217728,n)}J0(e,134217728)}};CI=function(e){if(e.tag===13){var t=io(e),n=li(e,t);if(n!==null){var r=tn();vr(n,e,t,r)}J0(e,t)}};II=function(){return je};RI=function(e,t){var n=je;try{return je=e,t()}finally{je=n}};Kg=function(e,t,n){switch(t){case"input":if(Bg(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=_p(r);if(!i)throw Error(K(90));oI(r),Bg(r,i)}}}break;case"textarea":aI(e,n);break;case"select":t=n.value,t!=null&&ta(e,!!n.multiple,t,!1)}};hI=G0;mI=ts;var D3={usingClientEntryPoint:!1,Events:[jl,zs,_p,fI,pI,G0]},au={findFiberByHostInstance:Fo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},L3={bundleType:au.bundleType,version:au.version,rendererPackageName:au.rendererPackageName,rendererConfig:au.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Si.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=yI(e),e===null?null:e.stateNode},findFiberByHostInstance:au.findFiberByHostInstance||M3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nc.isDisabled&&Nc.supportsFiber)try{yp=Nc.inject(L3),Fr=Nc}catch{}}Fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D3;Fn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eb(t))throw Error(K(200));return O3(e,t,null,n)};Fn.createRoot=function(e,t){if(!eb(e))throw Error(K(299));var n=!1,r="",i=XR;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Q0(e,1,!1,null,null,n,!1,r,i),e[ui]=t.current,ol(e.nodeType===8?e.parentNode:e),new Z0(t)};Fn.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(K(188)):(e=Object.keys(e).join(","),Error(K(268,e)));return e=yI(t),e=e===null?null:e.stateNode,e};Fn.flushSync=function(e){return ts(e)};Fn.hydrate=function(e,t,n){if(!Ap(t))throw Error(K(200));return Op(null,e,t,!0,n)};Fn.hydrateRoot=function(e,t,n){if(!eb(e))throw Error(K(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=XR;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=YR(t,null,e,1,n??null,i,!1,o,s),e[ui]=t.current,ol(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Pp(t)};Fn.render=function(e,t,n){if(!Ap(t))throw Error(K(200));return Op(null,e,t,!1,n)};Fn.unmountComponentAtNode=function(e){if(!Ap(e))throw Error(K(40));return e._reactRootContainer?(ts(function(){Op(null,null,e,!1,function(){e._reactRootContainer=null,e[ui]=null})}),!0):!1};Fn.unstable_batchedUpdates=G0;Fn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ap(n))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return Op(e,t,n,!1,r)};Fn.version="18.3.1-next-f1338f8080-20240426";function QR(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(QR)}catch(e){console.error(e)}}QR(),QC.exports=Fn;var $l=QC.exports;const JR=o0($l);var w_=$l;Ng.createRoot=w_.createRoot,Ng.hydrateRoot=w_.hydrateRoot;/** 42 * @remix-run/router v1.23.0 43 * 44 * Copyright (c) Remix Software Inc. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE.md file in the root directory of this source tree. 48 * 49 * @license MIT 50 */function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(this,arguments)}var Ki;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ki||(Ki={}));const S_="popstate";function F3(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:s,hash:a}=r.location;return Iv("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Af(i)}return U3(t,n,null,e)}function bt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ZR(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function j3(){return Math.random().toString(36).substr(2,8)}function __(e,t){return{usr:e.state,key:e.key,idx:t}}function Iv(e,t,n,r){return n===void 0&&(n=null),hl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ja(t):t,{state:n,key:t&&t.key||r||j3()})}function Af(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ja(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function U3(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Ki.Pop,u=null,l=c();l==null&&(l=0,s.replaceState(hl({},s.state,{idx:l}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Ki.Pop;let y=c(),g=y==null?null:y-l;l=y,u&&u({action:a,location:m.location,delta:g})}function f(y,g){a=Ki.Push;let v=Iv(m.location,y,g);l=c()+1;let b=__(v,l),S=m.createHref(v);try{s.pushState(b,"",S)}
vendor: 3,212 bytes, line 50
50catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(S)}o&&u&&u({action:a,location:m.location,delta:1})}function p(y,g){a=Ki.Replace;let v=Iv(m.location,y,g);l=c();let b=__(v,l),S=m.createHref(v);s.replaceState(b,"",S),o&&u&&u({action:a,location:m.location,delta:0})}function h(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof y=="string"?y:Af(y);return v=v.replace(/ $/,"%20"),bt(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let m={get action(){return a},get location(){return e(i,s)},listen(y){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(S_,d),u=y,()=>{i.removeEventListener(S_,d),u=null}},createHref(y){return t(i,y)},createURL:h,encodeLocation(y){let g=h(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:p,go(y){return s.go(y)}};return m}var E_;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(E_||(E_={}));function $3(e,t,n){return n===void 0&&(n="/"),B3(e,t,n)}function B3(e,t,n,r){let i=typeof t=="string"?ja(t):t,o=tb(i.pathname||"/",n);if(o==null)return null;let s=ek(e);z3(s);let a=null;for(let u=0;a==null&&u<s.length;++u){let l=ej(o);a=Q3(s[u],l)}return a}function ek(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,s,a)=>{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};u.relativePath.startsWith("/")&&(bt(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=so([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(bt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),ek(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Y3(l,o.index),routesMeta:c})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let u of tk(o.path))i(o,s,u)}),t}function tk(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=tk(r.join("/")),a=[];return a.push(...s.map(u=>u===""?o:[o,u].join("/"))),i&&a.push(...s),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function z3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:X3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const H3=/^:[\w-]+$/,W3=3,q3=2,V3=1,G3=10,K3=-2,T_=e=>e==="*";function Y3(e,t){let n=e.split("/"),r=n.length;return n.some(T_)&&(r+=K3),t&&(r+=q3),n.filter(i=>!T_(i)).reduce((i,o)=>i+(H3.test(o)?W3:o===""?V3:G3),r)}function X3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Q3(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let u=r[a],l=a===r.length-1,c=o==="/"?t:t.slice(o.length)||"/",d=J3({path:u.relativePath,caseSensitive:u.caseSensitive,end:l},c),f=u.route;if(!d)return null;
vendor: 9,412 bytes, lines 50-59
50Object.assign(i,d.params),s.push({params:i,pathname:so([o,d.pathname]),pathnameBase:ij(so([o,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(o=so([o,d.pathnameBase]))}return s}function J3(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Z3(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((l,c,d)=>{let{paramName:f,isOptional:p}=c;if(f==="*"){let m=a[d]||"";s=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[d];return p&&!h?l[f]=void 0:l[f]=(h||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:s,pattern:e}}function Z3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ZR(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function ej(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ZR(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function tj(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ja(e):e;return{pathname:n?n.startsWith("/")?n:nj(n,t):t,search:oj(r),hash:sj(i)}}function nj(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zh(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function rj(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nk(e,t){let n=rj(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function rk(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ja(e):(i=hl({},e),bt(!i.pathname||!i.pathname.includes("?"),Zh("?","pathname","search",i)),bt(!i.pathname||!i.pathname.includes("#"),Zh("#","pathname","hash",i)),bt(!i.search||!i.search.includes("#"),Zh("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let u=tj(i,a),l=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const so=e=>e.join("/").replace(/\/\/+/g,"/"),ij=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),oj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ik=["post","put","patch","delete"];new Set(ik);const uj=["get",...ik];new Set(uj);/** 51 * React Router v6.30.1 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ml.apply(this,arguments)}const nb=w.createContext(null),lj=w.createContext(null),hs=w.createContext(null),Mp=w.createContext(null),_i=w.createContext({outlet:null,matches:[],isDataRoute:!1}),ok=w.createContext(null);function cj(e,t){let{relative:n}=t===void 0?{}:t;Bl()||bt(!1);let{basename:r,navigator:i}=w.useContext(hs),{hash:o,pathname:s,search:a}=ak(e,{relative:n}),u=s;return r!=="/"&&(u=s==="/"?r:so([r,s])),i.createHref({pathname:u,search:a,hash:o})}function Bl(){return w.useContext(Mp)!=null}function _r(){return Bl()||bt(!1),w.useContext(Mp).location}function sk(e){w.useContext(hs).static||w.useLayoutEffect(e)}function Np(){let{isDataRoute:e}=w.useContext(_i);return e?xj():dj()}function dj(){Bl()||bt(!1);let e=w.useContext(nb),{basename:t,future:n,navigator:r}=w.useContext(hs),{matches:i}=w.useContext(_i),{pathname:o}=_r(),s=JSON.stringify(nk(i,n.v7_relativeSplatPath)),a=w.useRef(!1);return sk(()=>{a.current=!0}),w.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){r.go(l);return}let d=rk(l,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:so([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,s,o,e])}const fj=w.createContext(null);function pj(e){let t=w.useContext(_i).outlet;return t&&w.createElement(fj.Provider,{value:e},t)}function lae(){let{matches:e}=w.useContext(_i),t=e[e.length-1];return t?t.params:{}}function ak(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=w.useContext(hs),{matches:i}=w.useContext(_i),{pathname:o}=_r(),s=JSON.stringify(nk(i,r.v7_relativeSplatPath));return w.useMemo(()=>rk(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function hj(e,t){return mj(e,t)}function mj(e,t,n,r){Bl()||bt(!1);let{navigator:i}=w.useContext(hs),{matches:o}=w.useContext(_i),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let u=s?s.pathnameBase:"/";s&&s.route;let l=_r(),c;if(t){var d;let y=typeof t=="string"?ja(t):t;u==="/"||(d=y.pathname)!=null&&d.startsWith(u)||bt(!1),c=y}else c=l;let f=c.pathname||"/",p=f;if(u!=="/"){let y=u.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let h=$3(e,{pathname:p}),m=wj(h&&h.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:so([u,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:so([u,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return t&&m?w.createElement(Mp.Provider,{value:{location:ml({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ki.Pop}},m):m}function gj(){let e=Tj(),t=aj(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:i},n):null,null)}const vj=w.createElement(gj,null);class yj extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?w.createElement(_i.Provider,{value:this.props.routeContext},w.createElement(ok.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bj(e){let{routeContext:t,match:n,children:r}=e,i=w.useContext(nb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(_i.Provider,{value:t},r)}function wj(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||bt(!1),s=s.slice(0,Math.min(s.length,c+1))}let u=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<s.length;c++){let d=s[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:f,errors:p}=n,h=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||h){u=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}return s.reduceRight((c,d,f)=>{let p,h=!1,m=null,y=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||vj,u&&(l<0&&f===0?(Cj("route-fallback"),h=!0,y=null):l===f&&(h=!0,y=d.route.hydrateFallbackElement||null)));let g=t.concat(s.slice(0,f+1)),v=()=>{let b;return p?b=m:h?b=y:d.route.Component?b=w.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,w.createElement(bj,{match:d,routeC
59ontext:{outlet:c,matches:g,isDataRoute:n!=null},children:b})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?w.createElement(yj,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var uk=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(uk||{}),lk=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(lk||{});function Sj(e){let t=w.useContext(nb);return t||bt(!1),t}function _j(e){let t=w.useContext(lj);return t||bt(!1),t}function Ej(e){let t=w.useContext(_i);return t||bt(!1),t}function ck(e){let t=Ej(),n=t.matches[t.matches.length-1];return n.route.id||bt(!1),n.route.id}function Tj(){var e;let t=w.useContext(ok),n=_j(),r=ck();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function xj(){let{router:e}=Sj(uk.UseNavigateStable),t=ck(lk.UseNavigateStable),n=w.useRef(!1);return sk(()=>{n.current=!0}),w.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ml({fromRouteId:t},o)))},[e,t])}const x_={};function Cj(e,t,n){x_[e]||(x_[e]=!0)}function Ij(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function cae(e){return pj(e.context)}function _e(e){bt(!1)}function Rj(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ki.Pop,navigator:o,static:s=!1,future:a}=e;Bl()&&bt(!1);let u=t.replace(/^\/*/,"/"),l=w.useMemo(()=>({basename:u,navigator:o,static:s,future:ml({v7_relativeSplatPath:!1},a)}),[u,a,o,s]);typeof r=="string"&&(r=ja(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:h="default"}=r,m=w.useMemo(()=>{let y=tb(c,u);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:h},navigationType:i}},[u,c,d,f,p,h,i]);return m==null?null:w.createElement(hs.Provider,{value:l},w.createElement(Mp.Provider,{children:n,value:m}))}function kj(e){let{children:t,location:n}=e;return hj(Rv(t),n)}new Promise(()=>{});function Rv(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(r,i)=>{if(!w.isValidElement(r))return;let o=[...t,i];if(r.type===w.Fragment){n.push.apply(n,Rv(r.props.children,o));return}r.type!==_e&&bt(!1),!r.props.index||!r.props.children||bt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Rv(r.props.children,o)),n.push(s)}),n}/** 60 * React Router DOM v6.30.1 61 * 62 * Copyright (c) Remix Software Inc. 63 * 64 * This source code is licensed under the MIT license found in the 65 * LICENSE.md file in the root directory of this source tree. 66 * 67 * @license MIT 68 */function kv(){return kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kv.apply(this,arguments)}function Pj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Aj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Oj(e,t){return e.button===0&&(!t||t==="_self")&&!Aj(e)}function Pv(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function Mj(e,t){let n=Pv(e);return t&&t.forEach((r,i)=>
68{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const Nj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Dj="6";try{window.__reactRouterVersion=Dj}catch{}const Lj="startTransition",C_=c0[Lj];function Fj(e){let{basename:t,children:n,future:r,window:i}=e,o=w.useRef();o.current==null&&(o.current=F3({window:i,v5Compat:!0}));let s=o.current,[a,u]=w.useState({action:s.action,location:s.location}),{v7_startTransition:l}=r||{},c=w.useCallback(d=>{l&&C_?C_(()=>u(d)):u(d)},[u,l]);return w.useLayoutEffect(()=>s.listen(c),[s,c]),w.useEffect(()=>Ij(r),[r]),w.createElement(Rj,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const jj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Uj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Av=w.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:u,to:l,preventScrollReset:c,viewTransition:d}=t,f=Pj(t,Nj),{basename:p}=w.useContext(hs),h,m=!1;if(typeof l=="string"&&Uj.test(l)&&(h=l,jj))try{let b=new URL(window.location.href),S=l.startsWith("//")?new URL(b.protocol+l):new URL(l),x=tb(S.pathname,p);S.origin===b.origin&&x!=null?l=x+S.search+S.hash:m=!0}catch{}let y=cj(l,{relative:i}),g=$j(l,{replace:s,state:a,target:u,preventScrollReset:c,relative:i,viewTransition:d});function v(b){r&&r(b),b.defaultPrevented||g(b)}return w.createElement("a",kv({},f,{href:h||y,onClick:m||o?r:v,ref:n,target:u}))});var I_;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(I_||(I_={}));var R_;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(R_||(R_={}));function $j(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:a}=t===void 0?{}:t,u=Np(),l=_r(),c=ak(e,{relative:s});return w.useCallback(d=>{if(Oj(d,n)){d.preventDefault();let f=r!==void 0?r:Af(l)===Af(c);u(e,{replace:f,state:i,preventScrollReset:o,relative:s,viewTransition:a})}},[l,u,c,r,i,n,e,o,s,a])}function dae(e){let t=w.useRef(Pv(e)),n=w.useRef(!1),r=_r(),i=w.useMemo(()=>Mj(r.search,n.current?null:t.current),[r.search]),o=Np(),s=w.useCallback((a,u)=>{const l=Pv(typeof a=="function"?a(i):a);n.current=!0,o("?"+l,u)},[o,i]);return[i,s]}var dk={exports:{}},fk={};/** 69 * @license React 70 * use-sync-external-store-with-selector.production.js 71 * 72 * Copyright (c) Meta Platforms, Inc. and affiliates. 73 * 74 * This source code is licensed under the MIT license found in the 75 * LICENSE file in the root directory of this source tree. 76 */var zl=w;function Bj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zj=typeof Object.is=="function"?Object.is:Bj,Hj=zl.useSyncExternalStore,Wj=zl.useRef,qj=zl.useEffect,Vj=zl.useMemo,Gj=zl.useDebugValue;fk.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Wj(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Vj(function(){function u(p){if(!l){if(l=!0,c=p,p=r(p),i!==void 0&&s.hasValue){var h=s.value;if(i(h,p))return d=h}return d=p}if(h=d,zj(c,p))return h;var m=r(p);return i!==void 0&&i(h,m)?(c=p,h):(c=p,d=m)}var l=!1,c,d,f=n===void 0?null:n;return[function(){return u(t())},f===null?void 0:function(){return u(f())}]},[t,n,r,i]);var a=Hj(e,o[0],o[1]);return qj(function(){s.hasValue=!0,s.value=a},[a]),Gj(a),a};dk.exports=fk;var Kj=dk.exports;function Yj(e){e()}function Xj(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Yj(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var k_={notify(){},get:()=>[]};function Qj(e,t){let n,r=k_,i=0,o=!1;function s(m){c();const y=r.subscribe(m);let g=!1;return()=>{g||(g=!0,y(),d())}}function a(){r.notify()}function u(){h.onStateChange&&h.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(u),r=Xj())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=k_)}function f(){o||(o=!0,c())}function p(){o&&(o=!1,d())}const h={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:u,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return h}var Jj=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Zj=Jj(),eU=()=>typeof navigator<"u"&&navigator.product==="ReactNative",tU=eU(),nU=()=>Zj||tU?w.useLayoutEffect:w.useEffect,rU=nU(),em=Symbol.for("react-redux-context"),tm=typeof globalThis<"u"?globalThis:{};function iU(){if(!w.createContext)return{};const e=tm[em]??(tm[em]=new Map);let t=e.get(w.createContext);return t||(t=w.createContext(null),e.set(w.createContext,t)),t}var ho=iU();function oU(e){const{children:t,context:n,serverState:r,store:i}=e,o=w.useMemo(()=>{const u=Qj(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),s=w.useMemo(()=>i.getState(),[i]);rU(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==i.get
76State()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,s]);const a=n||ho;return w.createElement(a.Provider,{value:o},t)}var sU=oU;function rb(e=ho){return function(){return w.useContext(e)}}var pk=rb();function hk(e=ho){const t=e===ho?pk:rb(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var aU=hk();function uU(e=ho){const t=e===ho?aU:hk(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var lU=uU(),cU=(e,t)=>e===t;function dU(e=ho){const t=e===ho?pk:rb(e),n=(r,i={})=>{const{equalityFn:o=cU}=typeof i=="function"?{equalityFn:i}:i,s=t(),{store:a,subscription:u,getServerState:l}=s;w.useRef(!0);const c=w.useCallback({[r.name](f){return r(f)}}[r.name],[r]),d=Kj.useSyncExternalStoreWithSelector(u.addNestedSub,a.getState,l||a.getState,c,o);return w.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var fU=dU();class Dp{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const ib=typeof window>"u"||"Deno"in window;function lr(){}function pU(e,t){return typeof e=="function"?e(t):e}function hU(e){return typeof e=="number"&&e>=0&&e!==1/0}function mU(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dc(e,t,n){return Hl(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function fae(e,t,n){return Hl(e)?{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function ji(e,t,n){return Hl(e)?[{...t,queryKey:e},n]:[e||{},t]}function P_(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(Hl(s)){if(r){if(t.queryHash!==ob(s,t.options))return!1}else if(!Of(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function A_(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(Hl(o)){if(!t.options.mutationKey)return!1;if(n){if($o(t.options.mutationKey)!==$o(o))return!1}else if(!Of(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function ob(e,t){return((t==null?void 0:t.queryKeyHashFn)||$o)(e)}function $o(e){return JSON.stringify(e,(t,n)=>Ov(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Of(e,t){return mk(e,t)}function mk(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!mk(e[n],t[n])):!1}function gk(e,t){if(e===t)return e;const n=O_(e)&&O_(t);if(n||Ov(e)&&Ov(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let u=0;u<o;u++){const l=n?u:i[u];s[l]=gk(e[l],t[l]),s[l]===e[l]&&a++}return r===o&&a===r?e:s}return t}function pae(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function O_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ov(e){if(!M_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!M_(n)||!n.hasOwnProperty("isPrototypeOf"))}function M_(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hl(e){return Array.isArray(e)}function vk(e){return new Promise(t=>{setTimeout(t,e)})}function N_(e){vk(0).then(e)}function gU(){if(typeof AbortController=="function")return new AbortController}function vU(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?gk(e,t):t}class yU extends Dp{constructor(){super(),this.setup=t=>{if(!ib&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}
76onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Mv=new yU,D_=["online","offline"];class bU extends Dp{constructor(){super(),this.setup=t=>{if(!ib&&window.addEventListener){const n=()=>t();return D_.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{D_.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Mf=new bU;function wU(e){return Math.min(1e3*2**e,3e4)}function sb(e){return(e??"online")==="online"?Mf.isOnline():!0}class yk{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function nm(e){return e instanceof yk}function bk(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((y,g)=>{o=y,s=g}),u=y=>{r||(p(new yk(y)),e.abort==null||e.abort())},l=()=>{t=!0},c=()=>{t=!1},d=()=>!Mv.isFocused()||e.networkMode!=="always"&&!Mf.isOnline(),f=y=>{r||(r=!0,e.onSuccess==null||e.onSuccess(y),i==null||i(),o(y))},p=y=>{r||(r=!0,e.onError==null||e.onError(y),i==null||i(),s(y))},h=()=>new Promise(y=>{i=g=>{const v=r||!d();return v&&y(g),v},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),m=()=>{if(r)return;let y;try{y=e.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(f).catch(g=>{var v,b;if(r)return;const S=(v=e.retry)!=null?v:3,x=(b=e.retryDelay)!=null?b:wU,T=typeof x=="function"?x(n,g):x,_=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,g);if(t||!_){p(g);return}n++,e.onFail==null||e.onFail(n,g),vk(T).then(()=>{if(d())return h()}).then(()=>{t?p(g):m()})})};return sb(e.networkMode)?m():h().then(m),{promise:a,cancel:u,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:l,continueRetry:c}}const ab=console;function SU(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const i=c=>{let d;t++;try{d=c()}finally{t--,t||a()}return d},o=c=>{t?e.push(c):N_(()=>{n(c)})},s=c=>(...d)=>{o(()=>{c(...d)})},a=()=>{const c=e;e=[],c.length&&N_(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const Jt=SU();class wk{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hU(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(ib?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class _U extends wk{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||ab,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||EU(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=vU(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(lr).catch(lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!mU(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>
76n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const s=gU(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(a);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(u(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const f=p=>{if(nm(p)&&p.silent||this.dispatch({type:"error",error:p}),!nm(p)){var h,m,y,g;(h=(m=this.cache.config).onError)==null||h.call(m,p,this),(y=(g=this.cache.config).onSettled)==null||y.call(g,this.state.data,p,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=bk({fn:c.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:p=>{var h,m,y,g;if(typeof p>"u"){f(new Error(this.queryHash+" data is undefined"));return}this.setData(p),(h=(m=this.cache.config).onSuccess)==null||h.call(m,p,this),(y=(g=this.cache.config).onSettled)==null||y.call(g,p,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(p,h)=>{this.dispatch({type:"failed",failureCount:p,error:h})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:sb(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return nm(s)&&s.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Jt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function EU(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class TU extends Dp{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:ob(o,n);let a=this.get(s);return a||(a=new _U({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Jt.batch(()=>
76{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=ji(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>P_(r,i))}findAll(t,n){const[r]=ji(t,n);return Object.keys(r).length>0?this.queries.filter(i=>P_(r,i)):this.queries}notify(t){Jt.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){Jt.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Jt.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class xU extends wk{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||ab,this.observers=[],this.state=t.state||CU(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var _;return this.retryer=bk({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(C,I)=>{this.dispatch({type:"failed",failureCount:C,error:I})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(_=this.options.retry)!=null?_:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,a,u,l,c;if(!n){var d,f,p,h;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(f=this.mutationCache.config).onMutate)==null?void 0:d.call(f,this.state.variables,this));const C=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,this.state.variables));C!==this.state.context&&this.dispatch({type:"loading",context:C,variables:this.state.variables})}const _=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,_,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,_,this.state.variables,this.state.context)),await((a=(u=this.mutationCache.config).onSettled)==null?void 0:a.call(u,_,null,this.state.variables,this.state.context,this)),await((l=(c=this.options).onSettled)==null?void 0:l.call(c,_,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:_}),_}catch(_){try{var m,y,g,v,b,S,x,T;throw await((m=(y=this.mutationCache.config).onError)==null?void 0:m.call(y,_,this.state.variables,this.state.context,this)),await((g=(v=this.options).onError)==null?void 0:g.call(v,_,this.state.variables,this.state.context)),await((b=(S=this.mutationCache.config).onSettled)==null?void 0:b.call(S,void 0,_,this.state.variables,this.state.context,this)),await((x=(T=this.options).onSettled)==null?void 0:x.call(T,void 0,_,this.state.variables,this.state.context)),_}finally{this.dispatch({type:"error",error:_})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!sb(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Jt.batch(()=>
76{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function CU(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class IU extends Dp{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new xU({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Jt.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>A_(t,n))}findAll(t){return this.mutations.filter(n=>A_(t,n))}notify(t){Jt.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>
76r.state.isPaused);return Jt.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(lr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function RU(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,l=u==null?void 0:u.pageParam,c=(u==null?void 0:u.direction)==="forward",d=(u==null?void 0:u.direction)==="backward",f=((o=e.state.data)==null?void 0:o.pages)||[],p=((s=e.state.data)==null?void 0:s.pageParams)||[];let h=p,m=!1;const y=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>{var _;if((_=e.signal)!=null&&_.aborted)m=!0;else{var C;(C=e.signal)==null||C.addEventListener("abort",()=>{m=!0})}return e.signal}})},g=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),v=(T,_,C,I)=>(h=I?[_,...h]:[...h,_],I?[C,...T]:[...T,C]),b=(T,_,C,I)=>{if(m)return Promise.reject("Cancelled");if(typeof C>"u"&&!_&&T.length)return Promise.resolve(T);const O={queryKey:e.queryKey,pageParam:C,meta:e.options.meta};y(O);const D=g(O);return Promise.resolve(D).then(F=>v(T,C,F,I))};let S;if(!f.length)S=b([]);else if(c){const T=typeof l<"u",_=T?l:L_(e.options,f);S=b(f,T,_)}else if(d){const T=typeof l<"u",_=T?l:kU(e.options,f);S=b(f,T,_,!0)}else{h=[];const T=typeof e.options.getNextPageParam>"u";S=(a&&f[0]?a(f[0],0,f):!0)?b([],T,p[0]):Promise.resolve(v([],p[0],f[0]));for(let C=1;C<f.length;C++)S=S.then(I=>{if(a&&f[C]?a(f[C],C,f):!0){const D=T?p[C]:L_(e.options,I);return b(I,T,D)}return Promise.resolve(v(I,p[C],f[C]))})}return S.then(T=>({pages:T,pageParams:h}))}}}}function L_(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function kU(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class PU{constructor(t={}){this.queryCache=t.queryCache||new TU,this.mutationCache=t.mutationCache||new IU,this.logger=t.logger||ab,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Mv.subscribe(()=>{Mv.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Mf.subscribe(()=>{Mf.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=ji(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Dc(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=pU(n,o);if(typeof s>"u")return;const a=Dc(t),u=this.defaultQueryOptions(a);return this.queryCache.build(this,u).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return Jt.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=ji(t,n),i=this.queryCache;Jt.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=ji(t,n,r),s=this.queryCache,a={type:"active",...i};return Jt.batch(()=>(s.findAll(i).forEach(u=>{u.reset()}),this.refetchQueries(a,o)))}cancelQueries(t,n,r){const[i,o={}]=ji(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=Jt.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(o)));return Promise.all(s).then(lr).catch(lr)}invalidateQueries(t,n,r){const[i,o]=ji(t,n,r);return Jt.batch(()=>{var s,a;if(this.queryCache.findAll(i).forEach(l=>
76{l.invalidate()}),i.refetchType==="none")return Promise.resolve();const u={...i,type:(s=(a=i.refetchType)!=null?a:i.type)!=null?s:"active"};return this.refetchQueries(u,o)})}refetchQueries(t,n,r){const[i,o]=ji(t,n,r),s=Jt.batch(()=>this.queryCache.findAll(i).filter(u=>!u.isDisabled()).map(u=>{var l;return u.fetch(void 0,{...o,cancelRefetch:(l=o==null?void 0:o.cancelRefetch)!=null?l:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(s).then(lr);return o!=null&&o.throwOnError||(a=a.catch(lr)),a}fetchQuery(t,n,r){const i=Dc(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(lr).catch(lr)}fetchInfiniteQuery(t,n,r){const i=Dc(t,n,r);return i.behavior=RU(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(lr).catch(lr)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>$o(t)===$o(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Of(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>$o(t)===$o(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Of(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=ob(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}const F_=w.createContext(void 0),Sk=w.createContext(!1);function _k(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=F_),window.ReactQueryClientContext):F_)}const hae=({context:e}={})=>{const t=w.useContext(_k(e,w.useContext(Sk)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},AU=({client:e,children:t,context:n,contextSharing:r=!1})=>{w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=_k(n,r);return w.createElement(Sk.Provider,{value:!n&&r},w.createElement(i.Provider,{value:e},t))};function OU(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[i,o]=w.useState(!1),s=w.useRef(n);s.current=n;const a=w.useRef(r);return a.current=r,w.useEffect(()=>{const u=document.createElement("script");return u.src="https://accounts.google.com/gsi/client",u.async=!0,u.defer=!0,u.nonce=t,u.onload=()=>{var l;o(!0),(l=s.current)===null||l===void 0||l.call(s)},u.onerror=()=>{var l;o(!1),(l=a.current)===null||l===void 0||l.call(a)},document.body.appendChild(u),()=>{document.body.removeChild(u)}},[t]),i}const Ek=w.createContext(null);function MU({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:i}){const o=OU({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),s=w.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:o}),[e,o]);return j.createElement(Ek.Provider,{value:s},i)}function NU(){const e=w.useContext(Ek);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function DU(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const LU={large:40,medium:32,small:20};function mae({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:i="standard",theme:o="outline",size:s="large",text:a,shape:u,logo_alignment:l,width:c,locale:d,click_listener:f,containerProps:p,...h}){const m=w.useRef(null),{clientId:y,scriptLoadedSuccessfully:g}=NU(),v=w.useRef(e);v.current=e;const b=w.useRef(t);b.current=t;const S=w.useRef(r);return S.current=r,w.useEffect(()=>{var x,T,_,C,I,O,D,L,F;
76if(g)return(_=(T=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts)===null||T===void 0?void 0:T.id)===null||_===void 0||_.initialize({client_id:y,callback:M=>{var R;if(!(M!=null&&M.credential))return(R=b.current)===null||R===void 0?void 0:R.call(b);const{credential:N,select_by:A}=M;v.current({credential:N,clientId:DU(M),select_by:A})},...h}),(O=(I=(C=window==null?void 0:window.google)===null||C===void 0?void 0:C.accounts)===null||I===void 0?void 0:I.id)===null||O===void 0||O.renderButton(m.current,{type:i,theme:o,size:s,text:a,shape:u,logo_alignment:l,width:c,locale:d,click_listener:f}),n&&((F=(L=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||L===void 0?void 0:L.id)===null||F===void 0||F.prompt(S.current)),()=>{var M,R,N;n&&((N=(R=(M=window==null?void 0:window.google)===null||M===void 0?void 0:M.accounts)===null||R===void 0?void 0:R.id)===null||N===void 0||N.cancel())}},[y,g,n,i,o,s,a,u,l,c,d]),j.createElement("div",{...p,ref:m,style:{height:LU[s],...p==null?void 0:p.style}})}const re=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ke=globalThis,qo="10.12.0";function ms(){return Lp(ke),ke}function Lp(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||qo,t[qo]=t[qo]||{}}function Wl(e,t,n=ke){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[qo]=r[qo]||{};return i[e]||(i[e]=t())}const FU=["debug","info","warn","error","log","assert","trace"],jU="Sentry Logger ",Nf={};function gs(e){if(!("console"in ke))return e();const t=ke.console,n={},r=Object.keys(Nf);r.forEach(i=>{const o=Nf[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function UU(){lb().enabled=!0}function $U(){lb().enabled=!1}function Tk(){return lb().enabled}function BU(...e){ub("log",...e)}function zU(...e){ub("warn",...e)}function HU(...e){ub("error",...e)}function ub(e,...t){re&&Tk()&&gs(()=>{ke.console[e](`${jU}[${e}]:`,...t)})}function lb(){return re?Wl("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Y={enable:UU,disable:$U,isEnabled:Tk,log:BU,warn:zU,error:HU},xk=50,ns="?",j_=/\(error: (.*)\)/,U_=/captureMessage|captureException/;function Ck(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const o=[],s=n.split(` 77`);for(let a=r;a<s.length;a++){let u=s[a];u.length>1024&&(u=u.slice(0,1024));const l=j_.test(u)?u.replace(j_,"$1"):u;if(!l.match(/\S*Error: /)){for(const c of t){const d=c(l);if(d){o.push(d);break}}if(o.length>=xk+i)break}}return qU(o.slice(i))}}function WU(e){return Array.isArray(e)?Ck(...e):e}function qU(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Lc(t).function||"")&&t.pop(),t.reverse(),U_.test(Lc(t).function||"")&&(t.pop(),U_.test(Lc(t).function||"")&&t.pop()),t.slice(0,xk).map(n=>({...n,filename:n.filename||Lc(t).filename,function:n.function||ns}))}function Lc(e){return e[e.length-1]||{}}const rm="<anonymous>";function di(e){try{return!e||typeof e!="function"?rm:e.name||rm}catch{return rm}}function $_(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Dd={},B_={};function Eo(e,t){Dd[e]=Dd[e]||[],Dd[e].push(t)}function To(e,t){if(!B_[e]){B_[e]=!0;try{t()}catch(n){re&&Y.error(`Error while instrumenting ${e}`,n)}}}function Yn(e,t){const n=e&&Dd[e];if(n)for(const r of n)try{r(t)}catch(i){re&&Y.error(`Error while triggering instrumentation handler. 78Type: ${e} 79Name: ${di(r)} 80Error:`,i)}}let im=null;function Ik(e){const t="error";Eo(t,e),To(t,VU)}function VU(){im=ke.onerror,ke.onerror=function(e,t,n,r,i){return Yn("error",{column:r,error:i,line:n,msg:e,url:t}),im?im.apply(this,arguments):!1},ke.onerror.__SENTRY_INSTRUMENTED__=!0}let om=null;function Rk(e){const t="unhandledrejection";Eo(t,e),To(t,GU)}function GU(){om=ke.onunhandledrejection,ke.onunhandledrejection=function(e){return Yn("unhandledrejection",e),om?om.apply(this,arguments):!0},ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const kk=Object.prototype.toString;function cb(e){switch(kk.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return fi(e,Error)}}function Ua(e,t){return kk.call(e)===`[object ${t}]`}function Pk(e){return Ua(e,"ErrorEvent")}function z_(e){return Ua(e,"DOMError")}function KU(e){return Ua(e,"DOMException")}function ti(e){return Ua(e,"String")}function db(e){return typeof e=="object"&&e!==null&&"__sentry_template_str
80ing__"in e&&"__sentry_template_values__"in e}function gl(e){return e===null||db(e)||typeof e!="object"&&typeof e!="function"}function vl(e){return Ua(e,"Object")}function Fp(e){return typeof Event<"u"&&fi(e,Event)}function YU(e){return typeof Element<"u"&&fi(e,Element)}function XU(e){return Ua(e,"RegExp")}function $a(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function QU(e){return vl(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function fi(e,t){try{return e instanceof t}catch{return!1}}function Ak(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ok(e){return typeof Request<"u"&&fi(e,Request)}const fb=ke,JU=80;function tr(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",u=a.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||JU;for(;n&&o++<r&&(l=ZU(n,c),!(l==="html"||o>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function ZU(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(fb.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t!=null&&t.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i!=null&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const s=n.className;if(s&&ti(s)){const a=s.split(/\s+/);for(const u of a)r.push(`.${u}`)}}const o=["aria-label","type","name","title","alt"];for(const s of o){const a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function Ba(){try{return fb.document.location.href}catch{return""}}function Mk(e){if(!fb.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Df(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function H_(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{Ak(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ld(e,t,n=!1){return ti(e)?XU(t)?t.test(e):ti(t)?n?e===t:e.includes(t):!1:!1}function ni(e,t=[],n=!1){return t.some(r=>Ld(e,r,n))}function gn(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&Nk(i,r);try{e[t]=i}catch{re&&Y.log(`Failed to replace method "${t}" in object`,e)}}function On(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{re&&Y.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Nk(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,On(e,"__sentry_original__",t)}catch{}}function pb(e){return e.__sentry_original__}function Dk(e){if(cb(e))return{message:e.message,name:e.name,stack:e.stack,...q_(e)};if(Fp(e)){const t={type:e.type,target:W_(e.target),currentTarget:W_(e.currentTarget),...q_(e)};return typeof CustomEvent<"u"&&fi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function W_(e){try{return YU(e)?tr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function q_(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function e$(e,t=40){const n=Object.keys(Dk(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Df(r,t);for(let i=n.length;i>0;i--){const o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:Df(o,t)}return""}function t$(){const e=ke;return e.crypto||e.msCrypto}function Rn(e=t$()){let t=()=>Math.random()*16;try{if(e!=null&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e!=null&&e.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function Lk(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function Lo(e){const{message:t,event_id:n}=e;if(t)return t;const r=Lk(e);return r?r.type&&r.value?`${r.type}: ${r.value}
80`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Nv(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function rs(e,t){const n=Lk(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const o={...i==null?void 0:i.data,...t.data};n.mechanism.data=o}}function V_(e){if(n$(e))return!0;try{On(e,"__sentry_captured__",!0)}catch{}return!1}function n$(e){try{return e.__sentry_captured__}catch{}}const Fk=1e3;function vs(){return Date.now()/Fk}function r$(){const{performance:e}=ke;if(!(e!=null&&e.now)||!e.timeOrigin)return vs;const t=e.timeOrigin;return()=>(t+e.now())/Fk}let G_;function Ft(){return(G_??(G_=r$()))()}let sm;function i$(){var c;const{performance:e}=ke;if(!(e!=null&&e.now))return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=(c=e.timing)==null?void 0:c.navigationStart,u=typeof s=="number"?Math.abs(s+n-r):t,l=u<t;return o||l?i<=u?[e.timeOrigin,"timeOrigin"]:[s,"navigationStart"]:[r,"dateNow"]}function wn(){return sm||(sm=i$()),sm[0]}function o$(e){const t=Ft(),n={sid:Rn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>a$(n)};return e&&wa(n,e),n}function wa(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||Ft(),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:Rn()),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{const n=e.timestamp-e.started;e.duration=n>=0?n: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 s$(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),wa(e,n)}function a$(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 ql(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=ql(r[i],t[i],n-1));return r}function pi(){return Rn()}function ri(){return Rn().substring(16)}const Dv="_sentrySpan";function Sa(e,t){t?On(e,Dv,t):delete e[Dv]}function Lf(e){return e[Dv]}const u$=100;class $r{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:pi(),sampleRand:Math.random()}}clone(){const t=new $r;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},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,Sa(t,Lf(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&&wa(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},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,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,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;const n=typeof t=="function"?t(this):t,r=n instanceof $r?n.getScopeData():vl(n)?t:void 0,{tags:i,extra:o,user:s,contexts:a,level:u,fingerprint:l=[],propagationContext:c}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),u&&(this._level=u),l.length&&(this._fingerprint=l),c&&
80(this._propagationContext=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Sa(this,void 0),this._attachments=[],this.setPropagationContext({traceId:pi(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var o;const r=typeof n=="number"?n:u$;if(r<=0)return this;const i={timestamp:vs(),...t,message:t.message?Df(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(o=this._client)==null||o.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,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:Lf(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=ql(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Rn();if(!this._client)return re&&Y.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=(r==null?void 0:r.event_id)||Rn();if(!this._client)return re&&Y.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=(n==null?void 0:n.event_id)||Rn();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(re&&Y.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function l$(){return Wl("defaultCurrentScope",()=>new $r)}function c$(){return Wl("defaultIsolationScope",()=>new $r)}class d${constructor(t,n){let r;t?r=t:r=new $r;let i;n?i=n:i=new $r,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return $a(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const 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 _a(){const e=ms(),t=Lp(e);return t.stack=t.stack||new d$(l$(),c$())}function f$(e){return _a().withScope(e)}function p$(e,t){const n=_a();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function K_(e){return _a().withScope(()=>e(_a().getIsolationScope()))}function h$(){return{withIsolationScope:K_,withScope:f$,withSetScope:p$,withSetIsolationScope:(e,t)=>K_(t),getCurrentScope:()=>_a().getScope(),getIsolationScope:()=>_a().getIsolationScope()}}function za(e){const t=Lp(e);return t.acs?t.acs:h$()}function Fe(){const e=ms();return za(e).getCurrentScope()}function nr(){const e=ms();return za(e).getIsolationScope()}function m$(){return Wl("globalScope",()=>new $r)}function jp(...e){const t=ms(),n=za(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function he(){return Fe().getClient()}function g$(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,o={trace_id:n,span_id:i||ri()};return r&&(o.parent_span_id=r),o}const mr="sentry.source",hb="sentry.sample_rate",jk="sentry.previous_trace_sample_rate",hi="sentry.op",It="sentry.origin",Ff="sentry.idle_span_finish_reason",Vl="sentry.measurement_unit",Gl="sentry.measurement_value",Y_="sentry.custom_span_name",mb="sentry.profile_id",Ha="sentry.exclusive_time",v$="sentry.link.type",y$=0,Uk=1,Tt=2;function b$(e){if(e<400&&e>=100)return{code:Uk};if(e>=400&&e<500)switch(e){case 401:return{code:Tt,message:"unauthenticated"};case 403:return{code:Tt,message:"permission_denied"};case 404:return{code:Tt,message:"not_found"};case 409:return{code:Tt,message:"already_exists"};case 413:return{code:Tt,message:"failed_precondition"};case 429:return{code:Tt,message:"resource_exhausted"};case 499:return{code:Tt,message:"cancelled"};default:return{code:Tt,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Tt,message:"unimplemented"};case 503:return{code:Tt,message:"unavailable"};case 504:return{code:Tt,message:"deadline_exceeded"};default:return{code:Tt,message:"internal_error"}}return{code:Tt,message:"unknown_error"}}function $k(e,t){e.setAttribute("http.response.status_code",t);const n=b$(t);n.message!=="unknown_error"&&e.setStatus(n)}const Bk="_sentryScope",zk="_sentryIsolationScope";function w$(e,t,n){e&&(On(e,zk,n),On(e,Bk,t))}function jf(e){return{scope:e[Bk],isolationScope:e[zk]}}const gb="sentry-",S$=/^sentry-/,_$=8192;function Hk(e){const t=T$(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(S$)){const s=i.slice(gb.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function E$(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${gb}${r}`]=i),n),{});return x$(t)}function T$(e){if(!(!e||!ti(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=X_(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):X_(e)}function X_(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function x$(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>_$?(re&&Y.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}const C$=/^o(\d+)\./,I$=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function R$(e){return e==="http"||e==="https"}function Kl(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:u}=e;return`${a}://${u}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function k$(e){const t=I$.exec(e);if(!t){gs(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",o="",s="",a=""]=t.slice(1);let u="",l=a;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return Wk({host:o,pass:i,path:u,projectId:l,port:s,protocol:n,publicKey:r})}function Wk(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function P$(e){if(!re)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Y.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?R$(r)?t&&isNaN(parseInt(t,10))?(Y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Y.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Y.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function A$(e){const t=e.match(C$);return t==null?void 0:t[1]}function O$(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=A$(n)),r}function M$(e){const t=typeof e=="string"?k$(e):Wk(e);if(!(!t||!P$(t)))return t}function is(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const qk=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function N$(e){if(!e)return;const t=e.match(qk);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function D$(e,t){const n=N$(e),r=Hk(t);if(!(n!=null&&n.traceId))return{traceId:pi(),sampleRand:Math.random()};const i=L$(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function Vk(e=pi(),t=ri(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Gk(e=pi(),t=ri(),n){return`00-${e}-${t}-${n?"01":"00"}`}function L$(e,t){const n=is(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=is(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const Kk=0,vb=1;let Q_=!1;function F$(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:u}=Re(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:u}}function j$(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Re(e).parent_span_id,o=jf(e).scope,s=r?(o==null?void 0:o.getPropagationContext().propagationSpanId)||ri():t;return{parent_span_id:i,span_id:s,trace_id:n}}function U$(e){const{traceId:t,spanId:n}=e.spanContext(),r=xo(e);return Vk(t,n,r)}function $$(e){const{traceId:t,spanId:n}=e.spanContext(),r=xo(e);return Gk(t,n,r)}function Yk(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===vb,attributes:o,...i}))}function Vo(e){return typeof e=="number"?J_(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?J_(e.getTime()):Ft()}function J_(e){return e>9999999999?e/1e3:e}function Re(e){var r;if(z$(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(B$(e)){const{attributes:i,startTime:o,name:s,endTime:a,status:u,links:l}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(r=e.parentSpanContext)==null?void 0:r.spanId:void 0;return{span_id:t,trace_id:n,data:i,description:s,parent_span_id:c,start_timestamp:Vo(o),timestamp:Vo(a)||void 0,status:Xk(u),op:i[hi],origin:i[It],links:Yk(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function B$(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function z$(e){return typeof e.getSpanJSON=="function"}function xo(e){const{traceFlags:t}=e.spanContext();return t===vb}function Xk(e){if(!(!e||e.code===y$))return e.code===Uk?"ok":e.message||"unknown_error"}const Go="_sentryChildSpans",Lv="_sentryRootSpan";function Qk(e,t){const n=e[Lv]||e;On(t,Lv,n),e[Go]?e[Go].add(t):On(e,Go,new Set([t]))}function H$(e,t){e[Go]&&e[Go].delete(t)}function Fd(e){const t=new Set;function n(r){if(!t.has(r)&&xo(r)){t.add(r);const i=r[Go]?Array.from(r[Go]):[];for(const o of i)n(o)}}return n(e),Array.from(t)}function Vt(e){return e[Lv]||e}function on(){const e=ms(),t=za(e);return t.getActiveSpan?t.getActiveSpan():Lf(Fe())}function Fv(){Q_||(gs(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Q_=!0)}let Z_=!1;function W$(){if(Z_)return;function e(){const t=on(),n=t&&Vt(t);if(n){const r="internal_error";re&&Y.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Tt,message:r})}}e.tag="sentry_tracingErrorCallback",Z_=!0,Ik(e),Rk(e)}function yr(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=he())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const yb="production",Jk="_frozenDsc";
80function jd(e,t){On(e,Jk,t)}function Zk(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||yb,release:n.release,public_key:r,trace_id:e,org_id:O$(t)};return t.emit("createDsc",i),i}function e1(e,t){const n=t.getPropagationContext();return n.dsc||Zk(n.traceId,e)}function mi(e){var h;const t=he();if(!t)return{};const n=Vt(e),r=Re(n),i=r.data,o=n.spanContext().traceState,s=(o==null?void 0:o.get("sentry.sample_rate"))??i[hb]??i[jk];function a(m){return(typeof s=="number"||typeof s=="string")&&(m.sample_rate=`${s}`),m}const u=n[Jk];if(u)return a(u);const l=o==null?void 0:o.get("sentry.dsc"),c=l&&Hk(l);if(c)return a(c);const d=Zk(e.spanContext().traceId,t),f=i[mr],p=r.description;return f!=="url"&&p&&(d.transaction=p),yr()&&(d.sampled=String(xo(n)),d.sample_rand=(o==null?void 0:o.get("sentry.sample_rand"))??((h=jf(n).scope)==null?void 0:h.getPropagationContext().sampleRand.toString())),a(d),t.emit("createDsc",d,n),d}class mo{constructor(t={}){this._traceId=t.traceId||pi(),this._spanId=t.spanId||ri()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Kk}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function dr(e,t=100,n=1/0){try{return jv("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function t1(e,t=3,n=100*1024){const r=dr(e,t);return K$(r)>n?t1(e,t-1,n):r}function jv(e,t,n=1/0,r=1/0,i=Y$()){const[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=q$(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(u===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const p=l.toJSON();return jv("",p,u-1,r,i)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=Dk(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){c[p]="[MaxProperties ~]";break}const h=f[p];c[p]=jv(p,h,u-1,r,i),d++}return s(t),c}function q$(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Ak(t))return"[VueViewModel]";if(QU(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${di(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=V$(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function V$(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function G$(e){return~-encodeURI(e).split(/%..|./).length}function K$(e){return G$(JSON.stringify(e))}function Y$(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function ys(e,t=[]){return[e,t]}function X$(e,t){const[n,r]=e;return[n,[...r,t]]}function eE(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function Uv(e){const t=Lp(ke);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Q$(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Uv(r),o]:r.push(typeof o=="string"?Uv(o):o)}for(const o of n){const[s,a]=o;if(i(` 81${JSON.stringify(s)} 82`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let u;try{u=JSON.stringify(a)}catch{u=JSON.stringify(dr(a))}i(u)}}return typeof r=="string"?r:J$(r)}function J$(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Z$(e){return[{type:"span"},e]}
82function e4(e){const t=typeof e.data=="string"?Uv(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const t4={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function tE(e){return t4[e]}function bb(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function n1(e,t,n,r){var o;const i=(o=e.sdkProcessingMetadata)==null?void 0:o.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Kl(r)},...i&&{trace:i}}}function $v(e,t){if(!(t!=null&&t.length)||!e.description)return!1;for(const n of t){if(r4(n)){if(Ld(e.description,n))return!0;continue}if(!n.name&&!n.op)continue;const r=n.name?Ld(e.description,n.name):!0,i=n.op?e.op&&Ld(e.op,n.op):!0;if(r&&i)return!0}return!1}function n4(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function r4(e){return typeof e=="string"||e instanceof RegExp}function i4(e,t){var r,i,o,s;if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((i=e.sdk)==null?void 0:i.packages)||[],...t.packages||[]],settings:(o=e.sdk)!=null&&o.settings||t.settings?{...(s=e.sdk)==null?void 0:s.settings,...t.settings}:void 0},e}function o4(e,t,n,r){const i=bb(n),o={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Kl(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ys(o,[s])}function s4(e,t,n,r){const i=bb(n),o=e.type&&e.type!=="replay_event"?e.type:"event";i4(e,n==null?void 0:n.sdk);const s=n1(e,i,r,t);return delete e.sdkProcessingMetadata,ys(s,[[{type:o},e]])}function a4(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=mi(e[0]),i=t==null?void 0:t.getDsn(),o=t==null?void 0:t.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&i&&{dsn:Kl(i)}},{beforeSendSpan:a,ignoreSpans:u}=(t==null?void 0:t.getOptions())||{},l=u!=null&&u.length?e.filter(p=>!$v(Re(p),u)):e,c=e.length-l.length;c&&(t==null||t.recordDroppedEvent("before_send","span",c));const d=a?p=>{const h=Re(p),m=a(h);return m||(Fv(),h)}:Re,f=[];for(const p of l){const h=d(p);h&&f.push(Z$(h))}return ys(s,f)}function u4(e){if(!re)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Re(e),{spanId:i}=e.spanContext(),o=xo(e),s=Vt(e),a=s===e,u=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&l.push(`parent ID: ${r}`),!a){const{op:c,description:d}=Re(s);l.push(`root ID: ${s.spanContext().spanId}`),c&&l.push(`root op: ${c}`),d&&l.push(`root description: ${d}`)}Y.log(`${u} 83 ${l.join(` 84 `)}`)}function l4(e){if(!re)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Re(e),{spanId:r}=e.spanContext(),o=Vt(e)===e,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;Y.log(s)}function c4(e,t,n,r=on()){const i=r&&Vt(r);i&&(re&&Y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[Gl]:t,[Vl]:n}))}function nE(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[Vl],o=r[Gl];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}const rE=1e3;class Up{constructor(t={}){this._traceId=t.traceId||pi(),this._spanId=t.spanId||ri(),this._startTime=t.startTimestamp||Ft(),this._links=t.links,this._attributes={},this.setAttributes({[It]:"manual",[hi]: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()}
84addLink(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,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?vb:Kk}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Vo(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(mr,"custom"),this}end(t){this._endTime||(this._endTime=Vo(t),l4(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[hi],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Xk(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[It],profile_id:this._attributes[mb],exclusive_time:this._attributes[Ha],measurements:nE(this._events),is_segment:this._isStandaloneSpan&&Vt(this)===this||void 0,segment_id:this._isStandaloneSpan?Vt(this).spanContext().spanId:void 0,links:Yk(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){re&&Y.log("[Tracing] Adding an event to span:",t);const i=iE(n)?n:r||Ft(),o=iE(n)?{}:n||{},s={name:t,time:Vo(i),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=he();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Vt(this)))return;if(this._isStandaloneSpan){this._sampled?f4(a4([this],t)):(re&&Y.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(jf(this).scope||Fe()).captureEvent(r)}_convertSpanToTransaction(){var c;if(!oE(Re(this)))return;this._name||(re&&Y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=jf(this),r=(c=t==null?void 0:t.getScopeData().sdkProcessingMetadata)==null?void 0:c.normalizedRequest;if(this._sampled!==!0)return;const o=Fd(this).filter(d=>d!==this&&!d4(d)).map(d=>Re(d)).filter(oE),s=this._attributes[mr];delete this._attributes[Y_],o.forEach(d=>{delete d.data[Y_]});const a={contexts:{trace:F$(this)},spans:o.length>rE?o.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,rE):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:mi(this)},request:r,...s&&{transaction_info:{source:s}}},u=nE(this._events);return u&&Object.keys(u).length&&(re&&Y.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),a.measurements=u),a}}function iE(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function oE(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function d4(e){return e instanceof Up&&e.isStandaloneSpan()}function f4(e){const t=he();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function p4(e,t,n=()=>{}){let r;try{r=e()}catch(i){throw t(i),n(),i}return h4(r,t,n)}function h4(e,t,n){return $a(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}
84function m4(e,t,n){if(!yr(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const o=is(i);if(o===void 0)return re&&Y.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(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return re&&Y.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,o,r];const s=n<o;return s||re&&Y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}const r1="__SENTRY_SUPPRESS_TRACING__";function g4(e,t){const n=Sb();if(n.startSpan)return n.startSpan(e,t);const r=o1(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s==null?void 0:s.clone();return jp(a,()=>y4(o)(()=>{const l=Fe(),c=s1(l,o),f=e.onlyIfParent&&!c?new mo:i1({parentSpan:c,spanArguments:r,forceTransaction:i,scope:l});return Sa(l,f),p4(()=>t(f),()=>{const{status:p}=Re(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:Tt,message:"internal_error"})},()=>{f.end()})}))}function Wa(e){const t=Sb();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=o1(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?s=>jp(e.scope,s):i!==void 0?s=>wb(i,s):s=>s())(()=>{const s=Fe(),a=s1(s,i);return e.onlyIfParent&&!a?new mo:i1({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}function wb(e,t){const n=Sb();return n.withActiveSpan?n.withActiveSpan(e,t):jp(r=>(Sa(r,e||void 0),t(r)))}function i1({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!yr()){const s=new mo;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...mi(s)};jd(s,a)}return s}const i=nr();let o;if(e&&!n)o=v4(e,r,t),Qk(e,o);else if(e){const s=mi(e),{traceId:a,spanId:u}=e.spanContext(),l=xo(e);o=sE({traceId:a,parentSpanId:u,...t},r,l),jd(o,s)}else{const{traceId:s,dsc:a,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...r.getPropagationContext()};o=sE({traceId:s,parentSpanId:u,...t},r,l),a&&jd(o,a)}return u4(o),w$(o,r,i),o}function o1(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Vo(e.startTime),delete r.startTime,r}return n}function Sb(){const e=ms();return za(e)}function sE(e,t,n){var h;const r=he(),i=(r==null?void 0:r.getOptions())||{},{name:o=""}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r==null||r.emit("beforeSampling",s,{decision:!1});const a=s.parentSampled??n,u=s.spanAttributes,l=t.getPropagationContext(),[c,d,f]=t.getScopeData().sdkProcessingMetadata[r1]?[!1]:m4(i,{name:o,parentSampled:a,attributes:u,parentSampleRate:is((h=l.dsc)==null?void 0:h.sample_rate)},l.sampleRand),p=new Up({...e,attributes:{[mr]:"custom",[hb]:d!==void 0&&f?d:void 0,...u},sampled:c});return!c&&r&&(re&&Y.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function v4(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[r1]?!1:xo(e),s=o?new Up({...n,parentSpanId:r,traceId:i,sampled:o}):new mo({traceId:i});Qk(e,s);const a=he();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function s1(e,t){if(t)return t;if(t===null)return;const n=Lf(e);if(!n)return;const r=he();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Vt(n):n}function y4(e){return e!==void 0?t=>wb(e,t):t=>t()}const Ud={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},b4="heartbeatFailed",w4="idleTimeout",S4="finalTimeout",_4="externalFinish";function a1(e,t={}){const n=new Map;let r=!1,i,o=_4,s=!t.disableAutoFinish;const a=[],{idleTimeout:u=Ud.idleTimeout,finalTimeout:l=Ud.finalTimeout,childSpanTimeout:c=Ud.childSpanTimeout,beforeSpanEnd:d}=t,f=he();if(!f||!yr()){const T=new mo,_={sample_rate:"0",sampled:"false",...mi(T)};return jd(T,_),T}
84const p=Fe(),h=on(),m=E4(e);m.end=new Proxy(m.end,{apply(T,_,C){if(d&&d(m),_ instanceof mo)return;const[I,...O]=C,D=I||Ft(),L=Vo(D),F=Fd(m).filter(P=>P!==m);if(!F.length)return x(L),Reflect.apply(T,_,[L,...O]);const M=F.map(P=>Re(P).timestamp).filter(P=>!!P),R=M.length?Math.max(...M):void 0,N=Re(m).start_timestamp,A=Math.min(N?N+l/1e3:1/0,Math.max(N||-1/0,Math.min(L,R||1/0)));return x(A),Reflect.apply(T,_,[A,...O])}});function y(){i&&(clearTimeout(i),i=void 0)}function g(T){y(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=w4,m.end(T))},u)}function v(T){i=setTimeout(()=>{!r&&s&&(o=b4,m.end(T))},c)}function b(T){y(),n.set(T,!0);const _=Ft();v(_+c/1e3)}function S(T){if(n.has(T)&&n.delete(T),n.size===0){const _=Ft();g(_+u/1e3)}}function x(T){r=!0,n.clear(),a.forEach(L=>L()),Sa(p,h);const _=Re(m),{start_timestamp:C}=_;if(!C)return;_.data[Ff]||m.setAttribute(Ff,o),Y.log(`[Tracing] Idle span "${_.op}" finished`);const O=Fd(m).filter(L=>L!==m);let D=0;O.forEach(L=>{L.isRecording()&&(L.setStatus({code:Tt,message:"cancelled"}),L.end(T),re&&Y.log("[Tracing] Cancelling span since span ended early",JSON.stringify(L,void 0,2)));const F=Re(L),{timestamp:M=0,start_timestamp:R=0}=F,N=R<=T,A=(l+u)/1e3,P=M-R<=A;if(re){const k=JSON.stringify(L,void 0,2);N?P||Y.log("[Tracing] Discarding span since it finished after idle span final timeout",k):Y.log("[Tracing] Discarding span since it happened after idle span was finished",k)}(!P||!N)&&(H$(m,L),D++)}),D>0&&m.setAttribute("sentry.idle_span_discarded_spans",D)}return a.push(f.on("spanStart",T=>{if(r||T===m||Re(T).timestamp||T instanceof Up&&T.isStandaloneSpan())return;Fd(m).includes(T)&&b(T.spanContext().spanId)})),a.push(f.on("spanEnd",T=>{r||S(T.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",T=>{T===m&&(s=!0,g(),n.size&&v())})),t.disableAutoFinish||g(),setTimeout(()=>{r||(m.setStatus({code:Tt,message:"deadline_exceeded"}),o=S4,m.end())},l),m}function E4(e){const t=Wa(e);return Sa(Fe(),t),re&&Y.log("[Tracing] Started span is an idle span"),t}const am=0,aE=1,uE=2;function Br(e){return new os(t=>{t(e)})}function _b(e){return new os((t,n)=>{n(e)})}class os{constructor(t){this._state=am,this._handlers=[],this._runExecutor(t)}then(t,n){return new os((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new os((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===am)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===aE&&n[1](this._value),this._state===uE&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,s)=>{if(this._state===am){if($a(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(aE,o)},i=o=>{n(uE,o)};try{t(r,i)}catch(o){i(o)}}}function T4(e,t,n,r=0){try{const i=Bv(t,n,e,r);return $a(i)?i:Br(i)}catch(i){return _b(i)}}function Bv(e,t,n,r){const i=n[r];if(!e||!i)return e;const o=i({...e},t);return re&&o===null&&Y.log(`Event processor "${i.id||"?"}" dropped event`),$a(o)?o.then(s=>Bv(s,t,n,r+1)):Bv(o,t,n,r+1)}function x4(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;C4(e,t),r&&k4(e,r),P4(e,n),I4(e,i),R4(e,o)}function lE(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:d,propagationContext:f,transactionName:p,span:h}=t;Fc(e,"extra",n),Fc(e,"tags",r),Fc(e,"user",i),Fc(e,"contexts",o),e.sdkProcessingMetadata=ql(e.sdkProcessingMetadata,a,2),s&&(e.level=s),p&&(e.transactionName=p),h&&(e.span=h),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function Fc(e,t,n){e[t]=ql(e[t],n,1)}function C4(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function I4(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function R4(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function k4(e,t){e.contexts={trace:j$(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:mi(t),...e.sdkProcessingMetadata};const n=Vt(t),r=Re(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function P4(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}let jc,cE,Uc;function A4(e){const t=ke._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Uc&&n.length===cE||(cE=n.length,Uc=n.reduce((r,i)=>{jc||(jc={});const o=jc[i];if(o)r[o[0]]=o[1];else{const s=e(i);for(let a=s.length-1;a>=0;a--){const u=s[a],l=u==null?void 0:u.filename,c=t[i];if(l&&c){r[l]=c,jc[i]=[l,c];break}}}return r},{})),Uc}function u1(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,u={...t,event_id:t.event_id||n.event_id||Rn(),timestamp:t.timestamp||vs()},l=n.integrations||e.integrations.map(y=>y.name);O4(u,e),D4(u,l),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&M4(u,e.stackParser);const c=F4(r,n.captureContext);n.mechanism&&rs(u,n.mechanism);const d=i?i.getEventProcessors():[],f=m$().getScopeData();if(o){const y=o.getScopeData();lE(f,y)}if(c){const y=c.getScopeData();lE(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),x4(u,f);const h=[...d,...f.eventProcessors];return T4(h,u,n).then(y=>(y&&N4(y),typeof s=="number"&&s>0?L4(y,s,a):y))}function O4(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;e.environment=e.environment||n||yb,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const s=e.request;s!=null&&s.url&&(s.url=Df(s.url,o))}function M4(e,t){var r,i;const n=A4(t);
84(i=(r=e.exception)==null?void 0:r.values)==null||i.forEach(o=>{var s,a;(a=(s=o.stacktrace)==null?void 0:s.frames)==null||a.forEach(u=>{u.filename&&(u.debug_id=n[u.filename])})})}function N4(e){var r,i;const t={};if((i=(r=e.exception)==null?void 0:r.values)==null||i.forEach(o=>{var s,a;(a=(s=o.stacktrace)==null?void 0:s.frames)==null||a.forEach(u=>{u.debug_id&&(u.abs_path?t[u.abs_path]=u.debug_id:u.filename&&(t[u.filename]=u.debug_id),delete u.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([o,s])=>{n.push({type:"sourcemap",code_file:o,debug_id:s})})}function D4(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function L4(e,t,n){var i,o;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:dr(s.data,t,n)}}))},...e.user&&{user:dr(e.user,t,n)},...e.contexts&&{contexts:dr(e.contexts,t,n)},...e.extra&&{extra:dr(e.extra,t,n)}};return(i=e.contexts)!=null&&i.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=dr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:dr(s.data,t,n)}}))),(o=e.contexts)!=null&&o.flags&&r.contexts&&(r.contexts.flags=dr(e.contexts.flags,3,n)),r}function F4(e,t){if(!t)return e;const n=e?e.clone():new $r;return n.update(t),n}function j4(e){if(e)return U4(e)?{captureContext:e}:B4(e)?{captureContext:e}:e}function U4(e){return e instanceof $r||typeof e=="function"}const $4=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function B4(e){return Object.keys(e).some(t=>$4.includes(t))}function Eb(e,t){return Fe().captureException(e,j4(t))}function gae(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Fe().captureMessage(e,n,r)}function $p(e,t){return Fe().captureEvent(e,t)}function l1(e,t){nr().setContext(e,t)}function vae(e){nr().setTags(e)}function $c(e){nr().setUser(e)}function z4(){const e=he();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function H4(e){nr().addEventProcessor(e)}function dE(e){const t=nr(),n=Fe(),{userAgent:r}=ke.navigator||{},i=o$({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return(o==null?void 0:o.status)==="ok"&&wa(o,{status:"exited"}),c1(),t.setSession(i),i}function c1(){const e=nr(),n=Fe().getSession()||e.getSession();n&&s$(n),d1(),e.setSession()}function d1(){const e=nr(),t=he(),n=e.getSession();n&&t&&t.captureSession(n)}function fE(e=!1){if(e){c1();return}d1()}const W4="7";function q4(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function V4(e){return`${q4(e)}${e.projectId}/envelope/`}function G4(e,t){const n={sentry_version:W4};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function K4(e,t,n){return t||`${V4(e)}?${G4(e,n)}`}const pE=[];function Y4(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];
84i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function X4(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return Y4(r)}function Q4(e,t){const n={};return t.forEach(r=>{r&&f1(e,r,n)}),n}function hE(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function f1(e,t,n){if(n[t.name]){re&&Y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,pE.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),pE.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}re&&Y.log(`Integration installed: ${t.name}`)}function J4(e,t,n){const r=[{type:"client_report"},{timestamp:vs(),discarded_events:e}];return ys(t?{dsn:t}:{},[r])}function p1(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Z4(e){var u;const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:a}=((u=e.contexts)==null?void 0:u.trace)??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s==null?void 0:s[mb],exclusive_time:s==null?void 0:s[Ha],measurements:e.measurements,is_segment:!0}}function eB(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&&{[mb]:e.profile_id},...e.exclusive_time&&{[Ha]:e.exclusive_time}}}},measurements:e.measurements}}const mE="Not capturing exception because it's already been captured.",gE="Discarded session because of missing or non-string release",h1=Symbol.for("SentryInternalError"),m1=Symbol.for("SentryDoNotSendEventError");function $d(e){return{message:e,[h1]:!0}}function um(e){return{message:e,[m1]:!0}}function vE(e){return!!e&&typeof e=="object"&&h1 in e}function yE(e){return!!e&&typeof e=="object"&&m1 in e}class tB{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=M$(t.dsn):re&&Y.warn("No DSN provided, client will not send events."),this._dsn){const n=K4(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})}}captureException(t,n,r){const i=Rn();if(V_(t))return re&&Y.log(mE),i;const o={event_id:i,...n};return this._process(this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(t,n,r,i){const o={event_id:Rn(),...r},s=db(t)?t:String(t),a=gl(t)?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(a.then(u=>this._captureEvent(u,o,i))),o.event_id}captureEvent(t,n,r){const i=Rn();if(n!=null&&n.originalException&&V_(n.originalException))return re&&Y.log(mE),i;const o={event_id:i,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,u=s.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,a||r,u)),o.event_id}captureSession(t){this.sendSession(t),wa(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;
vendor: 4,605 bytes, line 84
84return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):Br(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}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]}addIntegration(t){const n=this._integrations[t.name];f1(this,t,this._integrations),n||hE(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=s4(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=X$(r,e4(i));this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){const{release:n,environment:r=yb}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){re&&Y.warn(gE);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){re&&Y.warn(gE);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=o4(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;re&&Y.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(re&&Y.error("Error while sending envelope:",n),{})):(re&&Y.error("Transport disabled"),Br({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Q4(this,t),hE(this,t)}_updateSessionFromEvent(t,n){var u;let r=n.level==="fatal",i=!1;const o=(u=n.exception)==null?void 0:u.values;if(o){i=!0;for(const l of o){const c=l.mechanism;if((c==null?void 0:c.handled)===!1){r=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(wa(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new os(n=>{let r=0;const i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,t&&r>=t&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&(s!=null&&s.length)&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),u1(o,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:g$(r),...a.contexts};const u=e1(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:u,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Fe(),i=nr()){return re&&zv(t)&&Y.log(`Captured error event \`${p1(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{re&&(yE(o)?Y.log(o.message):vE(o)?Y.warn(o.message):Y.warn(o))})}_processEvent(t,n,r,i){const o=this.getOptions(),{sampleRate:s}=o,a=g1(t),u=zv(t),l=t.type||"error",c=`before send for type \`${l}\``,d=typeof s>"u"?void 0:is(s);if(u&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),_b(um(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const f=l==="replay_event"?"replay":l;return this._prepareEvent(t,n,r,i).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),um("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=rB(this,o,p,n);return nB(m,c)}).then(p=>{var y;if(p===null){if(this.recordDroppedEvent("before_send",f),a){const v=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",v)}throw um(`${c} returned \`null\`, will not send event.`)}const h=r.getSession()||i.getSession();if(u&&h&&this._updateSessionFromEvent(h,p),a){const g=((y=p.sdkProcessingMetadata)==null?void 0:y.spanCountBeforeProcessing)||0,v=p.spans?p.spans.length:0,b=g-v;b>0&&this.recordDroppedEvent("before_send","span",b)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const g="custom";p.transaction_info={...m,source:g}}return this.sendEvent(p,n),p}).then(null,p=>{throw yE(p)||vE(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}
84),$d(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 85Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){re&&Y.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){re&&Y.log("No outcomes to send");return}if(!this._dsn){re&&Y.log("No dsn provided, will not send outcomes");return}re&&Y.log("Sending outcomes:",t);const n=J4(t,this._options.tunnel&&Kl(this._dsn));this.sendEnvelope(n)}}function nB(e,t){const n=`${t} must return \`null\` or a valid event.`;if($a(e))return e.then(r=>{if(!vl(r)&&r!==null)throw $d(n);return r},r=>{throw $d(`${t} rejected with ${r}`)});if(!vl(e)&&e!==null)throw $d(n);return e}function rB(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s,ignoreSpans:a}=t;let u=n;if(zv(u)&&i)return i(u,r);if(g1(u)){if(s||a){const l=Z4(u);if(a!=null&&a.length&&$v(l,a))return null;if(s){const c=s(l);c?u=ql(n,eB(c)):Fv()}if(u.spans){const c=[],d=u.spans;for(const p of d){if(a!=null&&a.length&&$v(p,a)){n4(d,p);continue}if(s){const h=s(p);h?c.push(h):(Fv(),c.push(p))}else c.push(p)}const f=u.spans.length-c.length;f&&e.recordDroppedEvent("before_send","span",f),u.spans=c}}if(o){if(u.spans){const l=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return o(u,r)}}return u}function zv(e){return e.type===void 0}function g1(e){return e.type==="transaction"}function iB(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function oB(e,t,n,r){const i={};return t!=null&&t.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Kl(r)),ys(i,[iB(e)])}function lm(e,t){const n=sB(e)??[];if(n.length===0)return;const r=e.getOptions(),i=oB(n,r._metadata,r.tunnel,e.getDsn());v1().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function sB(e){return v1().get(e)}function v1(){return Wl("clientToLogBufferMap",()=>new WeakMap)}function aB(e,t){t.debug===!0&&(re?Y.enable():gs(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Fe().update(t.initialScope);const r=new e(t);return uB(r),r.init(),r}function uB(e){Fe().setClient(e)}const y1=Symbol.for("SentryBufferFullError");function lB(e){const t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return _b(y1);const a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new os((a,u)=>{let l=t.length;if(!l)return a(!0);const c=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(d=>{Br(d).then(()=>{--l||(clearTimeout(c),a(!0))},u)})})}return{$:t,add:i,drain:o}}const cB=60*1e3;function dB(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?cB:r-t}function fB(e,t){return e[t]||e.all||0}function b1(e,t,n=Date.now()){return fB(e,t)>n}function w1(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n==null?void 0:n["x-sentry-rate-limits"],s=n==null?void 0:n["retry-after"];if(o)for(const a of o.trim().split(",")){const[u,l,,,c]=a.split(":",5),d=parseInt(u,10),f=(isNaN(d)?60:d)*1e3;if(!l)i.all=r+f;else for(const p of l.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(i[p]=r+f):i[p]=r+f}else s?i.all=r+dB(s,r):t===429&&(i.all=r+60*1e3);return i}const pB=64;function hB(e,t,n=lB(e.bufferSize||pB)){let r={};const i=s=>n.drain(s);function o(s){const a=[];if(eE(s,(d,f)=>{const p=tE(f);b1(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Br({});const u=ys(s[0],a),l=d=>{eE(u,(f,p)=>{e.recordDroppedEvent(d,tE(p))})},c=()=>t({body:Q$(u)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&re&&Y.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=w1(r,d),d),d=>{throw l("network_error"),re&&Y.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===y1)return re&&Y.error("Skipped sending event because buffer is full."),l("queue_overflow"),Br({});throw d})}return{send:o,flush:i}}const mB="thismessage:/";function Tb(e){return"isRelative"in e}function xb(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?mB:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function gB(e){if(Tb(e))return e.pathname;const 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 Ko(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function vB(e){return e.split(/[?#]/,1)[0]}function S1(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return bB(e,n)||yB(e,r)}function yB(e,t){return t?bE(e)===bE(t):!1}function bB(e,t){const n=xb(e);return!n||Tb(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function bE(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function wB(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function _1(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:qo})),version:qo}),e._metadata=i}function E1(e={}){const t=e.client||he();if(!z4()||!t)return{};const n=ms(),r=za(n);if(r.getTraceData)return r.getTraceData(e);const i=e.scope||Fe(),o=e.span||on(),s=o?U$(o):SB(i),a=o?mi(o):e1(t,i),u=E$(a);
85if(!qk.test(s))return Y.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const c={"sentry-trace":s,baggage:u};if(e.propagateTraceparent){const d=o?$$(o):_B(i);d&&(c.traceparent=d)}return c}function SB(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Vk(t,r,n)}function _B(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Gk(t,r,n)}function EB(e,t,n){let r,i,o;const s=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,a=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function u(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),o!==void 0&&clearTimeout(o),i=o=void 0}function c(){return i!==void 0||o!==void 0?u():r}function d(){return i&&clearTimeout(i),i=a(u,t),s&&o===void 0&&(o=a(u,s)),r}return d.cancel=l,d.flush=c,d}const TB=100;function go(e,t){const n=he(),r=nr();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=TB}=n.getOptions();if(o<=0)return;const a={timestamp:vs(),...e},u=i?gs(()=>i(a,t)):a;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,t),r.addBreadcrumb(u,o))}let wE;const xB="FunctionToString",SE=new WeakMap,CB=()=>({name:xB,setupOnce(){wE=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=pb(this),n=SE.has(he())&&t!==void 0?t:this;return wE.apply(n,e)}}catch{}},setup(e){SE.set(e,!0)}}),IB=CB,RB=[/^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. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],kB="EventFilters",PB=(e={})=>{let t;return{name:kB,setup(n){const r=n.getOptions();t=_E(e,r)},processEvent(n,r,i){if(!t){const o=i.getOptions();t=_E(e,o)}return OB(n,t)?null:n}}},AB=(e={})=>({...PB(e),name:"InboundFilters"});function _E(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:RB],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function OB(e,t){if(e.type){if(e.type==="transaction"&&NB(e,t.ignoreTransactions))return re&&Y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 86Event: ${Lo(e)}`),!0}else{if(MB(e,t.ignoreErrors))return re&&Y.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 87Event: ${Lo(e)}`),!0;if(jB(e))return re&&Y.warn(`Event dropped due to not having an error message, error type or stacktrace. 88Event: ${Lo(e)}`),!0;if(DB(e,t.denyUrls))return re&&Y.warn(`Event dropped due to being matched by \`denyUrls\` option. 89Event: ${Lo(e)}. 90Url: ${Uf(e)}`),!0;if(!LB(e,t.allowUrls))return re&&Y.warn(`Event dropped due to not being matched by \`allowUrls\` option. 91Event: ${Lo(e)}. 92Url: ${Uf(e)}`),!0}return!1}function MB(e,t){return t!=null&&t.length?p1(e).some(n=>ni(n,t)):!1}function NB(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?ni(n,t):!1}function DB(e,t){if(!(t!=null&&t.length))return!1;const n=Uf(e);return n?ni(n,t):!1}function LB(e,t){if(!(t!=null&&t.length))return!0;const n=Uf(e);return n?ni(n,t):!0}function FB(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Uf(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(o=>{var s,a,u;return((s=o.mechanism)==null?void 0:s.parent_id)===void 0&&((u=(a=o.stacktrace)==null?void 0:a.frames)==null?void 0:u.length)}),i=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return i?FB(i):null}catch{return re&&Y.error(`Cannot extract url for event ${Lo(e)}`),null}}function jB(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function UB(e,t,n,r,i,o){var a;if(!((a=i.exception)!=null&&a.values)||!o||!fi(o.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Hv(e,t,r,o.originalException,n,i.exception.values,s,0))}function Hv(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let u=[...o];if(fi(r[i],Error)){EE(s,a);const l=e(t,r[i]),c=u.length;TE(l,i,c,a),u=Hv(e,t,n,r[i],i,[l,...u],l,c)}
92return Array.isArray(r.errors)&&r.errors.forEach((l,c)=>{if(fi(l,Error)){EE(s,a);const d=e(t,l),f=u.length;TE(d,`errors[${c}]`,f,a),u=Hv(e,t,n,l,i,[d,...u],d,f)}}),u}function EE(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function TE(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function $B(e){const t="console";Eo(t,e),To(t,BB)}function BB(){"console"in ke&&FU.forEach(function(e){e in ke.console&&gn(ke.console,e,function(t){return Nf[e]=t,function(...n){Yn("console",{args:n,level:e});const i=Nf[e];i==null||i.apply(ke.console,n)}})})}function T1(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const zB="Dedupe",HB=()=>{let e;return{name:zB,processEvent(t){if(t.type)return t;try{if(qB(t,e))return re&&Y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},WB=HB;function qB(e,t){return t?!!(VB(e,t)||GB(e,t)):!1}function VB(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!C1(e,t)||!x1(e,t))}function GB(e,t){const n=xE(t),r=xE(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!C1(e,t)||!x1(e,t))}function x1(e,t){let n=$_(e),r=$_(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function C1(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function xE(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function KB(e,t,n,r,i){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=yr()&&t(s);if(e.endTimestamp&&a){const p=e.fetchData.__span;if(!p)return;const h=r[p];h&&(XB(h,e),delete r[p]);return}const{spanOrigin:u="auto.http.browser",propagateTraceparent:l=!1}=typeof i=="object"?i:{spanOrigin:i},c=!!on(),d=a&&c?Wa(JB(s,o,u)):new mo;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const p=e.args[0],h=e.args[1]||{},m=YB(p,h,yr()&&c?d:void 0,l);m&&(e.args[1]=h,h.headers=m)}const f=he();if(f){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,p)}return d}function YB(e,t,n,r){const i=E1({span:n,propagateTraceparent:r}),o=i["sentry-trace"],s=i.baggage,a=i.traceparent;if(!o)return;const u=t.headers||(Ok(e)?e.headers:void 0);if(u)if(QB(u)){const l=new Headers(u);if(l.get("sentry-trace")||l.set("sentry-trace",o),r&&a&&!l.get("traceparent")&&l.set("traceparent",a),s){const c=l.get("baggage");c?Bc(c)||l.set("baggage",`${c},${s}`):l.set("baggage",s)}return l}else if(Array.isArray(u)){const l=[...u];u.find(d=>d[0]==="sentry-trace")||l.push(["sentry-trace",o]),r&&a&&!u.find(d=>d[0]==="traceparent")&&l.push(["traceparent",a]);const c=u.find(d=>d[0]==="baggage"&&Bc(d[1]));return s&&!c&&l.push(["baggage",s]),l}else{const l="sentry-trace"in u?u["sentry-trace"]:void 0,c="traceparent"in u?u.traceparent:void 0,d="baggage"in u?u.baggage:void 0,f=d?Array.isArray(d)?[...d]:[d]:[],p=d&&(Array.isArray(d)?d.find(m=>Bc(m)):Bc(d));s&&!p&&f.push(s);const h={...u,"sentry-trace":l??o,baggage:f.length>0?f.join(","):void 0};return r&&a&&!c&&(h.traceparent=a),h}else return{...i}}function XB(e,t){var n,r;if(t.response){$k(e,t.response.status);const i=(r=(n=t.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(i){const o=parseInt(i);o>0&&e.setAttribute("http.response_content_length",o)}}else t.error&&e.setStatus({code:Tt,message:"internal_error"});e.end()}function Bc(e){return e.split(",").some(t=>t.trim().startsWith(gb))}function QB(e){return typeof Headers<"u"&&fi(e,Headers)}function JB(e,t,n){const r=xb(e);return{name:r?`${t} ${gB(r)}`:t,attributes:ZB(e,r,t,n)}}function ZB(e,t,n,r){const i={url:e,type:"fetch","http.method":n,[It]:r,[hi]:"http.client"};return t&&(Tb(t)||(i["http.url"]=t.href,i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function I1(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const yl=ke;function e5(){return"history"in yl&&!!yl.history}function t5(){if(!("fetch"in yl))return!1;
92try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Wv(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function R1(){var n;if(typeof EdgeRuntime=="string")return!0;if(!t5())return!1;if(Wv(yl.fetch))return!0;let e=!1;const t=yl.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=Wv(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){re&&Y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Cb(e,t){const n="fetch";Eo(n,e),To(n,()=>k1(void 0,t))}function n5(e){const t="fetch-body-resolved";Eo(t,e),To(t,()=>k1(i5))}function k1(e,t=!1){t&&!R1()||gn(ke,"fetch",function(n){return function(...r){const i=new Error,{method:o,url:s}=o5(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:Ft()*1e3,virtualError:i,headers:s5(r)};return e||Yn("fetch",{...a}),n.apply(ke,r).then(async u=>(e?e(u):Yn("fetch",{...a,endTimestamp:Ft()*1e3,response:u}),u),u=>{if(Yn("fetch",{...a,endTimestamp:Ft()*1e3,error:u}),cb(u)&&u.stack===void 0&&(u.stack=i.stack,On(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{const l=new URL(a.fetchData.url);u.message=`${u.message} (${l.host})`}catch{}throw u})}})}async function r5(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function i5(e){let t;try{t=e.clone()}catch{return}r5(t,()=>{Yn("fetch-body-resolved",{endTimestamp:Ft()*1e3,response:e})})}function qv(e,t){return!!e&&typeof e=="object"&&!!e[t]}function CE(e){return typeof e=="string"?e:e?qv(e,"url")?e.url:e.toString?e.toString():"":""}function o5(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:CE(n),method:qv(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:CE(t),method:qv(t,"method")?String(t.method).toUpperCase():"GET"}}function s5(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ok(t))return new Headers(t.headers)}catch{}}function a5(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function u5(){return"npm"}function l5(){return!a5()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function IE(){return typeof window<"u"&&(!l5()||c5())}function c5(){const e=ke.process;return(e==null?void 0:e.type)==="renderer"}const Pe=ke;let Vv=0;function P1(){return Vv>0}function d5(){Vv++,setTimeout(()=>{Vv--})}function Ea(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(pb(e))return e}catch{return e}const r=function(...i){try{const o=i.map(s=>Ea(s,t));return e.apply(this,o)}catch(o){throw d5(),jp(s=>{s.addEventProcessor(a=>(t.mechanism&&(Nv(a,void 0),rs(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),Eb(o)}),o}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Nk(r,e),On(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Ib(){const e=Ba(),{referrer:t}=Pe.document||{},{userAgent:n}=Pe.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function Rb(e,t){const n=kb(e,t),r={type:g5(t),value:v5(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function f5(e,t,n,r){const i=he(),o=i==null?void 0:i.getOptions().normalizeDepth,s=_5(t),a={__serialized__:t1(t,o)};if(s)return{exception:{values:[Rb(e,s)]},extra:a};const u={exception:{values:[{type:Fp(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:w5(t,{isUnhandledRejection:r})}]},extra:a};if(n){const l=kb(e,n);l.length&&(u.exception.values[0].stacktrace={frames:l})}return u}function cm(e,t){return{exception:{values:[Rb(e,t)]}}}function kb(e,t){const n=t.stacktrace||t.stack||"",r=h5(t),i=m5(t);try{return e(n,r,i)}catch{}return[]}const p5=/Minified React error #\d+;/i;function h5(e){return e&&p5.test(e.message)?1:0}function m5(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function A1(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function g5(e){const t=e==null?void 0:e.name;return!t&&A1(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function v5(e){const t=e==null?void 0:e.message;return A1(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function y5(e,t,n,r){const i=(n==null?void 0:n.syntheticException)||void 0,o=Pb(e,t,i,r);return rs(o),o.level="error",n!=null&&n.event_id&&(o.event_id=n.event_id),Br(o)}function b5(e,t,n="info",r,i){const o=(r==null?void 0:r.syntheticException)||void 0,s=Gv(e,t,o,i);return s.level=n,r!=null&&r.event_id&&(s.event_id=r.event_id),Br(s)}function Pb(e,t,n,r,i){let o;if(Pk(t)&&t.error)return cm(e,t.error);if(z_(t)||KU(t)){const s=t;if("stack"in t)o=cm(e,t);else{const a=s.name||(z_(s)?"DOMError":"DOMException"),u=s.message?`${a}: ${s.message}`:a;o=Gv(e,u,n,r),Nv(o,u)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return cb(t)?cm(e,t):vl(t)||Fp(t)?(o=f5(e,t,n,i),rs(o,{synthetic:!0}),o):(o=Gv(e,t,n,r),Nv(o,`${t}`),rs(o,{synthetic:!0}),o)}function Gv(e,t,n,r){const i={};if(r&&n){const o=kb(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}
92),rs(i,{synthetic:!0})}if(db(t)){const{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function w5(e,{isUnhandledRejection:t}){const n=e$(e),r=t?"promise rejection":"exception";return Pk(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Fp(e)?`Event \`${S5(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function S5(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function _5(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const E5=5e3;class T5 extends tB{constructor(t){var a;const n=x5(t),r=Pe.SENTRY_SDK_SOURCE||u5();_1(n,"browser",["browser"],r),(a=n._metadata)!=null&&a.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:i,sendClientReports:o,enableLogs:s}=this._options;Pe.document&&(o||s)&&Pe.document.addEventListener("visibilitychange",()=>{Pe.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),s&&lm(this))}),s&&(this.on("flush",()=>{lm(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{lm(this)},E5)})),i&&this.on("beforeSendSession",wB)}eventFromException(t,n){return y5(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return b5(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function x5(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=Pe.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Ta=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ue=ke,C5=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Yl=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=C5(t.value,n),e(t)))}},I5=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Xl=(e=!0)=>{var n,r;const t=(r=(n=ue.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},qa=()=>{const e=Xl();return(e==null?void 0:e.activationStart)??0},Ql=(e,t=-1)=>{var o,s;const n=Xl();let r="navigate";return n&&((o=ue.document)!=null&&o.prerendering||qa()>0?r="prerender":(s=ue.document)!=null&&s.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:I5(),navigationType:r}},dm=new WeakMap;function Ab(e,t){return dm.get(e)||dm.set(e,new t),dm.get(e)}class $f{constructor(){$f.prototype.__init.call(this),$f.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){var i;if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),(i=this._onAfterProcessingUnexpectedShift)==null||i.call(this,t)}}const Va=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Ob=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Lu=-1;const R5=()=>{var e,t;return((e=ue.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=ue.document)!=null&&t.prerendering)?0:1/0},Bf=e=>{ue.document.visibilityState==="hidden"&&Lu>-1&&(Lu=e.type==="visibilitychange"?e.timeStamp:0,P5())},k5=()=>{addEventListener("visibilitychange",Bf,!0),addEventListener("prerenderingchange",Bf,!0)},P5=()=>{removeEventListener("visibilitychange",Bf,!0),removeEventListener("prerenderingchange",Bf,!0)},Mb=()=>{var e;if(ue.document&&Lu<0){const t=qa();Lu=(ue.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime)??R5(),k5()}return{get firstHiddenTime(){return Lu}}},Bp=e=>{var t;(t=ue.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},A5=[1800,3e3],O5=(e,t={})=>{Bp(()=>{const n=Mb(),r=Ql("FCP");let i;const s=Va("paint",a=>{for(const u of a)u.name==="first-contentful-paint"&&(s.disconnect(),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-qa(),0),r.entries.push(u),i(!0)))});s&&(i=Yl(e,r,A5,t.reportAllChanges))})},M5=[.1,.25],N5=(e,t={})=>{O5(Ob(()=>{var a,u;const n=Ql("CLS",0);let r;const i=Ab(t,$f),o=l=>{for(const c of l)i._processEntry(c);i._sessionValue>
92n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},s=Va("layout-shift",o);s&&(r=Yl(e,n,M5,t.reportAllChanges),(a=ue.document)==null||a.addEventListener("visibilitychange",()=>{var l;((l=ue.document)==null?void 0:l.visibilityState)==="hidden"&&(o(s.takeRecords()),r(!0))}),(u=ue==null?void 0:ue.setTimeout)==null||u.call(ue,r))}))};let O1=0,fm=1/0,zc=0;const D5=e=>{e.forEach(t=>{t.interactionId&&(fm=Math.min(fm,t.interactionId),zc=Math.max(zc,t.interactionId),O1=zc?(zc-fm)/7+1:0)})};let Kv;const M1=()=>Kv?O1:performance.interactionCount||0,L5=()=>{"interactionCount"in performance||Kv||(Kv=Va("event",D5,{type:"event",buffered:!0,durationThreshold:0}))},pm=10;let N1=0;const F5=()=>M1()-N1;class zf{constructor(){zf.prototype.__init.call(this),zf.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){N1=M1(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(F5()/50));return this._longestInteractionList[t]}_processEntry(t){var i,o;if((i=this._onBeforeProcessingEntry)==null||i.call(this,t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<pm||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,a)=>a._latency-s._latency),this._longestInteractionList.length>pm){const s=this._longestInteractionList.splice(pm);for(const a of s)this._longestInteractionMap.delete(a.id)}(o=this._onAfterProcessingINPCandidate)==null||o.call(this,r)}}}const Nb=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=ue.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};ue.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},D1=e=>{var n;const t=ue.requestIdleCallback||ue.setTimeout;((n=ue.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=Ob(e),t(e),Nb(e))},j5=[200,500],U5=40,$5=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Bp(()=>{L5();const n=Ql("INP");let r;const i=Ab(t,zf),o=a=>{D1(()=>{for(const l of a)i._processEntry(l);const u=i._estimateP98LongestInteraction();u&&u._latency!==n.value&&(n.value=u._latency,n.entries=u.entries,r())})},s=Va("event",o,{durationThreshold:t.durationThreshold??U5});r=Yl(e,n,j5,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Nb(()=>{o(s.takeRecords()),r(!0)}))})};class B5{_processEntry(t){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,t)}}const z5=[2500,4e3],H5=(e,t={})=>{Bp(()=>{const n=Mb(),r=Ql("LCP");let i;const o=Ab(t,B5),s=u=>{t.reportAllChanges||(u=u.slice(-1));for(const l of u)o._processEntry(l),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-qa(),0),r.entries=[l],i())},a=Va("largest-contentful-paint",s);if(a){i=Yl(e,r,z5,t.reportAllChanges);const u=Ob(()=>{s(a.takeRecords()),a.disconnect(),i(!0)});for(const l of["keydown","click","visibilitychange"])ue.document&&addEventListener(l,()=>D1(u),{capture:!0,once:!0})}})},W5=[800,1800],Yv=e=>{var t,n;(t=ue.document)!=null&&t.prerendering?Bp(()=>Yv(e)):((n=ue.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>Yv(e),!0):setTimeout(e)},q5=(e,t={})=>{const n=Ql("TTFB"),r=Yl(e,n,W5,t.reportAllChanges);Yv(()=>{const i=Xl();i&&(n.value=Math.max(i.responseStart-qa(),0),n.entries=[i],r(!0))})},Fu={},Hf={};let L1,F1,j1,U1;function Db(e,t=!1){return zp("cls",e,G5,L1,t)}function Lb(e,t=!1){return zp("lcp",e,K5,F1,t)}function V5(e){return zp("ttfb",e,Y5,j1)}function $1(e){return zp("inp",e,X5,U1)}function ss(e,t){return B1(e,t),Hf[e]||(Q5(e),Hf[e]=!0),z1(e,t)}function Jl(e,t){const n=Fu[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(i){Ta&&Y.error(`Error while triggering instrumentation handler. 93Type: ${e} 94Name: ${di(r)} 95Error:`,i)}}function G5(){return N5(e=>{Jl("cls",{metric:e}),L1=e},{reportAllChanges:!0})}
95function K5(){return H5(e=>{Jl("lcp",{metric:e}),F1=e},{reportAllChanges:!0})}function Y5(){return q5(e=>{Jl("ttfb",{metric:e}),j1=e})}function X5(){return $5(e=>{Jl("inp",{metric:e}),U1=e})}function zp(e,t,n,r,i=!1){B1(e,t);let o;return Hf[e]||(o=n(),Hf[e]=!0),r&&t({metric:r}),z1(e,t,i?o:void 0)}function Q5(e){const t={};e==="event"&&(t.durationThreshold=0),Va(e,n=>{Jl(e,{entries:n})},t)}function B1(e,t){Fu[e]=Fu[e]||[],Fu[e].push(t)}function z1(e,t,n){return()=>{n&&n();const r=Fu[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function J5(e){return"duration"in e}function hm(e){return typeof e=="number"&&isFinite(e)}function vo(e,t,n,{...r}){const i=Re(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),wb(e,()=>{const o=Wa({startTime:t,...r});return o&&o.end(n),o})}function Fb(e){var y;const t=he();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a,sendDefaultPii:u}=t.getOptions(),l=t.getIntegrationByName("Replay"),c=l==null?void 0:l.getReplayId(),d=Fe(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let h;try{h=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:s,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:c||void 0,transaction:r,"user_agent.original":(y=ue.navigator)==null?void 0:y.userAgent,"client.address":u?"{{auto}}":void 0,...i};return Wa({name:n,attributes:m,startTime:o,experimental:{standalone:!0}})}function Zl(){return ue.addEventListener&&ue.performance}function ft(e){return e/1e3}function Z5(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function H1(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function W1(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n),r=!0}Nb(()=>{i("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,u)=>{u!=null&&u.isRedirect||(i("navigation"),RE(o,s))}),s=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,RE(s)})}function RE(...e){e.forEach(t=>t&&setTimeout(t,0))}function ez(e){let t=0,n;if(!H1("layout-shift"))return;const r=Db(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);W1(e,(i,o)=>{tz(t,n,o,i),r()})}function tz(e,t,n,r){var l;Ta&&Y.log(`Sending CLS span (${e})`);const i=ft((wn()||0)+((t==null?void 0:t.startTime)||0)),o=Fe().getScopeData().transactionName,s=t?tr((l=t.sources[0])==null?void 0:l.node):"Layout shift",a={[It]:"auto.http.browser.cls",[hi]:"ui.webvital.cls",[Ha]:(t==null?void 0:t.duration)||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t!=null&&t.sources&&t.sources.forEach((c,d)=>{a[`cls.source.${d+1}`]=tr(c.node)});const u=Fb({name:s,transaction:o,attributes:a,startTime:i});u&&(u.addEvent("cls",{[Vl]:"",[Gl]:e}),u.end(i))}function nz(e){let t=0,n;if(!H1("largest-contentful-paint"))return;const r=Lb(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);W1(e,(i,o)=>{rz(t,n,o,i),r()})}function rz(e,t,n,r){Ta&&Y.log(`Sending LCP span (${e})`);const i=ft((wn()||0)+((t==null?void 0:t.startTime)||0)),o=Fe().getScopeData().transactionName,s=t?tr(t.element):"Largest contentful paint",a={[It]:"auto.http.browser.lcp",[hi]:"ui.webvital.lcp",[Ha]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=tr(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const u=Fb({name:s,transaction:o,attributes:a,startTime:i});u&&(u.addEvent("lcp",{[Vl]:"millisecond",[Gl]:e}),u.end(i))}function Hn(e=0){return((wn()||performance.timeOrigin)+e)/1e3}function q1(e){var n;const t={};if(e.nextHopProtocol!=null){const{name:r,version:i}=Z5(e.nextHopProtocol);t["network.protocol.version"]=i,t["network.protocol.name"]=r}return wn()||(n=Zl())!=null&&n.timeOrigin?{...t,"http.request.redirect_start":Hn(e.redirectStart),"http.request.redirect_end":Hn(e.redirectEnd),"http.request.worker_start":Hn(e.workerStart),"http.request.fetch_start":Hn(e.fetchStart),"http.request.domain_lookup_start":Hn(e.domainLookupStart),"http.request.domain_lookup_end":Hn(e.domainLookupEnd),"http.request.connect_start":Hn(e.connectStart),"http.request.secure_connection_start":Hn(e.secureConnectionStart),"http.request.connection_end":Hn(e.connectEnd),"http.request.request_start":Hn(e.requestStart),"http.request.response_start":Hn(e.responseStart),"http.request.response_end":Hn(e.responseEnd),"http.request.time_to_first_byte":(e.responseStart??0)/1e3}:t}const iz=2147483647;let kE=0,fr={},dn,Ys;
95function oz({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Zl();if(r&&wn()){r.mark&&ue.performance.mark("sentry-tracing-init");const i=t?nz(n):cz(),o=dz(),s=e?ez(n):lz();return()=>{i==null||i(),o(),s==null||s()}}return()=>{}}function sz(){ss("longtask",({entries:e})=>{const t=on();if(!t)return;const{op:n,start_timestamp:r}=Re(t);for(const i of e){const o=ft(wn()+i.startTime),s=ft(i.duration);n==="navigation"&&r&&o<r||vo(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[It]:"auto.ui.browser.metrics"}})}})}function az(){new PerformanceObserver(t=>{const n=on();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const i=ft(wn()+r.startTime),{start_timestamp:o,op:s}=Re(n);if(s==="navigation"&&o&&i<o)continue;const a=ft(r.duration),u={[It]:"auto.ui.browser.metrics"},l=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=l;u["browser.script.invoker"]=c,u["browser.script.invoker_type"]=d,f&&(u["code.filepath"]=f),p&&(u["code.function"]=p),h!==-1&&(u["browser.script.source_char_position"]=h),vo(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:u})}}).observe({type:"long-animation-frame",buffered:!0})}function uz(){ss("event",({entries:e})=>{const t=on();if(t){for(const n of e)if(n.name==="click"){const r=ft(wn()+n.startTime),i=ft(n.duration),o={name:tr(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[It]:"auto.ui.browser.metrics"}},s=Mk(n.target);s&&(o.attributes["ui.component_name"]=s),vo(t,r,r+i,o)}}})}function lz(){return Db(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(fr.cls={value:e.value,unit:""},Ys=t)},!0)}function cz(){return Lb(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(fr.lcp={value:e.value,unit:"millisecond"},dn=t)},!0)}function dz(){return V5(({metric:e})=>{e.entries[e.entries.length-1]&&(fr.ttfb={value:e.value,unit:"millisecond"})})}function fz(e,t){const n=Zl(),r=wn();if(!(n!=null&&n.getEntries)||!r)return;const i=ft(r),o=n.getEntries(),{op:s,start_timestamp:a}=Re(e);o.slice(kE).forEach(u=>{const l=ft(u.startTime),c=ft(Math.max(0,u.duration));if(!(s==="navigation"&&a&&i+l<a))switch(u.entryType){case"navigation":{mz(e,u,i);break}case"mark":case"paint":case"measure":{pz(e,u,l,c,i,t.ignorePerformanceApiSpans);const d=Mb(),f=u.startTime<d.firstHiddenTime;u.name==="first-paint"&&f&&(fr.fp={value:u.startTime,unit:"millisecond"}),u.name==="first-contentful-paint"&&f&&(fr.fcp={value:u.startTime,unit:"millisecond"});break}case"resource":{yz(e,u,u.name,l,c,i,t.ignoreResourceSpans);break}}}),kE=Math.max(o.length-1,0),bz(e),s==="pageload"&&(_z(fr),t.recordClsOnPageloadSpan||delete fr.cls,t.recordLcpOnPageloadSpan||delete fr.lcp,Object.entries(fr).forEach(([u,l])=>{c4(u,l.value,l.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",qa()),wz(e,t)),dn=void 0,Ys=void 0,fr={}}function pz(e,t,n,r,i,o){if(["mark","measure"].includes(t.entryType)&&ni(t.name,o))return;const s=Xl(!1),a=ft(s?s.requestStart:0),u=i+Math.max(n,a),l=i+n,c=l+r,d={[It]:"auto.resource.browser.metrics"};u!==l&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=u),hz(d,t),u<=c&&vo(e,u,c,{name:t.name,op:t.entryType,attributes:d})}function hz(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&gl(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(gl(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function mz(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Hc(e,t,r,n)}),Hc(e,t,"secureConnection",n,"TLS/SSL"),Hc(e,t,"fetch",n,"cache"),Hc(e,t,"domainLookup",n,"DNS"),vz(e,t,n)}function Hc(e,t,n,r,i=n){const o=gz(n),s=t[o],a=t[`${n}Start`];!a||!s||vo(e,r+ft(a),r+ft(s),{op:`browser.${i}`,name:t.name,attributes:{[It]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function gz(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function vz(e,t,n){const r=n+ft(t.requestStart),i=n+ft(t.responseEnd),o=n+ft(t.responseStart);t.responseEnd&&(vo(e,r,i,{op:"browser.request",name:t.name,attributes:{[It]:"auto.ui.browser.metrics"}}),vo(e,o,i,{op:"browser.response",name:t.name,attributes:{[It]:"auto.ui.browser.metrics"}}))}
95function yz(e,t,n,r,i,o,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s!=null&&s.includes(a))return;const u={[It]:"auto.resource.browser.metrics"},l=Ko(n);l.protocol&&(u["url.scheme"]=l.protocol.split(":").pop()),l.host&&(u["server.address"]=l.host),u["url.same_origin"]=n.includes(ue.location.origin),Sz(t,u,[["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"]]);const c={...u,...q1(t)},d=o+r,f=d+i;vo(e,d,f,{name:n.replace(ue.location.origin,""),op:a,attributes:c})}function bz(e){const t=ue.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),hm(n.rtt)&&(fr["connection.rtt"]={value:n.rtt,unit:"millisecond"})),hm(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),hm(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function wz(e,t){dn&&t.recordLcpOnPageloadSpan&&(dn.element&&e.setAttribute("lcp.element",tr(dn.element)),dn.id&&e.setAttribute("lcp.id",dn.id),dn.url&&e.setAttribute("lcp.url",dn.url.trim().slice(0,200)),dn.loadTime!=null&&e.setAttribute("lcp.loadTime",dn.loadTime),dn.renderTime!=null&&e.setAttribute("lcp.renderTime",dn.renderTime),e.setAttribute("lcp.size",dn.size)),Ys!=null&&Ys.sources&&t.recordClsOnPageloadSpan&&Ys.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,tr(n.node)))}function Sz(e,t,n){n.forEach(([r,i])=>{const o=e[r];o!=null&&(typeof o=="number"&&o<iz||typeof o=="string")&&(t[i]=o)})}function _z(e){const t=Xl(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Ez(){return Zl()&&wn()?ss("element",Tz):()=>{}}const Tz=({entries:e})=>{const t=on(),n=t?Vt(t):void 0,r=n?Re(n).description:Fe().getScopeData().transactionName;e.forEach(i=>{var p,h;const o=i;if(!o.identifier)return;const s=o.name,a=o.renderTime,u=o.loadTime,[l,c]=u?[ft(u),"load-time"]:a?[ft(a),"render-time"]:[Ft(),"entry-emission"],d=s==="image-paint"?ft(Math.max(0,(a??0)-(u??0))):0,f={[It]:"auto.ui.browser.elementtiming",[hi]:"ui.elementtiming",[mr]:"component","sentry.span_start_time_source":c,"sentry.transaction_name":r,"element.id":o.id,"element.type":((h=(p=o.element)==null?void 0:p.tagName)==null?void 0:h.toLowerCase())||"unknown","element.size":o.naturalWidth&&o.naturalHeight?`${o.naturalWidth}x${o.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":u,"element.url":o.url||void 0,"element.identifier":o.identifier,"element.paint_type":s};g4({name:`element[${o.identifier}]`,attributes:f,startTime:l,onlyIfParent:!0},m=>
vendor: 1,496 bytes, line 95
95{m.end(l+d)})})},xz=1e3;let PE,Xv,Qv;function V1(e){const t="dom";Eo(t,e),To(t,Cz)}function Cz(){if(!ue.document)return;const e=Yn.bind(null,"dom"),t=AE(e,!0);ue.document.addEventListener("click",t,!1),ue.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var o,s;const i=(o=ue[n])==null?void 0:o.prototype;(s=i==null?void 0:i.hasOwnProperty)!=null&&s.call(i,"addEventListener")&&(gn(i,"addEventListener",function(a){return function(u,l,c){if(u==="click"||u=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[u]=d[u]||{refCount:0};if(!f.handler){const p=AE(e);f.handler=p,a.call(this,u,p,c)}f.refCount++}catch{}return a.call(this,u,l,c)}}),gn(i,"removeEventListener",function(a){return function(u,l,c){if(u==="click"||u=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[u];f&&(f.refCount--,f.refCount<=0&&(a.call(this,u,f.handler,c),f.handler=void 0,delete d[u]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,u,l,c)}}))})}function Iz(e){if(e.type!==Xv)return!1;try{if(!e.target||e.target._sentryId!==Qv)return!1}catch{}return!0}function Rz(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function AE(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=kz(n);if(Rz(n.type,r))return;On(n,"_sentryCaptured",!0),r&&!r._sentryId&&On(r,"_sentryId",Rn());
95const i=n.type==="keypress"?"input":n.type;Iz(n)||(e({event:n,name:i,global:t}),Xv=n.type,Qv=r?r._sentryId:void 0),clearTimeout(PE),PE=ue.setTimeout(()=>{Qv=void 0,Xv=void 0},xz)}}function kz(e){try{return e.target}catch{return null}}let Wc;function Hp(e){const t="history";Eo(t,e),To(t,Pz)}function Pz(){if(ue.addEventListener("popstate",()=>{const t=ue.location.href,n=Wc;if(Wc=t,n===t)return;Yn("history",{from:n,to:t})}),!e5())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Wc,o=Az(String(r));if(Wc=o,i===o)return t.apply(this,n);Yn("history",{from:i,to:o})}return t.apply(this,n)}}gn(ue.history,"pushState",e),gn(ue.history,"replaceState",e)}function Az(e){try{return new URL(e,ue.location.origin).toString()}catch{return e}}const Bd={};function G1(e){const t=Bd[e];if(t)return t;let n=ue[e];if(Wv(n))return Bd[e]=n.bind(ue);const r=ue.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const o=i.contentWindow;o!=null&&o[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){Ta&&Y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Bd[e]=n.bind(ue))}function Oz(e){Bd[e]=void 0}function ec(...e){return G1("setTimeout")(...e)}const Yi="__sentry_xhr_v3__";function jb(e){const t="xhr";Eo(t,e),To(t,Mz)}function Mz(){if(!ue.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=Ft()*1e3,s=ti(r[0])?r[0].toUpperCase():void 0,a=Nz(r[1]);if(!s||!a)return t.apply(n,r);n[Yi]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const u=()=>{const l=n[Yi];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}const c={endTimestamp:Ft()*1e3,startTimestamp:o,xhr:n,virtualError:i};Yn("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(l,c,d){return u(),l.apply(c,d)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,c,d){const[f,p]=d,h=c[Yi];return h&&ti(f)&&ti(p)&&(h.request_headers[f.toLowerCase()]=p),l.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Yi];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const o={startTimestamp:Ft()*1e3,xhr:n};return Yn("xhr",o),t.apply(n,r)}})}function Nz(e){if(ti(e))return e;try{return e.toString()}catch{}}function K1(e){return new URLSearchParams(e).toString()}function Y1(e,t=Y){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[K1(e)];if(!e)return[void 0]}catch(n){return Ta&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ta&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function X1(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const mm=[],zd=new Map,Dz=60;function Lz(){if(Zl()&&wn()){const t=Fz();return()=>{t()}}return()=>{}}const OE={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 Fz(){return $1(jz)}const jz=({metric:e})=>{if(e.value==null)return;const t=ft(e.value);if(t>Dz)return;const n=e.entries.find(h=>h.duration===e.value&&OE[h.name]);if(!n)return;const{interactionId:r}=n,i=OE[n.name],o=ft(wn()+n.startTime),s=on(),a=s?Vt(s):void 0,l=(r!=null?zd.get(r):void 0)||a,c=l?Re(l).description:Fe().getScopeData().transactionName,d=tr(n.target),f={[It]:"auto.http.browser.inp",[hi]:`ui.interaction.${i}`,[Ha]:n.duration},p=Fb({name:d,transaction:c,attributes:f,startTime:o});p&&(p.addEvent("inp",{[Vl]:"millisecond",[Gl]:e.value}),p.end(o+t))};function Uz(){const e=({entries:t})=>{const n=on(),r=n&&Vt(n);t.forEach(i=>
vendor: 5,954 bytes, line 95
95{if(!J5(i)||!r)return;const o=i.interactionId;if(o!=null&&!zd.has(o)){if(mm.length>10){const s=mm.shift();zd.delete(s)}mm.push(o),zd.set(o,r)}})};ss("event",e),ss("first-input",e)}function $z(e,t=G1("fetch")){let n=0,r=0;async function i(o){const s=o.body.length;n+=s,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const u=await t(e.url,a);return{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}}catch(u){throw Oz("fetch"),u}finally{n-=s,r--}}return hB(e,i)}const Bz=30,zz=50;function Jv(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?ns:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const Hz=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Wz=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qz=/\((\S*)(?::(\d+))(?::(\d+))\)/,Vz=/at (.+?) ?\(data:(.+?),/,Gz=e=>{const t=e.match(Vz);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Hz.exec(e);if(n){const[,i,o,s]=n;return Jv(i,ns,+o,+s)}const r=Wz.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=qz.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[o,s]=Q1(r[1]||ns,r[2]);return Jv(s,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Kz=[Bz,Gz],Yz=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Xz=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Qz=e=>{const t=Yz.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=Xz.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||ns;return[i,r]=Q1(i,r),Jv(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Jz=[zz,Qz],Zz=[Kz,Jz],eH=Ck(...Zz),Q1=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ns,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Mn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qc=1024,tH="Breadcrumbs",nH=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:tH,setup(n){t.console&&$B(sH(n)),t.dom&&V1(oH(n,t.dom)),t.xhr&&jb(aH(n)),t.fetch&&Cb(uH(n)),t.history&&Hp(lH(n)),t.sentry&&n.on("beforeSendEvent",iH(n))}}},rH=nH;function iH(e){return function(n){he()===e&&go({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Lo(n)},{event:n})}}function oH(e,t){return function(r){if(he()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>qc&&(Mn&&Y.warn(`\`dom.maxStringLength\` cannot exceed ${qc}, but a value of ${a} was configured. Sentry will use ${qc} instead.`),a=qc),typeof s=="string"&&(s=[s]);try{const l=r.event,c=cH(l)?l.target:l;i=tr(c,{keyAttrs:s,maxStringLength:a}),o=Mk(c)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),go(u,{event:r.event,name:r.name,global:r.global})}}function sH(e){return function(n){if(he()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:T1(n.level),message:H_(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${H_(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;go(r,{input:n.args,level:n.level})}}function aH(e){return function(n){if(he()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[Yi];if(!r||!i||!o)return;const{method:s,url:a,status_code:u,body:l}=o,c={method:s,url:a,status_code:u},d={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:i},f={category:"xhr",data:c,type:"http",level:I1(u)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),go(f,d)}}function uH(e){return function(n){if(he()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),go(a,s)}else{const o=n.response,s={...n.fetchData,status_code:o==null?void 0:o.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o==null||o.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:s,type:"http",level:I1(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",u,a),go(u,a)}}}function lH(e){return function(n){if(he()!==e)return;let r=n.from,i=n.to;const o=Ko(Pe.location.href);let s=r?Ko(r):void 0;const a=Ko(i);s!=null&&s.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),go({category:"navigation",data:{from:r,to:i}})}}function cH(e){return!!e&&!!e.target}const dH=["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"],fH="BrowserApiErrors",pH=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:fH,setupOnce(){t.setTimeout&&gn(Pe,"setTimeout",ME),t.setInterval&&gn(Pe,"setInterval",ME),t.requestAnimationFrame&&gn(Pe,"requestAnimationFrame",mH),t.XMLHttpRequest&&"XMLHttpRequest"in Pe&&gn(XMLHttpRequest.prototype,"send",gH);const n=t.eventTarget;
95n&&(Array.isArray(n)?n:dH).forEach(i=>vH(i,t))}}},hH=pH;function ME(e){return function(...t){const n=t[0];return t[0]=Ea(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${di(e)}`}}),e.apply(this,t)}}function mH(e){return function(t){return e.apply(this,[Ea(t,{mechanism:{data:{handler:di(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function gH(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&gn(n,i,function(o){const s={mechanism:{data:{handler:di(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=pb(o);return a&&(s.mechanism.data.handler=di(a)),Ea(o,s)})}),e.apply(this,t)}}function vH(e,t){var i,o;const r=(i=Pe[e])==null?void 0:i.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&(gn(r,"addEventListener",function(s){return function(a,u,l){try{yH(u)&&(u.handleEvent=Ea(u.handleEvent,{mechanism:{data:{handler:di(u),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&bH(this,a,u),s.apply(this,[a,Ea(u,{mechanism:{data:{handler:di(u),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),l])}}),gn(r,"removeEventListener",function(s){return function(a,u,l){try{const c=u.__sentry_wrapped__;c&&s.call(this,a,c,l)}catch{}return s.call(this,a,u,l)}}))}function yH(e){return typeof e.handleEvent=="function"}function bH(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const wH=()=>({name:"BrowserSession",setupOnce(){if(typeof Pe.document>"u"){Mn&&Y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}dE({ignoreDuration:!0}),fE(),Hp(({from:e,to:t})=>{e!==void 0&&e!==t&&(dE({ignoreDuration:!0}),fE())})}}),SH="GlobalHandlers",_H=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:SH,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(TH(n),NE("onerror")),t.onunhandledrejection&&(xH(n),NE("onunhandledrejection"))}}},EH=_H;function TH(e){Ik(t=>{const{stackParser:n,attachStacktrace:r}=J1();if(he()!==e||P1())return;const{msg:i,url:o,line:s,column:a,error:u}=t,l=RH(Pb(n,u||i,void 0,r,!1),o,s,a);l.level="error",$p(l,{originalException:u,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function xH(e){Rk(t=>{const{stackParser:n,attachStacktrace:r}=J1();if(he()!==e||P1())return;const i=CH(t),o=gl(i)?IH(i):Pb(n,i,void 0,r,!0);o.level="error",$p(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function CH(e){if(gl(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 IH(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function RH(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},u=a.frames=a.frames||[],l=r,c=n,d=kH(t)??Ba();return u.length===0&&u.push({colno:l,filename:d,function:ns,in_app:!0,lineno:c}),e}function NE(e){Mn&&Y.log(`Global Handler attached: ${e}`)}function J1(){const e=he();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function kH(e){if(!(!ti(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return`<data:${n}${r?",base64":""}>`}return e.slice(0,1024)}}const PH=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!Pe.navigator&&!Pe.location&&!Pe.document)return;const t=Ib(),n={...t.headers,...(r=e.request)==null?void 0:r.headers};e.request={...t,...e.request,headers:n}}}),AH="cause",OH=5,MH="LinkedErrors",NH=(e={})=>{const t=e.limit||OH,n=e.key||AH;return{name:MH,preprocessEvent(r,i,o){const s=o.getOptions();UB(Rb,s.stackParser,n,t,r,i)}}},DH=NH;function LH(){return FH()?(Mn&&gs(()=>{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 FH(){var o;if(typeof Pe.window>"u")return!1;const e=Pe;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((o=t==null?void 0:t.runtime)!=null&&o.id))return!1;const n=Ba(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Pe===Pe.top&&r.some(s=>n.startsWith(`${s}://`)))}function jH(e){return[AB(),IB(),hH(),rH(),EH(),DH(),WB(),PH(),wH()]}function UH(e={}){const t=!e.skipBrowserExtensionCheck&&LH(),n={...e,enabled:t?!1:e.enabled,stackParser:WU(e.stackParser||eH),integrations:X4({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?jH():e.defaultIntegrations}),transport:e.transport||$z};return aB(T5,n)}const $H="HttpClient",BH=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:$H,setup(n){XH(n,t),QH(n,t)}}},zH=BH;function HH(e,t,n,r,i){if(eP(e,n.status,n.url)){const o=JH(t,r);let s,a,u,l;nP()&&([s,u]=DE("Cookie",o),[a,l]=DE("Set-Cookie",n));const c=tP({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:u,responseCookies:l,error:i,type:"fetch"});$p(c)}}function DE(e,t){const n=VH(t.headers);let r;try{const i=n[e]||n[e.toLowerCase()]||void 0;i&&(r=Z1(i))}catch{}return[n,r]}function WH(e,t,n,r,i){if(eP(e,t.status,t.responseURL)){let o,s,a;if(nP()){try{const l=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;l&&(s=Z1(l))}catch{}try{a=GH(t)}catch{}o=r}const u=tP({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i,type:"xhr"});$p(u)}}function qH(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Z1(e){return e.split("; ").reduce((t,n)=>{const[r,i]=n.split("=");return r&&i&&(t[r]=i),t},{})}function VH(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function GH(e){const t=e.getAllResponseHeaders();return t?t.split(`\r 96`).reduce((n,r)=>{const[i,o]=r.split(": ");return i&&o&&(n[i]=o),n},{}):{}}function KH(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function YH(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function XH(e,t){R1()&&Cb(n=>{if(he()!==e)return;const{response:r,args:i,error:o,virtualError:s}=n,[a,u]=i;r&&HH(t,a,r,u,o||s)},!1)}function QH(e,t){"XMLHttpRequest"in ke&&jb(n=>{if(he()!==e)return;const{error:r,virtualError:i}=n,o=n.xhr,s=o[Yi];if(!s)return;const{method:a,request_headers:u}=s;try{WH(t,o,a,u,r||i)}catch(l){Mn&&Y.warn("Error while extracting response event form XHR response",l)}})}function eP(e,t,n){return YH(e.failedRequestStatusCodes,t)&&KH(e.failedRequestTargets,n)&&!S1(n,he())}function tP(e){const t=he(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:qH(e.responseHeaders)}}};return rs(o,{type:`auto.http.client.${e.type}`,handled:!1}),o}function JH(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request
96(e,t)}function nP(){const e=he();return e?!!e.getOptions().sendDefaultPii:!1}const Ve=ke,Ub="sentryReplaySession",ZH="replay_event",$b="Unable to send Replay",eW=3e5,tW=9e5,nW=5e3,rW=5500,iW=6e4,oW=5e3,sW=3,LE=15e4,Vc=5e3,aW=3e3,uW=300,Bb=2e7,lW=4999,cW=15e3,FE=36e5;var dW=Object.defineProperty,fW=(e,t,n)=>t in e?dW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jE=(e,t,n)=>fW(e,typeof t!="symbol"?t+"":t,n),vt=(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))(vt||{});function pW(e){return e.nodeType===e.ELEMENT_NODE}function ju(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Uu(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function hW(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 mW(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Wf(e){try{const t=e.rules||e.cssRules;return t?hW(Array.from(t,rP).join("")):null}catch{return null}}function gW(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function rP(e){let t;if(yW(e))try{t=Wf(e.styleSheet)||mW(e)}catch{}else if(bW(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=gW(e)),r&&(n=vW(n)),r||i)return n}return t||e.cssText}function vW(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function yW(e){return"styleSheet"in e}function bW(e){return"selectorText"in e}class iP{constructor(){jE(this,"idNodeMap",new Map),jE(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.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){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wW(){return new iP}function Wp({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function bl({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function xa(e){return e.toLowerCase()}function Zv(e){return e.toUpperCase()}const UE="__rrweb_original__";function SW(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const o=t.getImageData,s=UE in o?o[UE]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function zb(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?xa(t):null}function qf(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function oP(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=n.pathname.match(r);return(i==null?void 0:i[1])??null}const $E={};function sP(e){const t=$E[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return $E[e]=r.bind(window)}function ey(...e){return sP("setTimeout")(...e)}
96function aP(...e){return sP("clearTimeout")(...e)}function uP(e){try{return e.contentDocument}catch{}}let _W=1;const EW=new RegExp("[^a-z0-9-_:]"),wl=-2;function Hb(){return _W++}function TW(e){if(e instanceof HTMLFormElement)return"form";const t=xa(e.tagName);return EW.test(t)?"div":t}function xW(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let xs,BE;const CW=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,IW=/^(?:[a-z+]+:)?\/\//i,RW=/^www\..*/i,kW=/^(data:)([^,]*),(.*)/i;function Vf(e,t){return(e||"").replace(CW,(n,r,i,o,s,a)=>{const u=i||s||a,l=r||o||"";if(!u)return n;if(IW.test(u)||RW.test(u))return`url(${l}${u}${l})`;if(kW.test(u))return`url(${l}${u}${l})`;if(u[0]==="/")return`url(${l}${xW(t)+u}${l})`;const c=t.split("/"),d=u.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${l}${c.join("/")}${l})`})}const PW=/^[^ \t\n\r\u000c]+/,AW=/^[, \t\n\r\u000c]+/;function OW(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s;const a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}const i=[];for(;r(AW),!(n>=t.length);){let o=r(PW);if(o.slice(-1)===",")o=Xs(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=Xs(e,o);let a=!1;for(;;){const u=t.charAt(n);if(u===""){i.push((o+s).trim());break}else if(a)u===")"&&(a=!1);else if(u===","){n+=1,i.push((o+s).trim());break}else u==="("&&(a=!0);s+=u,n+=1}}}return i.join(", ")}const zE=new WeakMap;function Xs(e,t){return!t||t.trim()===""?t:qp(e,t)}function MW(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function qp(e,t){let n=zE.get(e);if(n||(n=e.createElement("a"),zE.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function lP(e,t,n,r,i,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Xs(e,r):n==="srcset"?OW(e,r):n==="style"?Vf(r,qp(e)):t==="object"&&n==="data"?Xs(e,r):typeof o=="function"?o(n,r,i):r)}function cP(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function NW(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function DW(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Bo(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Bo(e.parentNode,t,n,r+1)}function Qs(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(DW(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ca(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const l=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(l))return!0}let a=-1,u=-1;if(o){if(u=Bo(s,Qs(r,i)),u<0)return!0;a=Bo(s,Qs(t,n),u>=0?u:1/0)}else{if(a=Bo(s,Qs(t,n)),a<0)return!1;u=Bo(s,Qs(r,i),a>=0?a:1/0)}return a>=0?u>=0?a<=u:!0:u>=0?!1:!!o}catch{}return!!o}function LW(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=ey(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{aP(a),i=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return ey(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function FW(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const o=ey(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{aP(o),r=!0,t()})}function jW(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:u,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:S,newlyAddedElement:x=!1}=t,T=UW(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:vt.Document,childNodes:[],compatMode:e.compatMode}:{type:vt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:vt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:T};case e.ELEMENT_NODE:return BW(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:p,maskAttributeFn:u,maskInputOptions:h,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:S,newlyAddedElement:x,rootId:T,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return $W(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:h,maskInputFn:y,rootId:T});case e.CDATA_SECTION_NODE:return{type:vt.CDATA,textContent:"",rootId:T};case e.COMMENT_NODE:return{type:vt.Comment,textContent:e.textContent||"",rootId:T};default:return!1}}function UW(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function $W(e,t){var g;const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:u,maskInputFn:l,rootId:c}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const p=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||(g=e.parentNode.sheet)!=null&&g.cssRules&&(f=Wf(e.parentNode.sheet))}catch(v){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${v}`,e)}f=Vf(f,qp(t.doc))}h&&(f="SCRIPT_PLACEHOLDER");const y=Ca(e,r,o,i,s,n);if(!p&&!h&&!m&&f&&y&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(u.textarea||y)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const v=Wp({type:null,tagName:d,maskInputOptions:u});f=bl({isMasked:Ca(e,r,o,i,s,v),element:e,value:f,maskInputFn:l})}return{type:vt.Text,textContent:f||"",isStyle:p,rootId:c}}function BW(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:u,maskInputFn:l,dataURLOptions:c={}
96,inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:y,unmaskTextClass:g,maskTextSelector:v,unmaskTextSelector:b}=t,S=NW(e,r,i,o),x=TW(e);let T={};const _=e.attributes.length;for(let I=0;I<_;I++){const O=e.attributes[I];O.name&&!cP(x,O.name,O.value)&&(T[O.name]=lP(n,x,xa(O.name),O.value,e,u))}if(x==="link"&&s){const I=Array.from(n.styleSheets).find(D=>D.href===e.href);let O=null;I&&(O=Wf(I)),O&&(T.rel=null,T.href=null,T.crossorigin=null,T._cssText=Vf(O,I.href))}if(x==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const I=Wf(e.sheet);I&&(T._cssText=Vf(I,qp(n)))}if(x==="input"||x==="textarea"||x==="select"||x==="option"){const I=e,O=zb(I),D=qf(I,Zv(x),O),L=I.checked;if(O!=="submit"&&O!=="button"&&D){const F=Ca(I,y,v,g,b,Wp({type:O,tagName:Zv(x),maskInputOptions:a}));T.value=bl({isMasked:F,element:I,value:D,maskInputFn:l})}L&&(T.checked=L)}if(x==="option"&&(e.selected&&!a.select?T.selected=!0:delete T.selected),x==="canvas"&&f){if(e.__context==="2d")SW(e)||(T.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const I=e.toDataURL(c.type,c.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height;const D=O.toDataURL(c.type,c.quality);I!==D&&(T.rr_dataURL=I)}}if(x==="img"&&d){xs||(xs=n.createElement("canvas"),BE=xs.getContext("2d"));const I=e,O=I.currentSrc||I.getAttribute("src")||"<unknown-src>",D=I.crossOrigin,L=()=>{I.removeEventListener("load",L);try{xs.width=I.naturalWidth,xs.height=I.naturalHeight,BE.drawImage(I,0,0),T.rr_dataURL=xs.toDataURL(c.type,c.quality)}catch(F){if(I.crossOrigin!=="anonymous"){I.crossOrigin="anonymous",I.complete&&I.naturalWidth!==0?L():I.addEventListener("load",L);return}else console.warn(`Cannot inline img src=${O}! Error: ${F}`)}I.crossOrigin==="anonymous"&&(D?T.crossOrigin=D:I.removeAttribute("crossorigin"))};I.complete&&I.naturalWidth!==0?L():I.addEventListener("load",L)}if((x==="audio"||x==="video")&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),S){const{width:I,height:O}=e.getBoundingClientRect();T={class:T.class,rr_width:`${I}px`,rr_height:`${O}px`}}x==="iframe"&&!p(T.src)&&(!S&&!uP(e)&&(T.rr_src=T.src),delete T.src);let C;try{customElements.get(x)&&(C=!0)}catch{}return{type:vt.Element,tagName:x,attributes:T,childNodes:[],isSVG:MW(e)||void 0,needBlock:S,rootId:m,isCustom:C}}function We(e){return e==null?"":e.toLowerCase()}function zW(e,t){if(t.comment&&e.type===vt.Comment)return!0;if(e.type===vt.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"&&oP(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(We(e.attributes.name).match(/^msapplication-tile(image|color)$/)||We(e.attributes.name)==="application-name"||We(e.attributes.rel)==="icon"||We(e.attributes.rel)==="apple-touch-icon"||We(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&We(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(We(e.attributes.property).match(/^(og|twitter|fb):/)||We(e.attributes.name).match(/^(og|twitter):/)||We(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(We(e.attributes.name)==="robots"||We(e.attributes.name)==="googlebot"||We(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(We(e.attributes.name)==="author"||We(e.attributes.name)==="generator"||We(e.attributes.name)==="framework"||We(e.attributes.name)==="publisher"||We(e.attributes.name)==="progid"||We(e.attributes.property).match(/^article:/)||We(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(We(e.attributes.name)==="google-site-verification"||We(e.attributes.name)==="yandex-verification"||We(e.attributes.name)==="csrf-token"||We(e.attributes.name)==="p:domain_verify"||We(e.attributes.name)==="verify-v1"||We(e.attributes.name)==="verification"||We(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Js(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:S=!1,recordCanvas:x=!1,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C=5e3,onBlockedImageLoad:I,onStylesheetLoad:O,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:L=()=>!1,newlyAddedElement:F=!1}=t;let{preserveWhiteSpace:M=!0}=t;const R=jW(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:u,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:S,recordCanvas:x,keepIframeSrcFn:L,newlyAddedElement:F});if(!R)return console.warn(e,"not serialized"),null;let N;r.hasNode(e)?N=r.getId(e):zW(R,v)||!M&&R.type===vt.Text&&!R.isStyle&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?N=wl:N=Hb();const A=Object.assign(R,{id:N});if(r.add(e,A),N===wl)return null;T&&T(e);let P=!f;if(A.type===vt.Element){P=P&&!A.needBlock;const k=e.shadowRoot;k&&Uu(k)&&(A.isShadowHost=!0)}if((A.type===vt.Document||A.type===vt.Element)&&P){v.headWhitespace&&A.type===vt.Element&&A.tagName==="head"&&(M=!1);const k={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:u,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:x,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C,onBlockedImageLoad:I,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:L},$=e.childNodes?Array.from(e.childNodes):[];for(const z of $){const H=Js(z,k);H&&A.childNodes.push(H)}if(pW(e)&&e.shadowRoot)for(const z of Array.from(e.shadowRoot.childNodes)){const H=Js(z,k);H&&(Uu(e.shadowRoot)&&(H.isShadow=!0),A.childNodes.push(H))}}if(e.parentNode&&ju(e.parentNode)&&Uu(e.parentNode)&&(A.isShadow=!0),A.type===vt.Element&&A.tagName==="iframe"&&!A.needBlock&&LW(e,()=>{const k=uP(e);if(k&&_){const $=Js(k,{doc:k,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:x,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:L});$&&_(e,$)}},C),A.type===vt.Element&&A.tagName==="img"&&!e.complete&&A.needBlock){const k=e,$=()=>{if(k.isConnected&&!k.complete&&I)try{const z=k.getBoundingClientRect();z.width>0&&z.height>0&&I(k,A,z)}catch{}k.removeEventListener("load",$)};k.isConnected&&k.addEventListener("load",$)}return A.type===vt.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&oP(A.attributes.href)==="css")&&FW(e,()=>{if(O){const k=Js(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:S,recordCanvas:x,preserveWhiteSpace:M,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:L});k&&O(e,k)}},D),A.type===vt.Element&&delete A.needBlock,A}function HW(e,t){const{mirror:n=new iP,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:u=null,maskTextSelector:l=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inl
96ineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:S,onSerialize:x,onIframeLoad:T,iframeLoadTimeout:_,onBlockedImageLoad:C,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:D=()=>!1}=t||{};return Js(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:c,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:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:b,inlineImages:f,recordCanvas:p,preserveWhiteSpace:S,onSerialize:x,onIframeLoad:T,iframeLoadTimeout:_,onBlockedImageLoad:C,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:D,newlyAddedElement:!1})}function Zt(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Ns=`Please stop import mirror directly. Instead of that,\r 97now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 98or you can use record.mirror to access the mirror instance during recording.`;let HE={map:{},getId(){return console.error(Ns),-1},getNode(){return console.error(Ns),null},removeNodeFromMap(){console.error(Ns)},has(){return console.error(Ns),!1},reset(){console.error(Ns)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(HE=new Proxy(HE,{get(e,t,n){return t==="map"&&console.error(Ns),Reflect.get(e,t,n)}}));function Sl(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();!i&&n.leading===!1&&(i=s);const a=t-(s-i),u=this;a<=0||a>t?(r&&(XW(r),r=null),i=s,e.apply(u,o)):!r&&n.trailing!==!1&&(r=Vp(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(u,o)},a))}}function dP(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){Vp(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>dP(e,t,o||{},!0)}function Wb(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let Gf=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gf=()=>new Date().getTime());function fP(e){var n,r,i,o,s,a;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((i=t==null?void 0:t.body)==null?void 0:i.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((s=(o=t==null?void 0:t.body)==null?void 0:o.parentElement)==null?void 0:s.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function pP(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function hP(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function mP(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Tn(e,t,n,r,i){if(!e)return!1;const o=mP(e);if(!o)return!1;const s=Qs(t,n);if(!i){const l=r&&o.matches(r);return s(o)&&!l}const a=Bo(o,s);let u=-1;return a<0?!1:(r&&(u=Bo(o,Qs(null,r))),a>-1&&u<0?!0:a<u)}function WW(e,t){return t.getId(e)!==-1}function gm(e,t){return t.getId(e)===wl}function gP(e,t){if(ju(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?gP(e.parentNode,t):!0:!0}function ty(e){return!!e.changedTouches}function qW(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 n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function vP(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function yP(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ny(e){return!!(e!=null&&e.shadowRoot)}class VW{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,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}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 bP(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.no
98deType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function GW(e){let t=e,n;for(;n=bP(t);)t=n;return t}function KW(e){const t=e.ownerDocument;if(!t)return!1;const n=GW(e);return t.contains(n)}function wP(e){const t=e.ownerDocument;return t?t.contains(e)||KW(e):!1}const WE={};function qb(e){const t=WE[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return WE[e]=r.bind(window)}function YW(...e){return qb("requestAnimationFrame")(...e)}function Vp(...e){return qb("setTimeout")(...e)}function XW(...e){return qb("clearTimeout")(...e)}var me=(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))(me||{}),ce=(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))(ce||{}),Xt=(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))(Xt||{}),Yr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Yr||{}),Ds=(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))(Ds||{});function Vb(e){try{return e.contentDocument}catch{}}function QW(e){try{return e.contentWindow}catch{}}function qE(e){return"__ln"in e}class JW{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 n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&qE(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&qE(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const VE=(e,t)=>`${e}@${t}`;class ZW{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;const t=[],n=new Set,r=new JW,i=u=>{let l=u,c=wl;for(;c===wl;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},o=u=>{if(!u.parentNode||!wP(u))return;const l=ju(u.parentNode)?this.mirror.getId(bP(u)):this.mirror.getId(u.parentNode),c=i(u);if(l===-1||c===-1)return r.addNode(u);const d=Js(u,{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.inl
98ineStylesheet,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:f=>{vP(f,this.mirror)&&!Tn(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),yP(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ny(u)&&this.shadowDomManager.addShadowRoot(u.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Tn(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})}});d&&(t.push({parentId:l,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)GE(this.removes,u,this.mirror)&&!this.movedSet.has(u.parentNode)||o(u);for(const u of this.addedSet)!KE(this.droppedSet,u)&&!GE(this.removes,u,this.mirror)||KE(this.movedSet,u)?o(u):this.droppedSet.add(u);let s=null;for(;r.length;){let u=null;if(s){const l=this.mirror.getId(s.value.parentNode),c=i(s.value);l!==-1&&c!==-1&&(u=s)}if(!u){let l=r.tail;for(;l;){const c=l;if(l=l.previous,c){const d=this.mirror.getId(c.value.parentNode);if(i(c.value)===-1)continue;if(d!==-1){u=c;break}else{const p=c.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){u=c;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}s=u.previous,r.removeNode(u.value),o(u.value)}const a={texts:this.texts.map(u=>({id:this.mirror.getId(u.node),value:u.value})).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:l}=u;if(typeof l.style=="string"){const c=JSON.stringify(u.styleDiff),d=JSON.stringify(u._unchangedStyles);c.length<l.style.length&&(c+d).split("var(").length===l.style.split("var(").length&&(l.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:l}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.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(!gm(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Tn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Ca(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,mP(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const s=zb(n),a=n.tagName;i=qf(n,a,s);const u=Wp({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),l=Ca(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,u);i=bl({isMasked:l,element:n,value:i,maskInputFn:this.maskInputFn})}if(Tn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!Vb(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!cP(n.tagName,r)&&(o.attributes[r]=lP(this.doc,xa(n.tagName),xa(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const u=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);u!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a)?l===""?o.styleDiff[a]=u:o.styleDiff[a]=[u,l]:o._unchangedStyles[a]=[u,l]}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}
98case"childList":{if(Tn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=ju(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Tn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||gm(n,this.mirror)||!WW(n,this.mirror)||(this.addedSet.has(n)?(ry(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||gP(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[VE(r,i)]?ry(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:ju(t.target)&&Uu(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(gm(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[VE(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Tn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),ny(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,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"].forEach(n=>{this[n]=t[n]})}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 ry(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(r=>ry(e,r))}function GE(e,t,n){return e.length===0?!1:eq(e,t,n)}function eq(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function KE(e,t){return e.size===0?!1:SP(e,t)}function SP(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:SP(e,n):!1}let $u;function tq(e){$u=e}function nq(){$u=void 0}const Te=e=>$u?(...n)=>{try{return e(...n)}catch(r){if($u&&$u(r)===!0)return()=>{};throw r}}:e,Zs=[];function tc(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function _P(e,t){var s,a;const n=new ZW;Zs.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=(a=(s=window==null?void 0:window.Zone)==null?void 0:s.__symbol__)==null?void 0:a.call(s,"MutationObserver");i&&window[i]&&(r=window[i]);const o=new r(Te(u=>{e.onMutation&&e.onMutation(u)===!1||n.processMutations.bind(n)(u)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function rq({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const u=Sl(Te(d=>{const f=Date.now()-a;e(s.map(p=>(p.timeOffset-=f,p)),d),s=[],a=null}),o),l=Te(Sl(Te(d=>{const f=tc(d),{clientX:p,clientY:h}=ty(d)?d.changedTouches[0]:d;a||(a=Gf()),s.push({x:p,y:h,id:r.getId(f),timeOffset:Gf()-a}),u(typeof DragEvent<"u"&&d instanceof DragEvent?ce.Drag:d instanceof MouseEvent?ce.MouseMove:ce.TouchMove)}),i,{trailing:!1})),c=[Zt("mousemove",l,n),Zt("touchmove",l,n),Zt("drag",l,n)];return Te(()=>{c.forEach(d=>d())})}function iq({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,u=[];let l=null;const c=d=>f=>{const p=tc(f);if(Tn(p,r,i,o,!0))return;let h=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":h=Yr.Mouse;break;case"touch":h=Yr.Touch;break;case"pen":h=Yr.Pen;break}h===Yr.Touch?Xt[d]===Xt.MouseDown?m="TouchStart":Xt[d]===Xt.MouseUp&&(m="TouchEnd"):Yr.Pen}else ty(f)&&(h=Yr.Touch);h!==null?(l=h,(m.startsWith("Touch")&&h===Yr.Touch||m.startsWith("Mouse")&&h===Yr.Mouse)&&(h=null)):Xt[d]===Xt.Click&&(h=l,l=null);const y=ty(f)?f.changedTouches[0]:f;if(!y)return;const g=n.getId(p),{clientX:v,clientY:b}=y;Te(e)({type:Xt[m],id:g,x:v,y:b,...h!==null&&{pointerType:h}})};return Object.keys(Xt).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEac
98h(d=>{let f=xa(d);const p=c(d);if(window.PointerEvent)switch(Xt[d]){case Xt.MouseDown:case Xt.MouseUp:f=f.replace("mouse","pointer");break;case Xt.TouchStart:case Xt.TouchEnd:return}u.push(Zt(f,p,t))}),Te(()=>{u.forEach(d=>d())})}function EP({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){const a=Te(Sl(Te(u=>{const l=tc(u);if(!l||Tn(l,r,i,o,!0))return;const c=n.getId(l);if(l===t&&t.defaultView){const d=fP(t.defaultView);e({id:c,x:d.left,y:d.top})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})}),s.scroll||100));return Zt("scroll",a,t)}function oq({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=Te(Sl(Te(()=>{const o=pP(),s=hP();(n!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Zt("resize",i,t)}const sq=["INPUT","TEXTAREA","SELECT"],YE=new WeakMap;function aq({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function y(_){let C=tc(_);const I=_.isTrusted,O=C&&Zv(C.tagName);if(O==="OPTION"&&(C=C.parentElement),!C||!O||sq.indexOf(O)<0||Tn(C,r,i,o,!0))return;const D=C;if(D.classList.contains(s)||a&&D.matches(a))return;const L=zb(C);let F=qf(D,O,L),M=!1;const R=Wp({maskInputOptions:u,tagName:O,type:L}),N=Ca(C,f,h,p,m,R);(L==="radio"||L==="checkbox")&&(M=C.checked),F=bl({isMasked:N,element:C,value:F,maskInputFn:l}),g(C,d?{text:F,isChecked:M,userTriggered:I}:{text:F,isChecked:M});const A=C.name;L==="radio"&&A&&M&&t.querySelectorAll(`input[type="radio"][name="${A}"]`).forEach(P=>{if(P!==C){const k=bl({isMasked:N,element:P,value:qf(P,O,L),maskInputFn:l});g(P,d?{text:k,isChecked:!M,userTriggered:!1}:{text:k,isChecked:!M})}})}function g(_,C){const I=YE.get(_);if(!I||I.text!==C.text||I.isChecked!==C.isChecked){YE.set(_,C);const O=n.getId(_);Te(e)({...C,id:O})}}const b=(c.input==="last"?["change"]:["input","change"]).map(_=>Zt(_,Te(y),t)),S=t.defaultView;if(!S)return()=>{b.forEach(_=>_())};const x=S.Object.getOwnPropertyDescriptor(S.HTMLInputElement.prototype,"value"),T=[[S.HTMLInputElement.prototype,"value"],[S.HTMLInputElement.prototype,"checked"],[S.HTMLSelectElement.prototype,"value"],[S.HTMLTextAreaElement.prototype,"value"],[S.HTMLSelectElement.prototype,"selectedIndex"],[S.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&b.push(...T.map(_=>dP(_[0],_[1],{set(){Te(y)({target:this,isTrusted:!1})}},!1,S))),Te(()=>{b.forEach(_=>_())})}function Kf(e){const t=[];function n(r,i){if(Gc("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Gc("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Gc("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Gc("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return n(e,t)}function Ui(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function uq({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Te((c,d,f)=>{const[p,h]=f,{id:m,styleId:y}=Ui(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:p,index:h}]}),c.apply(d,f)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Te((c,d,f)=>{const[p]=f,{id:h,styleId:m}=Ui(d,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),c.apply(d,f)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Te((c,d,f)=>{const[p]=f,{id:h,styleId:m}=Ui(d,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Te((c,d,f)=>{const[p]=f,{id:h,styleId:m}=Ui(d,t,n.styleMirror);
vendor: 4,781 bytes, line 98
98return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),c.apply(d,f)})}));const u={};Kc("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(Kc("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),Kc("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),Kc("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(u).forEach(([c,d])=>{l[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(l[c].insertRule,{apply:Te((f,p,h)=>{const[m,y]=h,{id:g,styleId:v}=Ui(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,adds:[{rule:m,index:[...Kf(p),y||0]}]}),f.apply(p,h)})}),d.prototype.deleteRule=new Proxy(l[c].deleteRule,{apply:Te((f,p,h)=>{const[m]=h,{id:y,styleId:g}=Ui(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||g&&g!==-1)&&e({id:y,styleId:g,removes:[{index:[...Kf(p),m]}]}),f.apply(p,h)})})}),Te(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(u).forEach(([c,d])=>{d.prototype.insertRule=l[c].insertRule,d.prototype.deleteRule=l[c].deleteRule})})}function TP({mirror:e,stylesheetManager:t},n){var s,a,u;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?(s=n.defaultView)==null?void 0:s.Document:(u=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:u.ShadowRoot,o=i!=null&&i.prototype?Object.getOwnPropertyDescriptor(i==null?void 0:i.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var l;return(l=o.get)==null?void 0:l.call(this)},set(l){var d;const c=(d=o.set)==null?void 0:d.call(this,l);if(r!==null&&r!==-1)try{t.adoptStyleSheets(l,r)}catch{}return c}}),Te(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function lq({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Te((a,u,l)=>{var m;const[c,d,f]=l;if(n.has(c))return o.apply(u,[c,d,f]);const{id:p,styleId:h}=Ui((m=u.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:c,value:d,priority:f},index:Kf(u.parentRule)}),a.apply(u,l)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Te((a,u,l)=>{var p;const[c]=l;if(n.has(c))return s.apply(u,[c]);const{id:d,styleId:f}=Ui((p=u.parentRule)==null?void 0:p.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:Kf(u.parentRule)}),a.apply(u,l)})}),Te(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function cq({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=Te(l=>Sl(Te(c=>{const d=tc(c);if(!d||Tn(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:h,playbackRate:m}=d;e({type:l,id:i.getId(d),currentTime:f,volume:p,muted:h,playbackRate:m})}),o.media||500)),u=[Zt("play",a(Ds.Play),s),Zt("pause",a(Ds.Pause),s),Zt("seeked",a(Ds.Seeked),s),Zt("volumechange",a(Ds.VolumeChange),s),Zt("ratechange",a(Ds.RateChange),s)];return Te(()=>{u.forEach(l=>l())})}function dq({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(u,l,c){const d=new o(u,l,c);return i.set(d,{family:u,buffer:typeof l!="string",descriptors:c,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),d};const s=Wb(t.fonts,"add",function(a){return function(u){return Vp(Te(()=>{const l=i.get(u);l&&(e(l),i.delete(u))}),0),a.apply(this,[u])}});return r.push(()=>{n.FontFace=o}),r.push(s),Te(()=>{r.forEach(a=>a())})}function fq(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const u=Te(()=>{const l=t.getSelection();if(!l||a&&(l!=null&&l.isCollapsed))return;a=l.isCollapsed||!1;const c=[],d=l.rangeCount||0;for(let f=0;f<d;f++){const p=l.getRangeAt(f),{startContainer:h,startOffset:m,endContainer:y,endOffset:g}=p;Tn(h,r,i,o,!0)||Tn(y,r,i,o,!0)||c.push({start:n.getId(h),startOffset:m,end:n.getId(y),endOffset:g})}s({ranges:c})});return u(),Zt("selectionchange",u)}function pq({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Wb(n.customElements,"define",function(i){return function(o,s,a){try{t({define:{name:o}})}catch{}
98return i.apply(this,[o,s,a])}})}function hq(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=_P(e,e.doc));const i=rq(e),o=iq(e),s=EP(e),a=oq(e,{win:n}),u=aq(e),l=cq(e);let c=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(c=uq(e,{win:n}),d=TP(e,e.doc),f=lq(e,{win:n}),e.collectFonts&&(p=dq(e)));const h=fq(e),m=pq(e),y=[];for(const g of e.plugins)y.push(g.observer(g.callback,n,g.options));return Te(()=>{Zs.forEach(g=>g.reset()),r==null||r.disconnect(),i(),o(),s(),a(),u(),l(),c(),d(),f(),p(),h(),m(),y.forEach(g=>g())})}function Gc(e){return typeof window[e]<"u"}function Kc(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class iy{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const o=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=i.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class mq{constructor(){this.crossOriginIframeMirror=new iy(Hb),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class gq{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new iy(Hb),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new iy(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),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var i,o;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(o=this.loadListener)==null||o.call(this,t);const r=Vb(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case me.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:me.IncrementalSnapshot,data:{source:ce.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case me.Meta:case me.Load:case me.DomContentLoaded:return!1;case me.Plugin:return n;case me.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case me.IncrementalSnapshot:switch(n.data.source){case ce.Mutation:return n.data.adds.forEach(i=>
98{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(i.node,o)}),n.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case ce.Drag:case ce.TouchMove:case ce.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case ce.ViewportResize:return!1;case ce.MediaInteraction:case ce.MouseInteraction:case ce.Scroll:case ce.CanvasMutation:case ce.Input:return this.replaceIds(n.data,t,["id"]),n;case ce.StyleSheetRule:case ce.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case ce.Font:return n;case ce.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),n;case ce.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==vt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class vq{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class yq{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,n){if(!Uu(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=_P({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(EP({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Vp(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(TP({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Vb(t),r=QW(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Wb(t.prototype,"attachShadow",function(i){return function(o){const s=i.call(this,o);return this.shadowRoot&&wP(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var XE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bq=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Yc=0;Yc<XE.length;Yc++)bq[XE.charCodeAt(Yc)]=Yc;class QE{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class wq{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new VW,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const o of t){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,u)=>({rule:rP(a),index:u}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Sq{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,YW(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let lt,Yf;var UC;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((UC=e.contentWindow)==null?void 0:UC.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ar=wW();function ii(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskAllText:l=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:S,maxCanvasSize:x=null,packFn:T,sampling:_={},dataURLOptions:C={},mousemoveWait:I,recordDOM:O=!0,recordCanvas:D=!1,recordCrossOriginIframes:L=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:M=!1,collectFonts:R=!1,inl
98ineImages:N=!1,plugins:A,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:k=new Set([]),errorHandler:$,onMutation:z,getCanvasManager:H}=e;tq($);const V=L?window.parent===window:!0;let q=!1;if(!V)try{window.parent.document&&(q=!1)}catch{q=!0}if(V&&!t)throw new Error("emit function is required");if(!V&&!q)return()=>{};I!==void 0&&_.mousemove===void 0&&(_.mousemove=I),ar.reset();const te=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},G=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||{};qW();let J,Me=0;const Oe=de=>{for(const ht of A||[])ht.eventProcessor&&(de=ht.eventProcessor(de));return T&&!q&&(de=T(de)),de};lt=(de,ht)=>{var $e;const pe=de;if(pe.timestamp=Gf(),($e=Zs[0])!=null&&$e.isFrozen()&&pe.type!==me.FullSnapshot&&!(pe.type===me.IncrementalSnapshot&&pe.data.source===ce.Mutation)&&Zs.forEach(Ut=>Ut.unfreeze()),V)t==null||t(Oe(pe),ht);else if(q){const Ut={type:"rrweb",event:Oe(pe),origin:window.location.origin,isCheckout:ht};window.parent.postMessage(Ut,"*")}if(pe.type===me.FullSnapshot)J=pe,Me=0;else if(pe.type===me.IncrementalSnapshot){if(pe.data.source===ce.Mutation&&pe.data.isAttachIframe)return;Me++;const Ut=r&&Me>=r,Ee=n&&J&&pe.timestamp-J.timestamp>n;(Ut||Ee)&&Bn(!0)}};const ze=de=>{lt({type:me.IncrementalSnapshot,data:{source:ce.Mutation,...de}})},Ye=de=>lt({type:me.IncrementalSnapshot,data:{source:ce.Scroll,...de}}),ut=de=>lt({type:me.IncrementalSnapshot,data:{source:ce.CanvasMutation,...de}}),_n=de=>lt({type:me.IncrementalSnapshot,data:{source:ce.AdoptedStyleSheet,...de}}),ne=new wq({mutationCb:ze,adoptedStyleSheetCb:_n}),ln=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new mq:new gq({mirror:ar,mutationCb:ze,stylesheetManager:ne,recordCrossOriginIframes:L,wrappedEmit:lt});for(const de of A||[])de.getMirror&&de.getMirror({nodeMirror:ar,crossOriginIframeMirror:ln.crossOriginIframeMirror,crossOriginIframeStyleMirror:ln.crossOriginIframeStyleMirror});const rr=new Sq,ir=Eq(H,{mirror:ar,win:window,mutationCb:de=>lt({type:me.IncrementalSnapshot,data:{source:ce.CanvasMutation,...de}}),recordCanvas:D,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:x,sampling:_.canvas,dataURLOptions:C,errorHandler:$}),$n=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new vq:new yq({mutationCb:ze,scrollCb:Ye,bypassOptions:{onMutation:z,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:te,dataURLOptions:C,maskAttributeFn:v,maskTextFn:S,maskInputFn:b,recordCanvas:D,inlineImages:N,sampling:_,slimDOMOptions:G,iframeManager:ln,stylesheetManager:ne,canvasManager:ir,keepIframeSrcFn:P,processedNodeManager:rr},mirror:ar}),Bn=(de=!1)=>{if(!O)return;lt({type:me.Meta,data:{href:window.location.href,width:hP(),height:pP()}},de),ne.reset(),$n.init(),Zs.forEach(pe=>pe.lock());const ht=HW(document,{mirror:ar,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:te,maskAttributeFn:v,maskInputFn:b,maskTextFn:S,slimDOM:G,dataURLOptions:C,recordCanvas:D,inlineImages:N,onSerialize:pe=>{vP(pe,ar)&&ln.addIframe(pe),yP(pe,ar)&&ne.trackLinkElement(pe),ny(pe)&&$n.addShadowRoot(pe.shadowRoot,document)},onIframeLoad:(pe,$e)=>{ln.attachIframe(pe,$e),pe.contentWindow&&ir.addWindow(pe.contentWindow),$n.observeAttachShadow(pe)},onStylesheetLoad:(pe,$e)=>{ne.attachLinkElement(pe,$e)},onBlockedImageLoad:(pe,$e,{width:Ut,height:Ee})=>{ze({adds:[],removes:[],texts:[],attributes:[{id:$e.id,attributes:{style:{width:`${Ut}px`,height:`${Ee}px`}}}]})},keepIframeSrcFn:P});if(!ht)return console.warn("Failed to snapshot the document");lt({type:me.FullSnapshot,data:{node:ht,initialOffset:fP(window)}}),Zs.forEach(pe=>pe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ne.adoptStyleSheets(document.adoptedStyleSheets,ar.getId(document))};Yf=Bn;try{const de=[],ht=$e=>{var Ut;return Te(hq)({onMutation:z,mutationCb:ze,mousemoveCb:(Ee,kt)=>lt({type:me.IncrementalSnapshot,data:{source:kt,positions:Ee}}),mouseInteractionCb:Ee=>lt({type:me.IncrementalSnapshot,data:{source:ce.MouseInteraction,...Ee}}),scrollCb:Ye,viewportResizeCb:Ee=>lt({type:me.IncrementalSnapshot,data:{source:ce.ViewportResize,...Ee}}
98),inputCb:Ee=>lt({type:me.IncrementalSnapshot,data:{source:ce.Input,...Ee}}),mediaInteractionCb:Ee=>lt({type:me.IncrementalSnapshot,data:{source:ce.MediaInteraction,...Ee}}),styleSheetRuleCb:Ee=>lt({type:me.IncrementalSnapshot,data:{source:ce.StyleSheetRule,...Ee}}),styleDeclarationCb:Ee=>lt({type:me.IncrementalSnapshot,data:{source:ce.StyleDeclaration,...Ee}}),canvasMutationCb:ut,fontCb:Ee=>lt({type:me.IncrementalSnapshot,data:{source:ce.Font,...Ee}}),selectionCb:Ee=>{lt({type:me.IncrementalSnapshot,data:{source:ce.Selection,...Ee}})},customElementCb:Ee=>{lt({type:me.IncrementalSnapshot,data:{source:ce.CustomElement,...Ee}})},blockClass:i,ignoreClass:a,ignoreSelector:u,maskAllText:l,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:te,inlineStylesheet:h,sampling:_,recordDOM:O,recordCanvas:D,inlineImages:N,userTriggeredOnInput:M,collectFonts:R,doc:$e,maskAttributeFn:v,maskInputFn:b,maskTextFn:S,keepIframeSrcFn:P,blockSelector:o,unblockSelector:s,slimDOMOptions:G,dataURLOptions:C,mirror:ar,iframeManager:ln,stylesheetManager:ne,shadowDomManager:$n,processedNodeManager:rr,canvasManager:ir,ignoreCSSAttributes:k,plugins:((Ut=A==null?void 0:A.filter(Ee=>Ee.observer))==null?void 0:Ut.map(Ee=>({observer:Ee.observer,options:Ee.options,callback:kt=>lt({type:me.Plugin,data:{plugin:Ee.name,payload:kt}})})))||[]},{})};ln.addLoadListener($e=>{try{de.push(ht($e.contentDocument))}catch(Ut){console.warn(Ut)}});const pe=()=>{Bn(),de.push(ht(document))};return document.readyState==="interactive"||document.readyState==="complete"?pe():(de.push(Zt("DOMContentLoaded",()=>{lt({type:me.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&pe()})),de.push(Zt("load",()=>{lt({type:me.Load,data:{}}),F==="load"&&pe()},window))),()=>{de.forEach($e=>$e()),rr.destroy(),Yf=void 0,nq()}}catch(de){console.warn(de)}}function _q(e){if(!Yf)throw new Error("please take full snapshot after start recording");Yf(e)}ii.mirror=ar;ii.takeFullSnapshot=_q;function Eq(e,t){try{return e?e(t):new QE}catch{return console.warn("Unable to initialize CanvasManager"),new QE}}var JE;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(JE||(JE={}));const Tq=3,xq=5;function Gb(e){return e>9999999999?e:e*1e3}function vm(e){return e>9999999999?e/1e3:e}function nc(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:me.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:dr(t,10,1e3)}}),t.category==="console")))}const Cq="button,a";function xP(e){return e.closest(Cq)||e}function CP(e){const t=IP(e);return!t||!(t instanceof Element)?t:xP(t)}function IP(e){return Iq(e)?e.target:e}function Iq(e){return typeof e=="object"&&!!e&&"target"in e}let $i;function Rq(e){return $i||($i=[],kq()),$i.push(e),()=>{const t=$i?$i.indexOf(e):-1;t>-1&&$i.splice(t,1)}}function kq(){gn(Ve,"open",function(e){return function(...t){if($i)try{$i.forEach(n=>n())}catch{}return e.apply(Ve,t)}})}const Pq=new Set([ce.Mutation,ce.StyleSheetRule,ce.StyleDeclaration,ce.AdoptedStyleSheet,ce.CanvasMutation,ce.Selection,ce.MediaInteraction]);function Aq(e,t,n){e.handleClick(t,n)}class Oq{constructor(t,n,r=nc){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=Rq(()=>{this._lastMutation=ZE()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(Nq(n,this._ignoreSelector)||!Dq(t))return;const r={timestamp:vm(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=vm(t)}registerScroll(t=Date.now()){this._lastScroll=vm(t)}registerClick(t){const n=xP(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>
98{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=ZE();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!i,{clickCount:s,clickBreadcrumb:a}=t;if(o){const u=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,l=u<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Ve.location.href,route:n.getCurrentRoute(),timeAfterClickMs:u,endReason:l,clickCount:s||1}};this._addBreadcrumbEvent(n,c);return}if(s>1){const u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Ve.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,u)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ec(()=>this._checkClicks(),1e3)}}const Mq=["A","BUTTON","INPUT"];function Nq(e,t){return!!(!Mq.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 Dq(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function ZE(){return Date.now()/1e3}function Lq(e,t){try{if(!Fq(t))return;const{source:n}=t.data;if(Pq.has(n)&&e.registerMutation(t.timestamp),n===ce.Scroll&&e.registerScroll(t.timestamp),jq(t)){const{type:r,id:i}=t.data,o=ii.mirror.getNode(i);o instanceof HTMLElement&&r===Xt.Click&&e.registerClick(o)}}catch{}}function Fq(e){return e.type===Tq}function jq(e){return e.data.source===ce.MouseInteraction}function Nr(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Kb=(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))(Kb||{});const Uq=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function $q(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Uq.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const Bq=e=>t=>{if(!e.isEnabled())return;const n=zq(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&(i!=null&&i.target)&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&Aq(e.clickDetector,n,CP(t.event)),nc(e,n)};function RP(e,t){const n=ii.mirror.getId(e),r=n&&ii.mirror.getNode(n),i=r&&ii.mirror.getMeta(r),o=i&&Wq(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===Kb.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:$q(o.attributes)}}:{}}}function zq(e){const{target:t,message:n}=Hq(e);return Nr({category:`ui.${e.name}`,...RP(t,n)})}function Hq(e){const t=e.name==="click";let n,r=null;try{r=t?CP(e.event):IP(e.event),n=tr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Wq(e){return e.type===Kb.Element}function qq(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Vq(t);n&&nc(e,n)}function Vq(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||Gq(s)||!o)return null;const a=t||r||i,u=o.length===1;if(!a&&u)return null;const l=tr(s,{maxStringLength:200})||"<unknown>",c=RP(s,l);return Nr({category:"ui.keyDown",message:l,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function Gq(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Kq={resource:Zq,paint:Qq,navigation:Jq};function ym(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}
98function Yq(e){return e.map(Xq).filter(Boolean)}function Xq(e){const t=Kq[e.entryType];return t?t(e):null}function Ia(e){return((wn()||Ve.performance.timeOrigin)+e)/1e3}function Qq(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=Ia(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function Jq(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:u,domInteractive:l,loadEventStart:c,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:h,type:m}=e;return i===0?null:{type:`${t}.${m}`,start:Ia(p),end:Ia(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:u,loadEventStart:c,loadEventEnd:d,domComplete:o,redirectCount:f}}}function Zq(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:u,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ia(o),end:Ia(i),name:r,data:{size:l,statusCode:u,decodedBodySize:s,encodedBodySize:a}}}function e8(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return Yb(e,"largest-contentful-paint",n)}function t8(e){return e.sources!==void 0}function n8(e){const t=[],n=[];for(const r of e.entries)if(t8(r)){const i=[];for(const o of r.sources)if(o.node){n.push(o.node);const s=ii.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return Yb(e,"cumulative-layout-shift",n,t)}function r8(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return Yb(e,"interaction-to-next-paint",n)}function Yb(e,t,n,r){const i=e.value,o=e.rating,s=Ia(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>ii.mirror.getId(a)):void 0,attributions:r}}}function i8(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(ss(i,n))}),r.push(Lb(ym(e8,e)),Db(ym(n8,e)),$1(ym(r8,e))),()=>{r.forEach(i=>i())}}const se=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,o8='
vendor: 10,329 bytes, line 98
98var 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});
98';function s8(){const e=new Blob([o8]);return URL.createObjectURL(e)}const eT=["log","warn","error"],Hd="[Replay] ";function bm(e,t="info"){go({category:"console",data:{logger:"replay"},level:t,message:`${Hd}${e}`},{level:t})}function a8(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return se?(eT.forEach(r=>{n[r]=(...i)=>{Y[r](Hd,...i),t&&bm(i.join(""),T1(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),Y.error(Hd,r),e?Eb(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&bm(r,"error")},n.infoTick=(...r)=>{Y.log(Hd,...r),t&&setTimeout(()=>bm(r[0]),0)}):eT.forEach(r=>{n[r]=()=>{}}),n}const ae=a8();class Xb extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Bb}.`)}}class kP{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){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Bb)throw new Xb;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Gb(t):null}}class u8{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){se&&ae.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,o)=>{const s=({data:a})=>{const u=a;if(u.method===t&&u.id===r){if(this._worker.removeEventListener("message",s),!u.success){se&&ae.error("Error in compression worker: ",u.response),o(new Error("Error in compression worker"));return}i(u.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class l8{constructor(t){this._worker=new u8(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){const n=Gb(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Bb?Promise.reject(new Xb):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{se&&ae.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class c8{constructor(t){this._fallback=new kP,this._compression=new l8(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){se&&ae.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(const o of t)i.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(o){se&&ae.exception(o,"Failed to add events when switching buffers.")}}}function d8({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=f8(t);if(n)return n}return se&&ae.log("Using simple buffer"),new kP}function f8(e){try{const t=e||p8();if(!t)return;se&&ae.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new c8(n)}catch(t){se&&ae.exception(t,"Failed to create compression worker")}}function p8(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?s8():""}function Qb(){try{return"sessionStorage"in Ve&&!!Ve.sessionStorage}catch{return!1}}function h8(e){m8(),e.session=void 0}function m8(){if(Qb())try{Ve.sessionStorage.removeItem(Ub)}catch{}}function PP(e){return e===void 0?!1:Math.random()<e}function Jb(e){if(Qb())try{Ve.sessionStorage.setItem(Ub,JSON.stringify(e))}catch{}}function AP(e){const t=Date.now(),n=e.id||Rn(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0,s=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:s,previousSessionId:a}}function g8(e,t){return PP(e)?"session":t?"buffer":!1}function tT({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=g8(e,t),o=AP({sampled:i,previousSessionId:r});return n&&Jb(o),o}function v8(){if(!Qb())return null;try{const e=Ve.sessionStorage.getItem(Ub);if(!e)return null;const t=JSON.parse(e);return se&&ae.infoTick("Loading existing session"),AP(t)}catch{return null}}function oy(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function OP(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return oy(e.started,t,r)||oy(e.lastActivity,n,r)}function MP(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!OP(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function wm({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&v8();return i?MP(i,{sessionIdleExpire:e,maxReplayDuration:t})?(se&&ae.infoTick("Session in sessionStorage is expired, creating new one..."),tT(r,{previousSessionId:i.id})):i:(se&&ae.infoTick("Creating new session"),tT(r,{previousSessionId:n}))}function y8(e){return e.type===me.Custom}function Zb(e,t,n){return DP(e,t)?(NP(e,t,n),!0):!1}function b8(e,t,n){return DP(e,t)?NP(e,t,n):Promise.resolve(null)}async function NP(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";
98try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),s=w8(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){const s=o&&o instanceof Xb,a=s?"addEventSizeExceeded":"addEvent";if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a});const u=he();u&&u.recordDroppedEvent("internal_sdk_error","replay")}}function DP(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Gb(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(se&&ae.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function w8(e,t){try{if(typeof t=="function"&&y8(e))return t(e)}catch(n){return se&&ae.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function ew(e){return!e.type}function sy(e){return e.type==="transaction"}function S8(e){return e.type==="replay_event"}function nT(e){return e.type==="feedback"}function _8(e){return(t,n)=>{if(!e.isEnabled()||!ew(t)&&!sy(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(sy(t)){E8(e,t);return}T8(e,t)}}}function E8(e,t){var r,i;const n=e.getContext();(i=(r=t.contexts)==null?void 0:r.trace)!=null&&i.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function T8(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||ec(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function x8(e){return t=>{!e.isEnabled()||!ew(t)||C8(e,t)}}function C8(e,t){var r,i,o;const n=(o=(i=(r=t.exception)==null?void 0:r.values)==null?void 0:i[0])==null?void 0:o.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const s=Nr({category:"replay.hydrate-error",data:{url:Ba()}});nc(e,s)}}function I8(e){const t=he();t&&t.on("beforeAddBreadcrumb",n=>R8(e,n))}function R8(e,t){if(!e.isEnabled()||!LP(t))return;const n=k8(t);n&&nc(e,n)}function k8(e){return!LP(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?P8(e):Nr(e)}function P8(e){var i;const t=(i=e.data)==null?void 0:i.arguments;if(!Array.isArray(t)||t.length===0)return Nr(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Vc?(n=!0,`${o.slice(0,Vc)}â¦`):o;if(typeof o=="object")try{const s=dr(o,7);return JSON.stringify(s).length>Vc?(n=!0,`${JSON.stringify(s,null,2).slice(0,Vc)}â¦`):s}catch{}return o});return Nr({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function LP(e){return!!e.category}function A8(e,t){var n,r,i;return e.type||!((r=(n=e.exception)==null?void 0:n.values)!=null&&r.length)?!1:!!((i=t.originalException)!=null&&i.__rrweb__)}function FP(){const e=Fe().getPropagationContext().dsc;e&&delete e.replay_id;const t=on();if(t){const n=mi(t);delete n.replay_id}}function O8(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:me.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 M8(e,t){return e.recordingMode!=="buffer"||t.message===$b||!t.exception||t.type?!1:PP(e.getOptions().errorSampleRate)}function N8(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:S8(t)?(delete t.breadcrumbs,t):!ew(t)&&!sy(t)&&!nT(t)?t:e.checkAndHandleExpiredSession()?nT(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),O8(e,t),t):A8(t,n)&&!e.getOptions()._experiments.captureExceptions?(se&&ae.log("Ignoring error from rrweb internals",t),null):((M8(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(FP(),t),{id:"Replay"})}function Gp(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{const a=e.throttledAddEvent({type:me.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});
98return typeof a=="string"?Promise.resolve(null):a})}function D8(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function L8(e){return t=>{if(!e.isEnabled())return;const n=D8(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Gp(e,[n]),!1)))}}function F8(e,t){return se&&e.getOptions()._experiments.traceInternals?!1:S1(t,he())}function jP(e,t){e.isEnabled()&&t!==null&&(F8(e,t.name)||e.addUpdate(()=>(Gp(e,[t]),!0)))}function Kp(e){if(!e)return;const 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){const n=K1(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function UP(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Xf(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function $P(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:u}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:u}}}function _l(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ao(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=j8(n);return r.body=i,o!=null&&o.length&&(r._meta={warnings:o}),r}function ay(e,t){return Object.entries(e).reduce((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function j8(e){if(!e||typeof e!="string")return{body:e};const t=e.length>LE,n=U8(e);if(t){const r=e.slice(0,LE);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}â¦`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function U8(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Qf(e,t){const n=$8(e);return ni(n,t)}function $8(e,t=Ve.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Ve.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function B8(e,t,n){try{const r=await H8(e,t,n),i=$P("resource.fetch",r);jP(n.replay,i)}catch(r){se&&ae.exception(r,"Failed to capture fetch breadcrumb")}}function z8(e,t){const{input:n,response:r}=t,i=n?X1(n):void 0,o=Kp(i),s=r?UP(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}async function H8(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:u=0,request_body_size:l,response_body_size:c}=e.data,d=Qf(s,n.networkDetailAllowUrls)&&!Qf(s,n.networkDetailDenyUrls),f=d?W8(n,t.input,l):_l(l),p=await q8(d,n,t.response,c);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:u,request:f,response:p}}function W8({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?K8(n,t):{};if(!e)return ao(i,r,void 0);const o=X1(n),[s,a]=Y1(o,ae),u=ao(i,r,s);return a?Xf(u,a):u}async function q8(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return _l(i);const o=r?BP(r.headers,n):{};if(!r||!t&&i!==void 0)return ao(o,i,void 0);const[s,a]=await G8(r),u=V8(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?Xf(u,a):u}function V8(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=e!=null&&e.length&&n===void 0?Kp(e):n;return r?t?ao(i,o,e):ao(i,o,void 0):_l(o)}catch(o){return se&&ae.exception(o,"Failed to serialize response body"),ao(i,n,void 0)}}async function G8(e){const t=Y8(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await X8(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(se&&ae.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(se&&ae.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function BP(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}
98function K8(e,t){return e.length===1&&typeof e[0]!="string"?rT(e[0],t):e.length===2?rT(e[1],t):{}}function rT(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?BP(n,t):Array.isArray(n)?{}:ay(n,t):{}}function Y8(e){try{return e.clone()}catch(t){se&&ae.exception(t,"Failed to clone response body")}}function X8(e){return new Promise((t,n)=>{const r=ec(()=>n(new Error("Timeout while trying to read response body")),500);Q8(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function Q8(e){return await e.text()}async function J8(e,t,n){try{const r=eV(e,t,n),i=$P("resource.xhr",r);jP(n.replay,i)}catch(r){se&&ae.exception(r,"Failed to capture xhr breadcrumb")}}function Z8(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=Kp(r),o=n.getResponseHeader("content-length")?UP(n.getResponseHeader("content-length")):iV(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function eV(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:u,method:l,status_code:c=0,request_body_size:d,response_body_size:f}=e.data;if(!u)return null;if(!a||!Qf(u,n.networkDetailAllowUrls)||Qf(u,n.networkDetailDenyUrls)){const T=_l(d),_=_l(f);return{startTimestamp:i,endTimestamp:o,url:u,method:l,statusCode:c,request:T,response:_}}const p=a[Yi],h=p?ay(p.request_headers,n.networkRequestHeaders):{},m=ay(tV(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?Y1(s,ae):[void 0],[v,b]=n.networkCaptureBodies?nV(a):[void 0],S=ao(h,d,y),x=ao(m,f,v);return{startTimestamp:i,endTimestamp:o,url:u,method:l,statusCode:c,request:g?Xf(S,g):S,response:b?Xf(x,b):x}}function tV(e){const t=e.getAllResponseHeaders();return t?t.split(`\r 99`).reduce((n,r)=>{const[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}function nV(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return rV(e.response,e.responseType)}catch(n){t.push(n)}return se&&ae.warn("Failed to get xhr response body",...t),[void 0]}function rV(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(n){return se&&ae.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return se&&ae.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function iV(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Kp(n)}catch{return}}function oV(e){const t=he();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(u,l)=>sV(a,u,l))}catch{}}function sV(e,t,n){if(t.data)try{aV(t)&&lV(n)&&(Z8(t,n),J8(t,n,e)),uV(t)&&cV(n)&&(z8(t,n),B8(t,n,e))}catch(r){se&&ae.exception(r,"Error when enriching network breadcrumb")}}function aV(e){return e.category==="xhr"}function uV(e){return e.category==="fetch"}function lV(e){return e==null?void 0:e.xhr}function cV(e){return e==null?void 0:e.response}function dV(e){const t=he();V1(Bq(e)),Hp(L8(e)),I8(e),oV(e);const n=N8(e);H4(n),t&&(t.on("beforeSendEvent",x8(e)),t.on("afterSendEvent",_8(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{var s;const o=e.getSessionId();i!=null&&i.includeReplay&&e.isEnabled()&&o&&((s=r.contexts)!=null&&s.feedback)&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function fV(e){try{return Promise.all(Gp(e,[pV(Ve.performance.memory)]))}catch{return[]}}function pV(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function hV(e,t,n){return EB(e,t,{...n,setTimeoutImpl:ec})}const Wn=ke.navigator;function mV(){return/iPhone|iPad|iPod/i.test((Wn==null?void 0:Wn.userAgent)??"")||/Macintosh/i.test((Wn==null?void 0:Wn.userAgent)??"")&&(Wn!=null&&Wn.maxTouchPoints)&&(Wn==null?void 0:Wn.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function gV(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){se&&ae.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&Lq(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Zb(e,n,i))return!0;
99if(!i)return!1;const o=e.session;if(yV(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer){const s=e.eventBuffer.getEarliestTimestamp();s&&(se&&ae.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&Jb(o))}return o!=null&&o.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function vV(e){const t=e.getOptions();return{type:me.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 yV(e,t){!t||!e.session||e.session.segmentId!==0||Zb(e,vV(e),!1)}function bV(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function wV(e,t,n,r){return ys(n1(e,bb(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function SV({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)} 100`;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function _V({client:e,scope:t,replayId:n,event:r}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:i};e.emit("preprocessEvent",r,o);const s=await u1(e.getOptions(),r,o,t,e,nr());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const a=e.getSdkMetadata(),{name:u,version:l,settings:c}=(a==null?void 0:a.sdk)||{};return s.sdk={...s.sdk,name:u||"sentry.javascript.unknown",version:l||"0.0.0",settings:c},s}async function EV({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=SV({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:u,traceIds:l,initialTimestamp:c}=r,d=he(),f=Fe(),p=d==null?void 0:d.getTransport(),h=d==null?void 0:d.getDsn();if(!d||!p||!h||!o.sampled)return Br({});const m={type:ZH,replay_start_timestamp:c/1e3,timestamp:i/1e3,error_ids:u,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},y=await _V({scope:f,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay"),se&&ae.log("An event processor returned `null`, will not send event."),Br({});delete y.sdkProcessingMetadata;const g=wV(y,s,h,d.getOptions().tunnel);let v;try{v=await p.send(g)}catch(S){const x=new Error($b);try{x.cause=S}catch{}throw x}if(typeof v.statusCode=="number"&&(v.statusCode<200||v.statusCode>=300))throw new zP(v.statusCode);const b=w1({},v);if(b1(b,"replay"))throw new tw(b);return v}class zP extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class tw extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function HP(e,t={count:0,interval:oW}){const{recordingData:n,onError:r}=e;if(n.length)try{return await EV(e),!0}catch(i){if(i instanceof zP||i instanceof tw)throw i;if(l1("Replays",{_retryCount:t.count}),r&&r(i),t.count>=sW){const o=new Error(`${$b} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{ec(async()=>{try{await HP(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}const WP="__THROTTLED",TV="__SKIPPED";function xV(e,t,n){const r=new Map,i=a=>{const u=a-n;r.forEach((l,c)=>{c<u&&r.delete(c)})},o=()=>[...r.values()].reduce((a,u)=>a+u,0);let s=!1;return(...a)=>{const u=Math.floor(Date.now()/1e3);if(i(u),o()>=t){const c=s;return s=!0,c?TV:WP}s=!1;const l=r.get(u)||0;return r.set(u,l+1),e(...a)}}class CV{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:eW,sessionIdleExpire:tW},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=n,this._options=t,this._debouncedFlush=hV(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=xV((s,a)=>b8(this,s,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),o=r?{threshold:Math.min(aW,r),timeout:r,scrollTimeout:uW,ignoreSelector:i?i.join(","):""}:void 0;if(o&&(this.clickDetector=new Oq(this,o)),se){const s=t._experiments;ae.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Ve.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
100dTasks()},this._handleWindowBlur=()=>{const s=Nr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=Nr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{qq(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){se&&ae.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){se&&ae.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",se&&ae.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){se&&ae.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){se&&ae.log("Buffering is in progress, call `flush()` to save the replay");return}se&&ae.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=wm({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){se&&ae.log("Buffering is in progress, call `flush()` to save the replay");return}se&&ae.infoTick("Starting replay in buffer mode");const t=wm({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{const t=this._canvas;this._stopRecording=ii({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:iW}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:gV(this),...mV(),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:n}={}){var r;if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{se&&ae.log(`Stopping Replay${n?` triggered by ${n}`:""}`),FP(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,h8(this)}catch(i){this.handleException(i)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),se&&ae.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),se&&ae.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();se&&ae.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!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(){var t;return(t=this.session)==null?void 0:t.id}
100checkAndHandleExpiredSession(){if(this._lastActivity&&oy(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Ve.location.pathname}${Ve.location.hash}${Ve.location.search}`,n=`${Ve.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===WP){const i=Nr({category:"replay.throttled"});this.addUpdate(()=>!Zb(this,{type:xq,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||on(),n=t&&Vt(t),i=(n&&Re(n).data||{})[mr];if(!(!n||!i||!["route","custom"].includes(i)))return Re(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=d8({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=wm({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return MP(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Ve.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ve.addEventListener("blur",this._handleWindowBlur),Ve.addEventListener("focus",this._handleWindowFocus),Ve.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(dV(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=i8(this)}_removeListeners(){try{Ve.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ve.removeEventListener("blur",this._handleWindowBlur),Ve.removeEventListener("focus",this._handleWindowFocus),Ve.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||OP(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){se&&ae.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:me.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Yq(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Gp(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
100_popEventContext(){const 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(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){se&&ae.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await fV(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const i=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await HP({replayId:t,recordingData:s,segmentId:o,eventContext:i,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendReplay"});const i=he();if(i){const o=r instanceof tw?"ratelimit_backoff":"send_error";i.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){se&&ae.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const o=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(o||s){se&&ae.log(`Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&se&&ae.log("Flushing initial segment without checkout.");const u=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(l){this.handleException(l)}finally{this._flushLock=void 0,u&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Jb(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n!=null&&n.length&&t.some(a=>{const u=bV(a.target),l=n.join(",");return u==null?void 0:u.matches(l)}))return!1;const r=t.length,i=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>o||s){const a=Nr({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function uu(e,t){return[...e,...t].join(",")}function IV({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const o=["base","iframe[srcdoc]:not([src])"],s=uu(e,[".sentry-mask","[data-sentry-mask]"]),a=uu(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:uu(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:uu(r,[]),ignoreSelector:uu(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function RV({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const iT='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',kV=["content-length","content-type","accept"];let oT=!1;const PV=e=>new AV(e);class AV{constructor({flushMinDelay:t=nW,flushMaxDelay:n=rW,minReplayDuration:r=lW,maxReplayDuration:i=FE,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:u={},maskAllText:l=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:g=[],networkCaptureBodies:v=!0,networkRequestHeaders:b=[],networkResponseHeaders:S=[],mask:x=[],maskAttributes:T=["title","placeholder","aria-label"],unmask:_=[],block:C=[],unblock:I=[],ignore:O=[],maskFn:D,beforeAddRecordingEvent:L,beforeErrorSampling:F,onError:M}={}){this.name="Replay";const R=IV({mask:x,unmask:_,block:C,unblock:I,ignore:O});if(this._recordingOptions={maskAllInputs:c,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:D,maskInputFn:D,maskAttributeFn:(N,A,P)=>RV({maskAttributes:T,maskAllText:l,privacyOptions:R,key:N,value:A,el:P}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:N=>{try{N.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!u.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,cW),maxReplayDuration:Math.min(i,FE),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:l,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:g,networkCaptureBodies:v,networkRequestHeaders:sT(b),networkResponseHeaders:sT(S),beforeAddRecordingEvent:L,beforeErrorSampling:F,onError:M,_experiments:u},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${iT}`:iT),this._isInitialized&&IE())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return oT}set _isInitialized(t){oT=t}afterAllSetup(t){!IE()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
100startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.getSessionId()}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=OV(this._initialOptions,t);this._replay=new CV({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function OV(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=is(n.replaysSessionSampleRate),o=is(n.replaysOnErrorSampleRate);return i==null&&o==null&&gs(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function sT(e){return[...kV,...e.map(t=>t.toLowerCase())]}const aT=new WeakMap,Sm=new Map,qP={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function MV(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:u}={...qP,...t},l=typeof o=="function"?o:p=>!0,c=p=>DV(p,a),d={},f=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(p=>(p.type==="transaction"&&p.spans&&p.spans.forEach(h=>{if(h.op==="http.client"){const m=Sm.get(h.span_id);m&&(h.timestamp=m/1e3,Sm.delete(h.span_id))}}),p)),i&&n5(p=>{if(p.response){const h=aT.get(p.response);h&&p.endTimestamp&&Sm.set(h,p.endTimestamp)}}),Cb(p=>{const h=KB(p,l,c,d,{propagateTraceparent:f});if(p.response&&p.fetchData.__span&&aT.set(p.response,p.fetchData.__span),h){const m=VP(p.fetchData.url),y=m?Ko(m).host:void 0;h.setAttributes({"http.url":m,"server.address":y}),s&&uT(h),u==null||u(h,{headers:p.headers})}})),r&&jb(p=>{var m;const h=LV(p,l,c,d,f);if(h){s&&uT(h);let y;try{y=new Headers((m=p.xhr.__sentry_xhr_v3__)==null?void 0:m.request_headers)}catch{}u==null||u(h,{headers:y})}})}function NV(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function uT(e){const{url:t}=Re(e).data;if(!t||typeof t!="string")return;const n=ss("resource",({entries:r})=>{r.forEach(i=>{NV(i)&&i.name.endsWith(t)&&(e.setAttributes(q1(i)),setTimeout(n))})})}function DV(e,t){const n=Ba();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const o=r.origin===i;return t?ni(r.toString(),t)||o&&ni(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?ni(e,t):r}}function LV(e,t,n,r,i){const o=e.xhr,s=o==null?void 0:o[Yi];if(!o||o.__sentry_own_request__||!s)return;const{url:a,method:u}=s,l=yr()&&t(a);if(e.endTimestamp&&l){const y=o.__sentry_xhr_span_id__;if(!y)return;const g=r[y];g&&s.status_code!==void 0&&($k(g,s.status_code),g.end(),delete r[y]);return}const c=VP(a),d=Ko(c||a),f=vB(a),p=!!on(),h=l&&p?Wa({name:`${u} ${f}`,attributes:{url:a,type:"xhr","http.method":u,"http.url":c,"server.address":d==null?void 0:d.host,[It]:"auto.http.browser",[hi]:"http.client",...(d==null?void 0:d.search)&&{"http.query":d==null?void 0:d.search},...(d==null?void 0:d.hash)&&{"http.fragment":d==null?void 0:d.hash}}}):new mo;o.__sentry_xhr_span_id__=h.spanContext().spanId,r[o.__sentry_xhr_span_id__]=h,n(a)&&FV(o,yr()&&p?h:void 0,i);const m=he();return m&&m.emit("beforeOutgoingRequestSpan",h,e),h}function FV(e,t,n){const{"sentry-trace":r,baggage:i,traceparent:o}=E1({span:t,propagateTraceparent:n});r&&jV(e,r,i,o)}function jV(e,t,n,r){var o;const i=(o=e.__sentry_xhr_v3__)==null?void 0:o.request_headers;if(!(i!=null&&i["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(i!=null&&i.traceparent)&&e.setRequestHeader("traceparent",r),n){const s=i==null?void 0:i.baggage;(!s||!UV(s))&&e.setRequestHeader("baggage",n)}}catch{}}function UV(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function VP(e){try{return new URL(e,Pe.location.origin).href}catch{return}}function $V(){Pe.document?Pe.document.addEventListener("visibilitychange",()=>{const e=on();if(!e)return;const t=Vt(e);if(Pe.document.hidden&&t){const n="cancelled",{op:r,status:i}=Re(t);Mn&&Y.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:Tt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Mn&&Y.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const BV=3600,GP="sentry_previous_trace",zV="sentry.previous_trace";function HV(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?VV():void 0;e.on("spanStart",s=>{if(Vt(s)!==s)return;const a=Fe().getPropagationContext();i=WV(i,s,a),r&&qV(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const a=Fe(),u=a.getPropagationContext();if(o&&u.parentSpanId){o=!1;return}a.setPropagationContext({...u,dsc:{...u.dsc,sample_rate:String(i.sampleRate),sampled:String(u
100y(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=uy(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[jk]:i.sampleRate}})}function WV(e,t,n){const r=Re(t);function i(){var a,u;try{return Number((a=n.dsc)==null?void 0:a.sample_rate)??Number((u=r.data)==null?void 0:u[hb])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=BV&&(Mn&&Y.log(`Adding previous_trace ${s} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:s,attributes:{[v$]:"previous_trace"}}),t.setAttribute(zV,`${s.traceId}-${s.spanId}-${uy(s)?1:0}`)),o)}function qV(e){try{Pe.sessionStorage.setItem(GP,JSON.stringify(e))}catch(t){Mn&&Y.warn("Could not store previous trace in sessionStorage",t)}}function VV(){var e;try{const t=(e=Pe.sessionStorage)==null?void 0:e.getItem(GP);return JSON.parse(t)}catch{return}}function uy(e){return e.traceFlags===1}const GV="BrowserTracing",KV={...Ud,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...qP},YV=(e={})=>{const t={name:void 0,source:void 0},n=Pe.document,{enableInp:r,enableElementTiming:i,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:l},beforeStartSpan:c,idleTimeout:d,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:h,traceFetch:m,traceXHR:y,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:v,enableHTTPTimings:b,ignoreResourceSpans:S,ignorePerformanceApiSpans:x,instrumentPageLoad:T,instrumentNavigation:_,detectRedirects:C,linkPreviousTrace:I,consistentTraceSampling:O,onRequestSpanStart:D}={...KV,...e};let L,F;function M(R,N,A=!0){const P=N.op==="pageload",k=N.name,$=c?c(N):N,z=$.attributes||{};if(k!==$.name&&(z[mr]="custom",$.attributes=z),!A){const q=vs();Wa({...$,startTime:q}).end(q);return}t.name=$.name,t.source=z[mr];const H=a1($,{idleTimeout:d,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:P,beforeSpanEnd:q=>{L==null||L(),fz(q,{recordClsOnPageloadSpan:!u,recordLcpOnPageloadSpan:!l,ignoreResourceSpans:S,ignorePerformanceApiSpans:x}),cT(R,void 0);const te=Fe(),G=te.getPropagationContext();te.setPropagationContext({...G,traceId:H.spanContext().traceId,sampled:xo(H),dsc:mi(q)})}});cT(R,H);function V(){n&&["interactive","complete"].includes(n.readyState)&&R.emit("idleSpanEnableAutoFinish",H)}P&&n&&(n.addEventListener("readystatechange",()=>{V()}),V())}return{name:GV,setup(R){if(W$(),L=oz({recordClsStandaloneSpans:u||!1,recordLcpStandaloneSpans:l||!1,client:R}),r&&Lz(),i&&Ez(),s&&ke.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?az():o&&sz(),a&&uz(),C&&n){const A=()=>{F=Ft()};addEventListener("click",A,{capture:!0}),addEventListener("keydown",A,{capture:!0,passive:!0})}function N(){const A=El(R);A&&!Re(A).timestamp&&(Mn&&Y.log(`[Tracing] Finishing current active span with op: ${Re(A).op}`),A.setAttribute(Ff,"cancelled"),A.end())}R.on("startNavigationSpan",(A,P)=>{if(he()!==R)return;if(P!=null&&P.isRedirect){Mn&&Y.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),M(R,{op:"navigation.redirect",...A},!1);return}F=void 0,N(),nr().setPropagationContext({traceId:pi(),sampleRand:Math.random(),propagationSpanId:yr()?void 0:ri()});const k=Fe();k.setPropagationContext({traceId:pi(),sampleRand:Math.random(),propagationSpanId:yr()?void 0:ri()}),k.setSDKProcessingMetadata({normalizedRequest:void 0}),M(R,{op:"navigation",...A,parentSpan:null,forceTransaction:!0})}),R.on("startPageLoadSpan",(A,P={})=>{if(he()!==R)return;N();const k=P.sentryTrace||lT("sentry-trace"),$=P.baggage||lT("baggage"),z=D$(k,$),H=Fe();H.setPropagationContext(z),yr()||(H.getPropagationContext().propagationSpanId=ri()),H.setSDKProcessingMetadata({normalizedRequest:Ib()}),M(R,{op:"pageload",...A})})},afterAllSetup(R){let N=Ba();if(I!=="off"&&HV(R,{linkPreviousTrace:I,consistentTraceSampling:O}),Pe.location){if(T){const A=wn();XV(R,{name:Pe.location.pathname,startTime:A?A/1e3:void 0,attributes:{[mr]:"url",[It]:"auto.pageload.browser"}})}_&&Hp(({to:A,from:P})=>{if(P===void 0&&(N==null?void 0:N.indexOf(A))!==-1){N=void 0;return}N=void 0;const k=xb(A),$=El(R),z=$&&C&&ZV($,F);QV(R,{name:(k==null?void 0:k.pathname)||Pe.location.pathname,attributes:{[mr]:"url",[It]:"auto.navigation.browser"}},{url:A,isRedirect:z})})}h&&$V(),a&&JV(R,d,f,p,t),r&&Uz(),MV(R,{traceFetch:m,traceXHR:y,trackFetchStreamPerformance:g,tracePropagationTargets:R.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:b,onRequestSpanStart:D})}}};function XV(e,t,n){e.emit("startPageLoadSpan",t,n),Fe().setTransactionName(t.name);const r=El(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function QV(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const o=Fe();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...Ib(),url:r}}),El(e)}function lT(e){const t=Pe.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function JV(e,t,n,r,i){const o=Pe.document;let s;const a=()=>{const u="ui.action.click",l=El(e);if(l){const c=Re(l).op;
100if(["navigation","pageload"].includes(c)){Mn&&Y.warn(`[Tracing] Did not create ${u} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Ff,"interactionInterrupted"),s.end(),s=void 0),!i.name){Mn&&Y.warn(`[Tracing] Did not create ${u} transaction because _latestRouteName is missing.`);return}s=a1({name:i.name,op:u,attributes:{[mr]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const KP="_sentry_idleSpan";function El(e){return e[KP]}function cT(e,t){On(e,KP,t)}const dT=1.5;function ZV(e,t){const n=Re(e),r=vs(),i=n.start_timestamp;return!(r-i>dT||t&&r-t<=dT)}function e6(e){const t={...e};return _1(t,"react"),l1("react",{version:w.version}),UH(t)}var ly=function(e,t){return ly=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ly(e,t)};function Ot(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ly(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var W=function(){return W=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},W.apply(this,arguments)};function Ra(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function B(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{l(r.next(c))}catch(d){s(d)}}function u(c){try{l(r.throw(c))}catch(d){s(d)}}function l(c){c.done?o(c.value):i(c.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function U(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function oe(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function le(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function aa(e){return this instanceof aa?(this.v=e,this):new aa(e)}function t6(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(p){return function(h){return Promise.resolve(h).then(p,d)}}function a(p,h){r[p]&&(i[p]=function(m){return new Promise(function(y,g){o.push([p,m,y,g])>1||u(p,m)})},h&&(i[p]=h(i[p])))}function u(p,h){try{l(r[p](h))}catch(m){f(o[0][3],m)}}function l(p){p.value instanceof aa?Promise.resolve(p.value.v).then(c,d):f(o[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function f(p,h){p(h),o.shift(),o.length&&u(o[0][0],o[0][1])}}function n6(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof oe=="function"?oe(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,u){s=e[o](s),i(a,u,s.done,s.value)})}}function i(o,s,a,u){Promise.resolve(u).then(function(l){o({value:l,done:a})},s)}}var Xi;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(Xi||(Xi={}));var kn;(function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"})(kn||(kn={}));var fT="-",Yp="AMP",YP="".concat(Yp,"_unsent"),XP="$default_instance",QP="https://api2.amplitude.com/2/httpapi",r6="https://api.eu.amplitude.com/2/httpapi",i6="https://api2.amplitude.com/batch",o6="https://api.eu.amplitude.com/batch",s6="utm_campaign",a6="utm_c
100ontent",u6="utm_id",l6="utm_medium",c6="utm_source",d6="utm_term",pT="dclid",hT="fbclid",mT="gbraid",gT="gclid",vT="ko_click_id",yT="li_fat_id",bT="msclkid",wT="rdt_cid",ST="ttclid",_T="twclid",ET="wbraid",Xp={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},Jf=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],f6=["authorization","cookie","set-cookie"],p6=1e3,cy=function(e){if(Object.keys(e).length>p6)return!1;for(var t in e){var n=e[t];if(!JP(t,n))return!1}return!0},JP=function(e,t){var n,r;if(typeof e!="string")return!1;if(Array.isArray(t)){var i=!0;try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if(typeof a=="object")i=i&&cy(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(t==null)return!1;if(typeof t=="object")return cy(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},Tl=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return W({},this._properties)},e.prototype.set=function(t,n){return this._safeSet(qe.SET,t,n),this},e.prototype.setOnce=function(t,n){return this._safeSet(qe.SET_ONCE,t,n),this},e.prototype.append=function(t,n){return this._safeSet(qe.APPEND,t,n),this},e.prototype.prepend=function(t,n){return this._safeSet(qe.PREPEND,t,n),this},e.prototype.postInsert=function(t,n){return this._safeSet(qe.POSTINSERT,t,n),this},e.prototype.preInsert=function(t,n){return this._safeSet(qe.PREINSERT,t,n),this},e.prototype.remove=function(t,n){return this._safeSet(qe.REMOVE,t,n),this},e.prototype.add=function(t,n){return this._safeSet(qe.ADD,t,n),this},e.prototype.unset=function(t){return this._safeSet(qe.UNSET,t,fT),this},e.prototype.clearAll=function(){return this._properties={},this._properties[qe.CLEAR_ALL]=fT,this},e.prototype._safeSet=function(t,n,r){if(this._validate(t,n,r)){var i=this._properties[t];return i===void 0&&(i={},this._properties[t]=i),i[n]=r,this._propertySet.add(n),!0}return!1},e.prototype._validate=function(t,n,r){return this._properties[qe.CLEAR_ALL]!==void 0||this._propertySet.has(n)?!1:t===qe.ADD?typeof r=="number":t!==qe.UNSET&&t!==qe.REMOVE?JP(n,r):!0},e}(),qe;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(qe||(qe={}));var h6=[qe.CLEAR_ALL,qe.UNSET,qe.SET,qe.SET_ONCE,qe.ADD,qe.APPEND,qe.PREPEND,qe.PREINSERT,qe.POSTINSERT,qe.REMOVE],m6="Event tracked successfully",g6="Unexpected error occurred",v6="Event rejected due to exceeded retry count",y6="Event skipped due to optOut config",b6="Event rejected due to missing API key",w6="Invalid API key",S6="Client not initialized",ct;(function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"})(ct||(ct={}));var ua=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=ct.Unknown),{event:e,code:t,message:n}},xe=function(){var e="ampIntegrationContext";if(typeof globalThis<"u"&&typeof globalThis[e]<"u")return globalThis[e];if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global},_6=function(e){return e?(e^Math.random()*16>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Co)},TT=le([],X(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),Co=function(e){var t,n=xe();if(!(!((t=n==null?void 0:n.crypto)===null||t===void 0)&&t.getRandomValues))return _6(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=r[6]&15|64,r[8]=r[8]&63|128,le([],X(r.entries()),!1).map(function(i){var o=X(i,2),s=o[0],a=o[1];return[4,6,8,10].includes(s)?"-".concat(TT[a]):TT[a]}).join("")},E6=function(){function e(t){this.client=t,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(t,n){var r,i;return B(this,void 0,void 0,function(){return U(this,function(o){switch(o.label){case 0:return this.plugins.some(function(s){return s.name===t.name})?(this.loggerProvider.warn("Plugin with name ".concat(t.name," already exists, skipping registration")),[2]):(t.name===void 0&&(t.name=Co(),this.loggerProvider.warn(`Plugin name is undefined. 101 Generating a random UUID for plugin name: `.concat(t.name,`. 102 Set a name for the plugin to prevent it from being added multiple times.`))),t.type=(r=t.type)!==null&&r!==void 0?r:"enrichment",[4,(i=t.setup)===null||i===void 0?void 0:i.call(t,n,this.client)]);case 1:return o.sent(),this.plugins.push(t),[2]}})})},e.prototype.deregister=function(t,n){var r;return B(this,void 0,void 0,function(){var i,o;return U(this,function(s){switch(s.label){case 0:return i=this.plugins.findIndex(function(a){return a.name===t}),i===-1?(n.loggerProvider.warn("Plugin with name ".concat(t," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(r=o.teardown)===null||r===void 0?void 0:r.call(o)]);case 1:return s.sent(),[2]}})})},e.prototype.reset=function(t){this.applying=!1;var n=this.plugins;n.map(function(r){var i;return(i=r.teardown)===null||i===void 0?void 0:i.call(r)}),this.plugins=[],this.client=t},e.prototype.push=function(t){var n=this;return new Promise(function(r){n.queue.push([t,r]),n.scheduleApply(0)})},e.prototype.scheduleApply=function(t){var n=this;this.applying||(this.applying=!0,setTimeout(function(){n.apply(n.queue.shift()).then(function(){n.applying=!1,n.queue.length>0&&n.scheduleApply(0)})},t))},e.prototype.apply=function(t){return B(this,void 0,void 0,function(){var n,r,i,o,s,a,u,p,h,l,c,d,f,p,h,m,y,g,v,b,S,x;return U(this,function(T){switch(T.label){case 0:if(!t)return[2];n=X(t,1),r=n[0],i=X(t,2),o=i[1],this.loggerProvider.log("Timeline.apply: Initial event",r),s=this.plugins.filter(function(_){return _.type==="before"}),T.label=1;case 1:T.trys.push([1,6,7,8]),a=oe(s),u=a.next(),T.label=2;case 2:return u.done?[3,5]:(p=u.value,p.execute?[4,p.execute(W({},r))]:[3,4]);case 3:if(h=T.sent(),h===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(p.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=h,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(p.name),"', event: ").concat(JSON.stringify(r))),T.label=4;case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return l=T.sent(),v={error:l},[3,8];case 7:try{u&&!u.done&&(b=a.return)&&b.call(a)}finally{if(v)throw v.error}
102return[7];case 8:c=this.plugins.filter(function(_){return _.type==="enrichment"||_.type===void 0}),T.label=9;case 9:T.trys.push([9,14,15,16]),d=oe(c),f=d.next(),T.label=10;case 10:return f.done?[3,13]:(p=f.value,p.execute?[4,p.execute(W({},r))]:[3,12]);case 11:if(h=T.sent(),h===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(p.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=h,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(p.name),"', event: ").concat(JSON.stringify(r))),T.label=12;case 12:return f=d.next(),[3,10];case 13:return[3,16];case 14:return m=T.sent(),S={error:m},[3,16];case 15:try{f&&!f.done&&(x=d.return)&&x.call(d)}finally{if(S)throw S.error}return[7];case 16:return y=this.plugins.filter(function(_){return _.type==="destination"}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(r))),g=y.map(function(_){var C=W({},r);return _.execute(C).catch(function(I){return ua(C,0,String(I))})}),Promise.all(g).then(function(_){var C=X(_,1),I=C[0],O=I||ua(r,100,"Event not tracked, no destination plugins on the instance");o(O)}),[2]}})})},e.prototype.flush=function(){return B(this,void 0,void 0,function(){var t,n,r,i=this;return U(this,function(o){switch(o.label){case 0:return t=this.queue,this.queue=[],[4,Promise.all(t.map(function(s){return i.apply(s)}))];case 1:return o.sent(),n=this.plugins.filter(function(s){return s.type==="destination"}),r=n.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(r)];case 2:return o.sent(),[2]}})})},e.prototype.onIdentityChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onIdentityChanged)===null||r===void 0||r.call(n,t)})},e.prototype.onSessionIdChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onSessionIdChanged)===null||r===void 0||r.call(n,t)})},e.prototype.onOptOutChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onOptOutChanged)===null||r===void 0||r.call(n,t)})},e}(),T6=function(e,t,n){var r=typeof e=="string"?{event_type:e}:e;return W(W(W({},r),n),t&&{event_properties:t})},ZP=function(e,t){var n=W(W({},t),{event_type:kn.IDENTIFY,user_properties:e.getUserProperties()});return n},x6=function(e,t,n,r){var i,o=W(W({},r),{event_type:kn.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)});return o},C6=function(e,t,n){var r,i=new Tl;i.set(e,t);var o=W(W({},n),{event_type:kn.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)});return o},I6=function(e,t){return W(W({},t),{event_type:kn.REVENUE,event_properties:e.getEventProperties()})},Ht=function(e){return{promise:e||Promise.resolve()}},R6=function(){function e(t){t===void 0&&(t="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new E6(this),this.name=t}return e.prototype._init=function(t){return B(this,void 0,void 0,function(){return U(this,function(n){switch(n.label){case 0:return this.config=t,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return n.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(t){return B(this,void 0,void 0,function(){var n,r,i,o,s,a,u,l;return U(this,function(c){switch(c.label){case 0:n=this[t],this[t]=[],c.label=1;case 1:c.trys.push([1,8,9,10]),r=oe(n),i=r.next(),c.label=2;case 2:return i.done?[3,7]:(o=i.value,s=o(),s&&"promise"in s?[4,s.promise]:[3,4]);case 3:return c.sent(),[3,6];case 4:return[4,s];case 5:c.sent(),c.label=6;case 6:return i=r.next(),[3,2];case 7:return[3,10];case 8:return a=c.sent(),u={error:a},[3,10];case 9:try{i&&!i.done&&(l=r.return)&&l.call(r)}finally{if(u)throw u.error}return[7];case 10:return this[t].length?[4,this.runQueuedFunctions(t)]:[3,12];case 11:c.sent(),c.label=12;case 12:return[2]}})})},e.prototype.track=function(t,n,r){var i=T6(t,n,r);return Ht(this.dispatch(i))},e.prototype.identify=function(t,n){var r=ZP(t,n);return Ht(this.dispatch(r))},e.prototype.groupIdentify=function(t,n,r,i){var o=x6(t,n,r,i);return Ht(this.dispatch(o))},e.prototype.setGroup=function(t,n,r){var i=C6(t,n,r);return Ht(this.dispatch(i))},e.prototype.revenue=function(t,n){var r=I6(t,n);return Ht(this.dispatch(r))},e.prototype.add=function(t){return this.isReady?this._addPlugin(t):(this.q.push(this._addPlugin.bind(this,t)),Ht())},e.prototype._addPlugin=function(t){return Ht(this.timeline.register(t,this.config))},e.prototype.remove=function(t){return this.isReady?this._removePlugin(t):(this.q.push(this._removePlugin.bind(this,t)),Ht())},e.prototype._removePlugin=function(t){return Ht(this.timeline.deregister(t,this.config))},e.prototype.dispatchWithCallback=function(t,n){if(!this.isReady)return n(ua(t,0,S6));this.process(t).then(n)},e.prototype.dispatch=function(t){return B(this,void 0,void 0,function(){var n=this;return U(this,function(r){return this.isReady?[2,this.process(t)]:[2,new Promise(function(i){n.dispatchQ.push(n.dispatchWithCallback.bind(n,t,i))})]})})},e.prototype.getOperationAppliedUserProperties=function(t){var n={};if(t===void 0)return n;var r={};return Object.keys(t).forEach(function(i){Object.values(Xi).includes(i)||(r[i]=t[i])}),h6.forEach(function(i){if(Object.keys(t).includes(i)){var o=t[i];
102switch(i){case Xi.CLEAR_ALL:Object.keys(n).forEach(function(s){delete n[s]});break;case Xi.UNSET:Object.keys(o).forEach(function(s){delete n[s]});break;case Xi.SET:Object.assign(n,o);break}}}),Object.assign(n,r),n},e.prototype.process=function(t){return B(this,void 0,void 0,function(){var n,o,r,i,o;return U(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this.config.optOut?[2,ua(t,0,y6)]:(t.event_type===kn.IDENTIFY&&(n=this.getOperationAppliedUserProperties(t.user_properties),this.timeline.onIdentityChanged({userProperties:n})),[4,this.timeline.push(t)]);case 1:return o=s.sent(),o.code===200?this.config.loggerProvider.log(o.message):o.code===100?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return r=s.sent(),i=String(r),this.config.loggerProvider.error(i),o=ua(t,0,i),[2,o];case 3:return[2]}})})},e.prototype.setOptOut=function(t){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!t));return}this._setOptOut(t)},e.prototype._setOptOut=function(t){this.config.optOut!==t&&(this.timeline.onOptOutChanged(t),this.config.optOut=!!t)},e.prototype.flush=function(){return Ht(this.timeline.flush())},e.prototype.plugin=function(t){var n=this.timeline.plugins.find(function(r){return r.name===t});if(n===void 0){this.config.loggerProvider.debug("Cannot find plugin with name ".concat(t));return}return n},e.prototype.plugins=function(t){return this.timeline.plugins.filter(function(n){return n instanceof t})},e}(),k6=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(t){return this.productId=t,this},e.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},e.prototype.setPrice=function(t){return this.price=t,this},e.prototype.setRevenueType=function(t){return this.revenueType=t,this},e.prototype.setCurrency=function(t){return this.currency=t,this},e.prototype.setRevenue=function(t){return this.revenue=t,this},e.prototype.setReceipt=function(t){return this.receipt=t,this},e.prototype.setReceiptSig=function(t){return this.receiptSig=t,this},e.prototype.setEventProperties=function(t){return cy(t)&&(this.properties=t),this},e.prototype.getEventProperties=function(){var t=this.properties?W({},this.properties):{};return t[Or.REVENUE_PRODUCT_ID]=this.productId,t[Or.REVENUE_QUANTITY]=this.quantity,t[Or.REVENUE_PRICE]=this.price,t[Or.REVENUE_TYPE]=this.revenueType,t[Or.REVENUE_CURRENCY]=this.currency,t[Or.REVENUE]=this.revenue,t[Or.RECEIPT]=this.receipt,t[Or.RECEIPT_SIG]=this.receiptSig,t},e}(),Or;(function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"})(Or||(Or={}));var P6=function(e,t){var n=Math.max(t,1);return e.reduce(function(r,i,o){var s=Math.floor(o/n);return r[s]||(r[s]=[]),r[s].push(i),r},[])},pn;(function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"})(pn||(pn={}));var Xc="Amplitude Logger ",xl=function(){function e(){this.logLevel=pn.None}return e.prototype.disable=function(){this.logLevel=pn.None},e.prototype.enable=function(t){t===void 0&&(t=pn.Warn),this.logLevel=t},e.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<pn.Verbose||console.log("".concat(Xc,"[Log]: ").concat(t.join(" ")))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<pn.Warn||console.warn("".concat(Xc,"[Warn]: ").concat(t.join(" ")))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<pn.Error||console.error("".concat(Xc,"[Error]: ").concat(t.join(" ")))},e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<pn.Debug||console.log("".concat(Xc,"[Debug]: ").concat(t.join(" ")))},e}(),Wd=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:XP,logLevel:pn.Warn,loggerProvider:new xl,offline:!1,optOut:!1,serverUrl:QP,serverZone:"US",useBatch:!1}},eA=function(){function e(t){var n,r,i,o;this._optOut=!1;var s=Wd();this.apiKey=t.apiKey,this.flushIntervalMillis=(n=t.flushIntervalMillis)!==null&&n!==void 0?n:s.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||s.flushQueueSize,this.instanceName=t.instanceName||s.instanceName,this.loggerProvider=t.loggerProvider||s.loggerProvider,this.logLevel=(r=t.logLevel)!==null&&r!==void 0?r:s.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.offline=t.offline!==void 0?t.offline:s.offline,this.optOut=(i=t.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||s.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=(o=t.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var a=tA(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(t){this._optOut=t}
102,enumerable:!1,configurable:!0}),e}(),A6=function(e,t){return e==="EU"?t?o6:r6:t?i6:QP},tA=function(e,t,n){if(e===void 0&&(e=""),t===void 0&&(t=Wd().serverZone),n===void 0&&(n=Wd().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Wd().serverZone;return{serverZone:r,serverUrl:A6(r,n)}},O6=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(t,n){this.sdk.metrics.histogram[t]=n},e}();function M6(e){return e instanceof Error?e.message:String(e)}function Qc(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch{}return t}var N6=function(){function e(){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[]}return e.prototype.setup=function(t){var n;return B(this,void 0,void 0,function(){var r,i=this;return U(this,function(o){switch(o.label){case 0:return this.config=t,this.storageKey="".concat(YP,"_").concat(this.config.apiKey.substring(0,10)),[4,(n=this.config.storageProvider)===null||n===void 0?void 0:n.get(this.storageKey)];case 1:return r=o.sent(),r&&r.length>0&&Promise.all(r.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(t){var n=this;return t.insert_id||(t.insert_id=Co()),new Promise(function(r){var i={event:t,attempts:0,callback:function(o){return r(o)},timeout:0};n.queue.push(i),n.schedule(n.config.flushIntervalMillis),n.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(t){var n=this;return t.filter(function(r){return r.attempts+=1,r.attempts<n.config.flushMaxRetries?!0:(n.fulfillRequest([r],500,v6),!1)})},e.prototype.scheduleEvents=function(t){var n=this;t.forEach(function(r){n.schedule(r.timeout===0?n.config.flushIntervalMillis:r.timeout)})},e.prototype.schedule=function(t){var n=this;if(!this.config.offline&&(this.scheduleId===null||this.scheduleId&&t>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=t,this.scheduleId=setTimeout(function(){n.queue=n.queue.map(function(r){return r.timeout=0,r}),n.flush(!0)},t);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(t){return t===void 0&&(t=!1),B(this,void 0,void 0,function(){var n,r,i,o=this;return U(this,function(s){switch(s.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),n=[],r=[],this.queue.forEach(function(a){return a.timeout===0?n.push(a):r.push(a)}),i=P6(n,this.config.flushQueueSize),[4,i.reduce(function(a,u){return B(o,void 0,void 0,function(){return U(this,function(l){switch(l.label){case 0:return[4,a];case 1:return l.sent(),[4,this.send(u,t)];case 2:return[2,l.sent()]}})})},Promise.resolve())]);case 1:return s.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(t,n){return n===void 0&&(n=!0),B(this,void 0,void 0,function(){var r,i,o,s,a;return U(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(t,400,b6)];r={api_key:this.config.apiKey,events:t.map(function(l){var c=l.event;c.extra;var d=Ra(c,["extra"]);return d}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new O6,u.label=1;case 1:return u.trys.push([1,3,,4]),i=tA(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,r)];case 2:return o=u.sent(),o===null?(this.fulfillRequest(t,0,g6),[2]):n?(this.handleResponse(o,t),[3,4]):("body"in o?this.fulfillRequest(t,o.statusCode,"".concat(o.status,": ").concat(Qc(o))):this.fulfillRequest(t,o.statusCode,o.status),[2]);case 3:return s=u.sent(),a=M6(s),this.config.loggerProvider.error(a),this.handleResponse({status:ct.Failed,statusCode:0},t),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(t,n){var r=t.status;switch(r){case ct.Success:{this.handleSuccessResponse(t,n);break}case ct.Invalid:{this.handleInvalidResponse(t,n);break}case ct.PayloadTooLarge:{this.handlePayloadTooLargeResponse(t,n);break}case ct.RateLimit:{this.handleRateLimitResponse(t,n);break}default:{this.config.loggerProvider.warn(`{code: 0, error: "Status '`.concat(r,"' provided for ").concat(n.length,' events"}')),this.handleOtherResponse(n);break}}},e.prototype.handleSuccessResponse=function(t,n){this.fulfillRequest(n,t.statusCode,m6)},e.prototype.handleInvalidResponse=function(t,n){var r=this;if(t.body.missingField||t.body.error.startsWith(w6)){this.fulfillRequest(n,t.statusCode,t.body.error);return}var i=le(le(le(le([],X(Object.values(t.body.eventsWithInvalidFields)),!1),X(Object.values(t.body.eventsWithMissingFields)),!1),X(Object.values(t.body.eventsWithInvalidIdLengths)),!1),X(t.body.silencedEvents),!1).flat(),o=new Set(i),s=n.filter(function(u,l){if(o.has(l)){r.fulfillRequest([u],t.statusCode,t.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(Qc(t));
102var a=this.removeEventsExceedFlushMaxRetries(s);this.scheduleEvents(a)},e.prototype.handlePayloadTooLargeResponse=function(t,n){if(n.length===1){this.fulfillRequest(n,t.statusCode,t.body.error);return}this.config.loggerProvider.warn(Qc(t)),this.config.flushQueueSize/=2;var r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.handleRateLimitResponse=function(t,n){var r=this,i=Object.keys(t.body.exceededDailyQuotaUsers),o=Object.keys(t.body.exceededDailyQuotaDevices),s=t.body.throttledEvents,a=new Set(i),u=new Set(o),l=new Set(s),c=n.filter(function(f,p){if(f.event.user_id&&a.has(f.event.user_id)||f.event.device_id&&u.has(f.event.device_id)){r.fulfillRequest([f],t.statusCode,t.body.error);return}return l.has(p)&&(f.timeout=r.throttleTimeout),!0});c.length>0&&this.config.loggerProvider.warn(Qc(t));var d=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(d)},e.prototype.handleOtherResponse=function(t){var n=this,r=t.map(function(o){return o.timeout=o.attempts*n.retryTimeout,o}),i=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(i)},e.prototype.fulfillRequest=function(t,n,r){this.removeEvents(t),t.forEach(function(i){return i.callback(ua(i.event,n,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var t=this.queue.map(function(n){return n.event});this.config.storageProvider.set(this.storageKey,t)}},e.prototype.removeEvents=function(t){this.queue=this.queue.filter(function(n){return!t.some(function(r){return r.event.insert_id===n.event.insert_id})}),this.saveEvents()},e}(),D6=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:L6(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),L6=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},F6=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(t){this.receiver?this.receiver(t):this.queue.length<512&&this.queue.push(t)},e.prototype.setEventReceiver=function(t){this.receiver=t,this.queue.length>0&&(this.queue.forEach(function(n){t(n)}),this.queue=[])},e}(),Bi=function(){return Bi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Bi.apply(this,arguments)};function qd(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function xT(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}var Vd=function(e,t){var n,r,i=["string","number","boolean","undefined"],o=typeof e,s=typeof t;if(o!==s)return!1;try{for(var a=qd(i),u=a.next();!u.done;u=a.next()){var l=u.value;if(l===o)return e===t}}catch(y){n={error:y}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;var c=Array.isArray(e),d=Array.isArray(t);if(c!==d)return!1;if(c&&d){for(var f=0;f<e.length;f++)if(!Vd(e[f],t[f]))return!1}else{var p=Object.keys(e).sort(),h=Object.keys(t).sort();if(!Vd(p,h))return!1;var m=!0;return Object.keys(e).forEach(function(y){Vd(e[y],t[y])||(m=!1)}),m}return!0},j6="$set",U6="$unset",$6="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var B6=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var t=this,n=Bi({},this.identity.userProperties),r=Bi(Bi({},this.identity),{userProperties:n});return{setUserId:function(i){return r.userId=i,this},setDeviceId:function(i){return r.deviceId=i,this},setUserProperties:function(i){return r.userProperties=i,this},setOptOut:function(i){return r.optOut=i,this},updateUserProperties:function(i){var o,s,a,u,l,c,d=r.userProperties||{};try{for(var f=qd(Object.entries(i)),p=f.next();!p.done;p=f.next()){var h=xT(p.value,2),m=h[0],y=h[1];switch(m){case j6:try{for(var g=(a=void 0,qd(Object.entries(y))),v=g.next();!v.done;v=g.next()){var b=xT(v.value,2),S=b[0],x=b[1];d[S]=x}}catch(C){a={error:C}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(a)throw a.error}}break;case U6:try{for(var T=(l=void 0,qd(Object.keys(y))),_=T.next();!_.done;_=T.next()){var S=_.value;delete d[S]}}catch(C){l={error:C}}finally{try{_&&!_.done&&(c=T.return)&&c.call(T)}finally{if(l)throw l.error}}break;case $6:d={};break}}}catch(C){o={error:C}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}return r.userProperties=d,this},commit:function(){return t.setIdentity(r),this}}},e.prototype.getIdentity=function(){return Bi({},this.identity)},e.prototype.setIdentity=function(t){var n=Bi({},this.identity);this.identity=Bi({}
102,t),Vd(n,this.identity)||this.listeners.forEach(function(r){r(t)})},e.prototype.addIdentityListener=function(t){this.listeners.add(t)},e.prototype.removeIdentityListener=function(t){this.listeners.delete(t)},e}(),lu=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,nA=function(){function e(){this.identityStore=new B6,this.eventBridge=new F6,this.applicationContextProvider=new D6}return e.getInstance=function(t){return lu.analyticsConnectorInstances||(lu.analyticsConnectorInstances={}),lu.analyticsConnectorInstances[t]||(lu.analyticsConnectorInstances[t]=new e),lu.analyticsConnectorInstances[t]},e}(),ka=function(e){return e===void 0&&(e=XP),nA.getInstance(e)},z6=function(e,t){ka(t).identityStore.editIdentity().setUserId(e).commit()},H6=function(e,t){ka(t).identityStore.editIdentity().setDeviceId(e).commit()},W6=function(){function e(){this.name="identity",this.type="before",this.identityStore=ka().identityStore}return e.prototype.execute=function(t){return B(this,void 0,void 0,function(){var n;return U(this,function(r){return n=t.user_properties,n&&this.identityStore.editIdentity().updateUserProperties(n).commit(),[2,t]})})},e.prototype.setup=function(t){return B(this,void 0,void 0,function(){return U(this,function(n){return t.instanceName&&(this.identityStore=ka(t.instanceName).identityStore),[2]})})},e}(),rA=function(e,t){t===void 0&&(t=Date.now());var n=Date.now(),r=n-t;return r>e},iA=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Yp,t,e.substring(0,n)].filter(Boolean).join("_")},q6=function(e){return"".concat(Yp.toLowerCase(),"_").concat(e.substring(0,6))},V6=function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return(r=(n=(t=(e=navigator.languages)===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:navigator.language)!==null&&n!==void 0?n:i)!==null&&r!==void 0?r:""},Zf=function(){var e,t=xe();if(!(!((e=t==null?void 0:t.location)===null||e===void 0)&&e.search))return{};var n=t.location.search.substring(1).split("&").filter(Boolean),r=n.reduce(function(i,o){var s=o.split("=",2),a=CT(s[0]),u=CT(s[1]);return u&&(i[a]=u),i},{});return r},CT=function(e){e===void 0&&(e="");try{return decodeURIComponent(e)}catch{return""}},G6=function(e){var t=new Error().stack||"";return t.split(` 103`).slice(2+e).map(function(n){return n.trim()})},nt=function(e){return function(){var t=W({},e.config),n=t.loggerProvider,r=t.logLevel;return{logger:n,logLevel:r}}},K6=function(e,t){var n,r;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");try{for(var i=oe(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s in e)e=e[s];else return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},rt=function(e,t){return function(){var n,r,i={};try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=K6(e,a)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},De=function(e,t,n,r,i){return i===void 0&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),u=a.logger,l=a.logLevel;if(l&&l<pn.Debug||!l||!u)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:G6(1),time:{start:new Date().toISOString()},states:{}};r&&c.states&&(c.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=new Date().toISOString()),u.debug(JSON.stringify(c,null,2))}):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=new Date().toISOString()),u.debug(JSON.stringify(c,null,2))),d}},dy=function(e,t){return!t||!t.length?!0:t.some(function(n){return typeof n=="string"?e===n:e.match(n)})},Tu=function(e,t){var n=e;try{n=decodeURI(e)}catch(r){t==null||t.error("Malformed URI sequence: ",r)}return n},ep=function(e){var t=0;if(e.length===0)return t;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t},Y6=function(e,t){var n=ep(e.toString()),r=Math.abs(n),i=r*31,o=i%1e6;return o/1e6<t},IT=function(e,t){var n=ep(e.toString()),r=Math.abs(n),i=r*31,o=i%1e5;return o/1e5<t},nw=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return B(this,void 0,void 0,function(){return U(this,function(t){return[2,!0]})})},e.prototype.get=function(t){return B(this,void 0,void 0,function(){return U(this,function(n){return[2,this.memoryStorage.get(t)]})})},e.prototype.getRaw=function(t){return B(this,void 0,void 0,function(){var n;return U(this,function(r){switch(r.label){case 0:return[4,this.get(t)];case 1:return n=r.sent(),[2,n?JSON.stringify(n):void 0]}})})},e.prototype.set=function(t,n){return B(this,void 0,void 0,function(){return U(this,function(r){return this.memoryStorage.set(t,n),[2]})})},e.prototype.remove=function(t){return B(this,void 0,void 0,function(){return U(this,function(n){return this.memoryStorage.delete(t),[2]})})},e.prototype.reset=function(){return B(this,void 0,void 0,function(){return U(this,function(t){return this.memoryStorage.clear(),[2]})})},e}(),fy=function(){function e(t){this.options=W({},t)}return e.prototype.isEnabled=function(){return B(this,void 0,void 0,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:if(!xe())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,t.set(n,e.testValue)];case 2:return i.sent(),[4,t.get(n)];case 3:return r=i.sent(),[2,r===e.testValue];case 4:return i.sent(),[2,!1];case 5:return[4,t.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){var n;return B(this,void 0,void 0,function(){var r,i;return U(this,function(o){switch(o.label){case 0:return[4,this.getRaw(t)];case 1:if(r=o.sent(),!r)return[2,void 0];try{return i=(n=X6(r))!==null&&n!==void 0?n:Q6(r),i===void 0?(console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(t,", value: ").concat(r)),[2,void 0]):[2,JSON.parse(i)]}catch{return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(t,", value: ").concat(r)),[2,void 0]}return[2]}})})},e.prototype.getRaw=function(t){var n,r;return B(this,void 0,void 0,function(){var i,o,s;return U(this,function(a){return i=xe(),o=(r=(n=i==null?void 0:i.document)===null||n===void 0?void 0:n.cookie.split("; "))!==null&&r!==void 0?r:[],s=o.find(function(u){return u.indexOf(t+"=")===0}),s?[2,s.substring(t.length+1)]:[2,void 0]})})},e.prototype.set=function(t,n){var r;return B(this,void 0,void 0,function(){var i,o,s,a,u,l,c;return U(this,function(d){try{i=(r=this.options.expirationDays)!==null&&r!==void 0?r:0,o=n!==null?i:-1,s=void 0,o&&(a=new Date,a.setTime(a.getTime()+o*24*60*60*1e3),s=a),u="".concat(t,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(u+="; expires=".concat(s.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),l=xe(),l&&(l.document.cookie=u)}catch(f){c=f instanceof Error?f.message:String(f),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(t,". Error: ").concat(c))}return[2]})})},e.prototype.remove=function(t){return B(this,void 0,void 0,function(){return U(this,function(n){switch(n.label){case 0:return[4,this.set(t,null)];case 1:return n.sent(),[2]}})})},e.prototype.reset=function(){return B(this,void 0,void 0,function(){return U(this,function(t){return[2]})})},e}(),X6=function(e){try{return decodeURIComponent(atob(e))}catch{return}},Q6=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch{return}},RT=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Yp,t,e.substring(0,n)].filter(
103Boolean).join("_")},rw=function(){function e(t){this.storage=t}return e.prototype.isEnabled=function(){return B(this,void 0,void 0,function(){var t,n,r,i;return U(this,function(o){switch(o.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return o.sent(),[4,n.get(r)];case 3:return i=o.sent(),[2,i===t];case 4:return o.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return o.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){return B(this,void 0,void 0,function(){var n;return U(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(t)];case 1:return n=r.sent(),n?[2,JSON.parse(n)]:[2,void 0];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(t){var n;return B(this,void 0,void 0,function(){return U(this,function(r){return[2,((n=this.storage)===null||n===void 0?void 0:n.getItem(t))||void 0]})})},e.prototype.set=function(t,n){var r;return B(this,void 0,void 0,function(){return U(this,function(i){try{(r=this.storage)===null||r===void 0||r.setItem(t,JSON.stringify(n))}catch{}return[2]})})},e.prototype.remove=function(t){var n;return B(this,void 0,void 0,function(){return U(this,function(r){try{(n=this.storage)===null||n===void 0||n.removeItem(t)}catch{}return[2]})})},e.prototype.reset=function(){var t;return B(this,void 0,void 0,function(){return U(this,function(n){try{(t=this.storage)===null||t===void 0||t.clear()}catch{}return[2]})})},e}(),J6=10,Z6=1,Ce={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},kT={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},PT=function(){function e(t,n){this.dbPromise=null,this.logger=n,this.dbName="AMP_diagnostics_".concat(t.substring(0,10))}return e.isSupported=function(){var t;return((t=xe())===null||t===void 0?void 0:t.indexedDB)!==void 0},e.prototype.getDB=function(){return B(this,void 0,void 0,function(){return U(this,function(t){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var t=this;return new Promise(function(n,r){var i=indexedDB.open(t.dbName,Z6);i.onerror=function(){t.dbPromise=null,r(new Error("Failed to open IndexedDB"))},i.onsuccess=function(){var o=i.result;o.onclose=function(){t.dbPromise=null,t.logger.debug("DiagnosticsStorage: DB connection closed.")},o.onerror=function(s){t.logger.debug("DiagnosticsStorage: A global database error occurred.",s),o.close()},n(o)},i.onupgradeneeded=function(o){var s=o.target.result;t.createTables(s)}})},e.prototype.createTables=function(t){if(t.objectStoreNames.contains(Ce.TAGS)||t.createObjectStore(Ce.TAGS,{keyPath:"key"}),t.objectStoreNames.contains(Ce.COUNTERS)||t.createObjectStore(Ce.COUNTERS,{keyPath:"key"}),t.objectStoreNames.contains(Ce.HISTOGRAMS)||t.createObjectStore(Ce.HISTOGRAMS,{keyPath:"key"}),!t.objectStoreNames.contains(Ce.EVENTS)){var n=t.createObjectStore(Ce.EVENTS,{keyPath:"id",autoIncrement:!0});n.createIndex("time_idx","time",{unique:!1})}t.objectStoreNames.contains(Ce.INTERNAL)||t.createObjectStore(Ce.INTERNAL,{keyPath:"key"})},e.prototype.setTags=function(t){return B(this,void 0,void 0,function(){var n,r,i,o,s=this;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([Ce.TAGS],"readwrite"),i=r.objectStore(Ce.TAGS),[2,new Promise(function(u){var l=Object.entries(t);r.oncomplete=function(){u()},r.onabort=function(c){s.logger.debug("DiagnosticsStorage: Failed to set tags",c),u()},l.forEach(function(c){var d=X(c,2),f=d[0],p=d[1],h=i.put({key:f,value:p});h.onerror=function(m){s.logger.debug("DiagnosticsStorage: Failed to set tag",f,p,m)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",o),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(t){return B(this,void 0,void 0,function(){var n,r,i,o,s=this;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([Ce.COUNTERS],"readwrite"),i=r.objectStore(Ce.COUNTERS),[2,new Promise(function(u){var l=Object.entries(t);r.oncomplete=function(){u()},r.onabort=function(c){s.logger.debug("DiagnosticsStorage: Failed to increment counters",c),u()},l.forEach(function(c){var d=X(c,2),f=d[0],p=d[1],h=i.get(f);h.onsuccess=function(){var m=h.result,y=m?m.value:0,g=i.put({key:f,value:y+p});g.onerror=function(v){s.logger.debug("DiagnosticsStorage: Failed to update counter",f,v)}},h.onerror=function(m){s.logger.debug("DiagnosticsStorage: Failed to read existing counter",f,m)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",o),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(t){return B(this,void 0,void 0,function(){var n,r,i,o,s=this;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];
103case 1:return n=a.sent(),r=n.transaction([Ce.HISTOGRAMS],"readwrite"),i=r.objectStore(Ce.HISTOGRAMS),[2,new Promise(function(u){var l=Object.entries(t);r.oncomplete=function(){u()},r.onabort=function(c){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",c),u()},l.forEach(function(c){var d=X(c,2),f=d[0],p=d[1],h=i.get(f);h.onsuccess=function(){var m=h.result,y;m?y={key:f,count:m.count+p.count,min:Math.min(m.min,p.min),max:Math.max(m.max,p.max),sum:m.sum+p.sum}:y={key:f,count:p.count,min:p.min,max:p.max,sum:p.sum};var g=i.put(y);g.onerror=function(v){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",f,v)}},h.onerror=function(m){s.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",f,m)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",o),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(t){return B(this,void 0,void 0,function(){var n,r,i,o,s=this;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t.length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([Ce.EVENTS],"readwrite"),i=r.objectStore(Ce.EVENTS),[2,new Promise(function(u){r.oncomplete=function(){u()},r.onabort=function(c){s.logger.debug("DiagnosticsStorage: Failed to add event records",c),u(
103)};var l=i.count();l.onsuccess=function(){var c=l.result,d=Math.max(0,J6-c);d<t.length&&s.logger.debug("DiagnosticsStorage: Only added ".concat(d," of ").concat(t.length," events due to storage limit")),t.slice(0,d).forEach(function(f){var p=i.add(f);p.onerror=function(h){s.logger.debug("DiagnosticsStorage: Failed to add event record",h)}})},l.onerror=function(c){s.logger.debug("DiagnosticsStorage: Failed to count existing events",c)}})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",o),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(t,n){return B(this,void 0,void 0,function(){var r,i,o,s;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=a.sent(),i=r.transaction([Ce.INTERNAL],"readwrite"),o=i.objectStore(Ce.INTERNAL),[2,new Promise(function(u,l){i.onabort=function(){return l(new Error("Failed to set internal value"))};var c=o.put({key:t,value:n});c.onsuccess=function(){return u()},c.onerror=function(){return l(new Error("Failed to set internal value"))}})];case 2:return s=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",s),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(t){return B(this,void 0,void 0,function(){var n,r,i,o;return U(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=s.sent(),r=n.transaction([Ce.INTERNAL],"readonly"),i=r.objectStore(Ce.INTERNAL),[2,new Promise(function(a,u){r.onabort=function(){return u(new Error("Failed to get internal value"))};var l=i.get(t);l.onsuccess=function(){return a(l.result)},l.onerror=function(){return u(new Error("Failed to get internal value"))}})];case 2:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",o),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return B(this,void 0,void 0,function(){var t,n;return U(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getInternal(kT.LAST_FLUSH_TIMESTAMP)];case 1:return t=r.sent(),[2,t?parseInt(t.value,10):void 0];case 2:return n=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",n),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(t){return B(this,void 0,void 0,function(){var n;return U(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.setInternal(kT.LAST_FLUSH_TIMESTAMP,t.toString())];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",n),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(t,n){return new Promise(function(r,i){var o=t.objectStore(n),s=o.clear();s.onsuccess=function(){return r()},s.onerror=function(){return i(new Error("Failed to clear table ".concat(n)))}})},e.prototype.getAllAndClear=function(){return B(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u;return U(this,function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),[4,this.getDB()];case 1:return t=l.sent(),n=t.transaction([Ce.TAGS,Ce.COUNTERS,Ce.HISTOGRAMS,Ce.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(n,Ce.TAGS),this.getAllFromStore(n,Ce.COUNTERS),this.getAllFromStore(n,Ce.HISTOGRAMS),this.getAllFromStore(n,Ce.EVENTS)])];case 2:return r=X.apply(void 0,[l.sent(),4]),i=r[0],o=r[1],s=r[2],a=r[3],[4,Promise.all([this.clearTable(n,Ce.COUNTERS),this.clearTable(n,Ce.HISTOGRAMS),this.clearTable(n,Ce.EVENTS)])];case 3:return l.sent(),[2,{tags:i,counters:o,histogramStats:s,events:a}];case 4:return u=l.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",u),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(t,n){return new Promise(function(r,i){var o=t.objectStore(n),s=o.getAll();s.onsuccess=function(){return r(s.result)},s.onerror=function(){return i(new Error("Failed to get all from ".concat(n)))}})},e}(),eG=1e3,Jc=5*60*1e3,tG="https://diagnostics.prod.us-west-2.amplitude.com/v1/capture",nG="https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",_m=1e4,rG=10,iG=function(){function e(t,n,r,i){r===void 0&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=t,this.logger=n,this.serverUrl=r==="US"?tG:nG,this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(i,null,2)),this.config=W({enabled:!0,sampleRate:0},i),this.startTimestamp=Date.now(),this.shouldTrack=IT(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,PT.isSupported()?this.storage=new PT(t,n):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval()}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(t,n){if(this.isStorageAndTrackEnabled()){if
103(Object.keys(this.inMemoryTags).length>=_m){this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");return}this.inMemoryTags[t]=n,this.startTimersIfNeeded()}},e.prototype.increment=function(t,n){if(n===void 0&&(n=1),!!this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=_m){this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");return}this.inMemoryCounters[t]=(this.inMemoryCounters[t]||0)+n,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(t,n){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=_m){this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");return}var r=this.inMemoryHistograms[t];r?(r.count+=1,r.min=Math.min(r.min,n),r.max=Math.max(r.max,n),r.sum+=n):this.inMemoryHistograms[t]={count:1,min:n,max:n,sum:n},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(t,n){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=rG){this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");return}this.inMemoryEvents.push({event_name:t,time:Date.now(),event_properties:n}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var t=this;this.saveTimer||(this.saveTimer=setTimeout(function(){t.saveAllDataToStorage().catch(function(n){t.logger.debug("DiagnosticsClient: Failed to save all data to storage",n)}).finally(function(){t.saveTimer=null})},eG)),this.flushTimer||(this.flushTimer=setTimeout(function(){t._flush().catch(function(n){t.logger.debug("DiagnosticsClient: Failed to flush",n)}).finally(function(){t.flushTimer=null})},Jc))},e.prototype.saveAllDataToStorage=function(){return B(this,void 0,void 0,function(){var t,n,r,i;return U(this,function(o){switch(o.label){case 0:return this.storage?(t=W({},this.inMemoryTags),n=W({},this.inMemoryCounters),r=W({},this.inMemoryHistograms),i=le([],X(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(t),this.storage.incrementCounters(n),this.storage.setHistogramStats(r),this.storage.addEventRecords(i)])]):[2];case 1:return o.sent(),[2]}})})},e.prototype._flush=function(){return B(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u,l,c;return U(this,function(d){switch(d.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return d.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return t=d.sent(),n=t.tags,r=t.counters,i=t.histogramStats,o=t.events,this.storage.setLastFlushTimestamp(Date.now()),s={},n.forEach(function(f){s[f.key]=f.value}),a={},r.forEach(function(f){a[f.key]=f.value}),u={},i.forEach(function(f){u[f.key]={count:f.count,min:f.min,max:f.max,avg:Math.round(f.sum/f.count*100)/100}}),l=o.map(function(f){return{event_name:f.event_name,time:f.time,event_properties:f.event_properties}}),Object.keys(a).length===0&&Object.keys(u).length===0&&l.length===0?[2]:(c={tags:s,histogram:u,counters:a,events:l},this.fetch(c),[2])}})})},e.prototype.fetch=function(t){return B(this,void 0,void 0,function(){var n,r;return U(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!xe())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return n=i.sent(),n.ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return r=i.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",r),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return B(this,void 0,void 0,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:return this.storage?(t=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return n=i.sent()||-1,n===-1?(this.storage.setLastFlushTimestamp(t),this._setFlushTimer(Jc),[2]):(r=t-n,r>=Jc?(this._flush(),[2]):(this._setFlushTimer(Jc-r),[2]))}})})},e.prototype._setFlushTimer=function(t){var n=this;this.flushTimer=setTimeout(function(){n._flush().catch(function(r){n.logger.debug("DiagnosticsClient: Failed to flush",r)}).finally(function(){n.flushTimer=null})},t)},e.prototype._setSampleRate=function(t){this.logger.debug("DiagnosticsClient: Setting sample rate to",t),this.config.sampleRate=t,this.shouldTrack=IT(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),Qp=function(){function e(){}return e.prototype.send=function(t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(t){var n,r,i,o,s,a,u,l,c,d,f,p,h,m,y,g,v,b,S,x,T,_;if(typeof t!="object")return null;var C=t.code||0,I=this.buildStatus(C);switch(I){case ct.Success:return{status:I,statusCode:C,body:{eventsIngested:(n=t.events_ingested)!==null&&n!==void 0?n:0,payloadSizeBytes:(r=t.payload_size_bytes)!==null&&r!==void 0?r:0,serverUploadTime:(i=t.server_upload_time)!==null&&i!==void 0?i:0}};case ct.Invalid:return{status:I,statusCode:C,body:{error:(o=t.error)!==null&&o!==void 0?o:"",missingField:(s=t.missing_field)!==null&&s!==void 0?s:"",eventsWithInvalidFields:(a=t.events_with_invali
vendor: 5,944 bytes, line 103
103d_fields)!==null&&a!==void 0?a:{},eventsWithMissingFields:(u=t.events_with_missing_fields)!==null&&u!==void 0?u:{},eventsWithInvalidIdLengths:(l=t.events_with_invalid_id_lengths)!==null&&l!==void 0?l:{},epsThreshold:(c=t.eps_threshold)!==null&&c!==void 0?c:0,exceededDailyQuotaDevices:(d=t.exceeded_daily_quota_devices)!==null&&d!==void 0?d:{},silencedDevices:(f=t.silenced_devices)!==null&&f!==void 0?f:[],silencedEvents:(p=t.silenced_events)!==null&&p!==void 0?p:[],throttledDevices:(h=t.throttled_devices)!==null&&h!==void 0?h:{},throttledEvents:(m=t.throttled_events)!==null&&m!==void 0?m:[]}};case ct.PayloadTooLarge:return{status:I,statusCode:C,body:{error:(y=t.error)!==null&&y!==void 0?y:""}};case ct.RateLimit:return{status:I,statusCode:C,body:{error:(g=t.error)!==null&&g!==void 0?g:"",epsThreshold:(v=t.eps_threshold)!==null&&v!==void 0?v:0,throttledDevices:(b=t.throttled_devices)!==null&&b!==void 0?b:{},throttledUsers:(S=t.throttled_users)!==null&&S!==void 0?S:{},exceededDailyQuotaDevices:(x=t.exceeded_daily_quota_devices)!==null&&x!==void 0?x:{},exceededDailyQuotaUsers:(T=t.exceeded_daily_quota_users)!==null&&T!==void 0?T:{},throttledEvents:(_=t.throttled_events)!==null&&_!==void 0?_:[]}};case ct.Timeout:default:return{status:I,statusCode:C}}},e.prototype.buildStatus=function(t){return t>=200&&t<300?ct.Success:t===429?ct.RateLimit:t===413?ct.PayloadTooLarge:t===408?ct.Timeout:t>=400&&t<500?ct.Invalid:t>=500?ct.Failed:ct.Unknown},e}(),oA=function(e){Ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(n,r){return B(this,void 0,void 0,function(){var i,o,s;return U(this,function(a){switch(a.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(r),method:"POST"},[4,fetch(n,i)];case 1:return o=a.sent(),[4,o.text()];case 2:s=a.sent();try{return[2,this.buildResponse(JSON.parse(s))]}catch{return[2,this.buildResponse({code:o.status})]}return[2]}})})},t}(Qp),oG=function(){function e(t,n){this.key="AMP_remote_config_".concat(t.substring(0,10)),this.logger=n}return e.prototype.fetchConfig=function(){var t=null,n={remoteConfig:null,lastFetch:new Date};try{t=localStorage.getItem(this.key)}catch(i){return this.logger.debug("Remote config localstorage failed to access: ",i),Promise.resolve(n)}if(t===null)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(n);try{var r=JSON.parse(t);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(i){return this.logger.debug("Remote config localstorage failed to parse: ",i),localStorage.removeItem(this.key),Promise.resolve(n)}},e.prototype.setConfig=function(t){try{return localStorage.setItem(this.key,JSON.stringify(t)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(n){this.logger.debug("Remote config localstorage failed to set: ",n)}return Promise.resolve(!1)},e}(),sG="https://sr-client-cfg.amplitude.com/config",aG="https://sr-client-cfg.eu.amplitude.com/config",uG=3,lG=1e3,sA=function(){function e(t,n,r,i){r===void 0&&(r="US"),this.callbackInfos=[],this.apiKey=t,this.serverUrl=i||(r==="US"?sG:aG),this.logger=n,this.storage=new oG(t,n)}return e.prototype.subscribe=function(t,n,r){var i=Co(),o={id:i,key:t,deliveryMode:n,callback:r};return this.callbackInfos.push(o),n==="all"?this.subscribeAll(o):this.subscribeWaitForRemote(o,n.timeout),i},e.prototype.unsubscribe=function(t){var n=this.callbackInfos.findIndex(function(r){return r.id===t});return n===-1?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(t," doesn't exist.")),!1):(this.callbackInfos.splice(n,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(t,".")),!0)},e.prototype.updateConfigs=function(){return B(this,void 0,void 0,function(){var t,n=this;return U(this,function(r){switch(r.label){case 0:return[4,this.fetch()];case 1:return t=r.sent(),this.storage.setConfig(t),this.callbackInfos.forEach(function(i){n.sendCallback(i,t,"remote")}),[2]}})})},e.prototype.subscribeAll=function(t){return B(this,void 0,void 0,function(){var n,r,i,o=this;return U(this,function(s){switch(s.label){case 0:return n=this.fetch().then(function(a){o.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(a))),o.sendCallback(t,a,"remote"),o.storage.setConfig(a)}),r=this.storage.fetchConfig().then(function(a){return a}),[4,Promise.race([n,r])];case 1:return i=s.sent(),i!==void 0&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(i))),this.sendCallback(t,i,"cache")),[4,n];case 2:return s.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(t,n){return B(this,void 0,void 0,function(){var r,i,i;return U(this,function(o){switch(o.label){case 0:r=new Promise(function(s,a){setTimeout(function(){a("Timeout exceeded")},n)}),o.label=1;case 1:return o.trys.push([1,3,,5]),[4,Promise.race([this.fetch(),r])];case 2:return i=o.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(t,i,"remote"),this.storage.setConfig(i),[3,5];case 3:return o.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return i=o.sent(),i.remoteConfig!==null?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(t,i,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(t,i,"remote")),[3,5];case 5:return[2]}})})}
103,e.prototype.sendCallback=function(t,n,r){t.lastCallback=new Date;var i;t.key?i=t.key.split(".").reduce(function(o,s){return o===null?o:s in o?o[s]:null},n.remoteConfig):i=n.remoteConfig,t.callback(i,r,n.lastFetch)},e.prototype.fetch=function(t,n){return t===void 0&&(t=uG),n===void 0&&(n=lG),B(this,void 0,void 0,function(){var r,i,o,s,a,u,l=this;return U(this,function(c){switch(c.label){case 0:r=n/t,i={remoteConfig:null,lastFetch:new Date},o=function(d){var f,p,h,m,y,g;return U(this,function(v){switch(v.label){case 0:f=new AbortController,p=setTimeout(function(){return f.abort()},n),v.label=1;case 1:return v.trys.push([1,7,8,9]),[4,fetch(s.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:f.signal})];case 2:return h=v.sent(),h.ok?[3,4]:[4,h.text()];case 3:return m=v.sent(),s.logger.debug("Remote config client fetch with retry time ".concat(t," failed with ").concat(h.status,": ").concat(m)),[3,6];case 4:return[4,h.json()];case 5:return y=v.sent(),[2,{value:{remoteConfig:y,lastFetch:new Date}}];case 6:return[3,9];case 7:return g=v.sent(),g instanceof Error&&g.name==="AbortError"?s.logger.debug("Remote config client fetch with retry time ".concat(t," timed out after ").concat(n,"ms")):s.logger.debug("Remote config client fetch with retry time ".concat(t," is rejected because: "),g),[3,9];case 8:return clearTimeout(p),[7];case 9:return d<t-1?[4,new Promise(function(b){return setTimeout(b,l.getJitterDelay(r))})]:[3,11];case 10:v.sent(),v.label=11;case 11:return[2]}})},s=this,a=0,c.label=1;case 1:return a<t?[5,o(a)]:[3,4];case 2:if(u=c.sent(),typeof u=="object")return[2,u.value];c.label=3;case 3:return a++,[3,1];case 4:return[2,i]}})})},e.prototype.getJitterDelay=function(t){return Math.floor(Math.random()*t)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}(),Cl;(function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"})(Cl||(Cl={}));var cG=null,dG=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],aA="data-amp-track-",fG=["div","span","h1","h2","h3","h4","h5","h6"],pG=["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]'],hG=le(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],X(pG),!1),mG=["*"],gG=1e3,vG=4,yG=50;function bG(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||e===void 0}function uA(e,t,n){if(e){var r=t.map(AT),i=n.map(AT);lA({json:e,allowlist:r,excludelist:i,ancestors:[]})}}function lA(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,s=e.excludelist,a=e.ancestors,u=e.parentObject,l=e.targetKey;i||(i=r);var c=Object.keys(i);try{for(var d=oe(c),f=d.next();!f.done;f=d.next()){var p=f.value,h=le(le([],X(a),!1),[p],!1);bG(i[p])?(!OT(h,o)||OT(h,s))&&delete i[p]:lA({json:r,targetObject:i[p],allowlist:o,excludelist:s,ancestors:h,parentObject:i,targetKey:p})}}catch(m){t={error:m}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}Object.keys(i).length===0&&u&&l&&delete u[l]}function AT(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(t){return t.replace(/~0/g,"~").replace(/~1/g,"/")})}function py(e,t,n,r){if(n===void 0&&(n=0),r===void 0&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&t[r]==="**";)r++;return r===t.length}var i=t[r];if(i==="**"){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(py(e,t,o,r+1))return!0;return!1}else return i==="*"||i===e[n]?py(e,t,n+1,r+1):!1}function OT(e,t){return t.some(function(n){return py(e,n)})}var wG=500,cA=100,SG=function(){function e(t){this.request=t}return e.prototype.headers=function(t){var n,r;t===void 0&&(t=[]);var i=this.request.headers,o={};if(Array.isArray(i))i.forEach(function(d){var f=X(d,2),p=f[0],h=f[1];o[p]=h});else if(i instanceof Headers)i.forEach(function(d,f){o[f]=d});else if(typeof i=="object"&&i!==null)try{for(var s=oe(Object.entries(i)),a=s.next();!a.done;a=s.next()){var u=X(a.value,2),l=u[0],c=u[1];o[l]=c}}catch(d){n={error:d}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Jp(o,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(typeof this._bodySize=="number")return this._bodySize;var t=xe();if(t!=null&&t.TextEncoder){var n=this.request.body;return this._bodySize=dA(n,cA),this._bodySize}}
103,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return typeof this.request.body=="string"?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),B(this,void 0,void 0,function(){var r;return U(this,function(i){return t.length===0?[2,null]:(r=this.body,[2,iw(r,t,n)])})})},e}(),_G=function(){function e(t,n){this.bodyRaw=t,this.requestHeaders=n}return e.prototype.headers=function(t){return t===void 0&&(t=[]),Jp(this.requestHeaders,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return dA(this.bodyRaw,cA)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return typeof this.bodyRaw=="string"?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),B(this,void 0,void 0,function(){var r;return U(this,function(i){return t.length===0?[2,null]:(r=this.body,[2,iw(r,t,n)])})})},e}();function dA(e,t){var n,r,i,o=xe(),s=o==null?void 0:o.TextEncoder;if(s){var a;if(typeof e=="string")a=e,i=new s().encode(a).length;else if(e instanceof Blob)a=e,i=a.size;else if(e instanceof URLSearchParams)a=e,i=new s().encode(a.toString()).length;else if(ArrayBuffer.isView(e))a=e,i=a.byteLength;else if(e instanceof ArrayBuffer)a=e,i=a.byteLength;else if(e instanceof FormData){var u=e,l=0,c=0;try{for(var d=oe(u.entries()),f=d.next();!f.done;f=d.next()){var p=X(f.value,2),h=p[0],m=p[1];if(l+=h.length,typeof m=="string")l+=new s().encode(m).length;else if(m instanceof Blob)l+=m.size;else return;if(++c>=t)return}}catch(y){n={error:y}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}i=l}else if(e instanceof ReadableStream){a=e;return}return i}}var EG=function(){function e(t){this.response=t}return e.prototype.headers=function(t){var n;if(t===void 0&&(t=[]),this.response.headers instanceof Headers){var r=this.response.headers,i={};return(n=r==null?void 0:r.forEach)===null||n===void 0||n.call(r,function(o,s){i[s]=o}),Jp(i,{allow:t})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var t,n;if(this._bodySize!==void 0)return this._bodySize;var r=(n=(t=this.response.headers)===null||t===void 0?void 0:t.get)===null||n===void 0?void 0:n.call(t,"content-length"),i=r?parseInt(r,10):void 0;return this._bodySize=i,i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return B(this,void 0,void 0,function(){var t,n,r;return U(this,function(i){switch(i.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),i.label=1;case 1:return i.trys.push([1,3,,4]),t=this.clonedResponse.text(),n=new Promise(function(o){return setTimeout(function(){return o(null)},wG)}),[4,Promise.race([t,n])];case 2:return r=i.sent(),[2,r];case 3:return i.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),B(this,void 0,void 0,function(){var r;return U(this,function(i){switch(i.label){case 0:return t.length===0?[2,null]:[4,this.text()];case 1:return r=i.sent(),[2,iw(r,t,n)]}})})},e}(),TG=function(){function e(t,n,r,i){this.statusCode=t,this.headersString=n,this.size=r,this.getJson=i}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(t){var n,r;if(t===void 0&&(t=[]),!this.headersString)return{};var i={},o=this.headersString.split(`\r 104`);try{for(var s=oe(o),a=s.next();!a.done;a=s.next()){var u=a.value,l=X(u.split(": "),2),c=l[0],d=l[1];c&&d&&(i[c]=d)}}catch(f){n={error:f}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Jp(i,{allow:t})},e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),B(this,void 0,void 0,function(){var r;return U(this,function(i){return t.length===0?[2,null]:(r=this.getJson(),r?(uA(r,t,n),[2,r]):[2,null])})})},e}();function iw(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return uA(r,t,n),r}catch{return null}}var Bu;(function(e){e.REDACT="redact",e.REMOVE="remove"})(Bu||(Bu={}));var MT="[REDACTED]",Jp=function(e,t){var n,r,i=t.allow,o=i===void 0?[]:i,s=t.strategy,a=s===void 0?Bu.REMOVE:s,u=le([],X(f6),!1),l={},c=function(h){var m=h.toLowerCase();u.find(function(y){return y.toLowerCase()===m})?a===Bu.REDACT&&(l[h]=MT):o.find(function(y){return y.toLowerCase()===m})?l[h]=e[h]:a===Bu.REDACT&&(l[h]=MT)};try{for(var d=oe(Object.keys(e)),f=d.next();!f.done;f=d.next()){var p=f.value;c(p)}}catch(h){n={error:h}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return l},xG=function(){function e(t,n,r,i,o,s,a,u,l,c,d){a===void 0&&(a=0),this.type=t,this.method=n,this.timestamp=r,this.startTime=i,this.url=o,this.requestWrapper=s,this.status=a,this.duration=u,this.responseWrapper=l,this.error=c,this.endTime=d}return e.prototype.toSerializable=function(){var t,n,r,i,o={type:this.t
104ype,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:(t=this.requestWrapper)===null||t===void 0?void 0:t.headers(le([],X(Jf),!1)),requestBodySize:(n=this.requestWrapper)===null||n===void 0?void 0:n.bodySize,responseHeaders:(r=this.responseWrapper)===null||r===void 0?void 0:r.headers(le([],X(Jf),!1)),responseBodySize:(i=this.responseWrapper)===null||i===void 0?void 0:i.bodySize};return Object.fromEntries(Object.entries(o).filter(function(s){var a=X(s,2);a[0];var u=a[1];return u!==void 0}))},e}();function CG(e){return typeof e=="object"&&e!==null&&"url"in e&&"method"in e}var IG=function(){function e(t,n){n===void 0&&(n=Co()),this.callback=t,this.id=n}return e}(),RG=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=xe();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var t=xe();return!!t&&!!t.fetch},e.prototype.subscribe=function(t,n){var r,i,o,s,a,u,l,c,d,f;if(this.logger||(this.logger=n),this.eventCallbacks.set(t.id,t),!this.isObserving){var p=(o=(i=(r=this.globalScope)===null||r===void 0?void 0:r.XMLHttpRequest)===null||i===void 0?void 0:i.prototype)===null||o===void 0?void 0:o.open,h=(u=(a=(s=this.globalScope)===null||s===void 0?void 0:s.XMLHttpRequest)===null||a===void 0?void 0:a.prototype)===null||u===void 0?void 0:u.send,m=(d=(c=(l=this.globalScope)===null||l===void 0?void 0:l.XMLHttpRequest)===null||c===void 0?void 0:c.prototype)===null||d===void 0?void 0:d.setRequestHeader;p&&h&&m&&this.observeXhr(p,h,m);var y=(f=this.globalScope)===null||f===void 0?void 0:f.fetch;y&&this.observeFetch(y),this.isObserving=!0}},e.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id)},e.prototype.triggerEventCallbacks=function(t){var n=this;this.eventCallbacks.forEach(function(r){var i;try{r.callback(t)}catch(o){(i=n.logger)===null||i===void 0||i.debug("an unexpected error occurred while triggering event callbacks",o)}})},e.prototype.handleNetworkRequestEvent=function(t,n,r,i,o,s,a){var u;if(!(s===void 0||a===void 0)){var l,c="GET";if(CG(n)?(l=n.url,c=n.method):l=(u=n==null?void 0:n.toString)===null||u===void 0?void 0:u.call(n),l)try{var d=new URL(l);l="".concat(d.protocol,"//").concat(d.host).concat(d.pathname).concat(d.search).concat(d.hash)}catch{}c=(r==null?void 0:r.method)||c;var f,p;i&&(f=i.status),o&&(p={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},f=0);var h=Math.floor(performance.now()-a),m=Math.floor(s+h),y=new xG(t,c,s,s,l,r,f,h,i,p,m);this.triggerEventCallbacks(y)}},e.prototype.getTimestamps=function(){var t,n;return{startTime:(t=Date.now)===null||t===void 0?void 0:t.call(Date),durationStart:(n=performance==null?void 0:performance.now)===null||n===void 0?void 0:n.call(performance)}},e.prototype.observeFetch=function(t){var n=this;!this.globalScope||!t||(this.globalScope.fetch=function(r,i){return B(n,void 0,void 0,function(){var o,s,a,u,l,c;return U(this,function(d){switch(d.label){case 0:try{o=this.getTimestamps()}catch(f){(l=this.logger)===null||l===void 0||l.debug("an unexpected error occurred while retrieving timestamps",f)}d.label=1;case 1:return d.trys.push([1,3,,4]),[4,t(r,i)];case 2:return s=d.sent(),[3,4];case 3:return u=d.sent(),a=u,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,i?new SG(i):void 0,s?new EG(s):void 0,a,o==null?void 0:o.startTime,o==null?void 0:o.durationStart)}catch(f){(c=this.logger)===null||c===void 0||c.debug("an unexpected error occurred while handling fetch",f)}if(s)return[2,s];throw a}})})})},e.createXhrJsonParser=function(t,n){return function(){var r,i;try{if(t.responseType==="json"){if(!((r=n.globalScope)===null||r===void 0)&&r.structuredClone)return n.globalScope.structuredClone(t.response)}else if(["text",""].includes(t.responseType))return JSON.parse(t.responseText)}catch(o){return o instanceof Error&&o.name==="InvalidStateError"&&((i=n.logger)===null||i===void 0||i.error("unexpected error when retrieving responseText. responseType='".concat(t.responseType,"'"))),null}return null}},e.prototype.observeXhr=function(t,n,r){if(!(!this.globalScope||!t||!n)){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var s,a,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];var c=this,d=X(u,2),f=d[0],p=d[1];try{c.$$AmplitudeAnalyticsEvent=W({method:f,url:(s=p==null?void 0:p.toString)===null||s===void 0?void 0:s.call(p),headers:{}},o.getTimestamps())}catch(h){(a=o.logger)===null||a===void 0||a.error("an unexpected error occurred while calling xhr open",h)}return t.apply(c,u)},i.send=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u=this,l=u,c=e.createXhrJsonParser(u,o),d=s[0],f=l.$$AmplitudeAnalyticsEvent;return l.addEventListener("loadend",function(){var p;try{var h=l.getAllResponseHeaders(),m=l.getResponseHeader("content-length"),y=new TG(l.status,h,m?parseInt(m,10):void 0,c),g=l.$$AmplitudeAnalyticsEvent.headers,v=new _G(d,g);f.status=l.status,o.handleNetworkRequestEvent("xhr",{url:f.url,method:f.method},v,y,void 0,f.startTime,f.durationStart)}catch(b){(p=o.logger)===null||p===void 0||p.error("an unexpected error occurred while handling xhr send",b)}}),n.apply(l,s)},i.setRequestHeader=function(s,a){var u,l=this;try{l.$$AmplitudeAnalyticsEvent.headers[s]=a}catch(c){(u=o.logger)===null||u===void 0||u.error("an unexpected error occurred while calling xhr setRequestHeader",c)}r.apply(l,[s,a])}}},e}(),NT=new RG,fA=function(){function e(){}return e.prototype.parse=function(){return B(this,void 0,void 0,function(){return U(this,function(t){return[2,W(W(W(W({},Xp),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var t=Zf(),n=t[s6],r=t[a6],i=t[u6],o=t[l6],s=t[c6],a=t[d6];return{utm_campaign:n,utm_content:r,utm_id:i,utm_medium:o,utm_source:s,utm_term:a}},e.prototype.getReferrer=function(){var t,n,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=(n=(t=r.referrer)===null||t===void 0?void 0:t.split("/")[2])!==null&&n!==void 0?n:void 0}catch{}return r},e.prototype.getClickIds=function(){var t,n=Zf();return t={},t[pT]=n[pT],t[hT]=n[hT],t[mT]=n[mT],t[gT]=n[gT],t[vT]=n[vT],t[yT]=n[yT],t[bT]=n[bT],t[wT]=n[wT],t[ST]=n[ST],t[_T]=n[_T],t[ET]=n[ET],t},e}(),zu="data-amp-mask",Qi="*****",kG=/\b(?:\d[ -]*?){13,16}\b/,PG=/(\d{3}-?\d{2}-?\d{4})/g,AG=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,ow=function(e,t){var n,r;if(t===void 0&&(t=[]),typeof e!="string")return"";var i=e;i=i.replace(kG,Qi),i=i.replace(PG,Qi),i=i.replace(AG,Qi);try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,Qi)}catch{}}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},sw=function(e){if(typeof document>"u"||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(zu)?Qi:e?e(document.title):document.title},Ga=function(e,t){return typeof e=="boolean"?e:(e==null?void 0:e[t])!==!1},pA=function(e){return Ga(e,"attribution")},OG=function(e){return Ga(e,"fileDownloads")},MG=function(e){return Ga(e,"formInteractions")},hA=function(e){return Ga(e,"pageViews")},DT=function(e){return Ga(e,"sessions")},NG=function(e){return Ga(e,"pageUrlEnrichment")},mA=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.networkTracking===!0||typeof e.networkTracking=="object")},gA=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.elementInteractions===!0||typeof e.elementInteractions=="object")},DG=function(e){return typeof e=="boolean"?e:typeof e=="object"&&e.webVitals===!0},vA=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.frustrationInteractions===!0||typeof e.frustrationInteractions=="object")},LG=function(e){if(gA(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.elementInteractions=="object")return e.autocapture.elementInteractions},FG=function(e){if(vA(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.frustrationInteractions=="object")return e.autocapture.frustrationInteractions},jG=function(e){var t;if(mA(e.autocapture)){var n=void 0;
104return typeof e.autocapture=="object"&&typeof e.autocapture.networkTracking=="object"?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),W(W({},n),{captureRules:(t=n==null?void 0:n.captureRules)===null||t===void 0?void 0:t.map(function(r){var i,o,s;if(!((i=r.urls)===null||i===void 0)&&i.length&&(!((o=r.hosts)===null||o===void 0)&&o.length)){var a=JSON.stringify(r.hosts),u=JSON.stringify(r.urls);return(s=e.loggerProvider)===null||s===void 0||s.warn("Found network capture rule with both urls='".concat(u,"' and hosts='").concat(a,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),W(W({},r),{hosts:void 0})}return r})})}},UG=function(e){var t=function(){return!1},n=void 0,r,i=e.pageCounter,o=hA(e.defaultTracking);return o&&(t=void 0,r=void 0,e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.pageViews&&typeof e.defaultTracking.pageViews=="object"&&("trackOn"in e.defaultTracking.pageViews&&(t=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(r=e.defaultTracking.pageViews.eventType))),{trackOn:t,trackHistoryChanges:n,eventType:r,pageCounter:i}},$G=function(e){return pA(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.attribution&&typeof e.defaultTracking.attribution=="object"?W({},e.defaultTracking.attribution):{}},Em=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if(typeof a=="function"){var u=a.apply(e,o);typeof s=="function"&&s(u==null?void 0:u.promise)}}return e},Tm=function(e){var t=e;return t&&t._q!==void 0},aw="2.29.0",yA="amplitude-ts",BG="Web",zG="$remote",HG=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(yA,"/").concat(aw),typeof navigator<"u"&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(t){return this.config=t,Promise.resolve(void 0)},e.prototype.execute=function(t){var n,r;return B(this,void 0,void 0,function(){var i,o,s,a;return U(this,function(u){return i=new Date().getTime(),o=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1,s=(r=t.event_id)!==null&&r!==void 0?r:o+1,this.config.lastEventId=s,t.time||(this.config.lastEventTime=i),a=W(W(W(W(W(W(W(W({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:BG}),this.config.trackingOptions.language&&{language:V6()}),this.config.trackingOptions.ipAddress&&{ip:zG}),{insert_id:Co(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),t),{event_id:s,library:this.library,user_agent:this.userAgent}),[2,a]})})},e}(),Zc=1e3,bA=function(e){Ot(t,e);function t(n){var r=this,i,o,s;try{s=(i=xe())===null||i===void 0?void 0:i.localStorage}catch(a){(o=n==null?void 0:n.loggerProvider)===null||o===void 0||o.debug("Failed to access localStorage. error=".concat(JSON.stringify(a))),s=void 0}return r=e.call(this,s)||this,r.loggerProvider=n==null?void 0:n.loggerProvider,r}return t.prototype.set=function(n,r){var i;return B(this,void 0,void 0,function(){var o;return U(this,function(s){switch(s.label){case 0:return Array.isArray(r)&&r.length>Zc?(o=r.length-Zc,[4,e.prototype.set.call(this,n,r.slice(0,Zc))]):[3,2];case 1:return s.sent(),(i=this.loggerProvider)===null||i===void 0||i.error("Failed to save ".concat(o," events because the queue length exceeded ").concat(Zc,".")),[3,4];case 2:return[4,e.prototype.set.call(this,n,r)];case 3:s.sent(),s.label=4;case 4:return[2]}})})},t}(rw),WG=function(e){Ot(t,e);function t(){var n;return e.call(this,(n=xe())===null||n===void 0?void 0:n.sessionStorage)||this}return t}(rw),qG=function(e){Ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={done:4},n}return t.prototype.send=function(n,r){return B(this,void 0,void 0,function(){var i=this;return U(this,function(o){return[2,new Promise(function(s,a){typeof XMLHttpRequest>"u"&&a(new Error("XHRTransport is not supported."));var u=new XMLHttpRequest;u.open("POST",n,!0),u.onreadystatechange=function(){if(u.readyState===i.state.done){var l=u.responseText;try{s(i.buildResponse(JSON.parse(l)))}catch{s(i.buildResponse({code:u.status}))}}},u.setRequestHeader("Content-Type","application/json"),u.setRequestHeader("Accept","*/*"),u.send(JSON.stringify(r))})]})})},t}(Qp),VG=function(e){Ot(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(n,r){return B(this,void 0,void 0,function(){var i=this;return U(this,function(o){return[2,new Promise(function(s,a){var u=xe();if(!(u!=null&&u.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var l=JSON.stringify(r),c=u.navigator.sendBeacon(n,JSON.stringify(r));return s(c?i.buildResponse({code:200,events_ingested:r.events.length,payload_size_bytes:l.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(d){a(d)}})]})})},t}(Qp),GG=function(e,t,n){return n===void 0&&(n=!0),B(void 0,void 0,void 0,function(){var r,i,o,s,a,u,l,c,d;return U(this,function(f){switch(f.label){case 0:return r=q6(e),[4,t.getRaw(r)];case 1:return i=f.sent(),i?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:f.sent(),f.label=3;
104case 3:return o=X(i.split("."),6),s=o[0],a=o[1],u=o[2],l=o[3],c=o[4],d=o[5],[2,{deviceId:s,userId:KG(a),sessionId:xm(l),lastEventId:xm(d),lastEventTime:xm(c),optOut:!!u}]}})})},xm=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},KG=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}},Er="[Amplitude]",LT="".concat(Er," Form Started"),YG="".concat(Er," Form Submitted"),XG="".concat(Er," File Downloaded"),FT="session_start",jT="session_end",QG="".concat(Er," File Extension"),JG="".concat(Er," File Name"),ZG="".concat(Er," Link ID"),eK="".concat(Er," Link Text"),tK="".concat(Er," Link URL"),Cm="".concat(Er," Form ID"),Im="".concat(Er," Form Name"),Rm="".concat(Er," Form Destination"),tp="cookie",nK="US",rK=function(e){Ot(t,e);function t(n,r,i,o,s,a,u,l,c,d,f,p,h,m,y,g,v,b,S,x,T,_,C,I,O,D,L,F,M,R,N,A,P,k,$,z,H,V,q,te){i===void 0&&(i=new nw),o===void 0&&(o={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),l===void 0&&(l=1e3),c===void 0&&(c=5),d===void 0&&(d=30),f===void 0&&(f=tp),g===void 0&&(g=new xl),v===void 0&&(v=pn.Warn),S===void 0&&(S=!1),x===void 0&&(x=!1),C===void 0&&(C=""),I===void 0&&(I=nK),D===void 0&&(D=30*60*1e3),L===void 0&&(L=new bA({loggerProvider:g})),F===void 0&&(F={ipAddress:!0,language:!0,platform:!0}),M===void 0&&(M="fetch"),R===void 0&&(R=!1),N===void 0&&(N=!0),H===void 0&&(H=!0),V===void 0&&(V=0);var G=e.call(this,{apiKey:n,storageProvider:L,transportProvider:wA(M)})||this;return G.apiKey=n,G.appVersion=r,G.cookieOptions=o,G.defaultTracking=s,G.autocapture=a,G.flushIntervalMillis=l,G.flushMaxRetries=c,G.flushQueueSize=d,G.identityStorage=f,G.ingestionMetadata=p,G.instanceName=h,G.loggerProvider=g,G.logLevel=v,G.minIdLength=b,G.offline=S,G.partnerId=T,G.plan=_,G.serverUrl=C,G.serverZone=I,G.sessionTimeout=D,G.storageProvider=L,G.trackingOptions=F,G.transport=M,G.useBatch=R,G.fetchRemoteConfig=N,G.networkTrackingOptions=$,G.identify=z,G.enableDiagnostics=H,G.diagnosticsSampleRate=V,G.diagnosticsClient=q,G.remoteConfig=te,G.version=aw,G._optOut=!1,G._cookieStorage=i,G.deviceId=u,G.lastEventId=m,G.lastEventTime=y,G.optOut=x,G.sessionId=O,G.pageCounter=P,G.userId=A,G.debugLogsEnabled=k,G.loggerProvider.enable(k?pn.Debug:G.logLevel),G.networkTrackingOptions=$,G.identify=z,G.enableDiagnostics=H,G.diagnosticsSampleRate=V,G.diagnosticsClient=q,N&&(G.remoteConfig||(G.remoteConfig={fetchRemoteConfig:N}),G.remoteConfig.fetchRemoteConfig||(G.remoteConfig.fetchRemoteConfig=N)),G}return Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(n){this._cookieStorage!==n&&(this._cookieStorage=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(n){this._deviceId!==n&&(this._deviceId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(n){this._userId!==n&&(this._userId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(n){this._sessionId!==n&&(this._sessionId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(n){this._optOut!==n&&(this._optOut=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(n){this._lastEventTime!==n&&(this._lastEventTime=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(n){this._lastEventId!==n&&(this._lastEventId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(n){this._pageCounter!==n&&(this._pageCounter=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(n){this._debugLogsEnabled!==n&&(this._debugLogsEnabled=n,this.updateStorage())}
104,enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var n={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(iA(this.apiKey),n)},t}(eA),iK=function(e,t,n){return t===void 0&&(t={}),B(void 0,void 0,void 0,function(){var r,i,o,s,a,u,l,c,d,f,p,h,m,y,g,v,b,S,x,T,_,C,I,O,D,L,F,M,R,N,A,P,k,$,z,H,V,q,te,G,J,Me,Oe,ze,Ye;return U(this,function(ut){switch(ut.label){case 0:return r=t.identityStorage||tp,_={},r===tp?[3,1]:(o="",[3,5]);case 1:return(I=(C=t.cookieOptions)===null||C===void 0?void 0:C.domain)!==null&&I!==void 0?(s=I,[3,4]):[3,2];case 2:return[4,sK()];case 3:s=ut.sent(),ut.label=4;case 4:o=s,ut.label=5;case 5:return i=W.apply(void 0,[(_.domain=o,_.expiration=365,_.sameSite="Lax",_.secure=!1,_.upgrade=!0,_),t.cookieOptions]),a=oK(t.identityStorage,i),[4,GG(e,a,(D=(O=t.cookieOptions)===null||O===void 0?void 0:O.upgrade)!==null&&D!==void 0?D:!0)];case 6:return u=ut.sent(),[4,a.get(iA(e))];case 7:return l=ut.sent(),c=Zf(),d=c.ampTimestamp?Number(c.ampTimestamp):void 0,f=d?Date.now()<d:!0,p=(N=(R=(M=(L=t.deviceId)!==null&&L!==void 0?L:f?(F=c.ampDeviceId)!==null&&F!==void 0?F:c.deviceId:void 0)!==null&&M!==void 0?M:l==null?void 0:l.deviceId)!==null&&R!==void 0?R:u.deviceId)!==null&&N!==void 0?N:Co(),h=(A=l==null?void 0:l.lastEventId)!==null&&A!==void 0?A:u.lastEventId,m=(P=l==null?void 0:l.lastEventTime)!==null&&P!==void 0?P:u.lastEventTime,y=($=(k=t.optOut)!==null&&k!==void 0?k:l==null?void 0:l.optOut)!==null&&$!==void 0?$:u.optOut,g=(z=l==null?void 0:l.sessionId)!==null&&z!==void 0?z:u.sessionId,v=(V=(H=t.userId)!==null&&H!==void 0?H:l==null?void 0:l.userId)!==null&&V!==void 0?V:u.userId,n.previousSessionDeviceId=(q=l==null?void 0:l.deviceId)!==null&&q!==void 0?q:u.deviceId,n.previousSessionUserId=(te=l==null?void 0:l.userId)!==null&&te!==void 0?te:u.userId,b={ipAddress:(J=(G=t.trackingOptions)===null||G===void 0?void 0:G.ipAddress)!==null&&J!==void 0?J:!0,language:(Oe=(Me=t.trackingOptions)===null||Me===void 0?void 0:Me.language)!==null&&Oe!==void 0?Oe:!0,platform:(Ye=(ze=t.trackingOptions)===null||ze===void 0?void 0:ze.platform)!==null&&Ye!==void 0?Ye:!0},S=l==null?void 0:l.pageCounter,x=l==null?void 0:l.debugLogsEnabled,t.autocapture!==void 0&&(t.defaultTracking=t.autocapture),T=new rK(e,t.appVersion,a,i,t.defaultTracking,t.autocapture,p,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,r,t.ingestionMetadata,t.instanceName,h,m,t.loggerProvider,t.logLevel,t.minIdLength,t.offline,y,t.partnerId,t.plan,t.serverUrl,t.serverZone,g,t.sessionTimeout,t.storageProvider,b,t.transport,t.useBatch,t.fetchRemoteConfig,v,S,x,t.networkTrackingOptions,t.identify,t.enableDiagnostics,void 0,void 0,t.remoteConfig),[4,T.storageProvider.isEnabled()];case 8:return ut.sent()||(T.loggerProvider.warn("Storage provider ".concat(T.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),T.storageProvider=new nw),[2,T]}})})},oK=function(e,t){switch(e===void 0&&(e=tp),t===void 0&&(t={}),e){case"localStorage":return new bA;case"sessionStorage":return new WG;case"none":return new nw;case"cookie":default:return new fy(W(W({},t),{expirationDays:t.expiration}))}},wA=function(e){return e==="xhr"?new qG:e==="beacon"?new VG:new oA},sK=function(e){return B(void 0,void 0,void 0,function(){var t,n,r,i,o,o,s,a,u,l;return U(this,function(c){switch(c.label){case 0:return[4,new fy().isEnabled()];case 1:if(!c.sent()||typeof location>"u"||!location.hostname)return[2,""];for(t=location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,c.label=2;case 2:return o<r.length?(s=r[o],a={domain:"."+s},u=new fy(a),[4,u.set(i,1)]):[3,7];case 3:return c.sent(),[4,u.get(i)];case 4:return l=c.sent(),l?[4,u.remove(i)]:[3,6];case 5:return c.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}})})},aK=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},uK="[Amplitude] Page Viewed",lK=function(e){e===void 0&&(e={});var t,n=xe(),r=void 0,i=!1,o,s=e.trackOn,a=e.trackHistoryChanges,u=e.eventType,l=u===void 0?uK:u,c=function(g){var v=g;try{v=decodeURI(g)}catch(b){r==null||r.error("Malformed URI sequence: ",b)}return v},d=function(){return B(void 0,void 0,void 0,function(){var g,v,b;return U(this,function(S){switch(S.label){case 0:return g=c(typeof location<"u"&&location.href||""),b={event_type:l},v=[{}],[4,cK()];case 1:return[2,(b.event_properties=W.apply(void 0,[W.apply(void 0,v.concat([S.sent()])),{"[Amplitude] Page Domain":typeof location<"u"&&location.hostname||"","[Amplitude] Page Location":g,"[Amplitude] Page Path":typeof location<"u"&&c(location.pathname)||"","[Amplitude] Page Title":sw(ow),"[Amplitude] Page URL":g.split("?")[0]}]),b)]}})})},f=function(){return typeof s>"u"||typeof s=="function"&&s()},p=typeof location<"u"?location.href:null,h=function(){return B(void 0,void 0,void 0,function(){var g,v,b,S;return U(this,function(x){switch(x.label){case 0:return g=location.href,v=fK(a,g,p||"")&&f(),p=g,v?(r==null||r.log("Tracking page view event"),t!=null?[3,1]:[3,3]):[3,4];case 1:return S=(b=t).track,[4,d()];case 2:S.apply(b,[x.sent()]),x.label=3;case 3:x.label=4;case 4:return[2]}})})},m=function(){h()},y={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(g,v){return B(void 0,void 0,void 0,function(){var b,S;return U(this,function(x){switch(x.label){case 0:return t=v,o=g,r=g.loggerProvider,r.log("Installing @amplitude/plugin-page-view-tracking-browser"),i=!0,n&&(n.addEventListener("popstate",m),n.history.pushState=new Proxy(n.history.pushState,{apply:function(T,_,C){var I=X(C,3),O=I[0],D=I[1],L=I[2];T.apply(_,[O,D,L]),i&&h()}})),f()?(r.log("Tracking page view event"),S=(b=t).track,[4,d()]):[3,2];case 1:S.apply(b,[x.sent()]),x.label=2;case 2:return[2]}})})},execute:function(g){return B(void 0,void 0,void 0,function(){var v;return U(this,function(b){switch(b.label){case 0:return s==="attribution"&&dK(g)?(r==null||r.log("Enriching c
104ampaign event to page view event with campaign parameters"),[4,d()]):[3,2];case 1:v=b.sent(),g.event_type=v.event_type,g.event_properties=W(W({},g.event_properties),v.event_properties),b.label=2;case 2:return o&&g.event_type===l&&(o.pageCounter=o.pageCounter?o.pageCounter+1:1,g.event_properties=W(W({},g.event_properties),{"[Amplitude] Page Counter":o.pageCounter})),[2,g]}})})},teardown:function(){return B(void 0,void 0,void 0,function(){return U(this,function(g){return n&&(n.removeEventListener("popstate",m),i=!1),[2]})})}};return y},cK=function(){return B(void 0,void 0,void 0,function(){var e;return U(this,function(t){switch(t.label){case 0:return e=aK,[4,new fA().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},dK=function(e){if(e.event_type==="$identify"&&e.user_properties){var t=e.user_properties,n=t[Xi.SET]||{},r=t[Xi.UNSET]||{},i=le(le([],X(Object.keys(n)),!1),X(Object.keys(r)),!1);return Object.keys(Xp).every(function(o){return i.includes(o)})}return!1},fK=function(e,t,n){switch(e){case"pathOnly":{if(n=="")return!0;var r=new URL(t),i=new URL(n),o=r.origin+r.pathname,s=i.origin+i.pathname;return o!==s}default:return t!==n}},pK=function(){var e,t=[],n=function(l,c,d){l.addEventListener(c,d),t.push({element:l,type:c,handler:d})},r=function(){t.forEach(function(l){var c=l.element,d=l.type,f=l.handler;c==null||c.removeEventListener(d,f)}),t=[]},i="@amplitude/plugin-form-interaction-tracking-browser",o="enrichment",s=function(l,c){return B(void 0,void 0,void 0,function(){var d,f;return U(this,function(p){return d=function(){if(!c){l.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if(!(typeof document>"u")){var h=function(y){var g=!1;n(y,"change",function(){var v,b=UT(y);g||c.track(LT,(v={},v[Cm]=Cs(y.id),v[Im]=Cs(y.name),v[Rm]=b,v)),g=!0}),n(y,"submit",function(){var v,b,S=UT(y);g||c.track(LT,(v={},v[Cm]=Cs(y.id),v[Im]=Cs(y.name),v[Rm]=S,v)),c.track(YG,(b={},b[Cm]=Cs(y.id),b[Im]=Cs(y.name),b[Rm]=S,b)),g=!1})},m=Array.from(document.getElementsByTagName("form"));m.forEach(h),typeof MutationObserver<"u"&&(e=new MutationObserver(function(y){y.forEach(function(g){g.addedNodes.forEach(function(v){v.nodeName==="FORM"&&h(v),"querySelectorAll"in v&&typeof v.querySelectorAll=="function"&&Array.from(v.querySelectorAll("form")).map(h)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?d():(f=xe(),f?f.addEventListener("load",d):l.loggerProvider.debug("Form interaction tracking is not installed because global is undefined.")),[2]})})},a=function(l){return B(void 0,void 0,void 0,function(){return U(this,function(c){return[2,l]})})},u=function(){return B(void 0,void 0,void 0,function(){return U(this,function(l){return e==null||e.disconnect(),r(),[2]})})};return{name:i,type:o,setup:s,execute:a,teardown:u}},Cs=function(e){if(typeof e=="string")return e},UT=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(t??""),window.location.href).href}catch{}return t},hK=function(){var e,t=[],n=function(l,c,d){l.addEventListener(c,d),t.push({element:l,type:c,handler:d})},r=function(){t.forEach(function(l){var c=l.element,d=l.type,f=l.handler;c==null||c.removeEventListener(d,f)}),t=[]},i="@amplitude/plugin-file-download-tracking-browser",o="enrichment",s=function(l,c){return B(void 0,void 0,void 0,function(){var d,f;return U(this,function(p){return d=function(){if(!c){l.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if(!(typeof document>"u")){var h=function(g){var v;try{v=new URL(g.href,window.location.href)}catch{return}var b=m.exec(v.href),S=b==null?void 0:b[1];S&&n(g,"click",function(){var x;S&&c.track(XG,(x={},x[QG]=S,x[JG]=v.pathname,x[ZG]=g.id,x[eK]=g.text,x[tK]=g.href,x))})},m=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/,y=Array.from(document.getElementsByTagName("a"));y.forEach(h),typeof MutationObserver<"u"&&(e=new MutationObserver(function(g){g.forEach(function(v){v.addedNodes.forEac
104h(function(b){b.nodeName==="A"&&h(b),"querySelectorAll"in b&&typeof b.querySelectorAll=="function"&&Array.from(b.querySelectorAll("a")).map(h)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?d():(f=xe(),f?f.addEventListener("load",d):l.loggerProvider.debug("File download tracking is not installed because global is undefined.")),[2]})})},a=function(l){return B(void 0,void 0,void 0,function(){return U(this,function(c){return[2,l]})})},u=function(){return B(void 0,void 0,void 0,function(){return U(this,function(l){return e==null||e.disconnect(),r(),[2]})})};return{name:i,type:o,setup:s,execute:a,teardown:u}},$T=!1,mK=function(e){if(!($T||e.defaultTracking!==void 0)){var t=`\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example: 105 106amplitude.init(<YOUR_API_KEY>, { 107 defaultTracking: true, 108}); 109 110Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;e.loggerProvider.warn(t),$T=!0}},gK=function(){var e="@amplitude/plugin-network-checker-browser",t="before",n=xe(),r=[],i=function(u,l){n!=null&&n.addEventListener&&(n==null||n.addEventListener(u,l),r.push({type:u,handler:l}))},o=function(){r.forEach(function(u){var l=u.type,c=u.handler;n==null||n.removeEventListener(l,c)}),r=[]},s=function(u,l){return B(void 0,void 0,void 0,function(){return U(this,function(c){return typeof navigator>"u"?(u.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),u.offline=!1,[2]):(u.offline=!navigator.onLine,i("online",function(){u.loggerProvider.debug("Network connectivity changed to online."),u.offline=!1,setTimeout(function(){l.flush()},u.flushIntervalMillis)}),i("offline",function(){u.loggerProvider.debug("Network connectivity changed to offline."),u.offline=!0}),[2])})})},a=function(){return B(void 0,void 0,void 0,function(){return U(this,function(u){return o(),[2]})})};return{name:e,type:t,setup:s,teardown:a}};function SA(e){var t,n,r,i,o,s,a,u,l,c,d;if(!(typeof e!="object"||e===null)&&!Array.isArray(e)){var f=Object.keys(e);try{for(var p=oe(f),h=p.next();!h.done;h=p.next()){var m=h.value;try{var y=e[m];typeof(y==null?void 0:y.enabled)=="boolean"&&(y.enabled?(delete y.enabled,Object.keys(y).length===0&&(e[m]=!0)):e[m]=!1),SA(y)}catch{}}}catch(D){t={error:D}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{if(!((l=(u=(a=e.autocapture)===null||a===void 0?void 0:a.networkTracking)===null||u===void 0?void 0:u.captureRules)===null||l===void 0)&&l.length)try{for(var g=oe(e.autocapture.networkTracking.captureRules),v=g.next();!v.done;v=g.next()){var b=v.value;try{for(var S=(o=void 0,oe(["responseHeaders","requestHeaders"])),x=S.next();!x.done;x=S.next()){var T=x.value,_=(c=b[T])!==null&&c!==void 0?c:{},C=_.captureSafeHeaders,I=_.allowlist;if(!(!C&&!I)){if(I!==void 0&&!Array.isArray(I)){delete b[T];continue}b[T]=le(le([],X(C?Jf:[]),!1),X(I??[]),!1)}}}catch(D){o={error:D}}finally{try{x&&!x.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}}}catch(D){r={error:D}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(r)throw r.error}}}catch{}var O=(d=e.autocapture)===null||d===void 0?void 0:d.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick))}}function BT(e,t,n){var r,i,o=[];try{for(var s=oe(t??[]),a=s.next();!a.done;a=s.next()){var u=a.value;try{o.push(new RegExp(u))}catch(l){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),l)}}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return e.concat(o)}function vK(e,t){var n,r,i,o,s,a,u;if(e){SA(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e));var l=e;if(l&&"autocapture"in l){if(typeof l.autocapture=="boolean"&&(t.autocapture=l.autocapture),typeof l.autocapture=="object"&&l.autocapture!==null){var c=W({},l.autocapture);if(t.autocapture===void 0&&(t.autocapture=l.autocapture),typeof l.autocapture.elementInteractions=="object"&&l.autocapture.elementInteractions!==null&&(!((i=l.autocapture.elementInteractions.pageUrlAllowlistRegex)===null||i===void 0)&&i.length)){c.elementInteractions=W({},l.autocapture.elementInteractions);var d=c.elementInteractions,f=(o=d.pageUrlAllowlist)!==null&&o!==void 0?o:[],p=l.autocapture.elementInteractions.pageUrlAllowlistRegex;d.pageUrlAllowlist=BT(f,p,t),delete d.pageUrlAllowlistRegex}
vendor: 16,501 bytes, lines 110-112
110if(typeof l.autocapture.networkTracking=="object"&&l.autocapture.networkTracking!==null&&(!((s=l.autocapture.networkTracking.captureRules)===null||s===void 0)&&s.length)){c.networkTracking=W({},l.autocapture.networkTracking);var h=c.networkTracking,m=(a=h.captureRules)!==null&&a!==void 0?a:[];try{for(var y=oe(m),g=y.next();!g.done;g=y.next()){var v=g.value;v.urls=BT((u=v.urls)!==null&&u!==void 0?u:[],v.urlsRegex,t),delete v.urlsRegex}}catch(b){n={error:b}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}}typeof t.autocapture=="boolean"&&(t.autocapture=W({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},c)),typeof t.autocapture=="object"&&(t.autocapture=W(W({},t.autocapture),c))}t.defaultTracking=t.autocapture}t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(b){t.loggerProvider.error("Failed to apply remote configuration because of error: ",b)}}}var yK="@amplitude/plugin-autocapture-browser",bK="@amplitude/plugin-frustration-browser",hy="[Amplitude] Element Clicked",wK="[Amplitude] Dead Click",zT="[Amplitude] Rage Click",SK="[Amplitude] Element Changed",_K="[Amplitude] Element ID",EK="[Amplitude] Element Class",HT="[Amplitude] Element Tag",WT="[Amplitude] Element Text",TK="[Amplitude] Element Hierarchy",xK="[Amplitude] Element Href",CK="[Amplitude] Element Position Left",IK="[Amplitude] Element Position Top",RK="[Amplitude] Element Aria Label",kK="[Amplitude] Element Attributes",PK="[Amplitude] Element Parent Label",qT="[Amplitude] Page URL",AK="[Amplitude] Page Title",OK="[Amplitude] Viewport Height",MK="[Amplitude] Viewport Width",Gd="https://app.amplitude.com",NK="https://app.eu.amplitude.com",DK="https://apps.stag2.amplitude.com",LK={US:Gd,EU:NK,STAGING:DK},FK="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",jK="amp-visual-tagging-selector-highlight",_A="data-amp-mask-attributes",UK=25;function Ke(e){return typeof e=="function"}function uw(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var km=uw(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription: 111`+n.map(function(r,i){return i+1+") "+r.toString()}).join(` 112 `):"",this.name="UnsubscriptionError",this.errors=n}});function np(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var rc=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=oe(s),u=a.next();!u.done;u=a.next()){var l=u.value;l.remove(this)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var c=this.initialTeardown;if(Ke(c))try{c()}catch(m){o=m instanceof km?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=oe(d),p=f.next();!p.done;p=f.next()){var h=p.value;try{VT(h)}catch(m){o=o??[],m instanceof km?o=le(le([],X(o)),X(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new km(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)VT(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&np(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&np(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),EA=rc.EMPTY;function TA(e){return e instanceof rc||e&&"closed"in e&&Ke(e.remove)&&Ke(e.add)&&Ke(e.unsubscribe)}function VT(e){Ke(e)?e():e.unsubscribe()}var $K={Promise:void 0},BK={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,le([e,t],X(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function xA(e){BK.setTimeout(function(){throw e})}function my(){}function Kd(e){e()}var lw=function(e){Ot(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,TA(n)&&n.add(r)):r.destination=WK,r}return t.create=function(n,r,i){return new Il(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(rc),zK=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){ed(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){ed(r)}else ed(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){ed(n)}},e}(),Il=function(e){Ot(t,e);function t(n,r,i){var o=e.call(this)||this,s;return Ke(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,o.destination=new zK(s),o}return t}(lw);function ed(e){xA(e)}function HK(e){throw e}var WK={closed:!0,next:my,error:HK,complete:my},cw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function CA(e){return e}function qK(e){return e.length===0?CA:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var Rt=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=GK(t)?t:new Il(t,n,r);return Kd(function(){var s=i,a=s.operator,u=s.source;o.add(a?a.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=GT(n),new n(function(i,o){var s=new Il({next:function(a){try{t(a)}catch(u){o(u),s.unsubscribe()}},error:o,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[cw]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return qK(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=GT(t),new t(function(r,i){var o;n.subscribe(function(s){return o=s},function(s){return i(s)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function GT(e){var t;return(t=e??$K.Promise)!==null&&t!==void 0?t:Promise}function VK(e){return e&&Ke(e.next)&&Ke(e.error)&&Ke(e.complete)}function GK(e){return e&&e instanceof lw||VK(e)&&TA(e)}function KK(e){return Ke(e==null?void 0:e.lift)}function Un(e){return function(t){if(KK(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Kt(e,t,n,r,i){return new YK(e,t,n,r,i)}var YK=function(e){Ot(t,e);function t(n,r,i,o,s,a){var u=e.call(this,n)||this;return u.onFinalize=s,u.shouldUnsubscribe=a,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:e.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,u}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(lw),XK=uw(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),IA=function(e){Ot(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new KT(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new XK},t.prototype.next=function(n){var r=this;Kd(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=oe(r.currentObservers),a=s.next();!a.done;a=s.next()){var u=a.value;u.next(n)}}catch(l){i={error:l}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Kd(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Kd(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?EA:(this.currentObservers=null,a.push(n),new rc(function(){r.currentObservers=null,np(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new Rt;return n.source=this,n},t.create=function(n,r){return new KT(n,r)},t}(Rt),KT=function(e){Ot(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:EA},t}(IA),QK={now:function(){return Date.now()}},JK=function(e){Ot(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(rc),YT={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,le([e,t],X(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},ZK=function(e){Ot(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,s=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(s,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),YT.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&YT.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(s){i=!0,o=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,np(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(JK),XT=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=QK.now,e}(),e7=function(e){Ot(t,e);function t(n,r){r===void 0&&(r=XT.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(XT),ic=new e7(ZK),t7=ic,dw=new Rt(function(e){return e.complete()});function RA(e){return e&&Ke(e.schedule)}function kA(e){return e[e.length-1]}function n7(e){return RA(kA(e))?e.pop():void 0}function r7(e,t){return typeof kA(e)=="number"?e.pop():t}var fw=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function PA(e){return Ke(e==null?void 0:e.then)}function AA(e){return Ke(e[cw])}function OA(e){return Symbol.asyncIterator&&Ke(e==null?void 0:e[Symbol.asyncIterator])}function MA(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function i7(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var NA=i7();function DA(e){return Ke(e==null?void 0:e[NA])}function LA(e){return t6(this,arguments,function(){var n,r,i,o;return U(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,aa(n.read())];case 3:return r=s.sent(),i=r.value,o=r.done,o?[4,aa(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,aa(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function FA(e){return Ke(e==null?void 0:e.getReader)}function Yt(e){if(e instanceof Rt)return e;if(e!=null){if(AA(e))return o7(e);if(fw(e))return s7(e);if(PA(e))return a7(e);if(OA(e))return jA(e);if(DA(e))return u7(e);if(FA(e))return l7(e)}throw MA(e)}function o7(e){return new Rt(function(t){var n=e[cw]();if(Ke(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function s7(e){return new Rt(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function a7(e){return new Rt(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,xA)})}function u7(e){return new Rt(function(t){var n,r;try{for(var i=oe(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function jA(e){return new Rt(function(t){c7(e,t).catch(function(n){return t.error(n)})})}function l7(e){return jA(LA(e))}function c7(e,t){var n,r,i,o;return B(this,void 0,void 0,function(){var s,a;return U(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=n6(e),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=u.sent(),i={error:a},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];
112case 10:return[7];case 11:return t.complete(),[2]}})})}function uo(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function UA(e,t){return t===void 0&&(t=0),Un(function(n,r){n.subscribe(Kt(r,function(i){return uo(r,e,function(){return r.next(i)},t)},function(){return uo(r,e,function(){return r.complete()},t)},function(i){return uo(r,e,function(){return r.error(i)},t)}))})}function $A(e,t){return t===void 0&&(t=0),Un(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function d7(e,t){return Yt(e).pipe($A(t),UA(t))}function f7(e,t){return Yt(e).pipe($A(t),UA(t))}function p7(e,t){return new Rt(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function h7(e,t){return new Rt(function(n){var r;return uo(n,t,function(){r=e[NA](),uo(n,t,function(){var i,o,s;try{i=r.next(),o=i.value,s=i.done}catch(a){n.error(a);return}s?n.complete():n.next(o)},0,!0)}),function(){return Ke(r==null?void 0:r.return)&&r.return()}})}function BA(e,t){if(!e)throw new Error("Iterable cannot be null");return new Rt(function(n){uo(n,t,function(){var r=e[Symbol.asyncIterator]();uo(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function m7(e,t){return BA(LA(e),t)}function g7(e,t){if(e!=null){if(AA(e))return d7(e,t);if(fw(e))return p7(e,t);if(PA(e))return f7(e,t);if(OA(e))return BA(e,t);if(DA(e))return h7(e,t);if(FA(e))return m7(e,t)}throw MA(e)}function v7(e,t){return t?g7(e,t):Yt(e)}function zA(e){return e instanceof Date&&!isNaN(e)}var y7=uw(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function b7(e,t){var n=zA(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,o=n.with,s=o===void 0?w7:o,a=n.scheduler,u=a===void 0?ic:a,l=n.meta,c=l===void 0?null:l;if(r==null&&i==null)throw new TypeError("No timeout provided.");return Un(function(d,f){var p,h,m=null,y=0,g=function(v){h=uo(f,u,function(){try{p.unsubscribe(),Yt(s({meta:c,lastValue:m,seen:y})).subscribe(f)}catch(b){f.error(b)}},v)};p=d.subscribe(Kt(f,function(v){h==null||h.unsubscribe(),y++,f.next(m=v),i>0&&g(i)},void 0,void 0,function(){h!=null&&h.closed||h==null||h.unsubscribe(),m=null})),!y&&g(r!=null?typeof r=="number"?r:+r-u.now():i)})}function w7(e){throw new y7(e)}function Dt(e,t){return Un(function(n,r){var i=0;n.subscribe(Kt(r,function(o){r.next(e.call(t,o,i++))}))})}var S7=Array.isArray;function _7(e,t){return S7(t)?e.apply(void 0,le([],X(t))):e(t)}function E7(e){return Dt(function(t){return _7(e,t)})}function T7(e,t,n,r,i,o,s,a){var u=[],l=0,c=0,d=!1,f=function(){d&&!u.length&&!l&&t.complete()},p=function(m){return l<r?h(m):u.push(m)},h=function(m){l++;var y=!1;Yt(n(m,c++)).subscribe(Kt(t,function(g){t.next(g)},function(){y=!0},void 0,function(){if(y)try{l--;for(var g=function(){var v=u.shift();s||h(v)};u.length&&l<r;)g();f()}catch(v){t.error(v)}}))};return e.subscribe(Kt(t,p,function(){d=!0,f()})),function(){}}function oc(e,t,n){return n===void 0&&(n=1/0),Ke(t)?oc(function(r,i){return Dt(function(o,s){return t(r,o,i,s)})(Yt(e(r,i)))},n):(typeof t=="number"&&(n=t),Un(function(r,i){return T7(r,i,e,n)}))}function x7(e){return e===void 0&&(e=1/0),oc(CA,e)}var C7=["addListener","removeListener"],I7=["addEventListener","removeEventListener"],R7=["on","off"];function Pa(e,t,n,r){if(Ke(n)&&(r=n,n=void 0),r)return Pa(e,t,n).pipe(E7(r));var i=X(A7(e)?I7.map(function(a){return function(u){return e[a](t,u,n)}}):k7(e)?C7.map(QT(e,t)):P7(e)?R7.map(QT(e,t)):[],2),o=i[0],s=i[1];if(!o&&fw(e))return oc(function(a){return Pa(a,t,n)})(Yt(e));if(!o)throw new TypeError("Invalid event target");return new Rt(function(a){var u=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return a.next(1<l.length?l:l[0])};return o(u),function(){return s(u)}})}function QT(e,t){return function(n){return function(r){return e[n](t,r)}}}function k7(e){return Ke(e.addListener)&&Ke(e.removeListener)}function P7(e){return Ke(e.on)&&Ke(e.off)}function A7(e){return Ke(e.addEventListener)&&Ke(e.removeEventListener)}function HA(e,t,n){e===void 0&&(e=0),n===void 0&&(n=t7);var r=-1;return t!=null&&(RA(t)?n=t:r=t),new Rt(function(i){var o=zA(e)?+e-n.now():e;o<0&&(o=0);var s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function pw(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=n7(e),r=r7(e,1/0),i=e;return i.length?i.length===1?Yt(i[0]):x7(r)(v7(i,n)):dw}var O7=Array.isArray;function M7(e){return e.length===1&&O7(e[0])?e[0]:e}function qt(e,t){return Un(function(n,r){var i=0;n.subscribe(Kt(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function N7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=M7(e),e.length===1?Yt(e[0]):new Rt(D7(e))}function D7(e){return function(t){for(var n=[],r=function(o){n.push(Yt(e[o]).subscribe(Kt(t,function(s){if(n){for(var a=0;a<n.length;a++)a!==o&&n[a].unsubscribe();n=null}t.next(s)})))},i=0;n&&!t.closed&&i<e.length;i++)r(i)}}function L7(e){return Un(function(t,n){var r=[];return t.subscribe(Kt(n,function(i){return r.push(i)},function(){n.next(r),n.complete()}
112)),Yt(e).subscribe(Kt(n,function(){var i=r;r=[],n.next(i)},my)),function(){r=null}})}function F7(e,t){return t===void 0&&(t=ic),Un(function(n,r){var i=null,o=null,s=null,a=function(){if(i){i.unsubscribe(),i=null;var l=o;o=null,r.next(l)}};function u(){var l=s+e,c=t.now();if(c<l){i=this.schedule(void 0,l-c),r.add(i);return}a()}n.subscribe(Kt(r,function(l){o=l,s=t.now(),i||(i=t.schedule(u,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function hw(e){return e<=0?function(){return dw}:Un(function(t,n){var r=0;t.subscribe(Kt(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function j7(e){return Dt(function(){return e})}function U7(e,t){return oc(function(n,r){return Yt(e(n,r)).pipe(hw(1),j7(n))})}function $7(e,t){t===void 0&&(t=ic);var n=HA(e,t);return U7(function(){return n})}function B7(){return Un(function(e,t){var n,r=!1;e.subscribe(Kt(t,function(i){var o=n;n=i,r&&t.next([o,i]),r=!0}))})}function zo(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new IA}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,s=o===void 0?!0:o,a=e.resetOnRefCountZero,u=a===void 0?!0:a;return function(l){var c,d,f,p=0,h=!1,m=!1,y=function(){d==null||d.unsubscribe(),d=void 0},g=function(){y(),c=f=void 0,h=m=!1},v=function(){var b=c;g(),b==null||b.unsubscribe()};return Un(function(b,S){p++,!m&&!h&&y();var x=f=f??n();S.add(function(){p--,p===0&&!m&&!h&&(d=Pm(v,u))}),x.subscribe(S),!c&&p>0&&(c=new Il({next:function(T){return x.next(T)},error:function(T){m=!0,y(),d=Pm(g,i,T),x.error(T)},complete:function(){h=!0,y(),d=Pm(g,s),x.complete()}}),Yt(b).subscribe(c))})(l)}}function Pm(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new Il({next:function(){i.unsubscribe(),e()}});return Yt(t.apply(void 0,le([],X(n)))).subscribe(i)}}function z7(e,t){return Un(function(n,r){var i=null,o=0,s=!1,a=function(){return s&&!i&&r.complete()};n.subscribe(Kt(r,function(u){i==null||i.unsubscribe();var l=0,c=o++;Yt(e(u,c)).subscribe(i=Kt(r,function(d){return r.next(t?t(u,d,c,l++):d)},function(){i=null,a()}))},function(){s=!0,a()}))})}function H7(e,t){return Un(function(n,r){var i=t??{},o=i.leading,s=o===void 0?!0:o,a=i.trailing,u=a===void 0?!1:a,l=!1,c=null,d=null,f=!1,p=function(){d==null||d.unsubscribe(),d=null,u&&(y(),f&&r.complete())},h=function(){d=null,f&&r.complete()},m=function(g){return d=Yt(e(g)).subscribe(Kt(r,p,h))},y=function(){if(l){l=!1;var g=c;c=null,r.next(g),!f&&m(g)}};n.subscribe(Kt(r,function(g){l=!0,c=g,!(d&&!d.closed)&&(s?y():m(g))},function(){f=!0,!(u&&l&&d&&!d.closed)&&r.complete()}))})}function W7(e,t,n){t===void 0&&(t=ic);var r=HA(e,t);return H7(function(){return r},n)}var q7=["input","select","textarea"],WA=function(e,t){var n,r=(n=window==null?void 0:window.getComputedStyle)===null||n===void 0?void 0:n.call(window,e);return(r==null?void 0:r.getPropertyValue("cursor"))==="pointer"&&t==="click"},Hu=function(e,t,n){return n===void 0&&(n=!1),function(r,i){var o,s,a=e.pageUrlAllowlist,u=e.pageUrlExcludelist,l=e.shouldTrackEventResolver,c=(s=(o=i==null?void 0:i.tagName)===null||o===void 0?void 0:o.toLowerCase)===null||s===void 0?void 0:s.call(o);if(!c)return!1;if(l)return l(r,i);if(!dy(window.location.href,a)||u&&u.length>0&&dy(window.location.href,u))return!1;var d=String(i==null?void 0:i.getAttribute("type"))||"";if(typeof d=="string")switch(d.toLowerCase()){case"hidden":return!1;case"password":return!1}var f=WA(i,r);if(n&&f)return!0;if(t){var p=t.some(function(h){var m;return!!(!((m=i==null?void 0:i.matches)===null||m===void 0)&&m.call(i,h))});if(!p)return!1}switch(c){case"input":case"select":case"textarea":return r==="change"||r==="click";default:return f?!0:r==="click"}}},V7=function(e){var t,n,r,i=(n=(t=e==null?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase)===null||n===void 0?void 0:n.call(t),o=e instanceof HTMLElement?((r=e.getAttribute("contenteditable"))===null||r===void 0?void 0:r.toLowerCase())==="true":!1;return!q7.includes(i)&&!o},G7=function(e){return e?e.split(",").map(function(t){return t.trim()}).filter(function(t){return t.length>0&&t!=="id"&&t!=="class"}):[]},K7=function(e,t){return Object.entries(e).reduce(function(n,r){var i=X(r,2),o=i[0],s=i[1];if(o.startsWith(t)){var a=o.replace(t,"");a&&(n[a]=s||"")}return n},{})},Y7=function(e){return e==null||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0},JT=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return Y7(r)||(t[n]=r),t},{})},mw=function(e,t){return e?t.some(function(n){var r;return(r=e==null?void 0:e.matches)===null||r===void 0?void 0:r.call(e,n)})?e:mw(e==null?void 0:e.parentElement,t):null},X7=function(e){return new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),(r=document.head)===null||r===void 0||r.appendChild(i)}catch(o){n(o)}})};function Q7(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var sc=function(e){return!(e.event.target===null||!e.closestTrackedAncestor)};function J7(e){return e.type==="click"||e.type==="change"}var Z7="1.16.2",e9=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",_A,zu]),t9=["type"],n9=["svg","path","g"],r9=["password","hidden"],i9=128;function o9(e,t){var n,r,i,o,s,a;if(e===null)return null;var u=String(e.tagName).toLowerCase(),l={tag:u},c=Array.from((o=(i=e.parentElement)===null||i===void 0?void 0:i.children)!==null&&o!==void 0?o:[]);c.length&&(l.index=c.indexOf(e),l.indexOfType=c.filter(function(x){return x.tagName===e.tagName}).indexOf(e));var d=(a=(s=e.previousElementSibling)===null||s===void 0?void 0:s.tagName)===null||a===void 0?void 0:a.toLowerCase();d&&(l.prevSib=String(d));var f=e.getAttribute("id");f&&(l.id=String(f));var p=Array.from(e.classList);p.length&&(l.classes=p);var h={},m=Array.from(e.attributes),y=m.filter(function(x){return!e9.has(x.name)}),g=!V7(e);if(!r9.includes(String(e.getAttribute("type")))&&!n9.includes(u))try{for(var v=oe(y),b=v.next();!b.done;b=v.next()){var S=b.value;
112if(!(g&&!t9.includes(S.name))){if(t.has(S.name)){h[S.name]=Qi;continue}h[S.name]=String(S.value).substring(0,i9)}}}catch(x){n={error:x}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}return Object.keys(h).length&&(l.attrs=h),l}function s9(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&n.tagName!=="HTML";)t.push(n),n=n.parentElement;return t}var a9=function(e,t){try{if(e.sourceType==="DOM_ELEMENT"){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch{return}},u9=function(e,t,n){e.forEach(function(r){if(typeof r!="string"&&r.actionType==="ATTACH_EVENT_PROPERTY"){var i=n.extractDataFromDataSource(r.dataSource,t.closestTrackedAncestor);t.targetElementProperties[r.destinationKey]=i}})},gw=function(){function e(t,n){var r,i,o=this,s;this.replaceSensitiveString=function(f){return ow(f,o.additionalMaskTextPatterns)},this.getHierarchy=function(f){var p,h,m,y,g=performance.now(),v=[];if(!f)return[];for(var b=s9(f),S=new Map,x=b.length-1;x>=0;x--){var T=b[x];if(T){var _=G7(T.getAttribute(_A)),C=x===b.length-1?[]:(m=S.get(b[x+1]))!==null&&m!==void 0?m:new Set,I=new Set(le(le([],X(C),!1),X(_),!1));S.set(T,I)}}v=b.map(function(R){var N;return o9(R,(N=S.get(R))!==null&&N!==void 0?N:new Set)});var O=function(R){R!=null&&R.attrs&&Object.entries(R.attrs).forEach(function(N){var A=X(N,2),P=A[0],k=A[1];R.attrs&&(R.attrs[P]=o.replaceSensitiveString(k))})};try{for(var D=oe(v),L=D.next();!L.done;L=D.next()){var F=L.value;O(F)}}catch(R){p={error:R}}finally{try{L&&!L.done&&(h=D.return)&&h.call(D)}finally{if(p)throw p.error}}var M=performance.now();return(y=o.diagnosticsClient)===null||y===void 0||y.recordHistogram("autocapturePlugin.getHierarchy",M-g),v},this.getNearestLabel=function(f){var p=f.parentElement;if(!p)return"";var h;try{h=p.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch{h=null}return h?o.getText(h):o.getNearestLabel(p)},this.getEventProperties=function(f,p,h){var m,y,g,v,b=(g=(y=p==null?void 0:p.tagName)===null||y===void 0?void 0:y.toLowerCase)===null||g===void 0?void 0:g.call(y),S=typeof p.getBoundingClientRect=="function"?p.getBoundingClientRect():{left:null,top:null},x=o.getHierarchy(p),T=(v=x[0])===null||v===void 0?void 0:v.attrs,_=o.getNearestLabel(p),C=K7(T??{},h),I=(m={},m[TK]=x,m[HT]=b,m[WT]=o.getText(p),m[CK]=S.left==null?null:Math.round(S.left),m[IK]=S.top==null?null:Math.round(S.top),m[kK]=C,m[PK]=_,m[qT]=Tu(window.location.href.split("?")[0]),m[AK]=sw(o.replaceSensitiveString),m[OK]=window.innerHeight,m[MK]=window.innerWidth,m);return I[_K]=p.getAttribute("id")||"",I[EK]=p.getAttribute("class"),I[RK]=T==null?void 0:T["aria-label"],b==="a"&&f==="click"&&p instanceof HTMLAnchorElement&&(I[xK]=o.replaceSensitiveString(p.href)),JT(I)},this.addAdditionalEventProperties=function(f,p,h,m,y){y===void 0&&(y=!1);var g={event:f,timestamp:Date.now(),type:p};if(J7(g)&&g.event.target!==null){if(y){var v=WA(g.event.target,g.type);if(v)return g.closestTrackedAncestor=g.event.target,g.targetElementProperties=o.getEventProperties(g.type,g.closestTrackedAncestor,m),g}var b=mw(g.event.target,h);return b&&(g.closestTrackedAncestor=b,g.targetElementProperties=o.getEventProperties(g.type,b,m)),g}return g},this.extractDataFromDataSource=function(f,p){if(f.sourceType==="DOM_ELEMENT"){var h=a9(f,p);return h?f.elementExtractType==="TEXT"?o.getText(h):f.elementExtractType==="ATTRIBUTE"&&f.attribute?h.getAttribute(f.attribute):void 0:void 0}},this.getText=function(f){var p=f.closest("[".concat(zu,"]"))!==null;if(p)return Qi;var h="";if(!f.querySelector("[".concat(zu,"], [contenteditable]")))h=f.innerText||"";else{var m=f.cloneNode(!0);m.querySelectorAll("[".concat(zu,"], [contenteditable]")).forEach(function(y){y.innerText=Qi}),h=m.innerText||""}return o.replaceSensitiveString(h.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(f){var p,h,m;if(!f)return{};var y=(m=(h=f==null?void 0:f.tagName)===null||h===void 0?void 0:h.toLowerCase)===null||m===void 0?void 0:m.call(h),g=(p={},p[HT]=y,p[WT]=o.getText(f),p[qT]=window.location.href.split("?")[0],p);return JT(g)},this.diagnosticsClient=n==null?void 0:n.diagnosticsClient;var a=(s=t.maskTextRegex)!==null&&s!==void 0?s:[],u=[];try{for(var l=oe(a),c=l.next();!c.done;c=l.next()){var d=c.value;if(u.length>=UK)break;if(d instanceof RegExp)u.push(d);else if("pattern"in d&&typeof d.pattern=="string")try{u.push(new RegExp(d.pattern,"i"))}catch{}}}catch(f){r={error:f}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}this.additionalMaskTextPatterns=u}return e}(),l9=function(){function e(t){var n=t===void 0?{}:t,r=n.origin,i=r===void 0?Gd:r,o=this;this.endpoint=Gd,this.requestCallbacks={},this.onSelect=function(s){o.notify({action:"element-selected",data:s})},this.onTrack=function(s,a){s==="selector-mode-changed"?o.notify({action:"track-selector-mode-changed",data:a}):s==="selector-moved"&&o.notify({action:"track-selector-moved",data:a})},this.endpoint=i}return e.prototype.notify=function(t){var n,r,i,o;(r=(n=this.logger)===null||n===void 0?void 0:n.debug)===null||r===void 0||r.call(n,"Message sent: ",JSON.stringify(t)),(o=(i=window.opener)===null||i===void 0?void 0:i.postMessage)===null||o===void 0||o.call(i,t,this.endpoint)},e.prototype.sendRequest=function(t,n,r){var i=this;r===void 0&&(r={timeout:15e3});var o=Q7(),s={id:o,action:t,args:n},a=new Promise(function(u,l){i.requestCallbacks[o]={resolve:u,reject:l},i.notify(s),(r==null?void 0:r.timeout)>0&&setTimeout(function(){l(new Error("".concat(t," timed out (id: ").concat(o,")"))),delete i.requestCallbacks[o]},r.timeout)});return a},e.prototype.handleResponse=function(t){var n;if(!this.requestCallbacks[t.id]){(n=this.logger)===null||n===void 0||n.warn("No callback found for request id: ".concat(t.id));return}this.requestCallbacks[t.id].resolve(t.responseData),delete this.requestCallbacks[t.id]},e.prototype.setup=function(t){var n=this,r=t===void 0?{dataExtractor:new gw({})}:t,i=r.logger,o=r.endpoint,s=r.isElementSelectable,a=r.cssSelectorAllowlist,u=r.actionClickAllowlist,l=r.dataExtractor;
112this.logger=i,o&&this.endpoint===Gd&&(this.endpoint=o);var c=null;window.addEventListener("message",function(d){var f,p,h,m,y;if((p=(f=n.logger)===null||f===void 0?void 0:f.debug)===null||p===void 0||p.call(f,"Message received: ",JSON.stringify(d)),n.endpoint===d.origin){var g=d==null?void 0:d.data,v=g==null?void 0:g.action;if(v)if("id"in g)(m=(h=n.logger)===null||h===void 0?void 0:h.debug)===null||m===void 0||m.call(h,"Received Response to previous request: ",JSON.stringify(d)),n.handleResponse(g);else if(v==="ping")n.notify({action:"pong"});else if(v==="initialize-visual-tagging-selector"){var b=g==null?void 0:g.data;X7(FK).then(function(){var S;c=(S=window==null?void 0:window.amplitudeVisualTaggingSelector)===null||S===void 0?void 0:S.call(window,{getEventTagProps:l.getEventTagProps,isElementSelectable:function(x){return s?s((b==null?void 0:b.actionType)||"click",x):!0},onTrack:n.onTrack,onSelect:n.onSelect,visualHighlightClass:jK,messenger:n,cssSelectorAllowlist:a,actionClickAllowlist:u,extractDataFromDataSource:l.extractDataFromDataSource,dataExtractor:l,diagnostics:{autocapture:{version:Z7}}}),n.notify({action:"selector-loaded"})}).catch(function(){var S;(S=n.logger)===null||S===void 0||S.warn("Failed to initialize visual tagging selector")})}else v==="close-visual-tagging-selector"&&((y=c==null?void 0:c.close)===null||y===void 0||y.call(c))}}),this.notify({action:"page-loaded"})},e}(),c9=5;function d9(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.clickObservable,a=s.pipe(B7(),qt(function(d){var f=X(d,2),p=f[0],h=f[1],m=p.event.target!==h.event.target,y=Math.abs(h.event.screenX-p.event.screenX)<=20&&Math.abs(h.event.screenY-p.event.screenY)<=20;return m&&!y})),u=s.pipe(F7(r.debounceTime),Dt(function(){return"timeout"})),l=pw(a,u),c=s.pipe($7(0),qt(sc),qt(function(d){return i("click",d.closestTrackedAncestor)}),Dt(function(d){return o(d)}),L7(l));return c.subscribe(function(d){var f,p,h=(d.length>=c9,hy);try{for(var m=oe(d),y=m.next();!y.done;y=m.next()){var g=y.value;t==null||t.track(h,g.targetElementProperties)}}catch(v){f={error:v}}finally{try{y&&!y.done&&(p=m.return)&&p.call(m)}finally{if(f)throw f.error}}})}function f9(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.changeObservable,a=s.pipe(qt(sc),qt(function(u){return i("change",u.closestTrackedAncestor)}),Dt(function(u){return o(u)}));return a.subscribe(function(u){t==null||t.track(SK,r("change",u.closestTrackedAncestor))})}function p9(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,s=e.shouldTrackActionClick,a=n.clickObservable,u=n.mutationObservable,l=n.navigateObservable,c=a.pipe(qt(function(h){return!o("click",h.closestTrackedAncestor)}),Dt(function(h){var m=mw(h.event.target,r.actionClickAllowlist);return h.closestTrackedAncestor=m,h.closestTrackedAncestor!==null&&(h.targetElementProperties=i(h.type,h.closestTrackedAncestor)),h}),qt(sc),qt(function(h){return s("click",h.closestTrackedAncestor)})),d=[u];l&&d.push(l);var f=pw.apply(void 0,le([],X(d),!1)),p=c.pipe(z7(function(h){return f.pipe(hw(1),b7({first:500,with:function(){return dw}}),Dt(function(){return h}))}));return p.subscribe(function(h){t==null||t.track(hy,i("click",h.closestTrackedAncestor))})}var qA=function(){return new Rt(function(e){var t=new MutationObserver(function(n){e.next(n)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},VA=function(e){return e===void 0&&(e="click"),Pa(document,e,{capture:!0})},h9=function(e,t){try{if(t.subprop_key==="[Amplitude] Element Text")return t.subprop_op==="is"&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if(t.subprop_key==="[Amplitude] Element Hierarchy")return t.subprop_op==="autotrack css match"&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(n){return console.error("Error matching event to filter",n),!1}return!1},gy={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},ZT=function(e){var t,n,r,i,o=Object.values(gy).reduce(function(p,h){return p[h]=new Set,p},{});if(!e)return o;try{for(var s=oe(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{try{for(var l=(r=void 0,oe(u.definition)),c=l.next();!c.done;c=l.next()){var d=c.value,f=gy[d.event_type];f&&o[f].add(u.id)}}catch(p){r={error:p}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}catch(p){console.warn("Skipping Labeled Event due to malformed definition",u==null?void 0:u.id,p)}}}catch(p){t={error:p}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},ex=function(e){var t,n,r,i,o=new Map;try{for(var s=oe(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{for(var l=(r=void 0,oe(u.conditions)),c=l.next();!c.done;c=l.next()){var d=c.value;if(d.type==="LABELED_EVENT"){var f=d.match.eventId,p=o.get(f);p||(p=[],o.set(f,p)),p.push(u)}}}catch(h){r={error:h}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},m9=function(e,t){return t.filter(function(n){return n.definition.some(function(r){return gy[r.event_type]===e.type&&r.filters.every(function(i){return h9(e,i)})})})},g9=function(e,t){var n,r,i,o,s=new Set;try{for(var a=oe(e),u=a.next();!u.done;u=a.next()){var l=u.value,c=t.get(l.id);if(c)try{for(var d=(i=void 0,oe(c)),f=d.next();!f.done;f=d.next()){var p=f.value;s.add(p)}}catch(h){i={error:h}}
112finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return Array.from(s)},v9=function(){function e(t,n,r,i){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=n,this.dataExtractor=r,this.options=i}return e.prototype.evaluate=function(t){var n,r,i=this.options.pageActions;if(!i)return t;var o=m9(t,Array.from(this.groupedLabeledEvents[t.type]).map(function(c){return i.labeledEvents[c]})),s=g9(o,this.labeledEventToTriggerMap);try{for(var a=oe(s),u=a.next();!u.done;u=a.next()){var l=u.value;u9(l.actions,t,this.dataExtractor)}}catch(c){n={error:c}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return t},e.prototype.update=function(t,n,r){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=n,this.options=r},e}(),y9=function(e,t,n,r){return new v9(e,t,n,r)},Dr;(function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"})(Dr||(Dr={}));var b9=function(e,t){var n,r,i,o,s,a,u,l;e===void 0&&(e={});var c=e.dataAttributePrefix,d=c===void 0?aA:c,f=e.visualTaggingOptions,p=f===void 0?{enabled:!0,messenger:new l9}:f;e.cssSelectorAllowlist=(n=e.cssSelectorAllowlist)!==null&&n!==void 0?n:dG,e.actionClickAllowlist=(r=e.actionClickAllowlist)!==null&&r!==void 0?r:fG,e.debounceTime=(i=e.debounceTime)!==null&&i!==void 0?i:0,e.pageUrlExcludelist=(o=e.pageUrlExcludelist)===null||o===void 0?void 0:o.reduce(function(O,D){if(typeof D=="str
112ing"&&O.push(D),D instanceof RegExp&&O.push(D),typeof D=="object"&&D!==null&&"pattern"in D)try{O.push(new RegExp(D.pattern))}catch(L){return console.warn("Invalid regex pattern: ".concat(D.pattern),L),O}return O},[]);var h=yK,m="enrichment",y=[],g=new gw(e,t),v=function(){var O,D=VA().pipe(Dt(function(R){return g.addAdditionalEventProperties(R,"click",e.cssSelectorAllowlist,d)}),zo()),L=Pa(document,"change",{capture:!0}).pipe(Dt(function(R){return g.addAdditionalEventProperties(R,"change",e.cssSelectorAllowlist,d)}),zo()),F;window.navigation&&(F=Pa(window.navigation,"navigate").pipe(Dt(function(R){return g.addAdditionalEventProperties(R,"navigate",e.cssSelectorAllowlist,d)}),zo()));var M=qA().pipe(Dt(function(R){return g.addAdditionalEventProperties(R,"mutation",e.cssSelectorAllowlist,d)}),zo());return O={},O[Dr.ClickObservable]=D,O[Dr.ChangeObservable]=L,O[Dr.NavigateObservable]=F,O[Dr.MutationObservable]=M,O},b=ZT(Object.values((a=(s=e.pageActions)===null||s===void 0?void 0:s.labeledEvents)!==null&&a!==void 0?a:{})),S=ex((l=(u=e.pageActions)===null||u===void 0?void 0:u.triggers)!==null&&l!==void 0?l:[]),x=y9(b,S,g,e),T=function(O){var D,L;O&&(e.pageActions=W(W({},e.pageActions),O),b=ZT(Object.values((D=e.pageActions.labeledEvents)!==null&&D!==void 0?D:{})),S=ex((L=e.pageActions.triggers)!==null&&L!==void 0?L:[]),x.update(b,S,e))},_=function(O,D){return B(void 0,void 0,void 0,function(){var L,F,M,R,N,A,P,k,$,z;return U(this,function(H){return typeof document>"u"?[2]:(O.fetchRemoteConfig&&(O.remoteConfigClient?O.remoteConfigClient.subscribe("analyticsSDK.pageActions","all",function(V){T(V)}):O.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),L=Hu(e,e.cssSelectorAllowlist),F=Hu(e,e.actionClickAllowlist),M=v(),R=d9({allObservables:M,options:e,amplitude:D,shouldTrackEvent:L,evaluateTriggers:x.evaluate.bind(x)}),y.push(R),N=f9({allObservables:M,getEventProperties:function(){for(var V=[],q=0;q<arguments.length;q++)V[q]=arguments[q];return g.getEventProperties.apply(g,le(le([],X(V),!1),[d],!1))},amplitude:D,shouldTrackEvent:L,evaluateTriggers:x.evaluate.bind(x)}),y.push(N),A=p9({allObservables:M,options:e,getEventProperties:function(){for(var V=[],q=0;q<arguments.length;q++)V[q]=arguments[q];return g.getEventProperties.apply(g,le(le([],X(V),!1),[d],!1))},amplitude:D,shouldTrackEvent:L,shouldTrackActionClick:F}),y.push(A),($=O==null?void 0:O.loggerProvider)===null||$===void 0||$.log("".concat(h," has been successfully added.")),window.opener&&p.enabled&&(P=e.cssSelectorAllowlist,k=e.actionClickAllowlist,(z=p.messenger)===null||z===void 0||z.setup(W(W({dataExtractor:g,logger:O==null?void 0:O.loggerProvider},(O==null?void 0:O.serverZone)&&{endpoint:LK[O.serverZone]}),{isElementSelectable:Hu(e,le(le([],X(P),!1),X(k),!1)),cssSelectorAllowlist:P,actionClickAllowlist:k}))),[2])})})},C=function(O){return B(void 0,void 0,void 0,function(){return U(this,function(D){return[2,O]})})},I=function(){return B(void 0,void 0,void 0,function(){var O,D,L,F,M;return U(this,function(R){try{for(O=oe(y),D=O.next();!D.done;D=O.next())L=D.value,L.unsubscribe()}catch(N){F={error:N}}finally{try{D&&!D.done&&(M=O.return)&&M.call(O)}finally{if(F)throw F.error}}return[2]})})};return{name:h,type:m,setup:_,execute:C,teardown:I}},tx=3e3;function w9(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackDeadClick,o=n.clickObservable,s=n.mutationObservable,a=n.navigateObservable,u=o.pipe(qt(sc),qt(function(f){return i("click",f.closestTrackedAncestor)}),qt(function(f){var p=f.event.target;return p.closest('a[target="_blank"]')===null})),l=[s];a&&l.push(a);var c=pw.apply(void 0,le([],X(l),!1)),d=u.pipe(oc(function(f){var p,h=new Rt(function(m){return p=setTimeout(function(){return m.next(f)},tx),function(){clearTimeout(p)}});return N7(h,c.pipe(hw(1),Dt(function(){return null}))).pipe(qt(function(m){return m!==null}))}),W7(tx));return d.subscribe(function(f){var p={"[Amplitude] X":f.event.clientX,"[Amplitude] Y":f.event.clientY};t.track(wK,W(W({},r("click",f.closestTrackedAncestor)),p),{time:f.timestamp})})}var vy=vG,GA=gG,nx=yG;function rx(e,t){var n,r,i,o,s=t.event,a=s.clientX,u=s.clientY;e.yMin=Math.min((n=e.yMin)!==null&&n!==void 0?n:u,u),e.yMax=Math.max((r=e.yMax)!==null&&r!==void 0?r:u,u),e.xMin=Math.min((i=e.xMin)!==null&&i!==void 0?i:a,a),e.xMax=Math.max((o=e.xMax)!==null&&o!==void 0?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>nx||e.xMax-e.xMin>nx}function ix(e){var t=e[0],n=e[e.length-1],r=W({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(i){return{X:i.event.clientX,Y:i.event.clientY,Time:i.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties);return{rageClickEvent:r,time:t.timestamp}}function S9(e,t){var n=Math.max(0,e.length-vy+1),r=e[n];return t.timestamp-r.timestamp>=GA}function _9(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}function E9(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackRageClick,i=n.clickObservable,o=[],s={},a;function u(l){o=[],s={},l&&(rx(s,l),o.push(l))}return i.pipe(qt(sc),qt(function(l){return r("click",l.closestTrackedAncestor)}),Dt(function(l){if(a&&clearTimeout(a),rx(s,l),o.length===0)return o.push(l),null;if(_9(o,l)||S9(o,l)||s.isOutOfBounds){var c=o.length>=vy?ix(o):null;return u(l),c}return o.push(l),o.length>=vy&&(a=setTimeout(function(){var d=ix(o),f=d.rageClickEvent,p=d.time;t.track(zT,f,{time:p}),u()},GA)),null}),qt(function(l){return l!==null})).subscribe(function(l){l!==null&&t.track(zT,l.rageClickEvent,{time:l.time})})}var T9=function(e){var t,n,r,i,o;e===void 0&&(e={});var s=bK,a="enrichment",u=[],l=(n=(t=e.rageClicks)===null||t===void 0?void 0:t.cssSelectorAllowlist)!==null&&n!==void 0?n:mG,c=(i=(r=e.deadClicks)===null||r===void 0?void 0:r.cssSelectorAllowlist)!==null&&i!==void 0?i:hG,d=(o=e.dataAttributePrefix)!==null&&o!==void 0?o:aA,f=new gw(e),p=le([],X(new Set(le(le([],X(l),!1),X(c),!1))),!1),h=function(){var v,b=VA("pointerdown").pipe(Dt(function(T){return f.addAdditionalEventProperties(T,"click",p,d,!0)}),zo()),S;window.navigation&&(S=Pa(window.navigation,"navigate").pipe(Dt(function(T){return f.addAdditionalEventProperties(T,"navigate",p,d)}),zo()));var x=qA().pipe(Dt(function(T){return f.addAdditionalEventProperties(T,"mutation",p,d)}),zo());return v={},v[Dr.ClickObservable]=b,v[Dr.ChangeObservable]=new Rt,v[Dr.NavigateObservable]=S,v[Dr.MutationObservable]=x,v},m=function(v,b){return B(void 0,void 0,void 0,function(){var S,x,T,_,C,I;return U(this,function(O){return typeof document>"u"?[2]:(S=Hu(e,l),x=Hu(e,c),T=h(),_=E9({allObservables:T,amplitude:b,shouldTrackRageClick:S}),u.push(_),C=w9({amplitude:b,allObservables:T,getEventProperties:function(D,L){return f.getEventProperties(D,L,d)},shouldTrackDeadClick:x}),u.push(C),(I=v==null?void 0:v.loggerProvider)===null||I===void 0||I.log("".concat(s," has been successfully added.")),[2])})})},y=function(v){return B(void 0,void 0,void 0,function(){return U(this,function(b){return[2,v]})})},g=function(){return B(void 0,void 0,void 0,function(){var v,b,S,x,T;return U(this,function(_){try{for(v=oe(u),b=v.next();!b.done;b=v.next())S=b.value,S.unsubscribe()}catch(C){x={error:C}}finally{try{b&&!b.done&&(T=v.return)&&T.call(v)}finally{if(x)throw x.error}}return[2]})})};return{name:s,type:a,setup:m,execute:y,teardown:g}},x9="@amplitude/plugin-network-capture-browser",KA="[Amplitude] Network Request",YA="500-599";function Yd(e,t){var n=t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&"),r="^"+n.replace(/\*/g,".*")+"$",i=new RegExp(r);return i.test(e)}function XA(e,t){var n,r,i=t.split(",");try{for(var o=oe(i),s=o.next();!s.done;s=o.next()){var a=s.value,u=X(a.split("-").map(Number),2),l=u[0],c=u[1];if(e===l&&c===void 0||e>=l&&e<=c)return!0}}catch(d){n={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function C9(e,t,n,r,i){if(!(e.hosts&&!e.hosts.find(function(s){return Yd(t,s)}))&&!(r&&e.urls&&!dy(r,e.urls))&&!(i&&e.methods&&!e.methods.find(function(s){return i.toLowerCase()===s.toLowerCase()||s==="*"}))){if(n||n===0){var o=e.statusCodeRange||YA;if(!XA(n,o))return!1}return!0}}function QA(e){var t;if(e)try{var n=(t=xe())===null||t===void 0?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,a=r.host;r.hash="",r.search="";var u=r.href;return{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:u,host:a}}catch{return}}function I9(e,t){if(e.includes("amplitude.com"))try{var n=t.body;
112if(typeof n!="string")return!1;var r=JSON.parse(n),i=r.events;if(i.find(function(o){return o.event_type===KA}))return!0}catch{}return!1}function ox(e){if(typeof e!="object"||e===null){if(e)return le([],X(Jf),!1);if(e===void 0){var t=void 0;return t}return}if(e.length!==0)return e}function sx(e){var t,n;return!(!((t=e==null?void 0:e.allowlist)===null||t===void 0)&&t.length)&&!(!((n=e==null?void 0:e.blocklist)===null||n===void 0)&&n.length)}function R9(e,t){var n;t===void 0&&(t={});var r=QA(e.url);if(!r)return!1;var i=r.host;if(t.ignoreAmplitudeRequests!==!1&&(Yd(i,"*.amplitude.com")||Yd(i,"amplitude.com"))||!((n=t.ignoreHosts)===null||n===void 0)&&n.find(function(s){return Yd(i,s)})||!t.captureRules&&e.status!==void 0&&!XA(e.status,YA))return!1;if(t.captureRules){var o;if(le([],X(t.captureRules),!1).reverse().find(function(s){if(o=C9(s,i,e.status,e.url,e.method),o){var a=ox(s.responseHeaders);if(e.responseWrapper&&a){var u=e.responseWrapper.headers(a);u&&(e.responseHeaders=u)}var l=ox(s.requestHeaders);if(e.requestWrapper&&l){var c=e.requestWrapper.headers(l);c&&(e.requestHeaders=c)}e.responseWrapper&&s.responseBody&&!sx(s.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(s.responseBody.allowlist,s.responseBody.blocklist)),e.requestWrapper&&s.requestBody&&!sx(s.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(s.requestBody.allowlist,s.requestBody.blocklist))}return o!==void 0}),!o)return!1}return!(e.requestWrapper&&I9(i,e.requestWrapper))}function k9(e,t,n,r){return B(this,void 0,void 0,function(){var i,o,s;return U(this,function(a){switch(a.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=X.apply(void 0,[a.sent(),2]),o=i[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(u){r==null||r.debug("Failed to stringify request body",u)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch{r==null||r.debug("Failed to stringify response body")}a.label=2;case 2:return n==null||n.track(KA,e),[2]}})})}function P9(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider,o=t.networkObservable,s=o.pipe(qt(function(a){return R9(a.event,n)}));return s.subscribe(function(a){var u,l,c,d=a.event,f=QA(d.url);if(f){var p=(l=d.responseWrapper)===null||l===void 0?void 0:l.bodySize,h=(c=d.requestWrapper)===null||c===void 0?void 0:c.bodySize,m=(u={},u["[Amplitude] URL"]=f.hrefWithoutQueryOrHash,u["[Amplitude] URL Query"]=f.query,u["[Amplitude] URL Fragment"]=f.fragment,u["[Amplitude] Request Method"]=d.method,u["[Amplitude] Status Code"]=d.status,u["[Amplitude] Start Time"]=d.startTime,u["[Amplitude] Completion Time"]=d.endTime,u["[Amplitude] Duration"]=d.duration,u["[Amplitude] Request Body Size"]=h,u["[Amplitude] Response Body Size"]=p,u["[Amplitude] Request Type"]=d.type,u["[Amplitude] Request Headers"]=d.requestHeaders,u["[Amplitude] Response Headers"]=d.responseHeaders,u);k9(m,d,r,i)}})}var yy;(function(e){e.NetworkObservable="networkObservable"})(yy||(yy={}));var A9=function(e){e===void 0&&(e={});var t=x9,n="enrichment",r,i=[],o=function(c,d){var f={event:c,timestamp:Date.now(),type:d};return f},s=function(){var c,d=new Rt(function(f){var p=new IG(function(h){var m=o(h,"network");f.next(m)});return NT.subscribe(p,r),function(){NT.unsubscribe(p)}});return c={},c[yy.NetworkObservable]=d,c},a=function(c,d){return B(void 0,void 0,void 0,function(){var f,p;return U(this,function(h){return typeof document>"u"?[2]:(f=s(),r=c==null?void 0:c.loggerProvider,p=P9({allObservables:f,networkTrackingOptions:e,amplitude:d,loggerProvider:r}),i.push(p),r==null||r.log("".concat(t," has been successfully added.")),[2])})})},u=function(c){return B(void 0,void 0,void 0,function(){return U(this,function(d){return[2,c]})})},l=function(){return B(void 0,void 0,void 0,function(){var c,d,f,p,h;return U(this,function(m){try{for(c=oe(i),d=c.next();!d.done;d=c.next())f=d.value,f.unsubscribe()}catch(y){p={error:y}}finally{try{d&&!d.done&&(h=c.return)&&h.call(c)}finally{if(p)throw p.error}}return[2]})})};return{name:t,type:n,setup:a,execute:u,teardown:l}},O9="web-vitals-browser",M9="[Amplitude] Web Vitals";let JA=-1;const Ka=e=>{addEventListener("pageshow",t=>{t.persisted&&(JA=t.timeStamp,e(t))},!0)},zr=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=((a,u)=>a>u[1]?"poor":a>u[0]?"needs-improvement":"good")(t.value,n),e(t)))}},vw=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},yw=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ac=()=>{const e=yw();return(e==null?void 0:e.activationStart)??0},Hr=(e,t=-1)=>{const n=yw();let r="navigate";return JA>=0?r="back-forward-cache":n&&(document.prerendering||ac()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Am=new WeakMap;function bw(e,t){return Am.get(e)||Am.set(e,new t),Am.get(e)}class N9{constructor(){Xe(this,"t");Xe(this,"i",0);Xe(this,"o",[])}h(t){var i;if(t.hadRecentInput)return;const n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),(i=this.t)==null||i.call(this,t)}}const uc=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},ww=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let ea=-1;const ZA=new Set,ax=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,by=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of ZA)t();isFinite(ea)||(ea=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",by,!0))}},Zp=()=>{var e;if(ea<0){const t=ac();ea=(document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime)??ax(),addEventListener("visibilitychange",by,!0),addEventListener("prerenderingchange",by,!0),Ka(()=>{setTimeout(()=>{ea=ax()})})}return{get firstHiddenTime(){return ea},onHidden(t){ZA.add(t)}}}
112,eh=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},ux=[1800,3e3],eO=(e,t={})=>{eh(()=>{const n=Zp();let r,i=Hr("FCP");const o=uc("paint",s=>{for(const a of s)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(i.value=Math.max(a.startTime-ac(),0),i.entries.push(a),r(!0)))});o&&(r=zr(e,i,ux,t.reportAllChanges),Ka(s=>{i=Hr("FCP"),r=zr(e,i,ux,t.reportAllChanges),vw(()=>{i.value=performance.now()-s.timeStamp,r(!0)})}))})},lx=[.1,.25],D9=(e,t={})=>{const n=Zp();eO(ww(()=>{let r,i=Hr("CLS",0);const o=bw(t,N9),s=u=>{for(const l of u)o.h(l);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=uc("layout-shift",s);a&&(r=zr(e,i,lx,t.reportAllChanges),n.onHidden(()=>{s(a.takeRecords()),r(!0)}),Ka(()=>{o.i=0,i=Hr("CLS",0),r=zr(e,i,lx,t.reportAllChanges),vw(()=>r())}),setTimeout(r))}))};let tO=0,Om=1/0,td=0;const L9=e=>{for(const t of e)t.interactionId&&(Om=Math.min(Om,t.interactionId),td=Math.max(td,t.interactionId),tO=td?(td-Om)/7+1:0)};let wy;const cx=()=>wy?tO:performance.interactionCount??0,F9=()=>{"interactionCount"in performance||wy||(wy=uc("event",L9,{type:"event",buffered:!0,durationThreshold:0}))};let dx=0;class j9{constructor(){Xe(this,"u",[]);Xe(this,"l",new Map);Xe(this,"m");Xe(this,"p")}v(){dx=cx(),this.u.length=0,this.l.clear()}L(){const t=Math.min(this.u.length-1,Math.floor((cx()-dx)/50));return this.u[t]}h(t){var i,o;if((i=this.m)==null||i.call(this,t),!t.interactionId&&t.entryType!=="first-input")return;const n=this.u.at(-1);let r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.P){if(r?t.duration>r.P?(r.entries=[t],r.P=t.duration):t.duration===r.P&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],P:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((s,a)=>a.P-s.P),this.u.length>10){const s=this.u.splice(10);for(const a of s)this.l.delete(a.id)}(o=this.p)==null||o.call(this,r)}}}const nO=e=>{const t=globalThis.requestIdleCallback||setTimeout;document.visibilityState==="hidden"?e():(e=ww(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},fx=[200,500],U9=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=Zp();eh(()=>{F9();let r,i=Hr("INP");const o=bw(t,j9),s=u=>{nO(()=>{for(const c of u)o.h(c);const l=o.L();l&&l.P!==i.value&&(i.value=l.P,i.entries=l.entries,r())})},a=uc("event",s,{durationThreshold:t.durationThreshold??40});r=zr(e,i,fx,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),r(!0)}),Ka(()=>{o.v(),i=Hr("INP"),r=zr(e,i,fx,t.reportAllChanges)}))})};class $9{constructor(){Xe(this,"m")}h(t){var n;(n=this.m)==null||n.call(this,t)}}const px=[2500,4e3],B9=(e,t={})=>{eh(()=>{const n=Zp();let r,i=Hr("LCP");const o=bw(t,$9),s=u=>{t.reportAllChanges||(u=u.slice(-1));for(const l of u)o.h(l),l.startTime<n.firstHiddenTime&&(i.value=Math.max(l.startTime-ac(),0),i.entries=[l],r())},a=uc("largest-contentful-paint",s);if(a){r=zr(e,i,px,t.reportAllChanges);const u=ww(()=>{s(a.takeRecords()),a.disconnect(),r(!0)}),l=c=>{c.isTrusted&&(nO(u),removeEventListener(c.type,l,{capture:!0}))};for(const c of["keydown","click","visibilitychange"])addEventListener(c,l,{capture:!0});Ka(c=>{i=Hr("LCP"),r=zr(e,i,px,t.reportAllChanges),vw(()=>{i.value=performance.now()-c.timeStamp,r(!0)})})}})},hx=[800,1800],Sy=e=>{document.prerendering?eh(()=>Sy(e)):document.readyState!=="complete"?addEventListener("load",()=>Sy(e),!0):setTimeout(e)},z9=(e,t={})=>{let n=Hr("TTFB"),r=zr(e,n,hx,t.reportAllChanges);Sy(()=>{const i=yw();i&&(n.value=Math.max(i.responseStart-ac(),0),n.entries=[i],r(!0),Ka(()=>{n=Hr("TTFB",0),r=zr(e,n,hx,t.reportAllChanges),r(!0)}))})};function H9(e){var t,n=((t=e.entries[0])===null||t===void 0?void 0:t.startTime)||0;return performance.timeOrigin+n}function cu(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(H9(e)),navigationStart:Math.floor(performance.timeOrigin)}}var W9=function(){var e=null,t=xe(),n=t==null?void 0:t.document,r=t==null?void 0:t.location,i=function(a,u){return B(void 0,void 0,void 0,function(){var l,c,d;return U(this,function(f){return l=function(p){var h;if(!p)return"";var m=p;try{m=decodeURI(p)}catch(y){(h=a.loggerProvider)===null||h===void 0||h.error("Malformed URI sequence: ",y)}return m},n===void 0?[2]:(c=l(r==null?void 0:r.href),d={"[Amplitude] Page Domain":(r==null?void 0:r.hostname)||"","[Amplitude] Page Location":c,"[Amplitude] Page Path":l(r==null?void 0:r.pathname),"[Amplitude] Page Title":typeof document<"u"&&document.title||"","[Amplitude] Page URL":c.split("?")[0]},B9(function(p){d["[Amplitude] LCP"]=cu(p)}),eO(function(p){d["[Amplitude] FCP"]=cu(p)}),U9(function(p){d["[Amplitude] INP"]=cu(p)}),D9(function(p){d["[Amplitude] CLS"]=cu(p)}),z9(function(p){d["[Amplitude] TTFB"]=cu(p)}),e=function(){n.visibilityState==="hidden"&&e&&(u.track(M9,d),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e),[2])})})},o=function(a){return B(void 0,void 0,void 0,function(){return U(this,function(u){return[2,a]})})},s=function(){return B(void 0,void 0,void 0,function(){return U(this,function(a){return e&&(n==null||n.removeEventListener("visibilitychange",e)),[2]})})};return{name:O9,type:"enrichment",setup:i,execute:o,teardown:s}},mx=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},q9=function(e){return Object.values(e).every(function(t){return!t})},V9=function(e,t,n,r,i){i===void 0&&(i=!0),e.referrer;var o=e.referring_domain,s=Ra(e,["referrer","referring_domain"]),a=t||{};a.referrer;var u=a.referring_domain,l=Ra(a,["referrer","referring_domain"]);if(G9(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&q9(e)&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var c=JSON.stringify(s)!==JSON.stringify(l),d=mx(o||"")!==mx(u||""),f=!t||c||d;return f?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),f},G9=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=""),e.some(function(n){return n instanceof RegExp?n.test(t):n===t})},K9=function(e,t){var n=W(W({},Xp),e),r=Object.entries(n).reduce(function(i,o){var s,a=X(o,2),u=a[0],l=a[1];return i.setOnce("initial_".concat(u),(s=l??t.initialEmptyValue)!==null&&s!==void 0?s:"EMPTY"),l?i.set(u,l):i.unset(u)},new Tl);return ZP(r)},Y9=function(e){var t=e;
112return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},X9=function(){function e(t,n){var r;this.shouldTrackNewCampaign=!1,this.options=W({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:Y9((r=n.cookieOptions)===null||r===void 0?void 0:r.domain)},t),this.storage=n.cookieStorage,this.storageKey=RT(n.apiKey,"MKTG"),this.webExpStorageKey=RT(n.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=Xp,this.sessionTimeout=n.sessionTimeout,this.lastEventTime=n.lastEventTime,this.logger=n.loggerProvider,n.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return B(this,void 0,void 0,function(){var t,n;return U(this,function(r){switch(r.label){case 0:return[4,this.fetchCampaign()];case 1:return n=X.apply(void 0,[r.sent(),2]),this.currentCampaign=n[0],this.previousCampaign=n[1],t=this.lastEventTime?rA(this.sessionTimeout,this.lastEventTime):!0,V9(this.currentCampaign,this.previousCampaign,this.options,this.logger,t)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return B(this,void 0,void 0,function(){var t;return U(this,function(n){switch(n.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return t=n.sent(),t?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[4,Promise.all([t||new fA().parse(),this.storage.get(this.storageKey)])];case 4:return[2,n.sent()]}})})},e.prototype.generateCampaignEvent=function(t){this.shouldTrackNewCampaign=!1;var n=K9(this.currentCampaign,this.options);return t&&(n.event_id=t),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),nd="AMP_CURRENT_PAGE",rd="AMP_PREVIOUS_PAGE",Is="AMP_URL_INFO",Wu;(function(e){e.Direct="direct",e.Internal="internal",e.External="external"})(Wu||(Wu={}));var Q9=new Set([kn.IDENTIFY,kn.GROUP_IDENTIFY,kn.REVENUE]),J9=function(){var e=xe(),t=void 0,n=!1,r=void 0,i=!1,o=!1,s=function(d){var f;try{var p=Tu(d,r);f=new URL(p).hostname}catch(h){r==null||r.error("Could not parse URL: ",h)}return f},a=function(d){var f=typeof location<"u"&&location.hostname||"",p=d?s(d):void 0;switch(p){case void 0:return Wu.Direct;case f:return Wu.Internal;default:return Wu.External}},u=function(){return B(void 0,void 0,void 0,function(){var d,f,p,h,m;return U(this,function(y){switch(y.label){case 0:return t&&n?[4,t.get(Is)]:[3,3];case 1:return d=y.sent(),f=Tu(typeof location<"u"&&location.href||""),p=(d==null?void 0:d[nd])||"",h=void 0,f===p?h=(d==null?void 0:d[rd])||"":p?h=p:h=document.referrer||"",[4,t.set(Is,(m={},m[nd]=f,m[rd]=h,m))];case 2:y.sent(),y.label=3;case 3:return[2]}})})},l=function(){u()},c={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(d,f){return B(void 0,void 0,void 0,function(){return U(this,function(p){switch(p.label){case 0:return r=d.loggerProvider,r.log("Installing @amplitude/plugin-page-url-enrichment-browser"),o=!0,e?(t=new rw(e.sessionStorage),[4,t.isEnabled()]):[3,2];case 1:n=p.sent(),e.addEventListener("popstate",l),i||(e.history.pushState=new Proxy(e.history.pushState,{apply:function(h,m,y){var g=X(y,3),v=g[0],b=g[1],S=g[2];h.apply(m,[v,b,S]),o&&l()}}),e.history.replaceState=new Proxy(e.history.replaceState,{apply:function(h,m,y){var g=X(y,3),v=g[0],b=g[1],S=g[2];h.apply(m,[v,b,S]),o&&l()}}),i=!0),p.label=2;case 2:return[2]}})})},execute:function(d){return B(void 0,void 0,void 0,function(){var f,p,h,m,y;return U(this,function(g){switch(g.label){case 0:return f=Tu(typeof location<"u"&&location.href||""),t&&n?[4,t.get(Is)]:[3,5];case 1:return p=g.sent(),p!=null&&p[nd]?[3,3]:[4,t.set(Is,(y={},y[nd]=f,y[rd]=document.referrer||"",y))];case 2:g.sent(),g.label=3;case 3:return[4,t.get(Is)];case 4:if(h=g.sent(),m="",h&&(m=h[rd]||""),Q9.has(d.event_type))return[2,d];d.event_properties=W(W({},d.event_properties||{}),{"[Amplitude] Page Domain":du(d,"[Amplitude] Page Domain",typeof location<"u"&&location.hostname||""),"[Amplitude] Page Location":du(d,"[Amplitude] Page Location",f),"[Amplitude] Page Path":du(d,"[Amplitude] Page Path",typeof location<"u"&&Tu(location.pathname)||""),"[Amplitude] Page Title":du(d,"[Amplitude] Page Title",sw(ow)),"[Amplitude] Page URL":du(d,"[Amplitude] Page URL",f.split("?")[0]),"[Amplitude] Previous Page Location":m,"[Amplitude] Previous Page Type":a(m)}),g.label=5;case 5:return[2,d]}})})},teardown:function(){return B(void 0,void 0,void 0,function(){return U(this,function(d){switch(d.label){case 0:return e&&(e.removeEventListener("popstate",l),o=!1),t&&n?[4,t.set(Is,{})]:[3,2];case 1:d.sent(),d.label=2;case 2:return[2]}})})}};return c};function du(e,t,n){return e.event_properties||(e.event_properties={}),e.event_properties[t]===void 0?n:e.event_properties[t]}var Z9=function(e){Ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._diagnosticsSampleRate=0,n}return t.prototype.init=function(n,r,i){n===void 0&&(n="");var o,s;return arguments.length>2?(o=r,s=i):typeof r=="string"?(o=r,s=void 0):(o=r==null?void 0:r.userId,s=r),Ht(this._init(W(W({},s),{userId:o,apiKey:n})))},t.prototype._init=function(n){var r,i,o,s,a;return B(this,void 0,void 0,function(){var u,l,c,d,f,p,h,m,y,g=this;return U(this,function(v){switch(v.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,iK(n.apiKey,n,this)]);case 1:return u=v.sent(),!((r=u.remoteConfig)===null||r===void 0)&&r.fetchRemoteConfig?(l=new sA(u.apiKey,u.loggerProvider,u.serverZone,(i=u.remoteConfig)===null||i===void 0?void 0:i.serverUrl),[4,new Promise(function(b){l==null||l.subscribe("configs.analyticsSDK.browserSDK","all",function(S,x,T){u.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:S,source:x,lastFetch:T},null,2)),S&&vK(S,u),b()})})]):[3,3];case 2:v.sent(),v.label=3;case 3:return c=new iG(u.apiKey,u.loggerProvider,u.serverZone,{enabled:u.enableDiagnostics,sampleRate:u.diagnosticsSampleRate||this._diagnosticsSampleRate}),c.setTag("library","".concat(yA,"/").concat(aw)),[4,e.prototype._init.call(this,u)];case 4:return v.sent(),this.logBrowserOptions(u),this.config.diagnosticsClient=c,this.config.remoteConfigClient=l,pA(this.config.defaultTracking)?(d=$G(this.config),this.webAttribution=new X9(d,this.config),[4,this.webAttribution.init()]):[3,6];case 5:v.sent(),v.label=6;case 6:return f=Zf(),p=f.ampTimestamp?Number(f.ampTimestamp):void 0,h=p?Date.now()<p:!0,this.config.identify&&this.identify(this.config.identify),m=h&&!Number.isNaN(Number(f.ampSessionId))?Number(f.ampSessionId):void 0,this.setSessionId((a=(s=(o=n.sessionId)!==null&&o!==void 0?o:m)!==null&&s!==void 0?s:this.config.sessionId)!==null&&a!==void 0?a:Date.now()),y=ka(n.instanceName),y.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===cG?[3,8]:[4,this.add(gK()).promise];case 7:v.sent(),v.label=8;case 8:return[4,this.add(new N6).promise];case 9:return v.sent(),[4,this.add(new HG).promise];case 10:return v.sent(),[4,this.add(new W6).promise];case 11:return v.sent(),mK(this.config),OG(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(hK()).promise]):[3,13];case 12:v.sent(),v.label=13;case 13:return MG(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(pK()).promise]):[3,15];case 14:v.sent(),v.label=15;case 15:return hA(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(lK(UG(this.config))).promise]):[3,17];case 16:v.sent(),v.label=17;case 17:return gA(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(b9(LG(this.config),{diagnosticsClient:c})).promise]):[3,19];case 18:v.sent(),v.label=19;case 19:return vA(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(T9(FG(this.config))).promise]):[3,21];case 20:v.sent(),v.label=21;case 21:return mA(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(A9(jG(this.config))).promise]):[3,23];case 22:v.sent(),v.label=23;case 23:return DG(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(W9()).promise]):[3,25];case 24:v.sent(),v.label=25;case 25:return NG(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(J9()).promise]):[3,27];case 26:v.sent(),v.label=27;case 27:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 28:return v.sent(),y.eventBridge.setEventReceiver(function(b){var S=b.eventProperties||{},x=S.time,T=Ra(S,["time"]),_=typeof x=="number"?{time:x}:void 0;g.track(b.eventType,T,_)}),[2]}})})},t.prototype.getUserId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.userId},t.prototype.setUserId=function(n){if(!this.config){this.q.push(this.setUserId.bind(this,n));return}
112this.config.loggerProvider.debug("function setUserId: ",n),(n!==this.config.userId||n===void 0)&&(this.config.userId=n,this.timeline.onIdentityChanged({userId:n}),z6(n,this.config.instanceName))},t.prototype.getDeviceId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.deviceId},t.prototype.setDeviceId=function(n){if(!this.config){this.q.push(this.setDeviceId.bind(this,n));return}this.config.loggerProvider.debug("function setDeviceId: ",n),n!==this.config.deviceId&&(this.config.deviceId=n,this.timeline.onIdentityChanged({deviceId:n}),H6(n,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(Co()),this.setUserId(void 0)},t.prototype.getIdentity=function(){var n,r;return{deviceId:(n=this.config)===null||n===void 0?void 0:n.deviceId,userId:(r=this.config)===null||r===void 0?void 0:r.userId,userProperties:this.userProperties}},t.prototype.getOptOut=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.optOut},t.prototype.getSessionId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.sessionId},t.prototype.setSessionId=function(n){var r,i=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,n)),Ht(Promise.resolve());if(n===this.config.sessionId)return Ht(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",n);var o=this.getSessionId();o!==n&&this.timeline.onSessionIdChanged(n);var s=this.config.lastEventTime,a=(r=this.config.lastEventId)!==null&&r!==void 0?r:-1;this.config.sessionId=n,this.config.lastEventTime=void 0,this.config.pageCounter=0,DT(this.config.defaultTracking)&&(o&&s&&i.push(this.track(jT,void 0,{device_id:this.previousSessionDeviceId,event_id:++a,session_id:o,time:s+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var u=this.trackCampaignEventIfNeeded(++a,i);return DT(this.config.defaultTracking)&&i.push(this.track(FT,void 0,{event_id:u?++a:a,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,Ht(Promise.all(i))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(n){if(!this.config){this.q.push(this.setTransport.bind(this,n));return}this.config.transportProvider=wA(n)},t.prototype.identify=function(n,r){if(Tm(n)){var i=n._q;n._q=[],n=Em(new Tl,i)}return r!=null&&r.user_id&&this.setUserId(r.user_id),r!=null&&r.device_id&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,n,r)},t.prototype.groupIdentify=function(n,r,i,o){if(Tm(i)){var s=i._q;i._q=[],i=Em(new Tl,s)}return e.prototype.groupIdentify.call(this,n,r,i,o)},t.prototype.revenue=function(n,r){if(Tm(n)){var i=n._q;n._q=[],n=Em(new k6,i)}return e.prototype.revenue.call(this,n,r)},t.prototype.trackCampaignEventIfNeeded=function(n,r){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var i=this.webAttribution.generateCampaignEvent(n);return r?r.push(this.track(i).promise):this.track(i),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(n){return B(this,void 0,void 0,function(){var r,i,o;return U(this,function(s){return r=Date.now(),i=rA(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),n.event_type!==FT&&n.event_type!==jT&&(!n.session_id||n.session_id===this.getSessionId())&&(i||o?(this.setSessionId(r),o&&this.config.loggerProvider.log("Created a new session for new campaign.")):i||this.trackCampaignEventIfNeeded()),n.event_type===kn.IDENTIFY&&n.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(n.user_properties)),[2,e.prototype.process.call(this,n)]})})},t.prototype.logBrowserOptions=function(n){try{var r=W(W({},n),{apiKey:n.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(r))}catch(i){this.config.loggerProvider.error("Error logging browser config",i)}},t.prototype._setDiagnosticsSampleRate=function(n){if(!(n>1||n<0)&&!this.config){this._diagnosticsSampleRate=n;return}},t}(R6),eY=function(){var e=new Z9;return{init:De(e.init.bind(e),"init",nt(e),rt(e,["config"])),add:De(e.add.bind(e),"add",nt(e),rt(e,["config.apiKey","timeline.plugins"])),remove:De(e.remove.bind(e),"remove",nt(e),rt(e,["config.apiKey","timeline.plugins"])),track:De(e.track.bind(e),"track",nt(e),rt(e,["config.apiKey","timeline.queue.length"])),logEvent:De(e.logEvent.bind(e),"logEvent",nt(e),rt(e,["config.apiKey","timeline.queue.length"])),identify:De(e.identify.bind(e),"identify",nt(e),rt(e,["config.apiKey","timeline.queue.length"])),groupIdentify:De(e.groupIdentify.bind(e),"groupIdentify",nt(e),rt(e,["config.apiKey","timeline.queue.length"])),setGroup:De(e.setGroup.bind(e),"setGroup",nt(e),rt(e,["config.apiKey","timeline.queue.length"])),revenue:De(e.revenue.bind(e),"revenue",nt(e),rt(e,["config.apiKey","timeline.queue.length"])),flush:De(e.flush.bind(e),"flush",nt(e),rt(e,["config.apiKey","timeline.queue.length"])),getUserId:De(e.getUserId.bind(e),"getUserId",nt(e),rt(e,["config","config.userId"])),setUserId:De(e.setUserId.bind(e),"setUserId",nt(e),rt(e,["config","config.userId"])),getDeviceId:De(e.getDeviceId.bind(e),"getDeviceId",nt(e),rt(e,["config","config.deviceId"])),setDeviceId:De(e.setDeviceId.bind(e),"setDeviceId",nt(e),rt(e,["config","config.deviceId"])),reset:De(e.reset.bind(e),"reset",nt(e),rt(e,["config","config.userId","config.deviceId"])),getSessionId:De(e.getSessionId.bind(e),"getSessionId",nt(e),rt(e,["config"])),setSessionId:De(e.setSessionId.bind(e),"setSessionId",nt(e),rt(e,["config"])),extendSession:De(e.extendSession.bind(e),"extendSession",nt(e),rt(e,["config"])),setOptOut:De(e.setOptOut.bind(e),"setOptOut",nt(e),rt(e,["config"])),setTransport:De(e.setTransport.bind(e),"setTransport",nt(e),rt(e,["config"])),getIdentity:De(e.getIdentity.bind(e),"getIdentity",nt(e),rt(e,["config"])),getOptOut:De(e.getOptOut.bind(e),"getOptOut",nt(e),rt(e,["config"])),_setDiagnosticsSampleRate:De(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",nt(e),rt(e,["config"]))}};const Ya=eY();var tY=Ya.add,nY=Ya.identify,rO=Ya.init,rY=Ya.reset,iY=Ya.setUserId,oY=Ya.track,iO="[Amplitude]",sY="".concat(iO," Session Replay ID"),aY=0,uY=Cl.US,lY={enabled:!0},oO=1e3,cY="".concat(iO," Session Replay Debug"),dY="amp-block",sO="amp-mask",fY="amp-unmask",pY="https://api-sr.amplitude.com/sessions/v2/track",hY="https://api-sr.eu.amplitude.com/sessions/v2/track",mY="https://api-sr.stag2.amplitude.com/sessions/v2/track",gY=1*1e6,vY=3e4,yY=6e4,bY=500,wY=10*1e3,aO=1024,SY=1e3,zi;(function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision"})(zi||(zi={}));var _y=function(){function e(t){this.logger=t,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(t){var n;if(!this.logger)return function(){};var r=this.logger[t];if(typeof r=="function"){var i=(n=r.__rrweb_original__)!==null&&n!==void 0?n:r;return i.bind(this.logger)}return function(){}},e.prototype.enable=function(t){this.logger.enable(t)}
112,e.prototype.disable=function(){this.logger.disable()},e}(),Ey="medium";function _Y(e){return e.toLowerCase()}function EY(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?_Y(t):null}var uO=function(e,t,n){switch(t){case"light":{if(e!=="input")return!0;var r=n?EY(n):"";return r?!!(["password","hidden","email","tel"].includes(r)||n.autocomplete.startsWith("cc-")):!1}case"medium":case"conservative":return!0;default:return uO(e,Ey,n)}},TY=function(e,t,n){var r,i,o;if(t===void 0&&(t={defaultMaskLevel:Ey}),n){if(n.closest("."+sO))return!0;var s=((r=t.maskSelector)!==null&&r!==void 0?r:[]).some(function(u){return n.closest(u)});if(s)return!0;if(n.closest("."+fY))return!1;var a=((i=t.unmaskSelector)!==null&&i!==void 0?i:[]).some(function(u){return n.closest(u)});if(a)return!1}return uO(e,(o=t.defaultMaskLevel)!==null&&o!==void 0?o:Ey,n)},gx=function(e,t){return function(n,r){return TY(e,t,r)?n.replace(/[^\s]/g,"*"):n}},xY=function(){var e=xe();return e!=null&&e.location?e.location.href:""},CY=function(e,t){return"".concat(t,"/").concat(e)},lO=function(e,t){return t||(e===Cl.STAGING?mY:e===Cl.EU?hY:pY)},IY=function(e){if(typeof e!="string"||e.trim()==="")return!1;var t=/^\/|^https?:\/\/[^\s]+$/;return!!t.test(e)},RY=function(e){var t=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp("^".concat(t,"$"))},kY=function(e){if(!e.every(function(t){return typeof t.selector=="string"&&typeof t.replacement=="string"}))throw new Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(t){return IY(t.selector)}))throw new Error("ugcFilterRules must be an array of objects with valid globs")},th=function(e,t){var n,r;try{for(var i=oe(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=RY(s.selector);if(a.test(e))return e.replace(a,s.replacement)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},cO=function(){return B(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),e=xe(),e?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=a.sent(),n=t.usage,r=t.quota,i=t.usageDetails,o=n?Math.round(n/aO):0,s=n&&r?Math.round((n/r+Number.EPSILON)*1e3)/1e3:0,[2,{totalStorageSize:o,percentOfQuota:s,usageDetails:JSON.stringify(i)}];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},dO=function(e){var t=W({},e),n=t.apiKey;return t.apiKey="****".concat(n.substring(n.length-4)),t},fO=function(){return{flushMaxRetries:2,logLevel:pn.Warn,loggerProvider:new xl,transportProvider:new oA}},PY=function(e){Ot(t,e);function t(n,r){var i=this,o,s,a,u,l,c=fO();return i=e.call(this,W(W({transportProvider:c.transportProvider,loggerProvider:new _y(r.loggerProvider||c.loggerProvider)},r),{apiKey:n}))||this,i.flushMaxRetries=r.flushMaxRetries!==void 0&&r.flushMaxRetries<=c.flushMaxRetries?r.flushMaxRetries:c.flushMaxRetries,i.apiKey=n,i.sampleRate=r.sampleRate||aY,i.serverZone=r.serverZone||uY,i.configServerUrl=r.configServerUrl,i.trackServerUrl=r.trackServerUrl,i.shouldInlineStylesheet=r.shouldInlineStylesheet,i.version=r.version,i.performanceConfig=r.performanceConfig||lY,i.storeType=(o=r.storeType)!==null&&o!==void 0?o:"idb",i.applyBackgroundColorToBlockedElements=(s=r.applyBackgroundColorToBlockedElements)!==null&&s!==void 0?s:!1,i.enableUrlChangePolling=(a=r.enableUrlChangePolling)!==null&&a!==void 0?a:!1,i.urlChangePollingInterval=(u=r.urlChangePollingInterval)!==null&&u!==void 0?u:oO,i.captureDocumentTitle=(l=r.captureDocumentTitle)!==null&&l!==void 0?l:!1,r.privacyConfig&&(i.privacyConfig=r.privacyConfig),r.interactionConfig&&(i.interactionConfig=r.interactionConfig,i.interactionConfig.ugcFilterRules&&kY(i.interactionConfig.ugcFilterRules)),r.debugMode&&(i.debugMode=r.debugMode),r.experimental&&(i.experimental=r.experimental),r.omitElementTags&&(i.omitElementTags=r.omitElementTags),i}return t}(eA);const AY="modulepreload",OY=function(e){return"/"+e},vx={},Le=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=OY(u),u in vx)return;vx[u]=!0;const l=u.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":AY,l||(d.as="script"),d.crossOrigin="",d.href=u,a&&d.setAttribute("nonce",a),document.head.appendChild(d),l)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};var pO=(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))(pO||{}),hO=(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))(hO||{}),MY=function(e,t){var n=document.createDocumentFragment(),r=function(i){if(i===void 0&&(i=[]),typeof i=="string"&&(i=[i]),i=i.filter(function(o){try{n.querySelector(o)}catch{return t.warn('[session-replay-browser] omitting selector "'.concat(o,'" because it is invali
112d')),!1}return!0}),i.length!==0)return i};return e.blockSelector=r(e.blockSelector),e.maskSelector=r(e.maskSelector),e.unmaskSelector=r(e.unmaskSelector),e},NY=function(){function e(t,n){this.localConfig=n,this.remoteConfigClient=t}return e.prototype.generateJoinedConfig=function(){var t,n,r;return B(this,void 0,void 0,function(){var i,o,s,a,u,l,c,d,f,p,h,m,y,g,v,b,S=this;return U(this,function(x){switch(x.label){case 0:return i=W({},this.localConfig),i.optOut=this.localConfig.optOut,i.captureEnabled=!0,[4,new Promise(function(T){S.remoteConfigClient.subscribe("configs.sessionReplay","all",function(_,C){var I;if(S.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(C,":"),JSON.stringify(_,null,2)),_){var O=_,D=O.sr_sampling_config,L=O.sr_privacy_config,F=O.sr_targeting_config,M=(I=i.interactionConfig)===null||I===void 0?void 0:I.ugcFilterRules;i.interactionConfig=O.sr_interaction_config,i.interactionConfig&&M&&(i.interactionConfig.ugcFilterRules=M),i.loggingConfig=O.sr_logging_config,(D||L||F)&&(o={},D&&(o.sr_sampling_config=D),L&&(o.sr_privacy_config=L),F&&(o.sr_targeting_config=F))}T()})})];case 1:if(x.sent(),!o)return[2,{localConfig:this.localConfig,joinedConfig:i,remoteConfig:o}];if(s=o.sr_sampling_config,a=o.sr_privacy_config,u=o.sr_targeting_config,s&&Object.keys(s).length>0?(Object.prototype.hasOwnProperty.call(s,"capture_enabled")?i.captureEnabled=s.capture_enabled:i.captureEnabled=!1,Object.prototype.hasOwnProperty.call(s,"sample_rate")&&(i.sampleRate=s.sample_rate)):(i.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),a){l=(t=i.privacyConfig)!==null&&t!==void 0?t:{},c={defaultMaskLevel:(r=(n=a.defaultMaskLevel)!==null&&n!==void 0?n:l.defaultMaskLevel)!==null&&r!==void 0?r:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},d=function(T){var _,C,I,O,D,L,F,M,R,N={};typeof T.blockSelector=="string"&&(T.blockSelector=[T.blockSelector]);try{for(var A=oe((F=T.blockSelector)!==null&&F!==void 0?F:[]),P=A.next();!P.done;P=A.next()){var k=P.value;N[k]="block"}}catch(q){_={error:q}}finally{try{P&&!P.done&&(C=A.return)&&C.call(A)}finally{if(_)throw _.error}}try{for(var $=oe((M=T.maskSelector)!==null&&M!==void 0?M:[]),z=$.next();!z.done;z=$.next()){var k=z.value;N[k]="mask"}}catch(q){I={error:q}}finally{try{z&&!z.done&&(O=$.return)&&O.call($)}finally{if(I)throw I.error}}try{for(var H=oe((R=T.unmaskSelector)!==null&&R!==void 0?R:[]),V=H.next();!V.done;V=H.next()){var k=V.value;N[k]="unmask"}}catch(q){D={error:q}}finally{try{V&&!V.done&&(L=H.return)&&L.call(H)}finally{if(D)throw D.error}}return N},f=W(W({},d(l)),d(a));try{for(p=oe(Object.entries(f)),h=p.next();!h.done;h=p.next())m=X(h.value,2),y=m[0],g=m[1],g==="mask"?c.maskSelector.push(y):g==="block"?c.blockSelector.push(y):g==="unmask"&&c.unmaskSelector.push(y)}catch(T){v={error:T}}finally{try{h&&!h.done&&(b=p.return)&&b.call(p)}finally{if(v)throw v.error}}i.privacyConfig=MY(c,this.localConfig.loggerProvider)}return u&&Object.keys(u).length>0&&(i.targetingConfig=u),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:dO(i)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:i,remoteConfig:o}]}})})},e}(),DY=function(e,t){return B(void 0,void 0,void 0,function(){var n,r;return U(this,function(i){return n=new PY(e,t),r=new sA(e,n.loggerProvider,n.serverZone,t.configServerUrl),[2,new NY(r,n)]})})},Xn=Uint8Array,en=Uint16Array,Rl=Uint32Array,Sw=new Xn([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]),_w=new Xn([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]),yx=new Xn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mO=function(e,t){for(var n=new en(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new Rl(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},gO=mO(Sw,2),LY=gO[0],Ty=gO[1];LY[28]=258,Ty[258]=28;var FY=mO(_w,0),bx=FY[1],xy=new en(32768);for(var Ze=0;Ze<32768;++Ze){var Ai=(Ze&43690)>>>1|(Ze&21845)<<1;Ai=(Ai&52428)>>>2|(Ai&13107)<<2,Ai=(Ai&61680)>>>4|(Ai&3855)<<4,xy[Ze]=((Ai&65280)>>>8|(Ai&255)<<8)>>>1}var qu=function(e,t,n){for(var r=e.length,i=0,o=new en(t);i<r;++i)++o[e[i]-1];var s=new en(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(n){a=new en(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],c=t-e[i],d=s[e[i]-1]++<<c,f=d|(1<<c)-1;d<=f;++d)a[xy[d]>>>u]=l}else for(a=new en(r),i=0;i<r;++i)a[i]=xy[s[e[i]-1]++]>>>15-e[i];return a},as=new Xn(288);for(var Ze=0;Ze<144;++Ze)as[Ze]=8;for(var Ze=144;Ze<256;++Ze)as[Ze]=9;for(var Ze=256;Ze<280;++Ze)as[Ze]=7;for(var Ze=280;Ze<288;++Ze)as[Ze]=8;var rp=new Xn(32);for(var Ze=0;Ze<32;++Ze)rp[Ze]=5;var jY=qu(as,9,0),UY=qu(rp,5,0),vO=function(e){return(e/8>>0)+(e&7&&1)},yO=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof en?en:e instanceof Rl?Rl:Xn)(n-t);return r.set(e.subarray(t,n)),r},Gr=function(e,t,n){n<<=t&7;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},fu=function(e,t,n){n<<=t&7;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Mm=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new Xn(0),0];if(i==1){var s=new Xn(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(x,T){return x.f-T.f}),n.push({s:-1,f:25001});var a=n[0],u=n[1],l=0,c=1,d=2;for(n[0]={s:-1,f:a.f+u.f,l:a,r:u};c!=i-1;)a=n[n[l].f<n[d].f?l++:d++],u=n[l!=c&&n[l].f<n[d].f?l++:d++],n[c++]={s:-1,f:a.f+u.f,l:a,r:u};for(var f=o[0].s,r=1;r<i;++r)o[r].s>f&&(f=o[r].s);var p=new en(f+1),h=Cy(n[c-1],p,0);if(h>t){var r=0,m=0,y=h-t,g=1<<y;for(o.sort(function(T,_){return p[_.s]-p[T.s]||T.f-_.f});r<i;++r){var v=o[r].s;if(p[v]>t)m+=g-(1<<h-p[v]),p[v]=t;else break}for(m>>>=y;m>0;){var b=o[r].s;p[b]<t?m-=1<<t-p[b]++-1:++r}for(;r>=0&&m;--r){var S=o[r].s;p[S]==t&&(--p[S],++m)}h=t}return[new Xn(p),h]},Cy=function(e,t,n){return e.s==-1?Math.max(Cy(e.l,t,n+1),Cy(e.r,t,n+1)):t[e.s]=n},wx=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new en(++t),r=0,i=e[0],o=1,s=function(u){n[r++]=u},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},pu=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Iy=function(e,t,n){var r=n.length,i=vO(t+2);e[i]=r&255,e[i+1]=r>>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},Sx=function(e,t,n,r,i,o,s,a,u,l,c){Gr(t,c++,n),++i[256];for(var d=Mm(i,15),f=d[0],p=d[1],h=Mm(o,15),m=h[0],y=h[1],g=wx(f),v=g[0],b=g[1],S=wx(m),x=S[0],T=S[1],_=new en(19),C=0;C<v.length;++C)_[v[C]&31]++;for(var C=0;C<x.length;++C)_[x[C]&31]++;for(var I=Mm(_,7),O=I[0],D=I[1],L=19;L>4&&!O[yx[L-1]];--L);
vendor: 25,749 bytes, line 112
112var F=l+5<<3,M=pu(i,as)+pu(o,rp)+s,R=pu(i,f)+pu(o,m)+s+14+3*L+pu(_,O)+(2*_[16]+3*_[17]+7*_[18]);if(F<=M&&F<=R)return Iy(t,c,e.subarray(u,u+l));var N,A,P,k;if(Gr(t,c,1+(R<M)),c+=2,R<M){N=qu(f,p,0),A=f,P=qu(m,y,0),k=m;var $=qu(O,D,0);Gr(t,c,b-257),Gr(t,c+5,T-1),Gr(t,c+10,L-4),c+=14;for(var C=0;C<L;++C)Gr(t,c+3*C,O[yx[C]]);c+=3*L;for(var z=[v,x],H=0;H<2;++H)for(var V=z[H],C=0;C<V.length;++C){var q=V[C]&31;Gr(t,c,$[q]),c+=O[q],q>15&&(Gr(t,c,V[C]>>>5&127),c+=V[C]>>>12)}}else N=jY,A=as,P=UY,k=rp;for(var C=0;C<a;++C)if(r[C]>255){var q=r[C]>>>18&31;fu(t,c,N[q+257]),c+=A[q+257],q>7&&(Gr(t,c,r[C]>>>23&31),c+=Sw[q]);var te=r[C]&31;fu(t,c,P[te]),c+=k[te],te>3&&(fu(t,c,r[C]>>>5&8191),c+=_w[te])}else fu(t,c,N[r[C]]),c+=A[r[C]];return fu(t,c,N[256]),c+A[256]},$Y=new Rl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),BY=function(e,t,n,r,i,o){var s=e.length,a=new Xn(r+s+5*(1+Math.floor(s/7e3))+i),u=a.subarray(r,a.length-i),l=0;if(!t||s<8)for(var c=0;c<=s;c+=65535){var d=c+65535;d<s?l=Iy(u,l,e.subarray(c,d)):(u[c]=o,l=Iy(u,l,e.subarray(c,s)))}else{for(var f=$Y[t-1],p=f>>>13,h=f&8191,m=(1<<n)-1,y=new en(32768),g=new en(m+1),v=Math.ceil(n/3),b=2*v,S=function(ne){return(e[ne]^e[ne+1]<<v^e[ne+2]<<b)&m},x=new Rl(25e3),T=new en(288),_=new en(32),C=0,I=0,c=0,O=0,D=0,L=0;c<s;++c){var F=S(c),M=c&32767,R=g[F];if(y[M]=R,g[F]=M,D<=c){var N=s-c;if((C>7e3||O>24576)&&N>423){l=Sx(e,u,0,x,T,_,I,O,L,c-L,l),O=C=I=0,L=c;for(var A=0;A<286;++A)T[A]=0;for(var A=0;A<30;++A)_[A]=0}var P=2,k=0,$=h,z=M-R&32767;if(N>2&&F==S(c-z))for(var H=Math.min(p,N)-1,V=Math.min(32767,c),q=Math.min(258,N);z<=V&&--$&&M!=R;){if(e[c+P]==e[c+P-z]){for(var te=0;te<q&&e[c+te]==e[c+te-z];++te);if(te>P){if(P=te,k=z,te>H)break;for(var G=Math.min(z,te-2),J=0,A=0;A<G;++A){var Me=c-z+A+32768&32767,Oe=y[Me],ze=Me-Oe+32768&32767;ze>J&&(J=ze,R=Me)}}}M=R,R=y[M],z+=M-R+32768&32767}if(k){x[O++]=268435456|Ty[P]<<18|bx[k];var Ye=Ty[P]&31,ut=bx[k]&31;I+=Sw[Ye]+_w[ut],++T[257+Ye],++_[ut],D=c+P,++C}else x[O++]=e[c],++T[e[c]]}}l=Sx(e,u,o,x,T,_,I,O,L,c-L,l)}return yO(a,0,r+vO(l)+i)},zY=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length,s=0;s!=o;){for(var a=Math.min(s+5552,o);s<a;++s)r+=n[s],i+=r;r%=65521,i%=65521}e=r,t=i},d:function(){return(e>>>8<<16|(t&255)<<8|t>>>8)+((e&255)<<23)*2}}},HY=function(e,t,n,r,i){return BY(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,n,r,!0)},WY=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},qY=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)};function VY(e,t){t===void 0&&(t={});var n=zY();n.p(e);var r=HY(e,t,2,4);return qY(r,t),WY(r,r.length-4,n.d()),r}function GY(e,t){var n=e.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(e);for(var r=new Xn(e.length+(e.length>>>1)),i=0,o=function(l){r[i++]=l},s=0;s<n;++s){if(i+5>r.length){var a=new Xn(i+8+(n-s<<1));a.set(r),r=a}var u=e.charCodeAt(s);u<128||t?o(u):u<2048?(o(192|u>>>6),o(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++s)&1023,o(240|u>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|u&63)):(o(224|u>>>12),o(128|u>>>6&63),o(128|u&63))}return yO(r,0,i)}function KY(e,t){for(var n="",r=0;r<e.length;){var i=e[r++];n+=String.fromCharCode(i)}return n}const YY="v1",XY=e=>{const t={...e,v:YY};return KY(VY(GY(JSON.stringify(t))))};var QY=2e3,JY=function(){function e(t,n,r,i){var o=this,s;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=function(l){var c=XY(l);return JSON.stringify(c)},this.addCompressedEventToManager=function(l,c){o.eventsManager&&o.deviceId&&o.eventsManager.addEvent({event:{type:"replay",data:l},sessionId:c,deviceId:o.deviceId})},this.addCompressedEvent=function(l,c){if(o.worker)try{o.worker.postMessage({event:l,sessionId:c})}catch(f){f.name==="DataCloneError"?o.worker.postMessage(JSON.stringify({event:l,sessionId:c})):o.config.loggerProvider.warn("Unexpected error while posting message to worker:",f)}else{var d=o.compressEvent(l);o.addCompressedEventToManager(d,c)}},this.terminate=function(){var l;(l=o.worker)===null||l===void 0||l.terminate()};var a=xe();if(this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=t,this.config=n,this.deviceId=r,this.timeout=((s=n.performanceConfig)===null||s===void 0?void 0:s.timeout)||QY,i){n.loggerProvider.log("[Experimental] Enabling web worker for compression");var u=new Worker(URL.createObjectURL(new Blob([i],{type:"application/javascript"})));u.onerror=function(l){n.loggerProvider.error(l)},u.onmessage=function(l){var c=l.data,d=c.compressedEvent,f=c.sessionId;o.addCompressedEventToManager(d,f)},this.worker=u}}return e.prototype.scheduleIdleProcessing=function(){var t=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(n){t.processQueue(n)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(t,n){var r;this.canUseIdleCallback&&(!((r=this.config.performanceConfig)===null||r===void 0)&&r.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.taskQueue.push({event:t,sessionId:n}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(t,n))},e.prototype.processQueue=function(t){for(var n=this;this.taskQueue.length>0&&(t.timeRemaining()>0||t.didTimeout);){var r=this.taskQueue.shift();if(r){var i=r.event,o=r.sessionId;this.addCompressedEvent(i,o)}}this.taskQueue.length>0?requestIdleCallback(function(s){n.processQueue(s)},{timeout:this.timeout}):this.isProcessing=!1},e}(),ZY="Unexpected error occurred",eX="Network error occurred, event batch rejected",tX="Session replay event batch rejected due to exceeded retry count",Rs="Failed to store session replay events in IndexedDB",nX="Session replay event batch not sent due to missing device ID",rX="Session replay event batch not sent due to missing api key",Ry="1.29.2",iX=function(){function e(t){var n=t.trackServerUrl,r=t.loggerProvider,i=t.payloadBatcher;this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=r,this.payloadBatcher=i||function(o){return o},this.trackServerUrl=n}return e.prototype.sendEventsList=function(t){this.addToQueue(W(W({},t),{attempts:0,timeout:0}))},e.prototype.addToQueue=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.filter(function(o){return o.attempts<(o.flushMaxRetries||0)?(o.attempts+=1,!0):(t.completeRequest({context:o,err:tX}),!1)});i.forEach(function(o){if(t.queue=t.queue.concat(o),o.timeout===0){t.schedule(0);return}setTimeout(function(){o.timeout=0,t.schedule(0)},o.timeout)})},e.prototype.schedule=function(t){var n=this;this.scheduled||(this.scheduled=setTimeout(function(){n.flush(!0).then(function(){n.queue.length>0&&n.schedule(t)})},t))},e.prototype.flush=function(t){return t===void 0&&(t=!1),B(this,void 0,void 0,function(){var n,r,i=this;return U(this,function(o){switch(o.label){case 0:return n=[],r=[],this.queue.forEach(function(s){return s.timeout===0?n.push(s):r.push(s)}),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(n.map(function(s){return i.send(s,t)}))];case 1:return o.sent(),[2]}})})},e.prototype.send=function(t,n){var r,i;return n===void 0&&(n=!0),B(this,void 0,void 0,function(){var o,s,a,u,l,c,d,f,p,h,m,y,g;return U(this,function(v){switch(v.label){case 0:if(o=t.apiKey,!o)return[2,this.completeRequest({context:t,err:rX})];if(s=t.deviceId,!s)return[2,this.completeRequest({context:t,err:nX})];if(a=xY(),u=Ry,l=t.sampleRate,c=new URLSearchParams({device_id:s,session_id:"".concat(t.sessionId),type:"".concat(t.type)}),d="".concat(((r=t.version)===null||r===void 0?void 0:r.type)||"standalone","/").concat(((i=t.version)===null||i===void 0?void 0:i.version)||u),f=this.payloadBatcher({version:1,events:t.events}),f.events.length===0)return this.completeRequest({context:t}),[2];v.label=1;case 1:return v.trys.push([1,3,,4]),p={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(o),"X-Client-Version":u,"X-Client-Library":d,"X-Client-Url":a.substring(0,SY),"X-Client-Sample-Rate":"".concat(l)},body:JSON.stringify(f),method:"POST"},h="".concat(lO(t.serverZone,this.trackServerUrl),"?").concat(c.toString()),[4,fetch(h,p)];case 2:if(m=v.sent(),m===null)return this.completeRequest({context:t,err:ZY}),[2];if(n)this.handleReponse(m.status,t);else{y="";try{y=JSON.stringify(m.body,null,2)}catch{}this.completeRequest({context:t,success:"".concat(m.status,": ").concat(y)})}return[3,4];case 3:return g=v.sent(),this.completeRequest({context:t,err:g}),[3,4];case 4:return[2]}})})},e.prototype.handleReponse=function(t,n){var r=new Qp().buildStatus(t);switch(r){case ct.Success:this.handleSuccessResponse(n);break;case ct.Failed:this.handleOtherResponse(n);break;default:this.completeRequest({context:n,err:eX})}},e.prototype.handleSuccessResponse=function(t){var n=Math.round(new Blob(t.events).size/aO);this.completeRequest({context:t,success:"Session replay event batch tracked successfully for session id ".concat(t.sessionId,", size of events: ").concat(n," KB")})},e.prototype.handleOtherResponse=function(t){this.addToQueue(W(W({},t),{timeout:t.attempts*this.retryTimeout}))},e.prototype.completeRequest=function(t){var n=t.context,r=t.err,i=t.success;n.onComplete(),r?this.loggerProvider.warn(r):i&&this.loggerProvider.log(i)},e}();const ky=(e,t)=>t.some(n=>e instanceof n);let _x,Ex;function oX(){return _x||(_x=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function sX(){return Ex||(Ex=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Py=new WeakMap,Nm=new WeakMap,nh=new WeakMap;function aX(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{n(Yo(e.result)),i()},s=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return nh.set(t,e),t}function uX(e){if(Py.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{n(),i()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});Py.set(e,t)}let Ay={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Py.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Yo(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function bO(e){Ay=e(Ay)}function lX(e){return sX().includes(e)?function(...t){return e.apply(Oy(this),t),Yo(this.request)}:function(...t){return Yo(e.apply(Oy(this),t))}}function cX(e){return typeof e=="function"?lX(e):(e instanceof IDBTransaction&&uX(e),ky(e,oX())?new Proxy(e,Ay):e)}function Yo(e){if(e instanceof IDBRequest)return aX(e);if(Nm.has(e))return Nm.get(e);const t=cX(e);return t!==e&&(Nm.set(e,t),nh.set(t,e)),t}const Oy=e=>nh.get(e);function wO(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=Yo(s);return r&&s.addEventListener("upgradeneeded",u=>{r(Yo(s.result),u.oldVersion,u.newVersion,Yo(s.transaction),u)}),n&&s.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),a.then(u=>{o&&u.addEventListener("close",()=>o()),i&&u.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const dX=["get","getKey","getAll","getAllKeys","count"],fX=["put","add","delete","clear"],Dm=new Map;function Tx(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Dm.get(t))return Dm.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=fX.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||dX.includes(n)))return;const o=async function(s,...a){const u=this.transaction(s,i?"readwrite":"readonly");let l=u.store;return r&&(l=l.index(a.shift())),(await Promise.all([l[n](...a),i&&u.done]))[0]};return Dm.set(t,o),o}bO(e=>({...e,get:(t,n,r)=>Tx(t,n)||e.get(t,n,r),has:(t,n)=>!!Tx(t,n)||e.has(t,n)}));const pX=["continue","continuePrimaryKey","advance"],xx={},My=new WeakMap,SO=new WeakMap,hX={get(e,t){if(!pX.includes(t))return e[t];let n=xx[t];return n||(n=xx[t]=function(...r){My.set(this,SO.get(this)[t](...r))}),n}};async function*mX(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,hX);for(SO.set(n,t),nh.set(n,Oy(t));t;)yield n,t=await(My.get(n)||t.continue()),My.delete(n)}function Cx(e,t){return t===Symbol.asyncIterator&&ky(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ky(e,[IDBIndex,IDBObjectStore])}bO(e=>({...e,get(t,n,r){return Cx(t,n)?mX:e.get(t,n,r)},has(t,n){return Cx(t,n)||e.has(t,n)}}));var _O=function(){function e(t){var n=this,r,i,o;this.minInterval=bY,this.maxInterval=wY,this.maxPersistedEventsSize=gY,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(s,a){var u=n.getStringSize(a),l=n.getEventsArraySize(s);return l+u>=n.maxPersistedEventsSize?!0:Date.now()-n.timeAtLastSplit>n.interval&&s.length?(n.interval=Math.min(n.maxInterval,n.interval+n.minInterval),n._timeAtLastSplit=Date.now(),!0):!1},this.loggerProvider=t.loggerProvider,this.minInterval=(r=t.minInterval)!==null&&r!==void 0?r:this.minInterval,this.maxInterval=(i=t.maxInterval)!==null&&i!==void 0?i:this.maxInterval,this.maxPersistedEventsSize=(o=t.maxPersistedEventsSize)!==null&&o!==void 0?o:this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(t){return t.length},e.prototype.getEventsArraySize=function(t){var n,r,i=0;try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=s.value;i+=this.getStringSize(a)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}var u=2+Math.max(0,t.length-1)+t.length*2;return i+u},e}(),ip;(function(e){e.RECORDING="recording",e.SENT="sent"})(ip||(ip={}));var Vu="sessionCurrentSequence",Gu="sequencesToSend",gX=function(){var e=xe();return new Promise(function(t,n){if(!e)return n(new Error("Global scope not found"));if(!e.indexedDB)return n(new Error("Session Replay: cannot find indexedDB"));try{var r=e.indexedDB.open("keyval-store");r.onupgradeneeded=function(){r.result.version===1&&(r.result.close(),r.transaction&&r.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},r.onsuccess=function(){t(r.result)},r.onerror=function(){n(r.error)}}catch(i){n(i)}})},Ix=function(e){return B(void 0,void 0,void 0,function(){var t,n;return U(this,function(r){switch(r.label){case 0:return e.length>0?(t=10,n=e.splice(0,t),[4,Promise.all(n)]):[3,2];case 1:return r.sent(),[3,0];case 2:return[2]}})})},vX=function(e){var t,n;return e.objectStoreNames.contains(Vu)||(n=e.createObjectStore(Vu,{keyPath:"sessionId"})),e.objectStoreNames.contains(Gu)||(t=e.createObjectStore(Gu,{keyPath:"sequenceId",autoIncrement:!0}),t.createIndex("sessionId","sessionId")),{sequencesStore:t,currentSequenceStore:n}},yX=function(e){return B(void 0,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,wO(e,1,{upgrade:vX})];case 1:return[2,t.sent()]}})})},bX=function(e){Ot(t,e);function t(n){var r=e.call(this,n)||this;return r.getSequencesToSend=function(){return B(r,void 0,void 0,function(){var i,o,s,a,u,l;return U(this,function(c){switch(c.label){case 0:return c.trys.push([0,5,,6]),i=[],[4,this.db.transaction("sequencesToSend").store.openCursor()];case 1:o=c.sent(),c.label=2;case 2:return o?(s=o.value,a=s.sessionId,u=s.events,i.push({events:u,sequenceId:o.key,sessionId:a}),[4,o.continue()]):[3,4];case 3:return o=c.sent(),[3,2];case 4:return[2,i];case 5:return l=c.sent(),this.loggerProvider.warn("".concat(Rs,": ").concat(l)),[3,6];case 6:return[2,void 0]}})})},r.storeCurrentSequence=function(i){return B(r,void 0,void 0,function(){var o,s,a;return U(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.db.get(Vu,i)];case 1:return o=u.sent(),o?[4,this.db.put(Gu,{sessionId:i,events:o.events})]:[2,void 0];case 2:return s=u.sent(),[4,this.db.put(Vu,{sessionId:i,events:[]})];case 3:return u.sent(),[2,W(W({},o),{sessionId:i,sequenceId:s})];case 4:return a=u.sent(),this.loggerProvider.warn("".concat(Rs,": ").concat(a)),[3,5];case 5:return[2,void 0]}})})},r.addEventToCurrentSequence=function(i,o){return B(r,void 0,void 0,function(){var s,a,u,l,c,d;return U(this,function(f){switch(f.label){case 0:return f.trys.push([0,10,,11]),s=this.db.transaction(Vu,"readwrite"),[4,s.store.get(i)];case 1:return a=f.sent(),a?[3,3]:[4,s.store.put({sessionId:i,events:[o]})];case 2:return f.sent(),[2];case 3:return u=void 0,this.shouldSplitEventsList(a.events,o)?(u=a.events,[4,s.store.put({sessionId:i,events:[o]})]):[3,5];case 4:return f.sent(),[3,7];case 5:return l=a.events.concat(o),[4,s.store.put({sessionId:i,events:l})];case 6:f.sent(),f.label=7;case 7:return[4,s.done];case 8:return f.sent(),u?[4,this.storeSendingEvents(i,u)]:[2,void 0];case 9:return c=f.sent(),c?[2,{events:u,sessionId:i,sequenceId:c}]:[2,void 0];case 10:return d=f.sent(),this.loggerProvider.warn("".concat(Rs,": ").concat(d)),[3,11];case 11:return[2,void 0]}})})},r.storeSendingEvents=function(i,o){return B(r,void 0,void 0,function(){var s,a;return U(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,this.db.put(Gu,{sessionId:i,events:o})];case 1:return s=u.sent(),[2,s];case 2:return a=u.sent(),this.loggerProvider.warn("".concat(Rs,": ").concat(a)),[3,3];case 3:return[2,void 0]}})})},r.cleanUpSessionEventsStore=function(i,o){return B(r,void 0,void 0,function(){var s;return U(this,function(a){switch(a.label){case 0:if(!o)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.db.delete(Gu,o)];case 2:return a.sent(),[3,4];case 3:return s=a.sent(),this.loggerProvider.warn("".concat(Rs,": ").concat(s)),[3,4];case 4:return[2]}})})},r.transitionFromKeyValStore=function(i){return B(r,void 0,void 0,function(){var o,s,a,u,l,c,d,f,p=this;return U(this,function(h){switch(h.label){case 0:return h.trys.push([0,6,,7]),[4,gX()];case 1:if(o=h.sent(),!o)return[2];s=function(m,y){return B(p,void 0,void 0,function(){var g,v,b=this;return U(this,function(S){switch(S.label){case 0:return g=y.sessionSequences,v=[],Object.keys(g).forEach(function(x){var T=parseInt(x,10),_=g[T];if(T===y.currentSequenceId){var C=_.events.map(function(I){return B(b,void 0,void 0,function(){return U(this,function(O){return[2,this.addEventToCurrentSequence(m,I)]})})});v.push.apply(v,le([],X(C),!1))}else _.status!==ip.SENT&&v.push(b.storeSendingEvents(m,_.events))}),[4,Ix(v)];case 1:return S.sent(),[2]}})})},a="".concat(YP,"_").concat(this.apiKey.substring(0,10)),h.label=2;case 2:return h.trys.push([2,4,,5]),u=o.transaction("keyval").objectStore("keyval").getAll(a),l=new Promise(function(m){u.onsuccess=function(y){return B(p,void 0,void 0,function(){var g,v,b,S=this;return U(this,function(x){switch(x.label){case 0:return g=y&&y.target.result,v=g&&g[0],v?(b=[],Object.keys(v).forEach(function(T){var _=parseInt(T,10),C=v[_];if(i===_)b.push(s(_,C));else{var I=C.sessionSequences;Object.keys(I).forEach(function(O){var D=parseInt(O,10);I[D].status!==ip.SENT&&b.push(S.storeSendingEvents(_,I[D].events))})}}),[4,Ix(b)]):[3,2];case 1:x.sent(),x.label=2;case 2:return m(),[2]}})})}}),[4,l];case 3:return h.sent(),c=xe(),c&&c.indexedDB.deleteDatabase("keyval-store"),[3,5];case 4:return d=h.sent(),this.loggerProvider.warn("Failed to transition session replay events from keyval to new store: ".concat(d)),[3,5];case 5:return[3,7];case 6:return f=h.sent(),this.loggerProvider.warn("Failed to access keyval store: ".concat(f,". For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices")),[3,7];case 7:return[2]}})})},r.apiKey=n.apiKey,r.db=n.db,r}return t.new=function(n,r,i){return B(this,void 0,void 0,function(){var o,s,a,u,l;return U(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),o=n==="replay"?"":"_".concat(n),s="".concat(r.apiKey.substring(0,10),"_amp_session_replay_events").concat(o),[4,yX(s)];case 1:return a=c.sent(),u=new t(W(W({},r),{db:a})),[4,u.transitionFromKeyValStore(i)];case 2:return c.sent(),[2,u];case 3:return l=c.sent(),r.loggerProvider.warn("".concat(Rs,": ").concat(l)),[3,4];case 4:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(n){return B(this,void 0,void 0,function(){var s,r,i,o,s,a,u,l;return U(this,function(c){switch(c.label){case 0:return n?[4,this.db.get("sessionCurrentSequence",n)]:[3,2];case 1:return s=c.sent(),s?[2,[s]]:[2,void 0];case 2:r=[],c.label=3;case 3:return c.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:i=oe.apply(void 0,[c.sent()]),o=i.next(),c.label=5;case 5:if(o.done)return[3,7];s=o.value,r.push(s),c.label=6;case 6:return o=i.next(),[3,5];case 7:return[3,10];case 8:return a=c.sent(),u={error:a},[3,10];case 9:try{o&&!o.done&&(l=i.return)&&l.call(i)}finally{if(u)throw u.error}return[7];case 10:return[2,r]}})})},t}(_O),wX=function(e){Ot(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.finalizedSequences={},n.sequences={},n.sequenceId=0,n}return t.prototype.resetCurrentSequence=function(n){this.sequences[n]=[]},t.prototype.addSequence=function(n){var r=this.sequenceId++,i=le([],X(this.sequences[n]),!1);return this.finalizedSequences[r]={sessionId:n,events:i},this.resetCurrentSequence(n),{sequenceId:r,events:i,sessionId:n}},t.prototype.getSequencesToSend=function(){return B(this,void 0,void 0,function(){return U(this,function(n){return[2,Object.entries(this.finalizedSequences).map(function(r){var i=X(r,2),o=i[0],s=i[1],a=s.sessionId,u=s.events;return{sequenceId:Number(o),sessionId:a,events:u}})]})})},t.prototype.storeCurrentSequence=function(n){return B(this,void 0,void 0,function(){return U(this,function(r){return this.sequences[n]?[2,this.addSequence(n)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(n,r){return B(this,void 0,void 0,function(){var i;return U(this,function(o){return this.sequences[n]||this.resetCurrentSequence(n),this.shouldSplitEventsList(this.sequences[n],r)&&(i=this.addSequence(n)),this.sequences[n].push(r),[2,i]})})},t.prototype.storeSendingEvents=function(n,r){return B(this,void 0,void 0,function(){return U(this,function(i){return this.finalizedSequences[this.sequenceId]={sessionId:n,events:r},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(n,r){return B(this,void 0,void 0,function(){return U(this,function(i){return r!==void 0&&delete this.finalizedSequences[r],[2]})})},t}(_O),Rx=function(e){var t=e.config,n=e.sessionId,r=e.minInterval,i=e.maxInterval,o=e.type,s=e.payloadBatcher,a=e.storeType;return B(void 0,void 0,void 0,function(){function u(v){return v===void 0&&(v=!1),B(this,void 0,void 0,function(){return U(this,function(b){return[2,l.flush(v)]})})}var l,c,d,f,p,h,m,y,g;return U(this,function(v){switch(v.label){case 0:return l=new iX(W(W({},t),{loggerProvider:t.loggerProvider,payloadBatcher:s})),c=function(){return new wX({loggerProvider:t.loggerProvider,maxInterval:i,minInterval:r})},d=function(){return B(void 0,void 0,void 0,function(){var b;return U(this,function(S){switch(S.label){case 0:return[4,bX.new(o,{loggerProvider:t.loggerProvider,minInterval:r,maxInterval:i,apiKey:t.apiKey},n)];case 1:return b=S.sent(),t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,b??c()]}})})},a!=="idb"?[3,2]:[4,d()];case 1:return p=v.sent(),[3,3];case 2:p=c(),v.label=3;case 3:return f=p,h=function(b){var S=b.events,x=b.sessionId,T=b.deviceId,_=b.sequenceId;t.debugMode&&cO().then(function(C){var I=C.totalStorageSize,O=C.percentOfQuota,D=C.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(I," KB, percentage of quota: ").concat(O,"%, usage details: ").concat(D))}).catch(function(){}),l.sendEventsList({events:S,sessionId:x,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:T,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:o,onComplete:function(){return B(void 0,void 0,void 0,function(){return U(this,function(C){switch(C.label){case 0:return[4,f.cleanUpSessionEventsStore(x,_)];case 1:return C.sent(),[2]}})})}})},m=function(b){var S=b.sessionId,x=b.deviceId;f.storeCurrentSequence(S).then(function(T){T&&h({sequenceId:T.sequenceId,events:T.events,sessionId:T.sessionId,deviceId:x})}).catch(function(T){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",T)})},y=function(b){var S=b.deviceId;return B(void 0,void 0,void 0,function(){var x;return U(this,function(T){switch(T.label){case 0:return[4,f.getSequencesToSend()];case 1:return x=T.sent(),x&&x.forEach(function(_){h({sequenceId:_.sequenceId,events:_.events,sessionId:_.sessionId,deviceId:S})}),[2]}})})},g=function(b){var S=b.event,x=b.sessionId,T=b.deviceId;f.addEventToCurrentSequence(x,S.data).then(function(_){return _&&h({sequenceId:_.sequenceId,events:_.events,sessionId:_.sessionId,deviceId:T})}).catch(function(_){t.loggerProvider.warn("Failed to add event to session replay capture:",_)})},[2,{sendCurrentSequenceEvents:m,addEvent:g,sendStoredEvents:y,flush:u}]}})})},kx=function(){function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new Map;t.forEach(function(i){r.set(i.name,i.manager)}),this.managers=r}return e.prototype.sendStoredEvents=function(t){return B(this,void 0,void 0,function(){var n;return U(this,function(r){switch(r.label){case 0:return n=[],this.managers.forEac
112h(function(i){n.push(i.sendStoredEvents(t))}),[4,Promise.all(n)];case 1:return r.sent(),[2]}})})},e.prototype.addEvent=function(t){var n,r=t.sessionId,i=t.event,o=t.deviceId;(n=this.managers.get(i.type))===null||n===void 0||n.addEvent({sessionId:r,event:i,deviceId:o})},e.prototype.sendCurrentSequenceEvents=function(t){var n=t.sessionId,r=t.deviceId;this.managers.forEach(function(i){i.sendCurrentSequenceEvents({sessionId:n,deviceId:r})})},e.prototype.flush=function(t){return B(this,void 0,void 0,function(){var n;return U(this,function(r){switch(r.label){case 0:return n=[],this.managers.forEach(function(i){n.push(i.flush(t))}),[4,Promise.all(n)];case 1:return r.sent(),[2]}})})},e}();const Px={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ax={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},id={};function SX(e){var t,n;const r=(n=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:n.call(t,e);if(r&&globalThis[r])return globalThis[r]}function Ew(e){if(id[e])return id[e];const t=SX(e)||globalThis[e],n=t.prototype,r=e in Px?Px[e]:void 0,i=!!(r&&r.every(a=>{var u,l;return!!((l=(u=Object.getOwnPropertyDescriptor(n,a))==null?void 0:u.get)!=null&&l.toString().includes("[native code]"))})),o=e in Ax?Ax[e]:void 0,s=!!(o&&o.every(a=>{var u;return typeof n[a]=="function"&&((u=n[a])==null?void 0:u.toString().includes("[native code]"))}));if(i&&s)return id[e]=t.prototype,t.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const u=a.contentWindow;if(!u)return t.prototype;const l=u[e].prototype;return document.body.removeChild(a),l?id[e]=l:n}catch{return n}}const Lm={};function Io(e,t,n){var r;const i=`${e}.${String(n)}`;if(Lm[i])return Lm[i].call(t);const o=Ew(e),s=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return s?(Lm[i]=s,s.call(t)):t[n]}const Fm={};function EO(e,t,n){const r=`${e}.${String(n)}`;if(Fm[r])return Fm[r].bind(t);const o=Ew(e)[n];return typeof o!="function"?t[n]:(Fm[r]=o,o.bind(t))}function _X(e){return Io("Node",e,"childNodes")}function EX(e){return Io("Node",e,"parentNode")}function TX(e){return Io("Node",e,"parentElement")}function xX(e){return Io("Node",e,"textContent")}function CX(e,t){return EO("Node",e,"contains")(t)}function IX(e){return EO("Node",e,"getRootNode")()}function RX(e){return!e||!("host"in e)?null:Io("ShadowRoot",e,"host")}function kX(e){return e.styleSheets}function PX(e){return!e||!("shadowRoot"in e)?null:Io("Element",e,"shadowRoot")}function AX(e,t){return Io("Element",e,"querySelector")(t)}function OX(e,t){return Io("Element",e,"querySelectorAll")(t)}function MX(){return Ew("MutationObserver").constructor}const Ox={childNodes:_X,parentNode:EX,parentElement:TX,textContent:xX,contains:CX,getRootNode:IX,host:RX,styleSheets:kX,shadowRoot:PX,querySelector:AX,querySelectorAll:OX,mutationObserver:MX};function NX(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((t=Ox.parentElement(o.body))===null||t===void 0?void 0:t.scrollLeft)||((n=o==null?void 0:o.body)===null||n===void 0?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=Ox.parentElement(o.body))===null||r===void 0?void 0:r.scrollTop)||((i=o==null?void 0:o.body)===null||i===void 0?void 0:i.scrollTop)||0}}function jm(){var e=xe();return(e==null?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}function Um(){var e=xe();return(e==null?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}var Qn,Tw,TO;function DX(e,t){if(TO=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(e.tagName.toLowerCase()==="html")return"html";var n={root:document.body,idName:function(o){return!0},className:function(o){return!0},tagName:function(o){return!0},attr:function(o,s){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};Qn=W(W({},n),t),Tw=LX(Qn.root,n);var r=od(e,"all",function(){return od(e,"two",function(){return od(e,"one",function(){return od(e,"none")})})});if(r){var i=IO(RO(r,e));return i.length>0&&(r=i[0]),rh(r)}else throw new Error("Selector was not found.")}
vendor: 26,413 bytes, line 112
112function LX(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function od(e,t,n){for(var r=null,i=[],o=e,s=0,a=function(){var l,c,d=new Date().getTime()-TO.getTime();if(Qn.timeoutMs!==void 0&&d>Qn.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(d,"ms"));var f=ad(FX(o))||ad.apply(void 0,le([],X(jX(o)),!1))||ad.apply(void 0,le([],X(UX(o)),!1))||ad($X(o))||[Dx()],p=BX(o);if(t=="all")p&&(f=f.concat(f.filter($m).map(function(v){return sd(v,p)})));else if(t=="two")f=f.slice(0,1),p&&(f=f.concat(f.filter($m).map(function(v){return sd(v,p)})));else if(t=="one"){var h=X(f=f.slice(0,1),1),m=h[0];p&&$m(m)&&(f=[sd(m,p)])}else t=="none"&&(f=[Dx()],p&&(f=[sd(f[0],p)]));try{for(var y=(l=void 0,oe(f)),g=y.next();!g.done;g=y.next()){var m=g.value;m.level=s}}catch(v){l={error:v}}finally{try{g&&!g.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}if(i.push(f),i.length>=Qn.seedMinLength&&(r=Mx(i,n),r))return"break";o=o.parentElement,s++};o;){var u=a();if(u==="break")break}return r||(r=Mx(i,n)),!r&&n?n():r}function Mx(e,t){var n,r,i=IO(CO(e));if(i.length>Qn.threshold)return t?t():null;try{for(var o=oe(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(xO(a))return a}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null}function rh(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;t.level===i-1?n="".concat(e[r].name," > ").concat(n):n="".concat(e[r].name," ").concat(n),t=e[r]}return n}function Nx(e){return e.map(function(t){return t.penalty}).reduce(function(t,n){return t+n},0)}function xO(e){var t=rh(e);switch(Tw.querySelectorAll(t).length){case 0:throw new Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function FX(e){var t=e.getAttribute("id");return t&&Qn.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null}function jX(e){var t=Array.from(e.attributes).filter(function(n){return Qn.attr(n.name,n.value)});return t.map(function(n){return{name:"[".concat(CSS.escape(n.name),'="').concat(CSS.escape(n.value),'"]'),penalty:.5}})}function UX(e){var t=Array.from(e.classList).filter(Qn.className);return t.map(function(n){return{name:"."+CSS.escape(n),penalty:1}})}function $X(e){var t=e.tagName.toLowerCase();return Qn.tagName(t)?{name:t,penalty:2}:null}function Dx(){return{name:"*",penalty:3}}function BX(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}function sd(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function $m(e){return e.name!=="html"&&!e.name.startsWith("#")}function ad(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(zX);return n.length>0?n:null}function zX(e){return e!=null}function CO(e,t){var n,r,i,o,s,a;return t===void 0&&(t=[]),U(this,function(u){switch(u.label){case 0:if(!(e.length>0))return[3,9];u.label=1;case 1:u.trys.push([1,6,7,8]),n=oe(e[0]),r=n.next(),u.label=2;case 2:return r.done?[3,5]:(i=r.value,[5,oe(CO(e.slice(1,e.length),t.concat(i)))]);case 3:u.sent(),u.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return o=u.sent(),s={error:o},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[3,11];case 9:return[4,t];case 10:u.sent(),u.label=11;case 11:return[2]}})}function IO(e){return le([],X(e),!1).sort(function(t,n){return Nx(t)-Nx(n)})}function RO(e,t,n){var r,i,o;return n===void 0&&(n={counter:0,visited:new Map}),U(this,function(s){switch(s.label){case 0:if(!(e.length>2&&e.length>Qn.optimizedMinLength))return[3,5];r=1,s.label=1;case 1:return r<e.length-1?n.counter>Qn.maxNumberOfTries?[2]:(n.counter+=1,i=le([],X(e),!1),i.splice(r,1),o=rh(i),n.visited.has(o)?[2]:xO(i)&&HX(i,t)?[4,i]:[3,4]):[3,5];case 2:return s.sent(),n.visited.set(o,!0),[5,oe(RO(i,t,n))];case 3:s.sent(),s.label=4;case 4:return r++,[3,1];case 5:return[2]}})}function HX(e,t){return Tw.querySelector(rh(e))===t}var WX=36e5,qX=function(e){var t=e.version,n=e.events,r=[];return n.forEach(function(i){var o=JSON.parse(i);o.count=1,o.type==="click"&&r.push(o)}),{version:t,events:r}},VX=function(e){var t=e.version,n=e.events,r=[];n.forEach(function(o){var s=JSON.parse(o);s.type==="click"&&r.push(s)});var i=r.reduce(function(o,s){var a=s.x,u=s.y,l=s.selector,c=s.timestamp,d=c-c%WX,f="".concat(a,":").concat(u,":").concat(l??"",":").concat(d);return o[f]?o[f].count+=1:o[f]=W(W({},s),{timestamp:d,count:1}),o},{});return{version:t,events:Object.values(i)}},GX=function(e,t){var n=t.eventsManager,r=t.sessionId,i=t.deviceIdFn,o=t.mirror,s=t.ugcFilterRules;return function(a){if(a.type===hO.Click){var u=xe();if(u){var l=u.location,c=u.innerHeight,d=u.innerWidth;if(l){var f=a.x,p=a.y;if(!(f===void 0||p===void 0)){var h=o.getNode(a.id),m;if(h)try{m=DX(h)}catch{e.debug("error resolving selector from finder")}var y=NX(u),g=y.left,v=y.top,b=th(l.href,s),S={x:f+g,y:p+v,selector:m,viewportHeight:c,viewportWidth:d,pageUrl:b,timestamp:Date.now(),type:"click"},x=i();x&&n.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(S)},deviceId:x})}}}}}},KX=function(){function e(t,n){var r=xe();r&&r.navigator&&typeof r.navigator.sendBeacon=="function"?this.sendBeacon=function(i,o){try{if(r.navigator.sendBeacon(i,JSON.stringify(o)))return!0}catch{}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(i,o){var s=new XMLHttpRequest;return s.open("POST",i,!0),s.setRequestHeader("Accept","*/*"),s.send(JSON.stringify(o)),!0},this.basePageUrl=lO(n.serverZone,n.trackServerUrl),this.apiKey=n.apiKey,this.context=t}return e.prototype.send=function(t,n){var r=this.context,i=r.sessionId,o=r.type,s=new URLSearchParams({device_id:t,session_id:String(i),type:String(o),api_key:this.apiKey}),a="".concat(this.basePageUrl,"?").concat(s.toString());this.sendBeacon(a,n)||this.sendXhr(a,n)},e}(),YX=function(){function e(t,n){var r=this;this.timestamp=Date.now(),this.hook=function(i){r.update(i)},this.send=function(i){return function(o){var s,a,u=i(),l=xe();l&&u&&r.transport.send(u,{version:1,events:[{maxScrollX:r._maxScrollX,maxScrollY:r._maxScrollY,maxScrollWidth:r._maxScrollWidth,maxScrollHeight:r._maxScrollHeight,viewportHeight:jm(),viewportWidth:Um(),pageUrl:th(l.location.href,(a=(s=r.config.interactionConfig)===null||s===void 0?void 0:s.ugcFilterRules)!==null&&a!==void 0?a:[]),timestamp:r.timestamp,type:"scroll"}]})}},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=Um(),this._maxScrollHeight=jm(),this.config=n,this.transport=t}return e.default=function(t,n){return new e(new KX(t,n),n)},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),e.prototype.update=function(t){var n=Date.now();if(t.x>this._maxScrollX){var r=Um();this._maxScrollX=t.x;var i=t.x+r;i>this._maxScrollWidth&&(this._maxScrollWidth=i),this.timestamp=n}if(t.y>this._maxScrollY){var o=jm();this._maxScrollY=t.y;var s=t.y+o;s>this._maxScrollHeight&&(this._maxScrollHeight=s),this.timestamp=n}},e}(),Lx=function(){function e(t){var n=t.sessionId,r=t.deviceId;this.deviceId=r,this.sessionId=n,n&&r&&(this.sessionReplayId=CY(n,r))}return e}(),XX=1e3*60*60*24*2,QX=function(){function e(){var t=this;this.dbs={},this.createStore=function(n){return B(t,void 0,void 0,function(){return U(this,function(r){switch(r.label){case 0:return[4,wO(n,1,{upgrade:function(i){i.objectStoreNames.contains("sessionTargetingMatch")||i.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,r.sent()]}})})},this.openOrCreateDB=function(n){return B(t,void 0,void 0,function(){var r,i;return U(this,function(o){switch(o.label){case 0:return this.dbs&&this.dbs[n]?[2,this.dbs[n]]:(r="".concat(n.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(r)]);case 1:return i=o.sent(),this.dbs[n]=i,[2,i]}})})},this.getTargetingMatchForSession=function(n){var r=n.loggerProvider,i=n.apiKey,o=n.sessionId;return B(t,void 0,void 0,function(){var s,a,u,l;return U(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),[4,this.openOrCreateDB(i)];case 1:return s=c.sent(),a=String(o),[4,s.get("sessionTargetingMatch",a)];case 2:return u=c.sent(),[2,u==null?void 0:u.targetingMatch];case 3:return l=c.sent(),r.warn("Failed to get targeting match for session id ".concat(o,": ").concat(l)),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(n){var r=n.loggerProvider,i=n.apiKey,o=n.sessionId,s=n.targetingMatch;return B(t,void 0,void 0,function(){var a,u,l,c;return U(this,function(d){switch(d.label){case 0:return d.trys.push([0,3,,4]),[4,this.openOrCreateDB(i)];case 1:return a=d.sent(),u=String(o),[4,a.put("sessionTargetingMatch",{targetingMatch:s,sessionId:u,lastUpdated:Date.now()})];case 2:return l=d.sent(),[2,l];case 3:return c=d.sent(),r.warn("Failed to store targeting match for session id ".concat(o,": ").concat(c)),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(n){var r=n.loggerProvider,i=n.apiKey,o=n.currentSessionId;return B(t,void 0,void 0,function(){var s,a,u,l,c,d,f,p;return U(this,function(h){switch(h.label){case 0:return h.trys.push([0,8,,9]),[4,this.openOrCreateDB(i)];case 1:return s=h.sent(),a=String(o),u=s.transaction("sessionTargetingMatch","readwrite"),[4,u.store.getAll()];case 2:l=h.sent(),c=0,h.label=3;case 3:return c<l.length?(d=l[c],f=Date.now()-d.lastUpdated,d.sessionId!==a&&f>XX?[4,u.store.delete(d.sessionId)]:[3,5]):[3,6];case 4:h.sent(),h.label=5;case 5:return c++,[3,3];case 6:return[4,u.done];case 7:return h.sent(),[3,9];case 8:return p=h.sent(),r.warn("Failed to clear old targeting matches for sessions: ".concat(p)),[3,9];case 9:return[2]}})})}}return e}(),Bm=new QX,JX=function(e){var t=e.sessionId,n=e.targetingConfig,r=e.loggerProvider,i=e.apiKey,o=e.targetingParams;return B(void 0,void 0,void 0,function(){var s,a,u,l,c,d;return U(this,function(f){switch(f.label){case 0:return[4,Bm.clearStoreOfOldSessions({loggerProvider:r,apiKey:i,currentSessionId:t})];case 1:return f.sent(),[4,Bm.getTargetingMatchForSession({loggerProvider:r,apiKey:i,sessionId:t})];case 2:if(s=f.sent(),s===!0)return[2,!0];a=!0,f.label=3;case 3:return f.trys.push([3,6,,7]),[4,Le(()=>import("./index-CR3Adfqo.js"),[])];case 4:return u=f.sent().evaluateTargeting,[4,u(W(W({},o),{flag:n,sessionId:t,apiKey:i,loggerProvider:r}))];case 5:return l=f.sent(),l&&l.sr_targeting_config&&(a=l.sr_targeting_config.key==="on"),Bm.storeTargetingMatchForSession({loggerProvider:r,apiKey:i,sessionId:t,targetingMatch:a}),[3,7];case 6:return c=f.sent(),d=c,r.warn(d.message),[3,7];case 7:return[2,a]}})})};function kO(e){return e===void 0&&(e={}),{name:"amplitude/url-tracking@1",observer:function(t,n,r){var i,o,s,a=W(W({},e),r),u=a.ugcFilterRules||[],l=(i=a.enablePolling)!==null&&i!==void 0?i:!1,c=(o=a.pollingInterval)!==null&&o!==void 0?o:oO,d=(s=a.captureDocumentTitle)!==null&&s!==void 0?s:!1;if(!n)return function(){};var f=void 0,p=function(){return n.location&&n.location.href||""},h=function(){var T=n.innerHeight,_=n.innerWidth,C=n.document,I=p(),O="";d&&(O=(C==null?void 0:C.title)||"");var D=u.length>0?th(I,u):I;return{href:D,title:O,viewportHeight:T,viewportWidth:_,type:"url-change-event"}},m=function(){var T=p();if(f===void 0||T!==f){f=T;var _=h();t(_)}},y=function(T){return function(){for(var _=[],C=0;C<arguments.length;C++)_[C]=arguments[C];var I=T.apply(this,_);return m(),I}},g=function(){m()};if(l){var v=n.setInterval(function(){m()},c);return m(),function(){v&&n.clearInterval(v)}}if(n.history){var b=n.history.pushState.bind(n.history),S=n.history.replaceState.bind(n.history),x=function(){n.history.pushState=y(b),n.history.replaceState=y(S)};return x(),n.addEventListener("popstate",m),n.addEventListener("hashchange",g),m(),function(){n.history.pushState=b,n.history.replaceState=S,n.removeEventListener("popstate",m),n.removeEventListener("hashchange",g)}}return n.addEventListener("hashchange",g),m(),function(){n.removeEventListener("hashchange",g)}},options:e}}kO();var ZX=function(){function e(){var t=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.recordFunction=null,this.teardownEventListeners=function(n){var r=xe();r&&(r.removeEventListener("blur",t.blurListener),r.removeEventListener("focus",t.focusListener),!n&&r.addEventListener("blur",t.blurListener),!n&&r.addEventListener("focus",t.focusListener),r.self&&"onpagehide"in r.self?(r.removeEventListener("pagehide",t.pageLeaveListener),!n&&r.addEventListener("pagehide",t.pageLeaveListener)):(r.removeEventListener("beforeunload",t.pageLeaveListener),!n&&r.addEventListener("beforeunload",t.pageLeaveListener)))},this.blurListener=function(){t.sendEvents()},this.focusListener=function(){t.recordEvents(!1)},this.pageLeaveListener=function(n){t.pageLeaveFns.forEach(function(r){r(n)})},this.evaluateTargetingAndCapture=function(n,r,i){return r===void 0&&(r=!1),i===void 0&&(i=!1),B(t,void 0,void 0,function(){var o,s;return U(this,function(a){switch(a.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log("Session ID has not been set yet, cannot evaluate targeting for Session Replay."):this.loggerProvider.warn("Session replay init has not been called, cannot evaluate targeting."),[2];if(!this.config.targetingConfig)if(r)this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.");else return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];return this.lastTargetingParams=n,this.config.targetingConfig&&!this.sessionTargetingMatch?(o=n.event,o&&Object.values(kn).includes(o.event_type)&&(o=void 0),s=this,[4,JX({sessionId:this.identifiers.sessionId,targetingConfig:this.config.targetingConfig,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:n.userProperties,event:o}})]):[3,2];case 1:s.sessionTargetingMatch=a.sent(),this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:o,targetingParams:n},null,2)),a.label=2;case 2:return r?(this.initialize(!0),[3,5]):[3,3];case 3:return i||!this.recordCancelCallback?(this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()]):[3,5];case 4:a.sent(),a.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(n,r,i){return r===void 0&&(r={}),i===void 0&&(i=!0),B(t,void 0,void 0,function(){var o,s,a,u;return U(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),o=void 0,s=this.config,s&&n!==zi.METADATA?(o={config:dO(s),version:Ry},i?[4,cO()]:[3,2]):[3,2];case 1:a=l.sent(),o=W(W({},a),o),l.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(n,W(W({},r),o)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(n," due to no ongoing recording.")),[3,4];case 3:return u=l.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",u),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var n;try{t.loggerProvider.log("Session Replay capture stopping."),t.recordCancelCallback&&t.recordCancelCallback(),t.recordCancelCallback=null,(n=t.networkObservers)===null||n===void 0||n.stop()}catch(i){var r=i;t.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(r.toString()))}},this.loggerProvider=new _y(new xl)}return e.prototype.init=function(t,n){return Ht(this._init(t,n))},e.prototype._init=function(t,n){var r,i,o,s,a,u,l;return B(this,void 0,void 0,function(){var c,d,f,p,h,m,y,g,v,b,_,S,x,T,_,C,I,O;return U(this,function(D){switch(D.label){case 0:return this.loggerProvider=new _y(n.loggerProvider||new xl),Object.prototype.hasOwnProperty.call(n,"logLevel")&&this.loggerProvider.enable(n.logLevel),this.identifiers=new Lx({sessionId:n.sessionId,deviceId:n.deviceId}),c=this,[4,DY(t,n)];case 1:return c.joinedConfigGenerator=D.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:d=D.sent(),f=d.joinedConfig,p=d.localConfig,h=d.remoteConfig,this.config=f,this.setMetadata(n.sessionId,f,p,h,(r=n.version)===null||r===void 0?void 0:r.version,Ry,(i=n.version)===null||i===void 0?void 0:i.type),n.sessionId&&(!((o=this.config.interactionConfig)===null||o===void 0)&&o.enabled)&&(m=YX.default({sessionId:n.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[m.send(this.getDeviceId.bind(this)).bind(m)],this.scrollHook=m.hook.bind(m)),y=[],g=this.config.storeType,g==="idb"&&!(!((s=xe())===null||s===void 0)&&s.indexedDB)&&(g="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(g," for event storage.")),D.label=3;case 3:return D.trys.push([3,5,,6]),[4,Rx({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:g})];case 4:return v=D.sent(),y.push({name:"replay",manager:v}),[3,6];case 5:return b=D.sent(),_=b,this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(_.toString())),[3,6];case 6:if(!(!((a=this.config.interactionConfig)===null||a===void 0)&&a.enabled))return[3,10];S=this.config.interactionConfig.batch?VX:qX,D.label=7;case 7:return D.trys.push([7,9,,10]),[4,Rx({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:(u=this.config.interactionConfig.trackEveryNms)!==null&&u!==void 0?u:vY,maxInterval:yY,payloadBatcher:S,storeType:g})];case 8:return x=D.sent(),y.push({name:"interaction",manager:x}),[3,10];case 9:return T=D.sent(),_=T,this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(_.toString())),[3,10];case 10:return this.eventsManager=new(kx.bind.apply(kx,le([void 0],X(y),!1))),this.eventCompressor&&this.eventCompressor.terminate(),C=void 0,I=xe(),!((l=this.config.experimental)===null||l===void 0)&&l.useWebWorker&&I&&I.Worker?[4,Le(()=>import("./index-DcYG-KVC.js"),[])]:[3,12];case 11:O=D.sent().compressionScript,C=O,D.label=12;case 12:return this.eventCompressor=new JY(this.eventsManager,this.config,this.getDeviceId(),C),[4,this.initializeNetworkObservers()];case 13:return D.sent(),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:n.userProperties},!0)];case 14:return D.sent(),[2]}})})},e.prototype.setSessionId=function(t,n){return Ht(this.asyncSetSessionId(t,n))},e.prototype.asyncSetSessionId=function(t,n,r){var i;return B(this,void 0,void 0,function(){var o,s,a;return U(this,function(u){switch(u.label){case 0:return this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,o=this.identifiers&&this.identifiers.sessionId,o&&this.sendEvents(o),s=n||this.getDeviceId(),this.identifiers=new Lx({sessionId:t,deviceId:s}),this.joinedConfigGenerator&&o?[4,this.joinedConfigGenerator.generateJoinedConfig()]:[3,2];case 1:a=u.sent().joinedConfig,this.config=a,u.label=2;case 2:return!((i=this.config)===null||i===void 0)&&i.targetingConfig?[4,this.evaluateTargetingAndCapture({userProperties:r==null?void 0:r.userProperties},!1,!0)]:[3,4];case 3:return u.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:u.sent(),u.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var t,n=this.config,r=this.identifiers;if(!n||!r)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var i=this.getShouldRecord(),o={};return i&&(o=(t={},t[sY]=r.sessionReplayId?r.sessionReplayId:null,t),n.debugMode&&(o[cY]=JSON.stringify({appHash:ep(n.apiKey).toString()}))),this.addCustomRRWebEvent(zi.GET_SR_PROPS,{shouldRecord:i,eventProperties:o},this.eventCount===10),this.eventCount===10&&(this.eventCount=0),this.eventCount++,o},e.prototype.sendEvents=function(t){var n,r=t||((n=this.identifiers)===null||n===void 0?void 0:n.sessionId),i=this.getDeviceId();this.eventsManager&&r&&i&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:i})},e.prototype.initialize=function(t){var n;return t===void 0&&(t=!1),B(this,void 0,void 0,function(){var r;return U(this,function(i){return!((n=this.identifiers)===null||n===void 0)&&n.sessionId?(r=this.getDeviceId(),r?(this.eventsManager&&t&&this.eventsManager.sendStoredEvents({deviceId:r}),[2,this.recordEvents()]):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),[2,Promise.resolve()])):(this.loggerProvider.log("Session is not being recorded due to lack of session id."),[2,Promise.resolve()])})})},e.prototype.shouldOptOut=function(){var t,n,r;if(!((t=this.config)===null||t===void 0)&&t.instanceName){var i=ka(this.config.instanceName).identityStore;r=i.getIdentity().optOut}return r!==void 0?r:(n=this.config)===null||n===void 0?void 0:n.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var t=!1,n="",r=!1;if(this.config.targetingConfig)this.sessionTargetingMatch?(n="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(n),t=!0,r=!0):(n="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(n),t=!1,r=!1);else{var i=Y6(this.identifiers.sessionId,this.config.sampleRate);i?(t=!0,r=!0):(n="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(n),t=!1,r=!1)}return this.lastShouldRecordDecision!==t&&this.config.targetingConfig&&(this.addCustomRRWebEvent(zi.TARGETING_DECISION,{message:n,sessionId:this.identifiers.sessionId,matched:r,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=t),t},e.prototype.getBlockSelectors=function(){var t,n,r,i=(r=(n=(t=this.config)===null||t===void 0?void 0:t.privacyConfig)===null||n===void 0?void 0:n.blockSelector)!==null&&r!==void 0?r:[];if(i.length!==0)return i},e.prototype.getMaskTextSelectors=function(){var t,n,r,i;if(((n=(t=this.config)===null||t===void 0?void 0:t.privacyConfig)===null||n===void 0?void 0:n.defaultMaskLevel)==="conservative")return"*";var o=(i=(r=this.config)===null||r===void 0?void 0:r.privacyConfig)===null||i===void 0?void 0:i.maskSelector;if(o)return o},e.prototype.getRecordingPlugins=function(t){var n,r,i,o,s,a;return B(this,void 0,void 0,function(){var u,l,c,d;return U(this,function(f){switch(f.label){case 0:u=[];try{l=kO({ugcFilterRules:((r=(n=this.config)===null||n===void 0?void 0:n.interactionConfig)===null||r===void 0?void 0:r.ugcFilterRules)||[],enablePolling:((i=this.config)===null||i===void 0?void 0:i.enableUrlChangePolling)||!1,pollingInterval:(o=this.config)===null||o===void 0?void 0:o.urlChangePollingInterval,captureDocumentTitle:(s=this.config)===null||s===void 0?void 0:s.captureDocumentTitle}),u.push(l)}catch(p){this.loggerProvider.warn("Failed to create URL tracking plugin:",p)}if(!(!((a=t==null?void 0:t.console)===null||a===void 0)&&a.enabled))return[3,4];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Le(()=>import("./rrweb-plugin-console-record-DKSlcfSE.js"),[])];case 2:return c=f.sent().getRecordConsolePlugin,u.push(c({level:t.console.levels})),[3,4];case 3:return d=f.sent(),this.loggerProvider.warn("Failed to load console plugin:",d),[3,4];case 4:return[2,u.length>0?u:void 0]}})})},e.prototype.getRecordFunction=function(){return B(this,void 0,void 0,function(){var t,n;return U(this,function(r){switch(r.label){case 0:if(this.recordFunction)return[2,this.recordFunction];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,Le(()=>import("./rrweb-record-BQlJBjcD.js"),[])];case 2:return t=r.sent().record,this.recordFunction=t,[2,t];case 3:return n=r.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",n),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(t){var n,r,i,o,s;return t===void 0&&(t=!0),B(this,void 0,void 0,function(){var a,u,l,c,d,f,p,h,m,y,g,v,b,S=this;return U(this,function(x){switch(x.label){case 0:return a=this.config,u=this.getShouldRecord(),l=(n=this.identifiers)===null||n===void 0?void 0:n.sessionId,!u||!l||!a?[2]:(this.stopRecordingEvents(),[4,this.getRecordFunction()]);case 1:return c=x.sent(),c?[4,this.initializeNetworkObservers()]:[2];case 2:x.sent(),(r=this.networkObservers)===null||r===void 0||r.start(function(T){S.addCustomRRWebEvent(zi.FETCH_REQUEST,T)}),d=a.privacyConfig,f=a.interactionConfig,p=a.loggingConfig,h=f!=null&&f.enabled?{mouseInteraction:this.eventsManager&&GX(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:l,deviceIdFn:this.getDeviceId.bind(this),mirror:c.mirror,ugcFilterRules:(i=f.ugcFilterRules)!==null&&i!==void 0?i:[]}),scroll:this.scrollHook}:{},m=f!=null&&f.enabled&&f.ugcFilterRules?f.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(l,".")),x.label=3;case 3:return x.trys.push([3,5,,6]),y=this,g=c,b={emit:function(T){if(S.shouldOptOut()){S.loggerProvider.log("Opting session ".concat(l," out of recording due to optOut config.")),S.stopRecordingEvents(),S.sendEvents();return}T.type===pO.Meta&&(T.data.href=th(T.data.href,m)),S.eventCompressor&&S.eventCompressor.enqueueEvent(T,l)}
112,inlineStylesheet:a.shouldInlineStylesheet,hooks:h,maskAllInputs:!0,maskTextClass:sO,blockClass:dY,blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:a.applyBackgroundColorToBlockedElements,maskInputFn:gx("input",d),maskTextFn:gx("text",d),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,slimDOMOptions:{script:(o=a.omitElementTags)===null||o===void 0?void 0:o.script,comment:(s=a.omitElementTags)===null||s===void 0?void 0:s.comment},errorHandler:function(T){var _=T;if(_.message.includes("insertRule")&&_.message.includes("CSSStyleSheet")||_._external_)throw _;return S.loggerProvider.warn("Error while capturing replay: ",_.toString()),!0}},[4,this.getRecordingPlugins(p)];case 4:return y.recordCancelCallback=g.apply(void 0,[(b.plugins=x.sent(),b)]),this.addCustomRRWebEvent(zi.DEBUG_INFO),t&&this.addCustomRRWebEvent(zi.METADATA,this.metadata),[3,6];case 5:return v=x.sent(),this.loggerProvider.warn("Failed to initialize session replay:",v),[3,6];case 6:return[2]}})})},e.prototype.getDeviceId=function(){var t;return(t=this.identifiers)===null||t===void 0?void 0:t.deviceId},e.prototype.getSessionId=function(){var t;return(t=this.identifiers)===null||t===void 0?void 0:t.sessionId},e.prototype.flush=function(t){var n;return t===void 0&&(t=!1),B(this,void 0,void 0,function(){return U(this,function(r){return[2,(n=this.eventsManager)===null||n===void 0?void 0:n.flush(t)]})})},e.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(t){return t==="plugin"?"@amplitude/plugin-session-replay-browser":t==="segment"?"@amplitude/segment-session-replay-plugin":null},e.prototype.setMetadata=function(t,n,r,i,o,s,a){var u=t!=null&&t.toString()?ep(t.toString()):void 0;this.metadata={joinedConfig:n,localConfig:r,remoteConfig:i,sessionId:t,hashValue:u,sampleRate:n.sampleRate,replaySDKType:this.mapSDKType(a),replaySDKVersion:o,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:s}},e.prototype.initializeNetworkObservers=function(){var t,n,r;return B(this,void 0,void 0,function(){var i,o;return U(this,function(s){switch(s.label){case 0:if(!(!((r=(n=(t=this.config)===null||t===void 0?void 0:t.loggingConfig)===null||n===void 0?void 0:n.network)===null||r===void 0)&&r.enabled&&!this.networkObservers))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Le(()=>import("./observers-CcXIabwO.js"),[])];case 2:return i=s.sent().NetworkObservers,this.networkObservers=new i,[3,4];case 3:return o=s.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",o),[3,4];case 4:return[2]}})})},e}(),Po=function(e){return function(){var t=e.config,n=t||fO(),r=n.loggerProvider,i=n.logLevel;return{logger:r,logLevel:i}}},eQ=function(){var e=new ZX;return{init:De(e.init.bind(e),"init",Po(e)),evaluateTargetingAndCapture:De(e.evaluateTargetingAndCapture.bind(e),"evaluateTargetingAndRecord",Po(e)),setSessionId:De(e.setSessionId.bind(e),"setSessionId",Po(e)),getSessionId:De(e.getSessionId.bind(e),"getSessionId",Po(e)),getSessionReplayProperties:De(e.getSessionReplayProperties.bind(e),"getSessionReplayProperties",Po(e)),flush:De(e.flush.bind(e),"flush",Po(e)),shutdown:De(e.shutdown.bind(e),"shutdown",Po(e))}};const bs=eQ();var tQ=bs.init,nQ=bs.setSessionId,rQ=bs.getSessionId,iQ=bs.getSessionReplayProperties,oQ=bs.flush,sQ=bs.shutdown,aQ=bs.evaluateTargetingAndCapture,uQ=function(e){return e===void 0&&(e="$default_instance"),nA.getInstance(e)},Hi;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(Hi||(Hi={}));var Fx;(function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"})(Fx||(Fx={}));var jx;(function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"})(jx||(jx={}));var lQ=[Hi.SET,Hi.SET_ONCE,Hi.ADD,Hi.APPEND,Hi.PREPEND,Hi.POSTINSERT],cQ=function(e){if(e.user_properties){var t={},n=Object.keys(e.user_properties);
112return n.forEach(function(r){if(lQ.includes(r)){var i=e.user_properties&&e.user_properties[r];t=W(W({},t),i)}}),t}},Ux="1.23.0",dQ=function(){function e(t){this.name=e.pluginName,this.type="enrichment",this.sessionReplay={flush:oQ,getSessionId:rQ,getSessionReplayProperties:iQ,init:tQ,setSessionId:nQ,shutdown:sQ,evaluateTargetingAndCapture:aQ},this.options=W({forceSessionTracking:!1},t),this.srInitOptions=this.options}return e.prototype.setup=function(t,n){var r,i,o,s,a,u;return B(this,void 0,void 0,function(){var l,c,d;return U(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),t==null||t.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(Ux,".")),this.config=t,this.options.forceSessionTracking&&(typeof t.defaultTracking=="boolean"?t.defaultTracking===!1&&(t.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):t.defaultTracking=W(W({},t.defaultTracking),{sessions:!0})),l=uQ(this.config.instanceName).identityStore,c=l.getIdentity().userProperties,this.srInitOptions={instanceName:this.config.instanceName,deviceId:(r=this.options.deviceId)!==null&&r!==void 0?r:this.config.deviceId,optOut:this.config.optOut,sessionId:this.options.customSessionId?void 0:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,configServerUrl:this.options.configServerUrl||((i=this.config.remoteConfig)===null||i===void 0?void 0:i.serverUrl),trackServerUrl:this.options.trackServerUrl,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:(o=this.options.privacyConfig)===null||o===void 0?void 0:o.blockSelector,maskSelector:(s=this.options.privacyConfig)===null||s===void 0?void 0:s.maskSelector,unmaskSelector:(a=this.options.privacyConfig)===null||a===void 0?void 0:a.unmaskSelector,defaultMaskLevel:(u=this.options.privacyConfig)===null||u===void 0?void 0:u.defaultMaskLevel},debugMode:this.options.debugMode,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:Ux},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType,experimental:this.options.experimental,userProperties:c,omitElementTags:this.options.omitElementTags,applyBackgroundColorToBlockedElements:this.options.applyBackgroundColorToBlockedElements,interactionConfig:this.options.interactionConfig,captureDocumentTitle:this.options.captureDocumentTitle,enableUrlChangePolling:this.options.enableUrlChangePolling,urlChangePollingInterval:this.options.urlChangePollingInterval},[4,this.sessionReplay.init(t.apiKey,this.srInitOptions).promise];case 1:return f.sent(),[3,3];case 2:return d=f.sent(),t==null||t.loggerProvider.error("Session Replay: Failed to initialize due to ".concat(d.message)),[3,3];case 3:return[2]}})})},e.prototype.onSessionIdChanged=function(t){return B(this,void 0,void 0,function(){return U(this,function(n){switch(n.label){case 0:return this.config.loggerProvider.debug("Analytics session id is changed to ".concat(t,", SR session id is ").concat(String(this.sessionReplay.getSessionId()),".")),[4,this.sessionReplay.setSessionId(t).promise];case 1:return n.sent(),[2]}})})},e.prototype.onOptOutChanged=function(t){return B(this,void 0,void 0,function(){return U(this,function(n){switch(n.label){case 0:return this.config.loggerProvider.debug("optOut is changed to ".concat(String(t),", calling ").concat(t?"sessionReplay.shutdown()":"sessionReplay.init()",".")),t?(this.sessionReplay.shutdown(),[3,3]):[3,1];case 1:return[4,this.sessionReplay.init(this.config.apiKey,this.srInitOptions).promise];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.execute=function(t){var n;return B(this,void 0,void 0,function(){var r,o,r,i,o,s;return U(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),this.options.customSessionId?(r=this.options.customSessionId(t),r?r===this.sessionReplay.getSessionId()?[3,2]:[4,this.sessionReplay.setSessionId(r).promise]:[3,3]):[3,4];case 1:a.sent(),a.label=2;case 2:o=this.sessionReplay.getSessionReplayProperties(),t.event_properties=W(W({},t.event_properties),o),a.label=3;case 3:return[3,8];case 4:return r=this.config.sessionId,r&&r!==this.sessionReplay.getSessionId()?[4,this.sessionReplay.setSessionId(r).promise]:[3,6];case 5:a.sent(),a.label=6;case 6:return r&&r===t.session_id?(i=void 0,t.event_type===kn.IDENTIFY&&(i=cQ(t)),[4,this.sessionReplay.evaluateTargetingAndCapture({event:t,userProperties:i})]):[3,8];case 7:a.sent(),o=this.sessionReplay.getSessionReplayProperties(),t.event_properties=W(W({},t.event_properties),o),a.label=8;case 8:return[2,Promise.resolve(t)];case 9:return s=a.sent(),(n=this.config)===null||n===void 0||n.loggerProvider.error("Session Replay: Failed to enrich event due to ".concat(s.message)),[2,Promise.resolve(t)];case 10:return[2]}})})},e.prototype.teardown=function(){var t;return B(this,void 0,void 0,function(){return U(this,function(n){try{this.sessionReplay.shutdown(),this.config=null}catch(r){(t=this.config)===null||t===void 0||t.loggerProvider.error("Session Replay: teardown failed due to ".concat(r.message))}return[2]})})},e.prototype.getSessionReplayProperties=function(){return this.sessionReplay.getSessionReplayProperties()},e.pluginName="@amplitude/plugin-session-replay-browser",e}(),fQ=function(e){return new dQ(e)},PO={},AO={},OO={};
112(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];if(typeof window<"u"){var a;typeof window.gtag>"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(a=window).gtag.apply(a,o)}},n=t;e.default=n})(OO);var MO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function n(a){return a.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(u,l,c){return l>0&&l+u.length!==c.length&&u.search(t)>-1&&c.charAt(l-2)!==":"&&(c.charAt(l+u.length)!=="-"||c.charAt(l-1)==="-")&&c.charAt(l-1).search(/[^\s-]/)<0?u.toLowerCase():u.substr(1).search(/[A-Z]|\../)>-1?u:u.charAt(0).toUpperCase()+u.substr(1)})}function r(a){return typeof a=="string"&&a.indexOf("@")!==-1}var i="REDACTED (Potential Email Address)";function o(a){return r(a)?(console.warn("This arg looks like an email address, redacting."),i):a}function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=a||"";return u&&(c=n(a)),l&&(c=o(c)),c}})(MO);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var t=s(OO),n=s(MO),r=["eventCategory","eventAction","eventLabel","eventValue","hitType"],i=["title","location"],o=["page","hitType"];function s(M){return M&&M.__esModule?M:{default:M}}function a(M,R){if(M==null)return{};var N=u(M,R),A,P;if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(M);for(P=0;P<k.length;P++)A=k[P],!(R.indexOf(A)>=0)&&Object.prototype.propertyIsEnumerable.call(M,A)&&(N[A]=M[A])}return N}function u(M,R){if(M==null)return{};var N={},A=Object.keys(M),P,k;for(k=0;k<A.length;k++)P=A[k],!(R.indexOf(P)>=0)&&(N[P]=M[P]);return N}function l(M){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},l(M)}function c(M){return p(M)||f(M)||v(M)||d()}function d(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 113In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(M){if(typeof Symbol<"u"&&M[Symbol.iterator]!=null||M["@@iterator"]!=null)return Array.from(M)}function p(M){if(Array.isArray(M))return b(M)}function h(M,R){var N=Object.keys(M);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(M);R&&(A=A.filter(function(P){return Object.getOwnPropertyDescriptor(M,P).enumerable})),N.push.apply(N,A)}return N}function m(M){for(var R=1;R<arguments.length;R++){var N=arguments[R]!=null?arguments[R]:{};R%2?h(Object(N),!0).forEach(function(A){I(M,A,N[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(N)):h(Object(N)).forEach(function(A){Object.defineProperty(M,A,Object.getOwnPropertyDescriptor(N,A))})}return M}function y(M,R){return x(M)||S(M,R)||v(M,R)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 114In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(M,R){if(M){if(typeof M=="string")return b(M,R);var N=Object.prototype.toString.call(M).slice(8,-1);if(N==="Object"&&M.constructor&&(N=M.constructor.name),N==="Map"||N==="Set")return Array.from(M);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return b(M,R)}}function b(M,R){(R==null||R>M.length)&&(R=M.length);for(var N=0,A=new Array(R);N<R;N++)A[N]=M[N];return A}function S(M,R){var N=M==null?null:typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"];if(N!=null){var A,P,k,$,z=[],H=!0,V=!1;try{if(k=(N=N.call(M)).next,R!==0)for(;!(H=(A=k.call(N)).done)&&(z.push(A.value),z.length!==R);H=!0);}catch(q){V=!0,P=q}finally{try{if(!H&&N.return!=null&&($=N.return(),Object($)!==$))return}finally{if(V)throw P}}return z}}function x(M){if(Array.isArray(M))return M}function T(M,R){if(!(M instanceof R))throw new TypeError("Cannot call a class as a function")}function _(M,R){for(var N=0;N<R.length;N++){var A=R[N];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(M,O(A.key),A)}}function C(M,R,N){return R&&_(M.prototype,R),Object.defineProperty(M,"prototype",{writable:!1}),M}
114function I(M,R,N){return R=O(R),R in M?Object.defineProperty(M,R,{value:N,enumerable:!0,configurable:!0,writable:!0}):M[R]=N,M}function O(M){var R=D(M,"string");return l(R)==="symbol"?R:String(R)}function D(M,R){if(l(M)!=="object"||M===null)return M;var N=M[Symbol.toPrimitive];if(N!==void 0){var A=N.call(M,R);if(l(A)!=="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(M)}var L=function(){function M(){var R=this;T(this,M),I(this,"reset",function(){R.isInitialized=!1,R._testMode=!1,R._currentMeasurementId,R._hasLoadedGA=!1,R._isQueuing=!1,R._queueGtag=[]}),I(this,"_gtag",function(){for(var N=arguments.length,A=new Array(N),P=0;P<N;P++)A[P]=arguments[P];R._testMode||R._isQueuing?R._queueGtag.push(A):t.default.apply(void 0,A)}),I(this,"_loadGA",function(N,A){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!R._hasLoadedGA){var k=document.createElement("script");k.async=!0,k.src="".concat(P,"?id=").concat(N),A&&k.setAttribute("nonce",A),document.body.appendChild(k),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},R._hasLoadedGA=!0}}),I(this,"_toGtagOptions",function(N){if(N){var A={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},P=Object.entries(N).reduce(function(k,$){var z=y($,2),H=z[0],V=z[1];return A[H]?k[A[H]]=V:k[H]=V,k},{});return P}}),I(this,"initialize",function(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!N)throw new Error("Require GA_MEASUREMENT_ID");var P=typeof N=="string"?[{trackingId:N}]:N;R._currentMeasurementId=P[0].trackingId;var k=A.gaOptions,$=A.gtagOptions,z=A.nonce,H=A.testMode,V=H===void 0?!1:H,q=A.gtagUrl;if(R._testMode=V,V||R._loadGA(R._currentMeasurementId,z,q),R.isInitialized||(R._gtag("js",new Date),P.forEach(function(J){var Me=m(m(m({},R._toGtagOptions(m(m({},k),J.gaOptions))),$),J.gtagOptions);Object.keys(Me).length?R._gtag("config",J.trackingId,Me):R._gtag("config",J.trackingId)})),R.isInitialized=!0,!V){var te=c(R._queueGtag);for(R._queueGtag=[],R._isQueuing=!1;te.length;){var G=te.shift();R._gtag.apply(R,c(G)),G[0]==="get"&&(R._isQueuing=!0)}}}),I(this,"set",function(N){if(!N){console.warn("`fieldsObject` is required in .set()");return}if(l(N)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(N).length===0&&console.warn("empty `fieldsObject` given to .set()"),R._gaCommand("set",N)}),I(this,"_gaCommandSendEvent",function(N,A,P,k,$){R._gtag("event",A,m(m({event_category:N,event_label:P,value:k},$&&{non_interaction:$.nonInteraction}),R._toGtagOptions($)))}),I(this,"_gaCommandSendEventParameters",function(){for(var N=arguments.length,A=new Array(N),P=0;P<N;P++)A[P]=arguments[P];if(typeof A[0]=="string")R._gaCommandSendEvent.apply(R,c(A.slice(1)));else{var k=A[0],$=k.eventCategory,z=k.eventAction,H=k.eventLabel,V=k.eventValue;k.hitType;var q=a(k,r);R._gaCommandSendEvent($,z,H,V,q)}}),I(this,"_gaCommandSendTiming",function(N,A,P,k){R._gtag("event","timing_complete",{name:A,value:P,event_category:N,event_label:k})}),I(this,"_gaCommandSendPageview",function(N,A){if(A&&Object.keys(A).length){var P=R._toGtagOptions(A),k=P.title,$=P.location,z=a(P,i);R._gtag("event","page_view",m(m(m(m({},N&&{page_path:N}),k&&{page_title:k}),$&&{page_location:$}),z))}else N?R._gtag("event","page_view",{page_path:N}):R._gtag("event","page_view")}),I(this,"_gaCommandSendPageviewParameters",function(){for(var N=arguments.length,A=new Array(N),P=0;P<N;P++)A[P]=arguments[P];
114if(typeof A[0]=="string")R._gaCommandSendPageview.apply(R,c(A.slice(1)));else{var k=A[0],$=k.page;k.hitType;var z=a(k,o);R._gaCommandSendPageview($,z)}}),I(this,"_gaCommandSend",function(){for(var N=arguments.length,A=new Array(N),P=0;P<N;P++)A[P]=arguments[P];var k=typeof A[0]=="string"?A[0]:A[0].hitType;switch(k){case"event":R._gaCommandSendEventParameters.apply(R,A);break;case"pageview":R._gaCommandSendPageviewParameters.apply(R,A);break;case"timing":R._gaCommandSendTiming.apply(R,c(A.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(k));break;default:console.warn("Send command doesn't exist: ".concat(k))}}),I(this,"_gaCommandSet",function(){for(var N=arguments.length,A=new Array(N),P=0;P<N;P++)A[P]=arguments[P];typeof A[0]=="string"&&(A[0]=I({},A[0],A[1])),R._gtag("set",R._toGtagOptions(A[0]))}),I(this,"_gaCommand",function(N){for(var A=arguments.length,P=new Array(A>1?A-1:0),k=1;k<A;k++)P[k-1]=arguments[k];switch(N){case"send":R._gaCommandSend.apply(R,P);break;case"set":R._gaCommandSet.apply(R,P);break;default:console.warn("Command doesn't exist: ".concat(N))}}),I(this,"ga",function(){for(var N=arguments.length,A=new Array(N),P=0;P<N;P++)A[P]=arguments[P];if(typeof A[0]=="string")R._gaCommand.apply(R,A);else{var k=A[0];R._gtag("get",R._currentMeasurementId,"client_id",function($){R._isQueuing=!1;var z=R._queueGtag;for(k({get:function(q){return q==="clientId"?$:q==="trackingId"?R._currentMeasurementId:q==="apiVersion"?"1":void 0}});z.length;){var H=z.shift();R._gtag.apply(R,c(H))}}),R._isQueuing=!0}return R.ga}),I(this,"event",function(N,A){if(typeof N=="string")R._gtag("event",N,R._toGtagOptions(A));else{var P=N.action,k=N.category,$=N.label,z=N.value,H=N.nonInteraction,V=N.transport;if(!k||!P){console.warn("args.category AND args.action are required in event()");return}var q={hitType:"event",eventCategory:(0,n.default)(k),eventAction:(0,n.default)(P)};$&&(q.eventLabel=(0,n.default)($)),typeof z<"u"&&(typeof z!="number"?console.warn("Expected `args.value` arg to be a Number."):q.eventValue=z),typeof H<"u"&&(typeof H!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):q.nonInteraction=H),typeof V<"u"&&(typeof V!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(V)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),q.transport=V)),R._gaCommand("send",q)}}),I(this,"send",function(N){R._gaCommand("send",N)}),this.reset()}return C(M,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),M}();e.GA4=L;var F=new L;e.default=F})(AO);(function(e){function t(a){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},t(a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ReactGAImplementation=void 0;var n=i(AO);function r(a){if(typeof WeakMap!="function")return null;var u=new WeakMap,l=new WeakMap;return(r=function(d){return d?l:u})(a)}function i(a,u){if(a&&a.__esModule)return a;
114if(a===null||t(a)!=="object"&&typeof a!="function")return{default:a};var l=r(u);if(l&&l.has(a))return l.get(a);var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if(f!=="default"&&Object.prototype.hasOwnProperty.call(a,f)){var p=d?Object.getOwnPropertyDescriptor(a,f):null;p&&(p.get||p.set)?Object.defineProperty(c,f,p):c[f]=a[f]}return c.default=a,l&&l.set(a,c),c}var o=n.GA4;e.ReactGAImplementation=o;var s=n.default;e.default=s})(PO);const Aa=o0(PO),Wr={BASE_URL:"https://api.picki.ai",ENDPOINTS:{LOGIN:"/login",SIGNUP:"/signup",TRAVEL_TOOLS_DATA:"/get-travel-tools-data",LOCAL_TIPS_DATA:"/getLocalTipsData",GET_TRAVEL_DATA:"/getTravelData",GET_USER_ITINERARY:"/getUserItinerary",GET_SCHEDULE_ITINERARY_DATA:"/getScheduleItineraryData",RESERVATIONS:"/reservations",DOWNLOAD_PDF:"/generateMyTripPdfData"},KEYS:{PUBLIC_CLIENT_ID:"385033137937-sepcqlm8dks0jggin4ubqhq2ic5q1aho.apps.googleusercontent.com",PUBLIC_GOOGLE_API_KEY:"AIzaSyCO55Tbzy3U1LTd7lp39LwNHXFf2wL3zQo",PUBLIC_STRIPE_PUBLISH_KEY:"pk_live_51PTmIrRsWxPOuBycWSYcsUH3BtZdOW1fd0KzY4c2PPg2dvBrGLSo2a267XFR2cjNkYT6yOB3NmMu38AWD92vaLCT0055Wies4m",OPENEXCHANGERATES_API_KEY:"e10ab327aa1c49b6aa12b0bcb31fed44",GA4_MEASUREMENT_ID:"G-TS3T6EBJHL",AMPLITUDE_API_KEY:"a57102790212204e99b5dea0bed864d9"}},pQ=()=>({clientId:Wr.KEYS.PUBLIC_CLIENT_ID,domain:window.location.hostname});function hQ(e,t){const n=w.createContext(t),r=o=>{const{children:s,...a}=o,u=w.useMemo(()=>a,Object.values(a));return E.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function i(o){const s=w.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Ro(e,t=[]){let n=[];function r(o,s){const a=w.createContext(s),u=n.length;n=[...n,s];const l=d=>{var g;const{scope:f,children:p,...h}=d,m=((g=f==null?void 0:f[e])==null?void 0:g[u])||a,y=w.useMemo(()=>h,Object.values(h));return E.jsx(m.Provider,{value:y,children:p})};l.displayName=o+"Provider";function c(d,f){var m;const p=((m=f==null?void 0:f[e])==null?void 0:m[u])||a,h=w.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(s=>w.createContext(s));return function(a){const u=(a==null?void 0:a[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return i.scopeName=e,[r,mQ(i,...t)]}function mQ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:u,scopeName:l})=>{const d=u(o)[`__scope${l}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function $x(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ih(...e){return t=>{let n=!1;const r=e.map(i=>{const o=$x(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():$x(e[i],null)}}}}function wt(...e){return w.useCallback(ih(...e),e)}function Oa(e){const t=vQ(e),n=w.forwardRef((r,i)=>{const{children:o,...s}=r,a=w.Children.toArray(o),u=a.find(bQ);if(u){const l=u.props.children,c=a.map(d=>d===u?w.Children.count(l)>1?w.Children.only(null):w.isValidElement(l)?l.props.children:null:d);return E.jsx(t,{...s,ref:i,children:w.isValidElement(l)?w.cloneElement(l,void 0,c):null})}return E.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var gQ=Oa("Slot");function vQ(e){const t=w.forwardRef((n,r)=>{const{children:i,...o}=n;if(w.isValidElement(i)){const s=SQ(i),a=wQ(o,i.props);return i.type!==w.Fragment&&(a.ref=r?ih(r,s):s),w.cloneElement(i,a)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yQ=Symbol("radix.slottable");function bQ(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yQ}function wQ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const u=o(...a);return i(...a),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}
vendor: 21,403 bytes, line 114
114:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function SQ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function oh(e){const t=e+"CollectionProvider",[n,r]=Ro(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:y,children:g}=m,v=j.useRef(null),b=j.useRef(new Map).current;return E.jsx(i,{scope:y,itemMap:b,collectionRef:v,children:g})};s.displayName=t;const a=e+"CollectionSlot",u=Oa(a),l=j.forwardRef((m,y)=>{const{scope:g,children:v}=m,b=o(a,g),S=wt(y,b.collectionRef);return E.jsx(u,{ref:S,children:v})});l.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Oa(c),p=j.forwardRef((m,y)=>{const{scope:g,children:v,...b}=m,S=j.useRef(null),x=wt(y,S),T=o(c,g);return j.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),E.jsx(f,{[d]:"",ref:x,children:v})});p.displayName=c;function h(m){const y=o(e+"CollectionConsumer",m);return j.useCallback(()=>{const v=y.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((T,_)=>b.indexOf(T.ref.current)-b.indexOf(_.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:l,ItemSlot:p},h,r]}var _Q=w.createContext(void 0);function xw(e){const t=w.useContext(_Q);return e||t||"ltr"}function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}var gi=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},EQ=c0[" useId ".trim().toString()]||(()=>{}),TQ=0;function oi(e){const[t,n]=w.useState(EQ());return gi(()=>{n(r=>r??String(TQ++))},[e]),t?`radix-${t}`:""}var xQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ue=xQ.reduce((e,t)=>{const n=Oa(`Primitive.${t}`),r=w.forwardRef((i,o)=>{const{asChild:s,...a}=i,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Cw(e,t){e&&$l.flushSync(()=>e.dispatchEvent(t))}function Nn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function CQ(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var IQ="DismissableLayer",Ny="dismissableLayer.update",RQ="dismissableLayer.pointerDownOutside",kQ="dismissableLayer.focusOutside",Bx,NO=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sh=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...u}=e,l=w.useContext(NO),[c,d]=w.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),h=wt(t,_=>d(_)),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),v=c?m.indexOf(c):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,S=v>=g,x=AQ(_=>{const C=_.target,I=[...l.branches].some(O=>O.contains(C));!S||I||(i==null||i(_),s==null||s(_),_.defaultPrevented||a==null||a())},f),T=OQ(_=>{const C=_.target;[...l.branches].some(O=>O.contains(C))||(o==null||o(_),s==null||s(_),_.defaultPrevented||a==null||a())},f);return CQ(_=>{v===l.layers.size-1&&(r==null||r(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},f),w.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Bx=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),zx(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Bx)}},[c,f,n,l]),w.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),zx())},[c,l]),w.useEffect(()=>{const _=()=>p({});return document.addEventListener(Ny,_),()=>document.removeEventListener(Ny,_)},[]),E.jsx(Ue.div,{...u,ref:h,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,x.onPointerDownCapture)})});sh.displayName=IQ;var PQ="DismissableLayerBranch",DO=w.forwardRef((e,t)=>{const n=w.useContext(NO),r=w.useRef(null),i=wt(t,r);return w.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx(Ue.div,{...e,ref:i})});DO.displayName=PQ;function AQ(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){LO(RQ,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function OQ(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&LO(kQ,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zx(){const e=new CustomEvent(Ny);document.dispatchEvent(e)}function LO(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Cw(i,o):i.dispatchEvent(o)}var MQ=sh,NQ=DO,zm=0;function FO(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Hx()),document.body.insertAdjacentElement("beforeend",e[1]??Hx()),zm++,()=>{zm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zm--}},[])}function Hx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Hm="focusScope.autoFocusOnMount",Wm="focusScope.autoFocusOnUnmount",Wx={bubbles:!1,cancelable:!0},DQ="FocusScope",Iw=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,u]=w.useState(null),l=Nn(i),c=Nn(o),d=w.useRef(null),f=wt(t,m=>u(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(b){if(p.paused||!a)return;const S=b.target;a.contains(S)?d.current=S:Ni(d.current,{select:!0})},y=function(b){if(p.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||Ni(d.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const x of b)x.removedNodes.length>0&&Ni(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),v.disconnect()}}},[r,a,p.paused]),w.useEffect(()=>{if(a){Vx.add(p);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(Hm,Wx);a.addEventListener(Hm,l),a.dispatchEvent(g),g.defaultPrevented||(LQ(BQ(jO(a)),{select:!0}),document.activeElement===m&&Ni(a))}return()=>{a.removeEventListener(Hm,l),setTimeout(()=>{const g=new CustomEvent(Wm,Wx);a.addEventListener(Wm,c),a.dispatchEvent(g),g.defaultPrevented||Ni(m??document.body,{select:!0}),a.removeEventListener(Wm,c),Vx.remove(p)},0)}}},[a,l,c,p]);const h=w.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const v=m.currentTarget,[b,S]=FQ(v);b&&S?!m.shiftKey&&g===S?(m.preventDefault(),n&&Ni(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&Ni(S,{select:!0})):g===v&&m.preventDefault()}},[n,r,p.paused]);return E.jsx(Ue.div,{tabIndex:-1,...s,ref:f,onKeyDown:h})});Iw.displayName=DQ;function LQ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ni(r,{select:t}),document.activeElement!==n)return}function FQ(e){const t=jO(e),n=qx(t,e),r=qx(t.reverse(),e);return[n,r]}function jO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qx(e,t){for(const n of e)if(!jQ(n,{upTo:t}))return n}function jQ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function UQ(e){return e instanceof HTMLInputElement&&"select"in e}function Ni(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&UQ(e)&&t&&e.select()}}var Vx=$Q();function $Q(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Gx(e,t),e.unshift(t)},remove(t){var n;e=Gx(e,t),(n=e[0])==null||n.resume()}}}function Gx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function BQ(e){return e.filter(t=>t.tagName!=="A")}const zQ=["top","right","bottom","left"],yo=Math.min,xn=Math.max,op=Math.round,ud=Math.floor,Ur=e=>({x:e,y:e}),HQ={left:"right",right:"left",bottom:"top",top:"bottom"},WQ={start:"end",end:"start"};function Dy(e,t,n){return xn(e,yo(t,n))}function vi(e,t){return typeof e=="function"?e(t):e}function yi(e){return e.split("-")[0]}function Xa(e){return e.split("-")[1]}function Rw(e){return e==="x"?"y":"x"}function kw(e){return e==="y"?"height":"width"}const qQ=new Set(["top","bottom"]);function Lr(e){return qQ.has(yi(e))?"y":"x"}function Pw(e){return Rw(Lr(e))}function VQ(e,t,n){n===void 0&&(n=!1);const r=Xa(e),i=Pw(e),o=kw(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=sp(s)),[s,sp(s)]}function GQ(e){const t=sp(e);return[Ly(e),t,Ly(t)]}function Ly(e){return e.replace(/start|end/g,t=>WQ[t])}const Kx=["left","right"],Yx=["right","left"],KQ=["top","bottom"],YQ=["bottom","top"];function XQ(e,t,n){switch(e){case"top":case"bottom":return n?t?Yx:Kx:t?Kx:Yx;case"left":case"right":return t?KQ:YQ;default:return[]}}function QQ(e,t,n,r){const i=Xa(e);let o=XQ(yi(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(Ly)))),o}function sp(e){return e.replace(/left|right|bottom|top/g,t=>HQ[t])}function JQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function UO(e){return typeof e!="number"?JQ(e):{top:e,right:e,bottom:e,left:e}}function ap(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Xx(e,t,n){let{reference:r,floating:i}=e;const o=Lr(t),s=Pw(t),a=kw(s),u=yi(t),l=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Xa(t)){case"start":p[s]-=f*(n&&l?-1:1);break;case"end":p[s]+=f*(n&&l?-1:1);break}return p}const ZQ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Xx(l,r,u),f=r,p={},h=0;for(let m=0;m<a.length;m++){const{name:y,fn:g}=a[m],{x:v,y:b,data:S,reset:x}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});c=v??c,d=b??d,p={...p,[y]:{...p[y],...S}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=Xx(l,f,u)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function kl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=vi(t,e),h=UO(p),y=a[f?d==="floating"?"reference":"floating":d],g=ap(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:l,rootBoundary:c,strategy:u})),v=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},x=ap(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:u}):v);return{top:(g.top-x.top+h.top)/S.y,bottom:(x.bottom-g.bottom+h.bottom)/S.y,left:(g.left-x.left+h.left)/S.x,right:(x.right-g.right+h.right)/S.x}}const eJ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:u}=t,{element:l,padding:c=0}=vi(e,t)||{};if(l==null)return{};const d=UO(c),f={x:n,y:r},p=Pw(i),h=kw(p),m=await s.getDimensions(l),y=p==="y",g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",S=o.reference[h]+o.reference[p]-f[p]-o.floating[h],x=f[p]-o.reference[p],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let _=T?T[b]:0;(!_||!await(s.isElement==null?void 0:s.isElement(T)))&&(_=a.floating[b]||o.floating[h]);const C=S/2-x/2,I=_/2-m[h]/2-1,O=yo(d[g],I),D=yo(d[v],I),L=O,F=_-m[h]-D,M=_/2-m[h]/2+C,R=Dy(L,M,F),N=!u.arrow&&Xa(i)!=null&&M!==R&&o.reference[h]/2-(M<L?O:D)-m[h]/2<0,A=N?M<L?M-L:M-F:0;return{[p]:f[p]+A,data:{[p]:R,centerOffset:M-R-A,...N&&{alignmentOffset:A}},reset:N}}}),tJ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=vi(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=yi(i),v=Lr(a),b=yi(a)===a,S=await(u.isRTL==null?void 0:u.isRTL(l.floating)),x=f||(b||!m?[sp(a)]:GQ(a)),T=h!=="none";!f&&T&&x.push(...QQ(a,m,h,S));const _=[a,...x],C=await kl(t,y),I=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&I.push(C[g]),d){const M=VQ(i,s,S);I.push(C[M[0]],C[M[1]])}if(O=[...O,{placement:i,overflows:I}],!I.every(M=>M<=0)){var D,L;const M=(((D=o.flip)==null?void 0:D.index)||0)+1,R=_[M];if(R&&(!(d==="alignment"?v!==Lr(R):!1)||O.every(P=>P.overflows[0]>0&&Lr(P.placement)===v)))return{data:{index:M,overflows:O},reset:{placement:R}};let N=(L=O.filter(A=>A.overflows[0]<=0).sort((A,P)=>A.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!N)switch(p){case"bestFit":{var F;const A=(F=O.filter(P=>{if(T){const k=Lr(P.placement);return k===v||k==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(k=>k>0).reduce((k,$)=>k+$,0)]).sort((P,k)=>P[1]-k[1])[0])==null?void 0:F[0];A&&(N=A);break}case"initialPlacement":N=a;break}if(i!==N)return{reset:{placement:N}}}return{}}}};function Qx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jx(e){return zQ.some(t=>e[t]>=0)}const nJ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vi(e,t);switch(r){case"referenceHidden":{const o=await kl(t,{...i,elementContext:"reference"}),s=Qx(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Jx(s)}}}case"escaped":{const o=await kl(t,{...i,altBoundary:!0}),s=Qx(o,n.floating);return{data:{escapedOffsets:s,escaped:Jx(s)}}}default:return{}}}}},$O=new Set(["left","top"]);async function rJ(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=yi(n),a=Xa(n),u=Lr(n)==="y",l=$O.has(s)?-1:1,c=o&&u?-1:1,d=vi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(p=a==="end"?h*-1:h),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const iJ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,u=await rJ(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:s}}}}},oJ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...u}=vi(e,t),l={x:n,y:r},c=await kl(t,u),d=Lr(yi(i)),f=Rw(d);let p=l[f],h=l[d];if(o){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=p+c[y],b=p-c[g];p=Dy(v,p,b)}if(s){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=h+c[y],b=h-c[g];h=Dy(v,h,b)}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:o,[d]:s}}}}}},sJ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:l=!0}=vi(e,t),c={x:n,y:r},d=Lr(i),f=Rw(d);let p=c[f],h=c[d];const m=vi(a,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const b=f==="y"?"height":"width",S=o.reference[f]-o.floating[b]+y.mainAxis,x=o.reference[f]+o.reference[b]-y.mainAxis;p<S?p=S:p>x&&(p=x)}if(l){var g,v;const b=f==="y"?"width":"height",S=$O.has(yi(i)),x=o.reference[d]-o.floating[b]+(S&&((g=s.offset)==null?void 0:g[d])||0)+(S?0:y.crossAxis),T=o.reference[d]+o.reference[b]+(S?0:((v=s.offset)==null?void 0:v[d])||0)-(S?y.crossAxis:0);h<x?h=x:h>T&&(h=T)}return{[f]:p,[d]:h}}}},aJ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:u=()=>{},...l}=vi(e,t),c=await kl(t,l),d=yi(i),f=Xa(i),p=Lr(i)==="y",{width:h,height:m}=o.floating;let y,g;d==="top"||d==="bottom"?(y=d,g=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,y=f==="end"?"top":"bottom");const v=m-c.top-c.bottom,b=h-c.left-c.right,S=yo(m-c[y],v),x=yo(h-c[g],b),T=!t.middlewareData.shift;let _=S,C=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=v),T&&!f){const O=xn(c.left,0),D=xn(c.right,0),L=xn(c.top,0),F=xn(c.bottom,0);p?C=h-2*(O!==0||D!==0?O+D:xn(c.left,c.right)):_=m-2*(L!==0||F!==0?L+F:xn(c.top,c.bottom))}await u({...t,availableWidth:C,availableHeight:_});const I=await s.getDimensions(a.floating);return h!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function ah(){return typeof window<"u"}function Qa(e){return BO(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vr(e){var t;return(t=(BO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function BO(e){return ah()?e instanceof Node||e instanceof Pn(e).Node:!1}function wr(e){return ah()?e instanceof Element||e instanceof Pn(e).Element:!1}function qr(e){return ah()?e instanceof HTMLElement||e instanceof Pn(e).HTMLElement:!1}function Zx(e){return!ah()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot}const uJ=new Set(["inline","contents"]);function lc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!uJ.has(i)}const lJ=new Set(["table","td","th"]);function cJ(e){return lJ.has(Qa(e))}const dJ=[":popover-open",":modal"];function uh(e){return dJ.some(t=>{try{return e.matches(t)}catch{return!1}})}const fJ=["transform","translate","scale","rotate","perspective"],pJ=["transform","translate","scale","rotate","perspective","filter"],hJ=["paint","layout","strict","content"];function Aw(e){const t=Ow(),n=wr(e)?Sr(e):e;return fJ.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||pJ.some(r=>(n.willChange||"").includes(r))||hJ.some(r=>(n.contain||"").includes(r))}function mJ(e){let t=bo(e);for(;qr(t)&&!Ma(t);){if(Aw(t))return t;if(uh(t))return null;t=bo(t)}return null}function Ow(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gJ=new Set(["html","body","#document"]);
vendor: 6,378 bytes, line 114
114function Ma(e){return gJ.has(Qa(e))}function Sr(e){return Pn(e).getComputedStyle(e)}function lh(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bo(e){if(Qa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zx(e)&&e.host||Vr(e);return Zx(t)?t.host:t}function zO(e){const t=bo(e);return Ma(t)?e.ownerDocument?e.ownerDocument.body:e.body:qr(t)&&lc(t)?t:zO(t)}function Pl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=zO(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Pn(i);if(o){const a=Fy(s);return t.concat(s,s.visualViewport||[],lc(i)?i:[],a&&n?Pl(a):[])}return t.concat(i,Pl(i,[],n))}function Fy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HO(e){const t=Sr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=qr(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=op(n)!==o||op(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Mw(e){return wr(e)?e:e.contextElement}function la(e){const t=Mw(e);if(!qr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=HO(t);let s=(o?op(n.width):n.width)/r,a=(o?op(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const vJ=Ur(0);function WO(e){const t=Pn(e);return!Ow()||!t.visualViewport?vJ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yJ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pn(e)?!1:t}function us(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Mw(e);let s=Ur(1);t&&(r?wr(r)&&(s=la(r)):s=la(e));const a=yJ(o,n,r)?WO(o):Ur(0);let u=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const f=Pn(o),p=r&&wr(r)?Pn(r):r;let h=f,m=Fy(h);for(;m&&r&&p!==h;){const y=la(m),g=m.getBoundingClientRect(),v=Sr(m),b=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,S=g.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,d*=y.y,u+=b,l+=S,h=Pn(m),m=Fy(h)}}return ap({width:c,height:d,x:u,y:l})}function Nw(e,t){const n=lh(e).scrollLeft;return t?t.left+n:us(Vr(e)).left+n}function qO(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Nw(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function bJ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Vr(r),a=t?uh(t.floating):!1;if(r===s||a&&o)return n;let u={scrollLeft:0,scrollTop:0},l=Ur(1);const c=Ur(0),d=qr(r);if((d||!d&&!o)&&((Qa(r)!=="body"||lc(s))&&(u=lh(r)),qr(r))){const p=us(r);l=la(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const f=s&&!d&&!o?qO(s,u,!0):Ur(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x+f.x,y:n.y*l.y-u.scrollTop*l.y+c.y+f.y}}function wJ(e){return Array.from(e.getClientRects())}function SJ(e){const t=Vr(e),n=lh(e),r=e.ownerDocument.body,i=xn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=xn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Nw(e);const a=-n.scrollTop;return Sr(r).direction==="rtl"&&(s+=xn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function _J(e,t){const n=Pn(e),r=Vr(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;const l=Ow();(!l||l&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a,y:u}}const EJ=new Set(["absolute","fixed"]);function TJ(e,t){const n=us(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=qr(e)?la(e):Ur(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:s,height:a,x:u,y:l}}function eC(e,t,n){let r;if(t==="viewport")r=_J(e,n);else if(t==="document")r=SJ(Vr(e));else if(wr(t))r=TJ(t,n);else{const i=WO(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ap(r)}function VO(e,t){const n=bo(e);return n===t||!wr(n)||Ma(n)?!1:Sr(n).position==="fixed"||VO(n,t)}function xJ(e,t){const n=t.get(e);if(n)return n;let r=Pl(e,[],!1).filter(a=>wr(a)&&Qa(a)!=="body"),i=null;const o=Sr(e).position==="fixed";let s=o?bo(e):e;for(;wr(s)&&!Ma(s);){const a=Sr(s),u=Aw(s);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&EJ.has(i.position)||lc(s)&&!u&&VO(e,s))?r=r.filter(c=>c!==s):i=a,s=bo(s)}return t.set(e,r),r}function CJ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?uh(t)?[]:xJ(t,this._c):[].concat(n),r],a=s[0],u=s.reduce((l,c)=>{const d=eC(t,c,i);return l.top=xn(d.top,l.top),l.right=yo(d.right,l.right),l.bottom=yo(d.bottom,l.bottom),l.left=xn(d.left,l.left),l},eC(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function IJ(e){const{width:t,height:n}=HO(e);return{width:t,height:n}}function RJ(e,t,n){const r=qr(t),i=Vr(t),o=n==="fixed",s=us(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const u=Ur(0);function l(){u.x=Nw(i)}if(r||!r&&!o)if((Qa(t)!=="body"||lc(i))&&(a=lh(t)),r){const p=us(t,!0,o,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&l();o&&!r&&i&&l();const c=i&&!r&&!o?qO(i,a):Ur(0),d=s.left+a.scrollLeft-u.x-c.x,f=s.top+a.scrollTop-u.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function qm(e){return Sr(e).position==="static"}function tC(e,t){if(!qr(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vr(e)===n&&(n=n.ownerDocument.body),n}function GO(e,t){const n=Pn(e);if(uh(e))return n;if(!qr(e)){let i=bo(e);for(;i&&!Ma(i);){if(wr(i)&&!qm(i))return i;i=bo(i)}return n}let r=tC(e,t);for(;r&&cJ(r)&&qm(r);)r=tC(r,t);return r&&Ma(r)&&qm(r)&&!Aw(r)?n:r||mJ(e)||n}const kJ=async function(e){const t=this.getOffsetParent||GO,n=this.getDimensions,r=await n(e.floating);return{reference:RJ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PJ(e){return Sr(e).direction==="rtl"}const AJ={convertOffsetParentRelativeRectToViewportRelativeRect:bJ,getDocumentElement:Vr,getClippingRect:CJ,getOffsetParent:GO,getElementRects:kJ,getClientRects:wJ,getDimensions:IJ,getScale:la,isElement:wr,isRTL:PJ};function KO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function OJ(e,t){let n=null,r;const i=Vr(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();const l=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=l;if(a||t(),!f||!p)return;
vendor: 9,135 bytes, line 114
114const h=ud(d),m=ud(i.clientWidth-(c+f)),y=ud(i.clientHeight-(d+p)),g=ud(c),b={rootMargin:-h+"px "+-m+"px "+-y+"px "+-g+"px",threshold:xn(0,yo(1,u))||1};let S=!0;function x(T){const _=T[0].intersectionRatio;if(_!==u){if(!S)return s();_?s(!1,_):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_===1&&!KO(l,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,b)}n.observe(e)}return s(!0),o}function MJ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Mw(e),c=i||o?[...l?Pl(l):[],...Pl(t)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const d=l&&a?OJ(l,n):null;let f=-1,p=null;s&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let h,m=u?us(e):null;u&&y();function y(){const g=us(e);m&&!KO(m,g)&&n(),m=g,h=requestAnimationFrame(y)}return n(),()=>{var g;c.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const NJ=iJ,DJ=oJ,LJ=tJ,FJ=aJ,jJ=nJ,nC=eJ,UJ=sJ,$J=(e,t,n)=>{const r=new Map,i={platform:AJ,...n},o={...i.platform,_c:r};return ZQ(e,t,{...i,platform:o})};var BJ=typeof document<"u",zJ=function(){},Xd=BJ?w.useLayoutEffect:zJ;function up(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!up(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!up(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function YO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rC(e,t){const n=YO(e);return Math.round(t*n)/n}function Vm(e){const t=w.useRef(e);return Xd(()=>{t.current=e}),t}function HJ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:u,open:l}=e,[c,d]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(r);up(f,r)||p(r);const[h,m]=w.useState(null),[y,g]=w.useState(null),v=w.useCallback(P=>{P!==T.current&&(T.current=P,m(P))},[]),b=w.useCallback(P=>{P!==_.current&&(_.current=P,g(P))},[]),S=o||h,x=s||y,T=w.useRef(null),_=w.useRef(null),C=w.useRef(c),I=u!=null,O=Vm(u),D=Vm(i),L=Vm(l),F=w.useCallback(()=>{if(!T.current||!_.current)return;const P={placement:t,strategy:n,middleware:f};D.current&&(P.platform=D.current),$J(T.current,_.current,P).then(k=>{const $={...k,isPositioned:L.current!==!1};M.current&&!up(C.current,$)&&(C.current=$,$l.flushSync(()=>{d($)}))})},[f,t,n,D,L]);Xd(()=>{l===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[l]);const M=w.useRef(!1);Xd(()=>(M.current=!0,()=>{M.current=!1}),[]),Xd(()=>{if(S&&(T.current=S),x&&(_.current=x),S&&x){if(O.current)return O.current(S,x,F);F()}},[S,x,F,O,I]);const R=w.useMemo(()=>({reference:T,floating:_,setReference:v,setFloating:b}),[v,b]),N=w.useMemo(()=>({reference:S,floating:x}),[S,x]),A=w.useMemo(()=>{const P={position:n,left:0,top:0};if(!N.floating)return P;const k=rC(N.floating,c.x),$=rC(N.floating,c.y);return a?{...P,transform:"translate("+k+"px, "+$+"px)",...YO(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:$}},[n,a,N.floating,c.x,c.y]);return w.useMemo(()=>({...c,update:F,refs:R,elements:N,floatingStyles:A}),[c,F,R,N,A])}const WJ=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nC({element:r.current,padding:i}).fn(n):{}:r?nC({element:r,padding:i}).fn(n):{}}}},qJ=(e,t)=>({...NJ(e),options:[e,t]}),VJ=(e,t)=>({...DJ(e),options:[e,t]}),GJ=(e,t)=>({...UJ(e),options:[e,t]}),KJ=(e,t)=>({...LJ(e),options:[e,t]}),YJ=(e,t)=>({...FJ(e),options:[e,t]}),XJ=(e,t)=>({...jJ(e),options:[e,t]}),QJ=(e,t)=>({...WJ(e),options:[e,t]});var JJ="Arrow",XO=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return E.jsx(Ue.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});XO.displayName=JJ;var ZJ=XO;function eZ(e){const[t,n]=w.useState(void 0);return gi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Dw="Popper",[QO,JO]=Ro(Dw),[tZ,ZO]=QO(Dw),eM=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return E.jsx(tZ,{scope:t,anchor:r,onAnchorChange:i,children:n})};eM.displayName=Dw;var tM="PopperAnchor",nM=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=ZO(tM,n),s=w.useRef(null),a=wt(t,s);return w.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:E.jsx(Ue.div,{...i,ref:a})});nM.displayName=tM;var Lw="PopperContent",[nZ,rZ]=QO(Lw),rM=w.forwardRef((e,t)=>{var J,Me,Oe,ze,Ye,ut;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,y=ZO(Lw,n),[g,v]=w.useState(null),b=wt(t,_n=>v(_n)),[S,x]=w.useState(null),T=eZ(S),_=(T==null?void 0:T.width)??0,C=(T==null?void 0:T.height)??0,I=r+(o!=="center"?"-"+o:""),O=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},D=Array.isArray(l)?l:[l],L=D.length>0,F={padding:O,boundary:D.filter(oZ),altBoundary:L},{refs:M,floatingStyles:R,placement:N,isPositioned:A,middlewareData:P}=HJ({strategy:"fixed",placement:I,whileElementsMounted:(..._n)=>MJ(..._n,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[qJ({mainAxis:i+C,alignmentAxis:s}),u&&VJ({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?GJ():void 0,...F}),u&&KJ({...F}),YJ({...F,apply:({elements:_n,rects:ne,availableWidth:ln,availableHeight:rr})=>{const{width:ir,height:$n}=ne.reference,Bn=_n.floating.style;Bn.setProperty("--radix-popper-available-width",`${ln}px`),Bn.setProperty("--radix-popper-available-height",`${rr}px`),Bn.setProperty("--radix-popper-anchor-width",`${ir}px`),Bn.setProperty("--radix-popper-anchor-height",`${$n}px`)}}),S&&QJ({element:S,padding:a}),sZ({arrowWidth:_,arrowHeight:C}),f&&XJ({strategy:"referenceHidden",...F})]}),[k,$]=sM(N),z=Nn(h);gi(()=>{A&&(z==null||z())},[A,z]);const H=(J=P.arrow)==null?void 0:J.x,V=(Me=P.arrow)==null?void 0:Me.y,q=((Oe=P.arrow)==null?void 0:Oe.centerOffset)!==0,[te,G]=w.useState();return gi(()=>{g&&G(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:A?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(ze=P.transformOrigin)==null?void 0:ze.x,(Ye=P.transformOrigin)==null?void 0:Ye.y].join(" "),...((ut=P.hide)==null?void 0:ut.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(nZ,{scope:n,placedSide:k,onArrowChange:x,arrowX:H,arrowY:V,shouldHideArrow:q,children:E.jsx(Ue.div,{"data-side":k,"data-align":$,...m,ref:b,style:{...m.style,animation:A?void 0:"none"}})})})});rM.displayName=Lw;var iM="PopperArrow",iZ={top:"bottom",right:"left",bottom:"top",left:"right"},oM=w.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=rZ(iM,r),s=iZ[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(ZJ,{...i,ref:n,style:{...i.style,display:"block"}})})});oM.displayName=iM;function oZ(e){return e!==null}var sZ=e=>({name:"transformOrigin",options:e,fn(t){var y,g,v;const{placement:n,rects:r,middlewareData:i}=t,s=((y=i.arrow)==null?void 0:y.centerOffset)!==0,a=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,c]=sM(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((g=i.arrow)==null?void 0:g.x)??0)+a/2,p=(((v=i.arrow)==null?void 0:v.y)??0)+u/2;let h="",m="";return l==="bottom"?(h=s?d:`${f}px`,m=`${-u}
114px`):l==="top"?(h=s?d:`${f}px`,m=`${r.floating.height+u}px`):l==="right"?(h=`${-u}px`,m=s?d:`${p}px`):l==="left"&&(h=`${r.floating.width+u}px`,m=s?d:`${p}px`),{data:{x:h,y:m}}}});function sM(e){const[t,n="center"]=e.split("-");return[t,n]}var aZ=eM,uZ=nM,lZ=rM,cZ=oM,dZ="Portal",ch=w.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=w.useState(!1);gi(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?JR.createPortal(E.jsx(Ue.div,{...r,ref:t}),s):null});ch.displayName=dZ;function fZ(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Ei=e=>{const{present:t,children:n}=e,r=pZ(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=wt(r.ref,hZ(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};Ei.displayName="Presence";function pZ(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),o=w.useRef("none"),s=e?"mounted":"unmounted",[a,u]=fZ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=ld(r.current);o.current=a==="mounted"?l:"none"},[a]),gi(()=>{const l=r.current,c=i.current;if(c!==e){const f=o.current,p=ld(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),gi(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=p=>{const m=ld(r.current).includes(p.animationName);if(p.target===t&&m&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=p=>{p.target===t&&(o.current=ld(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function ld(e){return(e==null?void 0:e.animationName)||"none"}function hZ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mZ=c0[" useInsertionEffect ".trim().toString()]||gi;function cc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=gZ({defaultProp:t,onChange:n}),a=e!==void 0,u=a?e:i;{const c=w.useRef(e!==void 0);w.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,r])}const l=w.useCallback(c=>{var d;if(a){const f=vZ(c)?c(e):c;f!==e&&((d=s.current)==null||d.call(s,f))}else o(c)},[a,e,o,s]);return[u,l]}function gZ({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),o=w.useRef(t);return mZ(()=>{o.current=t},[t]),w.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function vZ(e){return typeof e=="function"}var Gm="rovingFocusGroup.onEntryFocus",yZ={bubbles:!1,cancelable:!0},dc="RovingFocusGroup",[jy,aM,bZ]=oh(dc),[wZ,dh]=Ro(dc,[bZ]),[SZ,_Z]=wZ(dc),uM=w.forwardRef((e,t)=>E.jsx(jy.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(jy.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(EZ,{...e,ref:t})})}));uM.displayName=dc;var EZ=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,f=w.useRef(null),p=wt(t,f),h=xw(o),[m,y]=cc({prop:s,defaultProp:a??null,onChange:u,caller:dc}),[g,v]=w.useState(!1),b=Nn(l),S=aM(n),x=w.useRef(!1),[T,_]=w.useState(0);return w.useEffect(()=>{const C=f.current;if(C)return C.addEventListener(Gm,b),()=>C.removeEventListener(Gm,b)},[b]),E.jsx(SZ,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:m,onItemFocus:w.useCallback(C=>y(C),[y]),onItemShiftTab:w.useCallback(()=>v(!0),[]),onFocusableItemAdd:w.useCallback(()=>_(C=>C+1),[]),onFocusableItemRemove:w.useCallback(()=>_(C=>C-1),[]),children:E.jsx(Ue.div,{tabIndex:g||T===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{x.current=!0}
vendor: 4,254 bytes, line 114
114),onFocus:ee(e.onFocus,C=>{const I=!x.current;if(C.target===C.currentTarget&&I&&!g){const O=new CustomEvent(Gm,yZ);if(C.currentTarget.dispatchEvent(O),!O.defaultPrevented){const D=S().filter(N=>N.focusable),L=D.find(N=>N.active),F=D.find(N=>N.id===m),R=[L,F,...D].filter(Boolean).map(N=>N.ref.current);dM(R,c)}}x.current=!1}),onBlur:ee(e.onBlur,()=>v(!1))})})}),lM="RovingFocusGroupItem",cM=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...a}=e,u=oi(),l=o||u,c=_Z(lM,n),d=c.currentTabStopId===l,f=aM(n),{onFocusableItemAdd:p,onFocusableItemRemove:h,currentTabStopId:m}=c;return w.useEffect(()=>{if(r)return p(),()=>h()},[r,p,h]),E.jsx(jy.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:E.jsx(Ue.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:ee(e.onMouseDown,y=>{r?c.onItemFocus(l):y.preventDefault()}),onFocus:ee(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:ee(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const g=CZ(y,c.orientation,c.dir);if(g!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let b=f().filter(S=>S.focusable).map(S=>S.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();const S=b.indexOf(y.currentTarget);b=c.loop?IZ(b,S+1):b.slice(S+1)}setTimeout(()=>dM(b))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:m!=null}):s})})});cM.displayName=lM;var TZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xZ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function CZ(e,t,n){const r=xZ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return TZ[r]}function dM(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function IZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fM=uM,pM=cM,RZ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ks=new WeakMap,cd=new WeakMap,dd={},Km=0,hM=function(e){return e&&(e.host||hM(e.parentNode))},kZ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=hM(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},PZ=function(e,t,n,r){var i=kZ(t,Array.isArray(e)?e:[e]);dd[n]||(dd[n]=new WeakMap);var o=dd[n],s=[],a=new Set,u=new Set(i),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var p=f.getAttribute(r),h=p!==null&&p!=="false",m=(ks.get(f)||0)+1,y=(o.get(f)||0)+1;ks.set(f,m),o.set(f,y),s.push(f),m===1&&h&&cd.set(f,!0),y===1&&f.setAttribute(n,"true"),h||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),a.clear(),Km++,function(){s.forEach(function(d){var f=ks.get(d)-1,p=o.get(d)-1;ks.set(d,f),o.set(d,p),f||(cd.has(d)||d.removeAttribute(r),cd.delete(d)),p||d.removeAttribute(n)}),Km--,Km||(ks=new WeakMap,ks=new WeakMap,cd=new WeakMap,dd={})}},mM=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=RZ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),PZ(r,i,n,"aria-hidden")):function(){return null}},Qd="right-scroll-bar-position",Jd="width-before-scroll-bar",AZ="with-scroll-bars-hidden",OZ="--removed-body-scroll-bar-size";function Ym(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function MZ(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var NZ=typeof window<"u"?w.useLayoutEffect:w.useEffect,iC=new WeakMap;function DZ(e,t){var n=MZ(null,function(r){return e.forEach(function(i){return Ym(i,r)})});return NZ(function(){var r=iC.get(n);if(r){var i=new Set(r),o=new Set(e),s=n.current;
vendor: 4,189 bytes, lines 114-129
114i.forEach(function(a){o.has(a)||Ym(a,null)}),o.forEach(function(a){i.has(a)||Ym(a,s)})}iC.set(n,e)},[e]),n}function LZ(e){return e}function FZ(e,t){t===void 0&&(t=LZ);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var u=function(){var c=s;s=[],c.forEach(o)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){s.push(c),l()},filter:function(c){return s=s.filter(c),n}}}};return i}function jZ(e){e===void 0&&(e={});var t=FZ(null);return t.options=W({async:!0,ssr:!1},e),t}var gM=function(e){var t=e.sideCar,n=Ra(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,W({},n))};gM.isSideCarExport=!0;function UZ(e,t){return e.useMedium(t),gM}var vM=jZ(),Xm=function(){},fh=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:Xm,onWheelCapture:Xm,onTouchMoveCapture:Xm}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,y=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,b=e.gapMode,S=Ra(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,T=DZ([n,t]),_=W(W({},S),i);return w.createElement(w.Fragment,null,c&&w.createElement(x,{sideCar:vM,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:b}),s?w.cloneElement(w.Children.only(a),W(W({},_),{ref:T})):w.createElement(v,W({},_,{className:u,ref:T}),a))});fh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fh.classNames={fullWidth:Jd,zeroRight:Qd};var $Z=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function BZ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$Z();return t&&e.setAttribute("nonce",t),e}function zZ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HZ(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var WZ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=BZ())&&(zZ(t,n),HZ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qZ=function(){var e=WZ();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yM=function(){var e=qZ(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},VZ={left:0,top:0,right:0,gap:0},Qm=function(e){return parseInt(e||"",10)||0},GZ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Qm(n),Qm(r),Qm(i)]},KZ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return VZ;var t=GZ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},YZ=yM(),ca="data-scroll-locked",XZ=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` 115 .`.concat(AZ,` { 116 overflow: hidden `).concat(r,`; 117 padding-right: `).concat(a,"px ").concat(r,`; 118 } 119 body[`).concat(ca,`] { 120 overflow: hidden `).concat(r,`; 121 overscroll-behavior: contain; 122 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 123 padding-left: `.concat(i,`px; 124 padding-top: `).concat(o,`px; 125 padding-right: `).concat(s,`px; 126 margin-left:0; 127 margin-top:0; 128 margin-right: `).concat(a,"px ").concat(r,`; 129 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
129")].filter(Boolean).join(""),` 130 } 131 132 .`).concat(Qd,` { 133 right: `).concat(a,"px ").concat(r,`; 134 } 135 136 .`).concat(Jd,` { 137 margin-right: `).concat(a,"px ").concat(r,`; 138 } 139 140 .`).concat(Qd," .").concat(Qd,` { 141 right: 0 `).concat(r,`; 142 } 143 144 .`).concat(Jd," .").concat(Jd,` { 145 margin-right: 0 `).concat(r,`; 146 } 147 148 body[`).concat(ca,`] { 149 `).concat(OZ,": ").concat(a,`px; 150 } 151`)},oC=function(){var e=parseInt(document.body.getAttribute(ca)||"0",10);return isFinite(e)?e:0},QZ=function(){w.useEffect(function(){return document.body.setAttribute(ca,(oC()+1).toString()),function(){var e=oC()-1;e<=0?document.body.removeAttribute(ca):document.body.setAttribute(ca,e.toString())}},[])},JZ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;QZ();var o=w.useMemo(function(){return KZ(i)},[i]);return w.createElement(YZ,{styles:XZ(o,!t,i,n?"":"!important")})},Uy=!1;if(typeof window<"u")try{var fd=Object.defineProperty({},"passive",{get:function(){return Uy=!0,!0}});window.addEventListener("test",fd,fd),window.removeEventListener("test",fd,fd)}catch{Uy=!1}var Ps=Uy?{passive:!1}:!1,ZZ=function(e){return e.tagName==="TEXTAREA"},bM=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ZZ(e)&&n[t]==="visible")},eee=function(e){return bM(e,"overflowY")},tee=function(e){return bM(e,"overflowX")},sC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=wM(e,r);if(i){var o=SM(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nee=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ree=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wM=function(e,t){return e==="v"?eee(t):tee(t)},SM=function(e,t){return e==="v"?nee(t):ree(t)},iee=function(e,t){return e==="h"&&t==="rtl"?-1:1},oee=function(e,t,n,r,i){var o=iee(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,u=t.contains(a),l=!1,c=s>0,d=0,f=0;do{if(!a)break;var p=SM(e,a),h=p[0],m=p[1],y=p[2],g=m-y-o*h;(h||g)&&wM(e,a)&&(d+=g,f+=h);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(c&&Math.abs(d)<1||!c&&Math.abs(f)<1)&&(l=!0),l},pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aC=function(e){return[e.deltaX,e.deltaY]},uC=function(e){return e&&"current"in e?e.current:e},see=function(e,t){return e[0]===t[0]&&e[1]===t[1]},aee=function(e){return` 152 .block-interactivity-`.concat(e,` {pointer-events: none;} 153 .allow-interactivity-`).concat(e,` {pointer-events: all;} 154`)},uee=0,As=[];function lee(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(uee++)[0],o=w.useState(yM)[0],s=w.useRef(e);w.useEffect(function(){s.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=le([e.lockRef.current],(e.shards||[]).map(uC),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=w.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var g=pd(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-g[0],S="deltaY"in m?m.deltaY:v[1]-g[1],x,T=m.target,_=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in m&&_==="h"&&T.type==="range")return!1;var C=sC(_,T);if(!C)return!0;if(C?x=_:(x=_==="v"?"h":"v",C=sC(_,T)),!C)return!1;if(!r.current&&"changedTouches"in m&&(b||S)&&(r.current=x),!x)return!0;var I=r.current||x;return oee(I,y,m,I==="h"?b:S)},[]),u=w.useCallback(function(m){var y=m;if(!(!As.length||As[As.length-1]!==o)){var g="deltaY"in y?aC(y):pd(y),v=t.current.filter(function(x){return x.name===y.type&&(x.target===y.target||y.target===x.shadowParent)&&see(x.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}
vendor: 14,323 bytes, line 154
154if(!v){var b=(s.current.shards||[]).map(uC).filter(Boolean).filter(function(x){return x.contains(y.target)}),S=b.length>0?a(y,b[0]):!s.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),l=w.useCallback(function(m,y,g,v){var b={name:m,delta:y,target:g,should:v,shadowParent:cee(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),c=w.useCallback(function(m){n.current=pd(m),r.current=void 0},[]),d=w.useCallback(function(m){l(m.type,aC(m),m.target,a(m,e.lockRef.current))},[]),f=w.useCallback(function(m){l(m.type,pd(m),m.target,a(m,e.lockRef.current))},[]);w.useEffect(function(){return As.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Ps),document.addEventListener("touchmove",u,Ps),document.addEventListener("touchstart",c,Ps),function(){As=As.filter(function(m){return m!==o}),document.removeEventListener("wheel",u,Ps),document.removeEventListener("touchmove",u,Ps),document.removeEventListener("touchstart",c,Ps)}},[]);var p=e.removeScrollBar,h=e.inert;return w.createElement(w.Fragment,null,h?w.createElement(o,{styles:aee(i)}):null,p?w.createElement(JZ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cee(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dee=UZ(vM,lee);var Fw=w.forwardRef(function(e,t){return w.createElement(fh,W({},e,{ref:t,sideCar:dee}))});Fw.classNames=fh.classNames;var $y=["Enter"," "],fee=["ArrowDown","PageUp","Home"],_M=["ArrowUp","PageDown","End"],pee=[...fee,..._M],hee={ltr:[...$y,"ArrowRight"],rtl:[...$y,"ArrowLeft"]},mee={ltr:["ArrowLeft"],rtl:["ArrowRight"]},fc="Menu",[Al,gee,vee]=oh(fc),[ws,jw]=Ro(fc,[vee,JO,dh]),ph=JO(),EM=dh(),[yee,Ss]=ws(fc),[bee,pc]=ws(fc),TM=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,a=ph(t),[u,l]=w.useState(null),c=w.useRef(!1),d=Nn(o),f=xw(i);return w.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),E.jsx(aZ,{...a,children:E.jsx(yee,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:l,children:E.jsx(bee,{scope:t,onClose:w.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:s,children:r})})})};TM.displayName=fc;var wee="MenuAnchor",Uw=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ph(n);return E.jsx(uZ,{...i,...r,ref:t})});Uw.displayName=wee;var $w="MenuPortal",[See,xM]=ws($w,{forceMount:void 0}),CM=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Ss($w,t);return E.jsx(See,{scope:t,forceMount:n,children:E.jsx(Ei,{present:n||o.open,children:E.jsx(ch,{asChild:!0,container:i,children:r})})})};CM.displayName=$w;var Jn="MenuContent",[_ee,Bw]=ws(Jn),IM=w.forwardRef((e,t)=>{const n=xM(Jn,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Ss(Jn,e.__scopeMenu),s=pc(Jn,e.__scopeMenu);return E.jsx(Al.Provider,{scope:e.__scopeMenu,children:E.jsx(Ei,{present:r||o.open,children:E.jsx(Al.Slot,{scope:e.__scopeMenu,children:s.modal?E.jsx(Eee,{...i,ref:t}):E.jsx(Tee,{...i,ref:t})})})})}),Eee=w.forwardRef((e,t)=>{const n=Ss(Jn,e.__scopeMenu),r=w.useRef(null),i=wt(t,r);return w.useEffect(()=>{const o=r.current;if(o)return mM(o)},[]),E.jsx(zw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ee(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Tee=w.forwardRef((e,t)=>{const n=Ss(Jn,e.__scopeMenu);return E.jsx(zw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),xee=Oa("MenuContent.ScrollLock"),zw=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...m}=e,y=Ss(Jn,n),g=pc(Jn,n),v=ph(n),b=EM(n),S=gee(n),[x,T]=w.useState(null),_=w.useRef(null),C=wt(t,_,y.onContentChange),I=w.useRef(0),O=w.useRef(""),D=w.useRef(0),L=w.useRef(null),F=w.useRef("right"),M=w.useRef(0),R=h?Fw:w.Fragment,N=h?{as:xee,allowPinchZoom:!0}:void 0,A=k=>{var J,Me;const $=O.current+k,z=S().filter(Oe=>!Oe.disabled),H=document.activeElement,V=(J=z.find(Oe=>Oe.ref.current===H))==null?void 0:J.textValue,q=z.map(Oe=>Oe.textValue),te=Fee(q,$,V),G=(Me=z.find(Oe=>Oe.textValue===te))==null?void 0:Me.ref.current;(function Oe(ze){O.current=ze,window.clearTimeout(I.current),ze!==""&&(I.current=window.setTimeout(()=>Oe(""),1e3))})($),G&&setTimeout(()=>G.focus())};w.useEffect(()=>()=>window.clearTimeout(I.current),[]),FO();const P=w.useCallback(k=>{var z,H;return F.current===((z=L.current)==null?void 0:z.side)&&Uee(k,(H=L.current)==null?void 0:H.area)},[]);return E.jsx(_ee,{scope:n,searchRef:O,onItemEnter:w.useCallback(k=>{P(k)&&k.preventDefault()},[P]),onItemLeave:w.useCallback(k=>{var $;P(k)||(($=_.current)==null||$.focus(),T(null))},[P]),onTriggerLeave:w.useCallback(k=>{P(k)&&k.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:w.useCallback(k=>{L.current=k},[]),children:E.jsx(R,{...N,children:E.jsx(Iw,{asChild:!0,trapped:i,onMountAutoFocus:ee(o,k=>{var $;k.preventDefault(),($=_.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:E.jsx(sh,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:E.jsx(fM,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:T,onEntryFocus:ee(u,k=>{g.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(lZ,{role:"menu","aria-orientation":"vertical","data-state":HM(y.open),"data-radix-menu-content":"",dir:g.dir,...v,...m,ref:C,style:{outline:"none",...m.style},onKeyDown:ee(m.onKeyDown,k=>{const z=k.target.closest("[data-radix-menu-content]")===k.currentTarget,H=k.ctrlKey||k.altKey||k.metaKey,V=k.key.length===1;z&&(k.key==="Tab"&&k.preventDefault(),!H&&V&&A(k.key));const q=_.current;if(k.target!==q||!pee.includes(k.key))return;k.preventDefault();const G=S().filter(J=>!J.disabled).map(J=>J.ref.current);_M.includes(k.key)&&G.reverse(),Dee(G)}),onBlur:ee(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(I.current),O.current="")}),onPointerMove:ee(e.onPointerMove,Ol(k=>{const $=k.target,z=M.current!==k.clientX;if(k.currentTarget.contains($)&&z){const H=k.clientX>M.current?"right":"left";F.current=H,M.current=k.clientX}}))})})})})})})});IM.displayName=Jn;var Cee="MenuGroup",Hw=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Ue.div,{role:"group",...r,ref:t})});Hw.displayName=Cee;var Iee="MenuLabel",RM=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Ue.div,{...r,ref:t})});RM.displayName=Iee;var lp="MenuItem",lC="menu.itemSelect",hh=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=w.useRef(null),s=pc(lp,e.__scopeMenu),a=Bw(lp,e.__scopeMenu),u=wt(t,o),l=w.useRef(!1),c=()=>{const d=o.current;if(!n&&d){const f=new CustomEvent(lC,{bubbles:!0,cancelable:!0});d.addEventListener(lC,p=>r==null?void 0:r(p),{once:!0}),Cw(d,f),f.defaultPrevented?l.current=!1:s.onClose()}};return E.jsx(kM,{...i,ref:u,disabled:n,onClick:ee(e.onClick,c),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),l.current=!0},onPointerUp:ee(e.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:ee(e.onKeyDown,d=>{const f=a.searchRef.current!=="";n||f&&d.key===" "||$y.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});hh.displayName=lp;var kM=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=Bw(lp,n),a=EM(n),u=w.useRef(null),l=wt(t,u),[c,d]=w.useState(!1),[f,p]=w.useState("");return w.useEffect(()=>{const h=u.current;h&&p((h.textContent??"").trim())},[o.children]),E.jsx(Al.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:E.jsx(pM,{asChild:!0,...a,focusable:!r,children:E.jsx(Ue.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:ee(e.onPointerMove,Ol(h=>{r?s.onItemLeave(h):(s.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ee(e.onPointerLeave,Ol(h=>s.onItemLeave(h))),onFocus:ee(e.onFocus,()=>d(!0)),onBlur:ee(e.onBlur,()=>d(!1))})})})}),Ree="MenuCheckboxItem",PM=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return E.jsx(DM,{scope:e.__scopeMenu,checked:n,children:E.jsx(hh,{role:"menuitemcheckbox","aria-checked":cp(n)?"mixed":n,...i,ref:t,"data-state":qw(n),onSelect:ee(i.onSelect,()=>r==null?void 0:r(cp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});PM.displayName=Ree;var AM="MenuRadioGroup",[kee,Pee]=ws(AM,{value:void 0,onValueChange:()=>{}}),OM=w.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Nn(r);return E.jsx(kee,{scope:e.__scopeMenu,value:n,onValueChange:o,children:E.jsx(Hw,{...i,ref:t})})});OM.displayName=AM;var MM="MenuRadioItem",NM=w.forwardRef((e,t)=>{const{value:n,...r}=e,i=Pee(MM,e.__scopeMenu),o=n===i.value;return E.jsx(DM,{scope:e.__scopeMenu,checked:o,children:E.jsx(hh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":qw(o),onSelect:ee(r.onSelect,()=>{var s;return(s=i.onValueChange)==null?void 0:s.call(i,n)},{checkForDefaultPrevented:!1})})})});NM.displayName=MM;var Ww="MenuItemIndicator",[DM,Aee]=ws(Ww,{checked:!1}),LM=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=Aee(Ww,n);return E.jsx(Ei,{present:r||cp(o.checked)||o.checked===!0,children:E.jsx(Ue.span,{...i,ref:t,"data-state":qw(o.checked)})})});LM.displayName=Ww;var Oee="MenuSeparator",FM=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return E.jsx(Ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});FM.displayName=Oee;var Mee="MenuArrow",jM=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ph(n);return E.jsx(cZ,{...i,...r,ref:t})});jM.displayName=Mee;var Nee="MenuSub",[yae,UM]=ws(Nee),xu="MenuSubTrigger",$M=w.forwardRef((e,t)=>{const n=Ss(xu,e.__scopeMenu),r=pc(xu,e.__scopeMenu),i=UM(xu,e.__scopeMenu),o=Bw(xu,e.__scopeMenu),s=w.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=w.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return w.useEffect(()=>c,[c]),w.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),u(null)}},[a,u]),E.jsx(Uw,{asChild:!0,...l,children:E.jsx(kM,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":HM(n.open),...e,ref:ih(t,i.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ee(e.onPointerMove,Ol(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:ee(e.onPointerLeave,Ol(d=>{var p,h;c();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const m=(h=n.content)==null?void 0:h.dataset.side,y=m==="right",g=y?-5:5,v=f[y?"left":"right"],b=f[y?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:v,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x:v,y:f.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ee(e.onKeyDown,d=>{var p;const f=o.searchRef.current!=="";e.disabled||f&&d.key===" "||hee[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});$M.displayName=xu;var BM="MenuSubContent",zM=w.forwardRef((e,t)=>{const n=xM(Jn,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Ss(Jn,e.__scopeMenu),s=pc(Jn,e.__scopeMenu),a=UM(BM,e.__scopeMenu),u=w.useRef(null),l=wt(t,u);return E.jsx(Al.Provider,{scope:e.__scopeMenu,children:E.jsx(Ei,{present:r||o.open,children:E.jsx(Al.Slot,{scope:e.__scopeMenu,children:E.jsx(zw,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:l,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;s.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:ee(e.onFocusOutside,c=>{c.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ee(e.onEscapeKeyDown,c=>{s.onClose(),c.preventDefault()}),onKeyDown:ee(e.onKeyDown,c=>{var p;const d=c.currentTarget.contains(c.target),f=mee[s.dir].includes(c.key);d&&f&&(o.onOpenChange(!1),(p=a.trigger)==null||p.focus(),c.preventDefault())})})})})})});zM.displayName=BM;function HM(e){return e?"open":"closed"}function cp(e){return e==="indeterminate"}function qw(e){return cp(e)?"indeterminate":e?"checked":"unchecked"}function Dee(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Lee(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Fee(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=Lee(e,Math.max(o,0));i.length===1&&(s=s.filter(l=>l!==n));const u=s.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function jee(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o],u=t[s],l=a.x,c=a.y,d=u.x,f=u.y;c>r!=f>r&&n<(d-l)*(r-c)/(f-c)+l&&(i=!i)}return i}function Uee(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return jee(n,t)}function Ol(e){return t=>t.pointerType==="mouse"?e(t):void 0}var WM=TM,qM=Uw,VM=CM,GM=IM,KM=Hw,YM=RM,XM=hh,QM=PM,JM=OM,ZM=NM,eN=LM,tN=FM,nN=jM,rN=$M,iN=zM,hc="Menubar",[By,$ee,Bee]=oh(hc),[oN,bae]=Ro(hc,[Bee,dh]),sn=jw(),sN=dh(),[zee,Vw]=oN(hc),aN=w.forwardRef((e,t)=>
154{const{__scopeMenubar:n,value:r,onValueChange:i,defaultValue:o,loop:s=!0,dir:a,...u}=e,l=xw(a),c=sN(n),[d,f]=cc({prop:r,onChange:i,defaultProp:o??"",caller:hc}),[p,h]=w.useState(null);return E.jsx(zee,{scope:n,value:d,onMenuOpen:w.useCallback(m=>{f(m),h(m)},[f]),onMenuClose:w.useCallback(()=>f(""),[f]),onMenuToggle:w.useCallback(m=>{f(y=>y?"":m),h(m)},[f]),dir:l,loop:s,children:E.jsx(By.Provider,{scope:n,children:E.jsx(By.Slot,{scope:n,children:E.jsx(fM,{asChild:!0,...c,orientation:"horizontal",loop:s,dir:l,currentTabStopId:p,onCurrentTabStopIdChange:h,children:E.jsx(Ue.div,{role:"menubar",...u,ref:t})})})})})});aN.displayName=hc;var Gw="MenubarMenu",[Hee,uN]=oN(Gw),lN=e=>{const{__scopeMenubar:t,value:n,...r}=e,i=oi(),o=n||i||"LEGACY_REACT_AUTO_VALUE",s=Vw(Gw,t),a=sn(t),u=w.useRef(null),l=w.useRef(!1),c=s.value===o;return w.useEffect(()=>{c||(l.current=!1)},[c]),E.jsx(Hee,{scope:t,value:o,triggerId:oi(),triggerRef:u,contentId:oi(),wasKeyboardTriggerOpenRef:l,children:E.jsx(WM,{...a,open:c,onOpenChange:d=>{d||s.onMenuClose()},modal:!1,dir:s.dir,...r})})};lN.displayName=Gw;var zy="MenubarTrigger",cN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...i}=e,o=sN(n),s=sn(n),a=Vw(zy,n),u=uN(zy,n),l=w.useRef(null),c=wt(t,l,u.triggerRef),[d,f]=w.useState(!1),p=a.value===u.value;return E.jsx(By.ItemSlot,{scope:n,value:u.value,disabled:r,children:E.jsx(pM,{asChild:!0,...o,focusable:!r,tabStopId:u.value,children:E.jsx(qM,{asChild:!0,...s,children:E.jsx(Ue.button,{type:"button",role:"menuitem",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?u.contentId:void 0,"data-highlighted":d?"":void 0,"data-state":p?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:c,onPointerDown:ee(e.onPointerDown,h=>{!r&&h.button===0&&h.ctrlKey===!1&&(a.onMenuOpen(u.value),p||h.preventDefault())}),onPointerEnter:ee(e.onPointerEnter,()=>{var m;!!a.value&&!p&&(a.onMenuOpen(u.value),(m=l.current)==null||m.focus())}),onKeyDown:ee(e.onKeyDown,h=>{r||(["Enter"," "].includes(h.key)&&a.onMenuToggle(u.value),h.key==="ArrowDown"&&a.onMenuOpen(u.value),["Enter"," ","ArrowDown"].includes(h.key)&&(u.wasKeyboardTriggerOpenRef.current=!0,h.preventDefault()))}),onFocus:ee(e.onFocus,()=>f(!0)),onBlur:ee(e.onBlur,()=>f(!1))})})})})});cN.displayName=zy;var Wee="MenubarPortal",dN=e=>{const{__scopeMenubar:t,...n}=e,r=sn(t);return E.jsx(VM,{...r,...n})};dN.displayName=Wee;var Hy="MenubarContent",fN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,align:r="start",...i}=e,o=sn(n),s=Vw(Hy,n),a=uN(Hy,n),u=$ee(n),l=w.useRef(!1);return E.jsx(GM,{id:a.contentId,"aria-labelledby":a.triggerId,"data-radix-menubar-content":"",...o,...i,ref:t,align:r,onCloseAutoFocus:ee(e.onCloseAutoFocus,c=>{var f;!!!s.value&&!l.current&&((f=a.triggerRef.current)==null||f.focus()),l.current=!1,c.preventDefault()}),onFocusOutside:ee(e.onFocusOutside,c=>{const d=c.target;u().some(p=>{var h;return(h=p.ref.current)==null?void 0:h.contains(d)})&&c.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,()=>{l.current=!0}),onEntryFocus:c=>{a.wasKeyboardTriggerOpenRef.current||c.preventDefault()},onKeyDown:ee(e.onKeyDown,c=>{if(["ArrowRight","ArrowLeft"].includes(c.key)){const d=c.target,f=d.hasAttribute("data-radix-menubar-subtrigger"),p=d.closest("[data-radix-menubar-content]")!==c.currentTarget,m=(s.dir==="rtl"?"ArrowRight":"ArrowLeft")===c.key;if(!m&&f||p&&m)return;let v=u().filter(x=>!x.disabled).map(x=>x.value);m&&v.reverse();const b=v.indexOf(a.value);v=s.loop?ote(v,b+1):v.slice(b+1);const[S]=v;S&&s.onMenuOpen(S)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});fN.displayName=Hy;var qee="MenubarGroup",Vee=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(KM,{...i,...r,ref:t})});Vee.displayName=qee;var Gee="MenubarLabel",pN=w.forwardRef((e,t)=>
154{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(YM,{...i,...r,ref:t})});pN.displayName=Gee;var Kee="MenubarItem",hN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(XM,{...i,...r,ref:t})});hN.displayName=Kee;var Yee="MenubarCheckboxItem",mN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(QM,{...i,...r,ref:t})});mN.displayName=Yee;var Xee="MenubarRadioGroup",Qee=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(JM,{...i,...r,ref:t})});Qee.displayName=Xee;var Jee="MenubarRadioItem",gN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(ZM,{...i,...r,ref:t})});gN.displayName=Jee;var Zee="MenubarItemIndicator",vN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(eN,{...i,...r,ref:t})});vN.displayName=Zee;var ete="MenubarSeparator",yN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(tN,{...i,...r,ref:t})});yN.displayName=ete;var tte="MenubarArrow",nte=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(nN,{...i,...r,ref:t})});nte.displayName=tte;var rte="MenubarSubTrigger",bN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(rN,{"data-radix-menubar-subtrigger":"",...i,...r,ref:t})});bN.displayName=rte;var ite="MenubarSubContent",wN=w.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,i=sn(n);return E.jsx(iN,{...i,"data-radix-menubar-content":"",...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});wN.displayName=ite;function ote(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SN=aN,ste=lN,_N=cN,ate=dN,EN=fN,TN=pN,xN=hN,CN=mN,IN=gN,RN=vN,kN=yN,PN=bN,AN=wN,ute={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const lte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cte=(e,t)=>{const n=w.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:s,children:a,...u},l)=>w.createElement("svg",{ref:l,...ute,width:i,height:i,stroke:r,strokeWidth:s?Number(o)*24/Number(i):o,className:`lucide lucide-${lte(e)}`,...u},[...t.map(([c,d])=>w.createElement(c,d)),...(Array.isArray(a)?a:[a])||[]]));return n.displayName=`${e}`,n};var Sn=cte;const dte=Sn("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]),fte=Sn("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]),ON=Sn("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),MN=Sn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),NN=Sn("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),pte=Sn("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),hte=Sn("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),mte=Sn("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),DN=Sn("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),gte=Sn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),vte=Sn("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),yte=Sn("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]),cC=Sn("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),mh=Sn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 7,913 bytes, line 154
154],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function LN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=LN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function FN(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=LN(e))&&(r&&(r+=" "),r+=t);return r}const Kw="-",bte=e=>{const t=Ste(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(Kw);return a[0]===""&&a.length!==1&&a.shift(),jN(a,t)||wte(s)},getConflictingClassGroupIds:(s,a)=>{const u=n[s]||[];return a&&r[s]?[...u,...r[s]]:u}}},jN=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?jN(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Kw);return(s=t.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},dC=/^\[(.+)\]$/,wte=e=>{if(dC.test(e)){const t=dC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ste=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ete(Object.entries(e.classGroups),n).forEach(([o,s])=>{Wy(s,r,o,t)}),r},Wy=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:fC(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(_te(i)){Wy(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{Wy(s,fC(t,o),n,r)})})},fC=(e,t)=>{let n=e;return t.split(Kw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},_te=e=>e.isThemeGetter,Ete=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o);return[n,i]}):e,Tte=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},UN="!",xte=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,s=a=>{const u=[];let l=0,c=0,d;for(let y=0;y<a.length;y++){let g=a[y];if(l===0){if(g===i&&(r||a.slice(y,y+o)===t)){u.push(a.slice(c,y)),c=y+o;continue}if(g==="/"){d=y;continue}}g==="["?l++:g==="]"&&l--}const f=u.length===0?a:a.substring(c),p=f.startsWith(UN),h=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:s}):s},Cte=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Ite=e=>({cache:Tte(e.cacheSize),parseClassName:xte(e),...bte(e)}),Rte=/\s+/,kte=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(Rte);let a="";for(let u=s.length-1;u>=0;u-=1){const l=s[u],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(l);let h=!!p,m=r(h?f.substring(0,p):f);if(!m){if(!h){a=l+(a.length>0?" "+a:a);continue}if(m=r(f),!m){a=l+(a.length>0?" "+a:a);continue}h=!1}const y=Cte(c).join(":"),g=d?y+UN:y,v=g+m;if(o.includes(v))continue;o.push(v);const b=i(m,h);for(let S=0;S<b.length;++S){const x=b[S];o.push(g+x)}a=l+(a.length>0?" "+a:a)}return a};function Pte(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=$N(t))&&(r&&(r+=" "),r+=n);return r}const $N=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$N(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ate(e,...t){let n,r,i,o=s;function s(u){const l=t.reduce((c,d)=>d(c),e());return n=Ite(l),r=n.cache.get,i=n.cache.set,o=a,a(u)}function a(u){const l=r(u);if(l)return l;const c=kte(u,n);return i(u,c),c}return function(){return o(Pte.apply(null,arguments))}}const Qe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},BN=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ote=/^\d+\/\d+$/,Mte=new Set(["px","full","screen"]),Nte=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dte=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Lte=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fte=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jte=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kr=e=>da(e)||Mte.has(e)||Ote.test(e),Oi=e=>Ja(e,"length",Vte),da=e=>!!e&&!Number.isNaN(Number(e)),Jm=e=>Ja(e,"number",da),hu=e=>!!e&&Number.isInteger(Number(e)),Ute=e=>e.endsWith("%")&&da(e.slice(0,-1)),fe=e=>BN.test(e),Mi=e=>Nte.test(e),$te=new Set(["length","size","percentage"]),Bte=e=>Ja(e,$te,zN),zte=e=>Ja(e,"position",zN),Hte=new Set(["image","url"]),Wte=e=>Ja(e,Hte,Kte),qte=e=>Ja(e,"",Gte),mu=()=>!0,Ja=(e,t,n)=>{const r=BN.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Vte=e=>Dte.test(e)&&!Lte.test(e),zN=()=>!1,Gte=e=>Fte.test(e),Kte=e=>jte.test(e),Yte=()=>{const e=Qe("colors"),t=Qe("spacing"),n=Qe("blur"),r=Qe("brightness"),i=Qe("borderColor"),o=Qe("borderRadius"),s=Qe("borderSpacing"),a=Qe("borderWidth"),u=Qe("contrast"),l=Qe("grayscale"),c=Qe("hueRotate"),d=Qe("invert"),f=Qe("gap"),p=Qe("gradientColorStops"),h=Qe("gradientColorStopPositions"),m=Qe("inset"),y=Qe("margin"),g=Qe("opacity"),v=Qe("padding"),b=Qe("saturate"),S=Qe("scale"),x=Qe("sepia"),T=Qe("skew"),_=Qe("space"),C=Qe("translate"),I=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",fe,t],L=()=>[fe,t],F=()=>["",Kr,Oi],M=()=>["auto",da,fe],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",fe],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[da,fe];return{cacheSize:500,separator:":",theme:{colors:[mu],spacing:[Kr,Oi],blur:["none","",Mi,fe],brightness:z(),borderColor:[e],borderRadius:["none","","full",Mi,fe],borderSpacing:L(),borderWidth:F(),contrast:z(),grayscale:k(),hueRotate:z(),invert:k(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Ute,Oi],inset:D(),margin:D(),opacity:z(),padding:L(),saturate:z(),scale:z(),sepia:k(),skew:z(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[Mi]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...R(),fe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}
vendor: 9,951 bytes, line 154
154],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",hu,fe]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",hu,fe]}],"grid-cols":[{"grid-cols":[mu]}],"col-start-end":[{col:["auto",{span:["full",hu,fe]},fe]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[mu]}],"row-start-end":[{row:["auto",{span:[hu,fe]},fe]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[Mi]},Mi]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Mi,Oi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jm]}],"font-family":[{font:[mu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",fe]}],"line-clamp":[{"line-clamp":["none",da,Jm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Kr,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Kr,Oi]}],"underline-offset":[{"underline-offset":["auto",Kr,fe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),zte]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Bte]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Wte]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:N()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[Kr,fe]}],"outline-w":[{outline:[Kr,Oi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Kr,Oi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Mi,qte]}],"shadow-color":[{shadow:[mu]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Mi,fe]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[hu,fe]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
154],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Kr,Oi,Jm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Xte=Ate(Yte);function be(...e){return Xte(FN(e))}const Qte=ste,HN=w.forwardRef(({className:e,...t},n)=>E.jsx(SN,{ref:n,className:be("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",e),...t}));HN.displayName=SN.displayName;const WN=w.forwardRef(({className:e,...t},n)=>E.jsx(_N,{ref:n,className:be("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));WN.displayName=_N.displayName;const Jte=w.forwardRef(({className:e,inset:t,children:n,...r},i)=>E.jsxs(PN,{ref:i,className:be("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[n,E.jsx(MN,{className:"ml-auto h-4 w-4"})]}));Jte.displayName=PN.displayName;const Zte=w.forwardRef(({className:e,...t},n)=>E.jsx(AN,{ref:n,className:be("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Zte.displayName=AN.displayName;const ene=w.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,...i},o)=>E.jsx(ate,{children:E.jsx(EN,{ref:o,align:t,alignOffset:n,sideOffset:r,className:be("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
154de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));ene.displayName=EN.displayName;const tne=w.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(xN,{ref:r,className:be("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));tne.displayName=xN.displayName;const nne=w.forwardRef(({className:e,children:t,checked:n,...r},i)=>E.jsxs(CN,{ref:i,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(RN,{children:E.jsx(ON,{className:"h-4 w-4"})})}),t]}));nne.displayName=CN.displayName;const rne=w.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(IN,{ref:r,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(RN,{children:E.jsx(NN,{className:"h-2 w-2 fill-current"})})}),t]}));rne.displayName=IN.displayName;const ine=w.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(TN,{ref:r,className:be("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));ine.displayName=TN.displayName;const one=w.forwardRef(({className:e,...t},n)=>E.jsx(kN,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));one.displayName=kN.displayName;var gh="DropdownMenu",[sne,wae]=Ro(gh,[jw]),an=jw(),[ane,qN]=sne(gh),VN=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,u=an(t),l=w.useRef(null),[c,d]=cc({prop:i,defaultProp:o??!1,onChange:s,caller:gh});return E.jsx(ane,{scope:t,triggerId:oi(),triggerRef:l,contentId:oi(),open:c,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(f=>!f),[d]),modal:a,children:E.jsx(WM,{...u,open:c,onOpenChange:d,dir:r,modal:a,children:n})})};VN.displayName=gh;var GN="DropdownMenuTrigger",KN=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=qN(GN,n),s=an(n);return E.jsx(qM,{asChild:!0,...s,children:E.jsx(Ue.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:ih(t,o.triggerRef),onPointerDown:ee(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ee(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});KN.displayName=GN;var une="DropdownMenuPortal",YN=e=>{const{__scopeDropdownMenu:t,...n}=e,r=an(t);return E.jsx(VM,{...r,...n})};YN.displayName=une;var XN="DropdownMenuContent",QN=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qN(XN,n),o=an(n),s=w.useRef(!1);return E.jsx(GM,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{var u;s.current||(u=i.triggerRef.current)==null||u.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:ee(e.onInteractOutside,a=>{const u=a.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});QN.displayName=XN;var lne="DropdownMenuGroup",cne=w.forwardRef((e,t)=>
154{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(KM,{...i,...r,ref:t})});cne.displayName=lne;var dne="DropdownMenuLabel",JN=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(YM,{...i,...r,ref:t})});JN.displayName=dne;var fne="DropdownMenuItem",ZN=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(XM,{...i,...r,ref:t})});ZN.displayName=fne;var pne="DropdownMenuCheckboxItem",eD=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(QM,{...i,...r,ref:t})});eD.displayName=pne;var hne="DropdownMenuRadioGroup",mne=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(JM,{...i,...r,ref:t})});mne.displayName=hne;var gne="DropdownMenuRadioItem",tD=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(ZM,{...i,...r,ref:t})});tD.displayName=gne;var vne="DropdownMenuItemIndicator",nD=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(eN,{...i,...r,ref:t})});nD.displayName=vne;var yne="DropdownMenuSeparator",rD=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(tN,{...i,...r,ref:t})});rD.displayName=yne;var bne="DropdownMenuArrow",wne=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(nN,{...i,...r,ref:t})});wne.displayName=bne;var Sne="DropdownMenuSubTrigger",iD=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(rN,{...i,...r,ref:t})});iD.displayName=Sne;var _ne="DropdownMenuSubContent",oD=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=an(n);return E.jsx(iN,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oD.displayName=_ne;var Ene=VN,Tne=KN,xne=YN,sD=QN,aD=JN,uD=ZN,lD=eD,cD=tD,dD=nD,fD=rD,pD=iD,hD=oD;const Cne=Ene,Ine=Tne,Rne=w.forwardRef(({className:e,inset:t,children:n,...r},i)=>E.jsxs(pD,{ref:i,className:be("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,E.jsx(MN,{className:"ml-auto h-4 w-4"})]}));Rne.displayName=pD.displayName;const kne=w.forwardRef(({className:e,...t},n)=>E.jsx(hD,{ref:n,className:be("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));kne.displayName=hD.displayName;const mD=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(xne,{children:E.jsx(sD,{ref:r,sideOffset:t,className:be("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));mD.displayName=sD.displayName;const Ls=w.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(uD,{ref:r,className:be("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Ls.displayName=uD.displayName;const Pne=w.forwardRef(({className:e,children:t,checked:n,...r},i)=>E.jsxs(lD,{ref:i,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(dD,{children:E.jsx(ON,{className:"h-4 w-4"})})}),t]}));Pne.displayName=lD.displayName;const Ane=w.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(cD,{ref:r,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(dD,{children:E.jsx(NN,{className:"h-2 w-2 fill-current"})})}),t]}));Ane.displayName=cD.displayName;const One=w.forwardRef(({className:e,inset:t,...n},r)=>E.jsx(aD,{ref:r,className:be("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));
vendor: 8,255 bytes, lines 154-158
154One.displayName=aD.displayName;const Mne=w.forwardRef(({className:e,...t},n)=>E.jsx(fD,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));Mne.displayName=fD.displayName;const pC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hC=FN,gD=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(l=>{const c=n==null?void 0:n[l],d=o==null?void 0:o[l];if(c===null)return null;const f=pC(c)||pC(d);return i[l][f]}),a=n&&Object.entries(n).reduce((l,c)=>{let[d,f]=c;return f===void 0||(l[d]=f),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(h=>{let[m,y]=h;return Array.isArray(y)?y.includes({...o,...a}[m]):{...o,...a}[m]===y})?[...l,d,f]:l},[]);return hC(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},Nne=gD("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2 min-h-[44px]",sm:"h-9 rounded-md px-3 min-h-[44px] sm:min-h-[36px]",lg:"h-11 rounded-md px-8 min-h-[44px]",icon:"h-10 w-10 min-h-[44px] min-w-[44px]"}},defaultVariants:{variant:"default",size:"default"}}),lo=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?gQ:"button";return E.jsx(s,{className:be(Nne({variant:t,size:n,className:e})),ref:o,...i})});lo.displayName="Button";var vh="Dialog",[vD,Sae]=Ro(vh),[Dne,Tr]=vD(vh),yD=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=w.useRef(null),u=w.useRef(null),[l,c]=cc({prop:r,defaultProp:i??!1,onChange:o,caller:vh});return E.jsx(Dne,{scope:t,triggerRef:a,contentRef:u,contentId:oi(),titleId:oi(),descriptionId:oi(),open:l,onOpenChange:c,onOpenToggle:w.useCallback(()=>c(d=>!d),[c]),modal:s,children:n})};yD.displayName=vh;var bD="DialogTrigger",wD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(bD,n),o=wt(t,i.triggerRef);return E.jsx(Ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Qw(i.open),...r,ref:o,onClick:ee(e.onClick,i.onOpenToggle)})});wD.displayName=bD;var Yw="DialogPortal",[Lne,SD]=vD(Yw,{forceMount:void 0}),_D=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Tr(Yw,t);return E.jsx(Lne,{scope:t,forceMount:n,children:w.Children.map(r,s=>E.jsx(Ei,{present:n||o.open,children:E.jsx(ch,{asChild:!0,container:i,children:s})}))})};_D.displayName=Yw;var dp="DialogOverlay",ED=w.forwardRef((e,t)=>{const n=SD(dp,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Tr(dp,e.__scopeDialog);return o.modal?E.jsx(Ei,{present:r||o.open,children:E.jsx(jne,{...i,ref:t})}):null});ED.displayName=dp;var Fne=Oa("DialogOverlay.RemoveScroll"),jne=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(dp,n);return E.jsx(Fw,{as:Fne,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(Ue.div,{"data-state":Qw(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ls="DialogContent",TD=w.forwardRef((e,t)=>{const n=SD(ls,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Tr(ls,e.__scopeDialog);return E.jsx(Ei,{present:r||o.open,children:o.modal?E.jsx(Une,{...i,ref:t}):E.jsx($ne,{...i,ref:t})})});TD.displayName=ls;var Une=w.forwardRef((e,t)=>{const n=Tr(ls,e.__scopeDialog),r=w.useRef(null),i=wt(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return mM(o)},[]),E.jsx(xD,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ee(e.onFocusOutside,o=>o.preventDefault())})}),$ne=w.forwardRef((e,t)=>{const n=Tr(ls,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return E.jsx(xD,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),xD=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Tr(ls,n),u=w.useRef(null),l=wt(t,u);return FO(),E.jsxs(E.Fragment,{children:[E.jsx(Iw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:E.jsx(sh,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Qw(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(Bne,{titleId:a.titleId}),E.jsx(Hne,{contentRef:u,descriptionId:a.descriptionId})]})]})}),Xw="DialogTitle",CD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(Xw,n);return E.jsx(Ue.h2,{id:i.titleId,...r,ref:t})});CD.displayName=Xw;var ID="DialogDescription",RD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(ID,n);return E.jsx(Ue.p,{id:i.descriptionId,...r,ref:t})});RD.displayName=ID;var kD="DialogClose",PD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(kD,n);return E.jsx(Ue.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,()=>i.onOpenChange(!1))})});PD.displayName=kD;function Qw(e){return e?"open":"closed"}var AD="DialogTitleWarning",[_ae,OD]=hQ(AD,{contentName:ls,titleName:Xw,docsSlug:"dialog"}),Bne=({titleId:e})=>{const t=OD(AD),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 155 156If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 157 158For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},zne="DialogDescriptionWarning",Hne=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OD(zne).contentName}}.`;return w.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},MD=yD,ND=wD,DD=_D,Jw=ED,Zw=TD,eS=CD,tS=RD,LD=PD;const Wne=MD,Eae=ND,qne=DD,FD=w.forwardRef(({className:e,...t},n)=>E.jsx(Jw,{ref:n,className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));FD.displayName=Jw.displayName;const jD=w.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(qne,{children:[E.jsx(FD,{}),E.jsxs(Zw,{ref:r,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,E.jsxs(LD,{className:"absolute right-4 top-4 roun
158ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[E.jsx(mh,{className:"h-4 w-4"}),E.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));jD.displayName=Zw.displayName;const UD=({className:e,...t})=>E.jsx("div",{className:be("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});UD.displayName="DialogHeader";const Vne=({className:e,...t})=>E.jsx("div",{className:be("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Vne.displayName="DialogFooter";const $D=w.forwardRef(({className:e,...t},n)=>E.jsx(eS,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",e),...t}));$D.displayName=eS.displayName;const Gne=w.forwardRef(({className:e,...t},n)=>E.jsx(tS,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Gne.displayName=tS.displayName;const BD=w.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:be("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
158ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));BD.displayName="Input";function Kne({initialValues:e,onSubmit:t}){const[n,r]=w.useState(e),[i,o]=w.useState(!1);return{values:n,handleChange:(l,c)=>{r(d=>({...d,[l]:c}))},handleSubmit:async l=>{l&&l.preventDefault(),o(!0);try{await t(n)}finally{o(!1)}},isSubmitting:i,reset:()=>{r(e)},setValues:r}}const fa="auth-expired";class zD extends CustomEvent{constructor(t){super(fa,{detail:t,bubbles:!1,cancelable:!1}),console.log("DISPATCHED: ",fa,t)}}Xe(zD,"type",fa);function Zd(e){const t={reason:"unauthorized"};window.dispatchEvent(new zD(t))}function Yne(e){const t=n=>e(n);return window.addEventListener(fa,t),()=>window.removeEventListener(fa,t)}const Os=Wr.BASE_URL,Xne=["/login","/register","/forgot-password","/reset-password"],Qne=[];function Jne(e){return Xne.includes(e)||Qne.some(t=>e.match(t))}function Zne(e,t){if(!t)return e;let n;t instanceof URLSearchParams?n=t:(n=new URLSearchParams,Object.entries(t).forEach(([i,o])=>{o!=null&&n.append(i,String(o))}));const r=e.includes("?");return e+(r?"&":"?")+n.toString()}async function ere(e,t){const n=e.headers.get("content-type");let r;if(n&&n.includes("application/json")?r=await e.json():r=await e.text(),!e.ok)throw{response:{status:e.status,data:r}};if(t&&t.length>0)for(const i of t)r=i(r);return{data:r}}class Zm extends Error{constructor(n,r={}){super(n);Xe(this,"response");Xe(this,"data");Xe(this,"status");Xe(this,"config");this.name="HttpError",this.response=r.response,this.data=r.data,this.status=r.status,this.config=r.config}}async function tre(e){const t=(e.method||"GET").toUpperCase();if(!e.url)throw new Error("RequestConfig.url is required");const n=e.url;let r={"Content-Type":"application/json",...e.headers||{}},i=typeof e.baseURL=="string"?e.baseURL:"",o=n.startsWith("http")?n:i+n;e.params&&(o=Zne(o,e.params));let s=e.data;if(e.transformRequest&&e.transformRequest.length>0)for(const u of e.transformRequest)s=u(s,r);const a={method:t,headers:r,credentials:"same-origin"};s&&t!=="GET"&&(a.body=s instanceof FormData?s:JSON.stringify(s),s instanceof FormData&&delete a.headers["Content-Type"]);try{const u=await fetch(o,a);if(!u.ok){let l;try{l=await u.clone().json()}catch{try{l=await u.clone().text()}catch{l=void 0}}throw new Zm(`Request failed with status ${u.status}`,{response:u,data:l,status:u.status,config:e})}return await ere(u,e.transformResponse)}catch(u){throw u instanceof Zm?u:new Zm(u.message||"Network error",{config:e})}}function gu(e,t,n){return n?{...n,url:e,data:t}:t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof FormData)?"headers"in t||"params"in t||"transformRequest"in t||"transformResponse"in t||"baseURL"in t||"url"in t?{...t,url:e}:{url:e,data:t}:{url:e}}async function Ms(e){let t={"Content-Type":"application/json",...e.headers||{}};const n=e.url||"",r=localStorage.getItem("token"),i=Jne(n);r&&!i&&(t.Authorization=`Bearer ${r}`);try{return await tre({...e,headers:t})}catch(o){throw o.response&&o.response.status===401&&Zd(),o}}const Ti={request:e=>Ms({baseURL:e.baseURL??Os,...e}),get:(e,t)=>Ms({...gu(e,t!=null&&t.baseURL?t:{...t||{},baseURL:Os}),method:"GET"}),delete:(e,t)=>Ms({...gu(e,t!=null&&t.baseURL?t:{...t||{},baseURL:Os}),method:"DELETE"}),post:(e,t,n)=>Ms({...gu(e,t,n&&n.baseURL?n:{...n,baseURL:Os}),method:"POST"}),put:(e,t,n)=>Ms({...gu(e,t,n&&n.baseURL?n:{...n,baseURL:Os}),method:"PUT"}),patch:(e,t,n)=>Ms({...gu(e,t,n&&n.baseURL?n:{...n,baseURL:Os}),method:"PATCH"})};let bi=!1;function nS(){if(bi)return;const e=Wr.KEYS.AMPLITUDE_API_KEY;try{rO(e,void 0,{defaultTracking:{sessions:!0,pageViews:!0,formInteractions:!0,fileDownloads:!0}}),bi=!0}catch(t){console.error("Failed to initialize Amplitude:",t)}}function qy(e,t){try{bi||nS(),bi&&oY(e,t)}catch{}}function hd(e){try{bi||nS(),bi&&iY(e)}catch{}}function md(e){try{if(bi||nS(),bi){const t=new Tl;Object.entries(e).forEach(([n,r])=>{t.set(n,r)}),nY(t)}}catch{}}function nre(){try{bi&&rY()}catch{}}const rre=({open:e,onOpenChange:t,tripDetailId:n,tripOptionId:r})=>{const{values:i,handleChange:o,handleSubmit:s,isSubmitting:a,reset:u}=Kne({initialValues:{emails:[""]},onSubmit:async h=>{const m=h.emails.filter(y=>y.trim()!=="");if(!n||!r){console.error("Missing trip IDs for sharing");return}try{await Ti.post("/share-itinerary",{emails:m,trip_detail_id:n,trip_option_id:r}),qy("trip_plan_shared",{share_method:"email",trip_detail_id:n,trip_option_id:r,recipient_count:m.length}),u(),t(!1)}catch(y){console.error("Error sharing itinerary:",y)}}});j.useEffect(()=>{e||u()},[e]);const l=()=>{const h=[...i.emails,""];o("emails",h)},c=h=>{if(i.emails.length>1){const m=i.emails.filter((y,g)=>g!==h);o("emails",m)}},d=(h,m)=>{const y=[...i.emails];y[h]=m,o("emails",y)},f=h=>{h.preventDefault(),s()},p=i.emails.some(h=>h.trim()!=="");return E.jsx(Wne,{open:e,onOpenChange:t,children:E.jsxs(jD,{className:"sm:max-w-md",children:[E.jsx(UD,{children:E.jsx($D,{className:"text-center font-bold",children:"Share Your Itinerary"})}),E.jsxs("div",{className:"space-y-4",children:[E.jsxs("p",{className:"text-center text-sm text-muted-foreground leading-relaxed",children:["Heads-up! This itinerary includes",E.jsx("br",{}),"personal details and plans. Only share",E.jsx("br",{}),"with people you trust."]}),E.jsxs("form",{onSubmit:f,className:"space-y-4",children:[E.jsx("div",{className:"space-y-3",children:i.emails.map((h,m)=>E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:`email-${m}`,className:"text-sm font-medium",children:"Email"}),E.jsxs("div",{className:"flex gap-2",children:[E.jsx(BD,{id:`email-${m}`,type:"email",placeholder:"Email",value:h,onChange:y=>
158d(m,y.target.value),className:"flex-1"}),i.emails.length>1&&E.jsx(lo,{type:"button",variant:"outline",onClick:()=>c(m),className:"px-3 h-10",children:E.jsx(mh,{className:"h-4 w-4"})})]})]},m))}),E.jsxs("div",{className:"flex gap-3",children:[E.jsxs(lo,{type:"button",variant:"outline",onClick:l,className:"flex-1",disabled:a,children:[E.jsx(gte,{className:"h-4 w-4 mr-2"}),"Add Email"]}),E.jsxs(lo,{type:"submit",className:"flex-1",disabled:!p||a,children:[E.jsx(vte,{className:"h-4 w-4 mr-2"}),"Send"]})]})]})]})]})})};function ire(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const HD=j.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),mc=()=>{const e=j.useContext(HD);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ire(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 159[data-state=closed] 160){opacity:0}
160[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function ore(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function sre(){return rS(/^Mac/)}function are(){return rS(/^iPhone/)}function mC(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ure(){return rS(/^iPad/)||sre()&&navigator.maxTouchPoints>1}function WD(){return are()||ure()}function rS(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const lre=24,cre=typeof window<"u"?w.useLayoutEffect:w.useEffect;function gC(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const eg=typeof document<"u"&&window.visualViewport;function vC(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function qD(e){for(vC(e)&&(e=e.parentElement);e&&!vC(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const dre=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let gd=0,tg;function fre(e={}){let{isDisabled:t}=e;cre(()=>{if(!t)return gd++,gd===1&&WD()&&(tg=pre()),()=>{gd--,gd===0&&(tg==null||tg())}},[t])}function pre(){let e,t=0,n=d=>{e=qD(d.target),!(e===document.documentElement&&e===document.body)&&(t=d.changedTouches[0].pageY)},r=d=>{if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}let f=d.changedTouches[0].pageY,p=e.scrollTop,h=e.scrollHeight-e.clientHeight;h!==0&&((p<=0&&f>t||p>=h&&f<t)&&d.preventDefault(),t=f)},i=d=>{let f=d.target;Vy(f)&&f!==document.activeElement&&(d.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},o=d=>{let f=d.target;Vy(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",eg&&(eg.height<window.innerHeight?requestAnimationFrame(()=>{yC(f)}):eg.addEventListener("resize",()=>yC(f),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},a=window.pageXOffset,u=window.pageYOffset,l=gC(hre(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let c=gC(vu(document,"touchstart",n,{passive:!1,capture:!0}),vu(document,"touchmove",r,{passive:!1,capture:!0}),vu(document,"touchend",i,{passive:!1,capture:!0}),vu(document,"focus",o,!0),vu(window,"scroll",s));return()=>{l(),c(),window.scrollTo(a,u)}}function hre(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function vu(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function yC(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=qD(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+lre;o>s&&(n.scrollTop+=i-r)}e=n.parentElement}}function Vy(e){return e instanceof HTMLInputElement&&!dre.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function mre(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function gre(...e){return t=>e.forEach(n=>mre(n,t))}function VD(...e){return w.useCallback(gre(...e),e)}const GD=new WeakMap;function Et(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([i,o])=>{if(i.startsWith("--")){e.style.setProperty(i,o);return}r[i]=e.style[i],e.style[i]=o}),!n&&GD.set(e,r)}function vre(e,t){if(!e||!(e instanceof HTMLElement))return;let n=GD.get(e);n&&(e.style[t]=n[t])}const gt=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function vd(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[gt(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[gt(t)?5:4]):null)}function yre(e){return 8*(Math.log(e+1)-2)}function ng(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function bre(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const it={DURATION:.5,EASE:[.32,.72,0,1]},KD=.4,wre=.25,Sre=100,YD=8,Ao=16,Gy=26,rg="vaul-dragging";function XD(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function _re({defaultProp:e,onChange:t}){const n=j.useState(e),[r]=n,i=j.useRef(r),o=XD(t);return j.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function QD({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=_re({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=XD(n),u=j.useCallback(l=>{if(o){const d=typeof l=="function"?l(e):l;d!==e&&a(d)}else i(l)},[o,e,i,a]);return[s,u]}function Ere({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:o,onSnapPointChange:s,direction:a="bottom",container:u,snapToSequentialPoint:l}){const[c,d]=QD({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[f,p]=j.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);j.useEffect(()=>{function _(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[]);const h=j.useMemo(()=>c===(n==null?void 0:n[n.length-1])||null,[n,c]),m=j.useMemo(()=>{var _;return(_=n==null?void 0:n.findIndex(C=>C===c))!=null?_:null},[n,c]),y=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===c||!n,g=j.useMemo(()=>{const _=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var C;return(C=n==null?void 0:n.map(I=>
160{const O=typeof I=="string";let D=0;if(O&&(D=parseInt(I,10)),gt(a)){const F=O?D:f?I*_.height:0;return f?a==="bottom"?_.height-F:-_.height+F:F}const L=O?D:f?I*_.width:0;return f?a==="right"?_.width-L:-_.width+L:L}))!=null?C:[]},[n,f,u]),v=j.useMemo(()=>m!==null?g==null?void 0:g[m]:null,[g,m]),b=j.useCallback(_=>{var C;const I=(C=g==null?void 0:g.findIndex(O=>O===_))!=null?C:null;s(I),Et(r.current,{transition:`transform ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`,transform:gt(a)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`}),g&&I!==g.length-1&&o!==void 0&&I!==o&&I<o?Et(i.current,{transition:`opacity ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`,opacity:"0"}):Et(i.current,{transition:`opacity ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`,opacity:"1"}),d(n==null?void 0:n[Math.max(I,0)])},[r.current,n,g,o,i,d]);j.useEffect(()=>{if(c||e){var _;const C=(_=n==null?void 0:n.findIndex(I=>I===e||I===c))!=null?_:-1;g&&C!==-1&&typeof g[C]=="number"&&b(g[C])}},[c,e,n,g,b]);function S({draggedDistance:_,closeDrawer:C,velocity:I,dismissible:O}){if(o===void 0)return;const D=a==="bottom"||a==="right"?(v??0)-_:(v??0)+_,L=m===o-1,F=m===0,M=_>0;if(L&&Et(i.current,{transition:`opacity ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`}),!l&&I>2&&!M){O?C():b(g[0]);return}if(!l&&I>2&&M&&g&&n){b(g[n.length-1]);return}const R=g==null?void 0:g.reduce((A,P)=>typeof A!="number"||typeof P!="number"?A:Math.abs(P-D)<Math.abs(A-D)?P:A),N=gt(a)?window.innerHeight:window.innerWidth;if(I>KD&&Math.abs(_)<N*.4){const A=M?1:-1;if(A>0&&h&&n){b(g[n.length-1]);return}if(F&&A<0&&O&&C(),m===null)return;b(g[m+A]);return}b(R)}function x({draggedDistance:_}){if(v===null)return;const C=a==="bottom"||a==="right"?v-_:v+_;(a==="bottom"||a==="right")&&C<g[g.length-1]||(a==="top"||a==="left")&&C>g[g.length-1]||Et(r.current,{transform:gt(a)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`})}function T(_,C){if(!n||typeof m!="number"||!g||o===void 0)return null;const I=m===o-1;if(m>=o&&C)return 0;if(I&&!C)return 1;if(!y&&!I)return null;const D=I?m+1:m-1,L=I?g[D]-g[D-1]:g[D+1]-g[D],F=_/Math.abs(L);return I?1-F:F}return{isLastSnapPoint:h,activeSnapPoint:c,shouldFade:y,getPercentageDragged:T,setActiveSnapPoint:d,activeSnapPointIndex:m,onRelease:S,onDrag:x,snapPointsOffset:g}}const Tre=()=>()=>{};function xre(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=mc(),o=j.useRef(null),s=w.useMemo(()=>document.body.style.backgroundColor,[]);function a(){return(window.innerWidth-Gy)/window.innerWidth}j.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;bre(r&&!i?ng(document.body,{background:"black"}):Tre,ng(u,{transformOrigin:gt(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${it.DURATION}s`,transitionTimingFunction:`cubic-bezier(${it.EASE.join(",")})`}));const l=ng(u,{borderRadius:`${YD}px`,overflow:"hidden",...gt(e)?{transform:`scale(${a()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${a()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{l(),o.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},it.DURATION*1e3)}}},[t,n,s])}let yu=null;function Cre({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:o}){const[s,a]=j.useState(()=>typeof window<"u"?window.location.href:""),u=j.useRef(0),l=j.useCallback(()=>{if(mC()&&yu===null&&e&&!o){yu={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:d,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.current}px`,left:`${-d}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=f-window.innerHeight;p&&u.current>=f&&(document.body.style.top=`${-(u.current+p)}px`)}),300)}},[e]),c=j.useCallback(()=>
160{if(mC()&&yu!==null&&!o){const d=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,yu),window.requestAnimationFrame(()=>{if(i&&s!==window.location.href){a(window.location.href);return}window.scrollTo(f,d)}),yu=null}},[s]);return j.useEffect(()=>{function d(){u.current=window.scrollY}return d(),window.addEventListener("scroll",d),()=>{window.removeEventListener("scroll",d)}},[]),j.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||c()}},[t,c]),j.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout(()=>{c()},500)):c())},[e,r,s,t,n,l,c]),{restorePositionSetting:c}}function Ire({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:o,shouldScaleBackground:s=!1,setBackgroundColorOnScale:a=!0,closeThreshold:u=wre,scrollLockTimeout:l=Sre,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:y=!0,onClose:g,nested:v,noBodyStyles:b=!1,direction:S="bottom",defaultOpen:x=!1,disablePreventScroll:T=!0,snapToSequentialPoint:_=!1,preventScrollRestoration:C=!1,repositionInputs:I=!0,onAnimationEnd:O,container:D,autoFocus:L=!1}){var F,M;const[R=!1,N]=QD({defaultProp:x,prop:e,onChange:ie=>{t==null||t(ie),!ie&&!v&&xi(),setTimeout(()=>{O==null||O(ie)},it.DURATION*1e3),ie&&!y&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),ie||(document.body.style.pointerEvents="auto")}}),[A,P]=j.useState(!1),[k,$]=j.useState(!1),[z,H]=j.useState(!1),V=j.useRef(null),q=j.useRef(null),te=j.useRef(null),G=j.useRef(null),J=j.useRef(null),Me=j.useRef(!1),Oe=j.useRef(null),ze=j.useRef(0),Ye=j.useRef(!1),ut=j.useRef(!x),_n=j.useRef(0),ne=j.useRef(null),ln=j.useRef(((F=ne.current)==null?void 0:F.getBoundingClientRect().height)||0),rr=j.useRef(((M=ne.current)==null?void 0:M.getBoundingClientRect().width)||0),ir=j.useRef(0),$n=j.useCallback(ie=>{o&&ie===$e.length-1&&(q.current=new Date)},[]),{activeSnapPoint:Bn,activeSnapPointIndex:de,setActiveSnapPoint:ht,onRelease:pe,snapPointsOffset:$e,onDrag:Ut,shouldFade:Ee,getPercentageDragged:kt}=Ere({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:ne,fadeFromIndex:f,overlayRef:V,onSnapPointChange:$n,direction:S,container:D,snapToSequentialPoint:_});fre({isDisabled:!R||k||!y||z||!A||!I||!T});const{restorePositionSetting:xi}=Cre({isOpen:R,modal:y,nested:v??!1,hasBeenOpened:A,preventScrollRestoration:C,noBodyStyles:b});function _s(){return(window.innerWidth-Gy)/window.innerWidth}function Eh(ie){var Ae,Be;!c&&!o||ne.current&&!ne.current.contains(ie.target)||(ln.current=((Ae=ne.current)==null?void 0:Ae.getBoundingClientRect().height)||0,rr.current=((Be=ne.current)==null?void 0:Be.getBoundingClientRect().width)||0,$(!0),te.current=new Date,WD()&&window.addEventListener("touchend",()=>Me.current=!1,{once:!0}),ie.target.setPointerCapture(ie.pointerId),ze.current=gt(S)?ie.pageY:ie.pageX)}function ko(ie,Ae){var Be;let we=ie;const Ne=(Be=window.getSelection())==null?void 0:Be.toString(),$t=ne.current?vd(ne.current,S):null,Z=new Date;if(we.tagName==="SELECT"||we.hasAttribute("data-vaul-no-drag")||we.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(q.current&&Z.getTime()-q.current.getTime()<500)return!1;if($t!==null&&(S==="bottom"?$t>0:$t<0))return!0;if(Ne&&Ne.length>0)return!1;if(J.current&&Z.getTime()-J.current.getTime()<l&&$t===0||Ae)return J.current=Z,!1;for(;we;){if(we.scrollHeight>we.clientHeight){if(we.scrollTop!==0)return J.current=new Date,!1;if(we.getAttribute("role")==="dialog")return!0}we=we.parentNode}return!0}function Th(ie){if(ne.current&&k){const Ae=S==="bottom"||S==="right"?1:-1,Be=(ze.current-(gt(S)?ie.pageY:ie.pageX))*Ae,we=Be>0,Ne=o&&!c&&!we;if(Ne&&de===0)return;const $t=Math.abs(Be),Z=document.querySelector("[data-vaul-drawer-wrapper]"),ve=S==="bottom"||S==="top"?ln.current:rr.current;let Se=$t/ve;const St=kt($t,we);if(St!==null&&(Se=St),Ne&&Se>=1||!Me.current&&!ko(ie.target,we))return;if(ne.current.classList.add(rg),Me.current=!0,Et(ne.current,{transition:"none"}),Et(V.current,{transition:"none"}),o&&Ut({draggedDistance:Be}
160),we&&!o){const _t=yre(Be),zn=Math.min(_t*-1,0)*Ae;Et(ne.current,{transform:gt(S)?`translate3d(0, ${zn}px, 0)`:`translate3d(${zn}px, 0, 0)`});return}const mt=1-Se;if((Ee||f&&de===f-1)&&(r==null||r(ie,Se),Et(V.current,{opacity:`${mt}`,transition:"none"},!0)),Z&&V.current&&s){const _t=Math.min(_s()+Se*(1-_s()),1),zn=8-Se*8,cn=Math.max(0,14-Se*14);Et(Z,{borderRadius:`${zn}px`,transform:gt(S)?`scale(${_t}) translate3d(0, ${cn}px, 0)`:`scale(${_t}) translate3d(${cn}px, 0, 0)`,transition:"none"},!0)}if(!o){const _t=$t*Ae;Et(ne.current,{transform:gt(S)?`translate3d(0, ${_t}px, 0)`:`translate3d(${_t}px, 0, 0)`})}}}j.useEffect(()=>{window.requestAnimationFrame(()=>{ut.current=!0})},[]),j.useEffect(()=>{var ie;function Ae(){if(!ne.current||!I)return;const Be=document.activeElement;if(Vy(Be)||Ye.current){var we;const Ne=((we=window.visualViewport)==null?void 0:we.height)||0,$t=window.innerHeight;let Z=$t-Ne;const ve=ne.current.getBoundingClientRect().height||0,Se=ve>$t*.8;ir.current||(ir.current=ve);const St=ne.current.getBoundingClientRect().top;if(Math.abs(_n.current-Z)>60&&(Ye.current=!Ye.current),o&&o.length>0&&$e&&de){const mt=$e[de]||0;Z+=mt}if(_n.current=Z,ve>Ne||Ye.current){const mt=ne.current.getBoundingClientRect().height;let _t=mt;mt>Ne&&(_t=Ne-(Se?St:Gy)),m?ne.current.style.height=`${mt-Math.max(Z,0)}px`:ne.current.style.height=`${Math.max(_t,Ne-St)}px`}else ore()||(ne.current.style.height=`${ir.current}px`);o&&o.length>0&&!Ye.current?ne.current.style.bottom="0px":ne.current.style.bottom=`${Math.max(Z,0)}px`}}return(ie=window.visualViewport)==null||ie.addEventListener("resize",Ae),()=>{var Be;return(Be=window.visualViewport)==null?void 0:Be.removeEventListener("resize",Ae)}},[de,o,$e]);function Ci(ie){Ii(),g==null||g(),ie||N(!1),setTimeout(()=>{o&&ht(o[0])},it.DURATION*1e3)}function Es(){if(!ne.current)return;const ie=document.querySelector("[data-vaul-drawer-wrapper]"),Ae=vd(ne.current,S);Et(ne.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`}),Et(V.current,{transition:`opacity ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`,opacity:"1"}),s&&Ae&&Ae>0&&R&&Et(ie,{borderRadius:`${YD}px`,overflow:"hidden",...gt(S)?{transform:`scale(${_s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${_s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${it.DURATION}s`,transitionTimingFunction:`cubic-bezier(${it.EASE.join(",")})`},!0)}function Ii(){!k||!ne.current||(ne.current.classList.remove(rg),Me.current=!1,$(!1),G.current=new Date)}function vc(ie){if(!k||!ne.current)return;ne.current.classList.remove(rg),Me.current=!1,$(!1),G.current=new Date;const Ae=vd(ne.current,S);
160if(!ie||!ko(ie.target,!1)||!Ae||Number.isNaN(Ae)||te.current===null)return;const Be=G.current.getTime()-te.current.getTime(),we=ze.current-(gt(S)?ie.pageY:ie.pageX),Ne=Math.abs(we)/Be;if(Ne>.05&&(H(!0),setTimeout(()=>{H(!1)},200)),o){pe({draggedDistance:we*(S==="bottom"||S==="right"?1:-1),closeDrawer:Ci,velocity:Ne,dismissible:c}),i==null||i(ie,!0);return}if(S==="bottom"||S==="right"?we>0:we<0){Es(),i==null||i(ie,!0);return}if(Ne>KD){Ci(),i==null||i(ie,!1);return}var $t;const Z=Math.min(($t=ne.current.getBoundingClientRect().height)!=null?$t:0,window.innerHeight);var ve;const Se=Math.min((ve=ne.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),St=S==="left"||S==="right";if(Math.abs(Ae)>=(St?Se:Z)*u){Ci(),i==null||i(ie,!1);return}i==null||i(ie,!0),Es()}j.useEffect(()=>(R&&(Et(document.documentElement,{scrollBehavior:"auto"}),q.current=new Date),()=>{vre(document.documentElement,"scrollBehavior")}),[R]);function Ri(ie){const Ae=ie?(window.innerWidth-Ao)/window.innerWidth:1,Be=ie?-Ao:0;Oe.current&&window.clearTimeout(Oe.current),Et(ne.current,{transition:`transform ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`,transform:gt(S)?`scale(${Ae}) translate3d(0, ${Be}px, 0)`:`scale(${Ae}) translate3d(${Be}px, 0, 0)`}),!ie&&ne.current&&(Oe.current=setTimeout(()=>{const we=vd(ne.current,S);Et(ne.current,{transition:"none",transform:gt(S)?`translate3d(0, ${we}px, 0)`:`translate3d(${we}px, 0, 0)`})},500))}function xh(ie,Ae){if(Ae<0)return;const Be=(window.innerWidth-Ao)/window.innerWidth,we=Be+Ae*(1-Be),Ne=-Ao+Ae*Ao;Et(ne.current,{transform:gt(S)?`scale(${we}) translate3d(0, ${Ne}px, 0)`:`scale(${we}) translate3d(${Ne}px, 0, 0)`,transition:"none"})}function Ch(ie,Ae){const Be=gt(S)?window.innerHeight:window.innerWidth,we=Ae?(Be-Ao)/Be:1,Ne=Ae?-Ao:0;Ae&&Et(ne.current,{transition:`transform ${it.DURATION}s cubic-bezier(${it.EASE.join(",")})`,transform:gt(S)?`scale(${we}) translate3d(0, ${Ne}px, 0)`:`scale(${we}) translate3d(${Ne}px, 0, 0)`})}return j.useEffect(()=>{y||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[y]),j.createElement(MD,{defaultOpen:x,onOpenChange:ie=>{!c&&!ie||(ie?P(!0):Ci(!0),N(ie))},open:R},j.createElement(HD.Provider,{value:{activeSnapPoint:Bn,snapPoints:o,setActiveSnapPoint:ht,drawerRef:ne,overlayRef:V,onOpenChange:t,onPress:Eh,onRelease:vc,onDrag:Th,dismissible:c,shouldAnimate:ut,handleOnly:d,isOpen:R,isDragging:k,shouldFade:Ee,closeDrawer:Ci,onNestedDrag:xh,onNestedOpenChange:Ri,onNestedRelease:Ch,keyboardIsOpen:Ye,modal:y,snapPointsOffset:$e,activeSnapPointIndex:de,direction:S,shouldScaleBackground:s,setBackgroundColorOnScale:a,noBodyStyles:b,container:D,autoFocus:L}},n))}const JD=j.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:o,isOpen:s,modal:a,shouldAnimate:u}=mc(),l=VD(t,n),c=r&&r.length>0;if(!a)return null;const d=j.useCallback(f=>i(f),[i]);return j.createElement(Jw,{onMouseUp:d,ref:l,"data-vaul-overlay":"","data-vaul-snap-points":s&&c?"true":"false","data-vaul-snap-points-overlay":s&&o?"true":"false","data-vaul-animate":u!=null&&u.current?"true":"false",...e})});JD.displayName="Drawer.Overlay";const ZD=j.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){const{drawerRef:o,onPress:s,onRelease:a,onDrag:u,keyboardIsOpen:l,snapPointsOffset:c,activeSnapPointIndex:d,modal:f,isOpen:p,direction:h,snapPoints:m,container:y,handleOnly:g,shouldAnimate:v,autoFocus:b}=mc(),[S,x]=j.useState(!1),T=VD(i,o),_=j.useRef(null),C=j.useRef(null),I=j.useRef(!1),O=m&&m.length>0;xre();const D=(F,M,R=0)=>{if(I.current)return!0;const N=Math.abs(F.y),A=Math.abs(F.x),P=A>N,k=["bottom","right"].includes(M)?1:-1;if(M==="left"||M==="right"){if(!(F.x*k<0)&&A>=0&&A<=R)return P}else if(!(F.y*k<0)&&N>=0&&N<=R)return!P;return I.current=!0,!0};j.useEffect(()=>{O&&window.requestAnimationFrame(()=>{x(!0)})},[]);function L(F){_.current=null,I.current=!1,a(F)}return j.createElement(Zw,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":p&&O?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":v!=null&&v.current?"true":"false",...r,ref:T,style:c&&c.length>0?{"--snap-point-height":`${c[d??0]}px`,...t}:t,onPointerDown:F=>{g||(r.onPointerDown==null||r.onPointerDown.call(r,F),_.current={x:F.pageX,y:F.pageY},s(F))}
160,onOpenAutoFocus:F=>{n==null||n(F),b||F.preventDefault()},onPointerDownOutside:F=>{if(e==null||e(F),!f||F.defaultPrevented){F.preventDefault();return}l.current&&(l.current=!1)},onFocusOutside:F=>{if(!f){F.preventDefault();return}},onPointerMove:F=>{if(C.current=F,g||(r.onPointerMove==null||r.onPointerMove.call(r,F),!_.current))return;const M=F.pageY-_.current.y,R=F.pageX-_.current.x,N=F.pointerType==="touch"?10:2;D({x:R,y:M},h,N)?u(F):(Math.abs(R)>N||Math.abs(M)>N)&&(_.current=null)},onPointerUp:F=>{r.onPointerUp==null||r.onPointerUp.call(r,F),_.current=null,I.current=!1,a(F)},onPointerOut:F=>{r.onPointerOut==null||r.onPointerOut.call(r,F),L(C.current)},onContextMenu:F=>{r.onContextMenu==null||r.onContextMenu.call(r,F),C.current&&L(C.current)}})});ZD.displayName="Drawer.Content";const Rre=250,kre=120,Pre=j.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:i,isDragging:o,snapPoints:s,activeSnapPoint:a,setActiveSnapPoint:u,dismissible:l,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=mc(),h=j.useRef(null),m=j.useRef(!1);function y(){if(m.current){b();return}window.setTimeout(()=>{g()},kre)}function g(){if(o||e||m.current){b();return}if(b(),!s||s.length===0){l||i();return}if(a===s[s.length-1]&&l){i();return}const x=s.findIndex(_=>_===a);if(x===-1)return;const T=s[x+1];u(T)}function v(){h.current=window.setTimeout(()=>{m.current=!0},Rre)}function b(){h.current&&window.clearTimeout(h.current),m.current=!1}return j.createElement("div",{onClick:y,onPointerCancel:b,onPointerDown:S=>{c&&f(S),v()},onPointerMove:S=>{c&&p(S)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},j.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Pre.displayName="Drawer.Handle";function Are(e){const t=mc(),{container:n=t.container,...r}=e;return j.createElement(DD,{container:n,...r})}const xr={Root:Ire,Content:ZD,Overlay:JD,Trigger:ND,Portal:Are,Close:LD,Title:eS,Description:tS},eL=({shouldScaleBackground:e=!0,...t})=>E.jsx(xr.Root,{shouldScaleBackground:e,...t});eL.displayName="Drawer";const Ore=xr.Trigger,Mre=xr.Portal,Nre=xr.Close,tL=w.forwardRef(({className:e,...t},n)=>E.jsx(xr.Overlay,{ref:n,className:be("fixed inset-0 z-50 bg-black/80",e),...t}));tL.displayName=xr.Overlay.displayName;const nL=w.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(Mre,{children:[E.jsx(tL,{}),E.jsxs(xr.Content,{ref:r,className:be("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[E.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));nL.displayName="DrawerContent";const rL=({className:e,...t})=>E.jsx("div",{className:be("grid gap-1.5 p-4 text-center sm:text-left",e),...t});rL.displayName="DrawerHeader";const iL=w.forwardRef(({className:e,...t},n)=>E.jsx(xr.Title,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",e),...t}));iL.displayName=xr.Title.displayName;const Dre=w.forwardRef(({className:e,...t},n)=>E.jsx(xr.Description,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Dre.displayName=xr.Description.displayName;const Lre=({navigationItems:e})=>{const t=_r(),[n,r]=j.useState(!1),i=o=>t.pathname===o;return E.jsxs(eL,{open:n,onOpenChange:r,children:[E.jsx(Ore,{asChild:!0,children:E.jsx(lo,{variant:"ghost",size:"sm",className:"md:hidden p-2","aria-label":"Open navigation menu",children:E.jsx(DN,{className:"h-5 w-5"})})}),E.jsxs(nL,{className:"bg-background",children:[E.jsx(rL,{className:"text-left border-b",children:E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx(iL,{children:"Menu"}),E.jsx(Nre,{asChild:!0,children:E.jsx(lo,{variant:"ghost",size:"sm",className:"p-2",children:E.jsx(mh,{className:"h-5 w-5"})})})]})}),E.jsx("nav",{className:"flex flex-col p-4 space-y-2",children:e.map(o=>E.jsx(Av,{to:o.path,onClick:()=>r(!1),className:`text-base font-medium py-3 px-4 rounded-md transition-colors ${i(o.path)?"bg-primary/10 text-primary":"text-foreground/70 hover:bg-accent hover:text-foreground"}`,children:o.label},o.path))})]})]})};function Mt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Fre=typeof Symbol=="function"&&Symbol.observable||"@@observable",bC=Fre,ig=()=>Math.random().toString(36).substring(7).split("").join("."),jre={INIT:`@@redux/INIT${ig()}`,REPLACE:`@@redux/REPLACE${ig()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ig()}`},fp=jre;function iS(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oL(e,t,n){if(typeof e!="function")throw new Error(Mt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Mt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Mt(1));return n(oL)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,u=!1;function l(){s===o&&(s=new Map,o.forEach((y,g)=>{s.set(g,y)}))}function c(){if(u)throw new Error(Mt(3));return i}function d(y){if(typeof y!="function")throw new Error(Mt(4));if(u)throw new Error(Mt(5));let g=!0;l();const v=a++;return s.set(v,y),function(){if(g){if(u)throw new Error(Mt(6));g=!1,l(),s.delete(v),o=null}}}function f(y){if(!iS(y))throw new Error(Mt(7));if(typeof y.type>"u")throw new Error(Mt(8));if(typeof y.type!="string")throw new Error(Mt(17));if(u)throw new Error(Mt(9));try{u=!0,i=r(i,y)}finally{u=!1}
160return(o=s).forEach(v=>{v()}),y}function p(y){if(typeof y!="function")throw new Error(Mt(10));r=y,f({type:fp.REPLACE})}function h(){const y=d;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Mt(11));function v(){const S=g;S.next&&S.next(c())}return v(),{unsubscribe:y(v)}},[bC](){return this}}}return f({type:fp.INIT}),{dispatch:f,subscribe:d,getState:c,replaceReducer:p,[bC]:h}}function Ure(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:fp.INIT})>"u")throw new Error(Mt(12));if(typeof n(void 0,{type:fp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Mt(13))})}function $re(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{Ure(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let u=!1;const l={};for(let c=0;c<r.length;c++){const d=r[c],f=n[d],p=s[d],h=f(p,a);if(typeof h>"u")throw a&&a.type,new Error(Mt(14));l[d]=h,u=u||h!==p}return u=u||r.length!==Object.keys(s).length,u?l:s}}function pp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Bre(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Mt(15))};const s={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},a=e.map(u=>u(s));return o=pp(...a)(i.dispatch),{...i,dispatch:o}}}function zre(e){return iS(e)&&"type"in e&&typeof e.type=="string"}var sL=Symbol.for("immer-nothing"),wC=Symbol.for("immer-draftable"),Dn=Symbol.for("immer-state");function hr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Na=Object.getPrototypeOf;function cs(e){return!!e&&!!e[Dn]}function wi(e){var t;return e?aL(e)||Array.isArray(e)||!!e[wC]||!!((t=e.constructor)!=null&&t[wC])||bh(e)||wh(e):!1}var Hre=Object.prototype.constructor.toString();function aL(e){if(!e||typeof e!="object")return!1;const t=Na(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Hre}function hp(e,t){yh(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function yh(e){const t=e[Dn];return t?t.type_:Array.isArray(e)?1:bh(e)?2:wh(e)?3:0}function Ky(e,t){return yh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uL(e,t,n){const r=yh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Wre(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bh(e){return e instanceof Map}function wh(e){return e instanceof Set}function Do(e){return e.copy_||e.base_}function Yy(e,t){if(bh(e))return new Map(e);if(wh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=aL(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Dn];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Na(e),r)}else{const r=Na(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function oS(e,t=!1){return Sh(e)||cs(e)||!wi(e)||(yh(e)>1&&(e.set=e.add=e.clear=e.delete=qre),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>oS(r,!0))),e}function qre(){hr(2)}function Sh(e){return Object.isFrozen(e)}var Vre={};function ds(e){const t=Vre[e];return t||hr(0,e),t}var Ml;function lL(){return Ml}function Gre(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function SC(e,t){t&&(ds("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xy(e){Qy(e),e.drafts_.forEach(Kre),e.drafts_=null}function Qy(e){e===Ml&&(Ml=e.parent_)}function _C(e){return Ml=Gre(Ml,e)}function Kre(e){const t=e[Dn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function EC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Dn].modified_&&(Xy(t),hr(4)),wi(e)&&(e=mp(t,e),t.parent_||gp(t,e)),t.patches_&&ds("Patches").generateReplacementPatches_(n[Dn].base_,e,t.patches_,t.inversePatches_)):e=mp(t,n,[]),Xy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sL?e:void 0}function mp(e,t,n){if(Sh(t))return t;const r=t[Dn];if(!r)return hp(t,(i,o)=>TC(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return gp(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),hp(o,(a,u)=>TC(e,r,i,a,u,n,s)),gp(e,i,!1),n&&e.patches_&&ds("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}
160function TC(e,t,n,r,i,o,s){if(cs(i)){const a=o&&t&&t.type_!==3&&!Ky(t.assigned_,r)?o.concat(r):void 0,u=mp(e,i,a);if(uL(n,r,u),cs(u))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(wi(i)&&!Sh(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;mp(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&gp(e,i)}}function gp(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&oS(t,n)}function Yre(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:lL(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=sS;n&&(i=[r],o=Nl);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var sS={get(e,t){if(t===Dn)return e;const n=Do(e);if(!Ky(n,t))return Xre(e,n,t);const r=n[t];return e.finalized_||!wi(r)?r:r===og(e.base_,t)?(sg(e),e.copy_[t]=Zy(r,e)):r},has(e,t){return t in Do(e)},ownKeys(e){return Reflect.ownKeys(Do(e))},set(e,t,n){const r=cL(Do(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=og(Do(e),t),o=i==null?void 0:i[Dn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Wre(n,i)&&(n!==void 0||Ky(e.base_,t)))return!0;sg(e),Jy(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return og(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,sg(e),Jy(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Do(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){hr(11)},getPrototypeOf(e){return Na(e.base_)},setPrototypeOf(){hr(12)}},Nl={};hp(sS,(e,t)=>{Nl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Nl.deleteProperty=function(e,t){return Nl.set.call(this,e,t,void 0)};Nl.set=function(e,t,n){return sS.set.call(this,e[0],t,n,e[0])};function og(e,t){const n=e[Dn];return(n?Do(n):e)[t]}function Xre(e,t,n){var i;const r=cL(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function cL(e,t){if(!(t in e))return;let n=Na(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Na(n)}}function Jy(e){e.modified_||(e.modified_=!0,e.parent_&&Jy(e.parent_))}function sg(e){e.copy_||(e.copy_=Yy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Qre=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(u=o,...l){return s.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&hr(6),r!==void 0&&typeof r!="function"&&hr(7);let i;if(wi(t)){const o=_C(this),s=Zy(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Xy(o):Qy(o)}return SC(o,r),EC(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===sL&&(i=void 0),this.autoFreeze_&&oS(i,!0),r){const o=[],s=[];ds("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else hr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,u=>t(u,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){wi(e)||hr(8),cs(e)&&(e=Jre(e));const t=_C(this),n=Zy(e,void 0);return n[Dn].isManual_=!0,Qy(t),n}finishDraft(e,t){const n=e&&e[Dn];(!n||!n.isManual_)&&hr(9);const{scope_:r}=n;return SC(r,t),EC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=ds("Patches").applyPatches_;return cs(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Zy(e,t){const n=bh(e)?ds("MapSet").proxyMap_(e,t):wh(e)?ds("MapSet").proxySet_(e,t):Yre(e,t);return(t?t.scope_:lL()).drafts_.push(n),n}function Jre(e){return cs(e)||hr(10,e),dL(e)}function dL(e){if(!wi(e)||Sh(e))return e;const t=e[Dn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yy(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yy(e,!0);return hp(n,(r,i)=>{uL(n,r,dL(i))}),t&&(t.finalized_=!1),n}var Ln=new Qre,fL=Ln.produce;Ln.produceWithPatches.bind(Ln);Ln.setAutoFreeze.bind(Ln);Ln.setUseStrictShallowCopy.bind(Ln);Ln.applyPatches.bind(Ln);Ln.createDraft.bind(Ln);Ln.finishDraft.bind(Ln);function pL(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Zre=pL(),eie=pL,tie=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pp:pp.apply(null,arguments)},nie=e=>e&&typeof e.match=="function";function Ku(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(si(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>zre(r)&&r.type===e,n}var hL=class Cu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Cu.prototype)}static get[Symbol.species](){return Cu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Cu(...t[0].concat(this)):new Cu(...t.concat(this))}};function xC(e){return wi(e)?fL(e,()=>{}):e}function yd(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function rie(e){return typeof e=="boolean"}var iie=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new hL;return n&&(rie(n)?s.push(Zre):s.push(eie(n.extraArgument))),s},oie="RTK_autoBatch",CC=e=>t=>{setTimeout(t,e)},sie=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:CC(10):e.type==="callback"?e.queueNotification:CC(e.timeout),l=()=>{s=!1,o&&(o=!1,a.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const d=()=>i&&c(),f=r.subscribe(d);return a.add(c),()=>{f(),a.delete(c)}},dispatch(c){var d;try{return i=!((d=c==null?void 0:c.meta)!=null&&d[oie]),o=!i,o&&(s||(s=!0,u(l))),r.dispatch(c)}finally{i=!0}}})},aie=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new hL(e);return r&&i.push(sie(typeof r=="object"?r:void 0)),i};function uie(e){const t=iie(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(iS(n))a=$re(n);else throw new Error(si(1));let u;typeof r=="function"?u=r(t):u=t();let l=pp;i&&(l=tie({trace:!1,...typeof i=="object"&&i}));const c=Bre(...u),d=aie(c);let f=typeof s=="function"?s(d):d();const p=l(...f);return oL(a,o,p)}function mL(e){const t={},n=[];let r;
160const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(si(28));if(a in t)throw new Error(si(29));return t[a]=s,i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function lie(e){return typeof e=="function"}function cie(e,t){let[n,r,i]=mL(t),o;if(lie(e))o=()=>xC(e());else{const a=xC(e);o=()=>a}function s(a=o(),u){let l=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,d)=>{if(d)if(cs(c)){const p=d(c,u);return p===void 0?c:p}else{if(wi(c))return fL(c,f=>d(f,u));{const f=d(c,u);if(f===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return c},a)}return s.getInitialState=o,s}var die=(e,t)=>nie(e)?e.match(t):e(t);function fie(...e){return t=>e.some(n=>die(n,t))}var pie="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hie=(e=21)=>{let t="",n=e;for(;n--;)t+=pie[Math.random()*64|0];return t},mie=["name","message","stack","code"],ag=class{constructor(e,t){Xe(this,"_type");this.payload=e,this.meta=t}},IC=class{constructor(e,t){Xe(this,"_type");this.payload=e,this.meta=t}},gie=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of mie)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},RC="External signal was aborted",He=(()=>{function e(t,n,r){const i=Ku(t+"/fulfilled",(u,l,c,d)=>({payload:u,meta:{...d||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=Ku(t+"/pending",(u,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:u,requestStatus:"pending"}})),s=Ku(t+"/rejected",(u,l,c,d,f)=>({payload:d,error:(r&&r.serializeError||gie)(u||"Rejected"),meta:{...f||{},arg:c,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"}}));function a(u,{signal:l}={}){return(c,d,f)=>{const p=r!=null&&r.idGenerator?r.idGenerator(u):hie(),h=new AbortController;let m,y;function g(b){y=b,h.abort()}l&&(l.aborted?g(RC):l.addEventListener("abort",()=>g(RC),{once:!0}));const v=async function(){var x,T;let b;try{let _=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,u,{getState:d,extra:f});if(yie(_)&&(_=await _),_===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const C=new Promise((I,O)=>{m=()=>{O({name:"AbortError",message:y||"Aborted"})},h.signal.addEventListener("abort",m)});c(o(p,u,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:p,arg:u},{getState:d,extra:f}))),b=await Promise.race([C,Promise.resolve(n(u,{dispatch:c,getState:d,extra:f,requestId:p,signal:h.signal,abort:g,rejectWithValue:(I,O)=>new ag(I,O),fulfillWithValue:(I,O)=>new IC(I,O)})).then(I=>{if(I instanceof ag)throw I;return I instanceof IC?i(I.payload,p,u,I.meta):i(I,p,u)})])}catch(_){b=_ instanceof ag?s(null,p,u,_.payload,_.meta):s(_,p,u)}finally{m&&h.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&s.match(b)&&b.meta.condition||c(b),b}();return Object.assign(v,{abort:g,requestId:p,arg:u,unwrap(){return v.then(vie)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:fie(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function vie(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function yie(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var bie=Symbol.for("rtk-slice-createasyncthunk");function wie(e,t){return`${e}/${t}`}function Sie({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[bie];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(si(11));const a=(typeof i.reducers=="function"?i.reducers(Eie()):i.reducers)||{},u=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(S,x){const T=typeof S=="string"?S:S.type;if(!T)throw new Error(si(12));if(T in l.sliceCaseReducersByType)throw new Error(si(13));return l.sliceCaseReducersByType[T]=x,c},addMatcher(S,x){return l.sliceMatchers.push({matcher:S,reducer:x}),c},exposeAction(S,x){return l.actionCreators[S]=x,c},exposeCaseReducer(S,x){return l.sliceCaseReducersByName[S]=x,c}};u.forEach(S=>{const x=a[S],T={reducerName:S,type:wie(o,S),createNotation:typeof i.reducers=="function"};xie(x)?Iie(T,x,c,t):Tie(T,x,c)});function d(){const[S={},x=[],T=void 0]=typeof i.extraReducers=="function"?mL(i.extraReducers):[i.extraReducers],_={...S,...l.sliceCaseReducersByType};return cie(i.initialState,C=>{for(let I in _)C.addCase(I,_[I]);for(let I of l.sliceMatchers)C.addMatcher(I.matcher,I.reducer);for(let I of x)C.addMatcher(I.matcher,I.reducer);T&&C.addDefaultCase(T)})}const f=S=>S,p=new Map,h=new WeakMap;let m;function y(S,x){return m||(m=d()),m(S,x)}function g(){return m||(m=d()),m.getInitialState()}function v(S,x=!1){function T(C){let I=C[S];return typeof I>"u"&&x&&(I=yd(h,T,g)),I}function _(C=f){const I=yd(p,x,()=>new WeakMap);return yd(I,C,()=>{const O={};for(const[D,L]of Object.entries(i.selectors??{}))O[D]=_ie(L,C,()=>yd(h,C,g),x);return O})}return{reducerPath:S,getSelectors:_,get selectors(){return _(T)},selectSlice:T}}const b={name:o,reducer:y,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...v(s),injectInto(S,{reducerPath:x,...T}={}){const _=x??s;return S.inject({reducerPath:_,reducer:y},T),{...b,...v(_,!0)}}};return b}}function _ie(e,t,n,r){function i(o,...s){let a=t(o);return typeof a>
160"u"&&r&&(a=n()),e(a,...s)}return i.unwrapped=e,i}var Cr=Sie();function Eie(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Tie({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!Cie(r))throw new Error(si(17));o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Ku(e,s):Ku(e))}function xie(e){return e._reducerDefinitionType==="asyncThunk"}function Cie(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Iie({type:e,reducerName:t},n,r,i){if(!i)throw new Error(si(18));const{payloadCreator:o,fulfilled:s,pending:a,rejected:u,settled:l,options:c}=n,d=i(e,o,c);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s),a&&r.addCase(d.pending,a),u&&r.addCase(d.rejected,u),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:s||bd,pending:a||bd,rejected:u||bd,settled:l||bd})}function bd(){}function si(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}async function Rie(){var e;try{const t=await Ti.get("/getUserDetail");return(e=t==null?void 0:t.data)==null?void 0:e.body}catch(t){throw console.error("Error fetching user profile:",t),t}}let ug;const gL=()=>(ug||(ug=new PU({defaultOptions:{queries:{staleTime:5*60*1e3,cacheTime:10*60*1e3,retry:(e,t)=>(t==null?void 0:t.status)>=400&&(t==null?void 0:t.status)<500?!1:e<2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0,retryDelay:e=>Math.min(1e3*2**e,3e4)},mutations:{retry:!1}}})),ug),kie={user:null,status:"idle",error:null,token:null,isAuthenticated:!1,isLoading:!1},co="token",Xo="auth_user",aS=e=>{localStorage.setItem(co,e.token),localStorage.setItem(Xo,JSON.stringify(e))},vL=e=>{const t=localStorage.getItem(co),n={...e,token:e.token||t};localStorage.setItem(Xo,JSON.stringify(n)),e.token&&e.token!=="undefined"&&localStorage.setItem(co,e.token)},Pie=(e,t)=>!e||!t||t==="undefined"?(localStorage.removeItem(co),localStorage.removeItem(Xo),!1):!0,yL=He("user/initializeAuth",async(e,{rejectWithValue:t})=>{const n=localStorage.getItem(co),r=localStorage.getItem(Xo);if(!n||n==="undefined"||!r)return localStorage.removeItem(co),localStorage.removeItem(Xo),null;try{const i=JSON.parse(r);return Pie(i,n)?{user:i,token:n}:null}catch(i){return console.error("â Error parsing stored user data:",i),localStorage.removeItem(co),localStorage.removeItem(Xo),null}}),ef=He("user/login",async(e,{rejectWithValue:t})=>{var n;try{const r=await Ti.post("/login",e),i=(n=r==null?void 0:r.data)==null?void 0:n.body;if(!i||!i.token)throw new Error("Invalid credentials - no user or token returned");return aS(i),i}catch(r){return t(r instanceof Error?r.message:"Failed to login")}}),tf=He("user/googleLogin",async(e,{rejectWithValue:t})=>{var n;try{const r=await Ti.post("/auth/google",{credential:e}),i=(n=r==null?void 0:r.data)==null?void 0:n.body;if(!i||!i.token)throw new Error("Failed to login - no user or token returned");return aS(i),i}catch(r){return t(r instanceof Error?r.message:"Failed to login")}}),nf=He("user/signup",async(e,{rejectWithValue:t})=>{var n;try{const r=await Ti.post("/signup",e),i=(n=r==null?void 0:r.data)==null?void 0:n.body;if(!i||!i.token)throw new Error("Failed to signup - no user or token returned");return aS(i),i}catch(r){return t(r)}}),bL=He("user/logout",async(e,{rejectWithValue:t})=>{try{return localStorage.removeItem(co),localStorage.removeItem(Xo),gL().clear(),null}catch(n){return t(n instanceof Error?n.message:"Failed to logout")}}),rf=He("user/fetchUserProfile",async(e,{rejectWithValue:t})=>{try{const n=await Rie();if(!n)throw new Error("Failed to fetch user profile");return vL(n),n}catch(n){return t(n instanceof Error?n.message:"Failed to fetch user profile")}}),lg=He("user/updateUserProfile",async(e,{rejectWithValue:t})=>{var n;try{const r=await Ti.post("/userProfileUpdate",e),i=(n=r==null?void 0:r.data)==null?void 0:n.body;if(!i)throw new Error("Failed to update user profile");return vL(i),i}catch(r){return t(r instanceof Error?r.message:"Failed to update user profile")}}),wL=Cr({name:"user",initialState:kie,reducers:{setUser:(e,t)=>{e.user=t.payload},clearUser:e=>{e.user=null,e.status="idle",e.error=null,e.token=null,e.isAuthenticated=!1},setError:(e,t)=>
160{e.error=t.payload},clearError:e=>{e.error=null}},extraReducers:e=>{e.addCase(yL.fulfilled,(t,n)=>{var r,i;if(n.payload&&n.payload.user&&n.payload.token){t.user=n.payload.user,t.token=n.payload.token,t.isAuthenticated=!0;const o=n.payload.user,s=((r=o.user_id)==null?void 0:r.toString())||((i=o.id)==null?void 0:i.toString());s&&(hd(s),md({user_type:o.membership_tier?"paid":"free",membership_tier:o.membership_tier||"none",account_created_at:o.created_at||o.createdAt,signup_method:o.social_type||"email"}))}else console.log("â Auth initialization failed - no valid payload"),t.isAuthenticated=!1}).addCase(ef.pending,t=>{t.status="loading",t.isLoading=!0,t.error=null}).addCase(ef.fulfilled,(t,n)=>{var i,o,s,a;t.status="succeeded",t.error=null,t.user=n.payload,t.token=n.payload.token,t.isAuthenticated=!0,t.isLoading=!1,$c({id:((i=n.payload.user_id)==null?void 0:i.toString())||((o=n.payload.id)==null?void 0:o.toString()),email:n.payload.email,username:`${n.payload.firstname} ${n.payload.lastname}`});const r=((s=n.payload.user_id)==null?void 0:s.toString())||((a=n.payload.id)==null?void 0:a.toString());r&&(hd(r),md({user_type:n.payload.membership_tier?"paid":"free",membership_tier:n.payload.membership_tier||"none",signup_method:"email"}))}).addCase(ef.rejected,(t,n)=>{t.status="failed",t.error=n.payload,t.isLoading=!1,t.isAuthenticated=!1}).addCase(nf.pending,t=>{t.status="loading",t.isLoading=!0,t.error=null}).addCase(nf.fulfilled,(t,n)=>{var i,o,s,a;t.status="succeeded",t.error=null,t.user=n.payload,t.token=n.payload.token,t.isAuthenticated=!0,t.isLoading=!1,$c({id:((i=n.payload.user_id)==null?void 0:i.toString())||((o=n.payload.id)==null?void 0:o.toString()),email:n.payload.email,username:`${n.payload.firstname} ${n.payload.lastname}`});const r=((s=n.payload.user_id)==null?void 0:s.toString())||((a=n.payload.id)==null?void 0:a.toString());r&&(hd(r),md({user_type:"free",membership_tier:"none",signup_method:"email",account_created_at:new Date().toISOString()})),Aa.event({category:"User",action:"Signup",label:"Email Signup"})}).addCase(nf.rejected,(t,n)=>{t.status="failed",t.error=n.payload,t.isLoading=!1,t.isAuthenticated=!1}).addCase(tf.pending,t=>{t.status="loading",t.isLoading=!0,t.error=null}).addCase(tf.fulfilled,(t,n)=>{var i,o,s,a;t.status="succeeded",t.error=null,t.user=n.payload,t.token=n.payload.token,t.isAuthenticated=!0,t.isLoading=!1,$c({id:((i=n.payload.user_id)==null?void 0:i.toString())||((o=n.payload.id)==null?void 0:o.toString()),email:n.payload.email,username:`${n.payload.firstname} ${n.payload.lastname}`});const r=((s=n.payload.user_id)==null?void 0:s.toString())||((a=n.payload.id)==null?void 0:a.toString());r&&(hd(r),md({user_type:n.payload.membership_tier?"paid":"free",membership_tier:n.payload.membership_tier||"none",signup_method:"google"})),Aa.event({category:"User",action:"Signup",label:"Social Login"})}).addCase(tf.rejected,(t,n)=>{t.status="failed",t.error=n.payload,t.isLoading=!1,t.isAuthenticated=!1}).addCase(rf.pending,t=>{t.status="loading",t.error=null}).addCase(rf.fulfilled,(t,n)=>{t.status="succeeded",t.user=n.payload,t.error=null}).addCase(rf.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(lg.pending,t=>{t.status="loading",t.error=null}).addCase(lg.fulfilled,(t,n)=>{t.status="succeeded",t.user=n.payload,t.error=null}).addCase(lg.rejected,(t,n)=>{t.status="failed",t.error=n.payload}).addCase(bL.fulfilled,t=>{t.status="idle",t.error=null,t.user=null,t.token=null,t.isAuthenticated=!1,t.isLoading=!1,$c(null),nre()})}}),{setUser:Tae,clearUser:xae,setError:Cae,clearError:Iae}=wL.actions,Aie=wL.reducer,SL=()=>{const e=lU();return{auth:fU(a=>a.user),handleLogin:async a=>{try{return await e(ef(a)).unwrap()}catch(u){throw u}},handleGoogleLogin:async a=>{try{return await e(tf(a)).unwrap()}catch(u){throw u}},handleSignup:async a=>{a.role||(a.role=2);try{return await e(nf(a)).unwrap()}catch(u){throw u}},handleLogout:async()=>{await e(bL()).unwrap()},handleRefreshProfile:async()=>{try{return await e(rf()).unwrap()}catch(a){throw a}}}},Oie=1,Mie=1e6;let cg=0;function Nie(){return cg=(cg+1)%Number.MAX_SAFE_INTEGER,cg.toString()}const dg=new Map,bu=new Map,kC=5e3,PC=e=>{if(dg.has(e))return;const t=setTimeout(()=>{dg.delete(e),Yu({type:"REMOVE_TOAST",toastId:e})},Mie);dg.set(e,t)},Die=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Oie)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;
160return n?PC(n):e.toasts.forEach(r=>{PC(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},of=[];let sf={toasts:[]};function Yu(e){sf=Die(sf,e),of.forEach(t=>{t(sf)})}function Lie(e){const t=typeof e.title=="string"?e.title:"",n=typeof e.description=="string"?e.description:"";return`${t}-${n}-${e.variant||"default"}`}function Di({...e}){const t=Lie(e),n=Date.now(),r=bu.get(t);if(r&&n-r<kC)return console.log("ð« Toast deduplication: Skipping duplicate toast:",t),{id:"duplicate",dismiss:()=>{},update:()=>{}};if(bu.set(t,n),bu.size>50){const a=n-kC;for(const[u,l]of bu.entries())l<a&&bu.delete(u)}const i=Nie(),o=a=>Yu({type:"UPDATE_TOAST",toast:{...a,id:i}}),s=()=>Yu({type:"DISMISS_TOAST",toastId:i});return Yu({type:"ADD_TOAST",toast:{...e,id:i,open:!0,onOpenChange:a=>{a||s()}}}),{id:i,dismiss:s,update:o}}function Fie(){const[e,t]=w.useState(sf);return w.useEffect(()=>(of.push(t),()=>{const n=of.indexOf(t);n>-1&&of.splice(n,1)}),[e]),{...e,toast:Di,dismiss:n=>Yu({type:"DISMISS_TOAST",toastId:n})}}function un(e,t,n,r){try{if(typeof t=="object"||t===void 0){const o=e,s=t;if(qy(o,s),typeof window<"u"&&window.gtag)try{window.gtag("event",o,s)}catch{}if(Wr.KEYS.GA4_MEASUREMENT_ID)try{Aa.event({category:(s==null?void 0:s.event_category)||"general",action:o,label:s==null?void 0:s.event_label,value:s==null?void 0:s.value})}catch{}}else{const o=e,s=t;if(qy(s,{event_category:o,event_label:n,value:r}),Wr.KEYS.GA4_MEASUREMENT_ID)try{Aa.event({category:o,action:s,label:n,value:r})}catch{}if(typeof window<"u"&&window.gtag)try{window.gtag("event",s,{event_category:o,event_label:n,value:r})}catch{}}}catch{}}const Rae=()=>{un("survey_started",{event_category:"survey",event_label:"user_started_survey"})},kae=(e,t)=>{un("survey_step_completed",{event_category:"survey",step_number:e,step_name:t||`step_${e}`,event_label:`completed_step_${e}`})},Pae=e=>{un("survey_completed",{event_category:"survey",event_label:"user_completed_survey",destination_count:e})},Aae=(e,t)=>{un("trip_options_viewed",{event_category:"trip_planning",trip_detail_id:e,option_count:t,event_label:"user_viewed_trip_options"})},Oae=(e,t,n)=>{un("trip_option_selected",{event_category:"trip_planning",trip_detail_id:e,trip_option_id:t,destination:n,event_label:"user_selected_trip_option"})},Mae=(e,t,n)=>{un("membership_plan_selected",{event_category:"purchase",plan_type:e,price:t,credits:n,event_label:`selected_${e}`})},Nae=(e,t,n)=>{un("checkout_started",{event_category:"purchase",checkout_type:e,amount:t,product_name:n,event_label:`started_${e}_checkout`})},Dae=(e,t,n,r)=>{un("purchase_completed",{event_category:"purchase",purchase_type:e,amount:t,product_name:n,transaction_id:r,event_label:`completed_${e}_purchase`})},Lae=(e,t,n)=>{un("credits_used",{event_category:"credits",credits_used:e,credits_remaining:t,trip_name:n,event_label:"user_used_credits"})},Fae=(e,t,n)=>{un("promo_code_applied",{event_category:"purchase",promo_code:e,discount_amount:t,discount_percentage:n,event_label:`promo_${e}`})},jae=e=>{un("signup_started",{event_category:"authentication",signup_method:e,event_label:`signup_${e}`})},Uae=(e,t)=>{un("signup_completed",{event_category:"authentication",signup_method:e,user_id:t,event_label:`signup_success_${e}`})},$ae=(e,t)=>{un("login_completed",{event_category:"authentication",login_method:e,user_id:t,event_label:`login_success_${e}`})},Bae=(e,t,n)=>{un("trip_plan_viewed",{event_category:"trip_planning",trip_detail_id:e,trip_option_id:t,destination:n,event_label:"user_viewed_trip_plan"})},AC=(e,t,n,r)=>{un("error_occurred",{event_category:"error",error_type:e,error_message:t,context:n,severity:(r==null?void 0:r.severity)||"medium",error_category:r==null?void 0:r.category,status_code:r==null?void 0:r.statusCode,user_id:r==null?void 0:r.userId,page:(r==null?void 0:r.page)||window.location.pathname,is_retryable:r==null?void 0:r.isRetryable,recovery_attempted:r==null?void 0:r.recoveryAttempted,stack_trace:r==null?void 0:r.stackTrace,event_label:`error_${e}`})};class Xu{static async withRetry(t,n,r={maxRetries:3,baseDelay:1e3,maxDelay:1e4,backoffMultiplier:2}){let i;console.log(`ð NetworkResilience: Starting ${n} with retry (max ${r.maxRetries})`);for(let o=0;o<=r.maxRetries;o++)try{const s=await t();return o>0&&console.log(`â
NetworkResilience: ${n} succeeded on attempt ${o+1}`),s}catch(s){if(i=s,console.error(`â NetworkResilience: ${n} failed on attempt ${o+1}:`,s),o===r.maxRetries)break;const a=Math.min(r.baseDelay*Math.pow(r.backoffMultiplier||2,o),r.maxDelay||1e4);console.log(`â±ï¸ NetworkResilience: Retrying ${n} in ${a}ms...`),await this.delay(a)}throw console.error(`ð¨ NetworkResilience: ${n} failed after ${r.maxRetries+1} attempts`),AC("network_retry_exhausted",(i==null?void 0:i.message)||"Network operation failed after retries",n,{severity:"high",category:"network",
160isRetryable:!1,recoveryAttempted:!0,statusCode:i==null?void 0:i.status}),i}static async withCircuitBreaker(t,n){const r=this.getOrCreateCircuit(n);if(r.state==="open"){if(Date.now()-r.lastFailureTime<this.CIRCUIT_BREAKER_TIMEOUT)throw new Error(`Circuit breaker open for ${n}`);r.state="half-open",console.log(`ð NetworkResilience: Circuit ${n} half-opened for test`)}try{const i=await t();return r.state==="half-open"&&(r.state="closed",r.failures=0,console.log(`â
NetworkResilience: Circuit ${n} closed after successful test`)),i}catch(i){throw r.failures++,r.lastFailureTime=Date.now(),r.failures>=this.CIRCUIT_BREAKER_THRESHOLD&&(r.state="open",console.error(`ð¨ NetworkResilience: Circuit ${n} opened after ${r.failures} failures`),AC("circuit_breaker_opened",`Circuit breaker opened after ${r.failures} failures`,n,{severity:"critical",category:"network",isRetryable:!1})),i}}static async withResiliencePatterns(t,n,r={maxRetries:3,baseDelay:1e3}){return this.withCircuitBreaker(()=>this.withRetry(t,n,r),n)}static getOrCreateCircuit(t){return this.circuitBreakers.has(t)||this.circuitBreakers.set(t,{failures:0,lastFailureTime:0,state:"closed"}),this.circuitBreakers.get(t)}static delay(t){return new Promise(n=>setTimeout(n,t))}static getCircuitStatus(){return Array.from(this.circuitBreakers.entries()).map(([t,n])=>({id:t,state:{...n}}))}static resetCircuit(t){this.circuitBreakers.delete(t),console.log(`ð NetworkResilience: Circuit ${t} reset`)}static resetAllCircuits(){this.circuitBreakers.clear(),console.log("ð NetworkResilience: All circuits reset")}}Xe(Xu,"circuitBreakers",new Map),Xe(Xu,"CIRCUIT_BREAKER_THRESHOLD",5),Xe(Xu,"CIRCUIT_BREAKER_TIMEOUT",3e4);class ge{static async request(t,n={}){const r=localStorage.getItem("token");console.log("ApiClient: Request details",{endpoint:t,hasToken:!!r,tokenLength:(r==null?void 0:r.length)||0,tokenPreview:r?`${r.substring(0,10)}...`:"none"});const i=this.CIRCUIT_BREAKER_ENDPOINTS.some(u=>t.includes(u)),o=this.NO_RETRY_ENDPOINTS.some(u=>t.includes(u)),s=this.EXTENDED_TIMEOUT_ENDPOINTS.some(u=>t.includes(u)),a=async()=>{const u=new AbortController,l=s?this.EXTENDED_TIMEOUT:this.DEFAULT_TIMEOUT;console.log(`ð ApiClient: ${t} using ${s?"EXTENDED":"DEFAULT"} timeout: ${l}ms`);const c=setTimeout(()=>{u.abort(),console.warn(`Request to ${t} timed out after ${l}ms`)},l);try{const d={...n,signal:u.signal,headers:{...!(n.body instanceof FormData)&&{"Content-Type":"application/json"},Accept:"application/json",...r&&{Authorization:`Bearer ${r}`},...n.headers}},f=await fetch(`${this.baseUrl}${t}`,d);return clearTimeout(c),console.log(`API response from ${t}:`,{status:f.status,hasToken:!!r,endpoint:t}),f.ok||await this.handleHttpError(f,!1),{data:await f.json(),status:f.status}}catch(d){if(clearTimeout(c),d instanceof Error&&d.name==="AbortError"){const f=new Error(`Request timeout: ${t}`);throw f.status=408,f}throw console.error("API request error:",d),d}};try{return o?(console.log(`ð« ApiClient: Executing ${t} without retry`),await a()):i?await Xu.withResiliencePatterns(a,`api-request-${t}`,{maxRetries:2,baseDelay:1e3}):await Xu.withRetry(a,`api-request-${t}`,{maxRetries:3,baseDelay:1e3})}catch(u){throw(u==null?void 0:u.status)===401&&Zd(),console.error("API request failed after all retries:",u),this.handleApiError(u,t),u}}static async handleHttpError(t,n=!0){if(t.status===401)throw Zd(),new Error(`API request failed: ${t.status}`);let r;try{r=await t.json()}catch{r={}}if(console.error(`HTTP Error ${t.status}:`,r),!n){const o=new Error(`API request failed: ${t.status}`);throw o.status=t.status,o.details=r,o}switch(t.status){case 202:return;case 401:Zd();break;case 403:Di({title:"Access Denied",description:"You don't have permission to perform this action.",variant:"destructive"});break;case 404:this.CIRCUIT_BREAKER_ENDPOINTS.some(o=>t.url.includes(o))||Di({title:"Not Found",description:"The requested resource was not found.",variant:"destructive"});break;case 408:Di({title:"Request Timeout",description:"The request took too long. Please try again.",variant:"destructive"});break;case 429:Di({title:"Too Many Requests",description:"Please wait a moment before trying again.",variant:"destructive"});break;case 500:Di({title:"Server Error",description:"Something went wrong on our end. Please try again later.",variant:"destructive"});break;default:t.status!==400&&Di({title:"Error",description:r.message||`Request failed with status ${t.status}`,variant:"destructive"})}const i=new Error(`API request failed: ${t.status}`);throw i.status=t.status,i.details=r,i}static handleApiError(t,n){console.error(`API Error on ${n}:`,{message:t.message,status:t.status,stack:t.stack,details:t.details}
160),t.status||Di({title:"Connection Error",description:"Unable to connect to the server. Please check your internet connection.",variant:"destructive"})}static async get(t){return this.request(t,{method:"GET"})}static async post(t,n){const r={method:"POST"};return n instanceof FormData?r.body=n:n&&(r.body=JSON.stringify(n)),this.request(t,r)}static async put(t,n){return this.request(t,{method:"PUT",body:n?JSON.stringify(n):void 0})}static async delete(t,n){return this.request(t,{method:"DELETE",body:n?JSON.stringify(n):void 0})}static async downloadFile(t,n,r={}){const i=localStorage.getItem("token");console.log("ApiClient: Downloading file from",t,{hasToken:!!i,hasData:!!n});const o={method:"POST",...r,headers:{"Content-Type":"application/json",...i&&{Authorization:`Bearer ${i}`},...r.headers},body:n?JSON.stringify(n):void 0};try{const s=await fetch(`${this.baseUrl}${t}`,o);if(console.log("Download response:",{status:s.status,contentType:s.headers.get("Content-Type"),contentLength:s.headers.get("Content-Length")}),!s.ok){let u;try{u=await s.json()}catch{u={message:`Download failed with status ${s.status}`}}console.error("Download error:",u);const l=new Error(u.message||`Download failed: ${s.status}`);throw l.status=s.status,l.details=u,l}const a=await s.blob();return console.log("Download successful:",{blobSize:a.size,blobType:a.type}),{data:a,status:s.status,headers:s.headers}}catch(s){throw console.error("Download request error:",s),this.handleApiError(s,t),s}}}Xe(ge,"baseUrl",Wr.BASE_URL),Xe(ge,"DEFAULT_TIMEOUT",15e3),Xe(ge,"EXTENDED_TIMEOUT",12e4),Xe(ge,"CIRCUIT_BREAKER_ENDPOINTS",["/getSavedPlaces"]),Xe(ge,"NO_RETRY_ENDPOINTS",["/threeOptionPromptGen"]),Xe(ge,"EXTENDED_TIMEOUT_ENDPOINTS",["/threeOptionPromptGen","/getLodgingData"]);const jie=async e=>{console.log("getAllPdfData: Starting PDF download request",{tripDetailId:e});try{const t=`${Wr.ENDPOINTS.DOWNLOAD_PDF}?trip_detail_id=${encodeURIComponent(e)}`,n=await ge.downloadFile(t,void 0,{method:"GET"});return console.log("getAllPdfData: PDF download successful",{status:n.status,blobSize:n.data.size,blobType:n.data.type}),{data:n.data,status:n.status}}catch(t){throw console.error("getAllPdfData: PDF download failed",t),t}},Uie=async(e,t,n)=>{var r,i,o,s;console.log("downloadItineraryPdf: Starting download process",{tripDetailId:e,filename:n});try{const a=await jie(e);if(console.log("downloadItineraryPdf: Got PDF data",{status:a==null?void 0:a.status,hasData:!!(a!=null&&a.data),dataType:(i=(r=a==null?void 0:a.data)==null?void 0:r.constructor)==null?void 0:i.name}),(a==null?void 0:a.status)!==200)return console.error("downloadItineraryPdf: Invalid response status",a==null?void 0:a.status),!1;if(!(a!=null&&a.data)||!(a.data instanceof Blob))return console.error("downloadItineraryPdf: Invalid data type, expected Blob",{hasData:!!(a!=null&&a.data),dataType:(s=(o=a==null?void 0:a.data)==null?void 0:o.constructor)==null?void 0:s.name}),!1;console.log("downloadItineraryPdf: Creating download URL");const u=window.URL.createObjectURL(a.data),l=document.createElement("a");return l.href=u,l.download=n||`trip-itinerary-${e}.pdf`,document.body.appendChild(l),console.log("downloadItineraryPdf: Triggering download",{filename:l.download,url:u.substring(0,50)+"..."}),l.click(),l.remove(),window.URL.revokeObjectURL(u),console.log("downloadItineraryPdf: Download completed successfully"),!0}catch(a){return console.error("downloadItineraryPdf: Download failed",{error:a==null?void 0:a.message,status:a==null?void 0:a.status,details:a==null?void 0:a.details}),!1}};var $ie=e=>{switch(e){case"success":return Hie;case"info":return qie;case"warning":return Wie;case"error":return Vie;default:return null}},Bie=Array(12).fill(0),zie=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},Bie.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Hie=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Wie=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
160currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),qie=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Vie=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Gie=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Kie=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},e0=1,Yie=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:e0++,o=this.toasts.find(a=>a.id===i),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...e,id:i,title:n}),{...a,...e,id:i,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
160this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,s=r.then(async u=>{if(o=["resolve",u],j.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(Qie(u)&&!u.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(u):t.success,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(u):t.error,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),a=()=>new Promise((u,l)=>s.then(()=>o[0]==="reject"?l(o[1]):u(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||e0++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},fn=new Yie,Xie=(e,t)=>{let n=(t==null?void 0:t.id)||e0++;return fn.addToast({title:e,...t,id:n}),n},Qie=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Jie=Xie,Zie=()=>fn.toasts,eoe=()=>fn.getActiveToasts(),Rr=Object.assign(Jie,{success:fn.success,info:fn.info,warning:fn.warning,error:fn.error,custom:fn.custom,message:fn.message,promise:fn.promise,dismiss:fn.dismiss,loading:fn.loading},{getHistory:Zie,getToasts:eoe});function toe(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}toe(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
160left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
160:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
160--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 161`);function wd(e){return e.label!==void 0}var noe=3,roe="32px",ioe="16px",OC=4e3,ooe=356,soe=14,aoe=20,uoe=200;function sr(...e){return e.filter(Boolean).join(" ")}function loe(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var coe=e=>{var t,n,r,i,o,s,a,u,l,c,d;let{invert:f,toast:p,unstyled:h,interacting:m,setHeights:y,visibleToasts:g,heights:v,index:b,toasts:S,expanded:x,removeToast:T,defaultRichColors:_,closeButton:C,style:I,cancelButtonStyle:O,actionButtonStyle:D,className:L="",descriptionClassName:F="",duration:M,position:R,gap:N,loadingIcon:A,expandByDefault:P,classNames:k,icons:$,closeButtonAriaLabel:z="Close toast",pauseWhenPageIsHidden:H}=e,[V,q]=j.useState(null),[te,G]=j.useState(null),[J,Me]=j.useState(!1),[Oe,ze]=j.useState(!1),[Ye,ut]=j.useState(!1),[_n,ne]=j.useState(!1),[ln,rr]=j.useState(!1),[ir,$n]=j.useState(0),[Bn,de]=j.useState(0),ht=j.useRef(p.duration||M||OC),pe=j.useRef(null),$e=j.useRef(null),Ut=b===0,Ee=b+1<=g,kt=p.type,xi=p.dism
161issible!==!1,_s=p.className||"",Eh=p.descriptionClassName||"",ko=j.useMemo(()=>v.findIndex(Z=>Z.toastId===p.id)||0,[v,p.id]),Th=j.useMemo(()=>{var Z;return(Z=p.closeButton)!=null?Z:C},[p.closeButton,C]),Ci=j.useMemo(()=>p.duration||M||OC,[p.duration,M]),Es=j.useRef(0),Ii=j.useRef(0),vc=j.useRef(0),Ri=j.useRef(null),[xh,Ch]=R.split("-"),ie=j.useMemo(()=>v.reduce((Z,ve,Se)=>Se>=ko?Z:Z+ve.height,0),[v,ko]),Ae=Kie(),Be=p.invert||f,we=kt==="loading";Ii.current=j.useMemo(()=>ko*N+ie,[ko,ie]),j.useEffect(()=>{ht.current=Ci},[Ci]),j.useEffect(()=>{Me(!0)},[]),j.useEffect(()=>{let Z=$e.current;if(Z){let ve=Z.getBoundingClientRect().height;return de(ve),y(Se=>[{toastId:p.id,height:ve,position:p.position},...Se]),()=>y(Se=>Se.filter(St=>St.toastId!==p.id))}},[y,p.id]),j.useLayoutEffect(()=>{if(!J)return;let Z=$e.current,ve=Z.style.height;Z.style.height="auto";let Se=Z.getBoundingClientRect().height;Z.style.height=ve,de(Se),y(St=>St.find(mt=>mt.toastId===p.id)?St.map(mt=>mt.toastId===p.id?{...mt,height:Se}:mt):[{toastId:p.id,height:Se,position:p.position},...St])},[J,p.title,p.description,y,p.id]);let Ne=j.useCallback(()=>{ze(!0),$n(Ii.current),y(Z=>Z.filter(ve=>ve.toastId!==p.id)),setTimeout(()=>{T(p)},uoe)},[p,T,y,Ii]);j.useEffect(()=>{if(p.promise&&kt==="loading"||p.duration===1/0||p.type==="loading")return;let Z;return x||m||H&&Ae?(()=>{if(vc.current<Es.current){let ve=new Date().getTime()-Es.current;ht.current=ht.current-ve}vc.current=new Date().getTime()})():ht.current!==1/0&&(Es.current=new Date().getTime(),Z=setTimeout(()=>{var ve;(ve=p.onAutoClose)==null||ve.call(p,p),Ne()},ht.current)),()=>clearTimeout(Z)},[x,m,p,kt,H,Ae,Ne]),j.useEffect(()=>{p.delete&&Ne()},[Ne,p.delete]);function $t(){var Z,ve,Se;return $!=null&&$.loading?j.createElement("div",{className:sr(k==null?void 0:k.loader,(Z=p==null?void 0:p.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":kt==="loading"},$.loading):A?j.createElement("div",{className:sr(k==null?void 0:k.loader,(ve=p==null?void 0:p.classNames)==null?void 0:ve.loader,"sonner-loader"),"data-visible":kt==="loading"},A):j.createElement(zie,{className:sr(k==null?void 0:k.loader,(Se=p==null?void 0:p.classNames)==null?void 0:Se.loader),visible:kt==="loading"})}return j.createElement("li",{tabIndex:0,ref:$e,className:sr(L,_s,k==null?void 0:k.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[kt],(n=p==null?void 0:p.classNames)==null?void 0:n[kt]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:_,"data-styled":!(p.jsx||p.unstyled||h),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":ln,"data-removed":Oe,"data-visible":Ee,"data-y-position":xh,"data-x-position":Ch,"data-index":b,"data-front":Ut,"data-swiping":Ye,"data-dismissible":xi,"data-type":kt,"data-invert":Be,"data-swipe-out":_n,"data-swipe-direction":te,"data-expanded":!!(x||P&&J),style:{"--index":b,"--toasts-before":b,"--z-index":S.length-b,"--offset":`${Oe?ir:Ii.current}px`,"--initial-height":P?"auto":`${Bn}px`,...I,...p.style},onDragEnd:()=>{ut(!1),q(null),Ri.current=null},onPointerDown:Z=>{we||!xi||(pe.current=new Date,$n(Ii.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(ut(!0),Ri.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,ve,Se,St;if(_n||!xi)return;Ri.current=null;let mt=Number(((Z=$e.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_t=Number(((ve=$e.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),zn=new Date().getTime()-((Se=pe.current)==null?void 0:Se.getTime()),cn=V==="x"?mt:_t,ki=Math.abs(cn)/zn;if(Math.abs(cn)>=aoe||ki>.11){$n(Ii.current),(St=p.onDismiss)==null||St.call(p,p),G(V==="x"?mt>0?"right":"left":_t>0?"down":"up"),Ne(),ne(!0),rr(!1);return}ut(!1),q(null)},onPointerMove:Z=>{var ve,Se,St,mt;if(!Ri.current||!xi||((ve=window.getSelection())==null?void 0:ve.toString().length)>0)return;let _t=Z.clientY-Ri.current.y,zn=Z.clientX-Ri.current.x,cn=(Se=e.swipeDirections)!=null?Se:loe(R);!V&&(Math.abs(zn)>1||Math.abs(_t)>1)&&q(Math.abs(zn)>Math.abs(_t)?"x":"y");let ki={x:0,y:0};
161V==="y"?(cn.includes("top")||cn.includes("bottom"))&&(cn.includes("top")&&_t<0||cn.includes("bottom")&&_t>0)&&(ki.y=_t):V==="x"&&(cn.includes("left")||cn.includes("right"))&&(cn.includes("left")&&zn<0||cn.includes("right")&&zn>0)&&(ki.x=zn),(Math.abs(ki.x)>0||Math.abs(ki.y)>0)&&rr(!0),(St=$e.current)==null||St.style.setProperty("--swipe-amount-x",`${ki.x}px`),(mt=$e.current)==null||mt.style.setProperty("--swipe-amount-y",`${ki.y}px`)}},Th&&!p.jsx?j.createElement("button",{"aria-label":z,"data-disabled":we,"data-close-button":!0,onClick:we||!xi?()=>{}:()=>{var Z;Ne(),(Z=p.onDismiss)==null||Z.call(p,p)},className:sr(k==null?void 0:k.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},(o=$==null?void 0:$.close)!=null?o:Gie):null,p.jsx||w.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:j.createElement(j.Fragment,null,kt||p.icon||p.promise?j.createElement("div",{"data-icon":"",className:sr(k==null?void 0:k.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||$t():null,p.type!=="loading"?p.icon||($==null?void 0:$[kt])||$ie(kt):null):null,j.createElement("div",{"data-content":"",className:sr(k==null?void 0:k.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:sr(k==null?void 0:k.title,(u=p==null?void 0:p.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?j.createElement("div",{"data-description":"",className:sr(F,Eh,k==null?void 0:k.description,(l=p==null?void 0:p.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),w.isValidElement(p.cancel)?p.cancel:p.cancel&&wd(p.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||O,onClick:Z=>{var ve,Se;wd(p.cancel)&&xi&&((Se=(ve=p.cancel).onClick)==null||Se.call(ve,Z),Ne())},className:sr(k==null?void 0:k.cancelButton,(c=p==null?void 0:p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,w.isValidElement(p.action)?p.action:p.action&&wd(p.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||D,onClick:Z=>{var ve,Se;wd(p.action)&&((Se=(ve=p.action).onClick)==null||Se.call(ve,Z),!Z.defaultPrevented&&Ne())},className:sr(k==null?void 0:k.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function MC(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function doe(e,t){let n={};return[e,t].forEach((r,i)=>{let o=i===1,s=o?"--mobile-offset":"--offset",a=o?ioe:roe;function u(l){["top","right","bottom","left"].forEach(c=>{n[`${s}-${c}`]=typeof l=="number"?`${l}px`:l})}typeof r=="number"||typeof r=="string"?u(r):typeof r=="object"?["top","right","bottom","left"].forEach(l=>{r[l]===void 0?n[`${s}-${l}`]=a:n[`${s}-${l}`]=typeof r[l]=="number"?`${r[l]}px`:r[l]}):u(a)}),n}w.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:s,className:a,offset:u,mobileOffset:l,theme:c="light",richColors:d,duration:f,style:p,visibleToasts:h=noe,toastOptions:m,dir:y=MC(),gap:g=soe,loadingIcon:v,icons:b,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:x}=e,[T,_]=j.useState([]),C=j.useMemo(()=>Array.from(new Set([r].concat(T.filter(H=>H.position).map(H=>H.position)))),[T,r]),[I,O]=j.useState([]),[D,L]=j.useState(!1),[F,M]=j.useState(!1),[R,N]=j.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),A=j.useRef(null),P=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=j.useRef(null),$=j.useRef(!1),z=j.useCallback(H=>{_(V=>{var q;return(q=V.find(te=>te.id===H.id))!=null&&q.delete||fn.dismiss(H.id),V.filter(({id:te})=>te!==H.id)})},[]);return j.useEffect(()=>fn.subscribe(H=>{if(H.dismiss){_(V=>V.map(q=>q.id===H.id?{...q,delete:!0}:q));return}setTimeout(()=>{JR.flushSync(()=>{_(V=>{let q=V.findIndex(te=>te.id===H.id);return q!==-1?[...V.slice(0,q),{...V[q],...H},...V.slice(q+1)]:[H,...V]})})})}),[]),j.useEffect(()=>{if(c!=="system"){N(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?N("dark"):N("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:V})=>{N(V?"dark":"light")})}catch{H.addListener(({matches:q})=>{try{N(q?"dark":"light")}catch(te){console.error(te)}})}},[c]),j.useEffect(()=>{T.length<=1&&L(!1)},[T]),j.useEffect(()=>{let H=V=>{var q,te;i.every(G=>V[G]||V.code===G)&&(L(!0),(q=A.current)==null||q.focus()),V.code==="Escape"&&(document.activeElement===A.current||(te=A.current)!=null&&te.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[i]),j.useEffect(()=>{if(A.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,$.current=!1)}},[A.current]),j.createElement("section",{ref:t,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((H,V)=>{var q;let[te,G]=H.split("-");return T.length?j.createElement("ol",{key:H,dir:y==="auto"?MC():y,tabIndex:-1,ref:A,className:a,"data-sonner-toaster":!0,"data-theme":R,"data-y-position":te,"data-lifted":D&&T.length>1&&!o,"data-x-position":G,style:{"--front-toast-height":`${((q=I[0])==null?void 0:q.height)||0}px`,"--width":`${ooe}px`,"--gap":`${g}px`,...p,...doe(u,l)},onBlur:J=>{$.current&&!J.currentTarget.contains(J.relatedTarget)&&($.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||$.current||($.current=!0,k.current=J.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{F||L(!1)},onDragEnd:()=>L(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},T.filter(J=>!J.position&&V===0||J.position===H).map((J,Me)=>{var Oe,ze;return j.createElement(coe,{key:J.id,icons:b,index:Me,toast:J,defaultRichColors:d,duration:(Oe=m==null?void 0:m.duration)!=null?Oe:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:h,closeButton:(ze=m==null?void 0:m.closeButton)!=null?ze:s,interacting:F,position:H,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:z,toasts:T.filter(Ye=>Ye.position==J.position),heights:I.filter(Ye=>Ye.position==J.position),setHeights:O,expandByDefault:o,gap:g,loadingIcon:v,expanded:D,pauseWhenPageIsHidden:x,swipeDirections:e.swipeDirections})})):null}))});const foe=()=>{var x,T;const e=_r(),t=Np(),{auth:n,handleLogout:r}=SL(),i=e.pathname==="/survey",o=e.pathname==="/trip-options",s=e.pathname.startsWith("/trip-plan/"),a=e.pathname.startsWith("/trip-plan/shared/"),u=i||o||s,[l,c]=j.useState(!1),f=[{label:"How
161it Works",path:"/how-it-works"},{label:"About Us",path:"/about-us"},{label:"Travel Ideas",path:"/travel-ideas"}].filter(_=>n.isAuthenticated?!["How it Works","About Us","Travel Ideas"].includes(_.label):!0),p=_=>_.startsWith("/trip-plan/")?e.pathname.startsWith("/trip-plan/"):e.pathname===_,h=e.pathname.startsWith("/userprofile-"),m=()=>{n.isAuthenticated?h?(r(),t("/")):t("/userprofile-trips"):t("/login")},y=()=>{const _=e.pathname.split("/");return _[1]==="trip-plan"&&_.length>=4?{tripDetailId:_[2],tripOptionId:_[3]}:{tripDetailId:void 0,tripOptionId:void 0}},{tripDetailId:g,tripOptionId:v}=y(),b=async()=>{if(!g){Rr.error("Missing trip ID. Please reload the page.");return}const _=Rr.loading("Generating PDF...");try{const C=await Uie(g,v,`trip-itinerary-${g}.pdf`);Rr.dismiss(_),C?Rr.success("PDF downloaded successfully"):Rr.error("Failed to download PDF. Please try again.")}catch(C){Rr.dismiss(_),(C==null?void 0:C.status)===403?Rr.error("Access denied. Please check your subscription status."):(C==null?void 0:C.status)===404?Rr.error("Trip data not found. Please refresh and try again."):(C==null?void 0:C.status)>=500?Rr.error("Server error. Please try again later."):Rr.error("Failed to download PDF. Please try again.")}},S=_=>{e.pathname==="/"&&(_.preventDefault(),window.scrollTo({top:0,behavior:"smooth"}))};return E.jsxs("nav",{className:"bg-background border-b border-border px-4 sm:px-6 py-2 sm:py-3 sticky top-0 z-50",role:"navigation","aria-label":"Main navigation",children:[E.jsxs("div",{className:"max-w-7xl mx-auto flex justify-between items-center",children:[E.jsx(Av,{to:"/",className:"flex items-center gap-3","aria-label":"Go to homepage",onClick:S,children:E.jsx("img",{src:"/lovable-uploads/7a97f6c1-6d18-4feb-a8b9-8fd36ce11045.png",alt:"Picki Trips Logo",className:"h-5 sm:h-6 w-auto object-contain"})}),E.jsxs("div",{className:"flex items-center gap-2 sm:gap-4",children:[E.jsx(HN,{className:"border-none bg-transparent hidden md:flex",children:!u&&E.jsx(E.Fragment,{children:f.map(_=>E.jsx(Qte,{children:E.jsx(Av,{to:_.path,children:E.jsx(WN,{className:`text-foreground/70 hover:text-foreground font-medium transition-colors text-sm sm:text-base relative after:content-[''] after:absolute after:w-full after:scale-x-0 after:h-0.5 after:bottom-0 after:left-0 after:bg-foreground after:origin-bottom-right after:transition-transform after:duration-300 hover:after:scale-x-100 hover:after:origin-bottom-left ${p(_.path)?"text-foreground after:scale-x-100":""}`,"aria-current":p(_.path)?"page":void 0,children:_.label})})},_.path))})}),s&&!a&&E.jsxs(Cne,{children:[E.jsx(Ine,{asChild:!0,children:E.jsxs(lo,{variant:"outline",size:"sm",className:"flex items-center gap-2 bg-[#EEF2E3] text-[#0B5455] hover:bg-[#EEF2E3]/80 hover:text-[#0A3B3B] border-[#EEF2E3] shadow-sm","aria-label":"Trip actions menu",children:[E.jsx(DN,{className:"h-4 w-4",strokeWidth:2}),E.jsx("span",{className:"text-sm",children:"Actions"})]})}),E.jsxs(mD,{align:"end",className:"w-56 bg-white shadow-lg border border-gray-200 z-50",children:[E.jsxs(Ls,{className:"flex items-center space-x-3 p-3 hover:bg-gray-50 cursor-pointer",onClick:()=>c(!0),children:[E.jsx(yte,{className:"w-4 h-4 text-[#0B5455]"}),E.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Share"})]}),E.jsxs(Ls,{className:"flex items-center space-x-3 p-3 hover:bg-gray-50 cursor-pointer",children:[E.jsx(fte,{className:"w-4 h-4 text-[#0B5455]"}),E.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Add to Calendar"})]}),E.jsxs(Ls,{className:"flex items-center space-x-3 p-3 hover:bg-gray-50 cursor-pointer",children:[E.jsx(dte,{className:"w-4 h-4 text-[#0B5455]"}),E.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Order Booklet"})]}),E.jsxs(Ls,{className:"flex items-center space-x-3 p-3 hover:bg-gray-50 cursor-pointer",onClick:b,children:[E.jsx(pte,{className:"w-4 h-4 text-[#0B5455]"}),E.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Download"})]}),E.jsxs(Ls,{className:"flex items-center space-x-3 p-3 hover:bg-gray-50 cursor-pointer",children:[E.jsx(cC,{className:"w-4 h-4 text-[#0B5455]"}),E.jsx("span",{className:"text-sm font-medium text-gray-700",children:"My A
161ccount"})]})]})]}),!s&&E.jsx(lo,{onClick:m,variant:"outline",size:"sm",className:"flex items-center gap-2",disabled:n.isLoading,children:n.isLoading?E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),E.jsx("span",{className:"hidden sm:inline",children:"Loading..."})]}):n.isAuthenticated?E.jsxs(E.Fragment,{children:[(x=n.user)!=null&&x.image?E.jsx("img",{src:n.user.image,alt:"Profile",className:"h-4 w-4 rounded object-cover"}):E.jsx(cC,{className:"h-4 w-4"}),E.jsx("span",{className:"text-sm sm:text-base",children:h?"Log Out":`Welcome, ${((T=n.user)==null?void 0:T.firstname)||"User"}`}),h&&E.jsx(mte,{className:"h-4 w-4"})]}):E.jsxs(E.Fragment,{children:[E.jsx(hte,{className:"h-4 w-4"}),E.jsx("span",{className:"text-sm sm:text-base",children:"Sign In"})]})}),!u&&f.length>0&&E.jsx(Lre,{navigationItems:f})]})]}),E.jsx(rre,{open:l,onOpenChange:c,tripDetailId:g,tripOptionId:v})]})},NC=["/","/survey","/travel-ideas","/products-pricing","/how-it-works","/about-us","/mystery-escape","/shared-itinerary","/explore","/reset-password","/login"],poe=["/login"],hoe=()=>{var n;const e=_r(),{auth:t}=SL();return w.useMemo(()=>{var a,u;const r=e.pathname,i=NC.some(l=>l==="/shared-itinerary"?r.startsWith("/shared-itinerary/"):l==="/explore"?r.startsWith("/explore"):r===l),o=poe.some(l=>r===l),s=!i;if(i)return{isPublic:!0,isAuthRoute:!1,isProtected:!1,requiresAuth:!1,shouldRedirect:!1,redirectTo:null};if(o&&!t.isAuthenticated)return{isPublic:!1,isAuthRoute:!0,isProtected:!1,requiresAuth:!1,shouldRedirect:!1,redirectTo:null};if(o&&t.isAuthenticated&&((a=e.state)!=null&&a.from)){const l=e.state.from;if(!NC.some(d=>l.startsWith(d)))return{isPublic:!1,isAuthRoute:!0,isProtected:!1,requiresAuth:!1,shouldRedirect:!0,redirectTo:l}}return o&&t.isAuthenticated&&!((u=e.state)!=null&&u.from)?{isPublic:!1,isAuthRoute:!0,isProtected:!1,requiresAuth:!1,shouldRedirect:!0,redirectTo:"/userprofile-trips"}:s&&!t.isAuthenticated?{isPublic:!1,isAuthRoute:!1,isProtected:!0,requiresAuth:!0,shouldRedirect:!0,redirectTo:"/login"}:{isPublic:!1,isAuthRoute:o,isProtected:s,requiresAuth:!1,shouldRedirect:!1,redirectTo:null}},[e.pathname,(n=e.state)==null?void 0:n.from,t.isAuthenticated,t.isLoading])},moe=()=>{const e=Np(),t=_r(),{shouldRedirect:n,redirectTo:r}=hoe();return w.useEffect(()=>{if(n&&r){const i=r==="/login"?{from:t.pathname}:void 0;e(r,{replace:!0,state:i})}},[n,r,e,t.pathname]),null},goe=({message:e="Loading..."})=>E.jsx("div",{className:"min-h-[400px] flex items-center justify-center",role:"status","aria-live":"polite",children:E.jsxs("div",{className:"flex flex-col items-center gap-4",children:[E.jsxs("div",{className:"relative w-12 h-12",children:[E.jsx("div",{className:"absolute inset-0 rounded-full border-4 border-brand-oasis"}),E.jsx("div",{className:"absolute inset-0 rounded-full border-4 border-brand-lagoon border-t-transparent animate-spin"})]}),E.jsx("p",{className:"text-sm text-muted-foreground font-basic-sans",children:e})]})}),voe=()=>{const e=_r();w.useEffect(()=>{window.scrollTo({top:0,behavior:"instant"})},[e.pathname])},zae=(e="smooth")=>{window.scrollTo({top:0,behavior:e})},yoe=()=>(voe(),null),t0="picki_cookie_consent";function _L(){try{return localStorage.getItem(t0)}catch{return null}}function boe(){return _L()==="accepted"}function woe(){window.dispatchEvent(new CustomEvent("picki-reopen-cookie-consent"))}const EL=()=>{const[e,t]=w.useState(!1);w.useEffect(()=>{if(!_L()){const i=setTimeout(()=>t(!0),1500);return()=>clearTimeout(i)}},[]),w.useEffect(()=>{const i=()=>t(!0);return window.addEventListener("picki-reopen-cookie-consent",i),()=>window.removeEventListener("picki-reopen-cookie-consent",i)},[]);const n=()=>{localStorage.setItem(t0,"accepted"),t(!1)},r=()=>{localStorage.setItem(t0,"declined"),t(!1)};return e?E.jsx("div",{role:"dialog","aria-label":"Cookie consent",className:"fixed bottom-0 left-0 right-0 z-50 p-4 md:p-6",children:E.jsxs("div",{className:"max-w-xl mx-auto bg-white rounded-2xl shadow-lg border border-sand p-5 md:p-6 flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[E.jsxs("p",{className:"text-sm text-charcoal leading-relaxed flex-1",children:['We use cookies to improve your experience and for marketing. By clicking "Accept" you consent to our use of cookies.'," ",E.jsx("a",{href:"/privacy",className:"text-lagoon underline hover:text-deep-ocean",children:"Privacy Policy"})]}),E.jsxs("div",{className:"flex gap-3 shrink-0",children:[E.jsx("button",{onClick:r,className:"px-4 py-2 text-sm font-medium rounded-xl border border-sand text-charcoal hover:bg-sand transition-colors",children:"Decline"}),E.jsx("button",{onClick:n,className:"px-4 py-2 text-sm font-medium rounded-xl bg-lagoon text-white hover:bg-deep-ocean transition-colors",children:"Accept"})]})]})}):null},Hae=Object.freeze(Object.defineProperty({__proto__:null,default:EL,hasConsent:boe,reopenCookieConsent:woe},Symbol.toStringTag,{value:"Module"})),Soe=w.lazy(()=>Le(()=>import("./Home-BWiUjInJ.js"),__vite__mapDeps([0,1,2,3,4,5]))),_oe=w.lazy(()=>Le(()=>import("./Survey-DTSXyehH.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,2,25,3,26,27,28,29,30,31,32,33,5]))),Sd=w.lazy(()=>Le(()=>import("./MyAccount-fP1cNLvb.js"),__vite__mapDeps([34,35,10,11,12,36,9,37,29,38,39,17,40,20,41,27,28,15,18,42,43,8,44,45,14,16,46,47,48,49,50,24,51,52,2,22,13,53,54,19,55,56,57,58,59,60,25,61,62,63,64,4,3,65,66,67]))),Eoe=w.lazy(()=>Le(()=>import("./Login-B3bWkUMa.js"),__vite__mapDeps([68,35,10,11,12,69,16,32,70,43,52,64,33,5]))),Toe=w.lazy(()=>Le(()=>import("./ResetPassword-BgMt7j4P.js"),__vite__mapDeps([71,16,17,70,55,2,33,52]))),xoe=w.lazy(()=>Le(()=>import("./MyTrip-Ck4O4X9A.js"),__vite__mapDeps([72,35,10,11,12,69,16,32,70,43,52,64,33]))),Coe=w.lazy(()=>Le(()=>import("./TravelIdeas-Dn_jFk3J.js"),__vite__mapDeps([73,35,10,11,12,5]))),fg=w.lazy(()=>Le(()=>import("./TripOptions-C1zDQO2o.js"),__vite__mapDeps([74,75,44,9,45,14,15,17,16,46,47,28,12,48,49,8,42,50,24,51,52,2,22,76,23,25,3,26,39,20,77,58,78,10,11,63,67,21,41,79,55,13,60,1]))),pg=w.lazy(()=>Le(()=>import("./Purchase-Bcknw8Mt.js"),__vite__mapDeps([80,75,44,9,45,14,15,17,16,46,47,28,12,48,49,8,42,50,24,51,52,2,22,76,23,25,3,26,20,4,56,41,10,11,58,81,60,82,59,55]))),Ioe=w.lazy(()=>Le(()=>
161import("./ProductsPricing-DvmdgZXd.js"),__vite__mapDeps([83,84,85,77,60,30,86,4,35,10,11,12,5]))),Roe=w.lazy(()=>Le(()=>import("./Explore-CySt6eDQ.js"),__vite__mapDeps([87,88,36,9,89,90,16,29,42,91,92,20,93,3,17,11,48,12,79,62,63,64,4,94,95,21,96,61,78,41,40,67,52,25,38,97]))),koe=w.lazy(()=>Le(()=>import("./ItineraryPage-Bytcgpj9.js"),__vite__mapDeps([98,99,16,46,42,20,21,100,43,41,65,95,53,90,9,29,13,8,25,101,45,92,93,3,102,57,47,28,15,12,48,89,103,17,104,10,11,96,85,88,36,91]))),Poe=w.lazy(()=>Le(()=>import("./TravelTools-DWq0Tk6_.js"),__vite__mapDeps([105,56,54,17,21,93,50,51,19,15,57,24,48,12,62,63,64,4,47,28,13,16,77,1,88,36,9,89,90,29,42,91,106,45,107]))),DC=w.lazy(()=>Le(()=>import("./TripPlanOverview-DTBD_XD8.js"),__vite__mapDeps([108,89,90,9,92,20,93,3,109,88,36,16,29,42,85,37,57,55,58,21,12,95,61,110,65,106,45,94]))),Aoe=w.lazy(()=>Le(()=>import("./HowItWorks-bl7PE-ZZ.js"),__vite__mapDeps([111,35,10,11,12,17,20,42,66,30,38,58,76,61,86,4,5]))),Ooe=w.lazy(()=>Le(()=>import("./AboutUs-DOsQudXW.js"),__vite__mapDeps([112,35,10,11,12,84,13,16,82,3,5]))),Moe=w.lazy(()=>Le(()=>import("./Privacy-BeNz-4VD.js"),__vite__mapDeps([113,35,10,11,12,5]))),Noe=w.lazy(()=>Le(()=>import("./TermsOfService-DzyrG4kx.js"),__vite__mapDeps([114,35,10,11,12,5]))),Doe=w.lazy(()=>Le(()=>import("./MysteryEscape-BRwo4-4p.js"),__vite__mapDeps([115,35,10,11,12,5]))),Loe=w.lazy(()=>Le(()=>import("./TravelExpertCollective-B_6Jls_m.js"),__vite__mapDeps([116,35,10,11,12,84,5]))),Foe=w.lazy(()=>Le(()=>import("./Concierge-DyjHLNTe.js"),__vite__mapDeps([117,18,17,93,30,110,14,15,16,13,100,82,43,89,90,9,29,12,79,25,88,36,42,91]))),joe=w.lazy(()=>Le(()=>import("./TripPlanLayout-Cjwc0dzN.js"),__vite__mapDeps([118,89,90,9,24,29,102,106,45,2,25,51,26,92,20,93,3]))),Uoe=w.lazy(()=>Le(()=>import("./SharedTripPlanLayout-DLcTVXFg.js"),__vite__mapDeps([101,45,9,92,20,93,3,102]))),LC=w.lazy(()=>Le(()=>import("./Overview-B4CyuD1h.js"),__vite__mapDeps([119,88,36,9,89,90,16,29,42,109,95,21,93,101,45,92,20,3,102,12,120]))),$oe=w.lazy(()=>Le(()=>import("./Itinerary-CJ6n5kjf.js"),__vite__mapDeps([121,88,36,9,89,90,16,29,42,99,46,20,21,100,43,41,65,95,53,13,8,25,101,45,92,93,3,102,57,47,28,15,12,48,103,17,104])));function Boe(){return E.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[E.jsx(yoe,{}),E.jsx(foe,{}),E.jsxs("main",{children:[E.jsx(moe,{}),E.jsx(w.Suspense,{fallback:E.jsx(goe,{}),children:E.jsxs(kj,{children:[E.jsx(_e,{path:"/",element:E.jsx(Soe,{})}),E.jsx(_e,{path:"/survey",element:E.jsx(_oe,{})}),E.jsx(_e,{path:"/login",element:E.jsx(Eoe,{})}),E.jsx(_e,{path:"/reset-password",element:E.jsx(Toe,{})}),E.jsx(_e,{path:"/userprofile-account",element:E.jsx(Sd,{})}),E.jsx(_e,{path:"/userprofile-trips",element:E.jsx(Sd,{})}),E.jsx(_e,{path:"/userprofile-history",element:E.jsx(Sd,{})}),E.jsx(_e,{path:"/userprofile-preferences",element:E.jsx(Sd,{})}),E.jsx(_e,{path:"/my-trip",element:E.jsx(xoe,{})}),E.jsx(_e,{path:"/travel-ideas",element:E.jsx(Coe,{})}),E.jsx(_e,{path:"/trip-options",element:E.jsx(fg,{})}),E.jsx(_e,{path:"/trip-options/:tripDetailId",element:E.jsx(fg,{})}),E.jsx(_e,{path:"/trip-options/:tripDetailId/:tripOptionId",element:E.jsx(fg,{})}),E.jsx(_e,{path:"/trip-options/:tripDetailId/:tripOptionId/purchase",element:E.jsx(pg,{})}),E.jsx(_e,{path:"/purchase",element:E.jsx(pg,{})}),E.jsx(_e,{path:"/memberships/purchase",element:E.jsx(pg,{})}),E.jsx(_e,{path:"/products-pricing",element:E.jsx(Ioe,{})}),E.jsx(_e,{path:"/mystery-escape",element:E.jsx(Doe,{})}),E.jsxs(_e,{path:"/trip-plan/:tripPlanId/:tripDetailId",element:E.jsx(joe,{}),children:[E.jsx(_e,{index:!0,element:E.jsx(DC,{})}),E.jsx(_e,{path:"overview",element:E.jsx(DC,{})}),E.jsx(_e,{path:"itinerary",element:E.jsx(koe,{})}),E.jsx(_e,{path:"explore",element:E.jsx(Roe,{})}),E.jsx(_e,{path:"travel-tools",element:E.jsx(Poe,{})}),E.jsx(_e,{path:"concierge",element:E.jsx(Foe,{})})]}),E.jsxs(_e,{path:"/trip-plan/shared/:token",element:E.jsx(Uoe,{}),children:[E.jsx(_e,{index:!0,element:E.jsx(LC,{})}),E.jsx(_e,{path:"overview",element:E.jsx(LC,{})}),E.jsx(_e,{path:"itinerary",element:E.jsx($oe,{})})]}),E.jsx(_e,{path:"/how-it-works",element:E.jsx(Aoe,{})}),E.jsx(_e,{path:"/about-us",element:E.jsx(Ooe,{})}),E.jsx(_e,{path:"/privacy",element:E.jsx(Moe,{})}),E.jsx(_e,{path:"/terms-of-service",element:E.jsx(Noe,{})}),E.jsx(_e,{path:"/travel-expert-collective",element:E.jsx(Loe,{})})]})})]}),E.jsx(EL,{})]})}const zoe={purpose:[],event:[],selected_passenger:[],desired_destination:"",departure:"",additional_detail:"",total_night_to_stay:"",interested_months_traveling:[],beginning_travel_date:"",end_travel_date:"",interested_regi
161ons:[],interested_destination:[],what_would_like_to_see:[],min_budget:"",max_budget:"",what_indulgences_do_you_spend_extra:[],what_type_of_accommodation:[],specific_brand_preference:"",what_amenities_are_most_important_to_you:[],have_dietary_restrictions:"",know_regarding_your_trip:"",best_places_visited:[],other_places_visited:[],dream_destination_to_visited:[]},TL=Cr({name:"trip",initialState:zoe,reducers:{setTripData:(e,t)=>{Object.assign(e,t.payload)},updateTripField:(e,t)=>{e[t.payload.field]=t.payload.value}}}),{setTripData:Wae,updateTripField:qae}=TL.actions,Hoe=TL.reducer,Woe={main_data:{}},xL=Cr({name:"gemini",initialState:Woe,reducers:{setGeminiData:(e,t)=>{Object.assign(e,t.payload)}}}),{setGeminiData:Vae}=xL.actions,qoe=xL.reducer,Voe={token:""},CL=Cr({name:"logout",initialState:Voe,reducers:{setLogoutData:(e,t)=>{e.token=t.payload}}}),{setLogoutData:Gae}=CL.actions,Goe=CL.reducer,Koe={locationDetails:[],locationDetailsMain:[]},IL=Cr({name:"location",initialState:Koe,reducers:{setLocationDetails:(e,t)=>{e.locationDetails=t.payload},setLocationDetailsMain:(e,t)=>{e.locationDetailsMain=t.payload}}}),{setLocationDetails:Kae,setLocationDetailsMain:Yae}=IL.actions,Yoe=IL.reducer,RL={trips:[],bookings:[],selectedTrip:null,selectedBooking:null,geocodedActions:{},currentTripPlan:null,status:"idle",error:null},Xoe=e=>{e.error=null},Qoe=()=>RL,Joe=(e,t)=>{if(t.payload===null){e.selectedTrip=null;return}const n=parseInt(t.payload,10),r=e.trips.find(s=>s.id===n);if(!r)return;const i=e.bookings.find(s=>s.trip_detail_id===n);if(!i)return;const o=r.trip_options.find(s=>s.id===(i==null?void 0:i.trip_option_id));o&&(e.selectedTrip={trip:r||null,booking:i||null,option:o||null,itinerary:null,selectedDay:null,selectedSection:"itinerary",orderedActions:[]})},Zoe=(e,t)=>{e.selectedBooking=t.payload},ese=(e,t)=>{var i;if(t.payload===null||!((i=e.selectedTrip)!=null&&i.itinerary))return;const n=t.payload,r=e.selectedTrip.itinerary.trip_schedule.find(o=>o.id===n)||null;e.selectedTrip&&(e.selectedTrip.selectedDay=r)},tse=(e,t)=>{e.selectedTrip&&(e.selectedTrip.selectedSection=t.payload)},Xae=e=>ge.post("/fileupload",e),Qae=e=>ge.post("/userProfileUpdate",e),Jae=e=>ge.post("/deletePassenger",{id:e}),Zae=e=>ge.post("/changePassword",e),eue=e=>ge.post("/addCard",e),tue=e=>ge.post("/updateCard",e),nue=e=>ge.post("/cardRemove",{cardId:e}),rue=()=>ge.get("/cardList"),nse=()=>ge.get("/getUserItinerary"),iue=()=>ge.get("/purchase-options"),oue=(e,t)=>ge.post(`/memberships/credit-packs/${e}/purchase`,t),sue=async(e,t)=>await Ti.post(`/memberships/plan/${e}/purchase`,t),aue=e=>ge.post("/membership/credits",e),uue=async e=>Ti.post("/memberships/use-credit",e),lue=async e=>await ge.post("/membership/confirm",e),cue=async e=>await Ti.post("/single-trip/purchase",e),due=async e=>await ge.post("/single-trip/confirm",e),rse=async e=>ge.post("/getViatorActivities",e),ise=e=>ge.post("/getLocalTipsData",e),ose=e=>ge.post("/getExploreData",e),sse=e=>ge.post("/getLodgingData",e),ase=e=>ge.post("/getDiningData",e),kL=e=>ge.post("/scheduleItinerarySavedData",e),use=e=>ge.post("/getScheduleItineraryData",e),lse=e=>ge.post("/editItineraryDayTitleData",e),cse=e=>ge.post("/getTravelData",e),dse=e=>ge.post("/deleteInnerItineraryDayData",e),fse=e=>ge.post("/editItineraryTitleData",e),pse=e=>ge.post("/editNotes",e),hse=e=>ge.post("/updateActionDirections",e),mse=e=>ge.post("/addActionDirections",e),PL=e=>ge.get(`/reservations?trip_id=${e}`),gse=e=>ge.post("/reservations",e),vse=e=>ge.post("/reservations/delete",{id:e}),hg=He("userTrips/fetchTrips",async(e,{rejectWithValue:t})=>{var n,r,i;try{const o=await nse();if(!((n=o==null?void 0:o.data)!=null&&n.body))throw new Error("Response data is missing");return o.data.body}catch(o){return t(((i=(r=o.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to fetch user trips")}}),mg=He("userTrips/fetchTripItinerary",async(e,{getState:t,rejectWithValue:n})=>{var r,i,o;try{const s=t(),{selectedTrip:a}=s.userTrips;if(!a||!a.trip||!a.booking)throw new Error("No selected trip or booking found");const u=a.trip.id.toString(),l=a.booking.trip_option_id,c=await use({trip_detail_id:u,trip_option_id:l});if(!((r=c==null?void 0:c.data)!=null&&r.body))throw new Error("Response data is missing");return c.data.body}catch(s){return n(((o=(i=s.response)==null?void 0:i.data)==null?void 0:o.message)||"Failed to fetch trip itinerary")}}),gg=He("userTrips/saveDayTitle",async(e,{getState:t,rejectWithValue:n})=>{var r,i,o,s,a;try{const u=t(),{selectedTrip:l}=u.userTrips;if(!((r=l==null?void 0:l.itinerary)!=null&&r.id)||!((i=l==null?void 0:l.selectedDay)!=null&&i.id))throw new Error("Missing required data for saving day title");const c={schedule_data_id:l.itinerary.id,id:l.selectedDay.id,trip_day_title:e.newTitle,trip_day_date:e.newDate},d=await lse(c);if(!((o=d==null?void 0:d.data)!=null&&o.body))throw new Error("Response data is missing");return d.data.body}catch(u){return n(((a=(s=u.response)==null?void 0:s.data)==null?void 0:a.error)||"Failed to save day title")}}),vg=He("userTrips/saveTripTitle",async(e,{getState:t,rejectWithValue:n})=>{var r,i,o,s,a;try{const u=t(),{selectedTrip:l}=u.userTrips;if(!((r=l==null?void 0:l.trip)!=null&&r.id)||!((i=l==null?void 0:l.option)!=null&&i.id))throw new Error("Missing required data for saving trip title");const c={trip_id:l.trip.id,trip_option_id:l.option.id,trip_name:e.newTitle,de
161scription_data:e.newDescription,destination:e.newLocation},d=await fse(c);if(!((o=d==null?void 0:d.data)!=null&&o.success))throw new Error("Error saving trip title");return d.data.body}catch(u){return n(((a=(s=u.response)==null?void 0:s.data)==null?void 0:a.message)||"Failed to save trip title")}}),yg=He("userTrips/geocodeActionLocations",async(e,{getState:t,rejectWithValue:n})=>{var r,i;try{if(!((i=(r=window.google)==null?void 0:r.maps)!=null&&i.Geocoder))throw new Error("Google Maps Geocoder not available");const o=t(),{geocodedActions:s}=o.userTrips,a=new window.google.maps.Geocoder,u={};return await Promise.all(e.map(async l=>{if(!(l.action_type==="downtime"||!l.address||s[l.id]))try{const c=await new Promise((d,f)=>{a.geocode({address:l.address},(p,h)=>{h==="OK"&&(p!=null&&p[0])?d(p[0]):f(new Error(`Geocode failed for ${l.address}: ${h}`))})});u[l.id]={lat:c.geometry.location.lat(),lng:c.geometry.location.lng(),formatted_address:c.formatted_address,place_id:c.place_id,types:c.types,viewport:c.geometry.viewport?{northeast:{lat:c.geometry.viewport.getNorthEast().lat(),lng:c.geometry.viewport.getNorthEast().lng()}
161,southwest:{lat:c.geometry.viewport.getSouthWest().lat(),lng:c.geometry.viewport.getSouthWest().lng()}}:void 0}}catch(c){console.error(`Error geocoding location ${l.action_location}:`,c)}})),u}catch(o){return n(o.message||"Failed to geocode action locations")}}),bg=He("userTrips/saveNotes",async(e,{getState:t,rejectWithValue:n})=>{var o,s,a,u,l,c,d;const r=t(),i={trip_detail_id:(s=(o=r.userTrips.selectedTrip)==null?void 0:o.trip)==null?void 0:s.id,trip_option_id:(u=(a=r.userTrips.selectedTrip)==null?void 0:a.booking)==null?void 0:u.trip_option_id,action_id:e.action_id,notes:e.notes};try{const f=await pse(i);if(!((l=f==null?void 0:f.data)!=null&&l.body))throw new Error("Response data is missing");return f.data.body}catch(f){return n(((d=(c=f.response)==null?void 0:c.data)==null?void 0:d.message)||"Failed to save notes")}}),wg=He("userTrips/addActivity",async(e,{getState:t,rejectWithValue:n})=>{var r,i,o,s,a,u;try{const l=t(),{selectedTrip:c}=l.userTrips;if(!((r=c==null?void 0:c.trip)!=null&&r.id)||!((i=c==null?void 0:c.option)!=null&&i.id))throw new Error("Missing required data for saving trip title");const d={trip_detail_id:c.trip.id.toString(),trip_option_id:c.option.id,schedule_type:"2",add_place_to_your_schedule:[{activity_title:e.action_title,location:e.action_location,description:e.action_description}],date_days:(o=c.selectedDay)==null?void 0:o.trip_day_date,start_time:e.fromTime,end_time:e.toTime,saved_place_type:e.category,action_type:e.category},f=await kL(d);if(!((s=f==null?void 0:f.data)!=null&&s.data))throw new Error("Response data is missing");return f.data.data}catch(l){return n(((u=(a=l.response)==null?void 0:a.data)==null?void 0:u.message)||"Failed to add activity")}}),Sg=He("userTrips/editActivity",async(e,{getState:t,rejectWithValue:n})=>{var r,i,o,s,a,u;try{const l=t(),{selectedTrip:c}=l.userTrips;if(!((r=c==null?void 0:c.trip)!=null&&r.id)||!((i=c==null?void 0:c.option)!=null&&i.id))throw new Error("Missing required data for saving trip title");const d={id:e.action.id,trip_detail_id:c.trip.id.toString(),trip_option_id:c.option.id,schedule_type:"3",action_title:e.newActivityFormData.action_title,action_location:e.newActivityFormData.action_location,action_description:e.newActivityFormData.action_description,date_days:(o=c.selectedDay)==null?void 0:o.trip_day_date,start_time:e.newActivityFormData.fromTime,end_time:e.newActivityFormData.toTime,saved_place_type:e.newActivityFormData.category,action_type:e.newActivityFormData.category,data:e.action},f=await kL(d);if(!((s=f==null?void 0:f.data)!=null&&s.body))throw new Error("Response data is missing");return f.data.body}catch(l){return n(((u=(a=l.response)==null?void 0:a.data)==null?void 0:u.message)||"Failed to add activity")}}),_g=He("userTrips/deleteActivity",async(e,{getState:t,rejectWithValue:n})=>{var r,i,o,s,a,u;try{const l=t(),{selectedTrip:c}=l.userTrips;if(!((r=c==null?void 0:c.trip)!=null&&r.id)||!((i=c==null?void 0:c.option)!=null&&i.id))throw new Error("Missing required data for deleting activity");const d={id:e.actionId,schedule_data_id:(o=c.itinerary)==null?void 0:o.id,action_type:e.actionType},f=await dse(d);if(!((s=f==null?void 0:f.data)!=null&&s.success))throw new Error("Failed to delete activity");return f.data.body}catch(l){return n(((u=(a=l.response)==null?void 0:a.data)==null?void 0:u.message)||"Failed to delete activity")}}),Eg=He("userTrips/saveDirections",async(e,{getState:t,rejectWithValue:n})=>{var r,i,o,s,a;try{const u=t(),{selectedTrip:l}=u.userTrips;if(!((r=l==null?void 0:l.itinerary)!=null&&r.id))throw new Error("Missing required data for saving directions");const c={action_id:e.action.id,schedule_data_id:(i=l.itinerary)==null?void 0:i.id,directions_data:e.directionsData},d=e.isNew?await mse(c):await hse(c);if(!((o=d==null?void 0:d.data)!=null&&o.body))throw new Error("Response data is missing");return d.data.body}catch(u){return n(((a=(s=u.response)==null?void 0:s.data)==null?void 0:a.message)||"Failed to save directions")}}),kr=e=>{e.status="loading"},Pr=(e,t)=>{e.status="failed",e.error=t.payload},Oo=e=>{e.status="succeeded"},AL=Cr({name:"userTrips",initialState:RL,reducers:{clearError:Xoe,resetUserTripsState:Qoe,setSelectedTrip:Joe,setSelectedBooking:Zoe,setSelectedDay:ese,setSelectedSection:tse},extraReducers:e=>{e.addCase(hg.fulfilled,(t,n)=>{t.status="succeeded",n.payload.getItinerary&&(t.trips=n.payload.getItinerary),n.payload.getBookedItinerary&&(t.bookings=n.payload.getBookedItinerary)}).addCase(mg.fulfilled,(t,n)=>{if(t.status="succeeded",t.selectedTrip){const r=n.payload.trip_schedule.map(i=>{const o=[...i.Morning||[],...i.Afternoon||[],...i.Evening||[],...i.Night||[]],s=new Date(i.trip_day_date).toISOString().split("T")[0],a=o.map(u=>{const[l,c]=(u.action_time||"00:00 - 00:00").split(" - ");return{...u,start_time:new Date(`${s}T${l}`),end_time:new Date(`${s}T${c}`)}});return{...i,orderedActions:a.sort((u,l)=>{var f,p;const c=((f=u.action_time)==null?void 0:f.split(" - ")[0])||"00:00",d=((p=l.action_time)==null?void 0:p.split(" - ")[0])||"00:00";return c.localeCompare(d)})}});t.selectedTrip.itinerary={...n.payload,trip_schedule:r},t.selectedTrip.selectedDay=r.find(i=>{var o,s;return i.id===((s=(o=t.selectedTrip)==null?void 0:o.selectedDay)==null?void 0:s.id)})||r[0]||null}}).addCase(yg.fulfilled,(t,n)=>{t.status="succeeded",t.geocodedActions={...t.geocodedActions,...n.payload}}).addCase(bg.fulfilled,Oo).addCase(gg.fulfilled,Oo).addCase(vg.fulfilled,Oo).addCase(wg.fulfilled,Oo).addCase(Sg.fulfilled,Oo).addCase(_g.fulfilled,Oo).addCase(Eg.fulfilled,Oo).addCase(hg.pen
161ding,kr).addCase(mg.pending,kr).addCase(bg.pending,kr).addCase(gg.pending,kr).addCase(vg.pending,kr).addCase(wg.pending,kr).addCase(Sg.pending,kr).addCase(_g.pending,kr).addCase(Eg.pending,kr).addCase(yg.pending,kr).addCase(hg.rejected,Pr).addCase(mg.rejected,Pr).addCase(bg.rejected,Pr).addCase(gg.rejected,Pr).addCase(vg.rejected,Pr).addCase(wg.rejected,Pr).addCase(Sg.rejected,Pr).addCase(_g.rejected,Pr).addCase(Eg.rejected,Pr).addCase(yg.rejected,Pr)}}),{clearError:fue,resetUserTripsState:pue,setSelectedTrip:hue,setSelectedBooking:mue,setSelectedDay:gue,setSelectedSection:vue}=AL.actions,yse=AL.reducer,bse={jobs:[]},OL=Cr({name:"job",initialState:bse,reducers:{addJob(e,t){e.jobs.push(t.payload)},removeJob(e,t){e.jobs=e.jobs.filter(n=>n.id!==t.payload)},clearJobs(e){e.jobs=[]}}}),{addJob:yue,clearJobs:bue,removeJob:wue}=OL.actions,wse=OL.reducer,Sse={showModal:!1,tripData:null,activePolling:{},showInterstitial:!1,interstitialTripData:null},ML=Cr({name:"tripNotification",initialState:Sse,reducers:{showTripReadyModal:(e,t)=>{e.showModal=!0,e.tripData=t.payload},closeTripReadyModal:e=>{e.showModal=!1,e.tripData=null},showTripReadyInterstitial:(e,t)=>{e.showInterstitial=!0,e.interstitialTripData=t.payload},closeTripReadyInterstitial:e=>{e.showInterstitial=!1,e.interstitialTripData=null},requestTripPolling:(e,t)=>{e.activePolling[t.payload]=!0},stopTripPolling:(e,t)=>{delete e.activePolling[t.payload]}}}),{showTripReadyModal:Sue,closeTripReadyModal:_ue,showTripReadyInterstitial:Eue,closeTripReadyInterstitial:Tue,requestTripPolling:xue,stopTripPolling:Cue}=ML.actions,_se=ML.reducer,Tg=He("reservations/create",async(e,{rejectWithValue:t})=>{var n;try{const r=await gse({trip_id:e.trip_id,action_id:e.action_id,metadata:JSON.stringify(e.metadata),attachment:e.attachment});return r.data.status===201?(await PL(e.trip_id)).data.data:t({code:r.data.status||400,message:r.data.message||"Request failed"})}catch(r){const{response:i}=r;return t({code:(i==null?void 0:i.status)||500,message:((n=i==null?void 0:i.data)==null?void 0:n.message)||(i==null?void 0:i.statusText)||"Internal Server Error"})}}),xg=He("reservations/fetch",async({trip_id:e})=>{try{return(await PL(e)).data.data}catch(t){throw t}});He("reservations/update",async e=>{throw new Error("Not implemented")});const Cg=He("reservations/delete",async({id:e})=>{try{return(await vse(e)).data.status===200?e:null}catch(t){throw t}}),Ese={reservations:[],loading:!1,error:null},FC=(e,t)=>{t.forEach(n=>{if(typeof n.metadata=="string")try{n.metadata=JSON.parse(n.metadata)}catch(i){console.error("Failed to parse reservation metadata:",i)}const r=e.reservations.findIndex(i=>i.id===n.id&&i.action_id===n.action_id);r!==-1?e.reservations[r]=n:e.reservations.push(n)})},NL=Cr({name:"reservations",initialState:Ese,reducers:{clearReservations:e=>{e.reservations=[],e.error=null}},extraReducers:e=>{e.addCase(Tg.pending,t=>{t.loading=!0,t.error=null}).addCase(Tg.fulfilled,(t,n)=>{t.loading=!1,FC(t,n.payload)}).addCase(Tg.rejected,(t,n)=>{t.loading=!1,t.error=n.payload}).addCase(xg.pending,t=>{t.loading=!0,t.error=null}).addCase(xg.fulfilled,(t,n)=>{t.loading=!1,FC(t,n.payload)}).addCase(xg.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message||"Failed to fetch reservations"}).addCase(Cg.pending,t=>{t.loading=!0,t.error=null}).addCase(Cg.fulfilled,(t,n)=>{t.loading=!1,n.payload!==null&&(t.reservations=t.reservations.filter(r=>r.id!==n.payload))}).addCase(Cg.rejected,(t,n)=>{t.loading=!1,t.error=n.error.message||"Failed to delete reservation"})}}),{clearReservations:Iue}=NL.actions,Tse=NL.reducer;function xse(e,t,n){const r=t.split(".");let i=e;for(let o=0;o<r.length-1;o++){const s=r[o];i[s]===void 0&&(i[s]={}),i=i[s]}i[r[r.length-1]]=n}function Za(e){var t;if(e&&typeof e=="object"){const n=e;return(n==null?void 0:n.message)||((t=n==null?void 0:n.toString)==null?void 0:t.call(n))||"Unknown error"}return String(e)}const Cse={loading:!0,error:null,local_tips:{},activity_data:[],dining_data:[],lodging_data:[],viator_activities:[],tripData:{id:"3a626e50-4236-4483-a171-583f93d9f259",images:[{id:"images/tx2twzp48ho2hwakhugt",url:"https://res.cloudinary.com/dcvlqh0ct/image/upload/v1752595381/images/tx2twzp48ho2hwakhugt.jpg"},{id:"images/dwb0jevonpjfb2b96hyt",url:"https://res.cloudinary.com/dcvlqh0ct/image/upload/v1752595381/images/dwb0jevonpjfb2b96hyt.jpg"}],option:"Option 1",weather:"September in Tulum is hot and humid, with average temperatures in the mid-80s. There is a chance of rain, as it is still hurricane season.",end_date:"September 9, 2025",trip_name:"Tulum Escape - 7 days in Paradise ðï¸",start_date:"September 2, 2025",total_cost:"$2500-$5000 per person",trip_dates:"September 2, 2025 - September 9, 2025",destination:"Tulum, Mexico",dining_line:"Enjoy fresh seafood, traditional Mayan cuisine, and modern Mexican dishes at a variety of restaurants and beachside cafes.",country_code:"MX",lodging_line:"Stay in a boutique hotel or eco-resort with stunning views of the Caribbean Sea.",destinationId:102,lodging_price:"$200-$400 per room per night",daily_expenses:"$150-$300 per person",activities_cost:"$500-$1000 per person",activities_line:"Explore ancient ruins, relax on pristine beaches, and discover the vibrant culture of Tulum.",cost_commentary:"This option is moderately priced. To save money, consider visiting during the shoulder season (April-May or October-November) for lower prices on flights and accommodations.",excitement_line:"Discover the magic of Tulum! ð´ð¹",fun_facts:["Tulum is the only ancient Mayan city built on a cliff overlooking the Caribbean Sea.","The name 'Tulum' means 'wall' in Mayan, referring to the stone barrier that surrounds the city.","Tulum was one of the last cities inhabited by the Maya and was still occupied when the Spanish arrived.","The iconic El Castillo pyramid in Tulum served as a lighthouse for ancient Mayan sailors.","Tulum's beaches are home to sea turtles that nest here during certain times of the year."],reasons_to_pick:[{title:"Ancient History",description:"Explore the iconic Tulum ruins overlooking the Caribbean Sea."},{title:"Beach Bliss",description:"Relax on the white-sand beaches and swim in the turquoise waters."},{title:"Natural Wonders",description:"Discover the unique cenotes (natural sinkholes) and underground rivers."},{title:"Cultural Immersion",description:"Experience the vibrant nightlife and cultural scene."},{title:"Wellness Retreat",description:"Enjoy the eco-friendly and wellness-focused atmosphere."}],reasons_to_skip:[{title:"Crowds",description:"Tulum can be crowded, especially during peak season."}
161,{title:"Infrastructure",description:"Some areas are still recovering from past hurricane damage."},{title:"Seaweed",description:"The sargassum seaweed can sometimes affect the beaches."},{title:"Cost",description:"It can be more expensive than other parts of Mexico."},{title:"Atmosphere",description:"The eco-conscious vibe may not appeal to everyone."}],safety_overview:"Tulum is generally safe for tourists, but it's important to be aware of your surroundings and take precautions against petty theft. Be cautious when swimming in the ocean, as currents can be strong. Also, be aware of the local wildlife, such as mosquitoes and snakes.",description_data:"Tulum offers a laid-back, bohemian vibe with a focus on wellness, eco-consciousness, and connection to nature. This trip is recommended because it offers a mix of relaxation, cultural exploration, and natural beauty, all within a relatively accessible destination.",destination_line:"Tulum, Mexico, offers a unique blend of ancient history, stunning beaches, and a vibrant cultural scene.",flight_cost_high:"$400-$800 per person roundtrip",comparison_option:"Dream: This trip maximizes enjoyment with a blend of relaxation and cultural exploration. It's an excellent choice if you want a well-rounded experience with both popular sites and local gems. You might not like it if you prefer a more off-the-beaten-path adventure.",destination_locale:"Tulum",region_description:"Tulum is located on the Yucatan Peninsula in Mexico, along the Caribbean coast.",transportation_line:"Fly into Cancun International Airport (CUN) and take a taxi or shuttle to Tulum (approx. 1.5-2 hours).",destination_vibe_line:"Tulum offers a laid-back, bohemian vibe with a focus on wellness, eco-consciousness, and connection to nature.",number_of_destinations:1,airport_transfer_cost_avg:"",airport_transfer_cost_high:"",destination_why_picked_line:"This trip is recommended because it offers a mix of relaxation, cultural exploration, and natural beauty, all within a relatively accessible destination.",local_transit_mode_cost_avg:"",local_transit_mode_cost_high:"",medical_tourism_procedure_cost:"N/A",passagers:[{name:"Alejandro",age:"25"},{name:"Juan",age:"25"},{name:"Maria",age:"25"},{name:"Pedro",age:"25"}],passengers:void 0}},Ig=He("myTrip/getTravelData",async(e,t)=>{var n,r,i,o,s,a,u,l,c,d,f;try{console.log("ð DEBUG: myTripSlice getTravelDataThunk called with params:",e);const p=await cse({trip_detail_id:e.trip_detail_id});console.log("ð DEBUG: API response structure:",{hasData:!!(p!=null&&p.data),hasBody:!!((n=p==null?void 0:p.data)!=null&&n.body),hasTripOptions:!!((i=(r=p==null?void 0:p.data)==null?void 0:r.body)!=null&&i.trip_options),tripOptionsCount:(a=(s=(o=p==null?void 0:p.data)==null?void 0:o.body)==null?void 0:s.trip_options)==null?void 0:a.length,tripOptions:(c=(l=(u=p==null?void 0:p.data)==null?void 0:u.body)==null?void 0:l.trip_options)==null?void 0:c.map(y=>({id:y.id,trip_name:y.trip_name}))});const h=((f=(d=p==null?void 0:p.data)==null?void 0:d.body)==null?void 0:f.trip_options)||[],m=h.find(y=>y.id===e.trip_option_id);if(console.log("ð DEBUG: Looking for trip_option_id:",e.trip_option_id),console.log("ð DEBUG: Found selected option:",!!m,m==null?void 0:m.trip_name),!m)throw console.error("ð DEBUG: Trip option not found. Available options:",h.map(y=>y.id)),new Error(`Trip option with ID ${e.trip_option_id} not found`);return m}catch(p){return console.error("ð DEBUG: getTravelDataThunk error:",p),t.rejectWithValue(Za(p))}}),Rg=He("myTrip/activityGetData",async(e,t)=>{try{if(!e.trip_detail_id||!e.trip_option_id)return console.error("activityGetDataThunk: Missing required parameters",e),t.rejectWithValue("Missing required trip parameters");console.log("activityGetDataThunk: Fetching with params",e);const n=await ose({trip_detail_id:e.trip_detail_id,trip_option_id:e.trip_option_id});return console.log("activityGetDataThunk: Success",n.data),n.data.body}catch(n){return console.error("activityGetDataThunk: Error",n),t.rejectWithValue(Za(n))}}),kg=He("myTrip/getLocalTipsData",async(e,t)=>{var n;try{return((n=(await ise({trip_detail_id:e.trip_detail_id,trip_option_id:e.trip_option_id})).data.body)==null?void 0:n.local_tips)||null}catch(r){return t.rejectWithValue(Za(r))}}),Pg=He("myTrip/diningGetData",async(e,t)=>{try{if(!e.trip_detail_id||!e.trip_option_id)return console.error("diningGetDataThunk: Missing required parameters",e),t.rejectWithValue("Missing required trip parameters");console.log("diningGetDataThunk: Fetching with params",e);const n=await ase({trip_detail_id:e.trip_detail_id,trip_option_id:e.trip_option_id});return console.log("diningGetDataThunk: Success",n.data),n.data.body}catch(n){return console.error("diningGetDataThunk: Error",n),t.rejectWithValue(Za(n))}}),Ag=He("myTrip/lodgingGetData",async(e,t)=>{try{if(!e.trip_detail_id||!e.trip_option_id)return console.error("lodgingGetDataThunk: Missing required parameters",e),t.rejectWithValue("Missing required trip parameters");console.log("lodgingGetDataThunk: Fetching with params",e);const n=await sse({trip_detail_id:e.trip_detail_id,trip_option_id:e.trip_option_id});return console.log("lodgingGetDataThunk: Success",n.data),n.data.body}catch(n){return console.error("lodgingGetDataThunk: Error",n),t.rejectWithValue(Za(n))}}),Og=He("myTrip/viatorActivities",async(e,t)=>{try{return!e.trip_detail_id||!e.trip_option_id?(console.error("viatorActivitiesThunk: Missing required parameters",e),t.rejectWithValue("Missing required trip parameters")):(await rse({trip_detail_id:e.trip_detail_id,trip_option_id:e.trip_option_id})).data}catch(n){return console.error("viatorActivitiesThunk: Error",n),t.rejectWithValue(Za(n))}}),DL=Cr({name:"myTrip",initialState:Cse,reducers:{setTripData:(e,t)=>{Object.assign(e,t.payload)},updateTripField:(e,t)=>{xse(e,t.payload.field,t.payload.value)},updatePassengers:(e,t)=>{e.tripData.passagers=t.payload,e.tripData.passengers=t.payload},clearViatorActivities:e=>{e.viator_activities=[]}},extraReducers:e=>{e.addCase(Ig.pending,t=>{t.loading=!0,t.error=null}).addCase(Ig.fulfilled,(t,n)=>{var r,i;t.loading=!1,t.tripData={...t.tripData,...n.payload,passagers:((r=n.payload)==null?void 0:r.passagers)??t.tripData.passagers,passengers:((i=n.payload)==null?void 0:i.passengers)??t.tripData.passagers}}).addCase(Ig.rejected,(t,n)=>{t.loading=!1,t.error=n.payload??"Failed to load travel data."}).addCase(kg.pending,t=>{t.loading=!0,t.error=null,t.local_tips=null}).addCase(kg.fulfilled,(t,n)=>{t.loading=!1,t.local_tips=n.payload}).addCase(kg.rejected,(t,n)=>{t.loading=!1,t.error=n.payload??"Failed to load local tips."}).addCase(Rg.pending,t=>{t.loading=!0,t.error=null}).addCase(Rg.fulfilled,(t,n)=>{t.loading=!1,t.activity_data=n.payload}).addCase(Rg.rejected,(t,n)=>{t.loading=!1,t.error=n.payload??"Failed to load local tips."}).addCase(Pg.pending,t=>{t.loading=!0,t.error=null}).addCase(Pg.fulfilled,(t,n)=>{t.loading=!1,t.dining_data=n.payload}).addCase(Pg.rejected,(t,n)=>{t.loading=!1,t.error=n.payload??"Failed to load local tips."}).addCase(Ag.pending,t=>{t.loading=!0,t.error=null,t.lodging_data=null}).addCase(Ag.fulfilled,(t,n)=>{t.loading=!1,t.lodging_data=n.payload}).addCase(Ag.rejected,(t,n)=>{t.loading=!1,t.error=n.payload??"Failed to load local tips."}).addCase(Og.pending,t=>{t.loading=!0,t.error=null}).addCase(Og.fulfilled,(t,n)=>{var r;t.loading=!1,t.viator_activities={...((r=n.payload)==null?void 0:r.data)||{},_tripContext:{trip_detail_id:n.meta.arg.trip_detail_id,trip_option_id:n.meta.arg.trip_option_id,fetchedAt:Date.now()}}}).addCase(Og.rejected,(t,n)=>{t.loading=!1,t.error=n.payload??"Failed to load Viator activities."})}}),Rue=e=>e.myTrip.viator_activities,{setTripData:kue,updateTripField:Pue,updatePassengers:Aue,clearViatorActivities:Oue}=DL.actions,Ise=DL.reducer;function Rse(e){const t=(e==null?void 0:e.passagers)??(e==null?void 0:e.passengers)??[];return{id:(e==null?void 0:e.id)??"",images:(e==null?void 0:e.images)??[],option:(e==null?void 0:e.option)??"",weather:(e==null?void 0:e.weather)??"",end_date:(e==null?void 0:e.end_date)??"",trip_name:(e==null?void 0:e.trip_name)??"",start_date:(e==null?void 0:e.start_date)??"",total_cost:(e==null?void 0:e.total_cost)??"",trip_dates:(e==null?void 0:e.trip_dates)??"",destination:(e==null?void 0:e.destination)??"",dining_line:(e==null?void 0:e.dining_line)??"",country_code:(e==null?void 0:e.country_code)??"",lodging_line:(e==null?void 0:e.lodging_line)??"",destinationId:(e==null?void 0:e.destinationId)??0,lodging_price:(e==null?void 0:e.lodging_price)??"",daily_expenses:(e==null?void 0:e.daily_expenses)??"",activities_cost:(e==null?void 0:e.activities_cost)??"",activities_line:(e==null?void 0:e.activities_line)??"",cost_commentary:(e==null?void 0:e.cost_commentary)??"",excitement_line:(e==null?void 0:e.excitement_line)??"",reasons_to_pick:(e==null?void 0:e.reasons_to_pick)??[],reasons_to_skip:(e==null?void 0:e.reasons_to_skip)??[],safety_overview:(e==null?void 0:e.safety_overview)??"",description_data:(e==null?void 0:e.description_data)??"",destination_line:(e==null?void 0:e.destination_line)??"",flight_cost_high:(e==null?void 0:e.flight_cost_high)??"",comparison_option:(e==null?void 0:e.comparison_option)??"",destination_locale:(e==null?void 0:e.destination_locale)??"",region_description:(e==null?void 0:e.region_description)??"",transportation_line:(e==null?void 0:e.transportation_line)??"",destination_vibe_line:(e==null?void 0:e.destination_vibe_line)??"",number_of_destinations:(e==null?void 0:e.number_of_destinations)??0,airport_transfer_cost_avg:(e==null?void 0:e.airport_transfer_cost_avg)??"",airport_transfer_cost_high:(e==null?void 0:e.airport_transfer_cost_high)??"",destination_why_picked_line:(e==null?void 0:e.destination_why_picked_line)??"",local_transit_mode_cost_avg:(e==null?void 0:e.local_transit_mode_cost_avg)??"",local_transit_mode_cost_high:(e==null?void 0:e.local_transit_mode_cost_high)??"",medical_tourism_procedure_cost:(e==null?void 0:e.medical_tourism_procedure_cost)??"",passengers:t,passagers:t}}function kse(e){var t,n,r,i,o;return Array.isArray(e)?e:Array.isArray(e==null?void 0:e.trip_options)?e.trip_options:Array.isArray((t=e==null?void 0:e.body)==null?void 0:t.trip_options)?e.body.trip_options:Array.isArray((r=(n=e==null?void 0:e.data)==null?void 0:n.body)==null?void 0:r.trip_options)?e.data.body.trip_options:Array.isArray((o=(i=e==null?void 0:e.data)==null?void 0:i.newTripDetail)==null?void 0:o.trip_options)?e.data.newTripDetail.trip_options:[]}function Pse(e,t,n){const r=t.replace(/\[(\d+)\]/g,".$1").split(".").filter(
161Boolean);let i=e;for(let o=0;o<r.length-1;o++){const s=r[o];i[s]===void 0&&(i[s]={}),i=i[s]}i[r[r.length-1]]=n}const Ase={local_tips:null,loading:!1,error:null,tripData:[],selectedIndex:null},LL=Cr({name:"threeOptions",initialState:Ase,reducers:{setTripData:(e,t)=>{const n=kse(t.payload);e.tripData=n.map(Rse),e.selectedIndex=e.tripData.length>0?0:null},selectTripIndex:(e,t)=>{const n=t.payload;e.selectedIndex=n!=null&&n>=0&&n<e.tripData.length?n:null},updateTripField:(e,t)=>{Pse(e,t.payload.field,t.payload.value)},updatePassengers:(e,t)=>{const n=t.payload.index??e.selectedIndex??0;e.tripData[n]&&(e.tripData[n].passengers=t.payload.passengers,e.tripData[n].passagers=t.payload.passengers)}}}),{setTripData:Mue,selectTripIndex:Nue,updateTripField:Due,updatePassengers:Lue}=LL.actions,Ose=LL.reducer,FL=uie({reducer:{trip:Hoe,gemini:qoe,logout:Goe,location:Yoe,user:Aie,userTrips:yse,payment:wse,tripNotification:_se,reservations:Tse,myTrip:Ise,threeOptions:Ose}});var Mse=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Nse="VisuallyHidden",uS=w.forwardRef((e,t)=>E.jsx(Ue.span,{...e,ref:t,style:{...Mse,...e.style}}));uS.displayName=Nse;var lS="ToastProvider",[cS,Dse,Lse]=oh("Toast"),[jL,Fue]=Ro("Toast",[Lse]),[Fse,_h]=jL(lS),UL=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:s}=e,[a,u]=w.useState(null),[l,c]=w.useState(0),d=w.useRef(!1),f=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${lS}\`. Expected non-empty \`string\`.`),E.jsx(cS.Provider,{scope:t,children:E.jsx(Fse,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:o,toastCount:l,viewport:a,onViewportChange:u,onToastAdd:w.useCallback(()=>c(p=>p+1),[]),onToastRemove:w.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:s})})};UL.displayName=lS;var $L="ToastViewport",jse=["F8"],n0="toast.viewportPause",r0="toast.viewportResume",BL=w.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=jse,label:i="Notifications ({hotkey})",...o}=e,s=_h($L,n),a=Dse(n),u=w.useRef(null),l=w.useRef(null),c=w.useRef(null),d=w.useRef(null),f=wt(t,d,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=s.toastCount>0;w.useEffect(()=>{const y=g=>{var b;r.length!==0&&r.every(S=>g[S]||g.code===S)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),w.useEffect(()=>{const y=u.current,g=d.current;if(h&&y&&g){const v=()=>{if(!s.isClosePausedRef.current){const T=new CustomEvent(n0);g.dispatchEvent(T),s.isClosePausedRef.current=!0}},b=()=>{if(s.isClosePausedRef.current){const T=new CustomEvent(r0);g.dispatchEvent(T),s.isClosePausedRef.current=!1}},S=T=>{!y.contains(T.relatedTarget)&&b()},x=()=>{y.contains(document.activeElement)||b()};return y.addEventListener("focusin",v),y.addEventListener("focusout",S),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",x),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",S),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",x),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[h,s.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:y})=>{const v=a().map(b=>{const S=b.ref.current,x=[S,...Qse(S)];return y==="forwards"?x:x.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return w.useEffect(()=>{const y=d.current;if(y){const g=v=>{var x,T,_;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const C=document.activeElement,I=v.shiftKey;if(v.target===y&&I){(x=l.current)==null||x.focus();return}const L=m({tabbingDirection:I?"backwards":"forwards"}),F=L.findIndex(M=>M===C);Mg(L.slice(F+1))?v.preventDefault():I?(T=l.current)==null||T.focus():(_=c.current)==null||_.focus()}};return y.addEventListener("keydown",g),()=>y.removeEventListener("keydown",g)}},[a,m]),E.jsxs(NQ,{ref:u,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&E.jsx(i0,{ref:l,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});Mg(y)}}),E.jsx(cS.Slot,{scope:n,children:E.jsx(Ue.ol,{tabIndex:-1,...o,ref:f})}),h&&E.jsx(i0,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});Mg(y)}})]})});BL.displayName=$L;var zL="ToastFocusProxy",i0=w.forwardRef((e,t)=>
161{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=_h(zL,n);return E.jsx(uS,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:s=>{var l;const a=s.relatedTarget;!((l=o.viewport)!=null&&l.contains(a))&&r()}})});i0.displayName=zL;var gc="Toast",Use="toast.swipeStart",$se="toast.swipeMove",Bse="toast.swipeCancel",zse="toast.swipeEnd",HL=w.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:o,...s}=e,[a,u]=cc({prop:r,defaultProp:i??!0,onChange:o,caller:gc});return E.jsx(Ei,{present:n||a,children:E.jsx(qse,{open:a,...s,ref:t,onClose:()=>u(!1),onPause:Nn(e.onPause),onResume:Nn(e.onResume),onSwipeStart:ee(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.onSwipeMove,l=>{const{x:c,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ee(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ee(e.onSwipeEnd,l=>{const{x:c,y:d}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),u(!1)})})})});HL.displayName=gc;var[Hse,Wse]=jL(gc,{onClose(){}}),qse=w.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:o,onClose:s,onEscapeKeyDown:a,onPause:u,onResume:l,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=_h(gc,n),[y,g]=w.useState(null),v=wt(t,M=>g(M)),b=w.useRef(null),S=w.useRef(null),x=i||m.duration,T=w.useRef(0),_=w.useRef(x),C=w.useRef(0),{onToastAdd:I,onToastRemove:O}=m,D=Nn(()=>{var R;(y==null?void 0:y.contains(document.activeElement))&&((R=m.viewport)==null||R.focus()),s()}),L=w.useCallback(M=>{!M||M===1/0||(window.clearTimeout(C.current),T.current=new Date().getTime(),C.current=window.setTimeout(D,M))},[D]);w.useEffect(()=>{const M=m.viewport;if(M){const R=()=>{L(_.current),l==null||l()},N=()=>{const A=new Date().getTime()-T.current;_.current=_.current-A,window.clearTimeout(C.current),u==null||u()};return M.addEventListener(n0,N),M.addEventListener(r0,R),()=>{M.removeEventListener(n0,N),M.removeEventListener(r0,R)}}},[m.viewport,x,u,l,L]),w.useEffect(()=>{o&&!m.isClosePausedRef.current&&L(x)},[o,x,m.isClosePausedRef,L]),w.useEffect(()=>(I(),()=>O()),[I,O]);const F=w.useMemo(()=>y?XL(y):null,[y]);return m.viewport?E.jsxs(E.Fragment,{children:[F&&E.jsx(Vse,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),E.jsx(Hse,{scope:n,onClose:D,children:$l.createPortal(E.jsx(cS.ItemSlot,{scope:n,children:E.jsx(MQ,{asChild:!0,onEscapeKeyDown:ee(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||D(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:E.jsx(Ue.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,M=>{M.key==="Escape"&&(a==null||a(M.nativeEvent),M.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:ee(e.onPointerDown,M=>{M.button===0&&(b.current={x:M.clientX,y:M.clientY})}),onPointerMove:ee(e.onPointerMove,M=>{if(!b.current)return;const R=M.clientX-b.current.x,N=M.clientY-b.current.y,A=!!S.current,P=["left","right"].includes(m.swipeDirection),k=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,$=P?k(0,R):0,z=P?0:k(0,N),H=M.pointerType==="touch"?10:2,V={x:$,y:z},q={originalEvent:M,delta:V};A?(S.current=V,_d($se,d,q,{discrete:!1})):jC(V,m.swipeDirection,H)?(S.current=V,_d(Use,c,q,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(R)>H||Math.abs(N)>H)&&(b.current=null)}),onPointerUp:ee(e.onPointerUp,M=>{const R=S.current,N=M.target;if(N.hasPointerCapture(M.pointerId)&&N.releasePointerCapture(M.pointerId),S.current=null,b.current=null,R){const A=M.currentTarget,P={originalEvent:M,delta:R};jC(R,m.swipeDirection,m.swipeThreshold)?_d(zse,p,P,{discrete:!0}):_d(Bse,f,P,{discrete:!0}),A.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Vse=e=>{const{__scopeToast:t,children:n,...r}=e,i=_h(gc,t),[o,s]=w.useState(!1),[a,u]=w.useState(!1);return Yse(()=>s(!0)),w.useEffect(()=>{const l=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:E.jsx(ch,{asChild:!0,children:E.jsx(uS,{...r,children:o&&E.jsxs(E.Fragment,{children:[i.label," ",n]})})})},Gse="ToastTitle",WL=w.forwardRef((e,t)=>
161{const{__scopeToast:n,...r}=e;return E.jsx(Ue.div,{...r,ref:t})});WL.displayName=Gse;var Kse="ToastDescription",qL=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return E.jsx(Ue.div,{...r,ref:t})});qL.displayName=Kse;var VL="ToastAction",GL=w.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?E.jsx(YL,{altText:n,asChild:!0,children:E.jsx(dS,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${VL}\`. Expected non-empty \`string\`.`),null)});GL.displayName=VL;var KL="ToastClose",dS=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=Wse(KL,n);return E.jsx(YL,{asChild:!0,children:E.jsx(Ue.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,i.onClose)})})});dS.displayName=KL;var YL=w.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return E.jsx(Ue.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function XL(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Xse(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...XL(r))}}),t}function _d(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Cw(i,o):i.dispatchEvent(o)}var jC=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return t==="left"||t==="right"?o&&r>n:!o&&i>n};function Yse(e=()=>{}){const t=Nn(e);gi(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Xse(e){return e.nodeType===e.ELEMENT_NODE}function Qse(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mg(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Jse=UL,QL=BL,JL=HL,ZL=WL,e2=qL,t2=GL,n2=dS;const Zse=Jse,r2=w.forwardRef(({className:e,...t},n)=>E.jsx(QL,{ref:n,className:be("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));r2.displayName=QL.displayName;const eae=gD("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),i2=w.forwardRef(({className:e,variant:t,...n},r)=>E.jsx(JL,{ref:r,className:be(eae({variant:t}),e),...n}));i2.displayName=JL.displayName;const tae=w.forwardRef(({className:e,...t},n)=>E.jsx(t2,{ref:n,className:be("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));tae.displayName=t2.displayName;const o2=w.forwardRef(({className:e,...t},n)=>E.jsx(n2,{ref:n,className:be("absolute right-2 top-2 rounded-md p-1 text-foreground
161/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:E.jsx(mh,{className:"h-4 w-4"})}));o2.displayName=n2.displayName;const s2=w.forwardRef(({className:e,...t},n)=>E.jsx(ZL,{ref:n,className:be("text-sm font-semibold",e),...t}));s2.displayName=ZL.displayName;const a2=w.forwardRef(({className:e,...t},n)=>E.jsx(e2,{ref:n,className:be("text-sm opacity-90",e),...t}));a2.displayName=e2.displayName;function nae(){const{toasts:e}=Fie();return E.jsxs(Zse,{children:[e.map(function({id:t,title:n,description:r,action:i,...o}){return E.jsxs(i2,{...o,children:[E.jsxs("div",{className:"grid gap-1",children:[n&&E.jsx(s2,{children:n}),r&&E.jsx(a2,{children:r})]}),i,E.jsx(o2,{})]},t)}),E.jsx(r2,{})]})}e6({dsn:"https://5d5bce0c8e9d8e6afb6e93fefac97ae3@o4509435566948352.ingest.us.sentry.io/4510032825942016",sendDefaultPii:!0,enableLogs:!0,integrations:[YV(),PV({maskAllText:!0,blockAllMedia:!0}),zH()],tracesSampleRate:.1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:.3,environment:"production",release:"development",ignoreErrors:["ResizeObserver loop limit exceeded","Non-Error promise rejection captured","Navigation cancelled"],beforeSend(e,t){var n,r;if((n=e.request)!=null&&n.url){const i=new URL(e.request.url);["token","api_key","password","email"].forEach(o=>{i.searchParams.has(o)&&i.searchParams.set(o,"[Filtered]")}),e.request.url=i.toString()}return(r=e.request)!=null&&r.headers&&["authorization","x-api-key"].forEach(i=>{var o,s;(s=(o=e.request)==null?void 0:o.headers)!=null&&s[i]&&(e.request.headers[i]="[Filtered]")}),e}});Aa.initialize(Wr.KEYS.GA4_MEASUREMENT_ID,{gaOptions:{send_page_view:!1}});function rae(){const e=_r();return w.useEffect(()=>{try{Wr.KEYS.GA4_MEASUREMENT_ID&&Aa.send({hitType:"pageview",page:e.pathname+e.search})}catch{}},[e]),null}function iae(){return w.useEffect(()=>{try{tY(fQ({sampleRate:.1})),rO(Wr.KEYS.AMPLITUDE_API_KEY,{autocapture:!0});const{trackFirstVisit:e}=require("@/utils/amplitude");e()}catch(e){Eb(e,{tags:{component:"AmplitudeInitializer"},level:"warning"})}},[]),null}const u2=gL(),oae=pQ();FL.dispatch(yL());Yne(e=>{var n;const t=((n=e.detail)==null?void 0:n.reason)||fa;try{localStorage.setItem("logout-reason",t),localStorage.removeItem("token"),localStorage.removeItem("auth_user"),localStorage.removeItem("lastActivity")}catch{}u2.clear(),window.location.pathname!=="/login"&&(window.location.href="/login")});const sae=E.jsx(sU,{store:FL,children:E.jsx(AU,{client:u2,children:E.jsx(MU,{clientId:oae.clientId,children:E.jsxs(Fj,{children:[E.jsx(iae,{}),E.jsx(rae,{}),E.jsx(Boe,{}),E.jsx(nae,{})]})})})});Ng.createRoot(document.getElementById("root")).render(sae);export{voe as $,Jae as A,lo as B,rf as C,Wne as D,Rr as E,nue as F,mae as G,Vne as H,BD as I,Ti as J,Zae as K,Qae as L,hae as M,fte as N,xae as O,gte as P,dae as Q,j as R,gQ as S,ge as T,cC as U,MN as V,ON as W,mh as X,pte as Y,oue as Z,Le as _,jD as a,Mse as a$,Oae as a0,Aae as a1,Mae as a2,Lae as a3,iue as a4,sue as a5,Nae as a6,lue as a7,Dae as a8,Zm as a9,Ei as aA,fM as aB,pM as aC,ee as aD,Kne as aE,Bae as aF,Xae as aG,Eae as aH,Av as aI,un as aJ,cae as aK,$l as aL,o0 as aM,MD as aN,DD as aO,Jw as aP,Zw as aQ,LD as aR,Cne as aS,Ine as aT,mD as aU,Ls as aV,JO as aW,aZ as aX,oh as aY,wt as aZ,gi as a_,lae as aa,Fae as ab,Wr as ac,eue as ad,tue as ae,cue as af,aue as ag,due as ah,rue as ai,uue as aj,l1 as ak,vae as al,Eb as am,gae as an,Xu as ao,JR as ap,Rue as aq,Og as ar,uae as as,jp as at,xw as au,cc as av,Ro as aw,oi as ax,Ue as ay,dh as az,UD as b,uZ as b0,ch as b1,Nn as b2,mM as b3,FO as b4,Fw as b5,Oa as b6,Iw as b7,sh as b8,lZ as b9,Hae as bA,cZ as ba,xe as bb,B as bc,U as bd,wO as be,W as bf,Pae as bg,Aa as bh,zae as bi,eZ as bj,NN as bk,gD as bl,Dp as bm,pae as bn,CU as bo,Jt as bp,fae as bq,lr as br,ib as bs,hU as bt,mU as bu,Mv as bv,sb as bw,vU as bx,nm as by,Dc as bz,$D as c,lU as d,SL as e,fU as f,_r as g,Gne as h,qy as i,E as j,Tue as k,go as l,kae as m,Fie as n,jae as o,AC as p,Uae as q,w as r,Eue as s,Di as t,Np as u,$ae as v,Rae as w,Sn as x,be as y,lg as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.