!function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class t{constructor(t,r){e(this,"cachePromise",void 0),e(this,"url",void 0),e(this,"valueCache",void 0),this.cachePromise=t,this.url=r}getOnlyInmemoryValue(){const e=this.valueCache;return e||this.cachePromise.then((async e=>{var t,r,n;const o=await e.match(this.url),i=await((null==o||null===(t=o.clone)||void 0===t||null===(r=t.call(o))||void 0===r||null===(n=r.json)||void 0===n?void 0:n.call(r))??Promise.resolve());i&&(this.valueCache=i)})),e}async get(){var e;if(null!=this.valueCache)return this.valueCache;const t=await this.cachePromise.then((e=>e.match(this.url)));return this.valueCache=await((null==t||null===(e=t.json)||void 0===e?void 0:e.call(t))??Promise.resolve()),this.valueCache}setInmemoryValue(e){this.valueCache=e}async put(e){if(this.valueCache=e,"function"!=typeof Response)throw new Error("Rejected to set value due to your Response class being broken. If you are using response.js, you MUST use noConflict() (available from 0.6.0) to avoid breaking standard API.");return this.cachePromise.then((t=>t.put(this.url,new Response(JSON.stringify(e)))))}async delete(){return this.valueCache=void 0,this.cachePromise.then((e=>e.delete(this.url)))}}const r=`${self.location.origin}/precacher.repro.io/config`,n=`${r}/fetch_configuration_history`,o=`${r}/stats`,i=`${r}/cl`,a=`${r}/dual-proxy-query-params`,s=`${r}/supported-image-formats`,c=`${r}/config-variant-assignment`,l=caches.open("rpr-precacher-config");new t(l,r),new t(l,n),new t(l,i),new t(l,o),new t(l,s);const u=new t(l,a),d=new t(l,c);var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},f=function(e){try{return!!e()}catch(e){return!0}},g=!f((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),h=g,v=Function.prototype,m=v.call,y=h&&v.bind.bind(m,m),b=h?y:function(e){return function(){return m.apply(e,arguments)}},w=b({}.isPrototypeOf),A=function(e){return e&&e.Math===Math&&e},O=A("object"==typeof globalThis&&globalThis)||A("object"==typeof window&&window)||A("object"==typeof self&&self)||A("object"==typeof p&&p)||A("object"==typeof p&&p)||function(){return this}()||Function("return this")(),S=g,C=Function.prototype,P=C.apply,E=C.call,k="object"==typeof Reflect&&Reflect.apply||(S?E.bind(P):function(){return E.apply(P,arguments)}),x=b,T=x({}.toString),j=x("".slice),_=function(e){return j(T(e),8,-1)},R=_,M=b,L=function(e){if("Function"===R(e))return M(e)},I="object"==typeof document&&document.all,D=void 0===I&&void 0!==I?function(e){return"function"==typeof e||e===I}:function(e){return"function"==typeof e},F={},N=!f((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),W=g,B=Function.prototype.call,U=W?B.bind(B):function(){return B.apply(B,arguments)},z={},$={}.propertyIsEnumerable,q=Object.getOwnPropertyDescriptor,V=q&&!$.call({1:2},1);z.f=V?function(e){var t=q(this,e);return!!t&&t.enumerable}:$;var Q,G,H=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},J=f,K=_,X=Object,Y=b("".split),Z=J((function(){return!X("z").propertyIsEnumerable(0)}))?function(e){return"String"===K(e)?Y(e,""):X(e)}:X,ee=function(e){return null==e},te=ee,re=TypeError,ne=function(e){if(te(e))throw new re("Can't call method on "+e);return e},oe=Z,ie=ne,ae=function(e){return oe(ie(e))},se=D,ce=function(e){return"object"==typeof e?null!==e:se(e)},le={},ue=le,de=O,pe=D,fe=function(e){return pe(e)?e:void 0},ge=O,he="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ve=ge.process,me=ge.Deno,ye=ve&&ve.versions||me&&me.version,be=ye&&ye.v8;be&&(G=(Q=be.split("."))[0]>0&&Q[0]<4?1:+(Q[0]+Q[1])),!G&&he&&(!(Q=he.match(/Edge\/(\d+)/))||Q[1]>=74)&&(Q=he.match(/Chrome\/(\d+)/))&&(G=+Q[1]);var we=G,Ae=f,Oe=O.String,Se=!!Object.getOwnPropertySymbols&&!Ae((function(){var e=Symbol("symbol detection");return!Oe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&we&&we<41})),Ce=Se&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pe=function(e,t){return arguments.length<2?fe(ue[e])||fe(de[e]):ue[e]&&ue[e][t]||de[e]&&de[e][t]},Ee=D,ke=w,xe=Object,Te=Ce?function(e){return"symbol"==typeof e}:function(e){var t=Pe("Symbol");return Ee(t)&&ke(t.prototype,xe(e))},je=String,_e=D,Re=function(e){try{return je(e)}catch(e){return"Object"}},Me=TypeError,Le=function(e){if(_e(e))return e;throw new Me(Re(e)+" is not a function")},Ie=Le,De=ee,Fe=U,Ne=D,We=ce,Be=TypeError,Ue={exports:{}},ze=O,$e=Object.defineProperty,qe=function(e,t){try{$e(ze,e,{value:t,configurable:!0,writable:!0})}catch(r){ze[e]=t}return t},Ve="__core-js_shared__",Qe=O[Ve]||qe(Ve,{});(Ue.exports=function(e,t){return Qe[e]||(Qe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ge=ne,He=Object,Je=function(e){return He(Ge(e))},Ke=b({}.hasOwnProperty),Xe=Object.hasOwn||function(e,t){return Ke(Je(e),t)},Ye=b,Ze=0,et=Math.random(),tt=Ye(1..toString),rt=O,nt=Ue.exports,ot=Xe,it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+tt(++Ze+et,36)},at=Se,st=Ce,ct=rt.Symbol,lt=nt("wks"),ut=st?ct.for||ct:ct&&ct.withoutSetter||it,dt=function(e){return ot(lt,e)||(lt[e]=at&&ot(ct,e)?ct[e]:ut("Symbol."+e)),lt[e]},pt=U,ft=ce,gt=Te,ht=function(e,t){var r=e[t];return De(r)?void 0:Ie(r)},vt=function(e,t){var r,n;if("string"===t&&Ne(r=e.toString)&&!We(n=Fe(r,e)))return n;if(Ne(r=e.valueOf)&&!We(n=Fe(r,e)))return n;if("string"!==t&&Ne(r=e.toString)&&!We(n=Fe(r,e)))return n;throw new Be("Can't convert object to primitive value")},mt=TypeError,yt=dt("toPrimitive"),bt=function(e,t){if(!ft(e)||gt(e))return e;var r,n=ht(e,yt);if(n){if(void 0===t&&(t="default"),r=pt(n,e,t),!ft(r)||gt(r))return r;throw new mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),vt(e,t)},wt=Te,At=function(e){var t=bt(e,"string");return wt(t)?t:t+""},Ot=ce,St=O.document,Ct=Ot(St)&&Ot(St.createElement),Pt=function(e){return Ct?St.createElement(e):{}},Et=!N&&!f((function(){return 7!==Object.defineProperty(Pt("div"),"a",{get:function(){return 7}}).a})),kt=N,xt=U,Tt=z,jt=H,_t=ae,Rt=At,Mt=Xe,Lt=Et,It=Object.getOwnPropertyDescriptor;F.f=kt?It:function(e,t){if(e=_t(e),t=Rt(t),Lt)try{return It(e,t)}catch(e){}if(Mt(e,t))return jt(!xt(Tt.f,e,t),e[t])};var Dt=f,Ft=D,Nt=/#|\.prototype\./,Wt=function(e,t){var r=Ut[Bt(e)];return r===$t||r!==zt&&(Ft(t)?Dt(t):!!t)},Bt=Wt.normalize=function(e){return String(e).replace(Nt,".").toLowerCase()},Ut=Wt.data={},zt=Wt.NATIVE="N",$t=Wt.POLYFILL="P",qt=Wt,Vt=Le,Qt=g,Gt=L(L.bind),Ht={},Jt=N&&f((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Kt=ce,Xt=String,Yt=TypeError,Zt=N,er=Et,tr=Jt,rr=function(e){if(Kt(e))return e;throw new Yt(Xt(e)+" is not an object")},nr=At,or=TypeError,ir=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,sr="enumerable",cr="configurable",lr="writable";Ht.f=Zt?tr?function(e,t,r){if(rr(e),t=nr(t),rr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&lr in r&&!r.writable){var n=ar(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:cr in r?r.configurable:n.configurable,enumerable:sr in r?r.enumerable:n.enumerable,writable:!1})}return ir(e,t,r)}:ir:function(e,t,r){if(rr(e),t=nr(t),rr(r),er)try{return ir(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new or("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var ur=Ht,dr=H,pr=N?function(e,t,r){return ur.f(e,t,dr(1,r))}:function(e,t,r){return e[t]=r,e},fr=O,gr=k,hr=L,vr=D,mr=F.f,yr=qt,br=le,wr=function(e,t){return Vt(e),void 0===t?e:Qt?Gt(e,t):function(){return e.apply(t,arguments)}},Ar=pr,Or=Xe,Sr=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return gr(e,this,arguments)};return t.prototype=e.prototype,t},Cr=function(e,t){var r,n,o,i,a,s,c,l,u,d=e.target,p=e.global,f=e.stat,g=e.proto,h=p?fr:f?fr[d]:(fr[d]||{}).prototype,v=p?br:br[d]||Ar(br,d,{})[d],m=v.prototype;for(i in t)n=!(r=yr(p?i:d+(f?".":"#")+i,e.forced))&&h&&Or(h,i),s=v[i],n&&(c=e.dontCallGetSet?(u=mr(h,i))&&u.value:h[i]),a=n&&c?c:t[i],n&&typeof s==typeof a||(l=e.bind&&n?wr(a,fr):e.wrap&&n?Sr(a):g&&vr(a)?hr(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Ar(l,"sham",!0),Ar(v,i,l),g&&(Or(br,o=d+"Prototype")||Ar(br,o,{}),Ar(br[o],i,a),e.real&&m&&(r||!m[i])&&Ar(m,i,a)))},Pr=Math.ceil,Er=Math.floor,kr=Math.trunc||function(e){var t=+e;return(t>0?Er:Pr)(t)},xr=kr,Tr=function(e){var t=+e;return t!=t||0===t?0:xr(t)},jr=Tr,_r=Math.max,Rr=Math.min,Mr=Tr,Lr=Math.min,Ir=function(e){return e>0?Lr(Mr(e),9007199254740991):0},Dr=ae,Fr=function(e,t){var r=jr(e);return r<0?_r(r+t,0):Rr(r,t)},Nr=function(e){return Ir(e.length)},Wr=function(e){return function(t,r,n){var o,i=Dr(t),a=Nr(i),s=Fr(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},Br={includes:Wr(!0),indexOf:Wr(!1)}.includes,Ur=function(){};Cr({target:"Array",proto:!0,forced:f((function(){return!Array(1).includes()}))},{includes:function(e){return Br(this,e,arguments.length>1?arguments[1]:void 0)}}),Ur();var zr=O,$r=le,qr=function(e,t){var r=$r[e+"Prototype"],n=r&&r[t];if(n)return n;var o=zr[e],i=o&&o.prototype;return i&&i[t]},Vr=qr("Array","includes"),Qr=ce,Gr=_,Hr=dt("match"),Jr=function(e){var t;return Qr(e)&&(void 0!==(t=e[Hr])?!!t:"RegExp"===Gr(e))},Kr=TypeError,Xr={};Xr[dt("toStringTag")]="z";var Yr="[object z]"===String(Xr),Zr=D,en=_,tn=dt("toStringTag"),rn=Object,nn="Arguments"===en(function(){return arguments}()),on=Yr?en:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=rn(e),tn))?r:nn?en(t):"Object"===(n=en(t))&&Zr(t.callee)?"Arguments":n},an=on,sn=String,cn=dt("match"),ln=Cr,un=function(e){if(Jr(e))throw new Kr("The method doesn't accept regular expressions");return e},dn=ne,pn=function(e){if("Symbol"===an(e))throw new TypeError("Cannot convert a Symbol value to a string");return sn(e)},fn=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[cn]=!1,"/./"[e](t)}catch(e){}}return!1},gn=b("".indexOf);ln({target:"String",proto:!0,forced:!fn("includes")},{includes:function(e){return!!~gn(pn(dn(this)),pn(un(e)),arguments.length>1?arguments[1]:void 0)}});var hn=qr("String","includes"),vn=w,mn=Vr,yn=hn,bn=Array.prototype,wn=String.prototype,An=function(e){var t=e.includes;return e===bn||vn(bn,e)&&t===bn.includes?mn:"string"==typeof e||e===wn||vn(wn,e)&&t===wn.includes?yn:t};const On="rpr_storage_available_check",Sn="rpr_storage_expiration",Cn={get(e){return this.isAvailable?(this._isExpired&&this.removeReproEntries(),localStorage.getItem(e)):null},set(e,t){let{expires:r=730}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.isAvailable)return;this._isExpired&&this.removeReproEntries(),localStorage.setItem(e,t);const n=new Date;localStorage.setItem(Sn,(n.getTime()+1e3*r*60*60*24).toString())},remove:e=>localStorage.removeItem(e),removeReproEntries(){const e=Object.keys(localStorage).filter((e=>e.match(/^rpr_/)));e.forEach((e=>localStorage.removeItem(e)))},get _isExpired(){const e=localStorage.getItem(Sn);if(!e)return!1;const t=(new Date).getTime();return parseInt(e,10)<=t},get isAvailable(){try{return localStorage.setItem(On,"test"),"test"===localStorage.getItem(On)&&(localStorage.removeItem(On),!0)}catch(e){return e instanceof DOMException&&("SecurityError"===e.name||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)||console.error(e),!1}}},Pn={INFO:"info",WARN:"warn",ERROR:"error",NONE:"none",DEFAULT:"default",DEBUG:"debug"},En="rpr_log_level",kn=e=>{var t,r;const n=Cn.get(En);if(!n)return!0;switch(n){case Pn.INFO:return An(t=["error","warn","info"]).call(t,e);case Pn.WARN:return An(r=["error","warn"]).call(r,e);case Pn.ERROR:return"error"===e;case Pn.NONE:return!1;default:return!0}},xn={log(){kn("log")&&window.console.log(...arguments)},info(){kn(Pn.INFO)&&window.console.info(...arguments)},warn(){kn(Pn.WARN)&&window.console.warn(...arguments)},error(){kn(Pn.ERROR)&&window.console.error(...arguments)},memorizeLogLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pn.DEFAULT;if(t=e,!An(r=Object.values(Pn)).call(r,t))return Cn.set(En,Pn.DEFAULT),xn.error(`"${e}" is not a valid log level value. Log level has been set to "default".`);var t,r;Cn.set(En,e)}},Tn=401,jn="https://production-dual-proxy.reproio.com/";var _n={environment:"production",token:"YOUR_APP_TOKEN",dualProxyBaseURL:jn,boosterConfigApiURL:"https://booster.reproio.com/api/config",rollbarToken:"7bb05c0dbfc84205be2884fa9434dfdc"},Rn={exports:{}};Rn.exports=Dn,Rn.exports.isMobile=Dn,Rn.exports.default=Dn;const Mn=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,Ln=/CrOS/,In=/android|ipad|playbook|silk/i;function Dn(e){e||(e={});let t=e.ua;if(t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let r=Mn.test(t)&&!Ln.test(t)||!!e.tablet&&In.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(r=!0),r}var Fn=Rn.exports;const Nn=(e,t)=>{const r=e.match(t);return null==r?void 0:r[1]},Wn=e=>{const t=e??("undefined"!=typeof navigator?navigator.userAgent:"");if(!t)return{name:void 0,version:void 0,osFamily:void 0,osVersion:void 0};let r,n;if(/EdgiOS\//i.test(t))r="Microsoft Edge",n=Nn(t,/EdgiOS\/([\d.]+)/i);else if(/EdgA\//i.test(t))r="Microsoft Edge",n=Nn(t,/EdgA\/([\d.]+)/i);else if(/Edg\//i.test(t))r="Microsoft Edge",n=Nn(t,/Edg\/([\d.]+)/i);else if(/Edge\//i.test(t))r="Microsoft Edge",n=Nn(t,/Edge\/([\d.]+)/i);else if(/FxiOS\//i.test(t))r="Firefox for iOS",n=Nn(t,/FxiOS\/([\d.]+)/i);else if(/Firefox/i.test(t)&&/Android/i.test(t))r="Firefox Mobile",n=Nn(t,/Firefox\/([\d.]+)/i);else if(/Firefox/i.test(t))r="Firefox",n=Nn(t,/Firefox\/([\d.]+)/i);else if(/CriOS\//i.test(t))r="Chrome Mobile",n=Nn(t,/CriOS\/([\d.]+)/i);else if(/Android/i.test(t)&&/AppleWebKit/i.test(t)&&/Version\//i.test(t)&&!/Chrome/i.test(t))r="Android Browser",n=Nn(t,/Version\/([\d.]+)/i);else if(/Chrome/i.test(t)&&(/Android/i.test(t)||/Mobile/i.test(t)))r="Chrome Mobile",n=Nn(t,/Chrome\/([\d.]+)/i);else if(/Chrome/i.test(t))r="Chrome",n=Nn(t,/Chrome\/([\d.]+)/i);else if(/Safari/i.test(t)&&/AppleWebKit/i.test(t))r="Safari",n=Nn(t,/Version\/([\d.]+)/i);else if(/AppleWebKit/i.test(t)&&/(iPhone|iPad|iPod)/i.test(t)&&/Mobile/i.test(t)){if(r="Safari",n=Nn(t,/Version\/([\d.]+)/i),!n){var o;const e=t.match(/(?:iPhone OS|CPU OS|CPU iPhone OS) (\d+[_.\d]*)/i);n=null==e||null===(o=e[1])||void 0===o?void 0:o.replace(/_/g,".")}}else/Trident/i.test(t)?(r="IE",n=Nn(t,/rv:([\d.]+)/i)):/MSIE/i.test(t)&&(r="IE",n=Nn(t,/MSIE ([\d.]+)/i));const i=(e=>/iPhone OS|iPad.*CPU OS|iPod.*CPU iPhone OS/i.test(e)?"iOS":/Android/i.test(e)?"Android":/Macintosh.*Mac OS X/i.test(e)?"OS X":/Windows/i.test(e)?"Windows":/Linux/i.test(e)?"Linux":void 0)(t),a=((e,t)=>{switch(t){case"iOS":{var r;const t=e.match(/(?:iPhone OS|CPU OS|CPU iPhone OS) (\d+[_.\d]*)/i);return null==t||null===(r=t[1])||void 0===r?void 0:r.replace(/_/g,".")}case"Android":return Nn(e,/Android ([\d.]+)/);case"OS X":{var n;const t=e.match(/Mac OS X (\d+[_.\d]*)/);return null==t||null===(n=t[1])||void 0===n?void 0:n.replace(/_/g,".")}default:return}})(t,i);return{name:r,version:n,osFamily:i,osVersion:a}},Bn=/Chrome\/(\d+)/,Un=/safari\//i,zn=/WebView/,$n=/(iPhone|iPod|iPad)(?!.*Safari)/i,qn=/Android.*\bwv[);]|Android [45]\..*(wv|Chrome\/\d{2}\.0\.0\.0)/i,Vn=/Linux; U; Android/i,Qn=/BookoffApp/i,Gn=/(Edg\/|EdgA\/|EdgiOS\/)/,Hn={isSupported(e){let{name:t,version:r,osFamily:n,osVersion:o,userAgent:i}=e;if(null==t||null==r)return!1;switch(t){case"Chrome":case"Chrome Mobile":return this.evaluateChrome({version:r});case"Safari":return this.evaluateSafari({version:r,osFamily:n,osVersion:o});case"Firefox":case"Firefox Mobile":case"Firefox for iOS":return this.evaluateFirefox({version:r});case"Microsoft Edge":return this.evaluateEdge({version:r});case"Android Browser":return this.evaluateAndroidBrowser({userAgent:i});default:return!1}},isMobile:e=>Fn({ua:e??navigator.userAgent,tablet:!0}),isWebView(e){let{name:t,userAgent:r}=e;switch(t){case"Android Browser":return!0;case"Safari":return null===r.match(Un)||null!==r.match(Qn);default:return zn.test(r)||$n.test(r)||qn.test(r)||Vn.test(r)||Qn.test(r)}},isBoosterSupportedUA(e){let{name:t,userAgent:r}=e;switch(t){case"Chrome":case"Chrome Mobile":case"Safari":return!0;case"Microsoft Edge":return Gn.test(r);case"Firefox":case"IE":default:return!1;case"Android Browser":return this.evaluateAndroidBrowser({userAgent:r})}},isSafari(e){let{name:t}=e;return"Safari"===t},isPushNotificationSupported(e){let{name:t,userAgent:r}=e;const n=("Chrome"===t||"Chrome Mobile"===t)&&Gn.test(r);return"serviceWorker"in navigator&&"getRegistrations"in navigator.serviceWorker&&"showNotification"in ServiceWorkerRegistration.prototype&&"undefined"!=typeof PushSubscriptionOptions&&PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey")&&("Chrome"===t||"Chrome Mobile"===t||"Safari"===t)&&!n},isServiceWorkerUnstable(){let{name:e,osFamily:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wn();return"Safari"===e||"iOS"===t},evaluateChrome(e){let{version:t}=e;return parseFloat(t)>=39},evaluateSafari(e){let{version:t,osFamily:r,osVersion:n}=e;switch(r){case"OS X":return parseFloat(t)>=11;case"iOS":return null!=n&&parseFloat(n)>=9;default:return!1}},evaluateFirefox(e){let{version:t}=e;return parseFloat(t)>=60},evaluateEdge(e){let{version:t}=e;return parseFloat(t)>=18},evaluateAndroidBrowser(e){let{userAgent:t}=e;const r=t.match(Bn);return null!=r&&parseFloat(r[1])>=39}};function Jn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kn(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Jn(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const Xn={other:36e5,document:864e5,image:864e5},Yn=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","yclid","fbclid","msclkid","srsltid","gbraid","wbraid","gad_source","ttclid","twclid"],Zn={appId:0,userAnnotation:"",idfv:"",isFirstSession:!1,token:""},eo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Kn({available:!1,cacheConfig:Xn,serviceWorkerUrl:"site-sw.js",serviceWorkerScope:"/",unregisterOnStop:!0,configApiRequestParameters:Zn,controlGroupRate:0,allowWebview:!1,ga4MeasurementId:"",ga4MeasurementIdForClient:"",ga4SiteSpeedSampleRate:0,gaStatsEventSampleRate:100,gaMetricEventSampleRate:100,pageScript:"",proxyConfig:{imageProxy:{active:!1,filters:{includes:[],excludes:[]},hosts:[],timeout:0,optimization:{formatConversion:!1}},dualProxy:{active:!1,prefetch:!0,loadingSpinner:"lb1",hiddenCssSelector:"",displayNoneCssSelector:"",trackingParamsToStrip:Yn,ignoreOriginClientError:!1,ignoreOriginServerError:!1,ignoreInternalError:!0,originTimeout:6e4,cache_ttl:0,scriptPreload:!1,scriptPreloadPriority:"",beforeMergeScript:"",afterMergeScript:"",prependStyle:"",disableBfcache:!1,disableAcceptLanguage:!1,resolveLazyLoad:!1,useSliderFix:!1,cachePurgeList:"",adaptiveCachePurge:!1}},cacheRevision:0,trackingOptimizer:!1,collectCookieKeys:!1,prefetchConfig:{available:!1,mouseoverTimeout:500,viewportStayTimeThreshold:500,viewportRootMargins:["0px"],filters:{includes:[],excludes:[]},prioritizedExclusionFilters:[],prerender:!1}},e)},to=e=>Hn.isMobile()?e.mobile:e.desktop,ro={desktop:eo(),mobile:eo()},no=Kn(Kn({},to(ro)),{},{configApiRequestParameters:Zn}),oo=function(){var e,t,r,n,o,i,a,s,c,l,u,d,p,f,g,h,v,m,y,b,w,A,O,S,C,P,E,k,x,T,j,_,R,M,L,I,D,F,N,W,B,U,z,$,q,V,Q,G,H,J,K,X,Y,Z,ee,te,re,ne,oe,ie,ae,se,ce,le,ue,de,pe,fe,ge,he,ve,me,ye;let be=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const we=(null==be||null===(e=be.prefetchConfig)||void 0===e||null===(t=e.viewportRootMargins)||void 0===t||null===(r=t.filter)||void 0===r?void 0:r.call(t,(e=>null!=e)))??[];return{available:null!=be.available?be.available:no.available,cacheConfig:{document:be.cacheConfig&&null!=be.cacheConfig.document?be.cacheConfig.document:no.cacheConfig.document,image:be.cacheConfig&&null!=be.cacheConfig.image?be.cacheConfig.image:no.cacheConfig.image,other:(null===(n=be.cacheConfig)||void 0===n?void 0:n.other)??no.cacheConfig.other},controlGroupRate:be.controlGroupRate??no.controlGroupRate,ga4MeasurementId:be.ga4MeasurementId??no.ga4MeasurementId,ga4MeasurementIdForClient:be.ga4MeasurementIdForClient??no.ga4MeasurementIdForClient,ga4SiteSpeedSampleRate:be.ga4SiteSpeedSampleRate??no.ga4SiteSpeedSampleRate,serviceWorkerUrl:be.serviceWorkerUrl||no.serviceWorkerUrl,serviceWorkerScope:be.serviceWorkerScope||no.serviceWorkerScope,unregisterOnStop:be.unregisterOnStop??no.unregisterOnStop,allowWebview:be.allowWebview??no.allowWebview,proxyConfig:{imageProxy:{active:(null==be||null===(o=be.proxyConfig)||void 0===o||null===(i=o.imageProxy)||void 0===i?void 0:i.active)||!1,hosts:(null==be||null===(a=be.proxyConfig)||void 0===a||null===(s=a.imageProxy)||void 0===s?void 0:s.hosts)??[],filters:(null===(c=be.proxyConfig)||void 0===c||null===(l=c.imageProxy)||void 0===l?void 0:l.filters)??no.proxyConfig.imageProxy.filters,timeout:(null===(u=be.proxyConfig)||void 0===u||null===(d=u.imageProxy)||void 0===d?void 0:d.timeout)??no.proxyConfig.imageProxy.timeout,optimization:{formatConversion:(null===(p=be.proxyConfig)||void 0===p||null===(f=p.imageProxy)||void 0===f||null===(g=f.optimization)||void 0===g?void 0:g.formatConversion)??no.proxyConfig.imageProxy.optimization.formatConversion}},dualProxy:{active:!(null==be||null===(h=be.proxyConfig)||void 0===h||null===(v=h.dualProxy)||void 0===v||!v.active),prefetch:(null==be||null===(m=be.proxyConfig)||void 0===m||null===(y=m.dualProxy)||void 0===y?void 0:y.prefetch)??!0,loadingSpinner:(null==be||null===(b=be.proxyConfig)||void 0===b||null===(w=b.dualProxy)||void 0===w?void 0:w.loadingSpinner)??"lb1",hiddenCssSelector:(null==be||null===(A=be.proxyConfig)||void 0===A||null===(O=A.dualProxy)||void 0===O?void 0:O.hiddenCssSelector)??"",displayNoneCssSelector:(null==be||null===(S=be.proxyConfig)||void 0===S||null===(C=S.dualProxy)||void 0===C?void 0:C.displayNoneCssSelector)??"",trackingParamsToStrip:null!=be&&null!==(P=be.proxyConfig)&&void 0!==P&&null!==(E=P.dualProxy)&&void 0!==E&&null!==(k=E.trackingParamsToStrip)&&void 0!==k&&k.length?be.proxyConfig.dualProxy.trackingParamsToStrip:Yn,ignoreOriginClientError:!(null==be||null===(x=be.proxyConfig)||void 0===x||null===(T=x.dualProxy)||void 0===T||!T.ignoreOriginClientError),ignoreOriginServerError:!(null==be||null===(j=be.proxyConfig)||void 0===j||null===(_=j.dualProxy)||void 0===_||!_.ignoreOriginServerError),ignoreInternalError:(null==be||null===(R=be.proxyConfig)||void 0===R||null===(M=R.dualProxy)||void 0===M?void 0:M.ignoreInternalError)??!0,originTimeout:(null==be||null===(L=be.proxyConfig)||void 0===L||null===(I=L.dualProxy)||void 0===I?void 0:I.originTimeout)??6e4,cache_ttl:(null==be||null===(D=be.proxyConfig)||void 0===D||null===(F=D.dualProxy)||void 0===F?void 0:F.cache_ttl)??0,scriptPreload:(null==be||null===(N=be.proxyConfig)||void 0===N||null===(W=N.dualProxy)||void 0===W?void 0:W.scriptPreload)??!1,scriptPreloadPriority:(null==be||null===(B=be.proxyConfig)||void 0===B||null===(U=B.dualProxy)||void 0===U?void 0:U.scriptPreloadPriority)??"",beforeMergeScript:(null==be||null===(z=be.proxyConfig)||void 0===z||null===($=z.dualProxy)||void 0===$?void 0:$.beforeMergeScript)??"",afterMergeScript:(null==be||null===(q=be.proxyConfig)||void 0===q||null===(V=q.dualProxy)||void 0===V?void 0:V.afterMergeScript)??"",prependStyle:(null==be||null===(Q=be.proxyConfig)||void 0===Q||null===(G=Q.dualProxy)||void 0===G?void 0:G.prependStyle)??"",proxyBaseURLOverride:null==be||null===(H=be.proxyConfig)||void 0===H||null===(J=H.dualProxy)||void 0===J?void 0:J.proxyBaseURLOverride,disableBfcache:(null==be||null===(K=be.proxyConfig)||void 0===K||null===(X=K.dualProxy)||void 0===X?void 0:X.disableBfcache)??!1,disableAcceptLanguage:(null==be||null===(Y=be.proxyConfig)||void 0===Y||null===(Z=Y.dualProxy)||void 0===Z?void 0:Z.disableAcceptLanguage)??!1,resolveLazyLoad:(null==be||null===(ee=be.proxyConfig)||void 0===ee||null===(te=ee.dualProxy)||void 0===te?void 0:te.resolveLazyLoad)??!1,useSliderFix:(null==be||null===(re=be.proxyConfig)||void 0===re||null===(ne=re.dualProxy)||void 0===ne?void 0:ne.useSliderFix)??!1,cachePurgeList:(null==be||null===(oe=be.proxyConfig)||void 0===oe||null===(ie=oe.dualProxy)||void 0===ie?void 0:ie.cachePurgeList)??"",adaptiveCachePurge:(null==be||null===(ae=be.proxyConfig)||void 0===ae||null===(se=ae.dualProxy)||void 0===se?void 0:se.adaptiveCachePurge)??!1}},prefetchConfig:{available:(null===(ce=be.prefetchConfig)||void 0===ce?void 0:ce.available)??no.prefetchConfig.available,mouseoverTimeout:(null===(le=be.prefetchConfig)||void 0===le?void 0:le.mouseoverTimeout)??no.prefetchConfig.mouseoverTimeout,viewportStayTimeThreshold:(null===(ue=be.prefetchConfig)||void 0===ue?void 0:ue.viewportStayTimeThreshold)??no.prefetchConfig.viewportStayTimeThreshold,viewportRootMargins:we.length?we:no.prefetchConfig.viewportRootMargins,filters:(null===(de=be.prefetchConfig)||void 0===de?void 0:de.filters)??no.prefetchConfig.filters,prioritizedExclusionFilters:(null===(pe=be.prefetchConfig)||void 0===pe?void 0:pe.prioritizedExclusionFilters)??no.prefetchConfig.prioritizedExclusionFilters,prerender:(null===(fe=be.prefetchConfig)||void 0===fe?void 0:fe.prerender)??!1},configApiRequestParameters:{appId:(null===(ge=be.configApiRequestParameters)||void 0===ge?void 0:ge.appId)??Zn.appId,userAnnotation:(null===(he=be.configApiRequestParameters)||void 0===he?void 0:he.userAnnotation)??Zn.userAnnotation,idfv:(null===(ve=be.configApiRequestParameters)||void 0===ve?void 0:ve.idfv)??Zn.idfv,isFirstSession:(null===(me=be.configApiRequestParameters)||void 0===me?void 0:me.isFirstSession)??Zn.isFirstSession,token:(null===(ye=be.configApiRequestParameters)||void 0===ye?void 0:ye.token)??Zn.token},cacheRevision:be.cacheRevision??no.cacheRevision,pageScript:(null==be?void 0:be.pageScript)??"",ignoreFastPass:be.ignoreFastPass,trackingOptimizer:be.trackingOptimizer??no.trackingOptimizer,collectCookieKeys:be.collectCookieKeys??no.collectCookieKeys,gaStatsEventSampleRate:be.gaStatsEventSampleRate??no.gaStatsEventSampleRate,gaMetricEventSampleRate:be.gaMetricEventSampleRate??no.gaMetricEventSampleRate,testName:be.testName??void 0,variants:be.variants}};function io(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ao(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?io(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const so=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!navigator.onLine)return Promise.reject(new Error("Aborting configuration API call due to browser being offline."));const r=new URL(_n.boosterConfigApiURL);r.searchParams.set("token",e);const n=await fetch(r.toString(),ao(ao({priority:"low"},t),{},{method:"GET"}));if(n.status===Tn)throw new Error("Configuration API call failed due to authentication error. Check your token.");if(!n.ok)throw new Error(`Configuration API call failed with status ${n.status}.`);const o=await n.json();if("object"!=typeof o)throw new Error(`Invalid config response: ${o}`);if("error"in o)throw new Error(`Error from configration API: ${o.error}`);return o},co=(e,t)=>ao(ao({},e),{},{configApiRequestParameters:{token:t,appId:0,userAnnotation:"",idfv:"",isFirstSession:!1}}),lo=window.requestIdleCallback||(e=>{const t=Date.now();return setTimeout((()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})}),1)}),uo="3.2.17";function po(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fo(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?po(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):po(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const go=e=>{let{worker:t,type:r,payload:n,onReply:o=(()=>{})}=e;const i=new MessageChannel;i.port1.addEventListener("message",(e=>{if(!e.data)return;const{data:t}=e;o(t)})),i.port1.start(),t.postMessage(fo(fo({},n),{},{clientInfo:{url:self.location.href},type:r}),[i.port2])};class ho{constructor(){e(this,"currentTrafficReport",0),window.addEventListener("pageshow",(e=>{e.persisted&&this.resetReportCount()}))}isSendable(){return this.currentTrafficReport<ho.TRAFFIC_REPORT_LIMIT}increaseReportCount(){this.currentTrafficReport+=1}resetReportCount(){this.currentTrafficReport=0}}e(ho,"TRAFFIC_REPORT_LIMIT",30);let vo;const mo=(e,t,r)=>{let n=r??e.length-1;const o=e[n];for(;n>=0;){const r=n-1>>1;if(!((e[r]?t(e[r],o):0)<0))return n;{const t=e[r];e[r]=o,o.location._loc=r,e[n]=t,t.location._loc=n}n=r}return 0},yo=(e,t,r)=>{let n=r??0;const o=e[n];for(;n<e.length;){const r=1+(n<<1),i=2+(n<<1);let a=r;const s=e[r]?t(e[r],o)||-(o.pushOrder-e[r].pushOrder):0,c=e[i]?t(e[i],o)||-(o.pushOrder-e[i].pushOrder):0,l=e[r]&&e[i]?t(e[r],e[i])||e[i].pushOrder<e[r].pushOrder:!!e[r];if(s>0&&l)a=r;else{if(!(c>0))return n;a=i}const u=e[a];e[a]=o,o.location._loc=a,e[n]=u,u.location._loc=n,n=a}return e.length-1};vo=Symbol.iterator;class bo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(e,t)=>e.priority-t.priority;e(this,"comparator",void 0),e(this,"order",0),e(this,"tree",[]),this.comparator=t}clone(){const e=new bo(this.comparator);return e.tree=this.tree.slice(),e.order=this.order,e}push(e){let{value:t,priority:r}=e;const n={value:t,priority:r,pushOrder:this.order++,location:{_loc:this.tree.length,id:Date.now()}};return this.tree.push(n),1===this.tree.length?this.tree[0].location:(mo(this.tree,this.comparator),n.location)}update(e){var t;let{value:r,index:n}=e;if((null===(t=this.tree[n._loc])||void 0===t?void 0:t.location)!==n)throw new Error("Invalid index");this.tree[n._loc].value=r}fromIndex(e){var t;if((null===(t=this.tree[e._loc])||void 0===t?void 0:t.location)===e)return this.tree[e._loc]}pop(){var e;if(this.tree.length<=1)return null===(e=this.tree.pop())||void 0===e?void 0:e.value;const t=this.tree[0],r=this.tree.pop();return r&&this.tree.length&&(this.tree[0]=r,r.location._loc=0,this.tree.length>1&&yo(this.tree,this.comparator)),null==t?void 0:t.value}peek(){return this.tree[0]?this.tree[0].value:void 0}remove(e){var t;const{_loc:r}=e;var n;if(this.tree.length>1)if(r<this.tree.length-1){this.tree[r]=this.tree.pop(),this.tree[r].location._loc=r;const e=this.tree[r];yo(this.tree,this.comparator,r),e===this.tree[r]&&mo(this.tree,this.comparator,r)}else e===(null===(n=this.tree[this.tree.length-1])||void 0===n?void 0:n.location)&&this.tree.pop();else e===(null===(t=this.tree[0])||void 0===t?void 0:t.location)&&this.tree.pop()}get length(){return this.tree.length}set length(e){this.tree.length=e}empty(){this.tree.length=0}*[vo](){for(const e of this.tree)yield e}toArray(){return this.tree.slice().map((e=>e.value))}}class wo extends bo{}const Ao=(e,t)=>{try{const r=new URL(e,t);return"http:"===r.protocol||"https:"===r.protocol?r:null}catch(e){return null}},Oo=e=>{if("A"!==e.tagName)return null;const t=e.getAttribute("href");return!t||t.startsWith("#")?null:Ao(e.href)},So=(e,t)=>{let r=e.target;for(;r;){const e=Oo(r);if(e)return t({element:r,url:e});r=r.parentElement}};class Co{get size(){return this.map.size}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e(this,"map",new Map);for(const[e,r]of t)for(const t of r)this.set(e,t)}set(e,t){let r=this.map.get(e);r||(r=[],this.map.set(e,r)),r.push(t)}delete(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;const r=this.map.get(e);if(r){const n=r.filter(((e,r)=>!t(e,r)));n.length?this.map.set(e,n):this.map.delete(e)}}get(e){return this.map.get(e)}has(e){var t;return((null===(t=this.map.get(e))||void 0===t?void 0:t.length)??0)>0}entries(){return this.map.entries()}}var Po={};(function(e){e.BloomFilter=r;const t="undefined"!=typeof ArrayBuffer;function r(e,r){let n;"number"!=typeof e&&(n=e,e=32*n.length);const o=Math.ceil(e/32);if(e=32*o,this.m=e,this.k=r,t){const t=1<<Math.ceil(Math.log2(Math.ceil(Math.log2(e)/8))),i=1===t?Uint8Array:2===t?Uint16Array:Uint32Array,a=new ArrayBuffer(t*r),s=new Int32Array(o);if(n)for(let e=0;e<o;++e)s[e]=n[e];this.buckets=s,this._locations=new i(a)}else{const e=[];if(n)for(let t=0;t<o;++t)e[t]=n[t];else for(let t=0;t<o;++t)e[t]=0;this.buckets=e,this._locations=[]}}function n(e){return 16843009*((e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135)>>24}r.prototype.locations=function(e){const t=this.k,r=this.m,n=this._locations;let o,i;{const t=435,r=e.length;let n=0,a=0,s=0,c=0,l=8997,u=33826,d=40164,p=52210;for(let o=0;o<r;++o)l^=e.charCodeAt(o),n=l*t,a=u*t,s=d*t,c=p*t,s+=l<<8,c+=u<<8,a+=n>>>16,l=65535&n,s+=a>>>16,u=65535&a,p=c+(s>>>16)&65535,d=65535&s;o=p<<16|d,i=u<<16|l}o%=r,o<0&&(o+=r),i%=r,i<0&&(i+=r),n[0]=o;for(let e=1;e<t;++e)o=(o+i)%r,i=(i+e)%r,n[e]=o;return n},r.prototype.add=function(e){const t=this.locations(e+""),r=this.k,n=this.buckets;for(let e=0;e<r;++e)n[t[e]>>5]|=1<<(31&t[e])},r.prototype.test=function(e){const t=this.locations(e+""),r=this.k,n=this.buckets;for(let e=0;e<r;++e){const r=t[e];if(0==(n[r>>5]&1<<(31&r)))return!1}return!0},r.prototype.size=function(){return-this.m*Math.log(1-this.countBits()/this.m)/this.k},r.prototype.countBits=function(){const e=this.buckets;let t=0;for(let r=0;r<e.length;++r)t+=n(e[r]);return t},r.prototype.error=function(){return Math.pow(this.countBits()/this.m,this.k)},r.union=function(e,n){if(e.m===n.m&&e.k===n.k){const o=e.m>>5,i=t?new Int32Array(o):new Array(o);for(let t=0;t<o;++t)i[t]=e.buckets[t]|n.buckets[t];return new r(i,e.k)}throw new Error("Bloom filters must have identical {m, k}.")},r.intersection=function(e,n){if(e.m===n.m&&e.k===n.k){const o=e.m>>5,i=t?new Int32Array(o):new Array(o);for(let t=0;t<o;++t)i[t]=e.buckets[t]&n.buckets[t];return new r(i,e.k)}throw new Error("Bloom filters must have identical {m, k}.")},r.withTargetError=function(e,t){const n=Math.ceil(-e*Math.log2(t)/Math.LN2);return new r(n,Math.ceil(Math.LN2*n/e))}})(Po);const Eo="rpr_prc_sw_scope",ko="rpr_prc_group",xo="booster_config_variant",To=/\.(jpe?g|png|gif|pdf|avif|webp|js|css|json|xml)($|\?)/i,jo=["preview"],_o=["preview","force-skip-dual"];class Ro{static create(e){if(!this.instances[e]){const t=new Ro;this.instances[e]=t}return this.instances[e]}static setLogLevel(e,t){Ro.create(e).setLogLevel(t)}constructor(){e(this,"logLevel",Pn.NONE)}log(){this.canOutputLog("log")&&self.console.log(...arguments)}info(){this.canOutputLog(Pn.INFO)&&self.console.info(...arguments)}warn(){this.canOutputLog(Pn.WARN)&&self.console.warn(...arguments)}error(){this.canOutputLog(Pn.ERROR)&&self.console.error(...arguments)}debug(){this.canOutputLog(Pn.DEBUG)&&self.console.debug(...arguments)}setLogLevel(e){this.logLevel=e}canOutputLog(e){var t,r;switch(this.logLevel){case Pn.INFO:return An(t=["error","warn","info"]).call(t,e);case Pn.WARN:return An(r=["error","warn"]).call(r,e);case Pn.ERROR:return"error"===e;case Pn.NONE:return!1;case Pn.DEFAULT:return e!==Pn.DEBUG;default:return!0}}}function Mo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lo(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Mo(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e(Ro,"instances",{});const Io=Ro.create("dual-request");function Do(e,t){try{const r=new URL(e);return t.forEach((e=>{r.searchParams.delete(e)})),r.toString()}catch(t){return Io.warn("Failed to parse URL",{url:e,error:t}),e}}let Fo=null,No=null;const Wo=(e,t)=>{var r,n,o;const i=e.cacheRevision||0;if(!(e.proxyConfig.dualProxy.adaptiveCachePurge||null!==(r=e.proxyConfig.dualProxy.loadingSpinner)&&void 0!==r&&An(r).call(r,"adaptive-cache-purge-on")))return i;let a=null;{const{cachePurgeList:t}=e.proxyConfig.dualProxy;if(!t||""===t.trim())return i;if(Fo&&No===t)a=Fo;else try{const e=JSON.parse(t);let r;if("serializeFormat"in e&&"v2-bloomfilter-0.0"===e.serializeFormat){const t=function(e){const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)r[e]=t.charCodeAt(e);return r.buffer}(e.buckets);r=new Int32Array(t)}else r=e.buckets;a=new Po.BloomFilter(r,e.hashFunctions),Fo=a||null,No=t}catch(e){return Io.error("Error processing Bloom Filter for adaptive cache purge",e),i}}if(null===(n=a)||void 0===n||null===(o=n.buckets)||void 0===o||!o.length)return i;let s=0,c=i,l=`${c}:${t}`;for(;a.test(l)&&s<100;)s+=1,c=Number(`${i}.${s}`),l=`${c}:${t}`;return s>=100?(Io.warn("Reached maximum revision attempts for adaptive cache purge, using fallback",{originalRevision:i,maxAttempts:100,originUrl:t}),i):(Io.debug("Adjusted revision for adaptive cache purge",{originalRevision:i,adjustedRevision:c,originUrl:t}),c)},Bo={},Uo=/$./,zo=e=>{const t=Bo[e];if(t)return t;try{const t=new RegExp(e,"i");return Bo[e]=t,t}catch(t){return console.error(`Invalid regex pattern provided: "${e}". Using never-match pattern instead.`),Bo[e]=Uo,Uo}},$o=e=>("string"==typeof e||e instanceof String)&&""!==e.trim(),qo=/[{(`]/,Vo=e=>{const t=(e=>{try{return decodeURIComponent(e)}catch(t){return e}})(e);return e=>{switch(e.type){case"url":return $o(e.value)&&zo(e.value).test(t);case"dom":if(e.selector){const t=document.querySelector(e.selector);return!(!t||!t.textContent)&&zo(e.value).test(t.textContent)}return!1;case"expr":if(!$o(e.value)||!$o(e.expr))return!1;try{if(qo.test(e.expr))return!1;const t=Function(`for (${e.expr} in {});try {return ${e.expr}.toString()} catch(e) {return ""}`)();return zo(e.value).test(t)}catch(e){return!1}default:return!1}}},Qo=e=>{if(e instanceof URL)return e;try{return new URL(e)}catch{return null}},Go=e=>{var t;let{resourceUrl:r,filters:n,prioritizedExclusionFilters:o,element:i,type:a}=e;return!!An(t=["js","css","font"]).call(t,a)||!(e=>{const t=Qo(e);return null!==t&&_o.some((e=>t.searchParams.has(e)))})(r)&&(!(e=>{const t=Qo(e);return null!==t&&jo.some((e=>t.searchParams.has(e)))})(globalThis.location.href)&&(!!(e=>{const t=e;if("function"==typeof t.checkVisibility)try{return t.checkVisibility({opacityProperty:!0,visibilityProperty:!0})}catch{}const r=globalThis.getComputedStyle(e);return"none"!==r.display&&"hidden"!==r.visibility&&"0"!==r.opacity&&e.offsetWidth>0&&e.offsetHeight>0})(i)&&(!o.some((e=>(e=>{let{element:t,filter:r}=e;return"dom"===r.type&&!(!r.selector||!t.matches(r.selector))&&(!r.text||zo(r.text).test(t.textContent??""))})({filter:e,element:i})))&&(e=>{var t,r;let{url:n,filters:o,shouldCheckOnlyUrl:i}=e;const a=Vo(n);let s=!0;return s=!(null===(t=An(o))||void 0===t||!t.length)&&An(o).filter((e=>!i||"url"===e.type)).some(a),s&&(!(null!==(r=o.excludes)&&void 0!==r&&r.length)||o.excludes.filter((e=>!i||"url"===e.type)).every((e=>!a(e))))})({url:r,filters:n,shouldCheckOnlyUrl:!0}))))};function Ho(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const Jo=new Set,Ko=(t,r,n,o)=>{if(Jo.has(r))return;Jo.add(r);return function(e,t){var r,n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{supportedImageFormats:i=[],proxyQueryParams:a,userAgent:s,prerender:c}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=null==e||null===(r=e.proxyConfig)||void 0===r?void 0:r.dualProxy;if(!l||!l.active)return;if(t.startsWith(jn))return;if(To.test(t))return;const u=new URL("/v1/r",l.proxyBaseURLOverride??jn),d=u.searchParams;let p=t;l.trackingParamsToStrip&&l.trackingParamsToStrip.length>0&&(p=Do(p,l.trackingParamsToStrip)),p=p.replace(/#.*/,""),d.set("uri",p),d.set("r",Wo(e,p).toString()),d.set("ir",(e.cacheRevision||0).toString()),d.set("dlp","3"),d.set("st","t"),d.set("tk",e.configApiRequestParameters.token);const f=s??navigator.userAgent,g=Wn(f);d.set("d",Hn.isMobile(f)?"m":"d"),"Safari"===g.name&&(d.set("car","f"),l.disableBfcache&&d.set("knc","t")),i.length&&e.proxyConfig.imageProxy.active&&d.set("rio",i[1]||i[0]),c&&d.set("pr","t"),Hn.isServiceWorkerUnstable(g)&&d.set("dpc","t"),l.hiddenCssSelector&&d.set("hs",e.proxyConfig.dualProxy.hiddenCssSelector),l.displayNoneCssSelector&&d.set("dns",e.proxyConfig.dualProxy.displayNoneCssSelector),l.loadingSpinner&&d.set("ls",e.proxyConfig.dualProxy.loadingSpinner),l.cache_ttl&&d.set("ttl",e.proxyConfig.dualProxy.cache_ttl.toString());try{const e=new URL(p);"qvc.jp"!==e.hostname&&"www.qvc.jp"!==e.hostname||"/"!==e.pathname||d.set("ttl","600"),"shopping.jreast.co.jp"===e.hostname&&/^(\/$|\/ranking(\/cate\d+\/)?$|\/prd\/(cid\d+\/(detail\d+\/(detail\d+-\d+\/(detail\d+-\d+\/)?)?)?)?$|\/shop(\/s\d+\/(cat|gen)\/\d+)?$|\/auctions\/(detail\d+\/(detail\d+-\d+\/(detail\d+-\d+\/)?)?)?$)/.test(e.pathname)&&d.set("ttl","3600")}catch{}if(null!==(n=l.loadingSpinner)&&void 0!==n&&An(n).call(n,"experimental-speculative-early-exec")&&d.set("see","t"),l.beforeMergeScript&&d.set("bms","t"),l.prependStyle&&d.set("ps","t"),l.resolveLazyLoad&&d.set("rl","t"),l.useSliderFix&&d.set("sl","t"),l.scriptPreload){var h,v,m;const t=null===(h=e.proxyConfig)||void 0===h||null===(v=h.dualProxy)||void 0===v?void 0:v.scriptPreloadPriority;d.set("sp",An(m=["auto","low","high"]).call(m,t)?t:"t")}a&&Object.keys(a).length&&d.set("aq",JSON.stringify(a));const y=Lo({mode:"cors",redirect:"error"},o);null!=l&&l.disableAcceptLanguage&&(y.headers=Lo(Lo({},o.headers||{}),{},{"Accept-Language":"*"}));const b=fetch(u.toString(),y);return b.catch((()=>{})),b}(t,r,n,function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ho(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ho(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({proxyQueryParams:u.getOnlyInmemoryValue()},o))},Xo=(e,t)=>{var r,n,o,i;return"document"===t&&(null===(r=e.proxyConfig)||void 0===r||null===(n=r.dualProxy)||void 0===n?void 0:n.active)&&(null===(o=e.proxyConfig)||void 0===o||null===(i=o.dualProxy)||void 0===i?void 0:i.prefetch)},Yo=[],Zo=e=>{const t=Yo.findIndex((t=>t.dataset.url===e));if(-1!==t){const[e]=Yo.splice(t,1);return void Yo.push(e)}if(Yo.length>=8){const e=Yo.shift();null==e||e.remove()}const r=document.createElement("script");r.type="speculationrules",r.text=JSON.stringify({prerender:[{source:"list",urls:[e]}]}),r.dataset.url=e,document.body.appendChild(r),Yo.push(r)},ei=e=>{let{prefetchingResource:t,queue:r,config:n,onQueue:o,priority:i,supportedImageFormats:a}=e;const[s,c]=t,l=Ao(s),[u,d,p,f]=c;var g,h;l&&function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"document";return("document"!==n||e.origin===self.origin)&&Go({element:t,resourceUrl:e.href,prioritizedExclusionFilters:r.prefetchConfig.prioritizedExclusionFilters,filters:r.prefetchConfig.filters,type:n})}(l,u,n)&&(Xo(n,d)?n.prefetchConfig.prerender&&null!==(g=(h=HTMLScriptElement).supports)&&void 0!==g&&g.call(h,"speculationrules")?Zo(l.href):Ko(n,l.href,{priority:"low"},{supportedImageFormats:a}):r.push({value:{url:l.href,type:d,prefetchType:f},priority:i??Date.now()}));o()},ti=e=>"A"===e.nodeName,ri=e=>{let{config:t,queue:r,onQueue:n,supportedImageFormats:o}=e;const i=[],a=new Co;let s=!0;const c=()=>{(e=>{let{prefetchingResources:t,queue:r,timeout:n=0,config:o,onQueue:i,priority:a,supportedImageFormats:s}=e;const c=t instanceof Co?t:new Co([t]);let l=1/0;const u=Date.now();for(const[e,t]of c.entries()){const[,i,,f]=t[0],g=Ao(e),h=g&&("document"!==i||g.origin===self.origin)&&t.some((t=>{let[r,a,s]=t;const u=Date.now()-s,d=u>=n;d||(l=Math.min(n-u,l));const p=g&&d&&Go({element:r,resourceUrl:g.href,prioritizedExclusionFilters:o.prefetchConfig.prioritizedExclusionFilters,filters:o.prefetchConfig.filters,type:i});return p&&c.delete(e,(e=>{let[t]=e;return t===r})),p}));var d,p;h&&(Xo(o,i)?o.prefetchConfig.prerender&&null!==(d=(p=HTMLScriptElement).supports)&&void 0!==d&&d.call(p,"speculationrules")?Zo(g.href):Ko(o,g.href,{priority:"low"},{supportedImageFormats:s}):r.push({value:{url:g.href,type:i,prefetchType:f},priority:a??u}))}i(l)})({prefetchingResources:a,config:t,queue:r,timeout:t.prefetchConfig.viewportStayTimeThreshold,supportedImageFormats:o,onQueue:e=>{n(),s=!isFinite(e),s||setTimeout(c,e)}})};t.prefetchConfig.viewportRootMargins.forEach((e=>{const t=new IntersectionObserver((e=>{e.forEach((e=>{const t=e.target,r=(o="intersection_observer",ti(n=t)&&Ao(n.href,self.origin)?[n.href,[n,"document",Date.now(),o]]:(e=>"IMG"===e.nodeName)(n)&&Ao(n.src,self.origin)?[n.src,[n,"image",Date.now(),o]]:null);var n,o;e.isIntersecting?r&&a.set(r[0],r[1]):r&&a.delete(r[0],(e=>{let[r]=e;return r===t}))})),s&&c()}),{rootMargin:e});i.push(t)})),document.documentElement.addEventListener("touchstart",(e=>{So(e,(e=>{let{element:i,url:a}=e;ei({prefetchingResource:[a.href,[i,"document",Date.now(),"touchstart"]],config:t,queue:r,supportedImageFormats:o,onQueue:n})}))}),{capture:!0,passive:!0});const l=new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{ti(e)?Oo(e)&&i.forEach((t=>t.observe(e))):e instanceof HTMLElement&&e.querySelectorAll("a").forEach((e=>{Oo(e)&&i.forEach((t=>t.observe(e)))}))}))}))}));let u=!1;const d=()=>{u||(u=!0,lo((()=>{document.querySelectorAll("a").forEach((e=>{Oo(e)&&i.forEach((t=>t.observe(e)))})),l.observe(document.body,{childList:!0,subtree:!0})})))};document.addEventListener("scroll",d,{once:!0,passive:!0}),setTimeout(d,5e3)};class ni{constructor(t){e(this,"config",void 0),this.config=t}start(e){var t,r,n,o;let{queue:i,onQueue:a,supportedImageFormats:s}=e;(null===(t=this.config.proxyConfig)||void 0===t||null===(r=t.dualProxy)||void 0===r||!r.active||null!==(n=this.config.proxyConfig)&&void 0!==n&&null!==(o=n.dualProxy)&&void 0!==o&&o.prefetch)&&(Fn({ua:navigator.userAgent,tablet:!0})?ri({queue:i,onQueue:a,config:this.config,supportedImageFormats:s}):(e=>{let{queue:t,onQueue:r,config:n,supportedImageFormats:o}=e;document.documentElement.addEventListener("mouseout",(e=>{So(e,(e=>{let{element:t}=e;t._prefetched||clearTimeout(t._timer)}))}),{capture:!0,passive:!0}),document.documentElement.addEventListener("mousedown",(e=>{So(e,(e=>{let{element:t}=e;clearTimeout(t._timer)}))}),{capture:!0,passive:!0}),document.documentElement.addEventListener("mouseover",(e=>{So(e,(e=>{let{element:i,url:a}=e;i._prefetched=!1,i._timer=window.setTimeout((()=>{i._prefetched=!0,ei({prefetchingResource:[a.href,[i,"document",Date.now(),"mouseover"]],config:n,queue:t,supportedImageFormats:o,onQueue:r}),r()}),n.prefetchConfig.mouseoverTimeout)}))}),{capture:!0,passive:!0})})({queue:i,onQueue:a,config:this.config,supportedImageFormats:s}))}}var oi={exports:{}};(function(e,t){var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function n(){return"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random())}function o(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,s=t.timeout||r.timeout,c=t.jsonpCallback||r.jsonpCallback,l=void 0;return new Promise((function(r,u){var d=t.jsonpCallbackFunction||n(),p=c+"_"+d;window[d]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(p),o(d)},a+=-1===a.indexOf("?")?"?":"&";var f=document.createElement("script");f.setAttribute("src",""+a+c+"="+d),t.charset&&f.setAttribute("charset",t.charset),t.nonce&&f.setAttribute("nonce",t.nonce),t.referrerPolicy&&f.setAttribute("referrerPolicy",t.referrerPolicy),f.id=p,document.getElementsByTagName("head")[0].appendChild(f),l=setTimeout((function(){u(new Error("JSONP request to "+e+" timed out")),o(d),i(p),window[d]=function(){o(d)}}),s),f.onerror=function(){u(new Error("JSONP request to "+e+" failed")),o(d),i(p),l&&clearTimeout(l)}}))}t.exports=a})(0,oi);const ii=self.fetch?self.fetch:function(e,t){return t=t||{},new Promise((function(r,n){var o=new XMLHttpRequest,i=[],a=[],s={},c=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:c,headers:{keys:function(){return i},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,r){i.push(t=t.toLowerCase()),a.push([t,r]),s[t]=s[t]?s[t]+","+r:r})),r(c())},o.onerror=n,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(l,t.headers[l]);o.send(t.body||null)}))};function ai(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function si(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ai(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ci,li;!function(e){let t;!function(e){e[e.BeforeInitialized=0]="BeforeInitialized",e[e.Enabled=1]="Enabled",e[e.Disabled=2]="Disabled"}(t||(t={}));const{environment:r,rollbarToken:n}=_n;let o,i,a,s,c=t.BeforeInitialized,l=[],u=null;e.setContext=e=>{u=e},e.clearContext=()=>{u=null};const d=(e,t)=>{if(t instanceof Error){const e={};return Object.getOwnPropertyNames(t).forEach((r=>{e[r]=t[r]})),e}return t};e.notify=e=>{let{error:p,extraPayload:f,rollbarOptions:g={},samplingRatio:h,referrer:v}=e;if(!navigator.onLine)return;if(c===t.BeforeInitialized)return void l.push({error:p,extraPayload:f,rollbarOptions:g,samplingRatio:h,referrer:v});if(c===t.Disabled)return;if(null!=h&&1!==((e,t)=>{const r=Math.ceil(e),n=Math.floor(t);return Math.floor(Math.random()*(n-r))+r})(1,h))return;let m="",y="",b={};if(p instanceof Error){const e=p.stack;void 0!==e&&(b=e.split("\n").reduce(((e,t,r)=>(e[`stacktrace_${String.fromCharCode(65+r)}`]=t,e)),{})),m=p.message,y=p.name}else{if("string"!=typeof p)return;m=p}null!=u&&(m=`[${u}] ${m}`);let w={environment:r,language:"javascript",code_version:uo,body:{message:{body:m,name:y,stacktrace:b,appId:a,idfv:o,isFirstSession:s,referrer:v,url:self.location.href,userAgent:self.navigator.userAgent,userAnnotation:i,extraPayload:f}}};Object.keys(g).length&&(w=si(si({},w),g)),null!=h&&(w.body.message.useSampling=!0,w.body.message.samplingRatio=h),ii("https://api.rollbar.com/api/1/item/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:n,data:w},d),mode:"cors"})},e.init=(r,n)=>{if(!r)return c=t.Disabled,void(l=[]);c=t.Enabled,l.forEach((t=>{e.notify(t)})),n&&(o=n.idfv,i=n.userAnnotation,a=n.appId,s=n.isFirstSession)}}(ci||(ci={})),function(e){e.init=ci.init,e.setContext=ci.setContext,e.clearContext=ci.clearContext,e.notify=e=>{let{error:t,extraPayload:r,rollbarOptions:n={},samplingRatio:o}=e;ci.notify({error:t,extraPayload:r,rollbarOptions:n,samplingRatio:o,referrer:document.referrer})}}(li||(li={}));const ui=async e=>(await navigator.serviceWorker.getRegistrations()).find((t=>new URL(t.scope).pathname===e)),di=(()=>{const e=async e=>{return t=e,new Promise(((e,r)=>{const n=new Image;n.onload=e,n.onerror=r,n.src=t})).then((()=>!0),(()=>!1));var t},t=e=>void 0!==e;return()=>Promise.all([e("data:image/webp;base64,UklGRkAAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAIAAAAAAFZQOCAYAAAAMAEAnQEqAQABAAIANCWkAANwAP77/VAA").then((e=>e?"webp":void 0)),e("data:image/avif;base64,AAAAHGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZgAAAPBtZXRhAAAAAAAAAChoZGxyAAAAAAAAAABwaWN0AAAAAAAAAAAAAAAAbGliYXZpZgAAAAAOcGl0bQAAAAAAAQAAAB5pbG9jAAAAAEQAAAEAAQAAAAEAAAEUAAAAFQAAAChpaW5mAAAAAAABAAAAGmluZmUCAAAAAAEAAGF2MDFDb2xvcgAAAABoaXBycAAAAElpcGNvAAAAFGlzcGUAAAAAAAAAAQAAAAEAAAAOcGl4aQAAAAABCAAAAAxhdjFDgQAcAAAAABNjb2xybmNseAABAAEAAQAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB1tZGF0EgAKBxgADlgICAkyCB/xgAAghQm0").then((e=>e?"avif":void 0))]).then((e=>e.filter(t)))})(),pi=Wn(navigator.userAgent),fi=Hn.isWebView({name:pi.name,userAgent:navigator.userAgent});class gi{constructor(){e(this,"updateUserAnnotationHandler",void 0),e(this,"statisticsHandler",void 0),e(this,"memoryCachesHandler",void 0),e(this,"_isRegistered",!1),e(this,"queue",new wo)}static async kill(e,t){if(!gi.isSupported())return;const r=Cn.get(Eo)??t;return r?new Promise((t=>{ui(r).then((async r=>{r&&(await(e=>{let{registration:t}=e;return new Promise((e=>{if(!t.active)return e(void 0);go({worker:t.active,type:"repro-precacher-stop",payload:{},onReply:e})}))})({registration:r}),e&&r.unregister()),t()}))})):void 0}static async version(e){if(!gi.isSupported())return;const t=Cn.get(Eo)??e;return t?new Promise((e=>{ui(t).then((t=>{t?(e=>{let{registration:t}=e;return new Promise((e=>{t.active&&go({worker:t.active,type:"repro-precacher-version",payload:{},onReply:t=>e(t.version)})}))})({registration:t}).then(e):e(void 0)}))})):void 0}static async setWorkerLogLevel(e,t,r){if(!gi.isSupported())return;const n=Cn.get(Eo)??r;return n?new Promise((r=>{ui(n).then((async n=>{n&&await((e,t,r)=>new Promise((n=>{e.active&&go({worker:e.active,type:"repro-precacher-set-log-level",payload:{name:t,level:r},onReply:n})})))(n,e,t),r()}))})):void 0}static async setProxyQueryParams(e,t){if(!gi.isSupported())return;const r=t??Cn.get(Eo);return r?new Promise((t=>{ui(r).then((async r=>{r&&await(e=>{let{registration:t,params:r}=e;return new Promise((e=>{t.active&&go({worker:t.active,type:"repro-precacher-set-proxy-query-params",payload:{params:r},onReply:e})}))})({registration:r,params:e}),t()}))})):void 0}updateUserAnnotation(e){this.updateUserAnnotationHandler&&this.updateUserAnnotationHandler(e)}async getMemoryCaches(){var e;return null===(e=this.memoryCachesHandler)||void 0===e?void 0:e.call(this)}async getStatistics(){var e;return null===(e=this.statisticsHandler)||void 0===e?void 0:e.call(this)}get isRegistered(){return this._isRegistered}async register(e,t){let{onSendCacheStatsReport:r}=t;if(!gi.isSupported()||!gi.isWebviewAllowedOrNotNeeded(e))return void xn.info("repro-precacher: unsupported browsers");const n=Cn.get(Eo);if(n){const t=await ui(n);t&&n!==e.serviceWorkerScope&&await t.unregister()}await navigator.serviceWorker.register(`/${e.serviceWorkerUrl}`,{scope:e.serviceWorkerScope,updateViaCache:"imports"}).catch((e=>{xn.log("ServiceWorker registration failed: ",e)}));return(async(e,t)=>{const r=Date.now(),n=async(o,i)=>{const a=await ui(e);null!=a&&a.active?o(a):Date.now()-r>t?i():setTimeout((e=>n(o,i)),100)};return new Promise(n)})(e.serviceWorkerScope,3e4).then((async t=>{Cn.set(Eo,e.serviceWorkerScope);const{init:n,collectStatsReport:o,updateUserAnnotation:i,healthcheck:a,memoryCaches:s,cacheStatistics:c}=(e=>{let{config:t,registration:r}=e;const n=new ho,o={init:async e=>{const n={config:t,version:uo,supportedImageFormats:e};return new Promise(((e,t)=>{r.active&&go({worker:r.active,type:"repro-precacher-init",payload:n,onReply:r=>{"VERSION_MISMATCHED"===r.type?t(r):e(r)}})}))},updateUserAnnotation:e=>new Promise((n=>{r.active&&go({worker:r.active,type:"repro-precacher-update-user-annotation",payload:{userAnnotation:e,config:t},onReply:()=>{n()}})})),healthcheck:()=>{r.active&&r.active.addEventListener("message",(e=>{e.data&&"IS_ALIVE"===e.data.type&&e.ports[0].postMessage({type:"ALIVING"})}))},collectStatsReport:async()=>new Promise((e=>{if(!n.isSendable())return e(null);r.active&&go({worker:r.active,type:"repro-precacher-stats-report",payload:{},onReply:t=>{n.increaseReportCount(),e(t)}})})),memoryCaches:async()=>new Promise((e=>{r.active&&go({worker:r.active,type:"repro-precacher-memory-caches",payload:{config:t},onReply:t=>{e(t)}})})),cacheStatistics:async()=>new Promise((e=>{r.active&&go({worker:r.active,type:"repro-precacher-cache-statistics",payload:{config:t},onReply:t=>{e(t)}})}))};return o})({config:e,registration:t});this.updateUserAnnotationHandler=i,this.memoryCachesHandler=s,this.statisticsHandler=c,a();const l=await di();try{await n(l)}catch(r){if("VERSION_MISMATCHED"===r.type)return void await this.handleVersionMismatch({config:e,registration:t,exception:r,swVersion:r.fromVersion,sdkVersion:r.toVersion})}new ni(e).start({queue:this.queue,onQueue:()=>{},supportedImageFormats:l});let u=!1;const d=()=>{lo((async()=>{u=!0;const e=await o();e?(r(e),setTimeout(d,1e4)):u=!1}))};d(),window.addEventListener("pageshow",(e=>{e.persisted&&!u&&d()})),this._isRegistered=!0}),(()=>{xn.log("ServiceWorker registration succeeded but it never became active")}))}static isSupported(){return"caches"in window&&"serviceWorker"in navigator&&"getRegistrations"in navigator.serviceWorker&&"IntersectionObserver"in window&&"fromEntries"in Object&&"function"==typeof Promise.any&&Hn.isBoosterSupportedUA({name:pi.name,userAgent:navigator.userAgent})}static isWebviewAllowedOrNotNeeded(e){return e.allowWebview||!fi}async handleVersionMismatch(e){var t,r;let{config:n,registration:o,exception:i,swVersion:a,sdkVersion:s}=e;xn.warn(`rpr precacher version mismatch (SW: ${a}, SDK: ${s}). Will try to update`),li.notify({error:"Precacher Version Mismatched",extraPayload:{version:{from:a,to:s,sw:a,sdk:s},url:n.serviceWorkerUrl,scope:n.serviceWorkerScope,controller:{scriptURL:null==o||null===(t=o.active)||void 0===t?void 0:t.scriptURL,state:null==o||null===(r=o.active)||void 0===r?void 0:r.state},ready:{active:o.active,installing:o.installing,scope:o.scope,waiting:o.waiting},navigator:{userAgent:navigator.userAgent},browserInfo:pi,exception:i,config:n},rollbarOptions:{level:"info"},samplingRatio:1e4}),await o.update(),await(e=>{let{registration:t}=e;return new Promise((e=>{t.active&&go({worker:t.active,type:"repro-precacher-update-worker",payload:{version:uo},onReply:e})}))})({registration:o})}}class hi{constructor(){e(this,"t",void 0),e(this,"o",0),e(this,"i",[])}u(e){var t;if(e.hadRecentInput)return;const r=this.i[0],n=this.i.at(-1);this.o&&r&&n&&e.startTime-n.startTime<1e3&&e.startTime-r.startTime<5e3?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),null===(t=this.t)||void 0===t||t.call(this,e)}}const vi=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},mi=e=>{if("loading"===document.readyState)return"loading";{const t=vi();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}}return"complete"},yi=e=>{const t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},bi=e=>{let t="";try{for(;9!==(null===(r=e)||void 0===r?void 0:r.nodeType);){var r;const n=e,o=n.id?"#"+n.id:[yi(n),...Array.from(n.classList).sort()].join(".");if(t.length+o.length>99)return t||o;if(t=t?o+">"+t:o,n.id)break;e=n.parentNode}}catch{}return t},wi=new WeakMap;function Ai(e,t){return wi.get(e)||wi.set(e,new t),wi.get(e)}let Oi=-1;const Si=()=>Oi,Ci=e=>{addEventListener("pageshow",(t=>{t.persisted&&(Oi=t.timeStamp,e(t))}),!0)},Pi=(e,t,r,n)=>{let o,i;return a=>{t.value>=0&&(a||n)&&(i=t.value-(o??0),(i||void 0===o)&&(o=t.value,t.delta=i,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t)))}},Ei=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},ki=()=>{const e=vi();return(null==e?void 0:e.activationStart)??0},xi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const r=vi();let n="navigate";return Si()>=0?n="back-forward-cache":r&&(document.prerendering||ki()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},Ti=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var n;if(An(n=PerformanceObserver.supportedEntryTypes).call(n,e)){const n=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return n.observe({type:e,buffered:!0,...r}),n}}catch{}},ji=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let _i=-1;const Ri=new Set,Mi=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Li=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of Ri)e();isFinite(_i)||(_i="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Li,!0))}},Ii=()=>{if(_i<0){var e;const t=ki(),r=document.prerendering||null===(e=globalThis.performance.getEntriesByType("visibility-state").filter((e=>"hidden"===e.name&&e.startTime>t))[0])||void 0===e?void 0:e.startTime;_i=r??Mi(),addEventListener("visibilitychange",Li,!0),addEventListener("prerenderingchange",Li,!0),Ci((()=>{setTimeout((()=>{_i=Mi()}))}))}return{get firstHiddenTime(){return _i},onHidden(e){Ri.add(e)}}},Di=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Fi=[1800,3e3],Ni=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Di((()=>{const r=Ii();let n,o=xi("FCP");const i=Ti("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime<r.firstHiddenTime&&(o.value=Math.max(t.startTime-ki(),0),o.entries.push(t),n(!0)))}));i&&(n=Pi(e,o,Fi,t.reportAllChanges),Ci((r=>{o=xi("FCP"),n=Pi(e,o,Fi,t.reportAllChanges),Ei((()=>{o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Wi=[.1,.25],Bi=e=>e.find((e=>{var t;return 1===(null===(t=e.node)||void 0===t?void 0:t.nodeType)}))||e[0];let Ui=0,zi=1/0,$i=0;const qi=e=>{for(const t of e)t.interactionId&&(zi=Math.min(zi,t.interactionId),$i=Math.max($i,t.interactionId),Ui=$i?($i-zi)/7+1:0)};let Vi;const Qi=()=>Vi?Ui:performance.interactionCount??0,Gi=()=>{"interactionCount"in performance||Vi||(Vi=Ti("event",qi,{type:"event",buffered:!0,durationThreshold:0}))};let Hi=0;class Ji{constructor(){e(this,"l",[]),e(this,"h",new Map),e(this,"m",void 0),e(this,"p",void 0)}v(){Hi=Qi(),this.l.length=0,this.h.clear()}M(){const e=Math.min(this.l.length-1,Math.floor((Qi()-Hi)/50));return this.l[e]}u(e){var t;if(null!==(t=this.m)&&void 0!==t&&t.call(this,e),!e.interactionId&&"first-input"!==e.entryType)return;const r=this.l.at(-1);let n=this.h.get(e.interactionId);if(n||this.l.length<10||e.duration>r.T){var o;if(n?e.duration>n.T?(n.entries=[e],n.T=e.duration):e.duration===n.T&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],T:e.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort(((e,t)=>t.T-e.T)),this.l.length>10){const e=this.l.splice(10);for(const t of e)this.h.delete(t.id)}null===(o=this.p)||void 0===o||o.call(this,n)}}}const Ki=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=ji(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},Xi=[200,500];class Yi{constructor(){e(this,"m",void 0)}u(e){var t;null===(t=this.m)||void 0===t||t.call(this,e)}}const Zi=[2500,4e3],ea=[800,1800],ta=e=>{document.prerendering?Di((()=>ta(e))):"complete"!==document.readyState?addEventListener("load",(()=>ta(e)),!0):setTimeout(e)};var ra={exports:{}};
/*!
   * JavaScript Cookie v2.2.0
   * https://github.com/js-cookie/js-cookie
   *
   * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
   * Released under the MIT license
   */!function(e,t){var r;r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}return function t(r){function n(t,o,i){var a;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},n.defaults,i)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():"";try{a=JSON.stringify(o),/^[\{\[]/.test(a)&&(o=a)}catch(e){}o=r.write?r.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var c="";for(var l in i)i[l]&&(c+="; "+l,!0!==i[l]&&(c+="="+i[l]));return document.cookie=t+"="+o+c}t||(a={});for(var u=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,p=0;p<u.length;p++){var f=u[p].split("="),g=f.slice(1).join("=");this.json||'"'!==g.charAt(0)||(g=g.slice(1,-1));try{var h=f[0].replace(d,decodeURIComponent);if(g=r.read?r.read(g,h):r(g,h)||g.replace(d,decodeURIComponent),this.json)try{g=JSON.parse(g)}catch(e){}if(t===h){a=g;break}t||(a[h]=g)}catch(e){}}return a}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,r){n(t,"",e(r,{expires:-1}))},n.withConverter=t,n}((function(){}))},e.exports=r()}(ra);var na=ra.exports;class oa extends Error{constructor(){super(...arguments),Error.captureStackTrace&&Error.captureStackTrace(this,oa)}}const ia=(()=>{let e=0,t=window.location.hostname;const r=t.split("."),n=`___${(new Date).getTime()}`;for(;e<r.length-1&&-1===document.cookie.indexOf(`${n}=${n}`);)t=r.slice(-1-++e).join("."),document.cookie=`${n}=${n};domain=${t};`;return document.cookie=`${n}=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=${t};`,t})();function aa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sa(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?aa(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aa(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const ca="rpr_cookie_available_check",la={sameSite:"lax"},ua={get:e=>na.get(e),getJSON:e=>na.getJSON(e),set:(e,t,r)=>{na.set(e,t,sa(sa({},la),r)),na.remove(e,sa(sa({},la),{},{domain:ia})),na.get(e)!==("string"==typeof t?t:JSON.stringify(t))&&xn.error(new oa("Cookie is not available"))},remove:(e,t)=>{na.remove(e,sa(sa({},la),t)),na.remove(e,sa(sa({},la),{},{domain:ia}))},removeReproEntries:e=>{const t=Object.keys(na.get()).filter((e=>e.match(/^rpr_/)));t.forEach((t=>ua.remove(t,e)))},get isAvailable(){return na.set(ca,"test",sa({},la)),"test"===na.get(ca)?(na.remove(ca,sa({},la)),!0):(na.remove(ca,sa({},la)),!1)}},da={get:function(e){let{asJSON:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=t?ua.getJSON(e):ua.get(e);if(null!=r)return r;const n=Cn.get(e);if(!t)return n;if(!n)return{};try{return JSON.parse(n)}catch(e){return console.warn(e),{}}},set:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ua.set(e,t,r);const n="object"==typeof t?JSON.stringify(t):t,o=r.expires?{expires:r.expires}:{};Cn.set(e,n,o)},remove:(e,t)=>{ua.remove(e,t),Cn.remove(e)},removeReproEntries:e=>{ua.removeReproEntries(e),Cn.removeReproEntries()},get isAvailable(){return ua.isAvailable&&Cn.isAvailable}},pa=()=>{const e=da.get(xo,{asJSON:!0});if((e=>{if(null==e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.testName&&""!==t.testName&&"string"==typeof t.variantName&&""!==t.variantName})(e))return e},fa=()=>{da.remove(xo),d.delete()},ga=(e,t)=>{da.set(xo,{testName:e.testName,variantName:e.variantName},{expires:t}),d.put(e)},ha=(e,t,r)=>{const{testName:n,variants:o}=e;if(t||!n||!o||0===o.length)return void fa();const i=pa();if(i&&i.testName===n){const e=o.find((e=>e.name===i.variantName));if(e){const t={testName:n,variantName:e.name,configOverride:e.configOverride};return ga(t,r),t}}const a=(e=>{const t=e.reduce(((e,t)=>e+t.weight),0);if(t<=0)return e[e.length-1];const r=Math.random()*t;let n=0;return e.find((e=>(n+=e.weight,r<n)))??e[e.length-1]})(o);if(!a)return void fa();const s={testName:n,variantName:a.name,configOverride:a.configOverride};return ga(s,r),s},va=(e,t)=>{let r=1,n=e;for(;n=n.previousElementSibling;)n.nodeName.toLowerCase()===t&&++r;return r};function ma(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ya(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ma(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ma(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const ba=(e,t)=>{e&&"function"==typeof window.gtag&&gtag("event","repro_booster_update_up",{send_to:e,user_properties:{rpr_prc_group:t}})};function wa(e){let{assignment:t,ga4MeasurementId:r,ga4MeasurementIdForClient:n,configVariantValue:o,assignmentChanged:i}=e;if(!r)return;const a=()=>{var e;gtag("js",new Date);if(gtag("config",r,{send_page_view:!1,groups:"repro_booster",user_properties:{rpr_prc_group:t,booster_version:uo,config_variant:o}}),document.prerendering)document.addEventListener("prerenderingchange",(()=>{var e;gtag("event","page_view",{send_to:r,navigation_type:"prerender",activation_start:null===(e=performance.getEntriesByType("navigation")[0])||void 0===e?void 0:e.activationStart})}),{once:!0,passive:!0});else if(((null===(e=performance.getEntriesByType("navigation")[0])||void 0===e?void 0:e.activationStart)||0)>0){var a;gtag("event","page_view",{send_to:r,navigation_type:"prerender",activation_start:null===(a=performance.getEntriesByType("navigation")[0])||void 0===a?void 0:a.activationStart})}else gtag("event","page_view",ya({send_to:r},(()=>{var e,t,r;const n={};if("performance"in window==0)return n;if("function"==typeof(null===(e=performance)||void 0===e?void 0:e.getEntriesByType))performance.getEntriesByType("navigation").forEach((e=>{e.type&&(n.navigation_type=e.type)}));else if("number"==typeof(null===(t=performance)||void 0===t||null===(r=t.navigation)||void 0===r?void 0:r.type))switch(performance.navigation.type){case performance.navigation.TYPE_NAVIGATE:n.navigation_type="navigate";break;case performance.navigation.TYPE_RELOAD:n.navigation_type="reload";break;case performance.navigation.TYPE_BACK_FORWARD:n.navigation_type="back_forward";break;case performance.navigation.TYPE_RESERVED:n.navigation_type="reserved"}return n})()));window.addEventListener("pageshow",(e=>{e.persisted&&"function"==typeof window.gtag&&gtag("event","page_view",{send_to:r,navigation_type:"back_forward_cache"})}));const s=()=>{const e=(()=>{let e;if("performance"in window&&"getEntriesByType"in window.performance&&"PerformanceNavigationTiming"in window){const[t]=performance.getEntriesByType("navigation"),{domComplete:r}=t;e={domComplete:r}}return e})();e&&"function"==typeof window.gtag&&gtag("event","performance_metrics",ya(ya({},e),{},{non_interaction:!0,event_category:"booster",send_to:r}))};function c(e){let{name:t,delta:n,value:o,id:i,navigationType:a,attribution:s}=e;const c={};switch(t){case"LCP":{var l,u,d;c.url=null===(l=s.lcpEntry)||void 0===l?void 0:l.url,c.page_referrer=c.url;const e=performance.now(),t=null===(u=s.lcpEntry)||void 0===u||null===(d=u.element)||void 0===d?void 0:d.getBoundingClientRect();t&&(c.width=t.width,c.height=t.height),c.collectRectMs=performance.now()-e;break}case"CLS":{const e=new Map;if(s.largestShiftEntry){var p;const t=s.largestShiftEntry.startTime+s.largestShiftEntry.duration;null===(p=s.largestShiftEntry.sources)||void 0===p||p.forEach((r=>{let{node:n,currentRect:o,previousRect:i}=r;if(!n)return;(o.height!==i.height||o.width!==i.width)&&e.set((e=>{const t=[];let r=e;for(;r&&"HTML"!==r.nodeName;){let e=r.nodeName.toLowerCase();const n=va(r,e);n>1&&(e+=`:nth-of-type(${n})`),t.unshift(e),r=r.parentElement}return t.join(">")})(n),{width:o.width,height:o.height,windowWidth:window.innerWidth,windowHeight:window.innerHeight,endTime:t})})),c.layoutShifts=JSON.stringify(Array.from(e.entries()).map((e=>{let[t,r]=e;return ya({selector:t},r)})))}break}case"INP":if(s.longestScript){const{entry:e,subpart:t,intersectingDuration:r}=s.longestScript;c.longestScript_name=e.name,c.longestScript_sourceURL=e.sourceURL,c.longestScript_sourceFunctionName=e.sourceFunctionName,c.longestScript_sourceCharPosition=e.sourceCharPosition,c.longestScript_startTime=e.startTime,c.longestScript_duration=e.duration,c.longestScript_subpart=t,c.longestScript_intersectingDuration=r}}gtag("event",t,ya(ya({value:n,metric_id:i,metric_value:o,metric_delta:n,send_to:r,non_interaction:!0,navigation_type:a},(e=>{const t={};return Object.entries(e).forEach((e=>{let[r,n]=e;"object"==typeof n||Array.isArray(n)||"function"==typeof n||(t[r]=n)})),t})(s)),c))}"complete"===document.readyState?s():window.addEventListener("load",(()=>{s()}),{once:!0,passive:!0}),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Ai(t=Object.assign({},t),hi),n=new WeakMap;r.t=e=>{var r;if(null!=e&&null!==(r=e.sources)&&void 0!==r&&r.length){const r=Bi(e.sources),a=null==r?void 0:r.node;if(a){var o,i;const e=(null===(o=(i=t).generateTarget)||void 0===o?void 0:o.call(i,a))??bi(a);n.set(r,e)}}},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Ii();Ni(ji((()=>{let n,o=xi("CLS",0);const i=Ai(t,hi),a=e=>{for(const t of e)i.u(t);i.o>o.value&&(o.value=i.o,o.entries=i.i,n())},s=Ti("layout-shift",a);s&&(n=Pi(e,o,Wi,t.reportAllChanges),r.onHidden((()=>{a(s.takeRecords()),n(!0)})),Ci((()=>{i.o=0,o=xi("CLS",0),n=Pi(e,o,Wi,t.reportAllChanges),Ei((()=>n()))})),setTimeout(n))})))}((t=>{const r=(e=>{let t={};if(e.entries.length){var r;const o=e.entries.reduce(((e,t)=>e.value>t.value?e:t));if(null!=o&&null!==(r=o.sources)&&void 0!==r&&r.length){const e=Bi(o.sources);e&&(t={largestShiftTarget:n.get(e),largestShiftTime:o.startTime,largestShiftValue:o.value,largestShiftSource:e,largestShiftEntry:o,loadState:mi(o.startTime)})}}return Object.assign(e,{attribution:t})})(t);e(r)}),t)}(c),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Ai(t=Object.assign({},t),Yi),n=new WeakMap;r.m=e=>{const r=e.element;if(r){var o,i;const a=(null===(o=(i=t).generateTarget)||void 0===o?void 0:o.call(i,r))??bi(r);n.set(e,a)}},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Di((()=>{const r=Ii();let n,o=xi("LCP");const i=Ai(t,Yi),a=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)i.u(t),t.startTime<r.firstHiddenTime&&(o.value=Math.max(t.startTime-ki(),0),o.entries=[t],n())},s=Ti("largest-contentful-paint",a);if(s){n=Pi(e,o,Zi,t.reportAllChanges);const r=ji((()=>{a(s.takeRecords()),s.disconnect(),n(!0)})),i=e=>{e.isTrusted&&(Ki(r),removeEventListener(e.type,i,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,i,{capture:!0});Ci((r=>{o=xi("LCP"),n=Pi(e,o,Zi,t.reportAllChanges),Ei((()=>{o.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}((t=>{const r=(e=>{let t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){const r=vi();if(r){const o=r.activationStart||0,i=e.entries.at(-1),a=i.url&&performance.getEntriesByType("resource").filter((e=>e.name===i.url))[0],s=Math.max(0,r.responseStart-o),c=Math.max(s,a?(a.requestStart||a.startTime)-o:0),l=Math.min(e.value,Math.max(c,a?a.responseEnd-o:0));t={target:n.get(i),timeToFirstByte:s,resourceLoadDelay:c-s,resourceLoadDuration:l-c,elementRenderDelay:e.value-l,navigationEntry:r,lcpEntry:i},i.url&&(t.url=i.url),a&&(t.lcpResourceEntry=a)}}return Object.assign(e,{attribution:t})})(t);e(r)}),t)}(c),function(e){Ni((t=>{const r=(e=>{let t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:mi(Si())};if(e.entries.length){const r=vi(),n=e.entries.at(-1);if(r){const o=r.activationStart||0,i=Math.max(0,r.responseStart-o);t={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:mi(e.entries[0].startTime),navigationEntry:r,fcpEntry:n}}}return Object.assign(e,{attribution:t})})(t);e(r)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(c),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Ai(t=Object.assign({},t),Ji);let n=[],o=[],i=0;const a=new WeakMap,s=new WeakMap;let c=!1;const l=()=>{c||(Ki(u),c=!0)},u=()=>{const e=r.l.map((e=>a.get(e.entries[0]))),t=o.length-50;o=o.filter(((r,n)=>n>=t||An(e).call(e,r)));const s=new Set;for(const e of o){const t=d(e.startTime,e.processingEnd);for(const e of t)s.add(e)}const l=n.length-1-50;n=n.filter(((e,t)=>e.startTime>i&&t>l||s.has(e))),c=!1};r.m=e=>{const t=e.startTime+e.duration;let r;i=Math.max(i,e.processingEnd);for(let n=o.length-1;n>=0;n--){const i=o[n];if(Math.abs(t-i.renderTime)<=8){r=i,r.startTime=Math.min(e.startTime,r.startTime),r.processingStart=Math.min(e.processingStart,r.processingStart),r.processingEnd=Math.max(e.processingEnd,r.processingEnd),r.entries.push(e);break}}r||(r={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:t,entries:[e]},o.push(r)),(e.interactionId||"first-input"===e.entryType)&&a.set(e,r),l()},r.p=e=>{if(!s.get(e)){const o=e.entries[0].target;if(o){var r,n;const i=(null===(r=(n=t).generateTarget)||void 0===r?void 0:r.call(n,o))??bi(o);s.set(e,i)}}};const d=(e,t)=>{const r=[];for(const o of n)if(!(o.startTime+o.duration<e)){if(o.startTime>t)break;r.push(o)}return r},p=e=>{const t=e.entries[0],n=a.get(t),o=t.processingStart,i=Math.max(t.startTime+t.duration,o),c=Math.min(n.processingEnd,i),l=n.entries.sort(((e,t)=>e.processingStart-t.processingStart)),u=d(t.startTime,c),p=r.h.get(t.interactionId),f={interactionTarget:s.get(p),interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:i,processedEventEntries:l,longAnimationFrameEntries:u,inputDelay:o-t.startTime,processingDuration:c-o,presentationDelay:i-c,loadState:mi(t.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(e=>{var t;if(null===(t=e.longAnimationFrameEntries)||void 0===t||!t.length)return;const r=e.interactionTime,n=e.inputDelay,o=e.processingDuration;let i,a,s=0,c=0,l=0,u=0;for(const t of e.longAnimationFrameEntries){c=c+t.startTime+t.duration-t.styleAndLayoutStart;for(const e of t.scripts){const t=e.startTime+e.duration;if(t<r)continue;const l=t-Math.max(r,e.startTime),d=e.duration?l/e.duration*e.forcedStyleAndLayoutDuration:0;s+=l-d,c+=d,l>u&&(a=e.startTime<r+n?"input-delay":e.startTime>=r+n+o?"presentation-delay":"processing-duration",i=e,u=l)}}const d=e.longAnimationFrameEntries.at(-1),p=d?d.startTime+d.duration:0;p>=r+n+o&&(l=e.nextPaintTime-p),i&&a&&(e.longestScript={entry:i,subpart:a,intersectingDuration:u}),e.totalScriptDuration=s,e.totalStyleAndLayoutDuration=c,e.totalPaintDuration=l,e.totalUnattributedDuration=e.nextPaintTime-r-s-c-l})(f),Object.assign(e,{attribution:f})};Ti("long-animation-frame",(e=>{n=n.concat(e),l()})),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const r=Ii();Di((()=>{Gi();let n,o=xi("INP");const i=Ai(t,Ji),a=e=>{Ki((()=>{for(const t of e)i.u(t);const t=i.M();t&&t.T!==o.value&&(o.value=t.T,o.entries=t.entries,n())}))},s=Ti("event",a,{durationThreshold:t.durationThreshold??40});n=Pi(e,o,Xi,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),r.onHidden((()=>{a(s.takeRecords()),n(!0)})),Ci((()=>{i.v(),o=xi("INP"),n=Pi(e,o,Xi,t.reportAllChanges)})))}))}((t=>{const r=p(t);e(r)}),t)}(c),function(e){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=xi("TTFB"),n=Pi(e,r,ea,t.reportAllChanges);ta((()=>{const o=vi();o&&(r.value=Math.max(o.responseStart-ki(),0),r.entries=[o],n(!0),Ci((()=>{r=xi("TTFB",0),n=Pi(e,r,ea,t.reportAllChanges),n(!0)})))}))}((t=>{const r=(e=>{let t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){const r=e.entries[0],n=r.activationStart||0,o=Math.max((r.workerStart||r.fetchStart)-n,0),i=Math.max(r.domainLookupStart-n,0),a=Math.max(r.connectStart-n,0),s=Math.max(r.connectEnd-n,0);t={waitingDuration:o,cacheDuration:i-o,dnsDuration:a-i,connectionDuration:s-a,requestDuration:e.value-s,navigationEntry:r}}return Object.assign(e,{attribution:t})})(t);e(r)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(c),i&&void 0!==t&&ba(n,t)};if("function"==typeof window.gtag)a();else{const e=document.createElement("script");e.src=`https://www.googletagmanager.com/gtag/js?id=${r}`,e.async=!0,e.fetchPriority="high",window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},e.onload=()=>a(),document.head.appendChild(e)}}const Aa={non_interaction:!0,event_category:"booster",page_title:"",page_referrer:"",page_location:""},Oa=(e,t,r)=>{"function"==typeof window.gtag&&(100*Math.random()>t.gaStatsEventSampleRate||t.ga4MeasurementId&&gtag("event",e,ya(ya({send_to:t.ga4MeasurementId},Aa),r)))},Sa=(e,t,r)=>{if("function"!=typeof window.gtag)return;const n=ya({send_to:t},Aa),o=Object.keys(r),i=Object.keys(n).length;if(i>=25)throw Error("Too many shared params");if(o.length<25-i)return gtag("event",e,ya(ya({},n),r));for(let t={};o.length;t={})o.splice(0,25-i).forEach((e=>{t[e]=r[e]})),gtag("event",e,ya(ya({},n),t))};function Ca(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pa(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ca(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ca(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const Ea=e=>e&&"object"==typeof e?e.assignment:e,ka=e=>{if(t=e,!An(r=[0,1,2,3]).call(r,t))throw new Error(`Assignment value is invalid. assignment: ${e}`);var t,r;const n=da.get(ko,{asJSON:!0});if(!(e=>!!(null!==e&&"object"==typeof e&&"version"in e&&"controlGroupRate"in e&&"assignment"in e))(n))throw new Error(`Storage value is invalid. storage value: ${n}`);const o=n.assignment!==e;return da.set(ko,Pa(Pa({},n),{},{assignment:e}),{expires:730}),o},xa=(e,t)=>{const r=new URLSearchParams(self.location.search);if(r.has("rpr_ignore_control_group"))return{isControlGroup:!1,assignmentChanged:!1};const n=da.get(ko,{asJSON:!0}),o=Ea(n);let i=o;const{controlGroupRate:a}=e,s=100-e.controlGroupRate;if(((e,t)=>null==e||"number"==typeof e||e.controlGroupRate!==t||1!==e.version)(n,a)){const e=a>s?s:a,t=a>s?s:a,r=a>s?a-s:0,n=100*Math.random();i=n<e?0:n<e+t?1:n<e+t+r?2:3}da.set(ko,{version:1,controlGroupRate:a,assignment:i},{expires:t});const c=r.get("repro_booster_active");"0"===c?(i=2,ka(i)):"1"===c&&(i=3,ka(i));return{isControlGroup:0===i||2===i,assignmentChanged:o!==i}};let Ta=null;function ja(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const _a=e=>null!=e&&"object"==typeof e&&!Array.isArray(e),Ra=(t,r)=>{const n=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ja(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ja(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);return Object.keys(r).forEach((e=>{_a(r[e])&&_a(n[e])?n[e]=Ra(n[e],r[e]):n[e]=r[e]})),n};function Ma(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function La(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ma(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ma(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const Ia={analyticsDomains:["aiqua-onsite-experience.c.appier.net","aiqua-sdk.c.appier.net","aiqua-user.c.appier.net","analytics.tiktok.com","bat.bing.com","business.tiktok.com","cdn.amplitude.com","cdn.heapanalytics.com","cdn.mxpnl.com","cdn.segment.com","clarity.ms","connect.facebook.net","contentsquare.com","contentsquare.net","ct.pinterest.com","facebook.net","g.doubleclick.net","google-analytics.com","googleadservices.com","googletagmanager.com","im-apps.net","js.rtoaster.jp","mc.yandex.ru","microad.jp","px.ads.linkedin.com","rtoaster.jp","s.pinimg.com","script.hotjar.com","snap.licdn.com","ssl.google-analytics.com","stats.ptengine.jp","sync.im-apps.net","treasuredata.com","www.contx.net"],debug:!1};class Da{constructor(){e(this,"config",void 0),e(this,"originalAddEventListener",void 0),e(this,"originalRemoveEventListener",void 0),e(this,"handlerMap",void 0),e(this,"originalOnClickMap",void 0),e(this,"originalOnClickDescriptor",void 0),this.config=window.ANALYTICS_DEFER_CONFIG?La(La({},Ia),window.ANALYTICS_DEFER_CONFIG):Ia,this.originalAddEventListener=EventTarget.prototype.addEventListener,this.originalRemoveEventListener=EventTarget.prototype.removeEventListener,this.handlerMap=new WeakMap,this.originalOnClickMap=new WeakMap,this.originalOnClickDescriptor=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick"),this.debugLog("Initialized with config:",this.config)}debugLog(){if(this.config.debug){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];xn.log("[TrackingOptimizer]",...t)}}extractHostname(e){try{if(!e)return null;return new URL(e,window.location.href).hostname}catch(e){return null}}isAnalyticsDomain(e){return!!e&&this.config.analyticsDomains.some((t=>e===t||e.endsWith(`.${t}`)))}checkCurrentScriptDomain(){if(document.currentScript&&document.currentScript.src){const e=this.extractHostname(document.currentScript.src);if(e&&this.isAnalyticsDomain(e))return{detected:!0,method:"currentScript",domain:e}}return{detected:!1}}checkStackTrace(){try{const{stack:e}=new Error;if(!e)return{detected:!1};const t=[/https?:\/\/[^\s)]+/g,/@(https?:\/\/[^\s:]+)/g].reduce(((t,r)=>{if(t)return t;const n=e.match(r);if(!n)return null;const o=n.reduce(((e,t)=>{if(e)return e;const r=t.replace(/^@/,""),n=this.extractHostname(r);return n&&this.isAnalyticsDomain(n)?{detected:!0,method:"stackTrace",domain:n}:null}),null);return o}),null);if(t)return t}catch(e){}return{detected:!1}}checkExplicitMarker(){return document.currentScript&&document.currentScript.hasAttribute("data-analytics")?{detected:!0,method:"explicitMarker"}:{detected:!1}}isAnalyticsHandler(){const e=this.checkCurrentScriptDomain();if(e.detected)return e;const t=this.checkStackTrace();if(t.detected)return t;const r=this.checkExplicitMarker();return r.detected?r:{detected:!1}}wrapClickHandler(e){if(this.handlerMap.has(e))return this.handlerMap.get(e);const t=this.isAnalyticsHandler();if(this.debugLog("Analytics handler detected:",t,{originalHandler:e}),!t.detected)return e;window.__reproBoosterTrackingOptimizerInitialized&&window.__reproBoosterTrackingOptimizerInitialized.push({domain:t.domain,method:t.method});const r=this,n=function(t){setTimeout((()=>{try{"function"==typeof e?e.call(this,t):e&&"function"==typeof e.handleEvent&&e.handleEvent.call(e,t),r.debugLog("Deferred analytics handler executed",e,this,t)}catch(e){xn.error("Deferred analytics handler error:",e)}}),0)};return this.handlerMap.set(e,n),n}initialize(){if(window.__reproBoosterTrackingOptimizerInitialized)return;const e=this;EventTarget.prototype.addEventListener=function(t,r,n){if("click"===t&&r){const o=e.wrapClickHandler(r);return e.originalAddEventListener.call(this,t,o,n)}return e.originalAddEventListener.call(this,t,r,n)},EventTarget.prototype.removeEventListener=function(t,r,n){if("click"===t&&r&&e.handlerMap.has(r)){const o=e.handlerMap.get(r);return e.originalRemoveEventListener.call(this,t,o,n)}return e.originalRemoveEventListener.call(this,t,r,n)},this.originalOnClickDescriptor&&Object.defineProperty(HTMLElement.prototype,"onclick",{get(){return e.originalOnClickMap.has(this)?e.originalOnClickMap.get(this)||null:e.originalOnClickDescriptor&&e.originalOnClickDescriptor.get?e.originalOnClickDescriptor.get.call(this):null},set(t){if(t){e.originalOnClickMap.set(this,t);const r=e.wrapClickHandler(t);e.originalOnClickDescriptor.set.call(this,r)}else e.originalOnClickMap.delete(this),e.originalOnClickDescriptor.set.call(this,null)},configurable:!0,enumerable:!0}),window.__reproBoosterTrackingOptimizerInitialized=[]}}class Fa{constructor(){e(this,"_token",void 0),e(this,"config",void 0),e(this,"legacyClient",void 0),e(this,"useServiceWorker",!0),e(this,"useGlobalConfigVariable",!0),e(this,"enableClientFeaturesOnWebview",!1),this.legacyClient=new gi}get token(){return this._token}set token(e){e&&this._token===e?xn.warn("Token is already set. Ignoring."):(this.token&&e&&this._token!==e&&(xn.info("Token changed."),this.config=void 0),this._token=e,this.init())}getEmbeddedConfigFromGlobalVar(e){const t=globalThis.ReproBoosterConfig;if(!t||"object"!=typeof t||"error"in t)return;const r=to(t);return co(oo(r),e)}async fetchConfig(){if(!this.token)throw new Error("token required");if(this.config)return this.config;const{token:e}=this,t=this.getEmbeddedConfigFromGlobalVar(e);return this.useGlobalConfigVariable&&t?(this.config=t,this.config):(this.config=await new Promise(((t,r)=>{lo((()=>async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=await so(e,t),n=to(r);return co(oo(n),e)}(e,{priority:"high"}).then((e=>t(e)),r)),{timeout:1e4})})),this.config)}async init(){let e=await this.fetchConfig();const{isControlGroup:t,assignmentChanged:r}=xa(e,730),n=ha(e,t,730);e=((e,t)=>{var r;if(!t)return e;if(e.testName!==t.testName)return e;const n=null===(r=e.variants)||void 0===r?void 0:r.find((e=>e.name===t.variantName));return n?Ra(e,n.configOverride):e})(e,n),this.config=e;if(!fi||e.allowWebview||this.enableClientFeaturesOnWebview){if(((e,t)=>{if(!e.ga4MeasurementId)return;const r=da.get(ko,{asJSON:!0}),n="object"==typeof r?r.assignment:r,o=pa(),i=o?`${o.testName}:${o.variantName}`:"none";wa({assignment:n,ga4MeasurementId:e.ga4MeasurementId,ga4MeasurementIdForClient:e.ga4MeasurementIdForClient,configVariantValue:i,assignmentChanged:(null==t?void 0:t.assignmentChanged)??!1})})(e,{assignmentChanged:r}),e.available&&e.pageScript)try{const t=document.createElement("script");t.textContent=e.pageScript,document.head.appendChild(t)}catch(e){console.error("Error on pageScript",e)}if(!t&&e.available){if(!window.__reproBoosterTrackingOptimizerInitialized&&!!e.trackingOptimizer)try{(new Da).initialize()}catch(e){xn.error("Error initializing tracking optimizer",e)}}}if(this.useServiceWorker)if(!t&&e.available){const t=()=>window.setTimeout((()=>{lo((()=>{this.legacyClient.register(e,{onSendCacheStatsReport:t=>{let{logs:r,counters:n,size:o}=t;((e,t,r)=>{if(e.ga4MeasurementId&&100*Math.random()<e.gaMetricEventSampleRate){if(Object.values(t).some((e=>+e>0))){const r={};Object.entries(t).forEach((e=>{let[n,o]=e;"byType"===n?Object.entries(t.byType.prefetch??[]).forEach((e=>{let[t,n]=e;+n>0&&(r[`prefetch_${t}`]=n)})):+o>0&&(r[n]=o)})),Sa("cache_counters",e.ga4MeasurementId,r)}if(r.total>0){const t={};Object.entries(r).forEach((e=>{let[r,n]=e;"object"==typeof n?Object.entries(n).forEach((e=>{let[r,n]=e;n.total>0&&(t[`${r}_total`]=n.total,t[`${r}_average`]=n.average)})):t[r]=n})),Sa("cache_counters",e.ga4MeasurementId,t)}}})(e,n,o),((e,t)=>{t.forEach((t=>{const r=new URL(t.url),n={page_location:r.href,value:r.pathname+r.search};"prefetch"===t.name?"document"===t.type?Oa("prefetch",e,ya(ya({},n),{},{page_referrer:t.initiatorUrl,prefetch_type:t.prefetchType})):Oa("prefetch_other",e,ya(ya({},n),{},{page_referrer:t.initiatorUrl,prefetch_type:t.prefetchType})):"prefetch_nav_hit"===t.name?Oa("prefetch_nav_hit",e,ya(ya({},n),{},{page_referrer:t.referrer})):"nav_hit"===t.name||"nav_miss"===t.name?Oa(t.name,e,ya(ya({},n),{},{page_referrer:t.referrer})):"dual_used"===t.name?Oa(t.name,e,ya(ya({},n),{},{gap:t.gap,cache:t.cache})):"dual_failed"!==t.name&&"dual_was_late"!==t.name||Oa(t.name,e,ya(ya({},n),{},{gap:t.gap}))}))})(e,r)}})}))}),1e3);"loading"!==document.readyState||document.prerendering?t():document.addEventListener("DOMContentLoaded",(()=>t()))}else await gi.kill(e.unregisterOnStop,e.serviceWorkerScope)}async kill(){const e=await this.fetchConfig();return gi.kill(e.unregisterOnStop,e.serviceWorkerScope)}version(){return uo}async workerVersion(){return gi.version((await this.fetchConfig()).serviceWorkerScope)}async setWorkerLogLevel(e,t){return gi.setWorkerLogLevel(e,t,(await this.fetchConfig()).serviceWorkerScope)}async getMemoryCaches(){return this.legacyClient.getMemoryCaches()}async getStatistics(){return this.legacyClient.getStatistics()}activate(){var e;ka(3)&&null!==(e=this.config)&&void 0!==e&&e.ga4MeasurementIdForClient&&ba(this.config.ga4MeasurementIdForClient,3)}deactivate(){var e;ka(2)&&null!==(e=this.config)&&void 0!==e&&e.ga4MeasurementIdForClient&&ba(this.config.ga4MeasurementIdForClient,2)}getAssignment(){return(()=>{if(null!==Ta)return Ta;const e=da.get(ko,{asJSON:!0});return Ta=Ea(e),Ta})()}get isRegistered(){return this.legacyClient.isRegistered}async setProxyQueryParams(e){return e?u.put(e):u.delete(),gi.setProxyQueryParams(e,(await this.fetchConfig()).serviceWorkerScope)}}class Na{constructor(){e(this,"_client",void 0),this._client=new Fa}get token(){return this._client.token}set token(e){"string"==typeof e?""!==e?this._client.token=e:xn.error("Empty token is not allowed."):xn.error("Token must be a string.")}get useServiceWorker(){return this._client.useServiceWorker}set useServiceWorker(e){this._client.useServiceWorker=!!e}get enableClientFeaturesOnWebview(){return this._client.enableClientFeaturesOnWebview}set enableClientFeaturesOnWebview(e){this._client.enableClientFeaturesOnWebview=!!e}kill(){return this._client.kill()}async version(){return{client:this._client.version(),worker:await this._client.workerVersion()}}clientVersion(){return this._client.version()}async workerVersion(){return this._client.workerVersion()}async getCaches(){return this._client.getMemoryCaches()}async getCacheStats(){return this._client.getStatistics()}activate(){return this._client.activate()}getAssignment(){return this._client.getAssignment()}deactivate(){return this._client.deactivate(),this.kill()}setLogLevel(e){var t;if(An(t=Object.values(Pn)).call(t,e))return xn.memorizeLogLevel(e);xn.error(`"${e}" is not a valid log level value.`)}setWorkerLogLevel(e,t){return this._client.setWorkerLogLevel(e,t)}isWorkerRegistered(){return this._client.isRegistered}setup(e){xn.warn("[DEPRECATED] setup() is deprecated. Update your snippet for Repro Booster."),this.token?xn.warn("Token is already set. Ignoring the new token with setup() command."):this.token=e}setProxyQueryParams(e){if("object"==typeof e&&null!=e){if(!Object.values(e).some((e=>"string"!=typeof e)))return JSON.stringify(e).length>4096&&xn.warn("Proxy Query Params is too large. It may cause overflows."),this._client.setProxyQueryParams(e);xn.error("Proxy Query Params must have a string value.")}else xn.error("Proxy Query Params must be an object.")}}(e=>{if(e&&"object"==typeof e._router)return;const t=new Na;window.ReproBooster=function(e){if("function"==typeof t[e]){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return t[e](...n)}xn.error(`Unknown command: ${e}`)},window.ReproBooster._router=t;let r=!0;if(document.currentScript)try{const e=new URL(document.currentScript.getAttribute("src")||"",self.location.href).searchParams;e.has("skip-sw")&&(t.useServiceWorker=!1),e.has("force-enable-on-webview")&&(t.enableClientFeaturesOnWebview=!0);const n=e.get("token");n&&(r=!1,t.token=n)}catch(e){}u.get(),r&&window.reproio&&"object"!=typeof window.reproio._rpr&&(xn.warn("WebSDK is not loaded. ReproBooster will override reproio object to keep compatibility."),window.reproio=window.ReproBooster)})(window.ReproBooster)}();
