%PDF- %PDF-
Direktori : /proc/self/root/opt/alt/php-xray/php/profiler/assets/ |
Current File : //proc/self/root/opt/alt/php-xray/php/profiler/assets/web.vitals.min.js |
(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var t,n,r={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{},enableNavigationTracking:!0},i=window,o=i.console,a=i.navigator,s=i.performance,c=function(){return a.deviceMemory},u=function(){return a.hardwareConcurrency},d=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},l="4g",f=!1,h={},p={value:0},m={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},v={value:0},y={value:0},g={},T={isHidden:!1,didChange:!1},b=function(){T.isHidden=!1,document.hidden&&(T.isHidden=document.hidden,T.didChange=!0)},w=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){o.warn("Perfume.js:",e)}return null},S=function(){return!!(u()&&u()<=4)||!!(c()&&c()<=4)},E=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return S()||t}},k=function(e){return parseFloat(e.toFixed(4))},M=function(e){return"number"!=typeof e?null:k(e/Math.pow(1024,2))},B=function(e,t,n,o,s){var d,h=function(){r.analyticsTracker&&(T.isHidden&&!["CLS","INP"].includes(e)||r.analyticsTracker({attribution:o,metricName:e,data:t,navigatorInformation:a?{deviceMemory:c()||0,hardwareConcurrency:u()||0,serviceWorkerStatus:"serviceWorker"in a?a.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:S(),isLowEndExperience:E(l,f)}:{},rating:n,navigationType:s}))};["CLS","INP"].includes(e)?h():(d=h,"requestIdleCallback"in i?i.requestIdleCallback(d,{timeout:3e3}):d())},R=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<p.value)){var t=e.duration-50;t>0&&(v.value+=t,y.value+=t)}}))};!function(e){e.instant="instant",e.quick="quick",e.moderate="moderate",e.slow="slow",e.unavoidable="unavoidable"}(t||(t={})),(n={})[t.instant]={vitalsThresholds:[100,200],maxOutlierThreshold:1e4},n[t.quick]={vitalsThresholds:[200,500],maxOutlierThreshold:1e4},n[t.moderate]={vitalsThresholds:[500,1e3],maxOutlierThreshold:1e4},n[t.slow]={vitalsThresholds:[1e3,2e3],maxOutlierThreshold:1e4},n[t.unavoidable]={vitalsThresholds:[2e3,5e3],maxOutlierThreshold:2e4};var A,C,_,I,x,L={RT:[100,200],TBT:[200,600],NTBT:[200,600]},O=function(e,t){return L[e]?t<=L[e][0]?"good":t<=L[e][1]?"needsImprovement":"poor":null},P=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=k(t[e]))})),B(e,t,null,n||{})},D=function(e){var t=e.attribution,n=e.name,i=e.rating,o=e.value,a=e.navigationType;"FCP"===n&&(p.value=o),["FCP","LCP"].includes(n)&&!g[0]&&(g[0]=w("longtask",R)),"FID"===n&&setTimeout((function(){T.didChange||(D({attribution:t,name:"TBT",rating:O("TBT",v.value),value:v.value,navigationType:a}),P("dataConsumption",m.value))}),1e4);var s=k(o);s<=r.maxTime&&s>=0&&B(n,s,i,t,a)},F=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},q=function(e){if("loading"===document.readyState)return"loading";var t=F();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"},j=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},U=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:j(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},N=-1,H=function(){return N},z=function(e){addEventListener("pageshow",(function(t){t.persisted&&(N=t.timeStamp,e(t))}),!0)},W=function(){var e=F();return e&&e.activationStart||0},V=function(e,t){var n=F(),r="navigate";return H()>=0?r="back-forward-cache":n&&(r=document.prerendering||W()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},G=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},J=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},X=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},$=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Y=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Z=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&Z>-1&&(Z="visibilitychange"===e.type?e.timeStamp:0,te())},ee=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},te=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},ne=function(){return Z<0&&(Z=K(),ee(),z((function(){setTimeout((function(){Z=K(),ee()}),0)}))),{get firstHiddenTime(){return Z}}},re=function(e,t){t=t||{},Y((function(){var n,r=[1800,3e3],i=ne(),o=V("FCP"),a=G("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<i.firstHiddenTime&&(o.value=Math.max(e.startTime-W(),0),o.entries.push(e),n(!0)))}))}));a&&(n=X(e,o,r,t.reportAllChanges),z((function(i){o=V("FCP"),n=X(e,o,r,t.reportAllChanges),$((function(){o.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ie={passive:!0,capture:!0},oe=new Date,ae=function(e,t){A||(A=t,C=e,_=new Date,ue(removeEventListener),se())},se=function(){if(C>=0&&C<_-oe){var e={entryType:"first-input",name:A.type,target:A.target,cancelable:A.cancelable,startTime:A.timeStamp,processingStart:A.timeStamp+C};I.forEach((function(t){t(e)})),I=[]}},ce=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ae(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ie),removeEventListener("pointercancel",r,ie)};addEventListener("pointerup",n,ie),addEventListener("pointercancel",r,ie)}(t,e):ae(t,e)}},ue=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ce,ie)}))},de=0,le=1/0,fe=0,he=function(e){e.forEach((function(e){e.interactionId&&(le=Math.min(le,e.interactionId),fe=Math.max(fe,e.interactionId),de=fe?(fe-le)/7+1:0)}))},pe=function(){return x?de:performance.interactionCount||0},me=0,ve=function(){return pe()-me},ye=[],ge={},Te=function(e){var t=ye[ye.length-1],n=ge[e.interactionId];if(n||ye.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,ye.push(r)}ye.sort((function(e,t){return t.latency-e.latency})),ye.splice(10).forEach((function(e){delete ge[e.id]}))}},be={},we=function e(t){document.prerendering?Y((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=V("TTFB"),i=X(e,r,n,t.reportAllChanges);we((function(){var o=F();if(o){var a=o.responseStart;if(a<=0||a>performance.now())return;r.value=Math.max(a-W(),0),r.entries=[o],i(!0),z((function(){r=V("TTFB",0),(i=X(e,r,n,t.reportAllChanges))(!0)}))}}))},Ee=function(e){e.forEach((function(e){e.identifier&&D({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(r.isResourceTiming&&P("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;m.value[e.initiatorType]+=t,m.value.total+=t}}))},Me=function(){!function(e,t){Se((function(e){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),o=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:o-i,requestTime:e.value-o,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(e),function(e){e.value>0&&D(e)}(e)}),t)}(0,r.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},Y((function(){var e,n=[.1,.25],r=V("CLS"),i=-1,o=0,a=[],s=function(e){i>-1&&function(e){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:U(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:q(t.startTime)})}}var r;e.attribution={}}(e),function(e){D(e)}(e)}(e)},c=function(t){t.forEach((function(t){if(!t.hadRecentInput){var n=a[0],i=a[a.length-1];o&&t.startTime-i.startTime<1e3&&t.startTime-n.startTime<5e3?(o+=t.value,a.push(t)):(o=t.value,a=[t]),o>r.value&&(r.value=o,r.entries=a,e())}}))},u=G("layout-shift",c);u&&(e=X(s,r,n,t.reportAllChanges),re((function(t){i=t.value,r.value<0&&(r.value=0,e())})),J((function(){c(u.takeRecords()),e(!0)})),z((function(){o=0,i=-1,r=V("CLS",0),e=X(s,r,n,t.reportAllChanges),$((function(){return e()}))})))}))}(0,t)}(0,r.reportOptions.cls),function(e,t){re((function(e){!function(e){if(e.entries.length){var t=F(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:q(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:q(H())}}(e),function(e){D(e)}(e)}),t)}(0,r.reportOptions.fcp),function(e,t){!function(e,t){t=t||{},Y((function(){var n,r=[100,300],i=ne(),o=V("FID"),a=function(e){e.startTime<i.firstHiddenTime&&(o.value=e.processingStart-e.startTime,o.entries.push(e),n(!0))},s=function(e){e.forEach(a)},c=G("first-input",s);n=X(e,o,r,t.reportAllChanges),c&&J((function(){s(c.takeRecords()),c.disconnect()}),!0),c&&z((function(){var i;o=V("FID"),n=X(e,o,r,t.reportAllChanges),I=[],C=-1,A=null,ue(addEventListener),i=a,I.push(i),se()}))}))}((function(e){!function(e){var t=e.entries[0];e.attribution={eventTarget:U(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:q(t.startTime)}}(e),function(e){D(e)}(e)}),t)}(0,r.reportOptions.fid),function(e,t){!function(e,t){t=t||{},Y((function(){var n,r=[2500,4e3],i=ne(),o=V("LCP"),a=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-W(),0);r<i.firstHiddenTime&&(o.value=r,o.entries=[t],n())}},s=G("largest-contentful-paint",a);if(s){n=X(e,o,r,t.reportAllChanges);var c=function(){be[o.id]||(a(s.takeRecords()),s.disconnect(),be[o.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),J(c,!0),z((function(i){o=V("LCP"),n=X(e,o,r,t.reportAllChanges),$((function(){o.value=performance.now()-i.timeStamp,be[o.id]=!0,n(!0)}))}))}}))}((function(e){!function(e){if(e.entries.length){var t=F();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],o=Math.max(0,t.responseStart-n),a=Math.max(o,i?(i.requestStart||i.startTime)-n:0),s=Math.max(a,i?i.responseEnd-n:0),c=Math.max(s,r?r.startTime-n:0),u={element:U(r.element),timeToFirstByte:o,resourceLoadDelay:a-o,resourceLoadTime:s-a,elementRenderDelay:c-s,navigationEntry:t,lcpEntry:r};return r.url&&(u.url=r.url),i&&(u.lcpResourceEntry=i),void(e.attribution=u)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(e),function(e){D(e)}(e)}),t)}(0,r.reportOptions.lcp),function(e,t){!function(e,t){t=t||{},Y((function(){var n=[200,500];"interactionCount"in performance||x||(x=G("event",he,{type:"event",buffered:!0,durationThreshold:0}));var r,i=V("INP"),o=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!ye.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(ye.length-1,Math.floor(ve()/50)),ye[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},a=G("event",o,{durationThreshold:t.durationThreshold||40});r=X(e,i,n,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),J((function(){o(a.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),z((function(){ye=[],me=pe(),i=V("INP"),r=X(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:U(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:q(t.startTime)}}else e.attribution={}}(t),e(t)}),t)}((function(e){return D(e)}),r.reportOptions.inp),r.isResourceTiming&&w("resource",ke),r.isElementTiming&&w("element",Ee)},Be=function(e){var t="usageDetails"in e?e.usageDetails:{};P("storageEstimate",{quota:M(e.quota),usage:M(e.usage),caches:M(t.caches),indexedDB:M(t.indexedDB),serviceWorker:M(t.serviceWorkerRegistrations)})},Re={finalMarkToStepsMap:{},startMarkToStepsMap:{},active:{},navigationSteps:{}},Ae=0,Ce=function(){function e(e){if(void 0===e&&(e={}),this.v="9.0.0-rc.3",r.analyticsTracker=e.analyticsTracker,r.isResourceTiming=!!e.resourceTiming,r.isElementTiming=!!e.elementTiming,r.maxTime=e.maxMeasureTime||r.maxTime,r.reportOptions=e.reportOptions||r.reportOptions,r.steps=e.steps,r.onMarkStep=e.onMarkStep,r.enableNavigationTracking=e.enableNavigationTracking,d()){"PerformanceObserver"in i&&Me(),void 0!==document.hidden&&document.addEventListener("visibilitychange",b);var t=function(){if(!d())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();P("navigationTiming",t),t.redirectTime&&D({attribution:{},name:"RT",rating:O("RT",t.redirectTime),value:t.redirectTime}),P("networkInformation",function(){if("connection"in a){var e=a.connection;return"object"!=typeof e?{}:(l=e.effectiveType,f=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),a&&a.storage&&"function"==typeof a.storage.estimate&&a.storage.estimate().then(Be),r.steps&&r.steps&&(Re.startMarkToStepsMap={},Re.finalMarkToStepsMap={},Re.active={},Re.navigationSteps={},Object.entries(r.steps).forEach((function(e){var t,n,r=e[0],i=e[1].marks,o=i[0],a=i[1],s=null!==(n=Re.startMarkToStepsMap[o])&&void 0!==n?n:{};if(s[r]=!0,Re.startMarkToStepsMap[o]=s,Re.finalMarkToStepsMap[a]){var c=Re.finalMarkToStepsMap[a][o]||[];c.push(r),Re.finalMarkToStepsMap[a][o]=c}else Re.finalMarkToStepsMap[a]=((t={})[o]=[r],t)})))}}return e.prototype.start=function(e){d()&&!h[e]&&(h[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),d()&&h[e]){s.mark("mark_".concat(e,"_end")),delete h[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&P(e,k(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete h[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Ae),Ae=setTimeout((function(){e.end("ntbt",{},!1),D({attribution:{},name:"NTBT",rating:O("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}(),_e="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==e.g&&e.g||{},Ie="URLSearchParams"in _e,xe="Symbol"in _e&&"iterator"in Symbol,Le="FileReader"in _e&&"Blob"in _e&&function(){try{return new Blob,!0}catch(e){return!1}}(),Oe="FormData"in _e,Pe="ArrayBuffer"in _e;if(Pe)var De=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Fe=ArrayBuffer.isView||function(e){return e&&De.indexOf(Object.prototype.toString.call(e))>-1};function qe(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function je(e){return"string"!=typeof e&&(e=String(e)),e}function Ue(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return xe&&(t[Symbol.iterator]=function(){return t}),t}function Ne(e){this.map={},e instanceof Ne?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function He(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function ze(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function We(e){var t=new FileReader,n=ze(t);return t.readAsArrayBuffer(e),n}function Ve(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Ge(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Le&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Oe&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Ie&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Pe&&Le&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=Ve(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Pe&&(ArrayBuffer.prototype.isPrototypeOf(e)||Fe(e))?this._bodyArrayBuffer=Ve(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Ie&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Le&&(this.blob=function(){var e=He(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return He(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(Le)return this.blob().then(We);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,r,i,o=He(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,n=ze(t=new FileReader),i=(r=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?r[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Oe&&(this.formData=function(){return this.text().then($e)}),this.json=function(){return this.text().then(JSON.parse)},this}Ne.prototype.append=function(e,t){e=qe(e),t=je(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Ne.prototype.delete=function(e){delete this.map[qe(e)]},Ne.prototype.get=function(e){return e=qe(e),this.has(e)?this.map[e]:null},Ne.prototype.has=function(e){return this.map.hasOwnProperty(qe(e))},Ne.prototype.set=function(e,t){this.map[qe(e)]=je(t)},Ne.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Ne.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Ue(e)},Ne.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ue(e)},Ne.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Ue(e)},xe&&(Ne.prototype[Symbol.iterator]=Ne.prototype.entries);var Je=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Xe(e,t){if(!(this instanceof Xe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(t=t||{}).body;if(e instanceof Xe){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Ne(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Ne(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),Je.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in _e)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function $e(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Ye(e,t){if(!(this instanceof Ye))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Ne(t.headers),this.url=t.url||"",this._initBody(e)}Xe.prototype.clone=function(){return new Xe(this,{body:this._bodyInit})},Ge.call(Xe.prototype),Ge.call(Ye.prototype),Ye.prototype.clone=function(){return new Ye(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ne(this.headers),url:this.url})},Ye.error=function(){var e=new Ye(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var Ze=[301,302,303,307,308];Ye.redirect=function(e,t){if(-1===Ze.indexOf(t))throw new RangeError("Invalid status code");return new Ye(null,{status:t,headers:{location:e}})};var Ke=_e.DOMException;try{new Ke}catch(e){(Ke=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Ke.prototype.constructor=Ke}function Qe(e,t){return new Promise((function(n,r){var i=new Xe(e,t);if(i.signal&&i.signal.aborted)return r(new Ke("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}if(o.onload=function(){var e=o.getAllResponseHeaders(),t=o.getResponseHeader("set-cookie");t&&(e=e.replace(t,t.replace(/\r?\n/g,", ")));var r,i,a={status:o.status,statusText:o.statusText,headers:(r=e||"",i=new Ne,r.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var t=e.split(":"),n=t.shift().trim();if(n){var r=t.join(":").trim();try{i.append(n,r)}catch(e){console.warn("Response "+e.message)}}})),i)};a.url="responseURL"in o?o.responseURL:a.headers.get("X-Request-URL");var s="response"in o?o.response:o.responseText;setTimeout((function(){n(new Ye(s,a))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Ke("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&_e.location.href?_e.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Le?o.responseType="blob":Pe&&(o.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof Ne||_e.Headers&&t.headers instanceof _e.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){s.push(qe(e)),o.setRequestHeader(e,je(t.headers[e]))})),i.headers.forEach((function(e,t){-1===s.indexOf(t)&&o.setRequestHeader(t,e)}))}else i.headers.forEach((function(e,t){o.setRequestHeader(t,e)}));i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Qe.polyfill=!0,_e.fetch||(_e.fetch=Qe,_e.Headers=Ne,_e.Request=Xe,_e.Response=Ye);try{window.clWebVitals={dt:null,clId:"#cl_id#",apiUrl:"#cl_api_url#",requestId:null,processTimeout:6e4,intervalId:null,intervalToSend:5e3,generalMetrics:[],cssResourceMetrics:[],collectedCSSResources:0,neededCSSResources:3,sentCss:!1,imgResourceMetrics:[],collectedImgResources:0,neededImgResources:5,neededImgSize:2e5,sentImg:!1,init:function(){"#cl_id#"!==this.clId&&0!==this.clId.length&&(this.setDt(),this.setRequestId(),this.setEvents(),this.initTimer(),this.initPerfume())},setDt:function(){var e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),i=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),a=String(e.getSeconds()).padStart(2,"0");this.dt=t+"-"+n+"-"+r+" "+i+":"+o+":"+a},setRequestId:function(){this.requestId=Date.now().toString()+"_"+(Math.random()+1).toString(36).substring(2)},setEvents:function(){var e=this;window.addEventListener("beforeunload",(function(t){e.send(!0)}))},initTimer:function(){var e=this;this.intervalId=setInterval((function(){e.send()}),this.intervalToSend),setTimeout((function(){e.intervalId&&(clearInterval(e.intervalId),e.intervalId=null)}),this.processTimeout)},initPerfume:function(){var e=this;new Ce({resourceTiming:!0,elementTiming:!0,maxMeasureTime:this.processTimeout,analyticsTracker:function(t){if(void 0!==t.metricName&&(void 0===t.data||void 0===t.data.name||t.data.name!==e.apiUrl))switch(t.metricName.toLowerCase()){case"fp":case"fcp":case"fid":case"lcp":case"cls":case"clsfinal":case"tbt":case"ttfb":e.collect(t);break;case"resourcetiming":void 0!==t.data.initiatorType&&("link"===t.data.initiatorType&&"string"==typeof t.data.name&&t.data.name.includes(".css")||"img"===t.data.initiatorType&&"number"==typeof t.data.decodedBodySize&&t.data.decodedBodySize>=e.neededImgSize&&"string"==typeof t.data.name&&!t.data.name.includes(".webp"))&&e.collect(t,t.data.initiatorType);break;default:return}}})},collect:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(void 0!==e.navigationEntry&&"string"==typeof e.navigationEntry.name?e.url=e.navigationEntry.name:void 0!==e.data.name&&"string"==typeof e.data.name?e.url=e.data.name:e.url=window.location.href,e.id=this.clId,e.dt=this.dt,e.requestId=this.requestId,e.timestamp=Date.now(),e.windowWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e.windowHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,t){case"link":this.collectedCSSResources++,this.cssResourceMetrics.push(e);break;case"img":this.collectedImgResources++,this.imgResourceMetrics.push(e);break;default:this.generalMetrics.push(e)}},send:function(){if(!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||!1===this.sentCss&&this.collectedCSSResources>=this.neededCSSResources||!1===this.sentImg&&this.collectedImgResources>=this.neededImgResources){this.cssResourceMetrics.length>0&&(this.cssResourceMetrics.sort(this.compareResources),this.cssResourceMetrics=this.cssResourceMetrics.slice(0,this.neededCSSResources),this.sentCss=!0),this.imgResourceMetrics.length>0&&(this.imgResourceMetrics.sort(this.compareResources),this.imgResourceMetrics=this.imgResourceMetrics.slice(0,this.neededImgResources),this.sentImg=!0);var e=this.generalMetrics.concat(this.cssResourceMetrics,this.imgResourceMetrics);if(0===e.length)return;var t=JSON.stringify({data:e});this.generalMetrics=[],this.cssResourceMetrics=[],this.imgResourceMetrics=[],window.fetch(this.apiUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then()}},compareResources:function(e,t){return e.data.decodedBodySize<t.data.decodedBodySize?1:e.data.decodedBodySize>t.data.decodedBodySize?-1:0}},clWebVitals.init()}catch(e){console.log(e)}})();