PageSourceSearch

https://gadero.nl/assets/root-Bpw9MIos.js

js gadero.nl collected 2026-09-29 23:18:51 UTC 334,164 bytes, 122 lines download raw bytes

1var Um=Object.defineProperty;var Fm=(a,i,s)=>i in a?Um(a,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[i]=s;var gt=(a,i,s)=>Fm(a,typeof i!="symbol"?i+"":i,s);import{f as Bo,a as jm,i as zc,c as Bm,w as zm,l as Gm,M as Gc,L as Vc,O as Vm,S as Wc,m as Kc}from"./react-router-CRB4Z4yw.js";import{r as re,j as U,c as Z}from"./react-DV1t-RFr.js";import{C as Ku,d as Hc,A as Wm,m as Km,L as Hm,u as Hu,P as Jr,j as Ym,b as Ao}from"./GDLoadingMask-DSFILG4m.js";import{l as Jm,E as Xm}from"./dataRequestResilience-Be6y2Jwv.js";import{u as Yo,G as qm}from"./useGTM-APOX1EM8.js";import{k as Yu,o as Zm,p as Qm,r as ko}from"./Trash-C9p4crdT.js";import{u as e_,C as t_}from"./useScrollToAnchor-DF2AR8xk.js";import{b as Jo,C as r_,d as i_}from"./Tree-l_KdbifF.js";import{u as n_}from"./Tick-kzBn0Rae.js";import{G as s_,a as Yc,j as o_,E as a_,Z as l_}from"./TrustpilotWidget-BhZ9u-TD.js";import{a as u_}from"./useIsTuin-mhTkyita.js";import{P as c_}from"./PerformanceConsentProvider-Dn7ucxZF.js";import{R as d_}from"./useRecentlyViewedProducts-B_re3tNQ.js";import"./Service-CVy7A0jM.js";import"./_robots.txt_-BnSfYDXh.js";const Jc="/assets/tailwind-Rlg6mfcZ.css";function h_(){f_(),p_();const{setConstant:a}=Yo(),i=Bo({key:"service-location"}),s=i.data,l=s&&"error"in s,u=Jo();return re.useEffect(()=>{u&&i.state==="idle"&&!i.data&&!l&&i.load("/resources/service-location")},[i,l,u]),re.useEffect(()=>{!l&&(s!=null&&s.serviceLocation)&&a("serviceLocation",s==null?void 0:s.serviceLocation)},[s]),null}const f_=()=>{const{pushEvent:a}=Yo(),i=jm(),s=Jo();re.useEffect(()=>{s&&a("page_view",{})},[i,a,s])},p_=()=>{const{setConstant:a,pushEvent:i}=Yo(),{locale:s}=n_(),{customer:l}=e_();re.useEffect(()=>{a("languageCode",s)},[s,a]),re.useEffect(()=>{(async()=>{const h=await l;a("customerId",h!=null&&h.id?await Yu(h.id):void 0),a("customerHashedEmail",h!=null&&h.email?await Yu(h.email):void 0),setTimeout(()=>{i("customer_identification_loaded",{})})})().catch(console.error)},[l,a,i])},Xr={notFound:"The requested page could not be found.",clientError:"Something went wrong, please try again later",serverError:"Something wrong with the server, please try again later"},g_=a=>zc(a)?a.status===404?Xr.notFound:a.status>=500?Xr.serverError:(a.status>=400,Xr.clientError):Xr.clientError;Hc.extend(u_);const m_=a=>Hc.utc(a).local().format("DD-MM-YYYY HH:mm");function __({branchData:a}){const[i,s]=re.useState(!1),{branchName:l,commitId:u,deployTimeUtc:h,commitAuthor:p}=a,g=l&&l.length>20?l.slice(0,20)+"...":l,v=re.useMemo(()=>{if(!h)return null;try{return m_(h)}catch{return h}},[h]);return l?i?U.jsx("div",{className:"hidden md:block fixed bottom-4 right-0 z-[9999]",children:U.jsx("button",{onClick:()=>s(!1),className:"bg-black/20 text-white text-xs px-1 py-4  rounded-l-md font-mono backdrop-blur-lg hover:bg-black/60 transition-colors pointer-events-auto flex items-center justify-center","aria-label":"Show branch overlay",children:U.jsx(Ku,{isLeft:!0,className:"w-4 h-4 text-white"})})}):U.jsx("div",{className:"hidden md:block fixed bottom-0 right-0 z-[9999]",children:U.jsxs("div",{className:"bg-black/40 text-white text-xs px-3 py-2 rounded-tl-md font-mono backdrop-blur-lg space-y-1 group pointer-events-auto",children:[U.jsxs("div",{className:"flex items-start justify-between gap-2",children:[U.jsxs("div",{className:"flex-1",children:[U.jsxs("p",{className:"group-hover:hidden",children:["Branch: ",g]}),U.jsxs("p",{className:"hidden group-hover:inline",children:["Branch: ",l]})]}),U.jsx("button",{onClick:()=>s(!0),className:"text-white/70 hover:text-white transition-colors flex-shrink-0","aria-label":"Hide branch overlay",children:U.jsx(Ku,{className:"w-4 h-4 text-white"})})]}),u&&U.jsxs("div",{children:["Commit: ",u]}),v&&U.jsxs("div",{children:["Deployed: ",v]}),p&&U.jsxs("div",{children:["Author: ",p]})]})}):U.jsx(U.Fragment,{})}const y_=5e3,v_=()=>{const[a,i]=re.useState(!1);re.useEffect(()=>{const l=()=>{i(window.scrollY>y_)};return window.addEventListener("scroll",l,{passive:!0}),l(),()=>{window.removeEventListener("scroll",l)}},[]);const s=()=>{window.scrollTo({top:0,behavior:"smooth"})};return U.jsx(Wm,{children:a&&U.jsx(Km.div,{className:"hidden md:block fixed bottom-4 right-4 z-50",initial:{opacity:0,scale:0}
1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{duration:.2,ease:"easeOut"},children:U.jsx(s_,{theme:"pure",size:"medium",label:"Back to top",onClick:s,className:"bg-red-400 text-white border-none shadow-lg","aria-label":"Back to top",tabIndex:0,children:U.jsx(Hm,{})})})})};function S_({scripts:a}){const i=Jo();return re.useEffect(()=>{i&&a.forEach(s=>{const l=s.notIdPrefix?s.id:`__script_${s.id}`;if(document.getElementById(l))return;const u=document.createElement("script");u.id=l,u.async=s.async??!1,u.defer=s.defer??!1,u.type=s.type??"text/javascript","src"in s?u.src=s.src:u.innerHTML=s.innerHTML,s.insertToHead?document.head.append(u):document.body.prepend(u)})},[i,a]),null}var Xc={},J={},li={},Te={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Log=a.LogLevel=void 0;const i=" DEBUG ",s="  INFO ",l="  WARN ",u=" ERROR ";function h(g){return g.unshift("[Statsig]"),g}a.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class p{static info(...v){p.level>=a.LogLevel.Info&&console.info(s,...h(v))}static debug(...v){p.level>=a.LogLevel.Debug&&console.debug(i,...h(v))}static warn(...v){p.level>=a.LogLevel.Warn&&console.warn(l,...h(v))}static error(...v){p.level>=a.LogLevel.Error&&console.error(u,...h(v))}}a.Log=p,p.level=a.LogLevel.Warn})(Te);(function(a){var i,s,l;Object.defineProperty(a,"__esModule",{value:!0}),a._getInstance=a._getStatsigGlobalFlag=a._getStatsigGlobal=void 0;const u=Te,h=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:C}catch{return C}};a._getStatsigGlobal=h;const p=A=>(0,a._getStatsigGlobal)()[A];a._getStatsigGlobalFlag=p;const g=A=>{const T=(0,a._getStatsigGlobal)();return A?T.instances&&T.instances[A]:(T.instances&&Object.keys(T.instances).length>1&&u.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),T.firstInstance)};a._getInstance=g;const v="__STATSIG__",S=typeof window<"u"?window:{},_=typeof Z<"u"?Z:{},b=typeof globalThis<"u"?globalThis:{},C=(l=(s=(i=S[v])!==null&&i!==void 0?i:_[v])!==null&&s!==void 0?s:b[v])!==null&&l!==void 0?l:{instance:a._getInstance};S[v]=C,_[v]=C,b[v]=C})(li);var Nn={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.Diagnostics=void 0;const i=new Map,s="start",l="end",u="statsig::diagnostics";a.Diagnostics={_getMarkers:S=>i.get(S),_markInitOverallStart:S=>{g(S,h({},s,"overall"))},_markInitOverallEnd:(S,_,b)=>{g(S,h({success:_,error:_?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:b},l,"overall"))},_markInitNetworkReqStart:(S,_)=>{g(S,h(_,s,"initialize","network_request"))},_markInitNetworkReqEnd:(S,_)=>{g(S,h(_,l,"initialize","network_request"))},_markInitProcessStart:S=>{g(S,h({},s,"initialize","process"))},_markInitProcessEnd:(S,_)=>{g(S,h(_,l,"initialize","process"))},_clearMarkers:S=>{i.delete(S)},_formatError(S){if(S&&typeof S=="object")return{code:v(S,"code"),name:v(S,"name"),message:v(S,"message")}},_getDiagnosticsData(S,_,b,C){var A;return{success:(S==null?void 0:S.ok)===!0,statusCode:S==null?void 0:S.status,sdkRegion:(A=S==null?void 0:S.headers)===null||A===void 0?void 0:A.get("x-statsig-region"),isDelta:b.includes('"is_delta":true')===!0?!0:void 0,attempt:_,error:a.Diagnostics._formatError(C)}},_enqueueDiagnosticsEvent(S,_,b,C){const A=a.Diagnostics._getMarkers(b);if(A==null||A.length<=0)return-1;const T=A[A.length-1].timestamp-A[0].timestamp;a.Diagnostics._clearMarkers(b);const F=p(S,{context:"initialize",markers:A.slice(),statsigOptions:C});return _.enqueue(F),T}};function h(S,_,b,C){return Object.assign({key:b,action:_,step:C,timestamp:Date.now()},S)}function p(S,_){return{eventName:u,user:S,value:null,metadata:_,time:Date.now()}}function g(S,_){var b;const C=(b=i.get(S))!==null&&b!==void 0?b:[];C.push(_),i.set(S,C)}function v(S,_){if(_ in S)return S[_]}})(Nn);var ci={},St={},Kt={},Dt={};Object.defineProperty(Dt,"__esModule",{value:!0});Dt._isTypeMatch=Dt._typeOf=void 0;function b_(a){return Array.isArray(a)?"array":typeof a}Dt._typeOf=b_;function w_(a,i){const s=l=>Array.isArray(l)?"array":l===null?"null":typeof l;return s(a)===s(i)}Dt._isTypeMatch=w_;
1(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a._getSortedObject=a._DJB2Object=a._DJB2=void 0;const i=Dt,s=h=>{let p=0;for(let g=0;g<h.length;g++){const v=h.charCodeAt(g);p=(p<<5)-p+v,p=p&p}return String(p>>>0)};a._DJB2=s;const l=(h,p)=>(0,a._DJB2)(JSON.stringify((0,a._getSortedObject)(h,p)));a._DJB2Object=l;const u=(h,p)=>{if(h==null)return null;const g=Object.keys(h).sort(),v={};return g.forEach(S=>{const _=h[S];if(p===0||(0,i._typeOf)(_)!=="object"){v[S]=_;return}v[S]=(0,a._getSortedObject)(_,p!=null?p-1:p)}),v};a._getSortedObject=u})(Kt);Object.defineProperty(St,"__esModule",{value:!0});St._getStorageKey=St._getUserStorageKey=void 0;const qc=Kt;function Zc(a,i,s){var l;if(s)return s(a,i);const u=i&&i.customIDs?i.customIDs:{},h=[`uid:${(l=i==null?void 0:i.userID)!==null&&l!==void 0?l:""}`,`cids:${Object.keys(u).sort((p,g)=>p.localeCompare(g)).map(p=>`${p}-${u[p]}`).join(",")}`,`k:${a}`];return(0,qc._DJB2)(h.join("|"))}St._getUserStorageKey=Zc;function C_(a,i,s){return i?Zc(a,i,s):(0,qc._DJB2)(`k:${a}`)}St._getStorageKey=C_;var di={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.NetworkParam=a.NetworkDefault=a.Endpoint=void 0,a.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},a.NetworkDefault={[a.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[a.Endpoint._initialize]:"https://featureassets.org/v1",[a.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},a.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(di);var ct={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a._cloneObject=a._getUnloadEvent=a._getCurrentPageUrlSafe=a._addDocumentEventListenerSafe=a._addWindowEventListenerSafe=a._isServerEnv=a._getDocumentSafe=a._getWindowSafe=void 0;const i=Te,s=()=>typeof window<"u"?window:null;a._getWindowSafe=s;const l=()=>{var _;const b=(0,a._getWindowSafe)();return(_=b==null?void 0:b.document)!==null&&_!==void 0?_:null};a._getDocumentSafe=l;const u=()=>{if((0,a._getDocumentSafe)()!==null)return!1;const _=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||_};a._isServerEnv=u;const h=(_,b)=>{const C=(0,a._getWindowSafe)();typeof(C==null?void 0:C.addEventListener)=="function"&&C.addEventListener(_,b)};a._addWindowEventListenerSafe=h;const p=(_,b)=>{const C=(0,a._getDocumentSafe)();typeof(C==null?void 0:C.addEventListener)=="function"&&C.addEventListener(_,b)};a._addDocumentEventListenerSafe=p;const g=()=>{var _;try{return(_=(0,a._getWindowSafe)())===null||_===void 0?void 0:_.location.href.split(/[?#]/)[0]}catch{return}};a._getCurrentPageUrlSafe=g;const v=()=>{const _=(0,a._getWindowSafe)();return _&&"onpagehide"in _?"pagehide":"beforeunload"};a._getUnloadEvent=v;const S=(_,b)=>{try{return JSON.parse(JSON.stringify(b))}catch{return i.Log.error(`Failed to clone object ${_}`),null}};a._cloneObject=S})(ct);var Sr={},bt={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a._setObjectInStorage=a._getObjectFromStorage=a.Storage=void 0;const i=Te,s=ct,l={},u={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:b=>l[b]?l[b]:null,setItem:(b,C)=>{l[b]=C},removeItem:b=>{delete l[b]},getAllKeys:()=>Object.keys(l)};let h=null;try{const b=(0,s._getWindowSafe)();b&&b.localStorage&&typeof b.localStorage.getItem=="function"&&(h={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:C=>b.localStorage.getItem(C),setItem:(C,A)=>b.localStorage.setItem(C,A),removeItem:C=>b.localStorage.removeItem(C),getAllKeys:()=>Object.keys(b.localStorage)})}catch{i.Log.warn("Failed to setup localStorageProvider.")}let p=h??u,g=p;function v(b){try{return b()}catch(C){if(C instanceof Error&&C.name==="SecurityError")return a.Storage._setProvider(u),null;throw C}}a.Storage={isReady:()=>g.isReady(),isReadyResolver:()=>g.isReadyResolver(),getProviderName:()=>g.getProviderName(),getItem:b=>v(()=>g.getItem(b)),setItem:(b,C)=>v(()=>g.setItem(b,C)),removeItem:b=>g.removeItem(b),getAllKeys:()=>g.getAllKeys(),_setProvider:b=>{p=b,g=b},_setDisabled:b=>{b?g=u:g=p}};function S(b){const C=a.Storage.getItem(b);try{return JSON.parse(C??"null")}catch{return i.Log.error(`Failed to parse value for key "${b}"`),null}}a._getObjectFromStorage=S;function _(b,C){a.Storage.setItem(b,JSON.stringify(C))}a._setObjectInStorage=_})(bt);var br={};
1Object.defineProperty(br,"__esModule",{value:!0});br.getUUID=void 0;function E_(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let a=new Date().getTime(),i=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,l=>{let u=Math.random()*16;return a>0?(u=(a+u)%16|0,a=Math.floor(a/16)):(u=(i+u)%16|0,i=Math.floor(i/16)),(l==="x"?u:u&7|8).toString(16)})}br.getUUID=E_;var hi={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a._notifyVisibilityChanged=a._subscribeToVisiblityChanged=a._isUnloading=a._isCurrentlyVisible=void 0;const i=ct,s="foreground",l="background",u=[];let h=s,p=!1;const g=()=>h===s;a._isCurrentlyVisible=g;const v=()=>p;a._isUnloading=v;const S=b=>{u.unshift(b)};a._subscribeToVisiblityChanged=S;const _=b=>{b!==h&&(h=b,u.forEach(C=>C(b)))};a._notifyVisibilityChanged=_,(0,i._addWindowEventListenerSafe)("focus",()=>{p=!1,(0,a._notifyVisibilityChanged)(s)}),(0,i._addWindowEventListenerSafe)("blur",()=>(0,a._notifyVisibilityChanged)(l)),(0,i._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,a._notifyVisibilityChanged)(document.visibilityState==="visible"?s:l)}),(0,i._addWindowEventListenerSafe)((0,i._getUnloadEvent)(),()=>{p=!0,(0,a._notifyVisibilityChanged)(l)})})(hi);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.StatsigSession=a.SessionID=void 0;const i=St,s=Te,l=bt,u=br,h=hi,p=30*60*1e3,g=4*60*60*1e3,v=15e3,S={};(0,h._subscribeToVisiblityChanged)($=>
1{$==="background"&&Object.values(S).forEach(D=>F(D))}),a.SessionID={get:$=>a.StatsigSession.get($).data.sessionID},a.StatsigSession={get:($,D=!0)=>{S[$]==null&&(S[$]=he($));const P=S[$];return _(P,D)},overrideInitialSessionID:($,D)=>{const P=Date.now(),ee={data:{sessionID:$,startTime:P,lastUpdate:P},sdkKey:D,lastPersistedAt:Date.now(),storageKey:T(D)};F(ee),S[D]=ee},checkForIdleSession:$=>{const D=S[$];if(!D)return;b(D)&&F(D)}};function _($,D){const P=Date.now();return b($)?F($):D&&($.data.lastUpdate=P,K($)),$}function b($){var D;const P=$.data,ee=C(P)||A(P);return ee&&($.data=ue(),(D=__STATSIG__==null?void 0:__STATSIG__.instance($.sdkKey))===null||D===void 0||D.$emt({name:"session_expired"})),ee}function C({lastUpdate:$}){return Date.now()-$>p}function A({startTime:$}){return Date.now()-$>g}function T($){return`statsig.session_id.${(0,i._getStorageKey)($)}`}function F($){try{(0,l._setObjectInStorage)($.storageKey,$.data),$.lastPersistedAt=Date.now()}catch{s.Log.warn("Failed to save SessionID")}}function K($){Date.now()-$.lastPersistedAt>v&&F($)}function Y($){return(0,l._getObjectFromStorage)($)}function he($){const D=T($),P=Y(D);return P&&P.sessionID&&P.startTime&&P.lastUpdate?{data:P,sdkKey:$,lastPersistedAt:0,storageKey:D}:{data:ue(),sdkKey:$,lastPersistedAt:0,storageKey:D}}function ue(){return{sessionID:(0,u.getUUID)(),startTime:Date.now(),lastUpdate:Date.now()}}})(Sr);var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be._createLayerParameterExposure=Be._createConfigExposure=Be._mapExposures=Be._createGateExposure=Be._isExposureEvent=void 0;const Qc="statsig::config_exposure",ed="statsig::gate_exposure",td="statsig::layer_exposure",Xo=(a,i,s,l,u)=>(s.bootstrapMetadata&&(l.bootstrapMetadata=s.bootstrapMetadata),{eventName:a,user:i,value:null,metadata:A_(s,l),secondaryExposures:u,time:Date.now()}),I_=({eventName:a})=>a===ed||a===Qc||a===td;Be._isExposureEvent=I_;const O_=(a,i,s)=>{var l,u,h;const p={gate:i.name,gateValue:String(i.value),ruleID:i.ruleID};return((l=i.__evaluation)===null||l===void 0?void 0:l.version)!=null&&(p.configVersion=i.__evaluation.version),Xo(ed,a,i.details,p,Bn((h=(u=i.__evaluation)===null||u===void 0?void 0:u.secondary_exposures)!==null&&h!==void 0?h:[],s))};Be._createGateExposure=O_;function Bn(a,i){return a.map(s=>typeof s=="string"?(i??{})[s]:s).filter(s=>s!=null)}Be._mapExposures=Bn;const R_=(a,i,s)=>{var l,u,h,p;const g={config:i.name,ruleID:i.ruleID};return((l=i.__evaluation)===null||l===void 0?void 0:l.version)!=null&&(g.configVersion=i.__evaluation.version),((u=i.__evaluation)===null||u===void 0?void 0:u.passed)!=null&&(g.rulePassed=String(i.__evaluation.passed)),Xo(Qc,a,i.details,g,Bn((p=(h=i.__evaluation)===null||h===void 0?void 0:h.secondary_exposures)!==null&&p!==void 0?p:[],s))};Be._createConfigExposure=R_;const M_=(a,i,s,l)=>{var u,h,p,g,v,S,_;const b=i.__evaluation,C=((u=b==null?void 0:b.explicit_parameters)===null||u===void 0?void 0:u.includes(s))===!0;let A="",T=(h=b==null?void 0:b.undelegated_secondary_exposures)!==null&&h!==void 0?h:[];C&&(A=(p=b.allocated_experiment_name)!==null&&p!==void 0?p:"",T=(g=b.secondary_exposures)!==null&&g!==void 0?g:[]);const F=(v=i.__evaluation)===null||v===void 0?void 0:v.parameter_rule_ids,K={config:i.name,parameterName:s,ruleID:(S=F==null?void 0:F[s])!==null&&S!==void 0?S:i.ruleID,allocatedExperiment:A,isExplicitParameter:String(C)};return((_=i.__evaluation)===null||_===void 0?void 0:_.version)!=null&&(K.configVersion=i.__evaluation.version),Xo(td,a,i.details,K,Bn(T,l))};Be._createLayerParameterExposure=M_;const A_=(a,i)=>(i.reason=a.reason,a.lcut&&(i.lcut=String(a.lcut)),a.receivedAt&&(i.receivedAt=String(a.receivedAt)),i);var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.LoggingEnabledOption=wt.LogEventCompressionMode=void 0;wt.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"};wt.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var fi={};Object.defineProperty(fi,"__esModule",{value:!0});fi.UrlConfiguration=void 0;const k_=Kt,xn=di,D_={[xn.Endpoint._initialize]:"i",[xn.Endpoint._rgstr]:"e",[xn.Endpoint._download_config_specs]:"d"};class x_{constructor(i,s,l,u){this.customUrl=null,this.fallbackUrls=null,this.endpoint=i,this.endpointDnsKey=D_[i],s&&(this.customUrl=s),!s&&l&&(this.customUrl=l.endsWith("/")?`${l}${i}`:`${l}/${i}`),u&&(this.fallbackUrls=u);const h=xn.NetworkDefault[i];this.defaultUrl=`${h}/${i}`}getUrl(){var i;return(i=this.customUrl)!==null&&i!==void 0?i:this.defaultUrl}getChecksum(){var i;const s=((i=this.fallbackUrls)!==null&&i!==void 0?i:[]).sort().join(",");return(0,k_._DJB2)(this.customUrl+s)}}fi.UrlConfiguration=x_;var qr=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}
1return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(ci,"__esModule",{value:!0});ci.EventLogger=void 0;const T_=St,P_=Kt,dr=Te,Ju=di,Do=ct,L_=Sr,$_=Be,Xu=wt,Ot=bt,N_=fi,qu=hi,U_=100,F_=1e4,j_=1e3,B_=6e5,z_=500,Zu=200,Zr={};class Gt{static _safeFlushAndForget(i){var s;(s=Zr[i])===null||s===void 0||s.flush().catch(()=>{})}static _safeRetryFailedLogs(i){var s;(s=Zr[i])===null||s===void 0||s._retryFailedLogs()}constructor(i,s,l,u){var h,p;this._sdkKey=i,this._emitter=s,this._network=l,this._options=u,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(h=u==null?void 0:u.loggingEnabled)!==null&&h!==void 0?h:(u==null?void 0:u.disableLogging)===!0?Xu.LoggingEnabledOption.disabled:Xu.LoggingEnabledOption.browserOnly,u!=null&&u.loggingEnabled&&u.disableLogging!==void 0&&dr.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(p=u==null?void 0:u.loggingBufferMaxSize)!==null&&p!==void 0?p:U_;const g=u==null?void 0:u.networkConfig;this._logEventUrlConfig=new N_.UrlConfiguration(Ju.Endpoint._rgstr,g==null?void 0:g.logEventUrl,g==null?void 0:g.api,g==null?void 0:g.logEventFallbackUrls)}setLogEventCompressionMode(i){this._network.setLogEventCompressionMode(i)}setLoggingEnabled(i){if(this._loggingEnabled==="disabled"&&i!=="disabled"){const s=this._getStorageKey(),l=(0,Ot._getObjectFromStorage)(s);l&&this._queue.push(...l),Ot.Storage.removeItem(s)}this._loggingEnabled=i}enqueue(i){this._shouldLogEvent(i)&&(this._normalizeAndAppendEvent(i),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&Gt._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(i){var s;const l=(s=this._nonExposedChecks[i])!==null&&s!==void 0?s:0;this._nonExposedChecks[i]=l+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var i;const s=(0,Do._isServerEnv)();s&&((i=this._options)===null||i===void 0?void 0:i.loggingEnabled)!=="always"||(Zr[this._sdkKey]=this,s||(0,qu._subscribeToVisiblityChanged)(l=>{l==="background"?Gt._safeFlushAndForget(this._sdkKey):l==="foreground"&&Gt._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(),this._startBackgroundFlushInterval())}stop(){return qr(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete Zr[this._sdkKey],yield this.flush()})}flush(){return qr(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const i=this._queue;this._queue=[],yield this._sendEvents(i)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>Zu)&&setTimeout(()=>Gt._safeFlushAndForget(this._sdkKey),Zu))}_shouldLogEvent(i){var s;if(((s=this._options)===null||s===void 0?void 0:s.loggingEnabled)!=="always"&&(0,Do._isServerEnv)())return!1;if(!(0,$_._isExposureEvent)(i))return!0;const l=i.user?i.user:{statsigEnvironment:void 0},u=(0,T_._getUserStorageKey)(this._sdkKey,l),h=i.metadata?i.metadata:{},p=[i.eventName,u,h.gate,h.config,h.ruleID,h.allocatedExperiment,h.parameterName,String(h.isExplicitParameter),h.reason].join("|"),g=this._lastExposureTimeMap[p],v=Date.now();return g&&v-g<B_?!1:(Object.keys(this._lastExposureTimeMap).length>j_&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[p]=v,!0)}_sendEvents(i){return qr(this,void 0,void 0,function*(){var s,l;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(i),!1;try{const h=(0,qu._isUnloading)()&&this._network.isBeaconSupported()&&((l=(s=this._options)===null||s===void 0?void 0:s.networkConfig)===null||l===void 0?void 0:l.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:i}),(h?this._sendEventsViaBeacon(i):yield this._sendEventsViaPost(i)).success?(this._emitter({name:"logs_flushed",events:i}),!0):(dr.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(i),!1)}catch{return dr.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(i){return qr(this,void 0,void 0,function*(){var s;const l=yield this._network.post(this._getRequestData(i)),u=(s=l==null?void 0:l.code)!==null&&s!==void 0?s:-1;return{success:u>=200&&u<300}})}_sendEventsViaBeacon(i){return{success:this._network.beacon(this._getRequestData(i))}}_getRequestData(i){return{sdkKey:this._sdkKey,data:{events:i},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[Ju.NetworkParam.EventC
1ount]:String(i.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(i){for(;i.length>z_;)i.shift();const s=this._getStorageKey();try{const l=this._getFailedLogsFromStorage(s);(0,Ot._setObjectInStorage)(s,[...l,...i])}catch{dr.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(i){let s=[];try{const l=(0,Ot._getObjectFromStorage)(i);return Array.isArray(l)&&(s=l),s}catch{return[]}}_retryFailedLogs(){const i=this._getStorageKey();qr(this,void 0,void 0,function*(){Ot.Storage.isReady()||(yield Ot.Storage.isReadyResolver());const s=(0,Ot._getObjectFromStorage)(i);s&&(Ot.Storage.removeItem(i),yield this._sendEvents(s))}).catch(()=>{dr.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,P_._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(i){i.user&&(i.user=Object.assign({},i.user),delete i.user.privateAttributes);const s={},l=this._getCurrentPageUrl();l&&(s.statsigMetadata={currentPage:l});const u=Object.assign(Object.assign({},i),s);dr.Log.debug("Enqueued Event:",u),this._queue.push(u)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var i;if(((i=this._options)===null||i===void 0?void 0:i.includeCurrentPageUrlWithEvents)!==!1)return(0,Do._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var i,s;const l=(s=(i=this._options)===null||i===void 0?void 0:i.loggingIntervalMs)!==null&&s!==void 0?s:F_,u=setInterval(()=>{const h=Zr[this._sdkKey];!h||h._flushIntervalId!==u?clearInterval(u):(Gt._safeFlushAndForget(this._sdkKey),L_.StatsigSession.checkForIdleSession(this._sdkKey))},l);this._flushIntervalId=u}}ci.EventLogger=Gt;var ui={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.StatsigMetadataProvider=a.SDK_VERSION=void 0,a.SDK_VERSION="3.31.2";let i={sdkVersion:a.SDK_VERSION,sdkType:"js-mono"};a.StatsigMetadataProvider={get:()=>i,add:s=>{i=Object.assign(Object.assign({},i),s)}}})(ui);var zn={},ut={};Object.defineProperty(ut,"__esModule",{value:!0});ut.getCookieName=ut.StableID=void 0;const rd=St,G_=Te,id=ct,nd=bt,V_=br,Qr={},qo={},Qu={};ut.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:a=>{if(Qu[a])return null;if(Qr[a]!=null)return Qr[a];let i=null;return i=K_(a),i!=null?(Qr[a]=i,xo(i,a),i):(i=W_(a),i==null&&(i=(0,V_.getUUID)()),xo(i,a),ec(i,a),Qr[a]=i,i)},setOverride:(a,i)=>{Qr[i]=a,xo(a,i),ec(a,i)},_setCookiesEnabled:(a,i)=>{qo[a]=i},_setDisabled:(a,i)=>{Qu[a]=i}};function sd(a){return`statsig.stable_id.${(0,rd._getStorageKey)(a)}`}function xo(a,i){const s=sd(i);try{(0,nd._setObjectInStorage)(s,a)}catch{G_.Log.warn("Failed to save StableID to storage")}}function W_(a){const i=sd(a);return(0,nd._getObjectFromStorage)(i)}function K_(a){if(!qo[a]||(0,id._getDocumentSafe)()==null)return null;const i=document.cookie.split(";");for(const s of i){const[l,u]=s.trim().split("=");if(l===Zo(a))return decodeURIComponent(u)}return null}function ec(a,i){if(!qo[i]||(0,id._getDocumentSafe)()==null)return;const s=new Date;s.setFullYear(s.getFullYear()+1),document.cookie=`${Zo(i)}=${encodeURIComponent(a)}; expires=${s.toUTCString()}; path=/`}function Zo(a){return`statsig.stable_id.${(0,rd._getStorageKey)(a)}`}ut.getCookieName=Zo;Object.defineProperty(zn,"__esModule",{value:!0});zn.PrecomputedEvaluationsContextHandle=void 0;const H_=Te,Y_=ct,J_=Sr,X_=ut;class q_{constructor(i,s,l,u,h,p){this._sdkKey=i,this._getOptions=s,this._getErrorBoundary=l,this._getValues=u,this._getUser=h,this._getSdkInstanceID=p}get sdkKey(){return this._sdkKey}get options(){return this._getOptions()}get errorBoundary(){return this._getErrorBoundary()}get values(){return this._getValues()}get user(){let i=(0,Y_._cloneObject)("StatsigUser",this._getUser());return i==null&&(H_.Log.error("Failed to clone user"),i={}),i}getSession(i=!0){return J_.StatsigSession.get(this._sdkKey,i)}get stableID(){return X_.StableID.get(this._sdkKey)}get sdkInstanceID(){return this._getSdkInstanceID()}toContext(i=!0){return{sdkKey:this.sdkKey,options:this.options,values:this.values,user:this.user,errorBoundary:this.errorBoundary,session:this.getSession(i),stableID:this.stableID,sdkInstanceID:this.sdkInstanceID}}}zn.PrecomputedEvaluationsContextHandle=q_;var gr={},yt={};
1Object.defineProperty(yt,"__esModule",{value:!0});yt._getUnitIDFromUser=yt._getFullUserHash=yt._normalizeUser=void 0;const Z_=Kt,Q_=Te,ey=ct;function ty(a,i,s){const l=(0,ey._cloneObject)("StatsigUser",a);return l==null?(Q_.Log.error("Failed to clone user"),{statsigEnvironment:void 0}):(i!=null&&i.environment!=null?l.statsigEnvironment=i.environment:s!=null&&(l.statsigEnvironment={tier:s}),l)}yt._normalizeUser=ty;function ry(a){return a?(0,Z_._DJB2Object)(a):null}yt._getFullUserHash=ry;function iy(a,i){var s,l,u;if(typeof i!="string")return a.userID;const h=i.toLowerCase();return h!=="userid"?(l=(s=a.customIDs)===null||s===void 0?void 0:s[i])!==null&&l!==void 0?l:(u=a.customIDs)===null||u===void 0?void 0:u[h]:a.userID}yt._getUnitIDFromUser=iy;var pi={};Object.defineProperty(pi,"__esModule",{value:!0});pi._typedJsonParse=void 0;const ny=Te;function sy(a,i,s){try{const l=JSON.parse(a);if(l&&typeof l=="object"&&i in l)return l}catch{}return ny.Log.error(`Failed to parse ${s}`),null}pi._typedJsonParse=sy;var To=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(gr,"__esModule",{value:!0});gr._makeDataAdapterResult=gr.DataAdapterCore=void 0;const Tn=Te,tc=ut,Pn=yt,Rt=bt,rc=pi,oy=10,ay=8;class ly{constructor(i,s){this._adapterName=i,this._cacheSuffix=s,this._options=null,this._sdkKey=null,this._cacheLimit=oy,this._lastModifiedStoreKey=`statsig.last_modified_time.${s}`,this._inMemoryCache=new uy}attach(i,s,l){this._sdkKey=i,this._options=s}getDataSync(i){const s=i&&(0,Pn._normalizeUser)(i,this._options),l=this._getCacheKey(s),u=this._inMemoryCache.get(l,s);if(u&&this._getIsCacheValueValid(u))return u;const h=this._loadFromCache(l);return h&&this._getIsCacheValueValid(h)?(this._inMemoryCache.add(l,h,this._cacheLimit),this._inMemoryCache.get(l,s)):null}setData(i,s){const l=s&&(0,Pn._normalizeUser)(s,this._options),u=this._getCacheKey(l);this._inMemoryCache.add(u,Ln("Bootstrap",i,null,l),this._cacheLimit)}_getIsCacheValueValid(i){return i.stableID==null||i.stableID===tc.StableID.get(this._getSdkKey())}_getDataAsyncImpl(i,s,l){return To(this,void 0,void 0,function*(){Rt.Storage.isReady()||(yield Rt.Storage.isReadyResolver());const u=i??this.getDataSync(s),h=[this._fetchAndPrepFromNetwork(u,s,l)];return l!=null&&l.timeoutMs&&h.push(new Promise(p=>setTimeout(p,l.timeoutMs)).then(()=>(Tn.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(h)})}_prefetchDataImpl(i,s){return To(this,void 0,void 0,function*(){const l=i&&(0,Pn._normalizeUser)(i,this._options),u=this._getCacheKey(l),h=yield this._getDataAsyncImpl(null,l,s);h&&this._inMemoryCache.add(u,Object.assign(Object.assign({},h),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(i,s,l){return To(this,void 0,void 0,function*(){var u;const h=(u=i==null?void 0:i.data)!==null&&u!==void 0?u:null,p=i!=null&&this._isCachedResultValidFor204(i,s),g=yield this._fetchFromNetwork(h,s,l,p);if(!g)return Tn.Log.debug("No response returned for latest value"),null;const v=(0,rc._typedJsonParse)(g,"has_updates","Response"),S=this._getSdkKey(),_=tc.StableID.get(S);let b=null;if((v==null?void 0:v.has_updates)===!0)b=Ln("Network",g,_,s);else if(h&&(v==null?void 0:v.has_updates)===!1)b=Ln("NetworkNotModified",h,_,s);else return null;const C=this._getCacheKey(s);return this._inMemoryCache.add(C,b,this._cacheLimit),this._writeToCache(C,b),b})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Tn.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(i){var s;const l=(s=Rt.Storage.getItem)===null||s===void 0?void 0:s.call(Rt.Storage,i);if(l==null)return null;const u=(0,rc._typedJsonParse)(l,"source","Cached Result");return u?Object.assign(Object.assign({},u),{source:"Cache"}):null}_writeToCache(i,s){const l=JSON.stringify(s);for(let u=0;u<ay;u++)try{Rt.Storage.setItem(i,l);break}catch(h){if(!(h instanceof Error)||!(h.toString().includes("QuotaExceededError")||h.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw h;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(i,this._cacheLimit-1)}this._runLocalStorageCacheEviction(i)}_runLocalStorageCacheEviction(i,s=this._cacheLimit){var l;const u=(l=(0,Rt._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&l!==void 0?l:{};u[i]=Date.now();const h=od(u,s);for(const p of h)delete u[p],Rt.Storage.removeItem(p);(0,Rt._setObjectInStorage)(this._lastModifiedStoreKey,u)}}gr.DataAdapterCore=ly;function Ln(a,i,s,l){return{source:a,data:i,receivedAt:Date.now(),stableID:s,fullUserHash:(0,Pn._getFullUserHash)(l)}}gr._makeDataAdapterResult=Ln;class uy{constructor(){this._data={}}get(i,s){var l;const u=this._data[i],h=u==null?void 0:u.stableID,p=(l=s==null?void 0:s.customIDs)===null||l===void 0?void 0:l.stableID;return p&&h&&p!==h?(Tn.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):u}add(i,s,l){const u=od(this._data,l-1);for(const h of u)delete this._data[h];this._data[i]=s}merge(i){this._data=Object.assign(Object.assign({},this._data),i)}}function od(a,i){const s=Object.keys(a);return s.length<=i?[]:i===0?s:s.sort((l,u)=>{const h=a[l],p=a[u];return typeof h=="object"&&typeof p=="object"?h.receivedAt-p.receivedAt:h-p}).slice(0,s.length-i)}var ad={};Object.defineProperty(ad,"__esModule",{value:!0});var Qo={},wr={};
1Object.defineProperty(wr,"__esModule",{value:!0});wr.SDKType=void 0;const ic={};let hr;wr.SDKType={_get:a=>{var i;return((i=ic[a])!==null&&i!==void 0?i:"js-mono")+(hr??"")},_setClientType(a,i){ic[a]=i},_setBindingType(a){(!hr||hr==="-react")&&(hr="-"+a)}};(function(a){var i=Z&&Z.__awaiter||function(b,C,A,T){function F(K){return K instanceof A?K:new A(function(Y){Y(K)})}return new(A||(A=Promise))(function(K,Y){function he(D){try{$(T.next(D))}catch(P){Y(P)}}function ue(D){try{$(T.throw(D))}catch(P){Y(P)}}function $(D){D.done?K(D.value):F(D.value).then(he,ue)}$((T=T.apply(b,C||[])).next())})};Object.defineProperty(a,"__esModule",{value:!0}),a.ErrorBoundary=a.EXCEPTION_ENDPOINT=void 0;const s=Te,l=wr,u=ui;a.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const h="[Statsig] UnknownError";class p{constructor(C,A,T,F){this._sdkKey=C,this._options=A,this._emitter=T,this._lastSeenError=F,this._seen=new Set}wrap(C,A){try{const T=C;S(T).forEach(F=>{const K=T[F];"$EB"in K||(T[F]=(...Y)=>this._capture(A?`${A}:${F}`:F,()=>K.apply(C,Y)),T[F].$EB=!0)})}catch(T){this._onError("eb:wrap",T)}}logError(C,A){this._onError(C,A)}getLastSeenErrorAndReset(){const C=this._lastSeenError;return this._lastSeenError=void 0,C??null}attachErrorIfNoneExists(C){this._lastSeenError||(this._lastSeenError=g(C))}_capture(C,A){try{const T=A();return T&&T instanceof Promise?T.catch(F=>this._onError(C,F)):T}catch(T){return this._onError(C,T),null}}_onError(C,A){try{s.Log.warn(`Caught error in ${C}`,{error:A}),i(this,void 0,void 0,function*(){var F,K,Y,he,ue,$,D;const P=A||Error(h),ee=P instanceof Error,Ce=ee?P.name:"No Name",Ee=g(P);if(this._lastSeenError=Ee,this._seen.has(Ce))return;if(this._seen.add(Ce),!((K=(F=this._options)===null||F===void 0?void 0:F.networkConfig)===null||K===void 0)&&K.preventAllNetworkTraffic){(Y=this._emitter)===null||Y===void 0||Y.call(this,{name:"error",error:A,tag:C});return}const it=l.SDKType._get(this._sdkKey),Ge=u.StatsigMetadataProvider.get(),Yt=ee?P.stack:v(P),xt=Object.assign({tag:C,exception:Ce,info:Yt,statsigOptions:_(this._options)},Object.assign(Object.assign({},Ge),{sdkType:it}));yield(($=(ue=(he=this._options)===null||he===void 0?void 0:he.networkConfig)===null||ue===void 0?void 0:ue.networkOverrideFunc)!==null&&$!==void 0?$:fetch)(a.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(it),"STATSIG-SDK-VERSION":String(Ge.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(xt)}),(D=this._emitter)===null||D===void 0||D.call(this,{name:"error",error:A,tag:C})}).then(()=>{}).catch(()=>{})}catch{}}}a.ErrorBoundary=p;function g(b){return b instanceof Error?b:typeof b=="string"?new Error(b):new Error("An unknown error occurred.")}function v(b){try{return JSON.stringify(b)}catch{return h}}function S(b){const C=new Set;let A=Object.getPrototypeOf(b);for(;A&&A!==Object.prototype;)Object.getOwnPropertyNames(A).filter(T=>typeof(A==null?void 0:A[T])=="function").forEach(T=>C.add(T)),A=Object.getPrototypeOf(A);return Array.from(C)}function _(b){if(!b)return{};const C={};return Object.keys(b).forEach(A=>{const T=A,F=b[T];switch(typeof F){case"number":case"bigint":case"boolean":C[String(T)]=F;break;case"string":F.length<50?C[String(T)]=F:C[String(T)]="set";break;case"object":T==="environment"?C.environment=F:T==="networkConfig"?C.networkConfig=F:C[String(T)]=F!=null?"set":"unset";break}}),C}})(Qo);var ld={};Object.defineProperty(ld,"__esModule",{value:!0});var ud={};Object.defineProperty(ud,"__esModule",{value:!0});var cd={};Object.defineProperty(cd,"__esModule",{value:!0});var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.createMemoKey=Wt.MemoPrefix=void 0;Wt.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const cy=new Set([]),dy=new Set(["userPersistedValues"]);function hy(a,i,s){let l=`${a}|${i}`;if(!s)return l;for(const u of Object.keys(s)){if(dy.has(u))return;cy.has(u)?l+=`|${u}=true`:l+=`|${u}=${s[u]}`}return l}Wt.createMemoKey=hy;var Gn={},mr={},Vn={},fy=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}
1return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(Vn,"__esModule",{value:!0});Vn._fetchTxtRecords=void 0;const py=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),gy="https://cloudflare-dns.com/dns-query",my=["i","e","d"],_y=200;function yy(a){return fy(this,void 0,void 0,function*(){const i=yield a(gy,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:py});if(!i.ok){const u=new Error("Failed to fetch TXT records from DNS");throw u.name="DnsTxtFetchError",u}const s=yield i.arrayBuffer(),l=new Uint8Array(s);return vy(l)})}Vn._fetchTxtRecords=yy;function vy(a){const i=a.findIndex((l,u)=>u<_y&&String.fromCharCode(l)==="="&&my.includes(String.fromCharCode(a[u-1])));if(i===-1){const l=new Error("Failed to parse TXT records from DNS");throw l.name="DnsTxtParseError",l}let s="";for(let l=i-1;l<a.length;l++)s+=String.fromCharCode(a[l]);return s.split(",")}var nc=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(mr,"__esModule",{value:!0});mr._isDomainFailure=mr.NetworkFallbackResolver=void 0;const Sy=Vn,by=Kt,wy=Te,zo=bt,sc=7*24*60*60*1e3,Cy=4*60*60*1e3;class Ey{constructor(i){var s;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(s=i.networkConfig)===null||s===void 0?void 0:s.networkOverrideFunc}setErrorBoundary(i){this._errorBoundary=i}tryBumpExpiryTime(i,s){var l;const u=(l=this._fallbackInfo)===null||l===void 0?void 0:l[s.endpoint];u&&(u.expiryTime=Date.now()+sc,Po(i,Object.assign(Object.assign({},this._fallbackInfo),{[s.endpoint]:u})))}getActiveFallbackUrl(i,s){var l,u;if(s.customUrl!=null&&s.fallbackUrls!=null)return null;let h=this._fallbackInfo;h==null&&(h=(l=Iy(i))!==null&&l!==void 0?l:{},this._fallbackInfo=h);const p=h[s.endpoint];return!p||Date.now()>((u=p.expiryTime)!==null&&u!==void 0?u:0)||s.getChecksum()!==p.urlConfigChecksum?(delete h[s.endpoint],this._fallbackInfo=h,Po(i,this._fallbackInfo),null):p.url?p.url:null}tryFetchUpdatedFallbackInfo(i,s,l,u){return nc(this,void 0,void 0,function*(){var h,p;try{if(!dd(l,u))return!1;const v=s.customUrl==null&&s.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(s):s.fallbackUrls,S=this._pickNewFallbackUrl((h=this._fallbackInfo)===null||h===void 0?void 0:h[s.endpoint],v);return S?(this._updateFallbackInfoWithNewUrl(i,s,S),!0):!1}catch(g){return(p=this._errorBoundary)===null||p===void 0||p.logError("tryFetchUpdatedFallbackInfo",g),!1}})}_updateFallbackInfoWithNewUrl(i,s,l){var u,h,p;const g={urlConfigChecksum:s.getChecksum(),url:l,expiryTime:Date.now()+sc,previous:[]},v=s.endpoint,S=(u=this._fallbackInfo)===null||u===void 0?void 0:u[v];S&&g.previous.push(...S.previous),g.previous.length>10&&(g.previous=[]);const _=(p=(h=this._fallbackInfo)===null||h===void 0?void 0:h[v])===null||p===void 0?void 0:p.url;_!=null&&g.previous.push(_),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[v]:g}),Po(i,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(i){return nc(this,void 0,void 0,function*(){var s;const l=this._dnsQueryCooldowns[i.endpoint];if(l&&Date.now()<l)return null;this._dnsQueryCooldowns[i.endpoint]=Date.now()+Cy;const u=[],h=yield(0,Sy._fetchTxtRecords)((s=this._networkOverrideFunc)!==null&&s!==void 0?s:fetch),p=Oy(i.defaultUrl);for(const g of h){if(!g.startsWith(i.endpointDnsKey+"="))continue;const v=g.split("=");if(v.length>1){let S=v[1];S.endsWith("/")&&(S=S.slice(0,-1)),u.push(`https://${S}${p}`)}}return u})}_pickNewFallbackUrl(i,s){var l;if(s==null)return null;const u=new Set((l=i==null?void 0:i.previous)!==null&&l!==void 0?l:[]),h=i==null?void 0:i.url;let p=null;for(const g of s){const v=g.endsWith("/")?g.slice(0,-1):g;if(!u.has(g)&&v!==h){p=v;break}}return p}}mr.NetworkFallbackResolver=Ey;function dd(a,i){var s;const l=(s=a==null?void 0:a.toLowerCase())!==null&&s!==void 0?s:"";return i||l.includes("uncaught exception")||l.includes("failed to fetch")||l.includes("networkerror when attempting to fetch resource")}mr._isDomainFailure=dd;function hd(a){return`statsig.network_fallback.${(0,by._DJB2)(a)}`}function Po(a,i){const s=hd(a);if(!i||Object.keys(i).length===0){zo.Storage.removeItem(s);return}zo.Storage.setItem(s,JSON.stringify(i))}function Iy(a){const i=hd(a),s=zo.Storage.getItem(i);if(!s)return null;try{return JSON.parse(s)}catch{return wy.Log.error("Failed to parse FallbackInfo"),null}}function Oy(a){try{return new URL(a).pathname}catch{return null}}var gi={};Object.defineProperty(gi,"__esModule",{value:!0});gi.SDKFlags=void 0;const oc={};gi.SDKFlags={setFlags:(a,i)=>{oc[a]=i},get:(a,i)=>{var s,l;return(l=(s=oc[a])===null||s===void 0?void 0:s[i])!==null&&l!==void 0?l:!1}};var mi={};
1Object.defineProperty(mi,"__esModule",{value:!0});mi.ErrorTag=void 0;mi.ErrorTag={NetworkError:"NetworkError"};var $n=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.NetworkCore=void 0;const fd=li,Go=Nn,zt=Te,rt=di,Ry=mr,My=gi,pd=wr,Ay=ct,gd=Sr,ky=ut,Dy=mi,md=ui,oi=wt,xy=hi,Ty=1e4,Py=500,Ly=3e4,$y=1e3,_d=50,Ny=_d/$y,Uy=new Set([408,500,502,503,504,522,524,599]);class Fy{constructor(i,s){this._emitter=s,this._errorBoundary=null,this._timeout=Ty,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,i&&(this._options=i),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new Ry.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(i))}setLogEventCompressionMode(i){this._options.logEventCompressionMode=i}setErrorBoundary(i){this._errorBoundary=i,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(i)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const i=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,i}beacon(i){if(!ac(i))return!1;const s=this._getInternalRequestArgs("POST",i),l=this._getPopulatedURL(s),u=navigator;return u.sendBeacon.bind(u)(l,s.body)}post(i){return $n(this,void 0,void 0,function*(){const s=this._getInternalRequestArgs("POST",i);return this._tryEncodeBody(s),yield this._tryToCompressBody(s),this._sendRequest(s)})}get(i){const s=this._getInternalRequestArgs("GET",i);return this._sendRequest(s)}_sendRequest(i){return $n(this,void 0,void 0,function*(){var s,l,u,h;if(!ac(i)||this._netConfig.preventAllNetworkTraffic)return null;const{method:p,body:g,retries:v,attempt:S}=i,_=i.urlConfig.endpoint;if(this._isRateLimited(_))return zt.Log.warn(`Request to ${_} was blocked because you are making requests too frequently.`),null;const b=S??1;let C=!1;const A=this._getPopulatedURL(i);let T=null;const F=(0,xy._isUnloading)();try{const K={method:p,body:g,headers:Object.assign({},i.headers),priority:i.priority,keepalive:F};Vy(i,b);const Y=this._leakyBucket[_];Y&&(Y.lastRequestTime=Date.now(),this._leakyBucket[_]=Y);const he=(s=this._netConfig.networkOverrideFunc)!==null&&s!==void 0?s:fetch;let ue;if(T=yield Promise.race([he(A,K).finally(()=>clearTimeout(ue)),new Promise((D,P)=>{ue=setTimeout(()=>{C=!0,P(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!T.ok){const D=yield T.text().catch(()=>"No Text"),P=new Error(`NetworkError: ${A} ${D}`);throw P.name="NetworkError",P}const $=yield T.text();return lc(i,T,b,$),this._fallbackResolver.tryBumpExpiryTime(i.sdkKey,i.urlConfig),{body:$,code:T.status}}catch(K){const Y=zy(K),he=Gy(Y??"",C);if(lc(i,T,b,"",K),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(i.sdkKey,i.urlConfig,Y,he))&&(i.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(i.sdkKey,i.urlConfig)),!v||b>v||!Uy.has((l=T==null?void 0:T.status)!==null&&l!==void 0?l:500)){(u=this._emitter)===null||u===void 0||u.call(this,{name:"error",error:K,tag:Dy.ErrorTag.NetworkError,requestArgs:i});const $=`A networking error occurred during ${p} request to ${A}.`;return zt.Log.error($,Y,K),(h=this._errorBoundary)===null||h===void 0||h.attachErrorIfNoneExists($),null}return yield Wy(b),this._sendRequest(Object.assign(Object.assign({},i),{retries:v,attempt:b+1}))}})}_getLogEventCompressionMode(i){let s=i==null?void 0:i.logEventCompressionMode;return!s&&(i==null?void 0:i.disableCompression)===!0&&(s=oi.LogEventCompressionMode.Disabled),s||(s=oi.LogEventCompressionMode.Enabled),s}_isRateLimited(i){var s;const l=Date.now(),u=(s=this._leakyBucket[i])!==null&&s!==void 0?s:{count:0,lastRequestTime:l},h=l-u.lastRequestTime,p=Math.floor(h*Ny);return u.count=Math.max(0,u.count-p),u.count>=_d?!0:(u.count+=1,u.lastRequestTime=l,this._leakyBucket[i]=u,!1)}_getPopulatedURL(i){var s;const l=(s=i.fallbackUrl)!==null&&s!==void 0?s:i.urlConfig.getUrl();(i.urlConfig.endpoint===rt.Endpoint._initialize||i.urlConfig.endpoint===rt.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=l);const u=Object.assign({[rt.NetworkParam.SdkKey]:i.sdkKey,[rt.NetworkParam.SdkType]:pd.SDKType._get(i.sdkKey),[rt.NetworkParam.SdkVersion]:md.SDK_VERSION,[rt.NetworkParam.Time]:String(Date.now()),[rt.NetworkParam.SessionID]:gd.SessionID.get(i.sdkKey)},i.params),h=Object.keys(u).map(p=>`${encodeURIComponent(p)}=${encodeURIComponent(u[p])}`).join("&");return`${l}${h?`?${h}`:""}`}_tryEncodeBody(i){var s;const l=(0,Ay._getWindowSafe)(),u=i.body;if(!(!i.isStatsigEncodable||this._options.disableStatsigEncoding||typeof u!="string"||(0,fd._getStatsigGlobalFlag)("no-encode")!=null||!(l!=null&&l.btoa)))try{i.body=l.btoa(u).split("").reverse().join(""),i.params=Object.assign(Object.assign({},(s=i.params)!==null&&s!==void 0?s:{}),{[rt.NetworkParam.StatsigEncoded]:"1"})}catch(h){zt.Log.warn(`Request encoding failed for ${i.urlConfig.getUrl()}`,h)}}_tryToCompressBody(i){return $n(this,void 0,void 0,function*(){var s;const l=i.body;if(!(typeof l!="string"||!By(i,this._options)))try{const u=new TextEncoder().encode(l),h=new CompressionStream("gzip"),p=h.writable.getWriter();p.write(u).catch(zt.Log.error),p.close().catch(zt.Log.error);const g=h.readable.getReader(),v=[];let S;for(;!(S=yield g.read()).done;)v.push(S.value);const _=v.reduce((A,T)=>A+T.length,0),b=new Uint8Array(_);let C=0;for(const A of v)b.set(A,C),C+=A.length;i.body=b,i.params=Object.assign(Object.assign({},(s=i.params)!==null&&s!==void 0?s:{}),{[rt.NetworkParam.IsGzipped]:"1"})}catch(u){zt.Log.warn(`Request compression failed for ${i.urlConfig.getUrl()}`,u)}})}_getInternalRequestArgs(i,s){const l=this._fallbackResolver.getActiveFallbackUrl(s.sdkKey,s.urlConfig),u=Object.assign(Object.assign({},s),{method:i,fallbackUrl:l});return"data"in s&&jy(u,s.data),u}}Gn.NetworkCore=Fy;const ac=a=>a.sdkKey?!0:(zt.Log.warn("Unable to make request without an SDK key"),!1),jy=(a,i)=>{const{sdkKey:s,fallbackUrl:l}=a,u=ky.StableID.get(s),h=gd.SessionID.get(s),p=pd.SDKType._get(s);a.body=JSON.stringify(Object.assign(Object.assign({},i),{statsigMetadata:Object.assign(Object.assign({},md.StatsigMetadataProvider.get()),{stableID:u,sessionID:h,sdkType:p,fallbackUrl:l})}))};function By(a,i){if(!a.isCompressable||(0,fd._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const s=a.urlConfig.customUrl!=null||a.urlConfig.fallbackUrls!=null,l=My.SDKFlags.get(a.sdkKey,"enable_log_event_compression")===!0;switch(i.logEventCompressionMode){case oi.LogEventCompressionMode.Disabled:return!1;case oi.LogEventCompressionMode.Enabled:return!(s&&!l);case oi.LogEventCompressionMode.Forced:return!0;default:return!1}}
1function zy(a){return typeof a=="string"?a:a instanceof Error?`${a.name}: ${a.message}`:"Unknown Error"}function Gy(a,i){return a.includes("Timeout")||i}function Vy(a,i){a.urlConfig.endpoint===rt.Endpoint._initialize&&Go.Diagnostics._markInitNetworkReqStart(a.sdkKey,{attempt:i})}function lc(a,i,s,l,u){a.urlConfig.endpoint===rt.Endpoint._initialize&&Go.Diagnostics._markInitNetworkReqEnd(a.sdkKey,Go.Diagnostics._getDiagnosticsData(i,s,l,u))}function Wy(a){return $n(this,void 0,void 0,function*(){yield new Promise(i=>setTimeout(i,Math.min(Py*(a*a),Ly)))})}var yd={};Object.defineProperty(yd,"__esModule",{value:!0});var vd={};Object.defineProperty(vd,"__esModule",{value:!0});var Sd={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a._fastApproxSizeOf=void 0;const i=2,s=1,l=(u,h)=>{let p=0;const g=Object.keys(u);for(let v=0;v<g.length;v++){const S=g[v],_=u[S];if(p+=S.length,typeof _=="object"&&_!==null?p+=(0,a._fastApproxSizeOf)(_,h)+i:p+=String(_).length+s,p>=h)return p}return p};a._fastApproxSizeOf=l})(Sd);var Wn={},Ky=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.StatsigClientBase=void 0;const Hy=li,Yy=Qo,Jy=ci,Vo=Te,Xy=Wt,qy=ct,Zy=Sr,Lo=ut,Qy=wt,In=bt,ev=3e3;class tv{constructor(i,s,l,u){var h,p,g,v;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const S=this.$emt.bind(this);(u==null?void 0:u.logLevel)!=null&&(Vo.Log.level=u.logLevel),u!=null&&u.disableStorage&&In.Storage._setDisabled(!0),u!=null&&u.initialSessionID&&Zy.StatsigSession.overrideInitialSessionID(u.initialSessionID,i),u!=null&&u.storageProvider&&In.Storage._setProvider(u.storageProvider),u!=null&&u.enableCookies&&Lo.StableID._setCookiesEnabled(i,u.enableCookies),u!=null&&u.disableStableID&&Lo.StableID._setDisabled(i,!0),this._sdkKey=i,this._options=u??{},this._memoCache={},this.overrideAdapter=(h=u==null?void 0:u.overrideAdapter)!==null&&h!==void 0?h:null,this._logger=new Jy.EventLogger(i,S,l,u),this._errorBoundary=new Yy.ErrorBoundary(i,u,S),this._errorBoundary.wrap(this),this._errorBoundary.wrap(s),this._errorBoundary.wrap(this._logger),l.setErrorBoundary(this._errorBoundary),this.dataAdapter=s,this.dataAdapter.attach(i,u,l),this.storageProvider=In.Storage,(v=(g=(p=this.overrideAdapter)===null||p===void 0?void 0:p.loadFromStorage)===null||g===void 0?void 0:g.call(p))===null||v===void 0||v.catch(_=>this._errorBoundary.logError("OA::loadFromStorage",_)),this._primeReadyRipcord(),rv(i,this)}updateRuntimeOptions(i){i.loggingEnabled?(this._options.loggingEnabled=i.loggingEnabled,this._logger.setLoggingEnabled(i.loggingEnabled)):i.disableLogging!=null&&(this._options.disableLogging=i.disableLogging,this._logger.setLoggingEnabled(i.disableLogging?"disabled":"browser-only")),i.disableStorage!=null&&(this._options.disableStorage=i.disableStorage,In.Storage._setDisabled(i.disableStorage)),i.enableCookies!=null&&(this._options.enableCookies=i.enableCookies,Lo.StableID._setCookiesEnabled(this._sdkKey,i.enableCookies)),i.logEventCompressionMode?this._logger.setLogEventCompressionMode(i.logEventCompressionMode):i.disableCompression&&this._logger.setLogEventCompressionMode(Qy.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return Ky(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(i,s){this._listeners[i]||(this._listeners[i]=[]),this._listeners[i].push(s)}off(i,s){if(this._listeners[i]){const l=this._listeners[i].indexOf(s);l!==-1&&this._listeners[i].splice(l,1)}}$on(i,s){s.__isInternal=!0,this.on(i,s)}$emt(i){var s;const l=u=>{try{u(i)}catch(h){if(u.__isInternal===!0){this._errorBoundary.logError(`__emit:${i.name}`,h);return}Vo.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",i)}};this._listeners[i.name]&&this._listeners[i.name].forEach(u=>
1l(u)),(s=this._listeners["*"])===null||s===void 0||s.forEach(l)}_setStatus(i,s){this.loadingStatus=i,this._memoCache={},this.$emt({name:"values_updated",status:i,values:s})}_enqueueExposure(i,s,l){if((l==null?void 0:l.disableExposureLog)===!0){this._logger.incrementNonExposureCount(i);return}this._logger.enqueue(s)}_memoize(i,s){return(l,u)=>{if(this._options.disableEvaluationMemoization)return s(l,u);const h=(0,Xy.createMemoKey)(i,l,u);return h?(h in this._memoCache||(Object.keys(this._memoCache).length>=ev&&(this._memoCache={}),this._memoCache[h]=s(l,u)),this._memoCache[h]):s(l,u)}}}Wn.StatsigClientBase=tv;function rv(a,i){var s;if((0,qy._isServerEnv)())return;const l=(0,Hy._getStatsigGlobal)(),u=(s=l.instances)!==null&&s!==void 0?s:{},h=i;u[a]!=null&&Vo.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),u[a]=h,l.firstInstance||(l.firstInstance=h),l.instances=u,__STATSIG__=l}var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.DataAdapterCachePrefix=void 0;Kn.DataAdapterCachePrefix="statsig.cached";var bd={};Object.defineProperty(bd,"__esModule",{value:!0});var je={};Object.defineProperty(je,"__esModule",{value:!0});je._makeTypedGet=je._mergeOverride=je._makeLayer=je._makeExperiment=je._makeDynamicConfig=je._makeFeatureGate=void 0;const iv=Te,nv=Dt;function ea(a,i,s,l){var u;return{name:a,details:i,ruleID:(u=s==null?void 0:s.rule_id)!==null&&u!==void 0?u:"",__evaluation:s,value:l}}function sv(a,i,s){var l;return Object.assign(Object.assign({},ea(a,i,s,(s==null?void 0:s.value)===!0)),{idType:(l=s==null?void 0:s.id_type)!==null&&l!==void 0?l:null})}je._makeFeatureGate=sv;function wd(a,i,s){var l,u;const h=(l=s==null?void 0:s.value)!==null&&l!==void 0?l:{};return Object.assign(Object.assign({},ea(a,i,s,h)),{idType:(u=s==null?void 0:s.id_type)!==null&&u!==void 0?u:null,get:Hn(a,s==null?void 0:s.value)})}je._makeDynamicConfig=wd;function ov(a,i,s){var l;const u=wd(a,i,s);return Object.assign(Object.assign({},u),{groupName:(l=s==null?void 0:s.group_name)!==null&&l!==void 0?l:null})}je._makeExperiment=ov;function av(a,i,s,l){var u,h;return Object.assign(Object.assign({},ea(a,i,s,void 0)),{get:Hn(a,s==null?void 0:s.value,l),groupName:(u=s==null?void 0:s.group_name)!==null&&u!==void 0?u:null,__value:(h=s==null?void 0:s.value)!==null&&h!==void 0?h:{}})}je._makeLayer=av;function lv(a,i,s,l){return Object.assign(Object.assign(Object.assign({},a),i),{get:Hn(a.name,s,l)})}je._mergeOverride=lv;function Hn(a,i,s){return(l,u)=>{var h;const p=(h=i==null?void 0:i[l])!==null&&h!==void 0?h:null;return p==null?u??null:u!=null&&!(0,nv._isTypeMatch)(p,u)?(iv.Log.warn(`Parameter type mismatch. '${a}.${l}' was found to be type '${typeof p}' but fallback/return type is '${typeof u}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),u??null):(s==null||s(l),p)}}je._makeTypedGet=Hn;var Cd={};Object.defineProperty(Cd,"__esModule",{value:!0});var _r={};Object.defineProperty(_r,"__esModule",{value:!0});_r.UPDATE_DETAIL_ERROR_MESSAGES=_r.createUpdateDetails=void 0;const uv=(a,i,s,l,u,h)=>({duration:s,source:i,success:a,error:l,sourceUrl:u,warnings:h});_r.createUpdateDetails=uv;_r.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."};(function(a){var i=Z&&Z.__createBinding||(Object.create?function(S,_,b,C){C===void 0&&(C=b);var A=Object.getOwnPropertyDescriptor(_,b);(!A||("get"in A?!_.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return _[b]}}),Object.defineProperty(S,C,A)}:function(S,_,b,C){C===void 0&&(C=b),S[C]=_[b]}),s=Z&&Z.__exportStar||function(S,_){for(var b in S)b!=="default"&&!Object.prototype.hasOwnProperty.call(_,b)&&i(_,S,b)};Object.defineProperty(a,"__esModule",{value:!0}),a.Storage=a.Log=a.EventLogger=a.Diagnostics=void 0;const l=li,u=Nn;Object.defineProperty(a,"Diagnostics",{enumerable:!0,get:function(){return u.Diagnostics}});const h=ci;Object.defineProperty(a,"EventLogger",{enumerable:!0,get:function(){return h.EventLogger}});const p=Te;
1Object.defineProperty(a,"Log",{enumerable:!0,get:function(){return p.Log}});const g=ui,v=bt;Object.defineProperty(a,"Storage",{enumerable:!0,get:function(){return v.Storage}}),s(li,a),s(St,a),s(zn,a),s(gr,a),s(Nn,a),s(ad,a),s(Qo,a),s(ld,a),s(ud,a),s(Kt,a),s(cd,a),s(Te,a),s(Wt,a),s(di,a),s(Gn,a),s(yd,a),s(vd,a),s(ct,a),s(wr,a),s(Sr,a),s(Sd,a),s(ut,a),s(Wn,a),s(mi,a),s(Kn,a),s(Be,a),s(ui,a),s(wt,a),s(bd,a),s(je,a),s(Cd,a),s(yt,a),s(bt,a),s(pi,a),s(Dt,a),s(fi,a),s(br,a),s(hi,a),s(_r,a),s(gi,a),Object.assign((0,l._getStatsigGlobal)(),{Log:p.Log,SDK_VERSION:g.SDK_VERSION})})(J);var Xe={},ze={};Object.defineProperty(ze,"__esModule",{value:!0});ze.isNoopClient=ze.NoopEvaluationsClient=void 0;const ai=J,Ed={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},_t=()=>{},uc=()=>Ed,Wo=()=>Promise.resolve(),cc=()=>Promise.resolve(Ed),$o={reason:"Error:NoClient"},ei=a=>(...i)=>{const s=typeof i[0]=="string"?i[0]:i[1];switch(a){case"gate":return(0,ai._makeFeatureGate)(s,$o,null);case"config":return(0,ai._makeDynamicConfig)(s,$o,null);case"layer":return(0,ai._makeLayer)(s,$o,null);case"param_store":return{name:s}}},cv={attach:_t,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:_t,setDataLegacy:_t,prefetchData:Wo},dv={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:"",lastPersistedAt:0,storageKey:""},stableID:"",storageProvider:ai.Storage,sdkInstanceID:""},hv=new ai.PrecomputedEvaluationsContextHandle("",()=>({}),()=>({}),()=>null,()=>({userID:""}),()=>""),fv={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:uc,initializeAsync:cc,shutdown:Wo,flush:Wo,updateRuntimeOptions:_t,updateUserSync:uc,updateUserAsync:cc,getContext:()=>Object.assign({},dv),getContextHandle:()=>hv,checkGate:()=>!1,getFeatureGate:ei("gate"),getDynamicConfig:ei("config"),getExperiment:ei("config"),getLayer:ei("layer"),getParameterStore:ei("param_store"),logEvent:_t,on:_t,off:_t,$on:_t,$emt:_t,dataAdapter:cv};ze.NoopEvaluationsClient=fv;function pv(a){return"isNoop"in a}ze.isNoopClient=pv;Object.defineProperty(Xe,"__esModule",{value:!0});const gv=re,mv=ze;Xe.default=(0,gv.createContext)({renderVersion:0,client:mv.NoopEvaluationsClient,isLoading:!0});var Yn={},_i={},Jn={},ta={},ra={},Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.V1InitializeContainer=void 0;const _v=J;class yv{constructor(i){this._values=i}getGate(i){return this._getResultFromLookup(this._values.feature_gates,i)}getConfig(i){return this._getResultFromLookup(this._values.dynamic_configs,i)}getLayer(i){return this._getResultFromLookup(this._values.layer_configs,i)}getParamStore(i){return this._getResultFromLookup(this._values.param_stores,i)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(i,s){var l,u;return i&&(u=(l=i[s])!==null&&l!==void 0?l:i[(0,_v._DJB2)(s)])!==null&&u!==void 0?u:null}}Xn.V1InitializeContainer=yv;var qn={};Object.defineProperty(qn,"__esModule",{value:!0});qn.V2InitializeContainer=void 0;const vv=J;class Sv{constructor(i){this._values=i}getGate(i){var s,l,u;const h=this._getResultFromLookup(this._values.feature_gates,i);return h?{name:i,value:h.v===!0,rule_id:(s=h.r)!==null&&s!==void 0?s:"default",secondary_exposures:(l=h.s)!==null&&l!==void 0?l:[],id_type:(u=h.i)!==null&&u!==void 0?u:""}:null}getConfig(i){var s,l,u,h;const p=this._getResultFromLookup(this._values.dynamic_configs,i);return p?{name:i,value:(s=this._values.values[p.v])!==null&&s!==void 0?s:{},rule_id:p.r,secondary_exposures:(l=p.s)!==null&&l!==void 0?l:[],id_type:(u=p.i)!==null&&u!==void 0?u:"",is_user_in_experiment:p.ue===!0,passed:p.p===!0,group_name:(h=p.gn)!==null&&h!==void 0?h:void 0,is_experiment_active:p.ea===!0,group:p.r,is_device_based:p.i==="stableID"}:null}getLayer(i){var s,l,u,h,p,g;const v=this._getResultFromLookup(this._values.layer_configs,i);return v?{name:i,value:(s=this._values.values[v.v])!==null&&s!==void 0?s:{},rule_id:v.r,secondary_exposures:(l=v.s)!==null&&l!==void 0?l:[],is_user_in_experiment:v.ue===!0,group_name:(u=v.gn)!==null&&u!==void 0?u:void 0,is_experiment_active:v.ea===!0,group:v.r,is_device_based:v.i==="stableID",allocated_experiment_name:(h=v.ae)!==null&&h!==void 0?h:"",explicit_parameters:(p=v.ep)!==null&&p!==void 0?p:[],undelegated_secondary_exposures:(g=v.us)!==null&&g!==void 0?g:[],parameter_rule_ids:v.pr}:null}getParamStore(i){return this._getResultFromLookup(this._values.param_stores,i)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(i,s){var l,u;return i&&(u=(l=i[s])!==null&&l!==void 0?l:i[(0,vv._DJB2)(s)])!==null&&u!==void 0?u:null}}qn.V2InitializeContainer=Sv;Object.defineProperty(ra,"__esModule",{value:!0});const fr=J,bv=Xn,wv=qn;class Cv{constructor(i,s){this._sdkKey=i,this._options=s,this._valuesForExter
1nalUse=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._valuesForExternalUse=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._valuesForExternalUse}setValues(i,s){var l,u;if(!i)return!1;const h=(0,fr._typedJsonParse)(i.data,"has_updates","EvaluationResponse");return h==null?!1:(this._source=i.source,(h==null?void 0:h.has_updates)!==!0||((l=h.time)!==null&&l!==void 0?l:0)<this._lcut||(this._valuesForExternalUse=(0,fr._typedJsonParse)(i.data,"has_updates","EvaluationResponse"),this._lcut=h.time,this._receivedAt=i.receivedAt,h.response_format==="init-v2"?this._values=new wv.V2InitializeContainer(h):this._values=new bv.V1InitializeContainer(h),this._bootstrapMetadata=this._extractBootstrapMetadata(i.source,h),i.source&&h.user&&this._setWarningState(s,h),fr.SDKFlags.setFlags(this._sdkKey,(u=h.sdk_flags)!==null&&u!==void 0?u:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(i){const s=this._values?this._values.getGate(i):null;return this._getDetailedStoreResult(s)}getConfig(i){const s=this._values?this._values.getConfig(i):null;return this._getDetailedStoreResult(s)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(i){const s=this._values?this._values.getLayer(i):null;return this._getDetailedStoreResult(s)}getParamStore(i){const s=this._values?this._values.getParamStore(i):null;return this._getDetailedStoreResult(s)}getSource(){return this._source}getExposureMapping(){var i;return(i=this._values)===null||i===void 0?void 0:i.getExposureMapping()}_extractBootstrapMetadata(i,s){if(i!=="Bootstrap")return null;const l={};return s.user&&(l.user=s.user),s.sdkInfo&&(l.generatorSDKInfo=s.sdkInfo),l.lcut=s.time,l}_getDetailedStoreResult(i){return{result:i,details:this._getDetails(i==null)}}_setWarningState(i,s){var l,u,h;const p=fr.StableID.get(this._sdkKey);
1if(((l=i.customIDs)===null||l===void 0?void 0:l.stableID)!==p&&(!((u=i.customIDs)===null||u===void 0)&&u.stableID||p)){this._warnings.add("StableIDMismatch");return}if("user"in s){let g=s.user,v=Object.assign(Object.assign({},i),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});!((h=this._options)===null||h===void 0)&&h.disableStableID&&(v=Object.assign(Object.assign({},v),{customIDs:Object.assign(Object.assign({},v.customIDs),{stableID:void 0})}),g=Object.assign(Object.assign({},g),{customIDs:Object.assign(Object.assign({},g.customIDs),{stableID:void 0})})),(0,fr._getFullUserHash)(v)!==(0,fr._getFullUserHash)(g)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const i={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(i.warnings=Array.from(this._warnings)),i}_getDetails(i){var s,l;const u=this.getCurrentSourceDetails();let h=u.reason;const p=(s=u.warnings)!==null&&s!==void 0?s:[];this._source==="Bootstrap"&&p.length>0&&(h=h+p[0]),h!=="Uninitialized"&&h!=="NoValues"&&(h=`${h}:${i?"Unrecognized":"Recognized"}`);const g=this._source==="Bootstrap"&&(l=this._bootstrapMetadata)!==null&&l!==void 0?l:void 0;return g&&(u.bootstrapMetadata=g),Object.assign(Object.assign({},u),{reason:h})}}ra.default=Cv;var Zn={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn._resolveDeltasResponse=void 0;const dc=J,Ev=2;function Iv(a,i){const s=(0,dc._typedJsonParse)(i,"checksum","DeltasEvaluationResponse");if(!s)return{hadBadDeltaChecksum:!0};const l=Ov(a,s),u=Rv(l),h=(0,dc._DJB2Object)({feature_gates:u.feature_gates,dynamic_configs:u.dynamic_configs,layer_configs:u.layer_configs},Ev);return h===s.checksumV2?JSON.stringify(u):{hadBadDeltaChecksum:!0,badChecksum:h,badMergedConfigs:u,badFullResponse:s.deltas_full_response}}Qn._resolveDeltasResponse=Iv;function Ov(a,i){return Object.assign(Object.assign(Object.assign({},a),i),{feature_gates:Object.assign(Object.assign({},a.feature_gates),i.feature_gates),layer_configs:Object.assign(Object.assign({},a.layer_configs),i.layer_configs),dynamic_configs:Object.assign(Object.assign({},a.dynamic_configs),i.dynamic_configs)})}function Rv(a){const i=a;return No(a.deleted_gates,i.feature_gates),delete i.deleted_gates,No(a.deleted_configs,i.dynamic_configs),delete i.deleted_configs,No(a.deleted_layers,i.layer_configs),delete i.deleted_layers,i}function No(a,i){a==null||a.forEach(s=>{delete i[s]})}var hc=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(Zn,"__esModule",{value:!0});const On=J,Mv=Qn;class Av extends On.NetworkCore{constructor(i,s){super(i,s);const l=i==null?void 0:i.networkConfig;this._option=i,this._initializeUrlConfig=new On.UrlConfiguration(On.Endpoint._initialize,l==null?void 0:l.initializeUrl,l==null?void 0:l.api,l==null?void 0:l.initializeFallbackUrls)}fetchEvaluations(i,s,l,u,h){return hc(this,void 0,void 0,function*(){var p,g,v,S,_,b;const C=s?(0,On._typedJsonParse)(s,"has_updates","InitializeResponse"):null;let A={user:u,hash:(v=(g=(p=this._option)===null||p===void 0?void 0:p.networkConfig)===null||g===void 0?void 0:g.initializeHashAlgorithm)!==null&&v!==void 0?v:"djb2",deltasResponseRequested:!1,full_checksum:null};if(C!=null&&C.has_updates){const T=(C==null?void 0:C.hash_used)!==((b=(_=(S=this._option)===null||S===void 0?void 0:S.networkConfig)===null||_===void 0?void 0:_.initializeHashAlgorithm)!==null&&b!==void 0?b:"djb2");A=Object.assign(Object.assign({},A),{sinceTime:h&&!T?C.time:0,previousDerivedFields:"derived_fields"in C&&h?C.derived_fields:{},deltasResponseRequested:!0,full_checksum:C.full_checksum,partialUserMatchSinceTime:T?0:C.time})}return this._fetchEvaluations(i,C,A,l)})}_fetchEvaluations(i,s,l,u){return hc(this,void 0,void 0,function*(){var h,p;const g=yield this.post({sdkKey:i,urlConfig:this._initializeUrlConfig,data:l,retries:2,isStatsigEncodable:!0,priority:u});if((g==null?void 0:g.code)===204)return'{"has_updates": false}';if((g==null?void 0:g.code)!==200)return(h=g==null?void 0:g.body)!==null&&h!==void 0?h:null;if((s==null?void 0:s.has_updates)!==!0||((p=g.body)===null||p===void 0?void 0:p.includes('"is_delta":true'))!==!0||l.deltasResponseRequested!==!0)return g.body;const v=(0,Mv._resolveDeltasResponse)(s,g.body);return typeof v=="string"?v:this._fetchEvaluations(i,s,Object.assign(Object.assign(Object.assign({},l),v),{deltasResponseRequested:!1}),u)})}}Zn.default=Av;var es={};Object.defineProperty(es,"__esModule",{value:!0});es._makeParamStoreGetter=void 0;const Id=J,ts={disableExposureLog:!0};function rs(a){return a==null||a.disableExposureLog===!1}function ia(a,i){return i!=null&&!(0,Id._isTypeMatch)(a,i)}function kv(a,i){return a.value}function Dv(a,i,s){return a.getFeatureGate(i.gate_name,rs(s)?void 0:ts).value?i.pass_value:i.fail_value}function xv(a,i,s,l){const h=a.getDynamicConfig(i.config_name,rs(l)?void 0:ts).get(i.param_name);return ia(h,s)?s:h}function Tv(a,i,s,l){const h=a.getExperiment(i.experiment_name,rs(l)?void 0:ts).get(i.param_name);return ia(h,s)?s:h}function Pv(a,i,s,l){const h=a.getLayer(i.layer_name,rs(l)?void 0:ts).get(i.param_name);return ia(h,s)?s:h}function Lv(a,i,s){return(l,u)=>{if(i==null)return u;const h=i[l];if(h==null||u!=null&&(0,Id._typeOf)(u)!==h.param_type)return u;switch(h.ref_type){case"static":return kv(h);case"gate":return Dv(a,h,s);case"dynamic_config":return xv(a,h,u,s);case"experiment":return Tv(a,h,u,s);case"layer":return Pv(a,h,u,s);default:return u}}}es._makeParamStoreGetter=Lv;var is={},$v=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}
1return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(is,"__esModule",{value:!0});is.StatsigEvaluationsDataAdapter=void 0;const jt=J,fc=Zn;class Nv extends jt.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(i,s,l){super.attach(i,s,l),l!==null&&l instanceof fc.default?this._network=l:this._network=new fc.default(s??{})}getDataAsync(i,s,l){return this._getDataAsyncImpl(i,(0,jt._normalizeUser)(s,this._options),l)}prefetchData(i,s){return this._prefetchDataImpl(i,s)}setData(i){const s=(0,jt._typedJsonParse)(i,"has_updates","data");s&&"user"in s?super.setData(i,s.user):jt.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(i,s){super.setData(i,s)}_fetchFromNetwork(i,s,l,u){return $v(this,void 0,void 0,function*(){var h;const p=yield(h=this._network)===null||h===void 0?void 0:h.fetchEvaluations(this._getSdkKey(),i,l==null?void 0:l.priority,s,u);return p??null})}_getCacheKey(i){var s;const l=(0,jt._getStorageKey)(this._getSdkKey(),i,(s=this._options)===null||s===void 0?void 0:s.customUserCacheKeyFunc);return`${jt.DataAdapterCachePrefix}.${this._cacheSuffix}.${l}`}_isCachedResultValidFor204(i,s){return i.fullUserHash!=null&&i.fullUserHash===(0,jt._getFullUserHash)(s)}}is.StatsigEvaluationsDataAdapter=Nv;var Rn=Z&&Z.__awaiter||function(a,i,s,l){function u(h){return h instanceof s?h:new s(function(p){p(h)})}return new(s||(s=Promise))(function(h,p){function g(_){try{S(l.next(_))}catch(b){p(b)}}function v(_){try{S(l.throw(_))}catch(b){p(b)}}function S(_){_.done?h(_.value):u(_.value).then(g,v)}S((l=l.apply(a,i||[])).next())})};Object.defineProperty(ta,"__esModule",{value:!0});const z=J,Uv=ra,Fv=Zn,pc=es,jv=is;class Un extends z.StatsigClientBase{static instance(i){const s=(0,z._getStatsigGlobal)().instance(i);return s instanceof Un?s:(z.Log.warn((0,z._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new Un(i??"",{}))}constructor(i,s,l=null){var u,h;z.SDKType._setClientType(i,"javascript-client");const p=new Fv.default(l,v=>{this.$emt(v)});super(i,(u=l==null?void 0:l.dataAdapter)!==null&&u!==void 0?u:new jv.StatsigEvaluationsDataAdapter,p,l),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(z.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(z.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(z.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(z.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(z.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(z.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new Uv.default(i,l??null),this._network=p,this._user=this._configureUser(s,l),this._sdkInstanceID=(0,z.getUUID)(),this._contextHandle=new z.PrecomputedEvaluationsContextHandle(i,()=>this._options,()=>this._errorBoundary,()=>this._store.getValues(),()=>this._user,()=>this._sdkInstanceID);const g=(h=l==null?void 0:l.plugins)!==null&&h!==void 0?h:[];for(const v of g)v.bind(this)}initializeSync(i){var s;return this.loadingStatus!=="Uninitialized"?(0,z.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(s=this._store.getWarnings())!==null&&s!==void 0?s:[]]):(this._logger.start(),this.updateUserSync(this._user,i))}initializeAsync(i){return Rn(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(i),this._initializePromise)})}updateUserSync(i,s){const l=performance.now();try{return this._updateUserSyncImpl(i,s,l)}catch(u){const h=u instanceof Error?u:new Error(String(u));return this._createErrorUpdateDetails(h,l)}}_updateUserSyncImpl(i,s,l){var u;const h=[...(u=this._store.getWarnings())!==null&&u!==void 0?u:[]];this._resetForUser(i);const p=this.dataAdapter.getDataSync(this._user);p==null&&h.push("NoCachedValues"),this._store.setValues(p,this._user),this._finalizeUpdate(p);
1const g=s==null?void 0:s.disableBackgroundCacheRefresh;return g===!0||g==null&&(p==null?void 0:p.source)==="Bootstrap"?(0,z.createUpdateDetails)(!0,this._store.getSource(),performance.now()-l,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),h):(this._runPostUpdate(p??null,this._user),(0,z.createUpdateDetails)(!0,this._store.getSource(),performance.now()-l,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),h))}updateUserAsync(i,s){return Rn(this,void 0,void 0,function*(){const l=performance.now();try{return yield this._updateUserAsyncImpl(i,s)}catch(u){const h=u instanceof Error?u:new Error(String(u));return this._createErrorUpdateDetails(h,l)}})}_updateUserAsyncImpl(i,s){return Rn(this,void 0,void 0,function*(){this._resetForUser(i);const l=this._user;z.Diagnostics._markInitOverallStart(this._sdkKey);let u=this.dataAdapter.getDataSync(l);if(this._store.setValues(u,this._user),this._setStatus("Loading",u),u=yield this.dataAdapter.getDataAsync(u,l,s),l!==this._user)return(0,z.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let h=!1;u!=null&&(z.Diagnostics._markInitProcessStart(this._sdkKey),h=this._store.setValues(u,this._user),z.Diagnostics._markInitProcessEnd(this._sdkKey,{success:h})),this._finalizeUpdate(u),h||(this._errorBoundary.attachErrorIfNoneExists(z.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),z.Diagnostics._markInitOverallEnd(this._sdkKey,h,this._store.getCurrentSourceDetails());const p=z.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,z.createUpdateDetails)(h,this._store.getSource(),p,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let i=(0,z._cloneObject)("StatsigUser",this._user);return i==null&&(z.Log.error("Failed to clone user"),i={}),{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:i,errorBoundary:this._errorBoundary,session:z.StatsigSession.get(this._sdkKey),stableID:z.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}getContextHandle(){return this._contextHandle}checkGate(i,s){return this.getFeatureGate(i,s).value}logEvent(i,s,l){const u=typeof i=="string"?{eventName:i,value:s,metadata:l}:i;this.$emt({name:"log_event_called",event:u}),this._logger.enqueue(Object.assign(Object.assign({},u),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(i){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:i}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(i){return Rn(this,void 0,void 0,function*(){return z.Storage.isReady()||(yield z.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,i)})}_createErrorUpdateDetails(i,s){var l;return(0,z.createUpdateDetails)(!1,this._store.getSource(),performance.now()-s,i,null,[...(l=this._store.getWarnings())!==null&&l!==void 0?l:[]])}_finalizeUpdate(i){this._store.finalize(),this._setStatus("Ready",i)}_runPostUpdate(i,s){this.dataAdapter.getDataAsync(i,s,{priority:"low"}).catch(l=>{z.Log.error("An error occurred after update.",l)})}_resetForUser(i){this._logger.reset(),this._store.reset(),this._user=this._configureUser(i,this._options)}_configureUser(i,s){var l,u,h;const p=(0,z._normalizeUser)(i,s),g=(l=p.customIDs)===null||l===void 0?void 0:l.stableID;if(g){const v=(h=(u=this.storageProvider).isReadyResolver)===null||h===void 0?void 0:h.call(u);v?v.then(()=>z.StableID.setOverride(g,this._sdkKey),()=>z.StableID.setOverride(g,this._sdkKey)):z.StableID.setOverride(g,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(p.analyticsOnlyMetadata=Object.assign(Object.assign({},p.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),p}_getFeatureGateImpl(i,s){var l,u;const{result:h,details:p}=this._store.getGate(i);this._checkUserHasIdForEvaluation(h==null?void 0:h.id_type,i,"Gate"),this._checkInitializationStatus(p.reason);const g=(0,z._makeFeatureGate)(i,p,h),v=(u=(l=this.overrideAdapter)===null||l===void 0?void 0:l.getGateOverride)===null||u===void 0?void 0:u.call(l,g,this._user,s),S=v??g;return this._enqueueExposure(i,(0,z._createGateExposure)(this._user,S,this._store.getExposureMapping()),s),this.$emt({name:"gate_evaluation",gate:S}),S}_getDynamicConfigImpl(i,s){var l,u;const{result:h,details:p}=this._store.getConfig(i);this._checkUserHasIdForEvaluation(h==null?void 0:h.id_type,i,"Dynamic config"),this._checkInitializationStatus(p.reason);const g=(0,z._makeDynamicConfig)(i,p,h),v=(u=(l=this.overrideAdapter)===null||l===void 0?void 0:l.getDynamicConfigOverride)===null||u===void 0?void 0:u.call(l,g,this._user,s),S=v??g;return this._enqueueExposure(i,(0,z._createConfigExposure)(this._user,S,this._store.getExposureMapping()),s),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:S}),S}_getExperimentImpl(i,s){var l,u,h,p;const{result:g,details:v}=this._store.getConfig(i);this._checkUserHasIdForEvaluation(g==null?void 0:g.id_type,i,"Experiment"),this._checkInitializationStatus(v.reason);const S=(0,z._makeExperiment)(i,v,g);S.__evaluation!=null&&(S.__evaluation.secondary_exposures=(0,z._mapExposures)((u=(l=S.__evaluation)===null||l===void 0?void 0:l.secondary_exposures)!==null&&u!==void 0?u:[],this._store.getExposureMapping()));const _=(p=(h=this.overrideAdapter)===null||h===void 0?void 0:h.getExperimentOverride)===null||p===void 0?void 0:p.call(h,S,this._user,s),b=_??S;return this._enqueueExposure(i,(0,z._createConfigExposure)(this._user,b,this._store.getExposureMapping()),s),this.$emt({name:"experiment_evaluation",experiment:b}),b}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(i,s){var l,u,h;const{result:p,details:g}=this._store.getLayer(i),v=(0,z._makeLayer)(i,g,p),S=(u=(l=this.overrideAdapter)===null||l===void 0?void 0:l.getLayerOverride)===null||u===void 0?void 0:u.call(l,v,this._user,s);s!=null&&s.disableExposureLog&&this._logger.incrementNonExposureCount(i);const _=(0,z._mergeOverride)(v,S,(h=S==null?void 0:S.__value)!==null&&h!==void 0?h:v.__value,b=>{s!=null&&s.disableExposureLog||this._enqueueExposure(i,(0,z._createLayerParameterExposure)(this._user,_,b,this._store.getExposureMapping()),s)});return this.$emt({name:"layer_evaluation",layer:_}),_}_getParameterStoreImpl(i,s){var l,u;const{result:h,details:p}=this._store.getParamStore(i);this._logger.incrementNonExposureCount(i);const g={name:i,details:p,__configuration:h,get:(0,pc._makeParamStoreGetter)(this,h,s)},v=(u=(l=this.overrideAdapter)===null||l===void 0?void 0:l.getParamStoreOverride)===null||u===void 0?void 0:u.call(l,g,s);
1return v!=null&&(g.__configuration=v.config,g.details=v.details,g.get=(0,pc._makeParamStoreGetter)(this,v.config,s)),g}_checkUserHasIdForEvaluation(i,s,l){i&&((0,z._getUnitIDFromUser)(this._user,i)||z.Log.warn(`The user does not have the required id_type "${i}" for ${l} "${s}"`))}_checkInitializationStatus(i){(i==="Uninitialized"||i.startsWith("Loading"))&&z.Log.warn(`SDK initialization has not completed. Reason: ${i}`)}}ta.default=Un;(function(a){var i=Z&&Z.__createBinding||(Object.create?function(p,g,v,S){S===void 0&&(S=v);var _=Object.getOwnPropertyDescriptor(g,v);(!_||("get"in _?!g.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(p,S,_)}:function(p,g,v,S){S===void 0&&(S=v),p[S]=g[v]}),s=Z&&Z.__exportStar||function(p,g){for(var v in p)v!=="default"&&!Object.prototype.hasOwnProperty.call(g,v)&&i(g,p,v)};Object.defineProperty(a,"__esModule",{value:!0}),a.StatsigClient=void 0;const l=J,u=ta;a.StatsigClient=u.default,s(J,a);const h=Object.assign((0,l._getStatsigGlobal)(),{StatsigClient:u.default});a.default=h})(Jn);var yi={};Object.defineProperty(yi,"__esModule",{value:!0});yi.useStatsigInternalClientFactoryAsync=void 0;const Uo=re,gc=J;function Bv(a,i){const s=(0,Uo.useMemo)(()=>{var h;return(h=(0,gc._getInstance)(i.sdkKey))!==null&&h!==void 0?h:a(i)},[]),[l,u]=(0,Uo.useState)(s.loadingStatus!=="Ready");return(0,Uo.useMemo)(()=>{s.loadingStatus!=="Ready"&&s.initializeAsync().catch(gc.Log.error).finally(()=>u(!1))},[]),{client:s,isLoading:l}}yi.useStatsigInternalClientFactoryAsync=Bv;Object.defineProperty(_i,"__esModule",{value:!0});_i.useClientAsyncInit=void 0;const zv=Jn,Gv=yi;function Vv(a,i,s=null){return(0,Gv.useStatsigInternalClientFactoryAsync)(l=>new zv.StatsigClient(l.sdkKey,l.initialUser,l.statsigOptions),{sdkKey:a,initialUser:i,statsigOptions:s})}_i.useClientAsyncInit=Vv;Object.defineProperty(Yn,"__esModule",{value:!0});Yn.StatsigProvider=void 0;const Fn=U,Vt=re,Ko=J,Od=Xe,Wv=_i;function Kv(a){return"client"in a?(("sdkKey"in a||"user"in a)&&Ko.Log.warn("Both client and configuration props (sdkKey, user) were provided to StatsigProvider. The client prop will be used and the configuration props will be ignored."),(0,Fn.jsx)(Yv,Object.assign({},a))):(0,Fn.jsx)(Hv,Object.assign({},a))}Yn.StatsigProvider=Kv;function Hv(a){const[i,s]=(0,Vt.useState)(0),l=(0,Wv.useClientAsyncInit)(a.sdkKey,a.user,a.options).client,[u,h]=(0,Vt.useState)(!na(l));Rd(l,s,h);const p=(0,Vt.useMemo)(()=>({renderVersion:i,client:l,isLoading:u}),[i,l,u]);return(0,Fn.jsx)(Od.default.Provider,{value:p,children:a.loadingComponent==null||!p.isLoading?a.children:a.loadingComponent})}function Yv(a){const[i,s]=(0,Vt.useState)(0),l=a.client,[u,h]=(0,Vt.useState)(!na(l));Rd(l,s,h);const p=(0,Vt.useMemo)(()=>({renderVersion:i,client:l,isLoading:u}),[i,l,u]);return(0,Fn.jsx)(Od.default.Provider,{value:p,children:a.loadingComponent==null||!p.isLoading?a.children:a.loadingComponent})}function Rd(a,i,s){(0,Vt.useEffect)(()=>{const l=()=>{i(u=>u+1),s(!na(a))};return Ko.SDKType._setBindingType("react"),a.$on("values_updated",l),()=>{a.flush().catch(u=>Ko.Log.error("An error occurred during flush",u)),a.off("values_updated",l)}},[a,i])}function na(a){if("isNoop"in a)return!0;switch(a.loadingStatus){case"Ready":return!0;default:return!1}}var ns={},vi={};Object.defineProperty(vi,"__esModule",{value:!0});vi.useStatsigInternalClientFactoryBootstrap=void 0;const mc=re,Jv=J;function Xv(a,i){const s=(0,mc.useRef)((0,Jv._getInstance)(i.sdkKey));return(0,mc.useMemo)(()=>{if(s.current)return s.current;const l=a(i);return s.current=l,i.useLegacyFormat?l.dataAdapter.setDataLegacy(i.initialValues,i.initialUser):l.dataAdapter.setData(i.initialValues),l.initializeSync(),l},[])}vi.useStatsigInternalClientFactoryBootstrap=Xv;Object.defineProperty(ns,"__esModule",{value:!0});ns.useClientBootstrapInit=void 0;const qv=Jn,Zv=vi;function Qv(a,i,s,l=null,u){return(0,Zv.useStatsigInternalClientFactoryBootstrap)(h=>new qv.StatsigClient(h.sdkKey,h.initialUser,h.statsigOptions),{sdkKey:a,initialUser:i,initialValues:s,statsigOptions:l,useLegacyFormat:u})}ns.useClientBootstrapInit=Qv;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});const _c=re,eS=J,yc=ze,tS=Xe;function rS(a,i){const{client:s,renderVersion:l}=(0,_c.useContext)(tS.default);return(0,_c.useMemo)(()=>(0,yc.isNoopClient)(s)?(eS.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${a}'.`),yc.NoopEvaluationsClient.getDynamicConfig(a,i)):s.getDynamicConfig(a,i),[a,s,l,...i?Object.values(i):[]])}sa.default=rS;var oa={};Object.defineProperty(oa,"__esModule",{value:!0});const vc=re,iS=J,Sc=ze,nS=Xe;function sS(a,i){const{client:s,renderVersion:l}=(0,vc.useContext)(nS.default);return(0,vc.useMemo)(()=>(0,Sc.isNoopClient)(s)?(iS.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${a}'.`),Sc.NoopEvaluationsClient.getExperiment(a,i)):s.getExperiment(a,i),[a,s,l,...i?Object.values(i):[]])}oa.default=sS;var aa={};Object.defineProperty(aa,"__esModule",{value:!0});const bc=re,oS=J,wc=ze,aS=Xe;function lS(a,i){const{client:s,renderVersion:l}=(0,bc.useContext)(aS.default);return(0,bc.useMemo)(()=>(0,wc.isNoopClient)(s)?(oS.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${a}'.`),wc.NoopEvaluationsClient.getFeatureGate(a,i)):s.getFeatureGate(a,i),[a,s,l,...i?Object.values(i):[]])}aa.default=lS;var la={};Object.defineProperty(la,"__esModule",{value:!0});const Cc=re,uS=J,Ec=ze,cS=Xe;function dS(a,i){const{client:s,renderVersion:l}=(0,Cc.useContext)(cS.default);return(0,Cc.useMemo)(()=>(0,Ec.isNoopClient)(s)?(uS.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${a}
1'.`),Ec.NoopEvaluationsClient.checkGate(a,i)):s.checkGate(a,i),[a,s,l,...i?Object.values(i):[]])}la.default=dS;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});const Ic=re,hS=J,Oc=ze,fS=Xe;function pS(a,i){const{client:s,renderVersion:l}=(0,Ic.useContext)(fS.default);return(0,Ic.useMemo)(()=>(0,Oc.isNoopClient)(s)?(hS.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${a}'.`),Oc.NoopEvaluationsClient.getLayer(a,i)):s.getLayer(a,i),[a,s,l,...i?Object.values(i):[]])}ua.default=pS;var ca={};Object.defineProperty(ca,"__esModule",{value:!0});const Rc=re,gS=J,Mc=ze,mS=Xe;function _S(a,i){const{client:s,renderVersion:l}=(0,Rc.useContext)(mS.default);return(0,Rc.useMemo)(()=>(0,Mc.isNoopClient)(s)?(gS.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${a}'.`),Mc.NoopEvaluationsClient.getParameterStore(a,i)):s.getParameterStore(a,i),[a,s,l,...i?Object.values(i):[]])}ca.default=_S;var Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.useStatsigClient=void 0;const lt=re,yS=J,Ac=ze,vS=Xe;function SS(){const{client:a,renderVersion:i,isLoading:s}=(0,lt.useContext)(vS.default),l=(0,lt.useMemo)(()=>(0,Ac.isNoopClient)(a)?(yS.Log.warn("Attempting to retrieve a StatsigClient but none was set."),Ac.NoopEvaluationsClient):a,[a,i]),u=[l,i],h=(0,lt.useCallback)((C,A)=>l.checkGate(C,A),u),p=(0,lt.useCallback)((C,A)=>l.getFeatureGate(C,A),u),g=(0,lt.useCallback)((C,A)=>l.getDynamicConfig(C,A),u),v=(0,lt.useCallback)((C,A)=>l.getExperiment(C,A),u),S=(0,lt.useCallback)((C,A)=>l.getLayer(C,A),u),_=(0,lt.useCallback)((C,A)=>l.getParameterStore(C,A),u),b=(0,lt.useCallback)((C,A,T)=>typeof C=="string"?l.logEvent(C,A,T):l.logEvent(C),u);return(0,lt.useMemo)(()=>({client:l,checkGate:h,getFeatureGate:p,getDynamicConfig:g,getExperiment:v,getLayer:S,getParameterStore:_,logEvent:b,isLoading:s}),[l,h,p,g,v,S,_,b,s])}Si.useStatsigClient=SS;var ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.useStatsigUser=void 0;const Mn=re,bS=Xe,wS=Si;function Fo(a){return a.getContextHandle().user}function CS(){const{client:a}=(0,wS.useStatsigClient)(),{renderVersion:i}=(0,Mn.useContext)(bS.default);return{user:(0,Mn.useMemo)(()=>Fo(a),[a,i]),updateUserSync:(0,Mn.useCallback)(l=>(typeof l=="function"&&(l=l(Fo(a))),a.updateUserSync(l)),[a]),updateUserAsync:(0,Mn.useCallback)(l=>(typeof l=="function"&&(l=l(Fo(a))),a.updateUserAsync(l)),[a])}}ss.useStatsigUser=CS;(function(a){var i=Z&&Z.__createBinding||(Object.create?function(he,ue,$,D){D===void 0&&(D=$);var P=Object.getOwnPropertyDescriptor(ue,$);(!P||("get"in P?!ue.__esModule:P.writable||P.configurable))&&(P={enumerable:!0,get:function(){return ue[$]}}),Object.defineProperty(he,D,P)}:function(he,ue,$,D){D===void 0&&(D=$),he[D]=ue[$]}),s=Z&&Z.__exportStar||function(he,ue){for(var $ in he)$!=="default"&&!Object.prototype.hasOwnProperty.call(ue,$)&&i(ue,he,$)};Object.defineProperty(a,"__esModule",{value:!0}),a.useStatsigUser=a.useStatsigInternalClientFactoryBootstrap=a.useStatsigInternalClientFactoryAsync=a.useStatsigClient=a.useParameterStore=a.useLayer=a.useGateValue=a.useFeatureGate=a.useExperiment=a.useDynamicConfig=a.useClientBootstrapInit=a.useClientAsyncInit=a.StatsigProvider=a.StatsigContext=void 0;const l=J,u=Xe;a.StatsigContext=u.default;const h=Yn;Object.defineProperty(a,"StatsigProvider",{enumerable:!0,get:function(){return h.StatsigProvider}});const p=_i;Object.defineProperty(a,"useClientAsyncInit",{enumerable:!0,get:function(){return p.useClientAsyncInit}});const g=ns;Object.defineProperty(a,"useClientBootstrapInit",{enumerable:!0,get:function(){return g.useClientBootstrapInit}});const v=sa;a.useDynamicConfig=v.default;const S=oa;a.useExperiment=S.default;const _=aa;a.useFeatureGate=_.default;const b=la;a.useGateValue=b.default;const C=ua;a.useLayer=C.default;const A=ca;a.useParameterStore=A.default;const T=Si;Object.defineProperty(a,"useStatsigClient",{enumerable:!0,get:function(){return T.useStatsigClient}});const F=yi;Object.defineProperty(a,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return F.useStatsigInternalClientFactoryAsync}});const K=vi;Object.defineProperty(a,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return K.useStatsigInternalClientFactoryBootstrap}});const Y=ss;Object.defineProperty(a,"useStatsigUser",{enumerable:!0,get:function(){return Y.useStatsigUser}}),s(Jn,a),Object.assign((0,l._getStatsigGlobal)(),{StatsigContext:u.default,StatsigProvider:h.StatsigProvider,useClientAsyncInit:p.useClientAsyncInit,useClientBootstrapInit:g.useClientBootstrapInit,useDynamicConfig:v.default,useExperiment:S.default,useFeatureGate:_.default,useGateValue:b.default,useLayer:C.default,useParameterStore:A.default,useStatsigClient:T.useStatsigClient,useStatsigInternalClientFactoryAsync:F.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:K.useStatsigInternalClientFactoryBootstrap,useStatsigUser:Y.useStatsigUser})})(Xc);var Md={},Mt={},Ye={},bi={},Ad={};(function(a){var i={};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"});var s=Object.defineProperty,l=(n,e,t)=>e in n?s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,u=(n,e,t)=>l(n,typeof e!="symbol"?e+"":e,t),h,p=Object.defineProperty,g=(n,e,t)=>e in n?p(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,v=(n,e,t)=>g(n,typeof e!="symbol"?e+"":e,t),S=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(S||{});const _={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},b={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},C={};function A(n){if(C[n])return C[n];const e=globalThis[n],t=e.prototype,r=n in _?_[n]:void 0,o=!!(r&&r.every(m=>{var f,y;return!!((y=(f=Object.getOwnPropertyDescriptor(t,m))==null?void 0:f.get)!=null&&y.toString().includes("[native code]"))})),c=n in b?b[n]:void 0,d=!!(c&&c.every(m=>{var f;return typeof t[m]=="function"&&((f=t[m])==null?void 0:f.toString().includes("[native code]"))}));if(o&&d)return C[n]=e.prototype,e.prototype;
vendor: 49,619 bytes, lines 1-23
1try{const m=document.createElement("iframe");document.body.appendChild(m);const f=m.contentWindow;if(!f)return e.prototype;const y=f[n].prototype;return document.body.removeChild(m),y?C[n]=y:t}catch{return t}}const T={};function F(n,e,t){var r;const o=`${n}.${String(t)}`;if(T[o])return T[o].call(e);const c=A(n),d=(r=Object.getOwnPropertyDescriptor(c,t))==null?void 0:r.get;return d?(T[o]=d,d.call(e)):e[t]}const K={};function Y(n,e,t){const r=`${n}.${String(t)}`;if(K[r])return K[r].bind(e);const c=A(n)[t];return typeof c!="function"?e[t]:(K[r]=c,c.bind(e))}function he(n){return F("Node",n,"childNodes")}function ue(n){return F("Node",n,"parentNode")}function $(n){return F("Node",n,"parentElement")}function D(n){return F("Node",n,"textContent")}function P(n,e){return Y("Node",n,"contains")(e)}function ee(n){return Y("Node",n,"getRootNode")()}function Ce(n){return!n||!("host"in n)?null:F("ShadowRoot",n,"host")}function Ee(n){return n.styleSheets}function it(n){return!n||!("shadowRoot"in n)?null:F("Element",n,"shadowRoot")}function Ge(n,e){return F("Element",n,"querySelector")(e)}function Yt(n,e){return F("Element",n,"querySelectorAll")(e)}function xt(){return A("MutationObserver").constructor}const Ie={childNodes:he,parentNode:ue,parentElement:$,textContent:D,contains:P,getRootNode:ee,host:Ce,styleSheets:Ee,shadowRoot:it,querySelector:Ge,querySelectorAll:Yt,mutationObserver:xt};function wi(n){return n.nodeType===n.ELEMENT_NODE}function Ct(n){const e=n&&"host"in n&&"mode"in n&&Ie.host(n)||null;return!!(e&&"shadowRoot"in e&&Ie.shadowRoot(e)===n)}function Tt(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}function Ci(n){return n.includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}function Er(n){const{cssText:e}=n;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(n.href)})`];return n.layerName===""?t.push("layer"):n.layerName&&t.push(`layer(${n.layerName})`),n.supportsText&&t.push(`supports(${n.supportsText})`),n.media.length&&t.push(n.media.mediaText),t.join(" ")+";"}function Jt(n){try{const e=n.rules||n.cssRules;if(!e)return null;const t=Array.from(e,r=>Xt(r,n.href)).join("");return Ci(t)}catch{return null}}function Xt(n,e){if(Or(n)){let t;try{t=Jt(n.styleSheet)||Er(n)}catch{t=n.cssText}return n.styleSheet.href?Ei(t,n.styleSheet.href):t}else{let t=n.cssText;return N(n)&&n.selectorText.includes(":")&&(t=Ir(t)),e?Ei(t,e):t}}function Ir(n){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}function Or(n){return"styleSheet"in n}function N(n){return"selectorText"in n}class L{constructor(){v(this,"idNodeMap",new Map),v(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function H(){return new L}function j({element:n,maskInputOptions:e,tagName:t,type:r,value:o,maskInputFn:c}){let d=o||"";const m=r&&G(r);return(e[t.toLowerCase()]||m&&e[m])&&(c?d=c(d,n):d="*".repeat(d.length)),d}function G(n){return n.toLowerCase()}const Re="__rrweb_original__";function Oe(n){const e=n.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<n.width;r+=t)for(let o=0;o<n.height;o+=t){const c=e.getImageData,d=Re in c?c[Re]:c;if(new Uint32Array(d.call(e,r,o,Math.min(t,n.width-r),Math.min(t,n.height-o)).data.buffer).some(f=>f!==0))return!1}return!0}function ye(n){const e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?G(e):null}function Me(n,e){let t;try{t=new URL(n,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,o=t.pathname.match(r);return(o==null?void 0:o[1])??null}function Ve(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}const th=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rh=/^(?:[a-z+]+:)?\/\//i,ih=/^www\..*/i,nh=/^(data:)([^,]*),(.*)/i;function Ei(n,e){return(n||"").replace(th,(t,r,o,c,d,m)=>{const f=o||d||m,y=r||c||"";if(!f)return t;if(rh.test(f)||ih.test(f))return`url(${y}${f}${y})`;if(nh.test(f))return`url(${y}${f}${y})`;if(f[0]==="/")return`url(${y}${Ve(e)+f}${y})`;const w=e.split("/"),E=f.split("/");w.pop();for(const M of E)M!=="."&&(M===".."?w.pop():w.push(M));return`url(${y}${w.join("/")}${y})`})}let sh=1;const oh=new RegExp("[^a-z0-9-_:]"),Rr=-2;function fa(){return sh++}function ah(n){if(n instanceof HTMLFormElement)return"form";const e=G(n.tagName);return oh.test(e)?"div":e}let qt,pa;const lh=/^[^ \t\n\r\u000c]+/,uh=/^[, \t\n\r\u000c]+/;function ch(n,e){if(e.trim()==="")return e;let t=0;function r(c){let d;const m=c.exec(e.substring(t));return m?(d=m[0],t+=d.length,d):""}const o=[];for(;r(uh),!(t>=e.length);){let c=r(lh);if(c.slice(-1)===",")c=Zt(n,c.substring(0,c.length-1)),o.push(c);else{let d="";c=Zt(n,c);let m=!1;for(;;){const f=e.charAt(t);if(f===""){o.push((c+d).trim());break}else if(m)f===")"&&(m=!1);else if(f===","){t+=1,o.push((c+d).trim());break}else f==="("&&(m=!0);d+=f,t+=1}}}return o.join(", ")}const ga=new WeakMap;function Zt(n,e){return!e||e.trim()===""?e:cs(n,e)}function dh(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}function cs(n,e){let t=ga.get(n);if(t||(t=n.createElement("a"),ga.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ma(n,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Zt(n,r):t==="srcset"?ch(n,r):t==="style"?Ei(r,cs(n)):e==="object"&&t==="data"?Zt(n,r):r)}function _a(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}function hh(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let r=n.classList.length;r--;){const o=n.classList[r];if(e.test(o))return!0}if(t)return n.matches(t)}catch{}return!1}function Ii(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?Ii(Ie.parentNode(n),e,t):!1;for(let r=n.classList.length;r--;){const o=n.classList[r];if(e.test(o))return!0}return t?Ii(Ie.parentNode(n),e,t):!1}function ya(n,e,t,r){let o;if(wi(n)){if(o=n,!Ie.childNodes(o).length)return!1}else{if(Ie.parentElement(n)===null)return!1;o=Ie.parentElement(n)}try{if(typeof e=="string"){if(r){if(o.closest(`.${e}`))return!0}else if(o.classList.contains(e))return!0}else if(Ii(o,e,r))return!0;if(t){if(r){if(o.closest(t))return!0}else if(o.matches(t))return!0}}catch{}return!1}function fh(n,e,t){const r=n.contentWindow;if(!r)return;let o=!1,c;try{c=r.document.readyState}catch{return}if(c!=="complete"){const m=setTimeout(()=>{o||(e(),o=!0)},t);n.addEventListener("load",()=>{clearTimeout(m),o=!0,e()});return}const d="about:blank";if(r.location.href!==d||n.src===d||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}function ph(n,e,t){let r=!1,o;try{o=n.sheet}catch{return}if(o)return;const c=setTimeout(()=>{r||(e(),r=!0)},t);n.addEventListener("load",()=>{clearTimeout(c),r=!0,e()})}function gh(n,e){const{doc:t,mirror:r,blockClass:o,blockSelector:c,needsMask:d,inlineStylesheet:m,maskInputOptions:f={},maskTextFn:y,maskInputFn:w,dataURLOptions:E={},inlineImages:M,recordCanvas:R,keepIframeSrcFn:k,newlyAddedElement:O=!1}=e,I=mh(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:S.Document,childNodes:[],compatMode:n.compatMode}:{type:S.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:S.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:I};case n.ELEMENT_NODE:return yh(n,{doc:t,blockClass:o,blockSelector:c,inlineStylesheet:m,maskInputOptions:f,maskInputFn:w,dataURLOptions:E,inlineImages:M,recordCanvas:R,keepIframeSrcFn:k,newlyAddedElement:O,rootId:I});case n.TEXT_NODE:return _h(n,{doc:t,needsMask:d,maskTextFn:y,rootId:I});case n.CDATA_SECTION_NODE:return{type:S.CDATA,textContent:"",rootId:I};case n.COMMENT_NODE:return{type:S.Comment,textContent:Ie.textContent(n)||"",rootId:I};default:return!1}}function mh(n,e){if(!e.hasNode(n))return;const t=e.getId(n);return t===1?void 0:t}function _h(n,e){var t;const{needsMask:r,maskTextFn:o,rootId:c}=e,d=Ie.parentNode(n),m=d&&d.tagName;let f=Ie.textContent(n);const y=m==="STYLE"?!0:void 0,w=m==="SCRIPT"?!0:void 0;if(y&&f){try{n.nextSibling||n.previousSibling||(t=d.sheet)!=null&&t.cssRules&&(f=Jt(d.sheet))}catch(E){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${E}`,n)}f=Ei(f,cs(e.doc))}return w&&(f="SCRIPT_PLACEHOLDER"),!y&&!w&&f&&r&&(f=o?o(f,Ie.parentElement(n)):f.replace(/[\S]/g,"*")),{type:S.Text,textContent:f||"",isStyle:y,rootId:c}}function yh(n,e){const{doc:t,blockClass:r,blockSelector:o,inlineStylesheet:c,maskInputOptions:d={},maskInputFn:m,dataURLOptions:f={},inlineImages:y,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:M=!1,rootId:R}=e,k=hh(n,r,o),O=ah(n);let I={};const V=n.attributes.length;for(let x=0;x<V;x++){const W=n.attributes[x];_a(O,W.name,W.value)||(I[W.name]=ma(t,O,G(W.name),W.value))}if(O==="link"&&c){const x=Array.from(t.styleSheets).find(le=>le.href===n.href);let W=null;x&&(W=Jt(x)),W&&(delete I.rel,delete I.href,I._cssText=W)}if(O==="style"&&n.sheet&&!(n.innerText||Ie.textContent(n)||"").trim().length){const x=Jt(n.sheet);x&&(I._cssText=x)}if(O==="input"||O==="textarea"||O==="select"){const x=n.value,W=n.checked;I.type!=="radio"&&I.type!=="checkbox"&&I.type!=="submit"&&I.type!=="button"&&x?I.value=j({element:n,type:ye(n),tagName:O,value:x,maskInputOptions:d,maskInputFn:m}):W&&(I.checked=W)}if(O==="option"&&(n.selected&&!d.select?I.selected=!0:delete I.selected),O==="dialog"&&n.open&&(I.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),O==="canvas"&&w){if(n.__context==="2d")Oe(n)||(I.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){const x=n.toDataURL(f.type,f.quality),W=t.createElement("canvas");W.width=n.width,W.height=n.height;const le=W.toDataURL(f.type,f.quality);x!==le&&(I.rr_dataURL=x)}}if(O==="img"&&y){qt||(qt=t.createElement("canvas"),pa=qt.getContext("2d"));const x=n,W=x.currentSrc||x.getAttribute("src")||"<unknown-src>",le=x.crossOrigin,ge=()=>{x.removeEventListener("load",ge);try{qt.width=x.naturalWidth,qt.height=x.naturalHeight,pa.drawImage(x,0,0),I.rr_dataURL=qt.toDataURL(f.type,f.quality)}catch(Ae){if(x.crossOrigin!=="anonymous"){x.crossOrigin="anonymous",x.complete&&x.naturalWidth!==0?ge():x.addEventListener("load",ge);return}else console.warn(`Cannot inline img src=${W}! Error: ${Ae}`)}x.crossOrigin==="anonymous"&&(le?I.crossOrigin=le:x.removeAttribute("crossorigin"))};x.complete&&x.naturalWidth!==0?ge():x.addEventListener("load",ge)}if(O==="audio"||O==="video"){const x=I;x.rr_mediaState=n.paused?"paused":"played",x.rr_mediaCurrentTime=n.currentTime,x.rr_mediaPlaybackRate=n.playbackRate,x.rr_mediaMuted=n.muted,x.rr_mediaLoop=n.loop,x.rr_mediaVolume=n.volume}if(M||(n.scrollLeft&&(I.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(I.rr_scrollTop=n.scrollTop)),k){const{width:x,height:W}=n.getBoundingClientRect();I={class:I.class,rr_width:`${x}px`,rr_height:`${W}px`}}O==="iframe"&&!E(I.src)&&(n.contentDocument||(I.rr_src=I.src),delete I.src);let B;try{customElements.get(O)&&(B=!0)}catch{}return{type:S.Element,tagName:O,attributes:I,childNodes:[],isSVG:dh(n)||void 0,needBlock:k,rootId:R,isCustom:B}}function de(n){return n==null?"":n.toLowerCase()}function vh(n,e){if(e.comment&&n.type===S.Comment)return!0;if(n.type===S.Element){if(e.script&&(n.tagName==="script"||n.tagName==="link"&&(n.attributes.rel==="preload"||n.attributes.rel==="modulepreload")&&n.attributes.as==="script"||n.tagName==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&Me(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&(de(n.attributes.name).match(/^msapplication-tile(image|color)$/)||de(n.attributes.name)==="application-name"||de(n.attributes.rel)==="icon"||de(n.attributes.rel)==="apple-touch-icon"||de(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&de(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(de(n.attributes.property).match(/^(og|twitter|fb):/)||de(n.attributes.name).match(/^(og|twitter):/)||de(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(de(n.attributes.name)==="robots"||de(n.attributes.name)==="googlebot"||de(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(de(n.attributes.name)==="author"||de(n.attributes.name)==="generator"||de(n.attributes.name)==="framework"||de(n.attributes.name)==="publisher"||de(n.attributes.name)==="progid"||de(n.attributes.property).match(/^article:/)||de(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(de(n.attributes.name)==="google-site-verification"||de(n.attributes.name)==="yandex-verification"||de(n.attributes.name)==="csrf-token"||de(n.attributes.name)==="p:domain_verify"||de(n.attributes.name)==="verify-v1"||de(n.attributes.name)==="verification"||de(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Qt(n,e){const{doc:t,mirror:r,blockClass:o,blockSelector:c,maskTextClass:d,maskTextSelector:m,skipChild:f=!1,inlineStylesheet:y=!0,maskInputOptions:w={},maskTextFn:E,maskInputFn:M,slimDOMOptions:R,dataURLOptions:k={},inlineImages:O=!1,recordCanvas:I=!1,onSerialize:V,onIframeLoad:B,iframeLoadTimeout:x=5e3,onStylesheetLoad:W,stylesheetLoadTimeout:le=5e3,keepIframeSrcFn:ge=()=>!1,newlyAddedElement:Ae=!1}=e;let{needsMask:ie}=e,{preserveWhiteSpace:ke=!0}=e;ie||(ie=ya(n,d,m,ie===void 0));const De=gh(n,{doc:t,mirror:r,blockClass:o,blockSelector:c,needsMask:ie,inlineStylesheet:y,maskInputOptions:w,maskTextFn:E,maskInputFn:M,dataURLOptions:k,inlineImages:O,recordCanvas:I,keepIframeSrcFn:ge,newlyAddedElement:Ae});if(!De)return console.warn(n,"not serialized"),null;let Ke;r.hasNode(n)?Ke=r.getId(n):vh(De,R)||!ke&&De.type===S.Text&&!De.isStyle&&!De.textContent.replace(/^\s+|\s+$/gm,"").length?Ke=Rr:Ke=fa();const ne=Object.assign(De,{id:Ke});if(r.add(n,ne),Ke===Rr)return null;V&&V(n);let Nt=!f;if(ne.type===S.Element){Nt=Nt&&!ne.needBlock,delete ne.needBlock;const $e=Ie.shadowRoot(n);$e&&Tt($e)&&(ne.isShadowHost=!0)}if((ne.type===S.Document||ne.type===S.Element)&&Nt){R.headWhitespace&&ne.type===S.Element&&ne.tagName==="head"&&(ke=!1);const $e={doc:t,mirror:r,blockClass:o,blockSelector:c,needsMask:ie,maskTextClass:d,maskTextSelector:m,skipChild:f,inlineStylesheet:y,maskInputOptions:w,maskTextFn:E,maskInputFn:M,slimDOMOptions:R,dataURLOptions:k,inlineImages:O,recordCanvas:I,preserveWhiteSpace:ke,onSerialize:V,onIframeLoad:B,iframeLoadTimeout:x,onStylesheetLoad:W,stylesheetLoadTimeout:le,keepIframeSrcFn:ge};if(!(ne.type===S.Element&&ne.tagName==="textarea"&&ne.attributes.value!==void 0))for(const pt of Array.from(Ie.childNodes(n))){const ot=Qt(pt,$e);ot&&ne.childNodes.push(ot)}let et=null;if(wi(n)&&(et=Ie.shadowRoot(n)))for(const pt of Array.from(Ie.childNodes(et))){const ot=Qt(pt,$e);ot&&(Tt(et)&&(ot.isShadow=!0),ne.childNodes.push(ot))}}const Yr=Ie.parentNode(n);return Yr&&Ct(Yr)&&Tt(Yr)&&(ne.isShadow=!0),ne.type===S.Element&&ne.tagName==="iframe"&&fh(n,()=>{const $e=n.contentDocument;if($e&&B){const et=Qt($e,{doc:$e,mirror:r,blockClass:o,blockSelector:c,needsMask:ie,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:y,maskInputOptions:w,maskTextFn:E,maskInputFn:M,slimDOMOptions:R,dataURLOptions:k,inlineImages:O,recordCanvas:I,preserveWhiteSpace:ke,onSerialize:V,onIframeLoad:B,iframeLoadTimeout:x,onStylesheetLoad:W,stylesheetLoadTimeout:le,keepIframeSrcFn:ge});et&&B(n,et)}},x),ne.type===S.Element&&ne.tagName==="link"&&typeof ne.attributes.rel=="string"&&(ne.attributes.rel==="stylesheet"||ne.attributes.rel==="preload"&&typeof ne.attributes.href=="string"&&Me(ne.attributes.href)==="css")&&ph(n,()=>{if(W){const $e=Qt(n,{doc:t,mirror:r,blockClass:o,blockSelector:c,needsMask:ie,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:y,maskInputOptions:w,maskTextFn:E,maskInputFn:M,slimDOMOptions:R,dataURLOptions:k,inlineImages:O,recordCanvas:I,preserveWhiteSpace:ke,onSerialize:V,onIframeLoad:B,iframeLoadTimeout:x,onStylesheetLoad:W,stylesheetLoadTimeout:le,keepIframeSrcFn:ge});$e&&W(n,$e)}},le),ne}function Sh(n,e){const{mirror:t=new L,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:c="rr-mask",maskTextSelector:d=null,inlineStylesheet:m=!0,inlineImages:f=!1,recordCanvas:y=!1,maskAllInputs:w=!1,maskTextFn:E,maskInputFn:M,slimDOM:R=!1,dataURLOptions:k,preserveWhiteSpace:O,onSerialize:I,onIframeLoad:V,iframeLoadTimeout:B,onStylesheetLoad:x,stylesheetLoadTimeout:W,keepIframeSrcFn:le=()=>!1}=e||{};return Qt(n,{doc:n,mirror:t,blockClass:r,blockSelector:o,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:m,maskInputOptions:w===!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,password:!0}:w===!1?{password:!0}:w,maskTextFn:E,maskInputFn:M,slimDOMOptions:R===!0||R==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:R==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:R===!1?{}:R,dataURLOptions:k,inlineImages:f,recordCanvas:y,preserveWhiteSpace:O,onSerialize:I,onIframeLoad:V,iframeLoadTimeout:B,onStylesheetLoad:x,stylesheetLoadTimeout:W,keepIframeSrcFn:le,newlyAddedElement:!1})}function bh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function wh(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}),t}var ds={exports:{}},fe=String,va=function(){return{isColorSupported:!1,reset:fe,bold:fe,dim:fe,italic:fe,underline:fe,inverse:fe,hidden:fe,strikethrough:fe,black:fe,red:fe,green:fe,yellow:fe,blue:fe,magenta:fe,cyan:fe,white:fe,gray:fe,bgBlack:fe,bgRed:fe,bgGreen:fe,bgYellow:fe,bgBlue:fe,bgMagenta:fe,bgCyan:fe,bgWhite:fe}};ds.exports=va(),ds.exports.createColors=va;var Ch=ds.exports;const qe=wh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Sa=Ch,ba=qe,hs=class kd extends Error{constructor(e,t,r,o,c,d){super(e),this.name="CssSyntaxError",this.reason=e,c&&(this.file=c),o&&(this.source=o),d&&(this.plugin=d),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,kd)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Sa.isColorSupported),ba&&e&&(t=ba(t));let r=t.split(/\r?\n/),o=Math.max(this.line-3,0),c=Math.min(this.line+2,r.length),d=String(c).length,m,f;if(e){let{bold:y,gray:w,red:E}=Sa.createColors(!0);m=M=>y(E(M)),f=M=>w(M)}else m=f=y=>y;return r.slice(o,c).map((y,w)=>{let E=o+1+w,M=" "+(" "+E).slice(-d)+" | ";if(E===this.line){let R=f(M.replace(/\d/g," "))+y.slice(0,this.column-1).replace(/[^\t]/g," ");return m(">")+f(M)+y+`
2 `+R+m("^")}return" "+f(M)+y}).join(`
3`)}toString(){let e=this.showSourceCode();return e&&(e=`
4
5`+e+`
6`),this.name+": "+this.message+e}};var fs=hs;hs.default=hs;var Mr={};Mr.isClean=Symbol("isClean"),Mr.my=Symbol("my");const wa={after:`
7`,beforeClose:`
8`,beforeComment:`
9`,beforeDecl:`
10`,beforeOpen:" ",beforeRule:`
11`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function Eh(n){return n[0].toUpperCase()+n.slice(1)}let ps=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:o&&(r+=" "),e.nodes)this.block(e,r+o);else{let c=(e.raws.between||"")+(t?";":"");this.builder(r+o+c,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let o=e.parent,c=0;for(;o&&o.type!=="root";)c+=1,o=o.parent;if(r.includes(`
12`)){let d=this.raw(e,null,"indent");if(d.length)for(let m=0;m<c;m++)r+=d}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let o;e.nodes&&e.nodes.length?(this.body(e),o=this.raw(e,"after")):o=this.raw(e,"after","emptyBody"),o&&this.builder(o),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let c=e.nodes[o],d=this.raw(c,"before");d&&this.builder(d),this.stringify(c,t!==o||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),o=e.prop+r+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,t,r){let o;if(r||(r=t),t&&(o=e.raws[t],typeof o<"u"))return o;let c=e.parent;if(r==="before"&&(!c||c.type==="root"&&c.first===e||c&&c.type==="document"))return"";if(!c)return wa[r];let d=e.root();if(d.rawCache||(d.rawCache={}),typeof d.rawCache[r]<"u")return d.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let m="raw"+Eh(r);this[m]?o=this[m](d,e):d.walk(f=>{if(o=f.raws[t],typeof o<"u")return!1})}return typeof o>"u"&&(o=wa[r]),d.rawCache[r]=o,o}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
13`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
14`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
15`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
16`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let o=r.parent;if(o&&o!==e&&o.parent&&o.parent===e&&typeof r.raws.before<"u"){let c=r.raws.before.split(`
17`);return t=c[c.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],o=e.raws[t];return o&&o.value===r?o.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Ca=ps;ps.default=ps;let Ih=Ca;function gs(n,e){new Ih(e).stringify(n)}var Oi=gs;gs.default=gs;let{isClean:Ri,my:Oh}=Mr,Rh=fs,Mh=Ca,Ah=Oi;function ms(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let o=n[r],c=typeof o;r==="parent"&&c==="object"?e&&(t[r]=e):r==="source"?t[r]=o:Array.isArray(o)?t[r]=o.map(d=>ms(d,t)):(c==="object"&&o!==null&&(o=ms(o)),t[r]=o)}return t}let _s=class{constructor(e={}){this.raws={},this[Ri]=!1,this[Oh]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ms(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:r.column,line:r.line},t)}return new Rh(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ri]){this[Ri]=!1;let e=this;for(;e=e.parent;)e[Ri]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let o=t.indexOf(e.word);o!==-1&&(r=this.positionInside(o,t))}return r}positionInside(e,t){let r=t||this.toString(),o=this.source.start.column,c=this.source.start.line;for(let d=0;d<e;d++)r[d]===`
18`?(o=1,c+=1):o+=1;return{column:o,line:c}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o=this.toString(),c=o.indexOf(e.word);c!==-1&&(t=this.positionInside(c,o),r=this.positionInside(c+e.word.length,o))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Mh().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let o of e)o===this?r=!0:r?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},o=t==null;t=t||new Map;let c=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let m=this[d];if(Array.isArray(m))r[d]=m.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof m=="object"&&m.toJSON)r[d]=m.toJSON(null,t);else if(d==="source"){let f=t.get(m.input);f==null&&(f=c,t.set(m.input,c),c++),r[d]={end:m.end,inputId:f,start:m.start}}else r[d]=m}return o&&(r.inputs=[...t.keys()].map(d=>d.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ah){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let o={node:this};for(let c in r)o[c]=r[c];return e.warn(t,o)}get proxyOf(){return this}};var Mi=_s;_s.default=_s;let kh=Mi,ys=class extends kh{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ai=ys;ys.default=ys;let Dh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var xh={nanoid:(n=21)=>{let e="",t=n;for(;t--;)e+=Dh[Math.random()*64|0];return e}};let{SourceMapConsumer:Ea,SourceMapGenerator:Ia}=qe,{existsSync:Th,readFileSync:Ph}=qe,{dirname:vs,join:Lh}=qe;function $h(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}let Ss=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,o=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=vs(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new Ea(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,c=/^data:application\/json,/;if(o.test(e)||c.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return $h(e.substr(RegExp.lastMatch.length));let d=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+d)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),o=e.indexOf("*/",r);r>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,o)))}loadFile(e){if(this.root=vs(e),Th(e))return this.mapFile=e,Ph(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let o=this.loadFile(r);if(!o)throw new Error("Unable to load previous source map: "+r.toString());return o}}else{if(t instanceof Ea)return Ia.fromSourceMap(t).toString();if(t instanceof Ia)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Lh(vs(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Oa=Ss;Ss.default=Ss;let{SourceMapConsumer:Nh,SourceMapGenerator:Uh}=qe,{fileURLToPath:Ra,pathToFileURL:ki}=qe,{isAbsolute:bs,resolve:ws}=qe,{nanoid:Fh}=xh,Cs=qe,Ma=fs,jh=Oa,Es=Symbol("fromOffsetCache"),Bh=!!(Nh&&Uh),Aa=!!(ws&&bs),Di=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Aa||/^\w+:\/\//.test(t.from)||bs(t.from)?this.file=t.from:this.file=ws(t.from)),Aa&&Bh){let r=new jh(this.css,t);if(r.text){this.map=r;let o=r.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+Fh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,o={}){let c,d,m;if(t&&typeof t=="object"){let y=t,w=r;if(typeof y.offset=="number"){let E=this.fromOffset(y.offset);t=E.line,r=E.col}else t=y.line,r=y.column;if(typeof w.offset=="number"){let E=this.fromOffset(w.offset);d=E.line,m=E.col}else d=w.line,m=w.column}else if(!r){let y=this.fromOffset(t);t=y.line,r=y.col}let f=this.origin(t,r,d,m);return f?c=new Ma(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,o.plugin):c=new Ma(e,d===void 0?t:{column:r,line:t},d===void 0?r:{column:m,line:d},this.css,this.file,o.plugin),c.input={column:r,endColumn:m,endLine:d,line:t,source:this.css},this.file&&(ki&&(c.input.url=ki(this.file).toString()),c.input.file=this.file),c}fromOffset(e){let t,r;if(this[Es])r=this[Es];else{let c=this.css.split(`
19`);r=new Array(c.length);let d=0;for(let m=0,f=c.length;m<f;m++)r[m]=d,d+=c[m].length+1;this[Es]=r}t=r[r.length-1];let o=0;if(e>=t)o=r.length-1;else{let c=r.length-2,d;for(;o<c;)if(d=o+(c-o>>1),e<r[d])c=d-1;else if(e>=r[d+1])o=d+1;else{o=d;break}}return{col:e-r[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ws(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,o){if(!this.map)return!1;let c=this.map.consumer(),d=c.originalPositionFor({column:t,line:e});if(!d.source)return!1;let m;typeof r=="number"&&(m=c.originalPositionFor({column:o,line:r}));let f;bs(d.source)?f=ki(d.source):f=new URL(d.source,this.map.consumer().sourceRoot||ki(this.map.mapFile));let y={column:d.column,endColumn:m&&m.column,endLine:m&&m.line,line:d.line,url:f.toString()};if(f.protocol==="file:")if(Ra)y.file=Ra(f);else throw new Error("file: protocol is not available in this PostCSS build");let w=c.sourceContentFor(d.source);return w&&(y.source=w),y}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var xi=Di;Di.default=Di,Cs&&Cs.registerInput&&Cs.registerInput(Di);let{SourceMapConsumer:ka,SourceMapGenerator:Ti}=qe,{dirname:Pi,relative:Da,resolve:xa,sep:Ta}=qe,{pathToFileURL:Pa}=qe,zh=xi,Gh=!!(ka&&Ti),Vh=!!(Pi&&xa&&Da&&Ta);var La=class{constructor(e,t,r,o){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
20`;this.css.includes(`\r
21`)&&(t=`\r
22`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Pi(e.file),o;this.mapOpts.sourcesContent===!1?(o=new ka(e.text),o.sourcesContent&&(o.sourcesContent=null)):o=e.consumer(),this.map.applySourceMap(o,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Vh&&Gh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ti.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ti({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ti({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},c,d;this.stringify(this.root,(m,f,y)=>{if(this.css+=m,f&&y!=="end"&&(o.generated.line=e,o.generated.column=t-1,f.source&&f.source.start?(o.source=this.sourcePath(f),o.original.line=f.source.start.line,o.original.column=f.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),c=m.match(/\n/g),c?(e+=c.length,d=m.lastIndexOf(`
23`),t=m.length-d):t+=m.length,f&&y!=="start"){let w=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==w.last||w.raws.semicolon)&&(f.source&&f.source.end?(o.source=this.sourcePath(f),o.original.line=f.source.end.line,o.original.column=f.source.end.column-1,o.generated.line=e,o.generated.column=t-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=e,o.generated.column=t-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Pi(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Pi(xa(r,this.mapOpts.annotation)));let o=Da(r,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new zh(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let o=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(o,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Pa){let r=Pa(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ta==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Wh=Mi,Is=class extends Wh{constructor(e){super(e),this.type="comment"}};var Li=Is;Is.default=Is;let{isClean:$a,my:Na}=Mr,Ua=Ai,Fa=Li,Kh=Mi,ja,Os,Rs,Ba;function za(n){return n.map(e=>(e.nodes&&(e.nodes=za(e.nodes)),delete e.source,e))}function Ga(n){if(n[$a]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)Ga(e)}let dt=class Dd extends Kh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let o of r)this.proxyOf.nodes.push(o)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,o;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],o=e(this.proxyOf.nodes[r],r),o!==!1);)this.indexes[t]+=1;return delete this.indexes[t],o}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(o=>typeof o=="function"?(c,d)=>o(c.toProxy(),d):o)):t==="every"||t==="some"?r=>e[t]((o,...c)=>r(o.toProxy(),...c)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let d of o)this.proxyOf.nodes.splice(r+1,0,d);let c;for(let d in this.indexes)c=this.indexes[d],r<c&&(this.indexes[d]=c+o.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),o=r===0?"prepend":!1,c=this.normalize(t,this.proxyOf.nodes[r],o).reverse();r=this.index(e);for(let m of c)this.proxyOf.nodes.splice(r,0,m);let d;for(let m in this.indexes)d=this.indexes[m],r<=d&&(this.indexes[m]=d+c.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=za(ja(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let o of e)o.parent&&o.parent.removeChild(o,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let o of e)o.parent&&o.parent.removeChild(o,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ua(e)]}else if(e.selector)e=[new Os(e)];else if(e.name)e=[new Rs(e)];else if(e.text)e=[new Fa(e)];else throw new Error("Unknown node type in node creation");return e.map(o=>(o[Na]||Dd.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[$a]&&Ga(o),typeof o.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(o.raws.before=t.raws.before.replace(/\S/g,"")),o.parent=this.proxyOf,o))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let o of r)this.proxyOf.nodes.unshift(o);for(let o in this.indexes)this.indexes[o]=this.indexes[o]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let o;try{o=e(t,r)}catch(c){throw t.addToError(c)}return o!==!1&&t.walk&&(o=t.walk(e)),o})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,o)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,o)}):this.walk((r,o)=>{if(r.type==="atrule"&&r.name===e)return t(r,o)}):(t=e,this.walk((r,o)=>{if(r.type==="atrule")return t(r,o)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,o)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,o)}):this.walk((r,o)=>{if(r.type==="decl"&&r.prop===e)return t(r,o)}):(t=e,this.walk((r,o)=>{if(r.type==="decl")return t(r,o)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,o)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,o)}):this.walk((r,o)=>{if(r.type==="rule"&&r.selector===e)return t(r,o)}):(t=e,this.walk((r,o)=>{if(r.type==="rule")return t(r,o)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};dt.registerParse=n=>{ja=n},dt.registerRule=n=>{Os=n},dt.registerAtRule=n=>{Rs=n},dt.registerRoot=n=>{Ba=n};var Pt=dt;dt.default=dt,dt.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Rs.prototype):n.type==="rule"?Object.setPrototypeOf(n,Os.prototype):n.type==="decl"?Object.setPrototypeOf(n,Ua.prototype):n.type==="comment"?Object.setPrototypeOf(n,Fa.prototype):n.type==="root"&&Object.setPrototypeOf(n,Ba.prototype),n[Na]=!0,n.nodes&&n.nodes.forEach(e=>{dt.rebuild(e)})};let Hh=Pt,Va,Wa,Ar=class extends Hh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Va(new Wa,this,e).stringify()}};Ar.registerLazyResult=n=>{Va=n},Ar.registerProcessor=n=>{Wa=n};var Ms=Ar;Ar.default=Ar;let As=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ka=As;As.default=As;let Yh=Ka,ks=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Yh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ds=ks;ks.default=ks;const xs=39,Ha=34,$i=92,Ya=47,Ni=10,kr=32,Ui=12,Fi=9,ji=13,Jh=91,Xh=93,qh=40,Zh=41,Qh=123,ef=125,tf=59,rf=42,nf=58,sf=64,Bi=/[\t\n\f\r "#'()/;[\\\]{}]/g,zi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,of=/.[\r\n"'(/\\]/,Ja=/[\da-f]/i;var af=function(e,t={}){let r=e.css.valueOf(),o=t.ignoreErrors,c,d,m,f,y,w,E,M,R,k,O=r.length,I=0,V=[],B=[];function x(){return I}function W(ie){throw e.error("Unclosed "+ie,I)}function le(){return B.length===0&&I>=O}function ge(ie){if(B.length)return B.pop();if(I>=O)return;let ke=ie?ie.ignoreUnclosed:!1;switch(c=r.charCodeAt(I),c){case Ni:case kr:case Fi:case ji:case Ui:{d=I;do d+=1,c=r.charCodeAt(d);while(c===kr||c===Ni||c===Fi||c===ji||c===Ui);k=["space",r.slice(I,d)],I=d-1;break}case Jh:case Xh:case Qh:case ef:case nf:case tf:case Zh:{let De=String.fromCharCode(c);k=[De,De,I];break}case qh:{if(M=V.length?V.pop()[1]:"",R=r.charCodeAt(I+1),M==="url"&&R!==xs&&R!==Ha&&R!==kr&&R!==Ni&&R!==Fi&&R!==Ui&&R!==ji){d=I;do{if(w=!1,d=r.indexOf(")",d+1),d===-1)if(o||ke){d=I;break}else W("bracket");for(E=d;r.charCodeAt(E-1)===$i;)E-=1,w=!w}while(w);k=["brackets",r.slice(I,d+1),I,d],I=d}else d=r.indexOf(")",I+1),f=r.slice(I,d+1),d===-1||of.test(f)?k=["(","(",I]:(k=["brackets",f,I,d],I=d);break}case xs:case Ha:{m=c===xs?"'":'"',d=I;do{if(w=!1,d=r.indexOf(m,d+1),d===-1)if(o||ke){d=I+1;break}else W("string");for(E=d;r.charCodeAt(E-1)===$i;)E-=1,w=!w}while(w);k=["string",r.slice(I,d+1),I,d],I=d;break}case sf:{Bi.lastIndex=I+1,Bi.test(r),Bi.lastIndex===0?d=r.length-1:d=Bi.lastIndex-2,k=["at-word",r.slice(I,d+1),I,d],I=d;break}case $i:{for(d=I,y=!0;r.charCodeAt(d+1)===$i;)d+=1,y=!y;if(c=r.charCodeAt(d+1),y&&c!==Ya&&c!==kr&&c!==Ni&&c!==Fi&&c!==ji&&c!==Ui&&(d+=1,Ja.test(r.charAt(d)))){for(;Ja.test(r.charAt(d+1));)d+=1;r.charCodeAt(d+1)===kr&&(d+=1)}k=["word",r.slice(I,d+1),I,d],I=d;break}default:{c===Ya&&r.charCodeAt(I+1)===rf?(d=r.indexOf("*/",I+2)+1,d===0&&(o||ke?d=r.length:W("comment")),k=["comment",r.slice(I,d+1),I,d],I=d):(zi.lastIndex=I+1,zi.test(r),zi.lastIndex===0?d=r.length-1:d=zi.lastIndex-2,k=["word",r.slice(I,d+1),I,d],V.push(k),I=d);break}}return I++,k}function Ae(ie){B.push(ie)}return{back:Ae,endOfFile:le,nextToken:ge,position:x}};let Xa=Pt,Gi=class extends Xa{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ts=Gi;Gi.default=Gi,Xa.registerAtRule(Gi);let qa=Pt,Za,Qa,er=class extends qa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let o=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let c of o)c.raws.before=t.raws.before}return o}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Za(new Qa,this,e).stringify()}};er.registerLazyResult=n=>{Za=n},er.registerProcessor=n=>{Qa=n};var Dr=er;er.default=er,qa.registerRoot(er);let xr={comma(n){return xr.split(n,[","],!0)},space(n){let e=[" ",`
24`,"	"];return xr.split(n,e)},split(n,e,t){let r=[],o="",c=!1,d=0,m=!1,f="",y=!1;for(let w of n)y?y=!1:w==="\\"?y=!0:m?w===f&&(m=!1):w==='"'||w==="'"?(m=!0,f=w):w==="("?d+=1:w===")"?d>0&&(d-=1):d===0&&e.includes(w)&&(c=!0),c?(o!==""&&r.push(o.trim()),o="",c=!1):o+=w;return(t||o!=="")&&r.push(o.trim()),r}};var el=xr;xr.default=xr;let tl=Pt,lf=el,Vi=class extends tl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return lf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ps=Vi;Vi.default=Vi,tl.registerRule(Vi);let uf=Ai,cf=af,df=Li,hf=Ts,ff=Dr,rl=Ps;const il={empty:!0,space:!0};function pf(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}var gf=class{constructor(e){this.input=e,this.root=new ff,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new hf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,o,c,d=!1,m=!1,f=[],y=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?y.push(r==="("?")":"]"):r==="{"&&y.length>0?y.push("}"):r===y[y.length-1]&&y.pop(),y.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){m=!0;break}else if(r==="}"){if(f.length>0){for(c=f.length-1,o=f[c];o&&o[0]==="space";)o=f[--c];o&&(t.source.end=this.getPosition(o[3]||o[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){d=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),d&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),m&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,o;for(let c=t-1;c>=0&&(o=e[c],!(o[0]!=="space"&&(r+=1,r===2)));c--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(e){let t=0,r,o,c;for(let[d,m]of e.entries()){if(r=m,o=r[0],o==="("&&(t+=1),o===")"&&(t-=1),t===0&&o===":")if(!c)this.doubleColon(r);else{if(c[0]==="word"&&c[1]==="progid")continue;return d}c=r}return!1}comment(e){let t=new df;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let o=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=o[2],t.raws.left=o[1],t.raws.right=o[3]}}createTokenizer(){this.tokenizer=cf(this.input)}decl(e,t){let r=new uf;this.init(r,e[0][2]);let o=e[e.length-1];for(o[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||pf(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let y=e[0][0];if(y===":"||y==="space"||y==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let c;for(;e.length;)if(c=e.shift(),c[0]===":"){r.raws.between+=c[1];break}else c[0]==="word"&&/\w/.test(c[1])&&this.unknownWord([c]),r.raws.between+=c[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let d=[],m;for(;e.length&&(m=e[0][0],!(m!=="space"&&m!=="comment"));)d.push(e.shift());this.precheckMissedSemicolon(e);for(let y=e.length-1;y>=0;y--){if(c=e[y],c[1].toLowerCase()==="!important"){r.important=!0;let w=this.stringFrom(e,y);w=this.spacesFromEnd(e)+w,w!==" !important"&&(r.raws.important=w);break}else if(c[1].toLowerCase()==="important"){let w=e.slice(0),E="";for(let M=y;M>0;M--){let R=w[M][0];if(E.trim().indexOf("!")===0&&R!=="space")break;E=w.pop()[1]+E}E.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=E,e=w)}if(c[0]!=="space"&&c[0]!=="comment")break}e.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(r.raws.between+=d.map(y=>y[1]).join(""),d=[]),this.raw(r,"value",d.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new rl;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,o=!1,c=null,d=[],m=e[1].startsWith("--"),f=[],y=e;for(;y;){if(r=y[0],f.push(y),r==="("||r==="[")c||(c=y),d.push(r==="("?")":"]");else if(m&&o&&r==="{")c||(c=y),d.push("}");else if(d.length===0)if(r===";")if(o){this.decl(f,m);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(o=!0);else r===d[d.length-1]&&(d.pop(),d.length===0&&(c=null));y=this.tokenizer.nextToken()}
vendor: 4,649 bytes, line 24
24if(this.tokenizer.endOfFile()&&(t=!0),d.length>0&&this.unclosedBracket(c),t&&o){if(!m)for(;f.length&&(y=f[f.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,m)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,o){let c,d,m=r.length,f="",y=!0,w,E;for(let M=0;M<m;M+=1)c=r[M],d=c[0],d==="space"&&M===m-1&&!o?y=!1:d==="comment"?(E=r[M-1]?r[M-1][0]:"empty",w=r[M+1]?r[M+1][0]:"empty",!il[E]&&!il[w]?f.slice(-1)===","?y=!1:f+=c[1]:y=!1):f+=c[1];if(!y){let M=r.reduce((R,k)=>R+k[1],"");e.raws[t]={raw:M,value:f}}e[t]=f}rule(e){e.pop();let t=new rl;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let o=t;o<e.length;o++)r+=e[o][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let mf=Pt,_f=gf,yf=xi;function Wi(n,e){let t=new yf(n,e),r=new _f(t);try{r.parse()}catch(o){throw o}return r.root}var Ls=Wi;Wi.default=Wi,mf.registerParse(Wi);let{isClean:nt,my:vf}=Mr,Sf=La,bf=Oi,wf=Pt,Cf=Ms,nl=Ds,Ef=Ls,If=Dr;const Of={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Rf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Mf={Once:!0,postcssPlugin:!0,prepare:!0},tr=0;function Tr(n){return typeof n=="object"&&typeof n.then=="function"}function sl(n){let e=!1,t=Of[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,tr,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,tr,t+"Exit"]:[t,t+"Exit"]}function ol(n){let e;return n.type==="document"?e=["Document",tr,"DocumentExit"]:n.type==="root"?e=["Root",tr,"RootExit"]:e=sl(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function $s(n){return n[nt]=!1,n.nodes&&n.nodes.forEach(e=>$s(e)),n}let Ns={},rr=class xd{constructor(e,t,r){this.stringified=!1,this.processed=!1;let o;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))o=$s(t);else if(t instanceof xd||t instanceof nl)o=$s(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let c=Ef;r.syntax&&(c=r.syntax.parse),r.parser&&(c=r.parser),c.parse&&(c=c.parse);try{o=c(t,r)}catch(d){this.processed=!0,this.error=d}o&&!o[vf]&&wf.rebuild(o)}this.result=new nl(e,o,r),this.helpers={...Ns,postcss:Ns,result:this.result},this.plugins=this.processor.plugins.map(c=>typeof c=="object"&&c.prepare?{...c,...c.prepare(this.result)}:c)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(o){console&&console.error&&console.error(o)}return e}prepareVisitors(){this.listeners={};let e=(t,r,o)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,o])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Rf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}
24. Try to update PostCSS (${this.processor.version} now).`);if(!Mf[r])if(typeof t[r]=="object")for(let o in t[r])o==="*"?e(t,r,t[r][o]):e(t,r+"-"+o.toLowerCase(),t[r][o]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Tr(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[nt];){e[nt]=!0;let t=[ol(e)];for(;t.length>0;){let r=this.visitTick(t);if(Tr(r))try{await r}catch(o){let c=t[t.length-1].node;throw this.handleError(o,c)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let o=e.nodes.map(c=>r(c,this.helpers));await Promise.all(o)}else await r(e,this.helpers)}catch(o){throw this.handleError(o)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Tr(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=bf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let o=new Sf(t,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Tr(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[nt];)e[nt]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,o]of e){this.result.lastPlugin=r;let c;try{c=o(t,this.helpers)}catch(d){throw this.handleError(d,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Tr(c))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:o}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(o.length>0&&t.visitorIndex<o.length){let[d,m]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=d;try{return m(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let d=t.iterator,m;for(;m=r.nodes[r.indexes[d]];)if(r.indexes[d]+=1,!m[nt]){m[nt]=!0,e.push(ol(m));return}t.iterator=0,delete r.indexes[d]}let c=t.events;for(;t.eventIndex<c.length;){let d=c[t.eventIndex];if(t.eventIndex+=1,d===tr){r.nodes&&r.nodes.length&&(r[nt]=!0,t.iterator=r.getIterator());return}else if(this.listeners[d]){t.visitors=this.listeners[d];return}}e.pop()}walkSync(e){e[nt]=!0;let t=sl(e);for(let r of t)if(r===tr)e.nodes&&e.each(o=>{o[nt]||this.walkSync(o)});else{let o=this.listeners[r];if(o&&this.visitSync(o,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};rr.registerPostcss=n=>{Ns=n};var al=rr;rr.default=rr,If.registerLazyResult(rr),Cf.registerLazyResult(rr);let Af=La,kf=Oi,Df=Ls;const xf=Ds;let Us=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let o,c=kf;this.result=new xf(this._processor,o,this._opts),this.result.css=t;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let m=new Af(c,o,this._opts,t);
vendor: 45,871 bytes, lines 24-49
24if(m.isMap()){let[f,y]=m.generate();f&&(this.result.css=f),y&&(this.result.map=y)}else m.clearAnnotation(),this.result.css=m.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Df;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Tf=Us;Us.default=Us;let Pf=Tf,Lf=al,$f=Ms,Nf=Dr,Pr=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Pf(this,e,t):new Lf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Uf=Pr;Pr.default=Pr,Nf.registerProcessor(Pr),$f.registerProcessor(Pr);let Ff=Ai,jf=Oa,Bf=Li,zf=Ts,Gf=xi,Vf=Dr,Wf=Ps;function Lr(n,e){if(Array.isArray(n))return n.map(o=>Lr(o));let{inputs:t,...r}=n;if(t){e=[];for(let o of t){let c={...o,__proto__:Gf.prototype};c.map&&(c.map={...c.map,__proto__:jf.prototype}),e.push(c)}}if(r.nodes&&(r.nodes=n.nodes.map(o=>Lr(o,e))),r.source){let{inputId:o,...c}=r.source;r.source=c,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Vf(r);if(r.type==="decl")return new Ff(r);if(r.type==="rule")return new Wf(r);if(r.type==="comment")return new Bf(r);if(r.type==="atrule")return new zf(r);throw new Error("Unknown node type: "+n.type)}var Kf=Lr;Lr.default=Lr;let Hf=fs,ll=Ai,Yf=al,Jf=Pt,Fs=Uf,Xf=Oi,qf=Kf,ul=Ms,Zf=Ka,cl=Li,dl=Ts,Qf=Ds,ep=xi,tp=Ls,rp=el,hl=Ps,fl=Dr,ip=Mi;function oe(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new Fs(n)}oe.plugin=function(e,t){let r=!1;function o(...d){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
25https://evilmartians.com/chronicles/postcss-8-plugin-migration`),i.LANG&&i.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
26https://www.w3ctech.com/topic/2226`));let m=t(...d);return m.postcssPlugin=e,m.postcssVersion=new Fs().version,m}let c;return Object.defineProperty(o,"postcss",{get(){return c||(c=o()),c}}),o.process=function(d,m,f){return oe([o(f)]).process(d,m)},o},oe.stringify=Xf,oe.parse=tp,oe.fromJSON=qf,oe.list=rp,oe.comment=n=>new cl(n),oe.atRule=n=>new dl(n),oe.decl=n=>new ll(n),oe.rule=n=>new hl(n),oe.root=n=>new fl(n),oe.document=n=>new ul(n),oe.CssSyntaxError=Hf,oe.Declaration=ll,oe.Container=Jf,oe.Processor=Fs,oe.Document=ul,oe.Comment=cl,oe.Warning=Zf,oe.AtRule=dl,oe.Result=Qf,oe.Input=ep,oe.Rule=hl,oe.Root=fl,oe.Node=ip,Yf.registerPostcss(oe);var np=oe;oe.default=oe;const me=bh(np);me.stringify,me.fromJSON,me.plugin,me.parse,me.list,me.document,me.comment,me.atRule,me.rule,me.decl,me.root,me.CssSyntaxError,me.Declaration,me.Container,me.Processor,me.Document,me.Comment,me.Warning,me.AtRule,me.Result,me.Input,me.Rule,me.Root,me.Node;var sp=Object.defineProperty,op=(n,e,t)=>e in n?sp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,We=(n,e,t)=>op(n,typeof e!="symbol"?e+"":e,t);function ap(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function lp(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}),t}var js={exports:{}},pe=String,pl=function(){return{isColorSupported:!1,reset:pe,bold:pe,dim:pe,italic:pe,underline:pe,inverse:pe,hidden:pe,strikethrough:pe,black:pe,red:pe,green:pe,yellow:pe,blue:pe,magenta:pe,cyan:pe,white:pe,gray:pe,bgBlack:pe,bgRed:pe,bgGreen:pe,bgYellow:pe,bgBlue:pe,bgMagenta:pe,bgCyan:pe,bgWhite:pe}};js.exports=pl(),js.exports.createColors=pl;var up=js.exports;const Ze=lp(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let gl=up,ml=Ze,Bs=class Td extends Error{constructor(e,t,r,o,c,d){super(e),this.name="CssSyntaxError",this.reason=e,c&&(this.file=c),o&&(this.source=o),d&&(this.plugin=d),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Td)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=gl.isColorSupported),ml&&e&&(t=ml(t));let r=t.split(/\r?\n/),o=Math.max(this.line-3,0),c=Math.min(this.line+2,r.length),d=String(c).length,m,f;if(e){let{bold:y,gray:w,red:E}=gl.createColors(!0);m=M=>y(E(M)),f=M=>w(M)}else m=f=y=>y;return r.slice(o,c).map((y,w)=>{let E=o+1+w,M=" "+(" "+E).slice(-d)+" | ";if(E===this.line){let R=f(M.replace(/\d/g," "))+y.slice(0,this.column-1).replace(/[^\t]/g," ");return m(">")+f(M)+y+`
27 `+R+m("^")}return" "+f(M)+y}).join(`
28`)}toString(){let e=this.showSourceCode();return e&&(e=`
29
30`+e+`
31`),this.name+": "+this.message+e}};var zs=Bs;Bs.default=Bs;var $r={};$r.isClean=Symbol("isClean"),$r.my=Symbol("my");const _l={after:`
32`,beforeClose:`
33`,beforeComment:`
34`,beforeDecl:`
35`,beforeOpen:" ",beforeRule:`
36`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function cp(n){return n[0].toUpperCase()+n.slice(1)}let Gs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:o&&(r+=" "),e.nodes)this.block(e,r+o);else{let c=(e.raws.between||"")+(t?";":"");this.builder(r+o+c,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let o=e.parent,c=0;for(;o&&o.type!=="root";)c+=1,o=o.parent;if(r.includes(`
37`)){let d=this.raw(e,null,"indent");if(d.length)for(let m=0;m<c;m++)r+=d}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let o;e.nodes&&e.nodes.length?(this.body(e),o=this.raw(e,"after")):o=this.raw(e,"after","emptyBody"),o&&this.builder(o),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let o=0;o<e.nodes.length;o++){let c=e.nodes[o],d=this.raw(c,"before");d&&this.builder(d),this.stringify(c,t!==o||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),o=e.prop+r+this.rawValue(e,"value");e.important&&(o+=e.raws.important||" !important"),t&&(o+=";"),this.builder(o,e)}document(e){this.body(e)}raw(e,t,r){let o;if(r||(r=t),t&&(o=e.raws[t],typeof o<"u"))return o;let c=e.parent;if(r==="before"&&(!c||c.type==="root"&&c.first===e||c&&c.type==="document"))return"";if(!c)return _l[r];let d=e.root();if(d.rawCache||(d.rawCache={}),typeof d.rawCache[r]<"u")return d.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let m="raw"+cp(r);this[m]?o=this[m](d,e):d.walk(f=>{if(o=f.raws[t],typeof o<"u")return!1})}return typeof o>"u"&&(o=_l[r]),d.rawCache[r]=o,o}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
38`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
39`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
40`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
41`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let o=r.parent;if(o&&o!==e&&o.parent&&o.parent===e&&typeof r.raws.before<"u"){let c=r.raws.before.split(`
42`);return t=c[c.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],o=e.raws[t];return o&&o.value===r?o.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var yl=Gs;Gs.default=Gs;let dp=yl;function Vs(n,e){new dp(e).stringify(n)}var Ki=Vs;Vs.default=Vs;let{isClean:Hi,my:hp}=$r,fp=zs,pp=yl,gp=Ki;function Ws(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let o=n[r],c=typeof o;r==="parent"&&c==="object"?e&&(t[r]=e):r==="source"?t[r]=o:Array.isArray(o)?t[r]=o.map(d=>Ws(d,t)):(c==="object"&&o!==null&&(o=Ws(o)),t[r]=o)}return t}let Ks=class{constructor(e={}){this.raws={},this[Hi]=!1,this[hp]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ws(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:r.column,line:r.line},t)}return new fp(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Hi]){this[Hi]=!1;let e=this;for(;e=e.parent;)e[Hi]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let o=t.indexOf(e.word);o!==-1&&(r=this.positionInside(o,t))}return r}positionInside(e,t){let r=t||this.toString(),o=this.source.start.column,c=this.source.start.line;for(let d=0;d<e;d++)r[d]===`
43`?(o=1,c+=1):o+=1;return{column:o,line:c}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o=this.toString(),c=o.indexOf(e.word);c!==-1&&(t=this.positionInside(c,o),r=this.positionInside(c+e.word.length,o))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new pp().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let o of e)o===this?r=!0:r?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},o=t==null;t=t||new Map;let c=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let m=this[d];if(Array.isArray(m))r[d]=m.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof m=="object"&&m.toJSON)r[d]=m.toJSON(null,t);else if(d==="source"){let f=t.get(m.input);f==null&&(f=c,t.set(m.input,c),c++),r[d]={end:m.end,inputId:f,start:m.start}}else r[d]=m}return o&&(r.inputs=[...t.keys()].map(d=>d.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=gp){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let o={node:this};for(let c in r)o[c]=r[c];return e.warn(t,o)}get proxyOf(){return this}};var Yi=Ks;Ks.default=Ks;let mp=Yi,Hs=class extends mp{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ji=Hs;Hs.default=Hs;let _p="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var yp={nanoid:(n=21)=>{let e="",t=n;for(;t--;)e+=_p[Math.random()*64|0];return e}};let{SourceMapConsumer:vl,SourceMapGenerator:Sl}=Ze,{existsSync:vp,readFileSync:Sp}=Ze,{dirname:Ys,join:bp}=Ze;function wp(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}let Js=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,o=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ys(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new vl(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,c=/^data:application\/json,/;if(o.test(e)||c.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return wp(e.substr(RegExp.lastMatch.length));let d=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+d)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),o=e.indexOf("*/",r);r>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,o)))}loadFile(e){if(this.root=Ys(e),vp(e))return this.mapFile=e,Sp(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let o=this.loadFile(r);if(!o)throw new Error("Unable to load previous source map: "+r.toString());return o}}else{if(t instanceof vl)return Sl.fromSourceMap(t).toString();if(t instanceof Sl)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=bp(Ys(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var bl=Js;Js.default=Js;let{SourceMapConsumer:Cp,SourceMapGenerator:Ep}=Ze,{fileURLToPath:wl,pathToFileURL:Xi}=Ze,{isAbsolute:Xs,resolve:qs}=Ze,{nanoid:Ip}=yp,Zs=Ze,Cl=zs,Op=bl,Qs=Symbol("fromOffsetCache"),Rp=!!(Cp&&Ep),El=!!(qs&&Xs),qi=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!El||/^\w+:\/\//.test(t.from)||Xs(t.from)?this.file=t.from:this.file=qs(t.from)),El&&Rp){let r=new Op(this.css,t);if(r.text){this.map=r;let o=r.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+Ip(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,o={}){let c,d,m;if(t&&typeof t=="object"){let y=t,w=r;if(typeof y.offset=="number"){let E=this.fromOffset(y.offset);t=E.line,r=E.col}else t=y.line,r=y.column;if(typeof w.offset=="number"){let E=this.fromOffset(w.offset);d=E.line,m=E.col}else d=w.line,m=w.column}else if(!r){let y=this.fromOffset(t);t=y.line,r=y.col}let f=this.origin(t,r,d,m);return f?c=new Cl(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,o.plugin):c=new Cl(e,d===void 0?t:{column:r,line:t},d===void 0?r:{column:m,line:d},this.css,this.file,o.plugin),c.input={column:r,endColumn:m,endLine:d,line:t,source:this.css},this.file&&(Xi&&(c.input.url=Xi(this.file).toString()),c.input.file=this.file),c}fromOffset(e){let t,r;if(this[Qs])r=this[Qs];else{let c=this.css.split(`
44`);r=new Array(c.length);let d=0;for(let m=0,f=c.length;m<f;m++)r[m]=d,d+=c[m].length+1;this[Qs]=r}t=r[r.length-1];let o=0;if(e>=t)o=r.length-1;else{let c=r.length-2,d;for(;o<c;)if(d=o+(c-o>>1),e<r[d])c=d-1;else if(e>=r[d+1])o=d+1;else{o=d;break}}return{col:e-r[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:qs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,o){if(!this.map)return!1;let c=this.map.consumer(),d=c.originalPositionFor({column:t,line:e});if(!d.source)return!1;let m;typeof r=="number"&&(m=c.originalPositionFor({column:o,line:r}));let f;Xs(d.source)?f=Xi(d.source):f=new URL(d.source,this.map.consumer().sourceRoot||Xi(this.map.mapFile));let y={column:d.column,endColumn:m&&m.column,endLine:m&&m.line,line:d.line,url:f.toString()};if(f.protocol==="file:")if(wl)y.file=wl(f);else throw new Error("file: protocol is not available in this PostCSS build");let w=c.sourceContentFor(d.source);return w&&(y.source=w),y}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Zi=qi;qi.default=qi,Zs&&Zs.registerInput&&Zs.registerInput(qi);let{SourceMapConsumer:Il,SourceMapGenerator:Qi}=Ze,{dirname:en,relative:Ol,resolve:Rl,sep:Ml}=Ze,{pathToFileURL:Al}=Ze,Mp=Zi,Ap=!!(Il&&Qi),kp=!!(en&&Rl&&Ol&&Ml);var kl=class{constructor(e,t,r,o){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
45`;this.css.includes(`\r
46`)&&(t=`\r
47`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||en(e.file),o;this.mapOpts.sourcesContent===!1?(o=new Il(e.text),o.sourcesContent&&(o.sourcesContent=null)):o=e.consumer(),this.map.applySourceMap(o,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),kp&&Ap&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Qi.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Qi({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Qi({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},c,d;this.stringify(this.root,(m,f,y)=>{if(this.css+=m,f&&y!=="end"&&(o.generated.line=e,o.generated.column=t-1,f.source&&f.source.start?(o.source=this.sourcePath(f),o.original.line=f.source.start.line,o.original.column=f.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),c=m.match(/\n/g),c?(e+=c.length,d=m.lastIndexOf(`
48`),t=m.length-d):t+=m.length,f&&y!=="start"){let w=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==w.last||w.raws.semicolon)&&(f.source&&f.source.end?(o.source=this.sourcePath(f),o.original.line=f.source.end.line,o.original.column=f.source.end.column-1,o.generated.line=e,o.generated.column=t-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=e,o.generated.column=t-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?en(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=en(Rl(r,this.mapOpts.annotation)));let o=Ol(r,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Mp(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let o=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(o,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Al){let r=Al(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ml==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Dp=Yi,eo=class extends Dp{constructor(e){super(e),this.type="comment"}};var tn=eo;eo.default=eo;let{isClean:Dl,my:xl}=$r,Tl=Ji,Pl=tn,xp=Yi,Ll,to,ro,$l;function Nl(n){return n.map(e=>(e.nodes&&(e.nodes=Nl(e.nodes)),delete e.source,e))}function Ul(n){if(n[Dl]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)Ul(e)}let ht=class Pd extends xp{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let o of r)this.proxyOf.nodes.push(o)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,o;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],o=e(this.proxyOf.nodes[r],r),o!==!1);)this.indexes[t]+=1;return delete this.indexes[t],o}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(o=>typeof o=="function"?(c,d)=>o(c.toProxy(),d):o)):t==="every"||t==="some"?r=>e[t]((o,...c)=>r(o.toProxy(),...c)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let d of o)this.proxyOf.nodes.splice(r+1,0,d);let c;for(let d in this.indexes)c=this.indexes[d],r<c&&(this.indexes[d]=c+o.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),o=r===0?"prepend":!1,c=this.normalize(t,this.proxyOf.nodes[r],o).reverse();r=this.index(e);for(let m of c)this.proxyOf.nodes.splice(r,0,m);let d;for(let m in this.indexes)d=this.indexes[m],r<=d&&(this.indexes[m]=d+c.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Nl(Ll(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let o of e)o.parent&&o.parent.removeChild(o,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let o of e)o.parent&&o.parent.removeChild(o,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Tl(e)]}else if(e.selector)e=[new to(e)];else if(e.name)e=[new ro(e)];else if(e.text)e=[new Pl(e)];else throw new Error("Unknown node type in node creation");return e.map(o=>(o[xl]||Pd.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[Dl]&&Ul(o),typeof o.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(o.raws.before=t.raws.before.replace(/\S/g,"")),o.parent=this.proxyOf,o))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let o of r)this.proxyOf.nodes.unshift(o);for(let o in this.indexes)this.indexes[o]=this.indexes[o]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let o;try{o=e(t,r)}catch(c){throw t.addToError(c)}return o!==!1&&t.walk&&(o=t.walk(e)),o})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,o)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,o)}):this.walk((r,o)=>{if(r.type==="atrule"&&r.name===e)return t(r,o)}):(t=e,this.walk((r,o)=>{if(r.type==="atrule")return t(r,o)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,o)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,o)}):this.walk((r,o)=>{if(r.type==="decl"&&r.prop===e)return t(r,o)}):(t=e,this.walk((r,o)=>{if(r.type==="decl")return t(r,o)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,o)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,o)}):this.walk((r,o)=>{if(r.type==="rule"&&r.selector===e)return t(r,o)}):(t=e,this.walk((r,o)=>{if(r.type==="rule")return t(r,o)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ht.registerParse=n=>{Ll=n},ht.registerRule=n=>{to=n},ht.registerAtRule=n=>{ro=n},ht.registerRoot=n=>{$l=n};var Lt=ht;ht.default=ht,ht.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,ro.prototype):n.type==="rule"?Object.setPrototypeOf(n,to.prototype):n.type==="decl"?Object.setPrototypeOf(n,Tl.prototype):n.type==="comment"?Object.setPrototypeOf(n,Pl.prototype):n.type==="root"&&Object.setPrototypeOf(n,$l.prototype),n[xl]=!0,n.nodes&&n.nodes.forEach(e=>{ht.rebuild(e)})};let Tp=Lt,Fl,jl,Nr=class extends Tp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Fl(new jl,this,e).stringify()}};Nr.registerLazyResult=n=>{Fl=n},Nr.registerProcessor=n=>{jl=n};var io=Nr;Nr.default=Nr;let no=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Bl=no;no.default=no;let Pp=Bl,so=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Pp(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var oo=so;so.default=so;const ao=39,zl=34,rn=92,Gl=47,nn=10,Ur=32,sn=12,on=9,an=13,Lp=91,$p=93,Np=40,Up=41,Fp=123,jp=125,Bp=59,zp=42,Gp=58,Vp=64,ln=/[\t\n\f\r "#'()/;[\\\]{}]/g,un=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Wp=/.[\r\n"'(/\\]/,Vl=/[\da-f]/i;var Kp=function(e,t={}){let r=e.css.valueOf(),o=t.ignoreErrors,c,d,m,f,y,w,E,M,R,k,O=r.length,I=0,V=[],B=[];function x(){return I}function W(ie){throw e.error("Unclosed "+ie,I)}function le(){return B.length===0&&I>=O}function ge(ie){if(B.length)return B.pop();if(I>=O)return;let ke=ie?ie.ignoreUnclosed:!1;switch(c=r.charCodeAt(I),c){case nn:case Ur:case on:case an:case sn:{d=I;do d+=1,c=r.charCodeAt(d);while(c===Ur||c===nn||c===on||c===an||c===sn);k=["space",r.slice(I,d)],I=d-1;break}case Lp:case $p:case Fp:case jp:case Gp:case Bp:case Up:{let De=String.fromCharCode(c);k=[De,De,I];break}case Np:{if(M=V.length?V.pop()[1]:"",R=r.charCodeAt(I+1),M==="url"&&R!==ao&&R!==zl&&R!==Ur&&R!==nn&&R!==on&&R!==sn&&R!==an){d=I;do{if(w=!1,d=r.indexOf(")",d+1),d===-1)if(o||ke){d=I;break}else W("bracket");for(E=d;r.charCodeAt(E-1)===rn;)E-=1,w=!w}while(w);k=["brackets",r.slice(I,d+1),I,d],I=d}else d=r.indexOf(")",I+1),f=r.slice(I,d+1),d===-1||Wp.test(f)?k=["(","(",I]:(k=["brackets",f,I,d],I=d);break}case ao:case zl:{m=c===ao?"'":'"',d=I;do{if(w=!1,d=r.indexOf(m,d+1),d===-1)if(o||ke){d=I+1;break}else W("string");for(E=d;r.charCodeAt(E-1)===rn;)E-=1,w=!w}while(w);k=["string",r.slice(I,d+1),I,d],I=d;break}case Vp:{ln.lastIndex=I+1,ln.test(r),ln.lastIndex===0?d=r.length-1:d=ln.lastIndex-2,k=["at-word",r.slice(I,d+1),I,d],I=d;break}case rn:{for(d=I,y=!0;r.charCodeAt(d+1)===rn;)d+=1,y=!y;if(c=r.charCodeAt(d+1),y&&c!==Gl&&c!==Ur&&c!==nn&&c!==on&&c!==an&&c!==sn&&(d+=1,Vl.test(r.charAt(d)))){for(;Vl.test(r.charAt(d+1));)d+=1;r.charCodeAt(d+1)===Ur&&(d+=1)}k=["word",r.slice(I,d+1),I,d],I=d;break}default:{c===Gl&&r.charCodeAt(I+1)===zp?(d=r.indexOf("*/",I+2)+1,d===0&&(o||ke?d=r.length:W("comment")),k=["comment",r.slice(I,d+1),I,d],I=d):(un.lastIndex=I+1,un.test(r),un.lastIndex===0?d=r.length-1:d=un.lastIndex-2,k=["word",r.slice(I,d+1),I,d],V.push(k),I=d);break}}return I++,k}function Ae(ie){B.push(ie)}return{back:Ae,endOfFile:le,nextToken:ge,position:x}};let Wl=Lt,cn=class extends Wl{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var lo=cn;cn.default=cn,Wl.registerAtRule(cn);let Kl=Lt,Hl,Yl,ir=class extends Kl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let o=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let c of o)c.raws.before=t.raws.before}return o}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Hl(new Yl,this,e).stringify()}};ir.registerLazyResult=n=>{Hl=n},ir.registerProcessor=n=>{Yl=n};var Fr=ir;ir.default=ir,Kl.registerRoot(ir);let jr={comma(n){return jr.split(n,[","],!0)},space(n){let e=[" ",`
49`,"	"];return jr.split(n,e)},split(n,e,t){let r=[],o="",c=!1,d=0,m=!1,f="",y=!1;for(let w of n)y?y=!1:w==="\\"?y=!0:m?w===f&&(m=!1):w==='"'||w==="'"?(m=!0,f=w):w==="("?d+=1:w===")"?d>0&&(d-=1):d===0&&e.includes(w)&&(c=!0),c?(o!==""&&r.push(o.trim()),o="",c=!1):o+=w;return(t||o!=="")&&r.push(o.trim()),r}};var Jl=jr;jr.default=jr;let Xl=Lt,Hp=Jl,dn=class extends Xl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Hp.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var uo=dn;dn.default=dn,Xl.registerRule(dn);let Yp=Ji,Jp=Kp,Xp=tn,qp=lo,Zp=Fr,ql=uo;const Zl={empty:!0,space:!0};function Qp(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}var eg=class{constructor(e){this.input=e,this.root=new Zp,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new qp;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,o,c,d=!1,m=!1,f=[],y=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?y.push(r==="("?")":"]"):r==="{"&&y.length>0?y.push("}"):r===y[y.length-1]&&y.pop(),y.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){m=!0;break}else if(r==="}"){if(f.length>0){for(c=f.length-1,o=f[c];o&&o[0]==="space";)o=f[--c];o&&(t.source.end=this.getPosition(o[3]||o[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){d=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),d&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),m&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,o;for(let c=t-1;c>=0&&(o=e[c],!(o[0]!=="space"&&(r+=1,r===2)));c--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(e){let t=0,r,o,c;for(let[d,m]of e.entries()){if(r=m,o=r[0],o==="("&&(t+=1),o===")"&&(t-=1),t===0&&o===":")if(!c)this.doubleColon(r);else{if(c[0]==="word"&&c[1]==="progid")continue;return d}c=r}return!1}comment(e){let t=new Xp;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let o=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=o[2],t.raws.left=o[1],t.raws.right=o[3]}}createTokenizer(){this.tokenizer=Jp(this.input)}decl(e,t){let r=new Yp;this.init(r,e[0][2]);let o=e[e.length-1];for(o[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||Qp(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let y=e[0][0];if(y===":"||y==="space"||y==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let c;for(;e.length;)if(c=e.shift(),c[0]===":"){r.raws.between+=c[1];break}else c[0]==="word"&&/\w/.test(c[1])&&this.unknownWord([c]),r.raws.between+=c[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let d=[],m;for(;e.length&&(m=e[0][0],!(m!=="space"&&m!=="comment"));)d.push(e.shift());this.precheckMissedSemicolon(e);for(let y=e.length-1;y>=0;y--){if(c=e[y],c[1].toLowerCase()==="!important"){r.important=!0;let w=this.stringFrom(e,y);w=this.spacesFromEnd(e)+w,w!==" !important"&&(r.raws.important=w);break}else if(c[1].toLowerCase()==="important"){let w=e.slice(0),E="";for(let M=y;M>0;M--){let R=w[M][0];if(E.trim().indexOf("!")===0&&R!=="space")break;E=w.pop()[1]+E}E.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=E,e=w)}if(c[0]!=="space"&&c[0]!=="comment")break}e.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(r.raws.between+=d.map(y=>y[1]).join(""),d=[]),this.raw(r,"value",d.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new ql;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,o=!1,c=null,d=[],m=e[1].startsWith("--"),f=[],y=e;for(;y;){if(r=y[0],f.push(y),r==="("||r==="[")c||(c=y),d.push(r==="("?")":"]");else if(m&&o&&r==="{")c||(c=y),d.push("}");else if(d.length===0)if(r===";")if(o){this.decl(f,m);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(o=!0);else r===d[d.length-1]&&(d.pop(),d.length===0&&(c=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),d.length>0&&this.unclosedBracket(c),t&&o){if(!m)for(;f.length&&(y=f[f.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,m)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,o){let c,d,m=r.length,f="",y=!0,w,E;for(let M=0;M<m;M+=1)c=r[M],d=c[0],d==="space"&&M===m-1&&!o?y=!1:d==="comment"?(E=r[M-1]?r[M-1][0]:"empty",w=r[M+1]?r[M+1][0]:"empty",!Zl[E]&&!Zl[w]?f.slice(-1)===","?y=!1:f+=c[1]:y=!1):f+=c[1];if(!y){let M=r.reduce((R,k)=>R+k[1],"");e.raws[t]={raw:M,value:f}}e[t]=f}rule(e){e.pop();let t=new ql;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let o=t;o<e.length;o++)r+=e[o][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let tg=Lt,rg=eg,ig=Zi;function hn(n,e){let t=new ig(n,e),r=new rg(t);try{r.parse()}catch(o){throw o}return r.root}var co=hn;hn.default=hn,tg.registerParse(hn);let{isClean:st,my:ng}=$r,sg=kl,og=Ki,ag=Lt,lg=io,Ql=oo,ug=co,cg=Fr;const dg={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hg={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},fg={Once:!0,postcssPlugin:!0,prepare:!0},nr=0;function Br(n){return typeof n=="object"&&typeof n.then=="function"}function eu(n){let e=!1,t=dg[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,nr,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,nr,t+"Exit"]:[t,t+"Exit"]}function tu(n){let e;return n.type==="document"?e=["Document",nr,"DocumentExit"]:n.type==="root"?e=["Root",nr,"RootExit"]:e=eu(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function ho(n){return n[st]=!1,n.nodes&&n.nodes.forEach(e=>ho(e)),n}let fo={},sr=class Ld{constructor(e,t,r){this.stringified=!1,this.processed=!1;let o;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))o=ho(t);else if(t instanceof Ld||t instanceof Ql)o=ho(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let c=ug;r.syntax&&(c=r.syntax.parse),r.parser&&(c=r.parser),c.parse&&(c=c.parse);try{o=c(t,r)}catch(d){this.processed=!0,this.error=d}o&&!o[ng]&&ag.rebuild(o)}this.result=new Ql(e,o,r),this.helpers={...fo,postcss:fo,result:this.result},this.plugins=this.processor.plugins.map(c=>typeof c=="object"&&c.prepare?{...c,...c.prepare(this.result)}:c)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(o){console&&console.error&&console.error(o)}return e}prepareVisitors(){this.listeners={};let e=(t,r,o)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,o])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!hg[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}
49. Try to update PostCSS (${this.processor.version} now).`);if(!fg[r])if(typeof t[r]=="object")for(let o in t[r])o==="*"?e(t,r,t[r][o]):e(t,r+"-"+o.toLowerCase(),t[r][o]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Br(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[st];){e[st]=!0;let t=[tu(e)];for(;t.length>0;){let r=this.visitTick(t);if(Br(r))try{await r}catch(o){let c=t[t.length-1].node;throw this.handleError(o,c)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let o=e.nodes.map(c=>r(c,this.helpers));await Promise.all(o)}else await r(e,this.helpers)}catch(o){throw this.handleError(o)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Br(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=og;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let o=new sg(t,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Br(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[st];)e[st]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,o]of e){this.result.lastPlugin=r;let c;try{c=o(t,this.helpers)}catch(d){throw this.handleError(d,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Br(c))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:o}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(o.length>0&&t.visitorIndex<o.length){let[d,m]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=d;try{return m(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let d=t.iterator,m;for(;m=r.nodes[r.indexes[d]];)if(r.indexes[d]+=1,!m[st]){m[st]=!0,e.push(tu(m));return}t.iterator=0,delete r.indexes[d]}let c=t.events;for(;t.eventIndex<c.length;){let d=c[t.eventIndex];if(t.eventIndex+=1,d===nr){r.nodes&&r.nodes.length&&(r[st]=!0,t.iterator=r.getIterator());return}else if(this.listeners[d]){t.visitors=this.listeners[d];return}}e.pop()}walkSync(e){e[st]=!0;let t=eu(e);for(let r of t)if(r===nr)e.nodes&&e.each(o=>{o[st]||this.walkSync(o)});else{let o=this.listeners[r];if(o&&this.visitSync(o,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};sr.registerPostcss=n=>{fo=n};var ru=sr;sr.default=sr,cg.registerLazyResult(sr),lg.registerLazyResult(sr);let pg=kl,gg=Ki,mg=co;const _g=oo;let po=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let o,c=gg;this.result=new _g(this._processor,o,this._opts),this.result.css=t;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let m=new pg(c,o,this._opts,t);
vendor: 7,110 bytes, lines 49-51
49if(m.isMap()){let[f,y]=m.generate();f&&(this.result.css=f),y&&(this.result.map=y)}else m.clearAnnotation(),this.result.css=m.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=mg;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var yg=po;po.default=po;let vg=yg,Sg=ru,bg=io,wg=Fr,zr=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new vg(this,e,t):new Sg(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Cg=zr;zr.default=zr,wg.registerProcessor(zr),bg.registerProcessor(zr);let Eg=Ji,Ig=bl,Og=tn,Rg=lo,Mg=Zi,Ag=Fr,kg=uo;function Gr(n,e){if(Array.isArray(n))return n.map(o=>Gr(o));let{inputs:t,...r}=n;if(t){e=[];for(let o of t){let c={...o,__proto__:Mg.prototype};c.map&&(c.map={...c.map,__proto__:Ig.prototype}),e.push(c)}}if(r.nodes&&(r.nodes=n.nodes.map(o=>Gr(o,e))),r.source){let{inputId:o,...c}=r.source;r.source=c,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Ag(r);if(r.type==="decl")return new Eg(r);if(r.type==="rule")return new kg(r);if(r.type==="comment")return new Og(r);if(r.type==="atrule")return new Rg(r);throw new Error("Unknown node type: "+n.type)}var Dg=Gr;Gr.default=Gr;let xg=zs,iu=Ji,Tg=ru,Pg=Lt,go=Cg,Lg=Ki,$g=Dg,nu=io,Ng=Bl,su=tn,ou=lo,Ug=oo,Fg=Zi,jg=co,Bg=Jl,au=uo,lu=Fr,zg=Yi;function ae(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new go(n)}ae.plugin=function(e,t){let r=!1;function o(...d){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
50https://evilmartians.com/chronicles/postcss-8-plugin-migration`),i.LANG&&i.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
51https://www.w3ctech.com/topic/2226`));let m=t(...d);return m.postcssPlugin=e,m.postcssVersion=new go().version,m}let c;return Object.defineProperty(o,"postcss",{get(){return c||(c=o()),c}}),o.process=function(d,m,f){return ae([o(f)]).process(d,m)},o},ae.stringify=Lg,ae.parse=jg,ae.fromJSON=$g,ae.list=Bg,ae.comment=n=>new su(n),ae.atRule=n=>new ou(n),ae.decl=n=>new iu(n),ae.rule=n=>new au(n),ae.root=n=>new lu(n),ae.document=n=>new nu(n),ae.CssSyntaxError=xg,ae.Declaration=iu,ae.Container=Pg,ae.Processor=go,ae.Document=nu,ae.Comment=su,ae.Warning=Ng,ae.AtRule=ou,ae.Result=Ug,ae.Input=Fg,ae.Rule=au,ae.Root=lu,ae.Node=zg,Tg.registerPostcss(ae);var Gg=ae;ae.default=ae;const _e=ap(Gg);_e.stringify,_e.fromJSON,_e.plugin,_e.parse,_e.list,_e.document,_e.comment,_e.atRule,_e.rule,_e.decl,_e.root,_e.CssSyntaxError,_e.Declaration,_e.Container,_e.Processor,_e.Document,_e.Comment,_e.Warning,_e.AtRule,_e.Result,_e.Input,_e.Rule,_e.Root,_e.Node;class mo{constructor(...e){We(this,"parentElement",null),We(this,"parentNode",null),We(this,"ownerDocument"),We(this,"firstChild",null),We(this,"lastChild",null),We(this,"previousSibling",null),We(this,"nextSibling",null),We(this,"ELEMENT_NODE",1),We(this,"TEXT_NODE",3),We(this,"nodeType"),We(this,"nodeName"),We(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof mo){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const uu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},fn={};function _o(n){if(fn[n])return fn[n];const e=globalThis[n],t=e.prototype,r=n in uu?uu[n]:void 0,o=!!(r&&r.every(m=>{var f,y;return!!((y=(f=Object.getOwnPropertyDescriptor(t,m))==null?void 0:f.get)!=null&&y.toString().includes("[native code]"))})),c=n in cu?cu[n]:void 0,d=!!(c&&c.every(m=>{var f;return typeof t[m]=="function"&&((f=t[m])==null?void 0:f.toString().includes("[native code]"))}));if(o&&d)return fn[n]=e.prototype,e.prototype;try{const m=document.createElement("iframe");document.body.appendChild(m);const f=m.contentWindow;if(!f)return e.prototype;const y=f[n].prototype;return document.body.removeChild(m),y?fn[n]=y:t}catch{return t}}const yo={};function Et(n,e,t){var r;const o=`${n}.${String(t)}`;if(yo[o])return yo[o].call(e);const c=_o(n),d=(r=Object.getOwnPropertyDescriptor(c,t))==null?void 0:r.get;return d?(yo[o]=d,d.call(e)):e[t]}const vo={};function du(n,e,t){const r=`${n}.${String(t)}`;if(vo[r])return vo[r].bind(e);const c=_o(n)[t];return typeof c!="function"?e[t]:(vo[r]=c,c.bind(e))}function Vg(n){return Et("Node",n,"childNodes")}function Wg(n){return Et("Node",n,"parentNode")}function Kg(n){return Et("Node",n,"parentElement")}function Hg(n){return Et("Node",n,"textContent")}function Yg(n,e){return du("Node",n,"contains")(e)}function Jg(n){return du("Node",n,"getRootNode")()}function Xg(n){return!n||!("host"in n)?null:Et("ShadowRoot",n,"host")}function qg(n){return n.styleSheets}function Zg(n){return!n||!("shadowRoot"in n)?null:Et("Element",n,"shadowRoot")}function Qg(n,e){return Et("Element",n,"querySelector")(e)}function em(n,e){return Et("Element",n,"querySelectorAll")(e)}function hu(){return _o("MutationObserver").constructor}const X={childNodes:Vg,parentNode:Wg,parentElement:Kg,textContent:Hg,contains:Yg,getRootNode:Jg,host:Xg,styleSheets:qg,shadowRoot:Zg,querySelector:Qg,querySelectorAll:em,mutationObserver:hu};function Pe(n,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(n,e,r),()=>t.removeEventListener(n,e,r)}const or=`Please stop import mirror directly. Instead of that,\r
52now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
53or you can use record.mirror to access the mirror instance during recording.`;let fu={map:{},getId(){return console.error(or),-1},getNode(){return console.error(or),null},removeNodeFromMap(){console.error(or)},has(){return console.error(or),!1},reset(){console.error(or)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(fu=new Proxy(fu,{get(n,e,t){return e==="map"&&console.error(or),Reflect.get(n,e,t)}}));function Vr(n,e,t={}){let r=null,o=0;return function(...c){const d=Date.now();!o&&t.leading===!1&&(o=d);const m=e-(d-o),f=this;m<=0||m>e?(r&&(clearTimeout(r),r=null),o=d,n.apply(f,c)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{o=t.leading===!1?0:Date.now(),r=null,n.apply(f,c)},m))}}function pn(n,e,t,r,o=window){const c=o.Object.getOwnPropertyDescriptor(n,e);return o.Object.defineProperty(n,e,r?t:{set(d){setTimeout(()=>{t.set.call(this,d)},0),c&&c.set&&c.set.call(this,d)}}),()=>pn(n,e,c||{},!0)}function ar(n,e,t){try{if(!(e in n))return()=>{};const r=n[e],o=t(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=o,()=>{n[e]=r}}catch{return()=>{}}}let gn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(gn=()=>new Date().getTime());function pu(n){var e,t,r,o;const c=n.document;return{left:c.scrollingElement?c.scrollingElement.scrollLeft:n.pageXOffset!==void 0?n.pageXOffset:c.documentElement.scrollLeft||(c==null?void 0:c.body)&&((e=X.parentElement(c.body))==null?void 0:e.scrollLeft)||((t=c==null?void 0:c.body)==null?void 0:t.scrollLeft)||0,top:c.scrollingElement?c.scrollingElement.scrollTop:n.pageYOffset!==void 0?n.pageYOffset:(c==null?void 0:c.documentElement.scrollTop)||(c==null?void 0:c.body)&&((r=X.parentElement(c.body))==null?void 0:r.scrollTop)||((o=c==null?void 0:c.body)==null?void 0:o.scrollTop)||0}}function gu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function mu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _u(n){return n?n.nodeType===n.ELEMENT_NODE?n:X.parentElement(n):null}function Le(n,e,t,r){if(!n)return!1;const o=_u(n);if(!o)return!1;try{if(typeof e=="string"){if(o.classList.contains(e)||r&&o.closest("."+e)!==null)return!0}else if(Ii(o,e,r))return!0}catch{}return!!(t&&(o.matches(t)||r&&o.closest(t)!==null))}function tm(n,e){return e.getId(n)!==-1}function So(n,e,t){return n.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(n)===Rr}function yu(n,e){if(Ct(n))return!1;const t=e.getId(n);if(!e.has(t))return!0;const r=X.parentNode(n);return r&&r.nodeType===n.DOCUMENT_NODE?!1:r?yu(r,e):!0}function bo(n){return!!n.changedTouches}function rm(n=window){"NodeList"in n&&!n.NodeList.prototype.forEach&&(n.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in n&&!n.DOMTokenList.prototype.forEach&&(n.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function vu(n,e){return!!(n.nodeName==="IFRAME"&&e.getMeta(n))}function Su(n,e){return!!(n.nodeName==="LINK"&&n.nodeType===n.ELEMENT_NODE&&n.getAttribute&&n.getAttribute("rel")==="stylesheet"&&e.getMeta(n))}function wo(n){return n?n instanceof mo&&"shadowRoot"in n?!!n.shadowRoot:!!X.shadowRoot(n):!1}class im{constructor(){u(this,"id",1),u(this,"styleIDMap",new WeakMap),u(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function bu(n){var e;let t=null;return"getRootNode"in n&&((e=X.getRootNode(n))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&X.host(X.getRootNode(n))&&(t=X.host(X.getRootNode(n))),t}function nm(n){let e=n,t;for(;t=bu(e);)e=t;return e}function sm(n){const e=n.ownerDocument;if(!e)return!1;const t=nm(n);
vendor: 8,661 bytes, line 53
53return X.contains(e,t)}function wu(n){const e=n.ownerDocument;return e?X.contains(e,n)||sm(n):!1}var te=(n=>(n[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",n))(te||{}),q=(n=>(n[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n))(q||{}),Ue=(n=>(n[n.MouseUp=0]="MouseUp",n[n.MouseDown=1]="MouseDown",n[n.Click=2]="Click",n[n.ContextMenu=3]="ContextMenu",n[n.DblClick=4]="DblClick",n[n.Focus=5]="Focus",n[n.Blur=6]="Blur",n[n.TouchStart=7]="TouchStart",n[n.TouchMove_Departed=8]="TouchMove_Departed",n[n.TouchEnd=9]="TouchEnd",n[n.TouchCancel=10]="TouchCancel",n))(Ue||{}),ft=(n=>(n[n.Mouse=0]="Mouse",n[n.Pen=1]="Pen",n[n.Touch=2]="Touch",n))(ft||{}),lr=(n=>(n[n["2D"]=0]="2D",n[n.WebGL=1]="WebGL",n[n.WebGL2=2]="WebGL2",n))(lr||{}),ur=(n=>(n[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Seeked=2]="Seeked",n[n.VolumeChange=3]="VolumeChange",n[n.RateChange=4]="RateChange",n))(ur||{});function Cu(n){return"__ln"in n}class om{constructor(){u(this,"length",0),u(this,"head",null),u(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Cu(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Cu(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Eu=(n,e)=>`${n}@${e}`;class am{constructor(){u(this,"frozen",!1),u(this,"locked",!1),u(this,"texts",[]),u(this,"attributes",[]),u(this,"attributeMap",new WeakMap),u(this,"removes",[]),u(this,"mapRemoves",[]),u(this,"movedMap",{}),u(this,"addedSet",new Set),u(this,"movedSet",new Set),u(this,"droppedSet",new Set),u(this,"mutationCb"),u(this,"blockClass"),u(this,"blockSelector"),u(this,"maskTextClass"),u(this,"maskTextSelector"),u(this,"inlineStylesheet"),u(this,"maskInputOptions"),u(this,"maskTextFn"),u(this,"maskInputFn"),u(this,"keepIframeSrcFn"),u(this,"recordCanvas"),u(this,"inlineImages"),u(this,"slimDOMOptions"),u(this,"dataURLOptions"),u(this,"doc"),u(this,"mirror"),u(this,"iframeManager"),u(this,"stylesheetManager"),u(this,"shadowDomManager"),u(this,"canvasManager"),u(this,"processedNodeManager"),u(this,"unattachedDoc"),u(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),u(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new om,o=f=>{let y=f,w=Rr;for(;w===Rr;)y=y&&y.nextSibling,w=y&&this.mirror.getId(y);return w},c=f=>{const y=X.parentNode(f);if(!y||!wu(f)||y.tagName==="TEXTAREA")return;const w=Ct(y)?this.mirror.getId(bu(f)):this.mirror.getId(y),E=o(f);if(w===-1||E===-1)return r.addNode(f);const M=Qt(f,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:R=>{vu(R,this.mirror)&&this.iframeManager.addIframe(R),Su(R,this.mirror)&&this.stylesheetManager.trackLinkElement(R),wo(f)&&this.shadowDomManager.addShadowRoot(X.shadowRoot(f),this.doc)},onIframeLoad:(R,k)=>{this.iframeManager.attachIframe(R,k),this.shadowDomManager.observeAttachShadow(R)},onStylesheetLoad:(R,k)=>{this.stylesheetManager.attachLinkElement(R,k)}});M&&(e.push({parentId:w,nextId:E,node:M}),t.add(M.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const f of this.movedSet)Iu(this.removes,f,this.mirror)&&!this.movedSet.has(X.parentNode(f))||c(f);for(const f of this.addedSet)!Ou(this.droppedSet,f)&&!Iu(this.removes,f,this.mirror)||Ou(this.movedSet,f)?c(f):this.droppedSet.add(f);let d=null;for(;r.length;){let f=null;if(d){const y=this.mirror.getId(X.parentNode(d.value)),w=o(d.value);y!==-1&&w!==-1&&(f=d)}if(!f){let y=r.tail;for(;y;){const w=y;if(y=y.previous,w){const E=this.mirror.getId(X.parentNode(w.value));if(o(w.value)===-1)continue;if(E!==-1){f=w;break}else{const R=w.value,k=X.parentNode(R);if(k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const O=X.host(k);if(this.mirror.getId(O)!==-1){f=w;break}}}}}}if(!f){for(;r.head;)r.removeNode(r.head.value);break}d=f.previous,r.removeNode(f.value),c(f.value)}const m={texts:this.texts.map(f=>{const y=f.node,w=X.parentNode(y);return w&&w.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(w),{id:this.mirror.getId(y),value:f.value}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{const{attributes:y}=f;if(typeof y.style=="string"){const w=JSON.stringify(f.styleDiff),E=JSON.stringify(f._unchangedStyles);w.length<y.style.length&&(w+E).split("var(").length===y.style.split("var(").length&&(y.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:y}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:e};!m.texts.length&&!m.attributes.length&&!m.removes.length&&!m.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(m))}),u(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(X.childNodes(e),r=>X.textContent(r)||"").join("")}),u(this,"processMutation",e=>{if(!So(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=X.textContent(e.target);!Le(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ya(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,_u(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,o=e.target.getAttribute(r);if(r==="value"){const d=ye(t);o=j({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:d,value:o,maskInputFn:this.maskInputFn})}if(Le(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;let c=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!t.contentDocument)r="rr_src";else return;if(c||(c={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(c),this.attributeMap.set(e.target,c)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!_a(t.tagName,r))if(c.attributes[r]=ma(this.doc,G(t.tagName),G(r),o),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const d=this.unattachedDoc.createElement("span");e.oldValue&&d.setAttribute("style",e.oldValue);for(const m of Array.from(t.style)){const f=t.style.getPropertyValue(m),y=t.style.getPropertyPriority(m);f!==d.style.getPropertyValue(m)||y!==d.style.getPropertyPriority(m)?y===""?c.styleDiff[m]=f:c.styleDiff[m]=[f,y]:c._unchangedStyles[m]=[f,y]}for(const m of Array.from(d.style))t.style.getPropertyValue(m)===""&&(c.styleDiff[m]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?c.attributes.rr_open_mode="modal":c.attributes.rr_open_mode="non-modal");break}
vendor: 1,239 bytes, line 53
53case"childList":{if(Le(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),o=Ct(e.target)?this.mirror.getId(X.host(e.target)):this.mirror.getId(e.target);Le(e.target,this.blockClass,this.blockSelector,!1)||So(t,this.mirror,this.slimDOMOptions)||!tm(t,this.mirror)||(this.addedSet.has(t)?(Co(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||yu(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Eu(r,o)]?Co(this.movedSet,t):this.removes.push({parentId:o,id:r,isShadow:Ct(e.target)&&Tt(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}}}),u(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(So(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Eu(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Le(e,this.blockClass,this.blockSelector,!1)||(X.childNodes(e).forEach(r=>
vendor: 20,843 bytes, line 53
53this.genAdds(r)),wo(e)&&X.childNodes(X.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}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 Co(n,e){n.delete(e),X.childNodes(e).forEach(t=>Co(n,t))}function Iu(n,e,t){return n.length===0?!1:lm(n,e,t)}function lm(n,e,t){let r=X.parentNode(e);for(;r;){const o=t.getId(r);if(n.some(c=>c.id===o))return!0;r=X.parentNode(r)}return!1}function Ou(n,e){return n.size===0?!1:Ru(n,e)}function Ru(n,e){const t=X.parentNode(e);return t?n.has(t)?!0:Ru(n,t):!1}let Wr;function um(n){Wr=n}function cm(){Wr=void 0}const Q=n=>Wr?(...t)=>{try{return n(...t)}catch(r){if(Wr&&Wr(r)===!0)return;throw r}}:n,$t=[];function Kr(n){try{if("composedPath"in n){const e=n.composedPath();if(e.length)return e[0]}else if("path"in n&&n.path.length)return n.path[0]}catch{}return n&&n.target}function Mu(n,e){const t=new am;$t.push(t),t.init(n);const r=new(hu())(Q(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function dm({mousemoveCb:n,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const o=typeof e.mousemove=="number"?e.mousemove:50,c=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let d=[],m;const f=Vr(Q(E=>{const M=Date.now()-m;n(d.map(R=>(R.timeOffset-=M,R)),E),d=[],m=null}),c),y=Q(Vr(Q(E=>{const M=Kr(E),{clientX:R,clientY:k}=bo(E)?E.changedTouches[0]:E;m||(m=gn()),d.push({x:R,y:k,id:r.getId(M),timeOffset:gn()-m}),f(typeof DragEvent<"u"&&E instanceof DragEvent?q.Drag:E instanceof MouseEvent?q.MouseMove:q.TouchMove)}),o,{trailing:!1})),w=[Pe("mousemove",y,t),Pe("touchmove",y,t),Pe("drag",y,t)];return Q(()=>{w.forEach(E=>E())})}function hm({mouseInteractionCb:n,doc:e,mirror:t,blockClass:r,blockSelector:o,sampling:c}){if(c.mouseInteraction===!1)return()=>{};const d=c.mouseInteraction===!0||c.mouseInteraction===void 0?{}:c.mouseInteraction,m=[];let f=null;const y=w=>E=>{const M=Kr(E);if(Le(M,r,o,!0))return;let R=null,k=w;if("pointerType"in E){switch(E.pointerType){case"mouse":R=ft.Mouse;break;case"touch":R=ft.Touch;break;case"pen":R=ft.Pen;break}R===ft.Touch?Ue[w]===Ue.MouseDown?k="TouchStart":Ue[w]===Ue.MouseUp&&(k="TouchEnd"):ft.Pen}else bo(E)&&(R=ft.Touch);R!==null?(f=R,(k.startsWith("Touch")&&R===ft.Touch||k.startsWith("Mouse")&&R===ft.Mouse)&&(R=null)):Ue[w]===Ue.Click&&(R=f,f=null);const O=bo(E)?E.changedTouches[0]:E;if(!O)return;const I=t.getId(M),{clientX:V,clientY:B}=O;Q(n)({type:Ue[k],id:I,x:V,y:B,...R!==null&&{pointerType:R}})};return Object.keys(Ue).filter(w=>Number.isNaN(Number(w))&&!w.endsWith("_Departed")&&d[w]!==!1).forEach(w=>{let E=G(w);const M=y(w);if(window.PointerEvent)switch(Ue[w]){case Ue.MouseDown:case Ue.MouseUp:E=E.replace("mouse","pointer");break;case Ue.TouchStart:case Ue.TouchEnd:return}m.push(Pe(E,M,e))}),Q(()=>{m.forEach(w=>w())})}function Au({scrollCb:n,doc:e,mirror:t,blockClass:r,blockSelector:o,sampling:c}){const d=Q(Vr(Q(m=>{const f=Kr(m);if(!f||Le(f,r,o,!0))return;const y=t.getId(f);if(f===e&&e.defaultView){const w=pu(e.defaultView);n({id:y,x:w.left,y:w.top})}else n({id:y,x:f.scrollLeft,y:f.scrollTop})}),c.scroll||100));return Pe("scroll",d,e)}function fm({viewportResizeCb:n},{win:e}){let t=-1,r=-1;const o=Q(Vr(Q(()=>{const c=gu(),d=mu();(t!==c||r!==d)&&(n({width:Number(d),height:Number(c)}),t=c,r=d)}),200));return Pe("resize",o,e)}const pm=["INPUT","TEXTAREA","SELECT"],ku=new WeakMap;function gm({inputCb:n,doc:e,mirror:t,blockClass:r,blockSelector:o,ignoreClass:c,ignoreSelector:d,maskInputOptions:m,maskInputFn:f,sampling:y,userTriggeredOnInput:w}){function E(B){let x=Kr(B);const W=B.isTrusted,le=x&&x.tagName;if(x&&le==="OPTION"&&(x=X.parentElement(x)),!x||!le||pm.indexOf(le)<0||Le(x,r,o,!0)||x.classList.contains(c)||d&&x.matches(d))return;let ge=x.value,Ae=!1;const ie=ye(x)||"";ie==="radio"||ie==="checkbox"?Ae=x.checked:(m[le.toLowerCase()]||m[ie])&&(ge=j({element:x,maskInputOptions:m,tagName:le,type:ie,value:ge,maskInputFn:f})),M(x,w?{text:ge,isChecked:Ae,userTriggered:W}:{text:ge,isChecked:Ae});const ke=x.name;ie==="radio"&&ke&&Ae&&e.querySelectorAll(`input[type="radio"][name="${ke}"]`).forEach(De=>{if(De!==x){const Ke=De.value;M(De,w?{text:Ke,isChecked:!Ae,userTriggered:!1}:{text:Ke,isChecked:!Ae})}})}function M(B,x){const W=ku.get(B);if(!W||W.text!==x.text||W.isChecked!==x.isChecked){ku.set(B,x);const le=t.getId(B);Q(n)({...x,id:le})}}const k=(y.input==="last"?["change"]:["input","change"]).map(B=>Pe(B,Q(E),e)),O=e.defaultView;if(!O)return()=>{k.forEach(B=>B())};const I=O.Object.getOwnPropertyDescriptor(O.HTMLInputElement.prototype,"value"),V=[[O.HTMLInputElement.prototype,"value"],[O.HTMLInputElement.prototype,"checked"],[O.HTMLSelectElement.prototype,"value"],[O.HTMLTextAreaElement.prototype,"value"],[O.HTMLSelectElement.prototype,"selectedIndex"],[O.HTMLOptionElement.prototype,"selected"]];return I&&I.set&&k.push(...V.map(B=>pn(B[0],B[1],{set(){Q(E)({target:this,isTrusted:!1})}},!1,O))),Q(()=>{k.forEach(B=>B())})}function mn(n){const e=[];function t(r,o){if(_n("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||_n("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||_n("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||_n("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const d=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(d)}else if(r.parentStyleSheet){const d=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(d)}return o}return t(n,e)}function It(n,e,t){let r,o;return n?(n.ownerNode?r=e.getId(n.ownerNode):o=t.getId(n),{styleId:o,id:r}):{}}function mm({styleSheetRuleCb:n,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Q((w,E,M)=>{const[R,k]=M,{id:O,styleId:I}=It(E,e,t.styleMirror);return(O&&O!==-1||I&&I!==-1)&&n({id:O,styleId:I,adds:[{rule:R,index:k}]}),w.apply(E,M)})}),r.CSSStyleSheet.prototype.addRule=function(w,E,M=this.cssRules.length){const R=`${w} { ${E} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[R,M])};const c=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:Q((w,E,M)=>{const[R]=M,{id:k,styleId:O}=It(E,e,t.styleMirror);return(k&&k!==-1||O&&O!==-1)&&n({id:k,styleId:O,removes:[{index:R}]}),w.apply(E,M)})}),r.CSSStyleSheet.prototype.removeRule=function(w){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[w])};let d;r.CSSStyleSheet.prototype.replace&&(d=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(d,{apply:Q((w,E,M)=>{const[R]=M,{id:k,styleId:O}=It(E,e,t.styleMirror);return(k&&k!==-1||O&&O!==-1)&&n({id:k,styleId:O,replace:R}),w.apply(E,M)})}));let m;r.CSSStyleSheet.prototype.replaceSync&&(m=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(m,{apply:Q((w,E,M)=>{const[R]=M,{id:k,styleId:O}=It(E,e,t.styleMirror);return(k&&k!==-1||O&&O!==-1)&&n({id:k,styleId:O,replaceSync:R}),w.apply(E,M)})}));const f={};yn("CSSGroupingRule")?f.CSSGroupingRule=r.CSSGroupingRule:(yn("CSSMediaRule")&&(f.CSSMediaRule=r.CSSMediaRule),yn("CSSConditionRule")&&(f.CSSConditionRule=r.CSSConditionRule),yn("CSSSupportsRule")&&(f.CSSSupportsRule=r.CSSSupportsRule));const y={};return Object.entries(f).forEach(([w,E])=>{y[w]={insertRule:E.prototype.insertRule,deleteRule:E.prototype.deleteRule},E.prototype.insertRule=new Proxy(y[w].insertRule,{apply:Q((M,R,k)=>{const[O,I]=k,{id:V,styleId:B}=It(R.parentStyleSheet,e,t.styleMirror);return(V&&V!==-1||B&&B!==-1)&&n({id:V,styleId:B,adds:[{rule:O,index:[...mn(R),I||0]}]}),M.apply(R,k)})}),E.prototype.deleteRule=new Proxy(y[w].deleteRule,{apply:Q((M,R,k)=>{const[O]=k,{id:I,styleId:V}=It(R.parentStyleSheet,e,t.styleMirror);return(I&&I!==-1||V&&V!==-1)&&n({id:I,styleId:V,removes:[{index:[...mn(R),O]}]}),M.apply(R,k)})})}),Q(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=c,d&&(r.CSSStyleSheet.prototype.replace=d),m&&(r.CSSStyleSheet.prototype.replaceSync=m),Object.entries(f).forEach(([w,E])=>{E.prototype.insertRule=y[w].insertRule,E.prototype.deleteRule=y[w].deleteRule})})}function Du({mirror:n,stylesheetManager:e},t){var r,o,c;let d=null;t.nodeName==="#document"?d=n.getId(t):d=n.getId(X.host(t));const m=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(c=(o=t.ownerDocument)==null?void 0:o.defaultView)==null?void 0:c.ShadowRoot,f=m!=null&&m.prototype?Object.getOwnPropertyDescriptor(m==null?void 0:m.prototype,"adoptedStyleSheets"):void 0;return d===null||d===-1||!m||!f?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var y;return(y=f.get)==null?void 0:y.call(this)},set(y){var w;const E=(w=f.set)==null?void 0:w.call(this,y);if(d!==null&&d!==-1)try{e.adoptStyleSheets(y,d)}catch{}return E}}),Q(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}function _m({styleDeclarationCb:n,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:o}){const c=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(c,{apply:Q((m,f,y)=>{var w;const[E,M,R]=y;if(t.has(E))return c.apply(f,[E,M,R]);const{id:k,styleId:O}=It((w=f.parentRule)==null?void 0:w.parentStyleSheet,e,r.styleMirror);return(k&&k!==-1||O&&O!==-1)&&n({id:k,styleId:O,set:{property:E,value:M,priority:R},index:mn(f.parentRule)}),m.apply(f,y)})});const d=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(d,{apply:Q((m,f,y)=>{var w;const[E]=y;if(t.has(E))return d.apply(f,[E]);const{id:M,styleId:R}=It((w=f.parentRule)==null?void 0:w.parentStyleSheet,e,r.styleMirror);return(M&&M!==-1||R&&R!==-1)&&n({id:M,styleId:R,remove:{property:E},index:mn(f.parentRule)}),m.apply(f,y)})}),Q(()=>{o.CSSStyleDeclaration.prototype.setProperty=c,o.CSSStyleDeclaration.prototype.removeProperty=d})}function ym({mediaInteractionCb:n,blockClass:e,blockSelector:t,mirror:r,sampling:o,doc:c}){const d=Q(f=>Vr(Q(y=>{const w=Kr(y);if(!w||Le(w,e,t,!0))return;const{currentTime:E,volume:M,muted:R,playbackRate:k,loop:O}=w;n({type:f,id:r.getId(w),currentTime:E,volume:M,muted:R,playbackRate:k,loop:O})}),o.media||500)),m=[Pe("play",d(ur.Play),c),Pe("pause",d(ur.Pause),c),Pe("seeked",d(ur.Seeked),c),Pe("volumechange",d(ur.VolumeChange),c),Pe("ratechange",d(ur.RateChange),c)];return Q(()=>{m.forEach(f=>f())})}function vm({fontCb:n,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],o=new WeakMap,c=t.FontFace;t.FontFace=function(f,y,w){const E=new c(f,y,w);return o.set(E,{family:f,buffer:typeof y!="string",descriptors:w,fontSource:typeof y=="string"?y:JSON.stringify(Array.from(new Uint8Array(y)))}),E};const d=ar(e.fonts,"add",function(m){return function(f){return setTimeout(Q(()=>{const y=o.get(f);y&&(n(y),o.delete(f))}),0),m.apply(this,[f])}});return r.push(()=>{t.FontFace=c}),r.push(d),Q(()=>{r.forEach(m=>m())})}function Sm(n){const{doc:e,mirror:t,blockClass:r,blockSelector:o,selectionCb:c}=n;let d=!0;const m=Q(()=>{const f=e.getSelection();if(!f||d&&(f!=null&&f.isCollapsed))return;d=f.isCollapsed||!1;const y=[],w=f.rangeCount||0;for(let E=0;E<w;E++){const M=f.getRangeAt(E),{startContainer:R,startOffset:k,endContainer:O,endOffset:I}=M;Le(R,r,o,!0)||Le(O,r,o,!0)||y.push({start:t.getId(R),startOffset:k,end:t.getId(O),endOffset:I})}c({ranges:y})});return m(),Pe("selectionchange",m)}function bm({doc:n,customElementCb:e}){const t=n.defaultView;return!t||!t.customElements?()=>{}:ar(t.customElements,"define",function(o){return function(c,d,m){try{e({define:{name:c}})}catch{console.warn(`Custom element callback failed for ${c}`)}return o.apply(this,[c,d,m])}})}function wm(n,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:o,scrollCb:c,viewportResizeCb:d,inputCb:m,mediaInteractionCb:f,styleSheetRuleCb:y,styleDeclarationCb:w,canvasMutationCb:E,fontCb:M,selectionCb:R,customElementCb:k}=n;n.mutationCb=(...O)=>{e.mutation&&e.mutation(...O),t(...O)},n.mousemoveCb=(...O)=>{e.mousemove&&e.mousemove(...O),r(...O)},n.mouseInteractionCb=(...O)=>{e.mouseInteraction&&e.mouseInteraction(...O),o(...O)},n.scrollCb=(...O)=>{e.scroll&&e.scroll(...O),c(...O)},n.viewportResizeCb=(...O)=>{e.viewportResize&&e.viewportResize(...O),d(...O)},n.inputCb=(...O)=>{e.input&&e.input(...O),m(...O)},n.mediaInteractionCb=(...O)=>{e.mediaInteaction&&e.mediaInteaction(...O),f(...O)},n.styleSheetRuleCb=(...O)=>{e.styleSheetRule&&e.styleSheetRule(...O),y(...O)},n.styleDeclarationCb=(...O)=>{e.styleDeclaration&&e.styleDeclaration(...O),w(...O)},n.canvasMutationCb=(...O)=>{e.canvasMutation&&e.canvasMutation(...O),E(...O)},n.fontCb=(...O)=>{e.font&&e.font(...O),M(...O)},n.selectionCb=(...O)=>{e.selection&&e.selection(...O),R(...O)},n.customElementCb=(...O)=>{e.customElement&&e.customElement(...O),k(...O)}}function Cm(n,e={}){const t=n.doc.defaultView;if(!t)return()=>{};wm(n,e);let r;n.recordDOM&&(r=Mu(n,n.doc));const o=dm(n),c=hm(n),d=Au(n),m=fm(n,{win:t}),f=gm(n),y=ym(n);let w=()=>{},E=()=>{},M=()=>{},R=()=>{};n.recordDOM&&(w=mm(n,{win:t}),E=Du(n,n.doc),M=_m(n,{win:t}),n.collectFonts&&(R=vm(n)));const k=Sm(n),O=bm(n),I=[];for(const V of n.plugins)I.push(V.observer(V.callback,t,V.options));return Q(()=>{$t.forEach(V=>V.reset()),r==null||r.disconnect(),o(),c(),d(),m(),f(),y(),w(),E(),M(),R(),k(),O(),I.forEach(V=>V())})}function _n(n){return typeof window[n]<"u"}function yn(n){return!!(typeof window[n]<"u"&&window[n].prototype&&"insertRule"in window[n].prototype&&"deleteRule"in window[n].prototype)}class xu{constructor(e){u(this,"iframeIdToRemoteIdMap",new WeakMap),u(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,o){const c=r||this.getIdToRemoteIdMap(e),d=o||this.getRemoteIdToIdMap(e);let m=c.get(t);return m||(m=this.generateIdFn(),c.set(t,m),d.set(m,t)),m}getIds(e,t){const r=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map(c=>this.getId(e,c,r,o))}getRemoteId(e,t,r){const o=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const c=o.get(t);return c||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(o=>this.getRemoteId(e,o,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Em{constructor(e){u(this,"iframes",new WeakMap),u(this,"crossOriginIframeMap",new WeakMap),u(this,"crossOriginIframeMirror",new xu(fa)),u(this,"crossOriginIframeStyleMirror"),u(this,"crossOriginIframeRootIdMap",new WeakMap),u(this,"mirror"),u(this,"mutationCb"),u(this,"wrappedEmit"),u(this,"loadListener"),u(this,"stylesheetManager"),u(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xu(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,o;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(o=this.loadListener)==null||o.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const o=this.crossOriginIframeMap.get(e.source);if(!o)return;const c=this.transformCrossOriginEvent(o,t.data.event);c&&this.wrappedEmit(c,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case te.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const o=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,o),this.patchRootIdOnNode(t.data.node,o),{timestamp:t.timestamp,type:te.IncrementalSnapshot,data:{source:q.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case te.Meta:case te.Load:case te.DomContentLoaded:return!1;case te.Plugin:return t;case te.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case te.IncrementalSnapshot:switch(t.data.source){case q.Mutation:return t.data.adds.forEach(o=>{this.replaceIds(o,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,e);const c=this.crossOriginIframeRootIdMap.get(e);c&&this.patchRootIdOnNode(o.node,c)}),t.data.removes.forEach(o=>{this.replaceIds(o,e,["parentId","id"])}),t.data.attributes.forEach(o=>{this.replaceIds(o,e,["id"])}),t.data.texts.forEach(o=>{this.replaceIds(o,e,["id"])}),t;case q.Drag:case q.TouchMove:case q.MouseMove:return t.data.positions.forEach(o=>{this.replaceIds(o,e,["id"])}),t;case q.ViewportResize:return!1;case q.MediaInteraction:case q.MouseInteraction:case q.Scroll:case q.CanvasMutation:case q.Input:return this.replaceIds(t.data,e,["id"]),t;case q.StyleSheetRule:case q.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case q.Font:return t;case q.Selection:return t.data.ranges.forEach(o=>{this.replaceIds(o,e,["start","end"])}),t;case q.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(o=>{this.replaceStyleIds(o,e,["styleId"])}),t}}return!1}replace(e,t,r,o){for(const c of o)!Array.isArray(t[c])&&typeof t[c]!="number"||(Array.isArray(t[c])?t[c]=e.getIds(r,t[c]):t[c]=e.getId(r,t[c]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==S.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Im{constructor(e){u(this,"shadowDoms",new WeakSet),u(this,"mutationCb"),u(this,"scrollCb"),u(this,"bypassOptions"),u(this,"mirror"),u(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Tt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Mu({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Au({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(X.host(e))),this.restoreHandlers.push(Du({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(ar(e.prototype,"attachShadow",function(o){return function(c){const d=o.call(this,c),m=X.shadowRoot(this);return m&&wu(this)&&r.addShadowRoot(m,t),d}}))}
vendor: 5,043 bytes, line 53
53reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var cr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Om=typeof Uint8Array>"u"?[]:new Uint8Array(256),vn=0;vn<cr.length;vn++)Om[cr.charCodeAt(vn)]=vn;var Rm=function(n){var e=new Uint8Array(n),t,r=e.length,o="";for(t=0;t<r;t+=3)o+=cr[e[t]>>2],o+=cr[(e[t]&3)<<4|e[t+1]>>4],o+=cr[(e[t+1]&15)<<2|e[t+2]>>6],o+=cr[e[t+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const Tu=new Map;function Mm(n,e){let t=Tu.get(n);return t||(t=new Map,Tu.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}const Pu=(n,e,t)=>{if(!n||!($u(n,e)||typeof n=="object"))return;const r=n.constructor.name,o=Mm(t,r);let c=o.indexOf(n);return c===-1&&(c=o.length,o.push(n)),c};function Sn(n,e,t){if(n instanceof Array)return n.map(r=>Sn(r,e,t));if(n===null)return n;if(n instanceof Float32Array||n instanceof Float64Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Uint8Array||n instanceof Uint16Array||n instanceof Int16Array||n instanceof Int8Array||n instanceof Uint8ClampedArray)return{rr_type:n.constructor.name,args:[Object.values(n)]};if(n instanceof ArrayBuffer){const r=n.constructor.name,o=Rm(n);return{rr_type:r,base64:o}}else{if(n instanceof DataView)return{rr_type:n.constructor.name,args:[Sn(n.buffer,e,t),n.byteOffset,n.byteLength]};if(n instanceof HTMLImageElement){const r=n.constructor.name,{src:o}=n;return{rr_type:r,src:o}}else if(n instanceof HTMLCanvasElement){const r="HTMLImageElement",o=n.toDataURL();return{rr_type:r,src:o}}else{if(n instanceof ImageData)return{rr_type:n.constructor.name,args:[Sn(n.data,e,t),n.width,n.height]};if($u(n,e)||typeof n=="object"){const r=n.constructor.name,o=Pu(n,e,t);return{rr_type:r,index:o}}}}return n}const Lu=(n,e,t)=>n.map(r=>Sn(r,e,t)),$u=(n,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof e[o]=="function").find(o=>n instanceof e[o]);function Am(n,e,t,r){const o=[],c=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const d of c)try{if(typeof e.CanvasRenderingContext2D.prototype[d]!="function")continue;const m=ar(e.CanvasRenderingContext2D.prototype,d,function(f){return function(...y){return Le(this.canvas,t,r,!0)||setTimeout(()=>{const w=Lu(y,e,this);n(this.canvas,{type:lr["2D"],property:d,args:w})},0),f.apply(this,y)}});o.push(m)}catch{const m=pn(e.CanvasRenderingContext2D.prototype,d,{set(f){n(this.canvas,{type:lr["2D"],property:d,args:[f],setter:!0})}});o.push(m)}return()=>{o.forEach(d=>d())}}function km(n){return n==="experimental-webgl"?"webgl":n}function Nu(n,e,t,r){const o=[];try{const c=ar(n.HTMLCanvasElement.prototype,"getContext",function(d){return function(m,...f){if(!Le(this,e,t,!0)){const y=km(m);if("__context"in this||(this.__context=y),r&&["webgl","webgl2"].includes(y))if(f[0]&&typeof f[0]=="object"){const w=f[0];w.preserveDrawingBuffer||(w.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return d.apply(this,[m,...f])}});o.push(c)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(c=>c())}}function Uu(n,e,t,r,o,c){const d=[],m=Object.getOwnPropertyNames(n);for(const f of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof n[f]!="function")continue;const y=ar(n,f,function(w){return function(...E){const M=w.apply(this,E);if(Pu(M,c,this),"tagName"in this.canvas&&!Le(this.canvas,r,o,!0)){const R=Lu(E,c,this),k={type:e,property:f,args:R};t(this.canvas,k)}return M}});d.push(y)}catch{const y=pn(n,f,{set(w){t(this.canvas,{type:e,property:f,args:[w],setter:!0})}});d.push(y)}return d}function Dm(n,e,t,r){const o=[];return o.push(...Uu(e.WebGLRenderingContext.prototype,lr.WebGL,n,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&o.push(...Uu(e.WebGL2RenderingContext.prototype,lr.WebGL2,n,t,r,e)),()=>{o.forEach(c=>c())}}const Fu="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSA
53yKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",xm=n=>Uint8Array.from(atob(n),e=>e.charCodeAt(0)),ju=typeof window<"u"&&window.Blob&&new Blob([xm(Fu)],{type:"text/javascript;charset=utf-8"});function Tm(n){let e;try{if(e=ju&&(window.URL||window.webkitURL).createObjectURL(ju),!e)throw"";const t=new Worker(e,{name:n==null?void 0:n.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Fu,{name:n==null?void 0:n.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Pm{constructor(e){u(this,"pendingCanvasMutations",new Map),u(this,"rafStamps",{latestId:0,invokeId:null}),u(this,"mirror"),u(this,"mutationCb"),u(this,"resetObservers"),u(this,"frozen",!1),u(this,"locked",!1),u(this,"processMutation",(f,y)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(y)});const{sampling:t="all",win:r,blockClass:o,blockSelector:c,recordCanvas:d,dataURLOptions:m}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,d&&t==="all"&&this.initCanvasMutationObserver(r,o,c),d&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,o,c,{dataURLOptions:m})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,o,c){const d=Nu(t,r,o,!0),m=new Map,f=new Tm;f.onmessage=k=>{const{id:O}=k.data;if(m.set(O,!1),!("base64"in k.data))return;const{base64:I,type:V,width:B,height:x}=k.data;this.mutationCb({id:O,type:lr["2D"],commands:[{property:"clearRect",args:[0,0,B,x]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:I}],type:V}]},0,0]}]})};const y=1e3/e;let w=0,E;const M=()=>{const k=[];return t.document.querySelectorAll("canvas").forEach(O=>{Le(O,r,o,!0)||k.push(O)}),k},R=k=>{if(w&&k-w<y){E=requestAnimationFrame(R);return}
vendor: 9,323 bytes, line 53
53w=k,M().forEach(async O=>{var I;const V=this.mirror.getId(O);if(m.get(V)||O.width===0||O.height===0)return;if(m.set(V,!0),["webgl","webgl2"].includes(O.__context)){const x=O.getContext(O.__context);((I=x==null?void 0:x.getContextAttributes())==null?void 0:I.preserveDrawingBuffer)===!1&&x.clear(x.COLOR_BUFFER_BIT)}const B=await createImageBitmap(O);f.postMessage({id:V,bitmap:B,width:O.width,height:O.height,dataURLOptions:c.dataURLOptions},[B])}),E=requestAnimationFrame(R)};E=requestAnimationFrame(R),this.resetObservers=()=>{d(),cancelAnimationFrame(E)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=Nu(e,t,r,!1),c=Am(this.processMutation.bind(this),e,t,r),d=Dm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{o(),c(),d()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const o=r.map(d=>{const{type:m,...f}=d;return f}),{type:c}=r[0];this.mutationCb({id:t,type:c,commands:o}),this.pendingCanvasMutations.delete(e)}}class Lm{constructor(e){u(this,"trackedLinkElements",new WeakSet),u(this,"mutationCb"),u(this,"adoptedStyleSheetCb"),u(this,"styleMirror",new im),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},o=[];for(const c of e){let d;this.styleMirror.has(c)?d=this.styleMirror.getId(c):(d=this.styleMirror.add(c),o.push({styleId:d,rules:Array.from(c.rules||CSSRule,(m,f)=>({rule:Xt(m,c.href),index:f}))})),r.styleIds.push(d)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class $m{constructor(){u(this,"nodeMap",new WeakMap),u(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(o=>o!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let ve,bn,Eo,wn=!1;try{if(Array.from([1],n=>n*2)[0]!==2){const n=document.createElement("iframe");document.body.appendChild(n),Array.from=((h=n.contentWindow)==null?void 0:h.Array.from)||Array.from,document.body.removeChild(n)}}catch(n){console.debug("Unable to override Array.from",n)}const Qe=H();function Hr(n={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:c=null,ignoreClass:d="rr-ignore",ignoreSelector:m=null,maskTextClass:f="rr-mask",maskTextSelector:y=null,inlineStylesheet:w=!0,maskAllInputs:E,maskInputOptions:M,slimDOMOptions:R,maskInputFn:k,maskTextFn:O,hooks:I,packFn:V,sampling:B={},dataURLOptions:x={},mousemoveWait:W,recordDOM:le=!0,recordCanvas:ge=!1,recordCrossOriginIframes:Ae=!1,recordAfter:ie=n.recordAfter==="DOMContentLoaded"?n.recordAfter:"load",userTriggeredOnInput:ke=!1,collectFonts:De=!1,inlineImages:Ke=!1,plugins:ne,keepIframeSrcFn:Nt=()=>!1,ignoreCSSAttributes:Yr=new Set([]),errorHandler:$e}=n;um($e);const et=Ae?window.parent===window:!0;let pt=!1;if(!et)try{window.parent.document&&(pt=!1)}catch{pt=!0}if(et&&!e)throw new Error("emit function is required");if(!et&&!pt)return()=>{};W!==void 0&&B.mousemove===void 0&&(B.mousemove=W),Qe.reset();const ot=E===!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,password:!0}:M!==void 0?M:{password:!0},Io=R===!0||R==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:R==="all",headMetaDescKeywords:R==="all",headTitleMutations:R==="all"}:R||{};rm();let zu,Oo=0;const Gu=se=>{for(const tt of ne||[])tt.eventProcessor&&(se=tt.eventProcessor(se));return V&&!pt&&(se=V(se)),se};ve=(se,tt)=>{var Se;const be=se;if(be.timestamp=gn(),(Se=$t[0])!=null&&Se.isFrozen()&&be.type!==te.FullSnapshot&&!(be.type===te.IncrementalSnapshot&&be.data.source===q.Mutation)&&$t.forEach(at=>at.unfreeze()),et)e==null||e(Gu(be),tt);else if(pt){const at={type:"rrweb",event:Gu(be),origin:window.location.origin,isCheckout:tt};window.parent.postMessage(at,"*")}if(be.type===te.FullSnapshot)zu=be,Oo=0;else if(be.type===te.IncrementalSnapshot){if(be.data.source===q.Mutation&&be.data.isAttachIframe)return;Oo++;const at=r&&Oo>=r,ce=t&&be.timestamp-zu.timestamp>t;(at||ce)&&bn(!0)}};const Cn=se=>{ve({type:te.IncrementalSnapshot,data:{source:q.Mutation,...se}})},Vu=se=>ve({type:te.IncrementalSnapshot,data:{source:q.Scroll,...se}}),Wu=se=>ve({type:te.IncrementalSnapshot,data:{source:q.CanvasMutation,...se}}),Nm=se=>ve({type:te.IncrementalSnapshot,data:{source:q.AdoptedStyleSheet,...se}}),Ut=new Lm({mutationCb:Cn,adoptedStyleSheetCb:Nm}),Ft=new Em({mirror:Qe,mutationCb:Cn,stylesheetManager:Ut,recordCrossOriginIframes:Ae,wrappedEmit:ve});for(const se of ne||[])se.getMirror&&se.getMirror({nodeMirror:Qe,crossOriginIframeMirror:Ft.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ft.crossOriginIframeStyleMirror});const Ro=new $m;Eo=new Pm({recordCanvas:ge,mutationCb:Wu,win:window,blockClass:o,blockSelector:c,mirror:Qe,sampling:B.canvas,dataURLOptions:x});const En=new Im({mutationCb:Cn,scrollCb:Vu,bypassOptions:{blockClass:o,blockSelector:c,maskTextClass:f,maskTextSelector:y,inlineStylesheet:w,maskInputOptions:ot,dataURLOptions:x,maskTextFn:O,maskInputFn:k,recordCanvas:ge,inlineImages:Ke,sampling:B,slimDOMOptions:Io,iframeManager:Ft,stylesheetManager:Ut,canvasManager:Eo,keepIframeSrcFn:Nt,processedNodeManager:Ro},mirror:Qe});bn=(se=!1)=>{if(!le)return;ve({type:te.Meta,data:{href:window.location.href,width:mu(),height:gu()}},se),Ut.reset(),En.init(),$t.forEach(Se=>Se.lock());const tt=Sh(document,{mirror:Qe,blockClass:o,blockSelector:c,maskTextClass:f,maskTextSelector:y,inlineStylesheet:w,maskAllInputs:ot,maskTextFn:O,maskInputFn:k,slimDOM:Io,dataURLOptions:x,recordCanvas:ge,inlineImages:Ke,onSerialize:Se=>{vu(Se,Qe)&&Ft.addIframe(Se),Su(Se,Qe)&&Ut.trackLinkElement(Se),wo(Se)&&En.addShadowRoot(X.shadowRoot(Se),document)},onIframeLoad:(Se,be)=>{Ft.attachIframe(Se,be),En.observeAttachShadow(Se)},onStylesheetLoad:(Se,be)=>{Ut.attachLinkElement(Se,be)},keepIframeSrcFn:Nt});if(!tt)return console.warn("Failed to snapshot the document");ve({type:te.FullSnapshot,data:{node:tt,initialOffset:pu(window)}},se),$t.forEach(Se=>Se.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ut.adoptStyleSheets(document.adoptedStyleSheets,Qe.getId(document))};try{const se=[],tt=be=>{var at;return Q(Cm)({mutationCb:Cn,mousemoveCb:(ce,Mo)=>ve({type:te.IncrementalSnapshot,data:{source:Mo,positions:ce}}),mouseInteractionCb:ce=>ve({type:te.IncrementalSnapshot,data:{source:q.MouseInteraction,...ce}}),scrollCb:Vu,viewportResizeCb:ce=>ve({type:te.IncrementalSnapshot,data:{source:q.ViewportResize,...ce}}),inputCb:ce=>ve({type:te.IncrementalSnapshot,data:{source:q.Input,...ce}}),mediaInteractionCb:ce=>ve({type:te.IncrementalSnapshot,data:{source:q.MediaInteraction,...ce}}),styleSheetRuleCb:ce=>ve({type:te.IncrementalSnapshot,data:{source:q.StyleSheetRule,...ce}}),styleDeclarationCb:ce=>ve({type:te.IncrementalSnapshot,data:{source:q.StyleDeclaration,...ce}}),canvasMutationCb:Wu,fontCb:ce=>ve({type:te.IncrementalSnapshot,data:{source:q.Font,...ce}}),selectionCb:ce=>{ve({type:te.IncrementalSnapshot,data:{source:q.Selection,...ce}})},customElementCb:ce=>{ve({type:te.IncrementalSnapshot,data:{source:q.CustomElement,...ce}})},blockClass:o,ignoreClass:d,ignoreSelector:m,maskTextClass:f,maskTextSelector:y,maskInputOptions:ot,inlineStylesheet:w,sampling:B,recordDOM:le,recordCanvas:ge,inlineImages:Ke,userTriggeredOnInput:ke,collectFonts:De,doc:be,maskInputFn:k,maskTextFn:O,keepIframeSrcFn:Nt,blockSelector:c,slimDOMOptions:Io,dataURLOptions:x,mirror:Qe,iframeManager:Ft,stylesheetManager:Ut,shadowDomManager:En,processedNodeManager:Ro,canvasManager:Eo,ignoreCSSAttributes:Yr,plugins:((at=ne==null?void 0:ne.filter(ce=>ce.observer))==null?void 0:at.map(ce=>({observer:ce.observer,options:ce.options,callback:Mo=>ve({type:te.Plugin,data:{plugin:ce.name,payload:Mo}})})))||[]},I)};Ft.addLoadListener(be=>{try{se.push(tt(be.contentDocument))}catch(at){console.warn(at)}});const Se=()=>{bn(),se.push(tt(document)),wn=!0};return document.readyState==="interactive"||document.readyState==="complete"?Se():(se.push(Pe("DOMContentLoaded",()=>{ve({type:te.DomContentLoaded,data:{}}),ie==="DOMContentLoaded"&&Se()})),se.push(Pe("load",()=>{ve({type:te.Load,data:{}}),ie==="load"&&Se()}
53,window))),()=>{se.forEach(be=>be()),Ro.destroy(),wn=!1,cm()}}catch(se){console.warn(se)}}Hr.addCustomEvent=(n,e)=>{if(!wn)throw new Error("please add custom event after start recording");ve({type:te.Custom,data:{tag:n,payload:e}})},Hr.freezePage=()=>{$t.forEach(n=>n.freeze())},Hr.takeFullSnapshot=n=>{if(!wn)throw new Error("please take full snapshot after start recording");bn(n)},Hr.mirror=Qe;var Bu;(function(n){n[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped"})(Bu||(Bu={})),a.record=Hr})(Ad);Object.defineProperty(bi,"__esModule",{value:!0});bi.SessionReplayClient=void 0;const kc=Ad,ES=J,IS=1e3*60*60*4,OS=1e3*30;class RS{constructor(){this._startTimestamp=null,this._endTimestamp=null}record(i,s,l,u=!1){if((0,ES._getDocumentSafe)()==null||(this._startTimestamp=null,this._endTimestamp=null,this._stopCallback=l,this._stopFn))return;const h=(p,g)=>{var v,S,_;u?this._startTimestamp=g?p.timestamp:(v=this._startTimestamp)!==null&&v!==void 0?v:p.timestamp:(S=this._startTimestamp)!==null&&S!==void 0||(this._startTimestamp=p.timestamp),this._endTimestamp=p.timestamp;let b=0;AS(p)&&b++,i(Object.assign(Object.assign({},p),{eventIndex:0}),{startTime:this._startTimestamp,endTime:this._endTimestamp,clickCount:b},g??!1),this._endTimestamp-this._startTimestamp>IS&&((_=this._stopFn)===null||_===void 0||_.call(this),this._stopCallback&&this._stopCallback())};this._stopFn=MS(h,s,u)}stop(){this._stopFn&&(this._stopFn(),this._stopFn=void 0)}isRecording(){return this._stopFn!=null}}bi.SessionReplayClient=RS;function MS(a,i,s){return s?(0,kc.record)(Object.assign(Object.assign({},i),{emit:a,checkoutEveryNms:OS})):(0,kc.record)(Object.assign(Object.assign({},i),{emit:a}))}function AS(a){return a.type===3&&a.data.source===2&&(a.data.type===2||a.data.type===4)}var xe={};Object.defineProperty(xe,"__esModule",{value:!0});xe.getNewRRWebConfigWithPrivacySettings=xe._appendSlicedMetadata=xe._slicePayload=xe._makeLoggableRrwebEvent=xe.MAX_LOGS=xe.MAX_INDIVIDUAL_EVENT_BYTES=xe.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;const kS=J,Dc=1024*1024;xe.REPLAY_ENQUEUE_TRIGGER_BYTES=1024*10;xe.MAX_INDIVIDUAL_EVENT_BYTES=1024*1024*10;xe.MAX_LOGS=1e4;function DS(a,i,s,l,u){const h={session_start_ts:String(l.startTime),session_end_ts:String(l.endTime),clicks_captured_cumulative:String(l.clickCount),rrweb_events:a,rrweb_payload_size:String(i.length),session_replay_sdk_version:kS.SDK_VERSION,sdk_instance_id:u};return{eventName:"statsig::session_recording",value:s,metadata:h}}xe._makeLoggableRrwebEvent=DS;function xS(a){const i=[];for(let s=0;s<a.length;s+=Dc)i.push(a.slice(s,s+Dc));return i}xe._slicePayload=xS;function TS(a,i,s,l,u){a.sliced_id=i,a.slice_index=String(s),a.slice_count=String(l),a.slice_byte_size=String(u)}xe._appendSlicedMetadata=TS;function PS(a,i){const s=g=>g.replace(/./g,"*");function l(g,v=[],S=[]){let _=g;for(;_!==null;){if(v.some(b=>_==null?void 0:_.matches(b)))return"masked";if(S.some(b=>_==null?void 0:_.matches(b)))return"unmasked";_=_.parentElement}return null}const u=i.blocked_elements?i.blocked_elements.join(", "):void 0,h=(g,v)=>{if(!v)return i.privacy_mode==="max"?s(g):g;const S=l(v,i.masked_elements,i.unmasked_elements);return S==="masked"?s(g):S==="unmasked"?g:i.privacy_mode==="max"?s(g):g},p=(g,v)=>{var S,_;return!((S=i.masked_elements)===null||S===void 0)&&S.some(b=>v.closest(b))?s(g):!((_=i.unmasked_elements)===null||_===void 0)&&_.some(b=>v.closest(b))?g:i.privacy_mode==="max"||i.privacy_mode==="input"?s(g):g};return Object.assign(Object.assign({},a),{maskTextFn:h,maskInputFn:p,maskTextSelector:"*",maskAllInputs:!0,maskInputOptions:void 0,blockSelector:u})}xe.getNewRRWebConfigWithPrivacySettings=PS;Object.defineProperty(Ye,"__esModule",{value:!0});Ye.SessionReplayBase=Ye.forceStartRecording=Ye.startRecording=Ye.stopRecording=void 0;const Fe=J,LS=bi,mt=xe;function $S(a){var i;(i=da(a))===null||i===void 0||i.stopRecording()}Ye.stopRecording=$S;function NS(a){var i;(i=da(a))===null||i===void 0||i.startRecording()}Ye.startRecording=NS;function US(a){var i;(i=da(a))===null||i===void 0||i.forceStartRecording()}Ye.forceStartRecording=US;function da(a){var i,s;
53const l=a==null?(0,Fe._getStatsigGlobal)().firstSRInstance:(s=(i=(0,Fe._getStatsigGlobal)())===null||i===void 0?void 0:i.srInstances)===null||s===void 0?void 0:s[a];return l instanceof os?l:null}class os{constructor(i,s){this._sessionData={startTime:-1,endTime:0,clickCount:0},this._events=[],this._wasStopped=!1,this._currentEventIndex=0,this._totalLogs=0,this._client=i,this._options=s;const{sdkKey:l,errorBoundary:u}=this._client.getContextHandle();if(this._errorBoundary=u,this._errorBoundary.wrap(this),this._replayer=new LS.SessionReplayClient,this._client.$on("pre_shutdown",()=>this._shutdown()),this._client.on("session_expired",()=>{this._shutdown("session_expired")}),!(0,Fe._isServerEnv)()){const h=(0,Fe._getStatsigGlobal)();h.srInstances=Object.assign(Object.assign({},h.srInstances),{[l]:this}),h.firstSRInstance||(h.firstSRInstance=this)}this._currentSessionID=this._getSessionIdFromClient(),this._subscribeToVisibilityChanged()}forceStartRecording(){this._wasStopped=!1,this._attemptToStartRecording(!0)}stopRecording(){this._wasStopped=!0,this._shutdown()}startRecording(){var i;this._wasStopped=!1,this._attemptToStartRecording((i=this._options)===null||i===void 0?void 0:i.forceRecording)}isRecording(){return this._replayer.isRecording()}_logRecording(i){this._events.length!==0&&(i=(0,Fe._isUnloading)()?"is_leaving_page":i,this._logRecordingWithSessionID(this._currentSessionID,i))}_onVisibilityChanged(i){i==="background"&&(this._logRecording(),this._client.flush().catch(s=>{this._errorBoundary.logError("SR::visibility",s)}))}_subscribeToVisibilityChanged(){const{sdkKey:i}=this._client.getContextHandle();(0,Fe._subscribeToVisiblityChanged)(s=>{var l,u;const h=(u=(l=(0,Fe._getStatsigGlobal)())===null||l===void 0?void 0:l.srInstances)===null||u===void 0?void 0:u[i];h instanceof os&&h._onVisibilityChanged(s)})}_logRecordingWithSessionID(i,s){const l=this._sessionData;if(this._events.length===0)return;const u=JSON.stringify(this._events),h=(0,mt._slicePayload)(u),p=h.length>1?(0,Fe.getUUID)():null;for(let g=0;g<h.length;g++){const v=h[g],S=(0,mt._makeLoggableRrwebEvent)(v,u,i,l,this._client.getContextHandle().sdkInstanceID);p!=null&&(0,mt._appendSlicedMetadata)(S.metadata,p,g,h.length,v.length),s&&(S.metadata[s]="true"),this._totalLogs++,this._client.logEvent(S),p!=null&&this._client.flush().catch(_=>{Fe.Log.error(_)})}this._events=[],this._totalLogs>mt.MAX_LOGS&&this._shutdown()}_bumpSessionIdleTimerAndLogRecording(){this._getSessionIdFromClient(),this._logRecording()}_getSessionIdFromClient(i){return this._client.getContextHandle().getSession(i).data.sessionID}_shutdownImpl(i){if(this._replayer.isRecording()){this._replayer.stop();const s=()=>{Fe.StatsigMetadataProvider.add({isRecordingSession:"false"}),this._client.off("logs_flushed",s)};this._client.$on("logs_flushed",s)}if(this._events.length===0){i==="session_expired"&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData());return}this._logRecording(i),i==="session_expired"&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData())}_makeEmptySessionData(){return{startTime:-1,endTime:0,clickCount:0}}_onRecordingEvent(i,s){if(this._currentSessionID!==this._getSessionIdFromClient(!1)){this._shutdown("session_expired");return}if(this._totalLogs>=mt.MAX_LOGS){this._shutdown();return}i.eventIndex=this._currentEventIndex++,this._sessionData.clickCount+=s.clickCount,this._sessionData.startTime=this._sessionData.startTime===-1?s.startTime:Math.min(this._sessionData.startTime,s.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,s.endTime);const l=(0,Fe._fastApproxSizeOf)(i,mt.MAX_INDIVIDUAL_EVENT_BYTES);if(l>mt.MAX_INDIVIDUAL_EVENT_BYTES){Fe.Log.warn(`SessionReplay event is too large (~${l} bytes) and will not be logged`,i);return}const u=(0,Fe._fastApproxSizeOf)(this._events,mt.REPLAY_ENQUEUE_TRIGGER_BYTES);this._events.push(i),!(u+l<mt.REPLAY_ENQUEUE_TRIGGER_BYTES)&&((0,Fe._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording())}}Ye.SessionReplayBase=os;Object.defineProperty(Mt,"__esModule",{value:!0});Mt.SessionReplay=Mt.runStatsigSessionReplay=Mt.StatsigSessionReplayPlugin=void 0;const $d=J,FS=Ye,xc=xe;class jS{constructor(i){this.options=i,this.__plugin="session-replay"}bind(i){Nd(i,this.options)}}Mt.StatsigSessionReplayPlugin=jS;function Nd(a,i){(0,$d._isServerEnv)()||new Ud(a,i)}Mt.runStatsigSessionReplay=Nd;class Ud extends FS.SessionReplayBase{constructor(i,s){var l;super(i,s),this._client.$on("values_updated",()=>{var u;this._wasStopped||this._attemptToStartRecording((u=this._options)===null||u===void 0?void 0:u.forceRecording)}),this._attemptToStartRecording((l=this._options)===null||l===void 0?void 0:l.forceRecording)}_shutdown(i){super._shutdownImpl(i)}_attemptToStartRecording(i=!1){var s,l,u,h,p;
53if(this._totalLogs>=xc.MAX_LOGS)return;const g=this._client.getContextHandle().values;if((g==null?void 0:g.recording_blocked)===!0){this._shutdown();return}if(!i&&(g==null?void 0:g.can_record_session)!==!0){this._shutdown();return}if((g==null?void 0:g.passes_session_recording_targeting)===!1){this._shutdown();return}if(this._replayer.isRecording())return;const S=(g==null?void 0:g.session_recording_privacy_settings)&&((g==null?void 0:g.session_recording_privacy_settings.privacy_mode)!=="min"||(g==null?void 0:g.session_recording_privacy_settings.blocked_elements)||(g==null?void 0:g.session_recording_privacy_settings.masked_elements)||(g==null?void 0:g.session_recording_privacy_settings.unmasked_elements))?(0,xc.getNewRRWebConfigWithPrivacySettings)((l=(s=this._options)===null||s===void 0?void 0:s.rrwebConfig)!==null&&l!==void 0?l:{},(u=g==null?void 0:g.session_recording_privacy_settings)!==null&&u!==void 0?u:{}):(p=(h=this._options)===null||h===void 0?void 0:h.rrwebConfig)!==null&&p!==void 0?p:{};this._wasStopped=!1,$d.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.record((_,b)=>this._onRecordingEvent(_,b),S,()=>{this._shutdown()})}}Mt.SessionReplay=Ud;var At={};Object.defineProperty(At,"__esModule",{value:!0});At.TriggeredSessionReplay=At.runStatsigTriggeredSessionReplay=At.StatsigTriggeredSessionReplayPlugin=void 0;const jo=J,BS=Ye,Tc=xe,zS="statsig::session_recording_all_gates",GS="statsig::session_recording_all_experiments";class VS{constructor(i){this.options=i,this.__plugin="triggered-session-replay"}bind(i){Fd(i,this.options)}}At.StatsigTriggeredSessionReplayPlugin=VS;function Fd(a,i){new jd(a,i)}At.runStatsigTriggeredSessionReplay=Fd;class jd extends BS.SessionReplayBase{constructor(i,s){var l;super(i,s),this._runningEventData=[],this._isActiveRecording=!1,this._subscribeToClientEvents(s),s!=null&&s.autoStartRecording?this._attemptToStartRecording((l=this._options)===null||l===void 0?void 0:l.forceRecording):s!=null&&s.keepRollingWindow&&this._attemptToStartRollingWindow()}_subscribeToClientEvents(i){this._subscribeToValuesUpdated(i),this._subscribeToLogEventCalled(),this._subscribeToGateEvaluation(),this._subscribeToExperimentEvaluation()}_subscribeToValuesUpdated(i){this._client.$on("values_updated",()=>{var s;this._wasStopped||(i!=null&&i.autoStartRecording?this._attemptToStartRecording((s=this._options)===null||s===void 0?void 0:s.forceRecording):i!=null&&i.keepRollingWindow&&this._attemptToStartRollingWindow())})}_subscribeToLogEventCalled(){this._client.$on("log_event_called",i=>{var s;if(this._wasStopped)return;const l=this._client.getContextHandle().values;if((l==null?void 0:l.passes_session_recording_targeting)===!1||(l==null?void 0:l.session_recording_event_triggers)==null)return;const h=l.session_recording_event_triggers[i.event.eventName];if(h==null||h.passes_sampling===!1)return;const p=h.values;if(p==null){this._attemptToStartRecording(!0);return}if(p.includes(String((s=i.event.value)!==null&&s!==void 0?s:""))){this._attemptToStartRecording(!0);return}})}_subscribeToGateEvaluation(){this._client.$on("gate_evaluation",i=>{this._tryStartExposureRecording(i.gate.name,String(i.gate.value),"gate")})}_subscribeToExperimentEvaluation(){this._client.$on("experiment_evaluation",i=>{var s;this._tryStartExposureRecording(i.experiment.name,(s=i.experiment.groupName)!==null&&s!==void 0?s:"","experiment")})}_tryStartExposureRecording(i,s,l){var u;if(this._wasStopped)return;const h=this._client.getContextHandle().values;if((h==null?void 0:h.passes_session_recording_targeting)===!1||(h==null?void 0:h.session_recording_exposure_triggers)==null)return;let g=(u=h.session_recording_exposure_triggers[i])!==null&&u!==void 0?u:h.session_recording_exposure_triggers[(0,jo._DJB2)(i)];if(g==null&&l==="gate"&&(g=h.session_recording_exposure_triggers[zS]),g==null&&l==="experiment"&&(g=h.session_recording_exposure_triggers[GS]),g==null||g.passes_sampling===!1)return;const v=g.values;if(v==null){this._attemptToStartRecording(!0);return}if(v.includes(s)){this._attemptToStartRecording(!0);return}}forceStartRecording(){super.forceStartRecording()}stopRecording(){this._isActiveRecording=!1,this._runningEventData=[],super.stopRecording()}_handleStartActiveRecording(){if(this._isActiveRecording=!0,this._runningEventData.length===0)return;const i=this._runningEventData.map(s=>s.events).flat();for(let s=0;s<i.length;s++)i[s].event.eventIndex=s,this._sessionData.clickCount+=i[s].data.clickCount,this._sessionData.startTime=this._sessionData.startTime===-1?i[s].data.startTime:Math.min(this._sessionData.startTime,i[s].data.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,i[s].data.endTime);this._events=i.map(s=>s.event),this._currentEventIndex=i.length,(0,jo._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording(),this._replayer.stop()}_shutdown(i){this._isActiveRecording=!1,this._runningEventData=[],super._shutdownImpl(i)}_onRecordingEvent(i,s,l){if(!this._isActiveRecording){if(this._currentSessionID!==this._getSessionIdFromClient()){this._shutdown("session_expired");return}l&&i.type===4||this._runningEventData.length===0?(this._runningEventData.length>1&&this._runningEventData.shift(),this._runningEventData.push({events:[{event:i,data:s}]})):this._runningEventData[this._runningEventData.length-1].events.push({event:i,data:s});return}super._onRecordingEvent(i,s)}_attemptToStartRollingWindow(){var i,s;const l=this._client.getContextHandle().values;if((l==null?void 0:l.passes_session_recording_targeting)===!1){this._shutdown();return}this._replayer.isRecording()||this._replayer.record((u,h,p)=>this._onRecordingEvent(u,h,p),(s=(i=this._options)===null||i===void 0?void 0:i.rrwebConfig)!==null&&s!==void 0?s:{},()=>{this._shutdown()},!0)}_attemptToStartRecording(i=!1){var s,l,u,h,p;
53if(this._totalLogs>=Tc.MAX_LOGS)return;const g=this._client.getContextHandle().values;if((g==null?void 0:g.recording_blocked)===!0){this._shutdown();return}if(!i&&(g==null?void 0:g.can_record_session)!==!0){this._shutdown();return}if((g==null?void 0:g.passes_session_recording_targeting)===!1){this._shutdown();return}if(this._handleStartActiveRecording(),this._wasStopped=!1,jo.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.isRecording())return;const S=(g==null?void 0:g.session_recording_privacy_settings)&&((g==null?void 0:g.session_recording_privacy_settings.privacy_mode)!=="min"||(g==null?void 0:g.session_recording_privacy_settings.blocked_elements)||(g==null?void 0:g.session_recording_privacy_settings.masked_elements)||(g==null?void 0:g.session_recording_privacy_settings.unmasked_elements))?(0,Tc.getNewRRWebConfigWithPrivacySettings)((l=(s=this._options)===null||s===void 0?void 0:s.rrwebConfig)!==null&&l!==void 0?l:{},(u=g==null?void 0:g.session_recording_privacy_settings)!==null&&u!==void 0?u:{}):(p=(h=this._options)===null||h===void 0?void 0:h.rrwebConfig)!==null&&p!==void 0?p:{};this._replayer.record((_,b,C)=>this._onRecordingEvent(_,b,C),S,()=>{this._shutdown()})}}At.TriggeredSessionReplay=jd;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.forceStartRecording=a.stopRecording=a.startRecording=a.StatsigTriggeredSessionReplayPlugin=a.StatsigSessionReplayPlugin=a.runStatsigTriggeredSessionReplay=a.runStatsigSessionReplay=a.SessionReplay=a.SessionReplayClient=void 0;const i=J,s=Mt;Object.defineProperty(a,"SessionReplay",{enumerable:!0,get:function(){return s.SessionReplay}}),Object.defineProperty(a,"StatsigSessionReplayPlugin",{enumerable:!0,get:function(){return s.StatsigSessionReplayPlugin}}),Object.defineProperty(a,"runStatsigSessionReplay",{enumerable:!0,get:function(){return s.runStatsigSessionReplay}});const l=Ye;Object.defineProperty(a,"forceStartRecording",{enumerable:!0,get:function(){return l.forceStartRecording}}),Object.defineProperty(a,"startRecording",{enumerable:!0,get:function(){return l.startRecording}}),Object.defineProperty(a,"stopRecording",{enumerable:!0,get:function(){return l.stopRecording}});const u=bi;Object.defineProperty(a,"SessionReplayClient",{enumerable:!0,get:function(){return u.SessionReplayClient}});const h=At;Object.defineProperty(a,"StatsigTriggeredSessionReplayPlugin",{enumerable:!0,get:function(){return h.StatsigTriggeredSessionReplayPlugin}}),Object.defineProperty(a,"runStatsigTriggeredSessionReplay",{enumerable:!0,get:function(){return h.runStatsigTriggeredSessionReplay}}),Object.assign((0,i._getStatsigGlobal)(),{SessionReplayClient:u.SessionReplayClient,SessionReplay:s.SessionReplay,runStatsigSessionReplay:s.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:h.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:s.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:h.StatsigTriggeredSessionReplayPlugin,startRecording:l.startRecording,stopRecording:l.stopRecording,forceStartRecording:l.forceStartRecording})})(Md);var Bd={},kt={},Cr={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.isUserActionAutoCaptureEvent=a.AutoCaptureEventName=void 0,a.AutoCaptureEventName={PAGE_VIEW:"auto_capture::page_view",PAGE_VIEW_END:"auto_capture::page_view_end",ERROR:"auto_capture::error",SESSION_START:"auto_capture::session_start",PERFORMANCE:"auto_capture::performance",FORM_SUBMIT:"auto_capture::form_submit",CLICK:"auto_capture::click",RAGE_CLICK:"auto_capture::rage_click",WEB_VITALS:"auto_capture::web_vitals",DEAD_CLICK:"auto_capture::dead_click",COPY:"auto_capture::copy",CONSOLE_LOG:"statsig::log_line"};const i=new Set([a.AutoCaptureEventName.PAGE_VIEW,a.AutoCaptureEventName.PAGE_VIEW_END,a.AutoCaptureEventName.SESSION_START,a.AutoCaptureEventName.FORM_
53SUBMIT,a.AutoCaptureEventName.CLICK,a.AutoCaptureEventName.RAGE_CLICK,a.AutoCaptureEventName.COPY]),s=l=>i.has(l);a.isUserActionAutoCaptureEvent=s})(Cr);var as={},Ht={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.wrapFunctionWithRestore=a.throttle=a._sanitizeString=a._getAnchorNodeInHierarchy=a._getSafeTimezoneOffset=a._getSafeTimezone=a._getSafeNetworkInformation=a._registerEventHandler=a._getSanitizedPageUrl=a._getSafeUrlString=a._getSafeUrl=a._shouldLogEvent=a._getTargetNode=a._stripEmptyValues=a.interactiveElements=void 0;const i=J,s="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",l=new RegExp(`^(?:${s})$`),u="\\d{3}-?\\d{2}-?\\d{4}",h=new RegExp(`^(${u})$`);a.interactiveElements=["button","a","input","select","textarea","form","select","label"];function p(D){return Object.fromEntries(Object.entries(D).filter(([P,ee])=>ee!=null&&ee!==""&&ee!==void 0))}a._stripEmptyValues=p;function g(D){if(!D)return null;let P=D.target||D.srcElement;return!P||!(P instanceof Element)?null:(P.nodeType===3&&(P=P.parentNode||null),P)}a._getTargetNode=g;function v(D,P,ee=!1){if(!D||!P||P.nodeType!==1)return!1;const Ce=P.tagName.toLowerCase(),Ee=D.type.toLowerCase();if(P.classList.contains("statsig-no-capture"))return!1;if(ee)return!0;switch(Ce){case"html":return!1;case"form":return["submit"].indexOf(Ee)>=0;case"input":case"select":case"textarea":return["change","click"].indexOf(Ee)>=0;default:if(Ee==="click"){const Ge=window.getComputedStyle(P);if(Ge&&Ge.getPropertyValue("cursor")==="pointer"||a.interactiveElements.includes(Ce)||P.getAttribute("contenteditable")==="true"||K(P))return!0}return!1}}a._shouldLogEvent=v;function S(){var D,P,ee;const Ce=(ee=(P=(D=(0,i._getWindowSafe)())===null||D===void 0?void 0:D.location)===null||P===void 0?void 0:P.href)!==null&&ee!==void 0?ee:"";let Ee;try{Ee=new URL(Ce)}catch{Ee=new URL("error:")}return Ee}a._getSafeUrl=S;function _(){const D=S().toString();return D.startsWith("error:")?"":D}a._getSafeUrlString=_;function b(){return(0,i._getCurrentPageUrlSafe)()||""}a._getSanitizedPageUrl=b;function C(D,P,ee){!D||!D.addEventListener||D.addEventListener(P,ee,!0)}a._registerEventHandler=C;function A(){const D=(0,i._getWindowSafe)();if(!D||!D.navigator)return null;const P=D.navigator.connection;return P||null}a._getSafeNetworkInformation=A;function T(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return null}}a._getSafeTimezone=T;function F(){try{return new Date().getTimezoneOffset()}catch{return null}}a._getSafeTimezoneOffset=F;function K(D){if(!D)return null;let P=D;for(;P;){const ee=P.tagName.toLowerCase();if(["body","document"].includes(ee))return null;if(P.tagName.toLowerCase()==="a")return P;P=P.parentElement}return null}a._getAnchorNodeInHierarchy=K;function Y(D){return D?D.replace(/<[^>]*>/g,"").trim().split(/(\s+)/).filter(P=>he(P)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255):null}a._sanitizeString=Y;function he(D){return!(l.test((D||"").replace(/[- ]/g,""))||h.test((D||"").replace(/[- ]/g,"")))}function ue(D,P){let ee=0;return function(...Ce){const Ee=Date.now();Ee-ee>=P&&(ee=Ee,D(...Ce))}}a.throttle=ue;function $(D,P,ee){const Ce=D[P];if(typeof Ce!="function")return()=>{};try{const Ee=ee(Ce);return Object.defineProperty(Ee,"__statsig_original__",{enumerable:!1,value:Ce}),D[P]=Ee,()=>{D[P]=Ce}}catch{return()=>{}}}a.wrapFunctionWithRestore=$})(Ht);var yr={};
53Object.defineProperty(yr,"__esModule",{value:!0});yr._getStackTrace=yr._safeStringify=void 0;function si(a,i){return a.length<=i?a:a.slice(0,i)+"..."}function WS(a,i,s,l){try{return HS(a,i,s)?JS(a,l):si(typeof a=="string"?a:typeof a=="object"&&a!==null?JSON.stringify(a):String(a),l)}catch{return si("[Unserializable]",l)}}yr._safeStringify=WS;function KS(){var a,i;try{return(i=(a=new Error().stack)===null||a===void 0?void 0:a.split(`
54`).slice(2))!==null&&i!==void 0?i:[]}catch{return[]}}yr._getStackTrace=KS;function HS(a,i,s){return!!(YS(a)&&(Object.keys(a).length>i||zd(a,s))||typeof a=="function")}function YS(a){return Object.prototype.toString.call(a)==="[object Object]"}function zd(a,i){return i<=0?!0:typeof a!="object"||a===null?!1:Object.keys(a).some(s=>zd(a[s],i-1))}function JS(a,i){return si(a.toString(),i)}var Je={};Object.defineProperty(Je,"__esModule",{value:!0});Je._getPossibleFirstTouchMetadata=Je._getNetworkInfo=Je._gatherAllMetadata=Je._gatherCommonMetadata=void 0;const vr=J,pr=Ht;function Gd(a){var i,s,l,u,h,p,g,v;const S=(0,vr._getDocumentSafe)(),_=(0,vr._getWindowSafe)();return(0,pr._stripEmptyValues)(Object.assign({title:S==null?void 0:S.title,current_url:(i=_==null?void 0:_.location)===null||i===void 0?void 0:i.href,user_agent:!((s=_==null?void 0:_.navigator)===null||s===void 0)&&s.userAgent&&((u=(l=_==null?void 0:_.navigator)===null||l===void 0?void 0:l.userAgent)===null||u===void 0?void 0:u.length)>
54200?_.navigator.userAgent.substring(0,200):(h=_==null?void 0:_.navigator)===null||h===void 0?void 0:h.userAgent,locale:(p=_==null?void 0:_.navigator)===null||p===void 0?void 0:p.language,hostname:a.hostname,pathname:a.pathname,screen_width:(g=_==null?void 0:_.screen)===null||g===void 0?void 0:g.width,screen_height:(v=_==null?void 0:_.screen)===null||v===void 0?void 0:v.height,viewport_width:_==null?void 0:_.innerWidth,viewport_height:_==null?void 0:_.innerHeight,viewport:`${_==null?void 0:_.innerWidth}x${_==null?void 0:_.innerHeight}`,timestamp:Date.now(),timezone:(0,pr._getSafeTimezone)(),timezone_offset:(0,pr._getSafeTimezoneOffset)()},Vd()))}Je._gatherCommonMetadata=Gd;function XS(a){const i=(0,vr._getDocumentSafe)(),s=(0,vr._getWindowSafe)();if(!i||!s)return{};const l=Wd(i),u=Gd(a),h=Kd(a),p={};return a.searchParams.forEach((g,v)=>{p[v]=g}),Object.assign(Object.assign({},u),(0,pr._stripEmptyValues)(Object.assign(Object.assign(Object.assign({},l),h),p)))}Je._gatherAllMetadata=XS;function Vd(){const a=(0,pr._getSafeNetworkInformation)(),i={};return(a==null?void 0:a.effectiveType)!==void 0&&(i.effective_connection_type=a.effectiveType),(a==null?void 0:a.rtt)!==void 0&&(i.rtt_ms=a.rtt),(a==null?void 0:a.downlink)!==void 0&&(i.downlink_mbps=a.downlink,i.downlink_kbps=a.downlink*1e3),(a==null?void 0:a.saveData)!==void 0&&(i.save_data=a.saveData),i}Je._getNetworkInfo=Vd;function qS(a){const i=(0,vr._getDocumentSafe)(),s=(0,vr._getWindowSafe)();if(!i||!s)return{};const l=Wd(i),u=Kd(a),h=(0,pr._stripEmptyValues)(Object.assign(Object.assign({},l),u)),p={};for(const[g,v]of Object.entries(h))p[`$s_${g}`]=v;return p}Je._getPossibleFirstTouchMetadata=qS;function Wd(a){const i=(a==null?void 0:a.referrer)||"";if(!i)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{const s=new URL(i),l=s.hostname,u=["google","bing","yahoo","duckduckgo","baidu"].find(p=>l.includes(p+"."))||"",h=s.searchParams.get(u==="yahoo"?"p":"q")||"";return{referrer:i,referrer_domain:s.hostname,referrer_path:s.pathname,searchEngine:u,searchQuery:h}}catch{return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}function Kd(a){const i=a.searchParams,s={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content","msclkid","dclid","fbclid","gad_source","gclid","gclsrc","wbraid","utm_id","irclid","igshid","_kx","li_fat_id","mc_cid","mc_eid","epik","qclid","rdt_cid","sccid","ttc","ttclid","ttc_id","twclid"].forEach(u=>{const h=i.get(u);h&&(s[u]=h)}),s}Object.defineProperty(as,"__esModule",{value:!0});as.ConsoleLogManager=void 0;const Pc=J,ZS=Cr,Lc=Ht,$c=yr,QS=Je,Nc={trace:10,debug:20,log:30,info:30,warn:40,error:50},e0=50,t0=10,r0=2500;class i0{constructor(i,s,l){var u,h,p,g;this._enqueueFn=i,this._errorBoundary=s,this._options=l,this._restoreFns=[],this._isTracking=!1,this._logLevel="info",this.__source="js-auto-capture",this._logLevel=(u=this._options.logLevel)!==null&&u!==void 0?u:"info",this._maxKeys=(h=this._options.maxKeys)!==null&&h!==void 0?h:e0,this._maxDepth=(p=this._options.maxDepth)!==null&&p!==void 0?p:t0,this._maxStringLength=(g=this._options.maxStringLength)!==null&&g!==void 0?g:r0}startTracking(){try{if(this._isTracking||!this._options.enabled||!(0,Pc._getWindowSafe)())return;this._patchConsole(),this._isTracking=!0}catch(i){Pc.Log.error("Error starting console log tracking",i),this._errorBoundary.logError("autoCapture:ConsoleLogManager",i)}}stopTracking(){this._isTracking&&(this._restoreFns.forEach(i=>i()),this._restoreFns=[],this._isTracking=!1)}_patchConsole(){Object.entries(Nc).forEach(([i,s])=>{if(s<Nc[this._logLevel]||!console[i])return;const l=console[i].bind(console);let u=!1;const h=(0,Lc.wrapFunctionWithRestore)(console,i,p=>(...g)=>{if(p(...g),!u){u=!0;try{const v=g.map(_=>(0,$c._safeStringify)(_,this._maxKeys,this._maxDepth,this._maxStringLength)),S=(0,$c._getStackTrace)();this._enqueueConsoleLog(i,v,S)}catch(v){l("console observer error:",v,...g),this._errorBoundary.logError("autoCapture:ConsoleLogManager",v)}finally{u=!1}}});this._restoreFns.push(h)})}_enqueueConsoleLog(i,s,l){if(!this._shouldLog(s))return;const u=Object.assign({status:i==="log"?"info":i,log_level:i,payload:s,trace:l,timestamp:Date.now(),source:this.__source},(0,QS._gatherAllMetadata)((0,Lc._getSafeUrl)()));this._enqueueFn(ZS.AutoCaptureEventName.CONSOLE_LOG,s.join(" "),u)}_shouldLog(i){for(const s of i)if(s.includes("[Statsig]"))return!1;return!this._options.sampleRate||typeof this._options.sampleRate!="number"||this._options.sampleRate<=0||this._options.sampleRate>=1?!0:Math.random()<this._options.sampleRate}}as.ConsoleLogManager=i0;var Hd={},vt={};
54Object.defineProperty(vt,"__esModule",{value:!0});vt._getMetadataFromElement=vt._gatherCopyEventData=vt._gatherEventData=void 0;const n0=J,jn=Ht,An=1e3,s0=100,o0=50;function a0(a){const i=(0,jn._getSanitizedPageUrl)()||"",s=a.tagName.toLowerCase();if(u0(a))return{value:i,metadata:Yd(a)};const l={};l.tagName=s;const u=Jd(a);Object.assign(l,u),s==="form"&&Object.assign(l,c0(a)),s==="input"&&Object.assign(l,d0(a));const h=(0,jn._getAnchorNodeInHierarchy)(a);return h&&Object.assign(l,h0(h)),(s==="button"||h)&&Object.assign(l,f0(h||a)),g0(l)&&(l.isOutbound="true"),{value:i,metadata:l}}vt._gatherEventData=a0;function l0(a){var i,s;const l=(s=(i=(0,n0._getWindowSafe)())===null||i===void 0?void 0:i.getSelection())===null||s===void 0?void 0:s.toString(),u={};u.selectedText=(0,jn._sanitizeString)(l);const h=a.type||"clipboard";return u.clipType=h,u}vt._gatherCopyEventData=l0;function u0(a){return a.tagName.toLowerCase()==="input"&&["button","checkbox","submit","reset"].includes(a.getAttribute("type")||"")||a.tagName.toLowerCase()==="textarea"||a.tagName.toLowerCase()==="select"||a.getAttribute("contenteditable")==="true"}function c0(a){var i;const s={};return s.action=a.getAttribute("action"),s.method=(i=a.getAttribute("method"))!==null&&i!==void 0?i:"GET",s.formName=a.getAttribute("name"),s.formId=a.getAttribute("id"),s}function d0(a){const i={};return i.content=a.value,i.inputName=a.getAttribute("name"),i}function h0(a){const i={};return i.href=a.getAttribute("href"),i}function f0(a){const i={};i.content=(a.textContent||"").trim();const s=p0(a);return Object.assign(i,s),i}function p0(a){const i={};if(!a)return i;const s=a==null?void 0:a.dataset;if(!s)return i;for(const l in s)i[`data-${l}`]=s[l]||"";return i}function kn(a,i){return a?a.length>i?a.substring(0,i)+"...":a:null}function g0(a){var i;if(Array.isArray(a.classList)&&(!((i=a.classList)===null||i===void 0)&&i.includes("statsig-ctr-capture")))return!0;const s=a.href;if(s)try{const l=(0,jn._getSafeUrl)(),u=new URL(s);return l.host!==u.host}catch{return!1}return!1}function Yd(a){const i={};return i.class=m0(kn(a.getAttribute("class"),An)||""),i.id=kn(a.getAttribute("id"),An),i.ariaLabel=kn(a.getAttribute("aria-label"),An),i.name=kn(a.getAttribute("name"),An),i}function Jd(a){const i={},s=Yd(a);Object.assign(i,s);const l=Array.from(a.classList);return i.classList=l.length>0?l.slice(0,s0):null,i.selector=v0(a),i}vt._getMetadataFromElement=Jd;function m0(a){return a.replace(/\s+/g," ").trim()}function _0(a){let i=a.nextElementSibling;for(;i;){if(i.tagName===a.tagName)return!0;i=i.nextElementSibling}return!1}function y0(a){const i=a.tagName.toLowerCase();if(a.id)return`#${a.id}`;let s=i;if(a.className&&typeof a.className=="string"){const u=a.className.trim().split(/\s+/);u.length>0&&u[0]!==""&&(s+="."+u.join("."))}const l=a.parentElement;if(l&&l.children.length>1){let u=1,h=1,p=a.previousElementSibling;for(;p;)u++,p.tagName===a.tagName&&h++,p=p.previousElementSibling;s+=`:nth-child(${u})`,(h>1||_0(a))&&(s+=`:nth-of-type(${h})`)}return s}function v0(a){if(!a)return"";if(!a.parentNode){const u=a.tagName.toLowerCase();if(a.id)return`#${a.id}`;let h=u;if(a.className&&typeof a.className=="string"){const p=a.className.trim().split(/\s+/);p.length>0&&p[0]!==""&&(h+="."+p.join("."))}return h}const i=[];let s=a,l=0;for(;s&&s.nodeType===Node.ELEMENT_NODE&&l<o0;){const u=y0(s);if(i.unshift(u),s.id||(s=s.parentElement,s&&s.tagName.toLowerCase()==="body"))break;l++}return i.join(" > ")}(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.DeadClickConfig=void 0;const i=J,s=Cr,l=Ht,u=vt,h=Je;a.DeadClickConfig={CLICK_CHECK_TIMEOUT:1e3,SCROLL_DELAY_MS:100,SELECTION_CHANGE_DELAY_MS:100,MUTATION_DELAY_MS:2500,ABSOLUTE_DEAD_CLICK_TIMEOUT:2750};class p{constructor(v,S){this._enqueueFn=v,this._errorBoundary=S,this._lastMutationTime=0,this._lastSelectionChangeTime=0,this._clicks=[],this._deadClickConfig=a.DeadClickConfig,this._handleScroll=(0,l.throttle)(()=>{const _=Date.now();this._clicks.forEach(b=>{b.scrollDelayMs||(b.scrollDelayMs=_-b.timestamp)})},50)}startTracking(){try{const v=(0,i._getWindowSafe)();if(!v)return;v.addEventListener("click",S=>this._handleClick(S),{capture:!0}),v.addEventListener("scroll",()=>this._handleScroll(),{capture:!0,passive:!0}),v.addEventListener("selectionchange",()=>this._handleSelectionChange()),this._setupMutationObserver()}catch(v){i.Log.error("Error starting dead click tracking",v),this._errorBoundary.logError("autoCapture:DeadClickManager",v)}}_handleClick(v){var S,_;const b=v.target;if(!b)return;const C={timestamp:Date.now(),eventTarget:b};l.interactiveElements.includes((S=b==null?void 0:b.tagName)===null||S===void 0?void 0:S.toLowerCase())||this._clicks.push(C),this._clicks.length&&!this._clickCheckTimer&&(this._clickCheckTimer=(_
54=(0,i._getWindowSafe)())===null||_===void 0?void 0:_.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}_handleSelectionChange(){this._lastSelectionChangeTime=Date.now()}_setupMutationObserver(){const v=(0,i._getDocumentSafe)();v&&(this._observer=new MutationObserver(()=>{this._lastMutationTime=Date.now()}),this._observer.observe(v.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}_checkForDeadClick(){var v;if(!this._clicks.length)return;clearTimeout(this._clickCheckTimer),this._clickCheckTimer=void 0;const S=this._clicks;this._clicks=[];for(const _ of S){this._updateClickDelayMs(_);const b=_.scrollDelayMs!=null&&_.scrollDelayMs<this._deadClickConfig.SCROLL_DELAY_MS,C=_.selectionChangeDelayMs!=null&&_.selectionChangeDelayMs<this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,A=_.mutationDelayMs!=null&&_.mutationDelayMs<this._deadClickConfig.MUTATION_DELAY_MS;if(b||C||A)continue;const T=_.scrollDelayMs!=null&&_.scrollDelayMs>this._deadClickConfig.SCROLL_DELAY_MS,F=_.selectionChangeDelayMs!=null&&_.selectionChangeDelayMs>this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,K=_.mutationDelayMs!=null&&_.mutationDelayMs>this._deadClickConfig.MUTATION_DELAY_MS,Y=_.absoluteDelayMs!=null&&_.absoluteDelayMs>this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT;T||F||K||Y?this._logDeadClick(_,{scrollTimeout:T,selectionChangeTimeout:F,mutationTimeout:K,absoluteTimeout:Y}):_.absoluteDelayMs!=null&&_.absoluteDelayMs<this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT&&this._clicks.push(_)}this._clicks.length&&!this._clickCheckTimer&&(this._clickCheckTimer=(v=(0,i._getWindowSafe)())===null||v===void 0?void 0:v.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}_logDeadClick(v,S){const{value:_,metadata:b}=(0,u._gatherEventData)(v.eventTarget);_&&this._enqueueFn(s.AutoCaptureEventName.DEAD_CLICK,_,Object.assign(Object.assign(Object.assign(Object.assign({},b),S),(0,h._gatherCommonMetadata)((0,l._getSafeUrl)())),{scrollDelayMs:v.scrollDelayMs,selectionChangeDelayMs:v.selectionChangeDelayMs,mutationDelayMs:v.mutationDelayMs,absoluteDelayMs:v.absoluteDelayMs}))}_updateClickDelayMs(v){!v.mutationDelayMs&&this._lastMutationTime>0&&v.timestamp<=this._lastMutationTime&&(v.mutationDelayMs=Date.now()-this._lastMutationTime),!v.selectionChangeDelayMs&&this._lastSelectionChangeTime>0&&v.timestamp<=this._lastSelectionChangeTime&&(v.selectionChangeDelayMs=Date.now()-this._lastSelectionChangeTime),v.absoluteDelayMs=Date.now()-v.timestamp}}a.default=p})(Hd);var ls={};Object.defineProperty(ls,"__esModule",{value:!0});ls.EngagementManager=void 0;const Dn=J,S0=6e5,b0=1e3;class w0{constructor(){this._lastScrollY=0,this._maxScrollY=0,this._lastScrollPercentage=0,this._maxScrollPercentage=0,this._lastPageViewTime=Date.now(),this._inactiveTimer=null,this._onInactivityCallback=null,this._meaningfulEngagementOccurred=!1,this._lastBumpTime=0,this._initializeScrollTracking()}_initializeScrollTracking(){const i=(0,Dn._getWindowSafe)();i&&(i.addEventListener("scroll",()=>this._handleScroll()),i.addEventListener("scrollend",()=>this._handleScroll()),i.addEventListener("resize",()=>this._handleScroll()))}_handleScroll(){const i=(0,Dn._getWindowSafe)(),s=(0,Dn._getDocumentSafe)();if(!i||!s)return;const l=s.body.scrollHeight,u=i.scrollY||s.documentElement.scrollTop||0,h=i.innerHeight;this._lastScrollY=u,this._maxScrollY=Math.max(this._maxScrollY,u);const p=Math.min(100,Math.round((u+h)/l*100));this._lastScrollPercentage=p,this._maxScrollPercentage=Math.max(this._maxScrollPercentage,p),this.bumpInactiveTimer()}getScrollMetrics(){return{lastScrollY:this._lastScrollY,maxScrollY:this._maxScrollY,lastScrollPercentage:this._lastScrollPercentage,maxScrollPercentage:this._maxScrollPercentage,scrollDepth:this._maxScrollPercentage}}getPageViewLength(){return Date.now()-this._lastPageViewTime}setLastPageViewTime(i){this._lastPageViewTime=i}startInactivityTracking(i){this._onInactivityCallback=i}bumpInactiveTimer(){const i=(0,Dn._getWindowSafe)();if(!i)return;const s=Date.now();s-this._lastBumpTime<b0||(this._lastBumpTime=s,this._inactiveTimer&&clearTimeout(this._inactiveTimer),this._inactiveTimer=i.setTimeout(()=>{this._onInactivityCallback&&this._onInactivityCallback()},S0))}setMeaningfulEngagementOccurred(i){this._meaningfulEngagementOccurred=i}getPageViewEndMetadata(){const i=Object.assign(Object.assign({}
54,this.getScrollMetrics()),{pageViewLength:this.getPageViewLength(),meaningfulEngagementOccurred:this._meaningfulEngagementOccurred});return this.setMeaningfulEngagementOccurred(!1),i}}ls.EngagementManager=w0;var ha={};Object.defineProperty(ha,"__esModule",{value:!0});const C0=30,E0=1e3,I0=3;class O0{constructor(){this._clicks=[]}isRageClick(i,s,l){this._clicks=this._clicks.filter(h=>l-h.timestamp<E0);const u=h=>{const p=i-h.x,g=s-h.y;return Math.abs(p)+Math.abs(g)<=C0};return this._clicks.length>0&&!u(this._clicks[this._clicks.length-1])&&(this._clicks=[]),this._clicks.push({x:i,y:s,timestamp:l}),this._clicks.length>=I0}}ha.default=O0;var us={},Ho={exports:{}};(function(a,i){(function(s,l){l(i)})(Z,function(s){let l=-1;const u=N=>{addEventListener("pageshow",L=>{L.persisted&&(l=L.timeStamp,N(L))},!0)},h=(N,L,H,j)=>{let G,Re;return Oe=>{L.value>=0&&(Oe||j)&&(Re=L.value-(G??0),(Re||G===void 0)&&(G=L.value,L.delta=Re,L.rating=((ye,Me)=>ye>Me[1]?"poor":ye>Me[0]?"needs-improvement":"good")(L.value,H),N(L)))}},p=N=>{requestAnimationFrame(()=>requestAnimationFrame(()=>N()))},g=()=>{const N=performance.getEntriesByType("navigation")[0];if(N&&N.responseStart>0&&N.responseStart<performance.now())return N},v=()=>{const N=g();return(N==null?void 0:N.activationStart)??0},S=(N,L=-1)=>{const H=g();let j="navigate";return l>=0?j="back-forward-cache":H&&(document.prerendering||v()>0?j="prerender":document.wasDiscarded?j="restore":H.type&&(j=H.type.replace(/_/g,"-"))),{name:N,value:L,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:j}},_=new WeakMap;function b(N,L){return _.get(N)||_.set(N,new L),_.get(N)}class C{constructor(){gt(this,"t");gt(this,"i",0);gt(this,"o",[])}h(L){var G;if(L.hadRecentInput)return;const H=this.o[0],j=this.o.at(-1);this.i&&H&&j&&L.startTime-j.startTime<1e3&&L.startTime-H.startTime<5e3?(this.i+=L.value,this.o.push(L)):(this.i=L.value,this.o=[L]),(G=this.t)==null||G.call(this,L)}}const A=(N,L,H={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(N)){const j=new PerformanceObserver(G=>{Promise.resolve().then(()=>{L(G.getEntries())})});return j.observe({type:N,buffered:!0,...H}),j}}catch{}},T=N=>{let L=!1;return()=>{L||(N(),L=!0)}};let F=-1;const K=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,Y=N=>{document.visibilityState==="hidden"&&F>-1&&(F=N.type==="visibilitychange"?N.timeStamp:0,ue())},he=()=>{addEventListener("visibilitychange",Y,!0),addEventListener("prerenderingchange",Y,!0)},ue=()=>{removeEventListener("visibilitychange",Y,!0),removeEventListener("prerenderingchange",Y,!0)},$=()=>{var N;if(F<0){const L=v();F=(document.prerendering||(N=globalThis.performance.getEntriesByType("visibility-state").filter(j=>j.name==="hidden"&&j.startTime>L)[0])==null?void 0:N.startTime)??K(),he(),u(()=>{setTimeout(()=>{F=K(),he()})})}return{get firstHiddenTime(){return F}}},D=N=>{document.prerendering?addEventListener("prerenderingchange",()=>N(),!0):N()},P=[1800,3e3],ee=(N,L={})=>{D(()=>{const H=$();let j,G=S("FCP");const Re=A("paint",Oe=>{for(const ye of Oe)ye.name==="first-contentful-paint"&&(Re.disconnect(),ye.startTime<H.firstHiddenTime&&(G.value=Math.max(ye.startTime-v(),0),G.entries.push(ye),j(!0)))});Re&&(j=h(N,G,P,L.reportAllChanges),u(Oe=>{G=S("FCP"),j=h(N,G,P,L.reportAllChanges),p(()=>{G.value=performance.now()-Oe.timeStamp,j(!0)})}))})},Ce=[.1,.25];let Ee=0,it=1/0,Ge=0;const Yt=N=>{for(const L of N)L.interactionId&&(it=Math.min(it,L.interactionId),Ge=Math.max(Ge,L.interactionId),Ee=Ge?(Ge-it)/7+1:0)};let xt;const Ie=()=>xt?Ee:performance.interactionCount??0,wi=()=>{"interactionCount"in performance||xt||(xt=A("event",Yt,{type:"event",buffered:!0,durationThreshold:0}))};let Ct=0;class Tt{constructor(){gt(this,"u",[]);gt(this,"l",new Map);gt(this,"m");gt(this,"p")}v(){Ct=Ie(),this.u.length=0,this.l.clear()}T(){const L=Math.min(this.u.length-1,Math.floor((Ie()-Ct)/50));return this.u[L]}h(L){var G,Re;if((G=this.m)==null||G.call(this,L),!L.interactionId&&L.entryType!=="first-input")return;const H=this.u.at(-1);let j=this.l.get(L.interactionId);if(j||this.u.length<10||L.duration>H.P){if(j?L.duration>j.P?(j.entries=[L],j.P=L.duration):L.duration===j.P&&L.startTime===j.entries[0].startTime&&j.entries.push(L):(j={id:L.interactionId,entries:[L],P:L.duration},this.l.set(j.id,j),this.u.push(j)),this.u.sort((Oe,ye)=>ye.P-Oe.P),this.u.length>10){const Oe=this.u.splice(10);for(const ye of Oe)this.l.delete(ye.id)}(Re=this.p)==null||Re.call(this,j)}}}const Ci=N=>{const L=globalThis.requestIdleCallback||setTimeout;document.visibilityState==="hidden"?N():(N=T(N),document.addEventListener("visibilitychange",N,{once:!0}),L(()=>{N(),document.removeEventListener("visibilitychange",N)}
54))},Er=[200,500];class Jt{constructor(){gt(this,"m")}h(L){var H;(H=this.m)==null||H.call(this,L)}}const Xt=[2500,4e3],Ir=[800,1800],Or=N=>{document.prerendering?D(()=>Or(N)):document.readyState!=="complete"?addEventListener("load",()=>Or(N),!0):setTimeout(N)};s.CLSThresholds=Ce,s.FCPThresholds=P,s.INPThresholds=Er,s.LCPThresholds=Xt,s.TTFBThresholds=Ir,s.onCLS=(N,L={})=>{ee(T(()=>{let H,j=S("CLS",0);const G=b(L,C),Re=ye=>{for(const Me of ye)G.h(Me);G.i>j.value&&(j.value=G.i,j.entries=G.o,H())},Oe=A("layout-shift",Re);Oe&&(H=h(N,j,Ce,L.reportAllChanges),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&(Re(Oe.takeRecords()),H(!0))}),u(()=>{G.i=0,j=S("CLS",0),H=h(N,j,Ce,L.reportAllChanges),p(()=>H())}),setTimeout(H))}))},s.onFCP=ee,s.onINP=(N,L={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&D(()=>{wi();let H,j=S("INP");const G=b(L,Tt),Re=ye=>{Ci(()=>{for(const Ve of ye)G.h(Ve);const Me=G.T();Me&&Me.P!==j.value&&(j.value=Me.P,j.entries=Me.entries,H())})},Oe=A("event",Re,{durationThreshold:L.durationThreshold??40});H=h(N,j,Er,L.reportAllChanges),Oe&&(Oe.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&(Re(Oe.takeRecords()),H(!0))}),u(()=>{G.v(),j=S("INP"),H=h(N,j,Er,L.reportAllChanges)}))})},s.onLCP=(N,L={})=>{D(()=>{const H=$();let j,G=S("LCP");const Re=b(L,Jt),Oe=Me=>{L.reportAllChanges||(Me=Me.slice(-1));for(const Ve of Me)Re.h(Ve),Ve.startTime<H.firstHiddenTime&&(G.value=Math.max(Ve.startTime-v(),0),G.entries=[Ve],j())},ye=A("largest-contentful-paint",Oe);if(ye){j=h(N,G,Xt,L.reportAllChanges);const Me=T(()=>{Oe(ye.takeRecords()),ye.disconnect(),j(!0)});for(const Ve of["keydown","click","visibilitychange"])addEventListener(Ve,()=>Ci(Me),{capture:!0,once:!0});u(Ve=>{G=S("LCP"),j=h(N,G,Xt,L.reportAllChanges),p(()=>{G.value=performance.now()-Ve.timeStamp,j(!0)})})}})},s.onTTFB=(N,L={})=>{let H=S("TTFB"),j=h(N,H,Ir,L.reportAllChanges);Or(()=>{const G=g();G&&(H.value=Math.max(G.responseStart-v(),0),H.entries=[G],j(!0),u(()=>{H=S("TTFB",0),j=h(N,H,Ir,L.reportAllChanges),j(!0)}))})}})})(Ho,Ho.exports);var R0=Ho.exports;Object.defineProperty(us,"__esModule",{value:!0});us.WebVitalsManager=void 0;const ti=R0,Uc=J,M0=Cr,ri=Ht,Fc=["CLS","FCP","INP","LCP","TTFB"];class A0{constructor(i,s){this._enqueueFn=i,this._errorBoundary=s,this._isInitialized=!1,this._metricEvent={url:(0,ri._getSafeUrlString)(),sanitizedUrl:(0,ri._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}startTracking(){var i,s;try{if(this._isInitialized)return;const l=(s=(i=(0,Uc._getWindowSafe)())===null||i===void 0?void 0:i.location)===null||s===void 0?void 0:s.protocol;if(l!=="https:"&&l!=="http:")return;(0,ti.onCLS)(u=>this._handleMetric(u)),(0,ti.onFCP)(u=>this._handleMetric(u)),(0,ti.onINP)(u=>this._handleMetric(u)),(0,ti.onLCP)(u=>this._handleMetric(u)),(0,ti.onTTFB)(u=>this._handleMetric(u)),this._isInitialized=!0}catch(l){Uc.Log.error("Error starting web vitals tracking",l),this._errorBoundary.logError("autoCapture:WebVitalsManager",l)}}_handleMetric(i){if(this._metricEvent.firstMetricTimestamp===void 0&&(this._metricEvent.firstMetricTimestamp=Date.now()),i===void 0||(i==null?void 0:i.name)===void 0)return;const s=(0,ri._getSafeUrlString)();if(s===""||!Fc.includes(i.name))return;s!==this._metricEvent.url&&(this._enqueueWebVitalsAutoCaptureEvent(),this._metricEvent.url=s);const l=i;this._metricEvent.metrics.push({name:l.name,value:l.value,delta:l.delta,id:l.id}),this._metricEvent.metrics.length===Fc.length&&this._enqueueWebVitalsAutoCaptureEvent()}_enqueueWebVitalsAutoCaptureEvent(){if(this._metricEvent.url===""||this._metricEvent.metrics.length===0)return;const i={};this._metricEvent.metrics.forEach(s=>{const l=s.name.toLowerCase();i[`${l}_value`]=s.value,i[`${l}_delta`]=s.delta,i[`${l}_id`]=s.id}),this._enqueueFn(M0.AutoCaptureEventName.WEB_VITALS,this._metricEvent.sanitizedUrl,Object.assign(Object.assign({},i),{first_metric_timestamp:this._metricEvent.firstMetricTimestamp})),this._metricEvent={url:(0,ri._getSafeUrlString)(),sanitizedUrl:(0,ri._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}}us.WebVitalsManager=A0;
54Object.defineProperty(kt,"__esModule",{value:!0});kt.AutoCapture=kt.runStatsigAutoCapture=kt.StatsigAutoCapturePlugin=void 0;const Ne=J,He=Cr,k0=as,D0=Hd,x0=ls,T0=ha,P0=us,we=Ht,jc=vt,Bt=Je,L0={submit:He.AutoCaptureEventName.FORM_SUBMIT,click:He.AutoCaptureEventName.CLICK,copy:He.AutoCaptureEventName.COPY,cut:He.AutoCaptureEventName.COPY};class $0{constructor(i){this._options=i,this.__plugin="auto-capture"}bind(i){Xd(i,this._options)}}kt.StatsigAutoCapturePlugin=$0;function Xd(a,i){var s;if((0,Ne._isServerEnv)())return null;const{sdkKey:l}=a.getContextHandle();if(!(0,Ne._isServerEnv)()){const h=(s=(0,Ne._getStatsigGlobal)().acInstances)!==null&&s!==void 0?s:{};if(h[l])return h[l]}return new qd(a,i)}kt.runStatsigAutoCapture=Xd;class qd{constructor(i,s){var l,u,h,p;this._client=i,this._disabledEvents={},this._previousLoggedPageViewUrl=null,this._hasLoggedPageViewEnd=!1,this._pageViewLogged=!1;const{sdkKey:g,errorBoundary:v,values:S}=i.getContextHandle();this._options=s,this._disabledEvents=(u=(l=S==null?void 0:S.auto_capture_settings)===null||l===void 0?void 0:l.disabled_events)!==null&&u!==void 0?u:{},this._errorBoundary=v,this._errorBoundary.wrap(this,"autoCapture:"),this._client.$on("values_updated",()=>{var b,C;const A=this._client.getContextHandle().values;this._disabledEvents=(C=(b=A==null?void 0:A.auto_capture_settings)===null||b===void 0?void 0:b.disabled_events)!==null&&C!==void 0?C:this._disabledEvents}),this._engagementManager=new x0.EngagementManager,this._rageClickManager=new T0.default,this._webVitalsManager=new P0.WebVitalsManager(this._enqueueAutoCapture.bind(this),v),this._deadClickManager=new D0.default(this._enqueueAutoCapture.bind(this),v),this._consoleLogManager=new k0.ConsoleLogManager(this._enqueueAutoCapture.bind(this),v,(h=s==null?void 0:s.consoleLogAutoCaptureSettings)!==null&&h!==void 0?h:{enabled:!1}),this._eventFilterFunc=s==null?void 0:s.eventFilterFunc;const _=(0,Ne._getDocumentSafe)();if(!(0,Ne._isServerEnv)()){__STATSIG__=(0,Ne._getStatsigGlobal)();const b=(p=__STATSIG__.acInstances)!==null&&p!==void 0?p:{};b[g]=this,__STATSIG__.acInstances=b}if((_==null?void 0:_.readyState)==="loading"){_.addEventListener("DOMContentLoaded",()=>this._initialize());return}this._initialize()}_addEventHandlers(){const i=(0,Ne._getWindowSafe)(),s=(0,Ne._getDocumentSafe)();if(!i||!s)return;const l=(u,h=!0)=>{var p;const g=u||((p=(0,Ne._getWindowSafe)())===null||p===void 0?void 0:p.event);this._autoLogEvent(g),h&&this._engagementManager.bumpInactiveTimer(),g.type==="click"&&g instanceof MouseEvent&&this._rageClickManager.isRageClick(g.clientX,g.clientY,Date.now())&&this._logRageClick(g)};(0,we._registerEventHandler)(s,"click",u=>l(u)),(0,we._registerEventHandler)(s,"submit",u=>l(u)),(0,we._registerEventHandler)(s,"copy",u=>l(u)),(0,we._registerEventHandler)(s,"cut",u=>l(u)),(0,we._registerEventHandler)(i,"error",u=>l(u,!1)),(0,we._registerEventHandler)(i,"pagehide",()=>this._tryLogPageViewEnd()),(0,we._registerEventHandler)(i,"beforeunload",()=>this._tryLogPageViewEnd())}_addPageViewTracking(){const i=(0,Ne._getWindowSafe)(),s=(0,Ne._getDocumentSafe)();if(!(!i||!s)){if((0,we._registerEventHandler)(i,"popstate",()=>this._tryLogPageView("popstate")),i.history&&typeof Proxy=="function"&&typeof i.history.pushState=="function")try{const l=i.history.pushState;i.history.pushState=new Proxy(l,{apply:(u,h,[p,g,v])=>{const S=u.apply(h,[p,g,v]);return this._tryLogPageView("pushstate"),S}})}catch{}if(i.history&&typeof Proxy=="function"&&typeof i.history.replaceState=="function")try{const l=i.history.replaceState;i.history.replaceState=new Proxy(l,{apply:(u,h,[p,g,v])=>{const S=u.apply(h,[p,g,v]);return this._tryLogPageView("replacestate"),S}})}catch{}this._tryLogPageView()}}_autoLogEvent(i){var s,l,u,h;const p=(s=i.type)===null||s===void 0?void 0:s.toLowerCase();if(p==="error"&&i instanceof ErrorEvent){this._logError(i);return}const g=(0,we._getTargetNode)(i);if(!g)return;const v=L0[p];if(!v)return;const S=v===He.AutoCaptureEventName.COPY;if(!(0,we._shouldLogEvent)(i,g,S))return;const _={};if(S){const T=(u=(l=(0,Ne._getWindowSafe)())===null||l===void 0?void 0:l.getSelection())===null||u===void 0?void 0:u.toString();if(!T)return;
54!((h=this._options)===null||h===void 0)&&h.captureCopyText&&(_.selectedText=(0,we._sanitizeString)(T));const F=i.type||"clipboard";_.clipType=F}const{value:b,metadata:C}=(0,jc._gatherEventData)(g);C.isOutbound&&this._engagementManager.setMeaningfulEngagementOccurred(!0),Object.assign(_,C);const A=(0,Bt._gatherAllMetadata)((0,we._getSafeUrl)());this._enqueueAutoCapture(v,b,Object.assign(Object.assign({},A),_))}_initialize(){this._webVitalsManager.startTracking(),this._deadClickManager.startTracking(),this._consoleLogManager.startTracking(),this._engagementManager.startInactivityTracking(()=>this._tryLogPageViewEnd(!0)),this._addEventHandlers(),this._addPageViewTracking(),this._logSessionStart(),this._logPerformance()}_logError(i){const s=(i==null?void 0:i.error)||{};let l=s;if(typeof s=="object")try{l=JSON.stringify(s)}catch{l=typeof(s==null?void 0:s.toString)=="function"?s.toString():"Unknown Error"}this._enqueueAutoCapture(He.AutoCaptureEventName.ERROR,i.message,{message:i.message,filename:i.filename,lineno:i.lineno,colno:i.colno,error_str:l})}_logSessionStart(){const i=this._client.getContextHandle().getSession();try{if(!this._isNewSession(i))return;this._enqueueAutoCapture(He.AutoCaptureEventName.SESSION_START,(0,we._getSanitizedPageUrl)(),Object.assign({sessionID:i.data.sessionID},(0,Bt._gatherAllMetadata)((0,we._getSafeUrl)())),{flushImmediately:!0})}catch(s){this._errorBoundary.logError("AC::logSession",s)}}_tryLogPageView(i){const s=(0,we._getSafeUrl)(),l=this._previousLoggedPageViewUrl;if(l&&s.pathname===l.pathname)return;this._engagementManager.setLastPageViewTime(Date.now()),this._hasLoggedPageViewEnd=!1;const u=(0,Bt._gatherAllMetadata)(s);i&&(u.navigation_type=i),this._previousLoggedPageViewUrl&&(u.last_page_view_url=this._previousLoggedPageViewUrl.href),this._pageViewLogged||(this._updateClientWithPossibleFirstTouchMetadata(),this._pageViewLogged=!0),this._enqueueAutoCapture(He.AutoCaptureEventName.PAGE_VIEW,(0,we._getSanitizedPageUrl)(),u,{flushImmediately:!0,addNewSessionMetadata:!0}),this._previousLoggedPageViewUrl=s,this._engagementManager.bumpInactiveTimer()}_tryLogPageViewEnd(i=!1){this._hasLoggedPageViewEnd||(this._hasLoggedPageViewEnd=!0,this._enqueueAutoCapture(He.AutoCaptureEventName.PAGE_VIEW_END,(0,we._getSanitizedPageUrl)(),Object.assign(Object.assign({},this._engagementManager.getPageViewEndMetadata()),{dueToInactivity:i}),{flushImmediately:!0}))}_logRageClick(i){if(!(0,we._shouldLogEvent)(i,i.target))return;const{value:s,metadata:l}=(0,jc._gatherEventData)(i.target);this._enqueueAutoCapture(He.AutoCaptureEventName.RAGE_CLICK,s,Object.assign(Object.assign({x:i.clientX,y:i.clientY,timestamp:Date.now()},(0,Bt._gatherAllMetadata)((0,we._getSafeUrl)())),l))}_logPerformance(){const i=(0,Ne._getWindowSafe)();!i||!i.performance||typeof(i==null?void 0:i.performance)>"u"||typeof i.performance.getEntriesByType!="function"||typeof i.performance.getEntriesByName!="function"||setTimeout(()=>{const s={},l=i.performance.getEntriesByType("navigation");if(l&&l.length>0&&l[0]instanceof PerformanceNavigationTiming){const h=l[0];s.load_time_ms=h.duration,s.dom_interactive_time_ms=h.domInteractive-h.startTime,s.redirect_count=h.redirectCount,s.transfer_bytes=h.transferSize}const u=i.performance.getEntriesByName("first-contentful-paint");u&&u.length>0&&u[0]instanceof PerformancePaintTiming&&(s.first_contentful_paint_time_ms=u[0].startTime),this._enqueueAutoCapture(He.AutoCaptureEventName.PERFORMANCE,(0,we._getSanitizedPageUrl)(),Object.assign(Object.assign({},s),(0,Bt._getNetworkInfo)()))},1)}_enqueueAutoCapture(i,s,l,u){var h,p,g;if(!s)return;const v=i.slice(14);if(this._disabledEvents[i]||this._disabledEvents[v])return;const S=(0,He.isUserActionAutoCaptureEvent)(i),_=this._client.getContextHandle().getSession(S);try{const b=Object.assign({sessionID:_.data.sessionID,page_url:(g=(p=(h=(0,Ne._getWindowSafe)())===null||h===void 0?void 0:h.location)===null||p===void 0?void 0:p.href)!==null&&g!==void 0?g:""},l);u!=null&&u.addNewSessionMetadata&&(b.isNewSession=String(this._isNewSession(_)));const C={eventName:i,value:s,metadata:b};if(this._eventFilterFunc&&!this._eventFilterFunc(C))return;this._client.logEvent(C),u!=null&&u.flushImmediately&&this._flushImmediately()}catch(b){this._errorBoundary.logError("AC::enqueue",b)}}_updateClientWithPossibleFirstTouchMetadata(){const i=this._client;i._possibleFirstTouchMetadata=(0,Bt._getPossibleFirstTouchMetadata)((0,we._getSafeUrl)()),Object.keys(i._possibleFirstTouchMetadata).length>0&&(i._user=Object.assign(Object.assign({},i._user),{analyticsOnlyMetadata:Object.assign(Object.assign({}
54,i._possibleFirstTouchMetadata),i._user.analyticsOnlyMetadata)}))}_flushImmediately(){this._client.flush().catch(i=>{Ne.Log.error(i)})}_isNewSession(i){return Math.abs(i.data.startTime-Date.now())<1e3}static getAllMetadata(){return(0,Bt._gatherAllMetadata)((0,we._getSafeUrl)())}}kt.AutoCapture=qd;(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.StatsigAutoCapturePlugin=a.runStatsigAutoCapture=a.AutoCapture=a.AutoCaptureEventName=void 0;const i=J,s=kt;Object.defineProperty(a,"AutoCapture",{enumerable:!0,get:function(){return s.AutoCapture}}),Object.defineProperty(a,"StatsigAutoCapturePlugin",{enumerable:!0,get:function(){return s.StatsigAutoCapturePlugin}}),Object.defineProperty(a,"runStatsigAutoCapture",{enumerable:!0,get:function(){return s.runStatsigAutoCapture}});var l=Cr;Object.defineProperty(a,"AutoCaptureEventName",{enumerable:!0,get:function(){return l.AutoCaptureEventName}});const u=Object.assign((0,i._getStatsigGlobal)(),{AutoCapture:s.AutoCapture,runStatsigAutoCapture:s.runStatsigAutoCapture,StatsigAutoCapturePlugin:s.StatsigAutoCapturePlugin});a.default=u})(Bd);const N0=({children:a})=>{const{statsigUserID:i,isBot:s}=Bm(),l=Hu("STATSIG_CLIENT_KEY"),u=Hu("APP_ENV"),h=!l||!i||i==="anonymous"||s||u!=="PRODUCTION",p=re.useRef(null),g=re.useMemo(()=>({userID:i}),[i]),v=re.useMemo(()=>h?null:(p.current||(p.current=[new Md.StatsigTriggeredSessionReplayPlugin({autoStartRecording:!0,keepRollingWindow:!0,rrwebConfig:{blockClass:"blocked"}}),new Bd.StatsigAutoCapturePlugin]),{environment:{tier:"production"},plugins:p.current}),[h]);return h||!v?U.jsx(U.Fragment,{children:a}):U.jsx(Xc.StatsigProvider,{sdkKey:l,user:g,loadingComponent:null,options:v,children:a})},Bc="/resources/user-settings",U0=({children:a})=>{const i=Bo(),s=Bo(),[l,u]=re.useState(!1),[h,p]=re.useState({[Jr.showExclVat]:!1}),g=Yc("enable_vat_switcher"),v=re.useCallback(b=>{p(C=>({...C,...b}))},[]);re.useEffect(()=>{!i.data||l||(u(!0),v(i.data??{}))},[l,i.data,v]);const S=re.useCallback(b=>{if(!g)return;const C=new FormData;C.set(Jr.showExclVat,JSON.stringify(b)),s.submit(C,{method:"post",action:Bc}),v({[Jr.showExclVat]:b})},[s,v,g]);re.useEffect(()=>{i.load(Bc)},[]);const _=re.useMemo(()=>({...h,[Jr.showExclVat]:g?h[Jr.showExclVat]:!1,setShowExclVat:S}),[h,g,S]);return U.jsx(Ym,{value:_,children:a})},ii="7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191",ni={w400:`https://use.typekit.net/af/d7ff92/00000000000000007735e609/31/l?primer=${ii}&fvd=n4&v=3`,w500:`https://use.typekit.net/af/26f7ec/00000000000000007735e605/31/l?primer=${ii}&fvd=n5&v=3`,w600:`https://use.typekit.net/af/e37e5a/00000000000000007735e60d/31/l?primer=${ii}&fvd=n6&v=3`,w700:`https://use.typekit.net/af/5be242/00000000000000007735e603/31/l?primer=${ii}&fvd=n7&v=3`,w800:`https://use.typekit.net/af/99d25e/00000000000000007735e611/31/l?primer=${ii}&fvd=n8&v=3`},Zd=[{weight:400,url:ni.w400},{weight:500,url:ni.w500},{weight:600,url:ni.w600},{weight:700,url:ni.w700},{weight:800,url:ni.w800}],F0=Zd.map(({url:a})=>a),Qd="proxima-nova, Arial, sans-serif",j0=a=>a.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,])\s*/g,"$1").trim(),B0=j0([...Zd.map(({weight:a,url:i})=>`@font-face {
55  font-family: "proxima-nova";
56  src: url("${i}") format("woff2");
57  font-weight: ${a};
58  font-style: normal;
59  font-display: swap;
60}`),`body {
61  font-family: ${Qd};
62  font-size: 0.875rem;
63  line-height: 1.25;
64  -webkit-font-smoothing: antialiased;
65  -moz-osx-font-smoothing: grayscale;
66}
67@media (min-width: 640px) {
68  body {
69    font-size: 1rem;
70  }
71}
72.gd-h1 {
73  font-size: 1.25rem;
74  line-height: 1.25;
75  font-weight: 800;
76}
77@media (min-width: 640px) {
78  .gd-h1 {
79    font-size: 2rem;
80    line-height: 1.1;
81  }
82}
83.gd-h2 {
84  font-size: 1.125rem;
85  line-height: 1.25;
86  font-weight: 800;
87}
88@media (min-width: 640px) {
89  .gd-h2 {
90    font-size: 1.5rem;
91    line-height: 1.25;
92  }
93}
94.gd-h3 {
95  font-size: 1rem;
96  line-height: 1.25;
97  font-weight: 800;
98}
99@media (min-width: 640px) {
100  .gd-h3 {
101    font-size: 1.25rem;
102    line-height: 1.25;
103  }
104}
105.gd-h4 {
106  font-size: 1rem;
107  line-height: 1.25;
108  font-weight: 700;
109}
110@media (min-width: 640px) {
111  .gd-h4 {
112    font-size: 1.125rem;
113    line-height: 1.25;
114  }
115}
116.gd-h5,
117.gd-h6 {
118  font-size: 1rem;
119  line-height: 1.25;
120  font-weight: 700;
121}`].join(`
122`));let eh;const Yb=({request:a,serverLoader:i})=>Jm({routeId:"root",request:a,serverLoader:i,lastGoodData:()=>eh}),Jb=zm(function({loaderData:i}){const{origin:s,locale:l,scripts:u,publicRuntimeConfig:h,branchData:p,enabledGates:g,flashMessage:v}=i;eh=i;const S=Yc("enable_back_to_top_button");Qm(h.APP_TYPE);const _=["https://storefront-nl.prd.gadero.cloud","https://storefront-be.prd.gadero.cloud","https://storefront-fr.prd.gadero.cloud","https://storefront-de.prd.gadero.cloud","https://tuin.prd.gadero.cloud"];return U.jsxs("html",{lang:l,children:[U.jsxs("head",{children:[U.jsx("meta",{charSet:"utf-8"}),U.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),_.includes(s)&&U.jsx("meta",{name:"robots",content:"noindex"}),U.jsx("link",{rel:"preload",href:Jc,as:"style"}
122),U.jsx("link",{rel:"preconnect",href:"https://use.typekit.net/",crossOrigin:"anonymous"}),F0.map(b=>U.jsx("link",{rel:"preload",href:b,as:"font",type:"font/woff2",crossOrigin:"anonymous"},b)),U.jsx("style",{dangerouslySetInnerHTML:{__html:B0}}),U.jsx(Gc,{}),U.jsx(Vc,{})]}),U.jsxs("body",{style:{fontFamily:Qd},className:"flex min-h-screen flex-col antialiased font-proxima text-sm sm:text-base",children:[U.jsx(N0,{children:U.jsxs(qm,{origin:s,children:[U.jsx(h_,{}),U.jsx(Xm,{error:v??void 0,children:U.jsx(a_,{enabledGates:g,children:U.jsx(l_,{children:U.jsx(t_,{children:U.jsx(r_,{children:U.jsx(U0,{children:U.jsx(d_,{children:U.jsx(c_,{children:U.jsx(Vm,{})})})})})})})})})]})}),U.jsx(Wc,{}),U.jsx(Kc,{}),U.jsx(Ao,{children:()=>U.jsx(S_,{scripts:u})}),p&&U.jsx(Ao,{children:()=>U.jsx(__,{branchData:p})}),S&&U.jsx(Ao,{children:()=>U.jsx(v_,{})})]})]})}),z0=a=>{const i=typeof window<"u"?window.location.href:"server-side";if(!zc(a)){ko(a instanceof Error?a:new Error(String(a)),"error",{data:{url:i}});return}if(a.status===404){ko("[404] The requested page could not be found.","warning",{data:{url:i,status:a.status}});return}const s=new Error(`RouteError ${a.status}: ${String(a.data)}`);ko(s,"error",{data:{url:i,status:a.status,statusText:a.statusText,data:a.data}})},Xb=Gm(function({error:i}){return z0(i),U.jsxs("html",{lang:"en",children:[U.jsxs("head",{children:[U.jsx("meta",{charSet:"utf-8"}),U.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),U.jsx(Gc,{}),U.jsx(Vc,{})]}),U.jsxs("body",{suppressHydrationWarning:!0,className:"flex min-h-screen flex-col antialiased font-proxima text-sm sm:text-base",children:[U.jsx(i_,{message:g_(i)}),U.jsx(Wc,{}),U.jsx(Kc,{})]})]})}),G0=[72,120,144,180,256,512],qb=()=>{const a=Zm(),i=s=>`/${a}${s}`;return[{rel:"stylesheet",href:Jc},...G0.map(s=>({rel:"apple-touch-icon",href:i(`/apple-touch-icon-${s}x${s}.png`),type:"image/png",sizes:`${s}x${s}`})),{rel:"apple-touch-icon-precomposed",href:i("/apple-touch-icon-precomposed.png")},{rel:"manifest",href:i("/site.webmanifest"),crossOrigin:"anonymous",type:"application/manifest+json"},{rel:"icon",href:i("/favicon-32x32.png"),type:"image/png",sizes:"32x32"},{rel:"icon",href:i("/favicon-16x16.png"),type:"image/png",sizes:"16x16"},{rel:"shortcut icon",href:i("/favicon.ico"),type:"image/x-icon",crossOrigin:"anonymous"},{rel:"dns-prefetch",href:"https://images.ctfassets.net/"},{rel:"preconnect",href:"https://images.ctfassets.net/"}]},Zb=a=>{const{defaultShouldRevalidate:i,currentUrl:s,nextUrl:l}=a,u=o_("search");return u.includes(s.pathname)||u.includes(l.pathname)?!1:i};export{Xb as ErrorBoundary,Yb as clientLoader,Jb as default,qb as links,Zb as shouldRevalidate};

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.