@zaplier/sdk 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-ultra.min.js +10 -0
- package/dist/index.cjs +1615 -34
- package/dist/index.d.ts +11 -7
- package/dist/index.esm.js +1615 -34
- package/dist/v2/chunks/browser-apis-AyU2utpF.min.js +6 -0
- package/dist/v2/chunks/confidence-BslwbUCt.min.js +6 -0
- package/dist/v2/chunks/device-signals-2L_62qNZ.min.js +6 -0
- package/dist/v2/chunks/dom-blockers-C467-IRd.min.js +6 -0
- package/dist/v2/chunks/fingerprint-FfUEEIAd.min.js +6 -0
- package/dist/v2/chunks/hardware-9ikfSEs-.min.js +6 -0
- package/dist/v2/chunks/incognito-CkKAdE8Z.min.js +6 -0
- package/dist/v2/chunks/math-Q4s6nkVD.min.js +6 -0
- package/dist/v2/chunks/plugins-enhanced-mUjU1EXe.min.js +6 -0
- package/dist/v2/chunks/session-replay-C5Tp0d16.min.js +6 -0
- package/dist/v2/chunks/storage-Bl_8oytT.min.js +6 -0
- package/dist/v2/chunks/system-DTjxyOZF.min.js +6 -0
- package/dist/v2/core.d.ts +7 -0
- package/dist/v2/core.js +2 -2
- package/dist/v2/core.min.js +2 -2
- package/dist/v2/modules/anti-adblock.js +2 -2
- package/dist/v2/modules/browser-apis-C32PGYAh.js +6 -0
- package/dist/v2/modules/browser-apis-DzzjRXFN.js +6 -0
- package/dist/v2/modules/confidence-CLylpqVh.js +6 -0
- package/dist/v2/modules/device-signals-ChNkNSJR.js +6 -0
- package/dist/v2/modules/device-signals-D-VQg-o6.js +6 -0
- package/dist/v2/modules/dom-blockers-BamKJxCs.js +6 -0
- package/dist/v2/modules/dom-blockers-D9M2aO9M.js +6 -0
- package/dist/v2/modules/fingerprint-CRCL21-p.js +6 -0
- package/dist/v2/modules/fingerprint-Ddq30bun.js +6 -0
- package/dist/v2/modules/fingerprint.js +2 -2
- package/dist/v2/modules/hardware-BxWqOjae.js +6 -0
- package/dist/v2/modules/heatmap.js +1 -1
- package/dist/v2/modules/incognito-CBxUhUOT.js +6 -0
- package/dist/v2/modules/incognito-DpuYoC8S.js +6 -0
- package/dist/v2/modules/math-B13vt1ND.js +6 -0
- package/dist/v2/modules/plugins-enhanced-CnBdC9_k.js +6 -0
- package/dist/v2/modules/plugins-enhanced-D5ft0k0e.js +6 -0
- package/dist/v2/modules/replay.js +2 -2
- package/dist/v2/modules/storage-D8dcMojB.js +6 -0
- package/dist/v2/modules/system-ZMflVbka.js +6 -0
- package/package.json +47 -22
- package/dist/index.cjs.map +0 -1
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -3517
- package/dist/index.js.map +0 -1
- package/dist/sdk.js +0 -26960
- package/dist/sdk.js.map +0 -1
- package/dist/sdk.legacy.min.js +0 -6
- package/dist/sdk.min.js +0 -7
- package/dist/src/core.d.ts +0 -87
- package/dist/src/core.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -15
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/modules/anti-adblock.d.ts +0 -113
- package/dist/src/modules/anti-adblock.d.ts.map +0 -1
- package/dist/src/modules/auto-tracker.d.ts +0 -240
- package/dist/src/modules/auto-tracker.d.ts.map +0 -1
- package/dist/src/modules/bot-detection.d.ts +0 -15
- package/dist/src/modules/bot-detection.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/accessibility.d.ts +0 -155
- package/dist/src/modules/fingerprint/accessibility.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/audio.d.ts +0 -15
- package/dist/src/modules/fingerprint/audio.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/browser-apis.d.ts +0 -108
- package/dist/src/modules/fingerprint/browser-apis.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/browser.d.ts +0 -14
- package/dist/src/modules/fingerprint/browser.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/canvas.d.ts +0 -14
- package/dist/src/modules/fingerprint/canvas.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/confidence.d.ts +0 -89
- package/dist/src/modules/fingerprint/confidence.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/datetime-locale.d.ts +0 -76
- package/dist/src/modules/fingerprint/datetime-locale.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/device-signals.d.ts +0 -29
- package/dist/src/modules/fingerprint/device-signals.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/dom-blockers.d.ts +0 -56
- package/dist/src/modules/fingerprint/dom-blockers.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/font-preferences.d.ts +0 -70
- package/dist/src/modules/fingerprint/font-preferences.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/fonts-enhanced.d.ts +0 -43
- package/dist/src/modules/fingerprint/fonts-enhanced.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/fonts.d.ts +0 -14
- package/dist/src/modules/fingerprint/fonts.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/hardware.d.ts +0 -40
- package/dist/src/modules/fingerprint/hardware.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/hashing.d.ts +0 -29
- package/dist/src/modules/fingerprint/hashing.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/incognito.d.ts +0 -6
- package/dist/src/modules/fingerprint/incognito.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/math-enhanced.d.ts +0 -70
- package/dist/src/modules/fingerprint/math-enhanced.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/math.d.ts +0 -32
- package/dist/src/modules/fingerprint/math.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/plugins-enhanced.d.ts +0 -97
- package/dist/src/modules/fingerprint/plugins-enhanced.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/screen.d.ts +0 -15
- package/dist/src/modules/fingerprint/screen.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/storage.d.ts +0 -45
- package/dist/src/modules/fingerprint/storage.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/system.d.ts +0 -40
- package/dist/src/modules/fingerprint/system.d.ts.map +0 -1
- package/dist/src/modules/fingerprint/webgl.d.ts +0 -15
- package/dist/src/modules/fingerprint/webgl.d.ts.map +0 -1
- package/dist/src/modules/fingerprint.d.ts +0 -35
- package/dist/src/modules/fingerprint.d.ts.map +0 -1
- package/dist/src/modules/global-interface.d.ts +0 -157
- package/dist/src/modules/global-interface.d.ts.map +0 -1
- package/dist/src/modules/heatmap.d.ts +0 -145
- package/dist/src/modules/heatmap.d.ts.map +0 -1
- package/dist/src/modules/incognito-detection.d.ts +0 -23
- package/dist/src/modules/incognito-detection.d.ts.map +0 -1
- package/dist/src/modules/session-replay.d.ts +0 -93
- package/dist/src/modules/session-replay.d.ts.map +0 -1
- package/dist/src/modules/user-agent.d.ts +0 -35
- package/dist/src/modules/user-agent.d.ts.map +0 -1
- package/dist/src/modules/visitor-persistence.d.ts +0 -51
- package/dist/src/modules/visitor-persistence.d.ts.map +0 -1
- package/dist/src/sdk.d.ts +0 -289
- package/dist/src/sdk.d.ts.map +0 -1
- package/dist/src/types/config.d.ts +0 -44
- package/dist/src/types/config.d.ts.map +0 -1
- package/dist/src/types/detection.d.ts +0 -114
- package/dist/src/types/detection.d.ts.map +0 -1
- package/dist/src/types/events.d.ts +0 -174
- package/dist/src/types/events.d.ts.map +0 -1
- package/dist/src/types/fingerprint.d.ts +0 -252
- package/dist/src/types/fingerprint.d.ts.map +0 -1
- package/dist/src/types/index.d.ts +0 -83
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/methods.d.ts +0 -83
- package/dist/src/types/methods.d.ts.map +0 -1
- package/dist/src/types/visitor.d.ts +0 -90
- package/dist/src/types/visitor.d.ts.map +0 -1
- package/dist/src/utils/browser.d.ts +0 -114
- package/dist/src/utils/browser.d.ts.map +0 -1
- package/dist/src/utils/lazy-loader.d.ts +0 -60
- package/dist/src/utils/lazy-loader.d.ts.map +0 -1
- package/dist/src/utils/session-utils.d.ts +0 -58
- package/dist/src/utils/session-utils.d.ts.map +0 -1
- package/dist/src/utils/webgl-cache.d.ts +0 -43
- package/dist/src/utils/webgl-cache.d.ts.map +0 -1
- package/dist/v2/chunks/fingerprint-ergvAID6.js +0 -8461
- package/dist/v2/chunks/replay-CM8dTFmL.js +0 -12158
- package/dist/v2/chunks/session-replay-C_UkGoTj.js +0 -240
package/dist/v2/core.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Zaplier SDK v2.0.0 - Performance Optimized
|
|
3
3
|
* Advanced privacy-first tracking with code splitting
|
|
4
|
-
* (c)
|
|
4
|
+
* (c) 2026 Zaplier Team
|
|
5
5
|
*/
|
|
6
|
-
class t{constructor(t){this.eventQueue=[],this.isInitialized=!1,this.modules=new Map,this.version="2.0.0",this.config={deferAdvanced:!0,loadTimeout:5e3,debug:!1,...t},this.initializeCore()}initializeCore(){try{this.config.debug&&this.version,this.sessionId=this.generateTempSessionId(),this.visitorId=this.generateTempVisitorId(),this.isInitialized=!0,this.processEventQueue(),this.config.debug,this.config.deferAdvanced||this.scheduleAdvancedLoading()}catch(t){console.error("[Zaplier Core] Initialization failed:",t)}}trackPageView(t={}){this.config.debug;const e={eventType:"page_view",eventName:"page_view",sessionId:this.sessionId,visitorId:this.visitorId,url:window.location.href,referrer:document.referrer,timestamp:(new Date).toISOString(),...t};this.sendEvent(e)}track(t,e={}){this.config.debug;const n={eventType:"custom",eventName:t,sessionId:this.sessionId,visitorId:this.visitorId,timestamp:(new Date).toISOString(),...e};this.sendEvent(n)}async enableAdvancedFeatures(){this.config.debug;try{await this.loadFingerprinting(),this.config.replay&&await this.loadReplayModule(),this.config.debug}catch(t){console.error("[Zaplier Core] Failed to load advanced features:",t)}}async loadFingerprinting(){if(!this.modules.has("fingerprint"))try{const{getCompleteFingerprint:t}=await Promise.resolve().then(function(){return se}),e=await t();e.success&&e.data&&(this.visitorId=e.data.hash||this.visitorId,this.modules.set("fingerprint",e.data),this.config.debug)}catch(t){console.error("[Zaplier Core] Fingerprinting failed:",t)}}async loadReplayModule(){if(!this.modules.has("replay"))try{const{SessionReplayEngine:t}=await Promise.resolve().then(function(){return vh}),e=new t(this.sessionId,this.visitorId,{sampleRate:this.config.replaySampling||.1});e.start()&&(this.modules.set("replay",e),this.config.debug)}catch(t){console.error("[Zaplier Core] Replay loading failed:",t)}}scheduleAdvancedLoading(){((t,e=100)=>{"undefined"!=typeof requestIdleCallback?requestIdleCallback(t,{timeout:this.config.loadTimeout}):setTimeout(t,e)})(()=>this.enableAdvancedFeatures())}async sendEvent(t){try{const e=await fetch(`${this.config.apiEndpoint||"https://api.zaplier.com"}/events?token=${encodeURIComponent(this.config.token)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0});this.config.debug&&!e.ok&&console.warn(`[Zaplier Core] Event sending failed: ${e.status}`)}catch(e){this.eventQueue.push(t),this.config.debug&&console.warn("[Zaplier Core] Event queued for retry:",e)}}processEventQueue(){if(0===this.eventQueue.length)return;const t=[...this.eventQueue];this.eventQueue=[],t.forEach(t=>this.sendEvent(t))}generateTempSessionId(){const t=new Date,e=t.getFullYear()+(t.getMonth()+1).toString().padStart(2,"0")+t.getDate().toString().padStart(2,"0"),n=t.getHours().toString().padStart(2,"0");return`temp_${Date.now()}_${e}_${n}`}generateTempVisitorId(){return`temp_visitor_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}getVisitorInfo(){return{visitorId:this.visitorId,sessionId:this.sessionId,isReady:this.isInitialized,hasFingerprint:this.modules.has("fingerprint")}}}function e(e){return new t(e)}function n(t,e){const n=t[1]+e[1]&4294967295;return[t[0]+e[0]+(n<t[1]?1:0)&4294967295,n]}function r(t,e){const n=65535&t[1],r=t[1]>>>16,i=65535&e[1],o=e[1]>>>16,s=n*o+r*i&4294967295,a=r*o+(s>>>16),c=n*i+((65535&s)<<16)&4294967295;return[t[0]*e[1]+t[1]*e[0]+a&4294967295,c]}function i(t,e){return 0==(e%=64)?t:e<32?[4294967295&(t[0]<<e|t[1]>>>32-e),4294967295&(t[1]<<e|t[0]>>>32-e)]:(e-=32,[4294967295&(t[1]<<e|t[0]>>>32-e),4294967295&(t[0]<<e|t[1]>>>32-e)])}function o(t,e){return[t[0]^e[0],t[1]^e[1]]}function s(t){let e=t;return e=o(e,[0,e[0]>>>1]),e=r(e,[4283543511,3981806797]),e=o(e,[0,e[0]>>>1]),e=r(e,[3301882366,444984403]),e=o(e,[0,e[0]>>>1]),e}function a(t,e=0){const a=function(t){const e=[];for(let n=0;n<t.length;n+=4){let r=0;for(let e=Math.min(3,t.length-n-1);e>=0;e--)r=r<<8|t.charCodeAt(n+e);e.push(r)}return e}(t),c=Math.floor(a.length/4);let l=[0,e],u=[0,e];const h=[2277735313,289559509],f=[1291169091,658871167];for(let t=0;t<c;t++){const e=4*t,s=4*t+2;let c=[a[e+1]||0,a[e]||0],d=[a[s+1]||0,a[s]||0];c=r(c,h),c=i(c,31),c=r(c,f),l=o(l,c),l=i(l,27),l=n(l,u),l=n(r(l,[0,5]),[0,1390208809]),d=r(d,f),d=i(d,33),d=r(d,h),u=o(u,d),u=i(u,31),u=n(u,l),u=n(r(u,[0,5]),[0,944331445])}const d=4*c,p=a.length-d;let m=[0,0],g=[0,0];return p>=12&&(g=o(g,[a[d+3]||0,0])),p>=8&&(g=o(g,[0,a[d+2]||0]),g=r(g,f),g=i(g,33),g=r(g,h),u=o(u,g)),p>=4&&(m=o(m,[a[d+1]||0,0])),p>=1&&(m=o(m,[0,a[d]||0]),m=r(m,h),m=i(m,31),m=r(m,f),l=o(l,m)),l=o(l,[0,t.length]),u=o(u,[0,t.length]),l=n(l,u),u=n(u,l),l=s(l),u=s(u),l=n(l,u),u=n(u,l),(l[0]>>>0).toString(16).padStart(8,"0")+(l[1]>>>0).toString(16).padStart(8,"0")+((u[0]>>>0).toString(16).padStart(8,"0")+(u[1]>>>0).toString(16).padStart(8,"0"))}function c(t){let e=0;if(0===t.length)return e.toString(36);for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e&=e;return Math.abs(e).toString(36)}function l(t){return["duration","timestamp","error","errors","collectionTime","startTime","endTime","_timestamp"].includes(t)||t.endsWith("_timestamp")||t.endsWith("Timestamp")}function u(t){if(null==t)return null;if(Array.isArray(t))return t.map(t=>u(t)).filter(t=>null!==t).sort((t,e)=>JSON.stringify(t).localeCompare(JSON.stringify(e)));if("object"==typeof t){const e=Object.keys(t).sort(),n={};for(const r of e){if(l(r))continue;const e=u(t[r]);null!==e&&(n[r]=e)}return n}return"number"==typeof t?Number.isFinite(t)?Math.abs(t)<1e-4?0:Math.abs(t)>1e6?t>0?1e6:-1e6:Number(t>=.1&&t<=10?t.toFixed(3):t.toFixed(2)):0:"string"==typeof t?t.trim().toLowerCase():"boolean"==typeof t?t:null}const h={SAMPLE_RATE:44100,DURATION:.1,FREQUENCIES:[440,1e3,1760,3520],COMPRESSOR_THRESHOLD:-50,COMPRESSOR_KNEE:40,COMPRESSOR_RATIO:12,COMPRESSOR_ATTACK:.003,COMPRESSOR_RELEASE:.25,FILTER_FREQUENCY:2e3,GAIN_VALUE:.5,DELAY_TIME:.02};function f(){try{const t=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!t)return null;const e=44100,n=h.DURATION;return new t(1,Math.floor(e*n),e)}catch{return null}}async function d(t){try{const e=h.FREQUENCIES.map((e,n)=>{const r=t.createOscillator(),i=["sine","square","sawtooth","triangle"],o=i[n%i.length];return r.type=o||"sine",r.frequency.setValueAtTime(e,t.currentTime),r}),n=t.createDynamicsCompressor(),r=t.createBiquadFilter(),i=t.createGain(),o=t.createDelay(),s=t.createAnalyser();n.threshold.setValueAtTime(h.COMPRESSOR_THRESHOLD,t.currentTime),n.knee.setValueAtTime(h.COMPRESSOR_KNEE,t.currentTime),n.ratio.setValueAtTime(h.COMPRESSOR_RATIO,t.currentTime),n.attack.setValueAtTime(h.COMPRESSOR_ATTACK,t.currentTime),n.release.setValueAtTime(h.COMPRESSOR_RELEASE,t.currentTime),r.type="bandpass",r.frequency.setValueAtTime(h.FILTER_FREQUENCY,t.currentTime),r.Q.setValueAtTime(.7,t.currentTime),i.gain.setValueAtTime(h.GAIN_VALUE,t.currentTime),o.delayTime.setValueAtTime(h.DELAY_TIME,t.currentTime);const a=t.createGain();a.gain.setValueAtTime(.25,t.currentTime),e.forEach(t=>{t.connect(a)}),a.connect(r),r.connect(n),n.connect(i),i.connect(o),o.connect(s),s.connect(t.destination),e.forEach((t,e)=>{t.start(.01*e),t.stop(h.DURATION)});const l=(await t.startRendering()).getChannelData(0),u=[];for(let t=0;t<32;t++){const e=Math.floor(l.length/32*t);u.push(l[e]||0)}const f=Math.sqrt(u.reduce((t,e)=>t+e*e,0)/u.length),d=Math.max(...u.map(Math.abs)),p=u.reduce((t,e)=>t+Math.abs(e),0)/u.length;let m=0;for(let t=0;t<Math.min(u.length,16);t++){const e=u[t];void 0!==e&&(m+=t*Math.abs(e))}return c([...u,f,d,p,m].join(","))}catch(t){return c("multi_oscillator_error")}}async function p(t){try{const e=[100,440,1e3,2e3,4e3,8e3,12e3,16e3],n=[];for(const r of e){const e=t.createOscillator(),i=t.createAnalyser();e.type="sine",e.frequency.setValueAtTime(r,t.currentTime),i.fftSize=256,i.smoothingTimeConstant=0,e.connect(i),i.connect(t.destination),e.start(),e.stop(.05);const o=f();if(o){const t=o.createOscillator();t.type="sine",t.frequency.setValueAtTime(r,o.currentTime),t.connect(o.destination),t.start(),t.stop(.05);try{const t=(await o.startRendering()).getChannelData(0),e=Math.sqrt(t.reduce((t,e)=>t+e*e,0)/t.length);n.push(e)}catch{n.push(0)}}}return c(n.join(","))}catch(t){return c("frequency_response_error")}}async function m(t){try{const e=t.createOscillator(),n=t.createDynamicsCompressor();e.type="triangle",e.frequency.setValueAtTime(h.FREQUENCIES[0],t.currentTime),n.threshold.setValueAtTime(h.COMPRESSOR_THRESHOLD,t.currentTime),n.knee.setValueAtTime(h.COMPRESSOR_KNEE,t.currentTime),n.ratio.setValueAtTime(h.COMPRESSOR_RATIO,t.currentTime),n.attack.setValueAtTime(h.COMPRESSOR_ATTACK,t.currentTime),n.release.setValueAtTime(h.COMPRESSOR_RELEASE,t.currentTime),e.connect(n),n.connect(t.destination),e.start(),e.stop(h.DURATION);const r=(await t.startRendering()).getChannelData(0);return c([r[0]||0,r[Math.floor(.25*r.length)]||0,r[Math.floor(.5*r.length)]||0,r[Math.floor(.75*r.length)]||0,r[r.length-1]||0].join(","))}catch(t){return c("compressor_error")}}async function g(){const t=performance.now();try{const e=function(){try{const t=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(t)try{return new t(1,1,44100).sampleRate}catch{}const e=window.AudioContext||window.webkitAudioContext;if(e)try{const t=new e,n=t.sampleRate;return t.close().catch(()=>{}),n}catch{}}catch{}return 44100}(),n=function(){const t={};try{const e=f();if(e){t.sampleRate=e.sampleRate,t.length=e.length,t.state=e.state;const n=[],r=[8e3,22050,44100,48e3,96e3];for(const t of r)try{const e=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,1,t);e.sampleRate===t&&n.push(t),"close"in e&&"function"==typeof e.close&&e.close()}catch{}t.supportedSampleRates=n,"baseLatency"in e&&(t.baseLatency=e.baseLatency),"close"in e&&"function"==typeof e.close&&e.close()}}catch(e){t.error="context_characteristics_error"}return t}(),r={multiOsc:f(),compressor:f(),frequencyResponse:f()};if(!r.multiOsc||!r.compressor||!r.frequencyResponse)throw new Error("OfflineAudioContext not available");const[i,o,s]=await Promise.all([d(r.multiOsc).catch(()=>"multi_oscillator_error"),m(r.compressor).catch(()=>"compressor_error"),p(r.frequencyResponse).catch(()=>"frequency_response_error")]),a={};try{const t=f();if(t){const e=["createOscillator","createAnalyser","createBiquadFilter","createConvolver","createDelay","createDynamicsCompressor","createGain","createWaveShaper","createStereoPanner","createChannelSplitter","createChannelMerger"];for(const n of e)try{"function"==typeof t[n]&&(t[n](),a[n]=!0)}catch{a[n]=!1}"close"in t&&"function"==typeof t.close&&t.close()}}catch{}const l=c([i,o,s,e.toString(),JSON.stringify(n),JSON.stringify(a)].join("|")),u=performance.now();return{value:{oscillator:i,compressor:o,sampleRate:e,maxChannelCount:n.supportedSampleRates?.length||2,multiOscillatorFingerprint:i,frequencyResponseFingerprint:s,contextCharacteristics:n,nodeCapabilities:a,audioStackHash:l,supportedSampleRates:n.supportedSampleRates||[]},duration:u-t}}catch(e){return{value:{oscillator:"error",compressor:"error",sampleRate:0,maxChannelCount:0,multiOscillatorFingerprint:"error",frequencyResponseFingerprint:"error",contextCharacteristics:{},nodeCapabilities:{},audioStackHash:"error",supportedSampleRates:[]},duration:performance.now()-t,error:e instanceof Error?e.message:"Audio fingerprinting failed"}}}function y(){try{return"WebKitAppearance"in document.documentElement.style||"webkitRequestFileSystem"in window||"webkitResolveLocalFileSystemURL"in window||Boolean(window.safari)}catch{return!1}}function w(){try{return"ontouchstart"in window&&("orientation"in window||"onorientationchange"in window)&&/android/i.test(navigator.userAgent)}catch{return!1}}function b(){try{if("brave"in navigator&&navigator.brave)return!0;const t=navigator.userAgent;return!!t.includes("Brave")||!(!window.chrome||!window.chrome.runtime||window.chrome.webstore||window.navigator.getBattery||!/Chrome/.test(t))}catch{return!1}}function v(){try{const t=navigator.userAgent;return!!(t.includes("Arc/")||window.arc||window.Arc||window.chrome&&window.chrome.runtime&&/Chrome/.test(t)&&(t.includes("ArcBrowser")||"arc:"===window.location.protocol))}catch{return!1}}function S(){try{if(window.opr||window.opera)return!0;const t=navigator.userAgent;return!(!t.includes("OPR/")&&!t.includes("Opera/"))}catch{return!1}}function C(){try{return!!navigator.userAgent.includes("Vivaldi/")||!!window.vivaldi}catch{return!1}}function k(){try{const t=navigator.userAgent;return t.includes("SamsungBrowser/")||t.includes("Samsung Internet")}catch{return!1}}function I(){try{return!(b()||v()||S()||C()||A()||k())&&Boolean(window.chrome&&(window.chrome.webstore||window.chrome.runtime)&&/Chrome/.test(navigator.userAgent)&&!/Edg|OPR|Opera|Vivaldi|SamsungBrowser|Arc|Brave/.test(navigator.userAgent))}catch{return!1}}function M(){try{return"InstallTrigger"in window||"mozInnerScreenX"in window||"mozPaintCount"in window||Boolean(navigator.mozApps)}catch{return!1}}function A(){try{return"msCredentials"in navigator||Boolean(window.StyleMedia)||I()&&/edg/i.test(navigator.userAgent)}catch{return!1}}function R(){try{return y()&&!I()&&!A()&&Boolean(window.safari)&&/safari/i.test(navigator.userAgent)}catch{return!1}}function x(){try{return window.isSecureContext||"https:"===location.protocol}catch{return!1}}function E(){try{return"webkitTemporaryStorage"in navigator||navigator.storage&&navigator.storage.estimate&&navigator.storage.estimate().then(t=>(t.quota||0)<104857600),!1}catch{return!1}}function T(){return b()||v()||S()||C()||k()||I()?"Blink":A()?"EdgeHTML/Blink":M()?"Gecko":y()||R()?"WebKit":"Unknown"}function _(){const t=function(){try{if(b())return"Brave";if(v())return"Arc";if(S())return"Opera";if(C())return"Vivaldi";if(k())return"Samsung Internet";if(A())return"Edge";if(M())return"Firefox";if(R())return"Safari";if(I())return"Chrome";const t=navigator.userAgent;return/Firefox/i.test(t)&&!I()?"Firefox":/Safari/i.test(t)&&!I()?"Safari":/Chrome/i.test(t)?"Chrome":"Unknown"}catch{return"Unknown"}}(),e=T(),n=["Brave","Arc","Opera","Vivaldi","Samsung Internet","Edge","Chrome"].includes(t);let r=t.toLowerCase();return n&&"Chrome"!==t&&(r=`${t.toLowerCase()}-chromium`),{name:t,engine:e,isChromiumBased:n,family:r}}function O(){try{return"undefined"!=typeof document&&"function"==typeof document.createElement&&void 0!==document.body}catch{return!1}}function F(){try{if(!O())return!1;const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return!1;const n=e,r=n.getParameter(n.RENDERER),i=Boolean(r&&"string"==typeof r),o=n.getExtension("WEBGL_lose_context");return o&&o.loseContext(),i}catch{return!1}}function N(){try{return!(!window.AudioContext&&!window.webkitAudioContext)}catch{return!1}}function B(){const t=O(),e=function(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia}catch{return!1}}();return{engine:T(),supportsDOM:t,supportsMediaQueries:e,supportsWebGL:F(),supportsAudio:N(),isSecure:x(),isPrivateMode:E(),canRunDOMBlockers:(y()||w())&&t,canRunAccessibility:e,canRunBrowserAPIs:t&&"undefined"!=typeof navigator}}async function L(){const t=performance.now();try{const e=function(){try{const t=navigator.language||"";let e=[];navigator.languages?e=Array.from(navigator.languages):navigator.language&&(e=[navigator.language]);const n=[navigator.userLanguage,navigator.browserLanguage,navigator.systemLanguage].filter(Boolean);return e=[...new Set([...e,...n])],{language:t,languages:e}}catch{return{language:"",languages:[]}}}(),n=function(){try{let t="";if(Intl&&Intl.DateTimeFormat)try{t=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}if(!t){const e=new Date(2024,0,1).getTimezoneOffset(),n=e>0?"-":"+",r=Math.floor(Math.abs(e)/60),i=Math.abs(e)%60;t=`UTC${n}${r.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}return{timezone:t,timezoneOffset:new Date(2024,0,1).getTimezoneOffset()}}catch{return{timezone:"",timezoneOffset:0}}}(),r=function(){try{return{platform:navigator.platform||"",userAgent:navigator.userAgent||""}}catch{return{platform:"",userAgent:""}}}(),i=function(){try{const t=navigator.hardwareConcurrency||0;let e;"deviceMemory"in navigator&&(e=navigator.deviceMemory);const n={hardwareConcurrency:t};return void 0!==e&&(n.deviceMemory=e),n}catch{return{hardwareConcurrency:0}}}(),o=function(){try{const t=!1!==navigator.cookieEnabled;let e=null;return"doNotTrack"in navigator?e=navigator.doNotTrack:"msDoNotTrack"in navigator?e=navigator.msDoNotTrack:"mozDoNotTrack"in window&&(e=window.mozDoNotTrack),{cookieEnabled:t,doNotTrack:e}}catch{return{cookieEnabled:!0,doNotTrack:null}}}(),s=function(){try{if(!navigator.plugins)return{length:0,names:[]};const t=Array.from(navigator.plugins).map(t=>t.name).filter(t=>t).sort();return{length:navigator.plugins.length,names:t.slice(0,10)}}catch{return{length:0,names:[]}}}(),a=function(){try{let t=0,e=!1,n=!1;"maxTouchPoints"in navigator?t=navigator.maxTouchPoints:"msMaxTouchPoints"in navigator&&(t=navigator.msMaxTouchPoints);try{e="TouchEvent"in window}catch{e="ontouchstart"in window}return n="ontouchstart"in window,{maxTouchPoints:t,touchEvent:e,touchStart:n}}catch{return{maxTouchPoints:0,touchEvent:!1,touchStart:!1}}}(),c=function(){try{return _()}catch{return{name:"Unknown",engine:"Unknown",isChromiumBased:!1,family:"unknown"}}}(),l=performance.now(),u={language:e.language,languages:e.languages,timezone:n.timezone,timezoneOffset:n.timezoneOffset,platform:r.platform,userAgent:r.userAgent,browserInfo:c,hardwareConcurrency:i.hardwareConcurrency,cookieEnabled:o.cookieEnabled,doNotTrack:o.doNotTrack,plugins:s,touchSupport:a};return void 0!==i.deviceMemory&&(u.deviceMemory=i.deviceMemory),{value:u,duration:l-t}}catch(e){return{value:{language:"",languages:[],timezone:"",timezoneOffset:0,platform:"",userAgent:"",hardwareConcurrency:0,cookieEnabled:!0,doNotTrack:null,plugins:{length:0,names:[]},touchSupport:{maxTouchPoints:0,touchEvent:!1,touchStart:!1}},duration:performance.now()-t,error:e instanceof Error?e.message:"Browser fingerprinting failed"}}}const P=["Zap Canvas 🎨🔒2024","Żółć gęślą jaźń €$¢£¥","αβγδεζηθικλμνξο","中文测试字体渲染","🌟🎯🚀💎🌊🎨"];function D(t){t.imageSmoothingEnabled=!0,t.imageSmoothingQuality="high";const e=t.createRadialGradient(75,75,0,75,75,50);e.addColorStop(0,"rgba(255, 0, 0, 0.8)"),e.addColorStop(.3,"rgba(0, 255, 0, 0.6)"),e.addColorStop(.7,"rgba(0, 0, 255, 0.4)"),e.addColorStop(1,"rgba(255, 255, 0, 0.2)"),t.fillStyle=e,t.fillRect(10,10,130,100),t.fillStyle="rgba(102, 204, 0, 0.7)",t.fillRect(15.5,15.3,49.7,49.2),t.fillStyle="#f60",t.fillRect(70.3,10.7,50.1,50.9),t.beginPath(),t.moveTo(25.2,120.1),t.bezierCurveTo(25.2,120.1,75.8,90.3,125.5,120.7),t.bezierCurveTo(125.5,120.7,90.1,150.2,60.8,140.9),t.closePath(),t.fillStyle="rgba(200, 100, 50, 0.6)",t.fill(),t.globalCompositeOperation="multiply",t.beginPath(),t.arc(50.7,80.3,20.1,0,2*Math.PI),t.fillStyle="rgba(255, 0, 100, 0.5)",t.fill(),t.beginPath(),t.arc(70.3,80.7,20.9,0,2*Math.PI),t.fillStyle="rgba(0, 255, 100, 0.5)",t.fill(),t.globalCompositeOperation="source-over",t.strokeStyle="rgba(50, 50, 50, 0.8)",t.lineWidth=.5,t.setLineDash([2.3,1.7]);for(let e=0;e<10;e++)t.beginPath(),t.moveTo(10+13.7*e,160),t.lineTo(50+11.3*e,200),t.stroke();t.setLineDash([]);const n=document.createElement("canvas");n.width=20,n.height=20;const r=n.getContext("2d");if(r){r.fillStyle="rgba(150, 75, 200, 0.3)",r.fillRect(0,0,10,10),r.fillRect(10,10,10,10);const e=t.createPattern(n,"repeat");e&&(t.fillStyle=e,t.fillRect(150,120,80,60))}t.shadowColor="rgba(0, 0, 0, 0.5)",t.shadowBlur=3.2,t.shadowOffsetX=2.1,t.shadowOffsetY=2.7,t.fillStyle="rgba(100, 200, 150, 0.8)",t.fillRect(160,30,60,40),t.shadowColor="transparent",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0}function j(t){const e=["14px Arial, sans-serif",'13px "Times New Roman", serif',"12px Georgia, serif","15px Helvetica, Arial, sans-serif",'11px "Courier New", monospace',"13px Verdana, sans-serif","16px Impact, fantasy",'12px "Comic Sans MS", cursive'],n=["#000","#333","#666","#999","rgba(255, 0, 0, 0.8)","rgba(0, 255, 0, 0.7)","rgba(0, 0, 255, 0.6)","rgba(128, 64, 192, 0.9)"],r=["top","hanging","middle","alphabetic","bottom"],i=["left","center","right"];let o=250;P.forEach((s,a)=>{e.forEach((e,c)=>{const l=(a+c)%n.length,u=c%r.length,h=c%i.length;t.font=e,t.fillStyle=n[l]||n[0],t.textBaseline=r[u]||"top",t.textAlign=i[h]||"left";const f=10+.7*c%200,d=o+18.3*c%100;t.fillText(s,f,d),c%2==0&&(t.strokeStyle=`rgba(${100+20*c}, ${50+15*c}, ${150+10*c}, 0.5)`,t.lineWidth=.3,t.strokeText(s,f+.5,d+.5))}),o+=120}),t.save(),t.translate(100,400),t.rotate(Math.PI/6),t.scale(1.2,.8),t.font="italic 14px Arial",t.fillStyle="rgba(200, 100, 50, 0.8)",t.fillText("Transformed & Rotated Text",0,0),t.restore(),t.font="6px Arial",t.fillStyle="#000",t.fillText("Tiny text rendering test",10,500),t.font="32px Arial",t.fillStyle="rgba(255, 0, 0, 0.5)",t.fillText("Large",10,540),t.textAlign="left",t.textBaseline="top"}async function U(){const t=performance.now();try{const e=document.createElement("canvas");e.width=300,e.height=600;const n=e.getContext("2d",{alpha:!0,desynchronized:!1,colorSpace:"srgb",willReadFrequently:!0});if(!n)throw new Error("Canvas 2D context not available");n.rect(0,0,10,10),n.rect(2,2,6,6);const r=n.isPointInPath(5,5,"evenodd");j(n);const i=c(e.toDataURL("image/png"));n.clearRect(0,0,e.width,e.height),D(n);const o=c(e.toDataURL("image/png")),s=function(t,e){try{t.clearRect(0,0,e.width,e.height),t.fillStyle="rgb(100, 150, 200)",t.fillRect(10.3,10.7,20.1,20.9),t.strokeStyle="rgb(200, 100, 50)",t.lineWidth=1.3,t.beginPath(),t.moveTo(15.2,35.8),t.lineTo(25.7,45.1),t.stroke();const n=t.getImageData(10,10,30,40).data;let r=0,i=0,o=0,s=0,a=0;for(let t=0;t<n.length;t+=4){const e=n[t]||0,c=n[t+1]||0,l=n[t+2]||0;if((n[t+3]||0)>25&&(r+=e,i+=c,o+=l,a++,t>=16)){const r=n[t-16]||0,i=Math.abs(e-r);i>=8&&(s+=i)}}if(0===a)return"no-valid-pixels";return`${10*Math.round(r/a/10)}-${10*Math.round(i/a/10)}-${10*Math.round(o/a/10)}-${10*Math.round(s/a/10)}`}catch(t){return"subpixel-error"}}(n,e),a=function(t,e,n,r){const i=[];let o=0;try{const s=r.getImageData(0,0,1,1);s&&0!==s.data.length||(i.push("getImageData-blocked"),o+=3),(t.length<8||e.length<8)&&(i.push("short-hash"),o+=2);const a=["error","blocked","disabled","00000000","ffffffff","12345678"];(a.includes(t)||a.includes(e))&&(i.push("known-blocked-hash"),o+=3),("subpixel-error"===n||n.includes("0-0-0"))&&(i.push("subpixel-anomaly"),o+=2),t===e&&"error"!==t&&(i.push("identical-hashes"),o+=2);const c=document.createElement("canvas");c.width=10,c.height=10;const l=c.getContext("2d");if(l){const t=performance.now();l.fillStyle="red",l.fillRect(0,0,10,10),c.toDataURL(),performance.now()-t>50&&(i.push("slow-canvas"),o+=1)}return{isInconsistent:o>=2,confidence:Math.min(o/5,1),reasons:i}}catch(t){return{isInconsistent:!0,confidence:1,reasons:["detection-error"]}}}(i,o,s,n);n.clearRect(0,0,e.width,e.height),j(n),n.globalCompositeOperation="multiply",D(n),n.globalCompositeOperation="source-over";const l=c(e.toDataURL("image/png")),u=performance.now();return{value:{text:i,geometry:o,winding:r,isInconsistent:a.isInconsistent,subPixelAnalysis:s,compositeHash:l,inconsistencyConfidence:a.confidence,blockingReasons:a.reasons},duration:u-t}}catch(e){return{value:{text:"error",geometry:"error",winding:!1,isInconsistent:!0,subPixelAnalysis:"error",compositeHash:"error",inconsistencyConfidence:1,blockingReasons:["canvas-error"]},duration:performance.now()-t,error:e instanceof Error?e.message:"Canvas fingerprinting failed"}}}const G=["Arial","Arial Black","Calibri","Cambria","Comic Sans MS","Consolas","Courier New","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Microsoft Sans Serif","Palatino Linotype","Segoe UI","Tahoma","Times New Roman","Trebuchet MS","Verdana","American Typewriter","Avenir","Baskerville","Big Caslon","Brush Script MT","Copperplate","Didot","Futura","Gill Sans","Helvetica","Helvetica Neue","Hoefler Text","Lucida Grande","Marker Felt","Optima","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","System Font","Zapfino","DejaVu Sans","DejaVu Sans Mono","DejaVu Serif","Droid Sans","Droid Sans Mono","Droid Serif","Liberation Sans","Liberation Sans Narrow","Liberation Serif","Ubuntu","Ubuntu Mono","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Droid Sans","Droid Sans Mono","Droid Serif","Helvetica Neue","Arial","Helvetica","Courier New","Times New Roman","San Francisco","Avenir Next","Open Sans","Lato","Montserrat","Source Sans Pro","Raleway","PT Sans","Lora","Playfair Display","Oswald","Slabo 27px","Fira Sans","Hiragino Sans","Hiragino Kaku Gothic ProN","Meiryo","MS Gothic","MS Mincho","SimSun","SimHei","Microsoft YaHei","Malgun Gothic","Apple SD Gothic Neo"],W=["monospace","sans-serif","serif"],$="mmMwWLliI0O&1 ※";function V(t,e){const n=document.createElement("canvas").getContext("2d");if(!n)return{width:0,height:0};n.font=`12px ${e}`;const r=n.measureText(t);return{width:r.width,height:r.actualBoundingBoxAscent+r.actualBoundingBoxDescent}}function Z(t,e){const n=document.createElement("span");n.style.position="absolute",n.style.left="-9999px",n.style.top="-9999px",n.style.fontSize="12px",n.style.fontFamily=e,n.style.whiteSpace="nowrap",n.textContent=t,document.body.appendChild(n);const r=n.getBoundingClientRect(),i={width:r.width,height:r.height};return document.body.removeChild(n),i}function Y(t,e="canvas"){const n="canvas"===e?V:Z,r=W.map(t=>n($,t)),i=W.map(e=>n($,`${t}, ${e}`));for(let t=0;t<r.length;t++){const e=r[t],n=i[t];if(e&&n){const t=Math.abs(e.width-n.width),r=Math.abs(e.height-n.height);if(t>.1||r>.1)return!0}}return!1}function z(t){return 10*Math.round(t/10)}async function H(){const t=performance.now();try{const e=function(){try{return{width:screen.width||0,height:screen.height||0}}catch{return{width:0,height:0}}}(),n=screen.colorDepth||screen.pixelDepth||0,r=function(){try{return window.devicePixelRatio||1}catch{return 1}}(),i=function(){try{const t=screen.availWidth||0,e=screen.availHeight||0;return 0===t&&0===e?{width:z(screen.width||0),height:z(screen.height||0)}:{width:z(t),height:z(e)}}catch{return{width:z(screen.width||0),height:z(screen.height||0)}}}(),o=function(){try{const t=document.documentElement,e=Math.max(t.clientWidth||0,window.innerWidth||0),n=Math.max(t.clientHeight||0,window.innerHeight||0);return{width:z(e),height:z(n)}}catch{const t=window.innerWidth||0,e=window.innerHeight||0;return{width:z(t),height:z(e)}}}(),s=function(){try{if(screen.orientation)return{angle:screen.orientation.angle,type:screen.orientation.type};const t=screen.mozOrientation||screen.msOrientation||screen.webkitOrientation;if(void 0!==t)return{angle:t,type:"unknown"};const e=screen.width>screen.height;return{angle:e?90:0,type:e?"landscape-primary":"portrait-primary"}}catch{return}}(),a=performance.now(),c={width:e.width,height:e.height,colorDepth:n,pixelRatio:r,availableWidth:i.width,availableHeight:i.height,viewportWidth:o.width,viewportHeight:o.height};return s&&(c.orientation=s),{value:c,duration:a-t}}catch(e){return{value:{width:0,height:0,colorDepth:0,pixelRatio:1,viewportWidth:0,viewportHeight:0,availableWidth:0,availableHeight:0},duration:performance.now()-t,error:e instanceof Error?e.message:"Screen fingerprinting failed"}}}let X=null,J=0,K=0;function q(){try{const t=performance.now();if(X&&X.isValid)if(t-X.timestamp<18e5){if(X.context&&!X.context.isContextLost())return X.usageCount++,X.lastUsed=t,X.context;Q()}else Q();if(J>=8)return console.warn("[WebGL Cache] Maximum context limit reached, reusing existing contexts"),null;const e=function(){try{if("undefined"==typeof document)return null;const t=document.createElement("canvas");return t.width=1,t.height=1,t}catch{return null}}();if(!e)return null;const n=function(t){try{const e={alpha:!1,antialias:!1,depth:!1,stencil:!1,preserveDrawingBuffer:!1,failIfMajorPerformanceCaveat:!0,powerPreference:"default"};return t.getContext("webgl",e)||t.getContext("experimental-webgl",e)}catch{return null}}(e);return n?(J++,K++,X={context:n,canvas:e,timestamp:t,isValid:!0,usageCount:1,lastUsed:t},n):null}catch(t){return Q(),null}}function Q(){if(X){try{if(X.context){const t=X.context.getExtension("WEBGL_lose_context");t&&t.loseContext()}X.canvas&&(X.canvas.width=0,X.canvas.height=0),J>0&&J--}catch{J>0&&J--}X.isValid=!1,X=null}}function tt(){if(!X||!X.context)return!1;try{return!X.context.isContextLost()}catch{return!1}}function et(){const t=q();if(!t)return[];try{const e=t.getSupportedExtensions();return e?Array.from(e).sort():[]}catch{return[]}}function nt(){const t=q();if(!t)return{};try{const e={},n=["VERSION","VENDOR","RENDERER","SHADING_LANGUAGE_VERSION","MAX_TEXTURE_SIZE","MAX_RENDERBUFFER_SIZE","MAX_VIEWPORT_DIMS","MAX_VERTEX_ATTRIBS","MAX_VERTEX_UNIFORM_VECTORS","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_VARYING_VECTORS"];for(const r of n)try{const n=t[r];void 0!==n&&(e[r]=t.getParameter(n))}catch{}return e}catch{return{}}}function rt(){try{Q(),J=0,K=0}catch(t){console.warn("[WebGL Cache] Cleanup error:",t)}}if("undefined"!=typeof window&&(window.addEventListener("beforeunload",rt),window.addEventListener("pagehide",rt),window.addEventListener("unload",rt),document.addEventListener("visibilitychange",()=>{}),"memory"in performance&&"function"==typeof performance.memory.addEventListener))try{performance.memory.addEventListener("memorypressure",rt)}catch(t){}var it=Object.freeze({__proto__:null,cleanupWebGLCache:rt,forceCleanupWebGL:function(){Q(),J=0},getCachedWebGLContext:q,getCachedWebGLExtensions:et,getCachedWebGLParameters:nt,invalidateWebGLCache:Q,isWebGLContextValid:tt});const ot={VENDOR:7936,RENDERER:7937,VERSION:7938,SHADING_LANGUAGE_VERSION:35724,MAX_VERTEX_ATTRIBS:34921,MAX_TEXTURE_SIZE:3379,MAX_RENDERBUFFER_SIZE:34024,MAX_VIEWPORT_DIMS:3386,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661};function st(t,e,n){const r=t.createShader(e);return r?(t.shaderSource(r,n),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)?r:(t.deleteShader(r),null)):null}function at(t){try{const e=t.getParameter(t.VENDOR)||"unknown",n=t.getParameter(t.RENDERER)||"unknown",r=t.getParameter(t.VERSION)||"unknown",i=`${e}|${n}|${r}|${t.getParameter(t.MAX_TEXTURE_SIZE)||0}|${t.getParameter(t.MAX_VERTEX_ATTRIBS)||0}|${t.getParameter(t.MAX_VIEWPORT_DIMS)||[0,0]}`;let o=0;for(let t=0;t<i.length;t++)o=(o<<5)-o+i.charCodeAt(t)&4294967295;return`fallback_${Math.abs(o).toString(16)}`}catch{return"webgl_unavailable"}}async function ct(){const t=performance.now();try{if(!ut())throw new Error("WebGL not supported in this browser");const e=q();if(!e)throw new Error("WebGL context not available");if(!tt())throw new Error("WebGL context lost");const n=function(){try{return nt()}catch{return{}}}(),r=n.VENDOR||"unknown",i=n.RENDERER||"unknown",o=n.VERSION||"unknown";let s=r,a=i;for(let t=0;t<3;t++)try{const t=e.getExtension("WEBGL_debug_renderer_info");if(t){const n=e.getParameter(t.UNMASKED_VENDOR_WEBGL),r=e.getParameter(t.UNMASKED_RENDERER_WEBGL);n&&"unknown"!==n&&(s=n),r&&"unknown"!==r&&(a=r);break}}catch(e){if(2===t)break;await new Promise(t=>setTimeout(t,10))}const c=function(){try{return et()}catch{return[]}}(),l=function(t){const e={};return Object.entries(ot).forEach(([n,r])=>{const i=function(t,e){try{return t.getParameter(e)}catch{return null}}(t,r);null!==i&&(e[n]=Array.isArray(i)?i.join(","):i)}),["UNMASKED_VENDOR_WEBGL","UNMASKED_RENDERER_WEBGL"].forEach(n=>{try{const r=t.getExtension("WEBGL_debug_renderer_info");if(r){const i=r[n];if(void 0!==i){const r=t.getParameter(i);r&&(e[n]=r)}}}catch{}}),e}(e),u=function(t){const e=[],n=[];try{const r=[t.LOW_FLOAT,t.MEDIUM_FLOAT,t.HIGH_FLOAT,t.LOW_INT,t.MEDIUM_INT,t.HIGH_INT],i=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"];for(let o=0;o<r.length;o++){const s=r[o];if(void 0===s)continue;const a=t.getShaderPrecisionFormat(t.VERTEX_SHADER,s),c=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,s);a&&e.push(`${i[o]}:${a.precision},${a.rangeMin},${a.rangeMax}`),c&&n.push(`${i[o]}:${c.precision},${c.rangeMin},${c.rangeMax}`)}}catch{}return{vertex:e.join(";"),fragment:n.join(";")}}(e),h=function(t){try{const e="\n attribute vec2 a_position;\n attribute vec3 a_color;\n varying vec3 v_color;\n uniform float u_time;\n \n void main() {\n // Complex mathematical operations to differentiate GPUs\n float wave = sin(a_position.x * 10.0 + u_time) * 0.1;\n vec2 position = a_position + vec2(wave, cos(a_position.y * 8.0) * 0.1);\n \n // GPU-specific floating point calculations\n float precision = sin(position.x * 123.456) + cos(position.y * 789.012);\n position += vec2(precision * 0.001);\n \n gl_Position = vec4(position, 0.0, 1.0);\n v_color = a_color;\n }\n ",n="\n precision mediump float;\n varying vec3 v_color;\n uniform float u_time;\n \n void main() {\n // Complex color calculations that vary between GPU vendors\n vec3 color = v_color;\n color.r += sin(gl_FragCoord.x * 0.1 + u_time) * 0.1;\n color.g += cos(gl_FragCoord.y * 0.1 + u_time) * 0.1;\n color.b += sin((gl_FragCoord.x + gl_FragCoord.y) * 0.05) * 0.1;\n \n // GPU-specific precision in color calculations\n color = normalize(color) * length(v_color);\n \n gl_FragColor = vec4(color, 1.0);\n }\n ",r=st(t,t.VERTEX_SHADER,e),i=st(t,t.FRAGMENT_SHADER,n);if(!r||!i)return at(t);const o=function(t,e,n){const r=t.createProgram();return r?(t.attachShader(r,e),t.attachShader(r,n),t.linkProgram(r),t.getProgramParameter(r,t.LINK_STATUS)?r:(t.deleteProgram(r),null)):null}(t,r,i);if(!o)return at(t);t.useProgram(o);const s=new Float32Array([-.8,-.6,1,.2,.3,0,.8,.3,1,.2,.8,-.6,.2,.3,1,-.5,-.2,.8,.9,.1,.3,.6,.1,.8,.9,.7,-.3,.9,.1,.8]),a=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,s,t.STATIC_DRAW);const c=t.getAttribLocation(o,"a_position"),l=t.getAttribLocation(o,"a_color"),u=t.getUniformLocation(o,"u_time");t.enableVertexAttribArray(c),t.enableVertexAttribArray(l),t.vertexAttribPointer(c,2,t.FLOAT,!1,20,0),t.vertexAttribPointer(l,3,t.FLOAT,!1,20,8),t.uniform1f(u,1.23456789),t.enable(t.BLEND),t.blendFunc(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA),t.clearColor(.1,.2,.3,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLES,0,6);const h=new Uint8Array(t.canvas.width*t.canvas.height*4);t.readPixels(0,0,t.canvas.width,t.canvas.height,t.RGBA,t.UNSIGNED_BYTE,h);let f=0;for(let t=0;t<h.length;t+=4){const e=1*(h[t]??0);f=33*f+(e+256*(h[t+1]??0)+65536*(h[t+2]??0)+16777216*(h[t+3]??0))>>>0}return t.deleteProgram(o),t.deleteShader(r),t.deleteShader(i),t.deleteBuffer(a),f.toString(16)}catch(e){return at(t)}}(e),f=function(t){const e={};try{const n=t.getExtension("WEBGL_debug_renderer_info");n&&(e.unmaskedVendor=t.getParameter(n.UNMASKED_VENDOR_WEBGL),e.unmaskedRenderer=t.getParameter(n.UNMASKED_RENDERER_WEBGL)),e.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),e.maxCombinedTextureImageUnits=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),e.maxViewportDims=t.getParameter(t.MAX_VIEWPORT_DIMS),e.maxRenderbufferSize=t.getParameter(t.MAX_RENDERBUFFER_SIZE),e.maxVertexAttribs=t.getParameter(t.MAX_VERTEX_ATTRIBS),e.maxVertexUniformVectors=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),e.maxFragmentUniformVectors=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),e.maxVaryingVectors=t.getParameter(t.MAX_VARYING_VECTORS),e.antialias=t.getContextAttributes()?.antialias||!1;const r=t.getExtension("OES_texture_float");e.floatTextures=!!r;const i=t.getExtension("OES_texture_half_float");e.halfFloatTextures=!!i;const o=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS);e.compressedTextureFormats=Array.isArray(o)?o.length:0;const s=t instanceof WebGL2RenderingContext;if(e.webgl2=s,s){const n=t;e.maxColorAttachments=n.getParameter(n.MAX_COLOR_ATTACHMENTS),e.maxDrawBuffers=n.getParameter(n.MAX_DRAW_BUFFERS),e.maxTexture3DSize=n.getParameter(n.MAX_3D_TEXTURE_SIZE)}const a=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE);e.lineWidthRange=Array.isArray(a)?a.join(","):"";const c=t.getParameter(t.ALIASED_POINT_SIZE_RANGE);e.pointSizeRange=Array.isArray(c)?c.join(","):""}catch(t){}return e}(e),d=(()=>{const t=`${s||r||""}|${a||i||""}`.toLowerCase();let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)&4294967295;return Math.abs(e).toString(16)})(),p=performance.now();return{value:{vendor:s,renderer:a,version:o,extensions:c,parameters:l,shaderPrecision:u,renderHash:h,capabilities:f,vendorRendererHash:d,contextAttributes:e.getContextAttributes()||{}},duration:p-t}}catch(e){return{value:{vendor:"unknown",renderer:"unknown",version:"unknown",extensions:[],parameters:{},shaderPrecision:{vertex:"",fragment:""},renderHash:"",capabilities:{},vendorRendererHash:"",contextAttributes:{}},duration:performance.now()-t,error:e instanceof Error?e.message:"WebGL fingerprinting failed"}}}let lt=null;function ut(){if(null!==lt)return lt;try{const t=document.createElement("canvas");t.width=1,t.height=1;const e=t.getContext("webgl",{failIfMajorPerformanceCaveat:!0,antialias:!1,alpha:!1,depth:!1,stencil:!1,preserveDrawingBuffer:!1})||t.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0,antialias:!1,alpha:!1,depth:!1,stencil:!1,preserveDrawingBuffer:!1}),n=null!==e;if(e&&"getExtension"in e)try{const t=e.getExtension("WEBGL_lose_context");t&&t.loseContext()}catch(t){}return t.width=0,t.height=0,lt=n,n}catch{return lt=!1,!1}}function ht(){try{for(const t of["rec2020","p3","srgb"]){const e=kt(`(color-gamut: ${t})`);if(e?.matches)return t}return"unknown"}catch{return"unknown"}}function ft(){try{const t=kt("(forced-colors: active)");if(t?.matches)return!0;const e=kt("(forced-colors: none)");return!e?.matches&&null}catch{return null}}function dt(){try{const t=["no-preference","high","more","low","less","forced"];for(const e of t){const t=kt(`(prefers-contrast: ${e})`);if(t?.matches)return"high"===e?"more":"low"===e?"less":e}return"unknown"}catch{return"unknown"}}function pt(){try{const t=kt("(prefers-reduced-motion: reduce)");if(t?.matches)return!0;const e=kt("(prefers-reduced-motion: no-preference)");return!e?.matches&&null}catch{return null}}function mt(){try{return!!matchMedia("(prefers-reduced-transparency: reduce)").matches||!matchMedia("(prefers-reduced-transparency: no-preference)").matches&&null}catch{return null}}function gt(){try{for(let t=8;t>=0;t--)if(matchMedia(`(monochrome: ${t})`).matches)return t;return 0}catch{return 0}}function yt(){try{return!!matchMedia("(inverted-colors: inverted)").matches||!matchMedia("(inverted-colors: none)").matches&&null}catch{return null}}function wt(){try{return!!matchMedia("(dynamic-range: high)").matches||!matchMedia("(dynamic-range: standard)").matches&&null}catch{return null}}function bt(){try{const t=[48,36,30,24,16,15,8];for(const e of t)if(matchMedia(`(color: ${e})`).matches)return e;return screen.colorDepth||24}catch{return screen.colorDepth||24}}function vt(){try{return matchMedia("(hover: hover)").matches?"hover":matchMedia("(hover: none)").matches?"none":"unknown"}catch{return"unknown"}}function St(){try{return matchMedia("(pointer: fine)").matches?"fine":matchMedia("(pointer: coarse)").matches?"coarse":matchMedia("(pointer: none)").matches?"none":"unknown"}catch{return"unknown"}}function Ct(){return B().canRunAccessibility}function kt(t){try{return Ct()?matchMedia(t):null}catch(t){return null}}function It(){try{return!!matchMedia("(prefers-reduced-data: reduce)").matches||!matchMedia("(prefers-reduced-data: no-preference)").matches&&null}catch{return null}}function Mt(){try{const t=["fullscreen","standalone","minimal-ui","browser"];for(const e of t)if(matchMedia(`(display-mode: ${e})`).matches)return e;return"unknown"}catch{return"unknown"}}function At(){try{const t=["opaque","additive","subtractive"];for(const e of t)if(matchMedia(`(environment-blending: ${e})`).matches)return e;return"unknown"}catch{return"unknown"}}function Rt(){try{return!!matchMedia("(any-hover: hover)").matches||!matchMedia("(any-hover: none)").matches&&null}catch{return null}}function xt(){try{return matchMedia("(any-pointer: fine)").matches?"fine":matchMedia("(any-pointer: coarse)").matches?"coarse":matchMedia("(any-pointer: none)").matches?"none":"unknown"}catch{return"unknown"}}function Et(){try{return matchMedia("(prefers-color-scheme: dark)").matches?"dark":matchMedia("(prefers-color-scheme: light)").matches?"light":matchMedia("(prefers-color-scheme: no-preference)").matches?"no-preference":"unknown"}catch{return"unknown"}}function Tt(){const t=ht(),e=ft(),n=dt(),r=pt(),i=mt(),o=gt(),s=yt(),a=wt(),c=bt(),l=vt(),u=St(),h=It(),f=Mt(),d=At(),p=Rt(),m=xt(),g=Et(),y=Boolean(e||r||i||s||h||"no-preference"!==n||"no-preference"!==g||o>0),w=[t,a?"hdr":"sdr",`${c}bit`,o>0?`mono${o}`:"color",g,f,d].join("-"),b=[l,u,p?"anyhover":"nohover",m].join("-");return{colorGamut:t,forcedColors:e,contrastPreference:n,reducedMotion:r,reducedTransparency:i,monochromeDepth:o,invertedColors:s,hdrSupport:a,enhancedColorDepth:c,hoverCapability:l,pointerCapability:u,reducedData:h,displayMode:f,environmentBlending:d,anyHover:p,anyPointer:m,colorScheme:g,hasAccessibilityFeatures:y,displayCapabilities:w,interactionCapabilities:b}}function _t(t){const e=["unknown"!==t.colorGamut,null!==t.forcedColors,"unknown"!==t.contrastPreference,null!==t.reducedMotion,null!==t.reducedTransparency,null!==t.invertedColors,null!==t.hdrSupport,null!==t.reducedData,"unknown"!==t.displayMode,"unknown"!==t.environmentBlending,null!==t.anyHover,"unknown"!==t.colorScheme],n=e.filter(Boolean).length/e.length,r=[null!==t.reducedData,"unknown"!==t.displayMode,"unknown"!==t.environmentBlending,"unknown"!==t.colorScheme,null!==t.hdrSupport],i=r.filter(Boolean).length/r.length,o=[!0===t.forcedColors,!0===t.reducedMotion,!0===t.reducedTransparency,!0===t.invertedColors,!0===t.reducedData,"no-preference"!==t.contrastPreference,"dark"===t.colorScheme,t.monochromeDepth>0],s=o.filter(Boolean).length/o.length,a=["srgb"!==t.colorGamut,!0===t.forcedColors,!0===t.reducedMotion,!0===t.reducedTransparency,!0===t.invertedColors,!0===t.reducedData,t.monochromeDepth>0,!0===t.hdrSupport,"browser"!==t.displayMode,"opaque"!==t.environmentBlending,"dark"===t.colorScheme],c=a.filter(Boolean).length/a.length;return{confidence:Math.round(100*n)/100,uniqueness:Math.round(100*c)/100,accessibilityScore:Math.round(100*s)/100,modernBrowserScore:Math.round(100*i)/100}}var Ot=Object.freeze({__proto__:null,analyzeAccessibilityFingerprint:_t,getAccessibilityFingerprint:Tt,getAnyHover:Rt,getAnyPointer:xt,getColorGamut:ht,getColorScheme:Et,getContrastPreference:dt,getDisplayMode:Mt,getEnhancedColorDepth:bt,getEnvironmentBlending:At,getForcedColors:ft,getHDRSupport:wt,getHoverCapability:vt,getInvertedColors:yt,getMonochromeDepth:gt,getPointerCapability:St,getReducedData:It,getReducedMotion:pt,getReducedTransparency:mt,isAccessibilityDetectionAvailable:Ct});function Ft(t){if("number"==typeof t)return{confidence:0,uniqueness:0,intlApiSupport:0,localeComplexity:0};const e=Object.values(t.intlSupport).filter(Boolean).length/Object.keys(t.intlSupport).length,n=[t.locale,t.calendar,t.numberingSystem,t.timeZone,t.dateStyle,t.timeStyle,t.hourCycle,t.numberLocale,t.currencyDisplay,t.currencySign,t.notation,t.signDisplay,t.listStyle,t.relativeTimeStyle,t.pluralRules],r=n.filter(t=>"unknown"!==t&&""!==t).length/n.length,i=[t.locale.length>2?1:0,"gregory"!==t.calendar?1:0,"latn"!==t.numberingSystem?1:0,t.hour12?1:0,t.localeMatch?0:1].reduce((t,e)=>t+e,0)/5,o=(r+e+i)/3;return{confidence:Math.round(100*r)/100,uniqueness:Math.round(100*o)/100,intlApiSupport:Math.round(100*e)/100,localeComplexity:Math.round(100*i)/100}}const Nt="mmMwWLliI0fiflO&1",Bt={default:{text:Nt},serif:{style:{fontFamily:"serif"},text:Nt},sans:{style:{fontFamily:"sans-serif"},text:Nt},mono:{style:{fontFamily:"monospace"},text:Nt},apple:{style:{font:"-apple-system-body"},text:Nt},system:{style:{fontFamily:"system-ui"},text:Nt},min:{style:{fontSize:"1px"},text:Nt},large:{style:{fontSize:"72px"},text:Nt},ui:{style:{fontFamily:"ui-serif"},text:Nt},emoji:{style:{fontFamily:"Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji"},text:"🎯🔥💯"},math:{style:{fontFamily:"STIX Two Math, Cambria Math"},text:"∑∆∇∂"},cjk:{style:{fontFamily:"Hiragino Sans, Microsoft YaHei, SimSun"},text:"中文测试"},arabic:{style:{fontFamily:"Tahoma, Arial Unicode MS"},text:"اختبار"},hebrew:{style:{fontFamily:"Tahoma, Arial Unicode MS"},text:"בדיקה"},subpixel:{style:{fontFamily:"Arial",fontSize:"11px",textRendering:"optimizeLegibility"},text:Nt},kerning:{style:{fontFamily:"Times",fontSize:"24px",fontKerning:"normal"},text:"AV To"},ligatures:{style:{fontFamily:"Times",fontSize:"24px",fontVariantLigatures:"common-ligatures"},text:"ffi ffl fi fl"}};function Lt(t,e,n){try{const r="mmmmmmmmmmlli",i=Pt(t,e,{style:{fontFamily:n},text:r}),o=Pt(t,e,{style:{fontFamily:"monospace"},text:r});if(Math.abs(i-o)<1)return"monospace-fallback";const s=Pt(t,e,{style:{fontFamily:"sans-serif"},text:r});return Math.abs(i-s)<1?"sans-serif-fallback":"native-font"}catch(t){return"fallback-error"}}function Pt(t,e,n){const r=t.createElement("span"),{style:i={},text:o=Nt}=n;r.textContent=o,r.style.cssText="position: absolute; left: 0; top: 0; white-space: nowrap; visibility: hidden;",Object.entries(i).forEach(([t,e])=>{void 0!==e&&(r.style[t]=e)}),e.appendChild(r);const s=r.getBoundingClientRect().width;return e.removeChild(r),Math.round(100*s)/100}function Dt(t){const e=[t.default,t.serif,t.sans,t.mono,t.apple,t.system,t.min,t.large,t.ui,t.emoji,t.math,t.cjk,t.arabic,t.hebrew,t.subpixel,t.kerning,t.ligatures],n=e.some(t=>t>0),r=e.filter(t=>t>0).length,i=e.length;let o=n?r/i:0;(t.antiAliasing.enabled||t.systemFontHints.clearType)&&(o+=.2),Object.keys(t.fallbackBehavior).length>0&&(o+=.1),o=Math.min(o,1);const s=t.apple>0||t.system>0,a=[t.subpixel,t.kerning,t.ligatures,t.emoji,t.math].some(t=>t>0)||t.antiAliasing.enabled||t.systemFontHints.clearType,c=e.reduce((t,e)=>t+e,0)/e.length,l=e.reduce((t,e)=>t+Math.pow(e-c,2),0)/e.length;let u=Math.min(l/100,1);t.antiAliasing.smoothingLevel>0&&(u+=.1),t.systemFontHints.hintingLevel>0&&(u+=.1),u=Math.min(u,1);let h="low";const f=t.antiAliasing.smoothingLevel;f>50||t.systemFontHints.clearType?h="high":(f>20||t.systemFontHints.hintingLevel>2)&&(h="medium");const d="error"!==t.isolatedHash&&t.isolatedHash.length>0;return{confidence:Math.round(100*o)/100,uniqueness:Math.round(100*u)/100,hasSystemFonts:s,hasAdvancedFeatures:a,renderingQuality:h,isolationIntegrity:d}}const jt=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF","Arial","Arial Black","Comic Sans MS","Courier New","Georgia","Impact","Palatino Linotype","Tahoma","Times New Roman","Trebuchet MS","Verdana","American Typewriter","Avenir","Baskerville","Big Caslon","Brush Script MT","Copperplate","Didot","Futura","Helvetica","Hoefler Text","Lucida Grande","Marker Felt","Optima","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","Zapfino","DejaVu Sans","DejaVu Sans Mono","DejaVu Serif","Liberation Sans","Liberation Serif","Ubuntu","Ubuntu Mono"],Ut="mmMwWLliI0O&1",Gt="48px",Wt=["monospace","sans-serif","serif"];function $t(t,e){const n=t.createElement("span");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.fontFamily=e,n.style.fontSize=Gt,n.style.whiteSpace="nowrap",n.textContent=Ut,n}function Vt(t,e,n){return $t(t,`'${e}',${n}`)}function Zt(t,e){return Wt.some((n,r)=>{const i=t[r],o=e[n];return!(!i||!o||i.offsetWidth===o.width&&i.offsetHeight===o.height)})}function Yt(t){const{available:e,method:n,precision:r,totalTested:i,detectionTime:o}=t;let s=.5;"iframe"===n?s=.9:"dom"===n&&(s=.7),s*=r;const a=e.filter(t=>["Calibri","Segoe UI Light","MS UI Gothic","Arial Unicode MS"].includes(t)).length,c=e.filter(t=>["Helvetica Neue","Avenir","Menlo","Zapfino","Baskerville"].includes(t)).length,l=e.filter(t=>["DejaVu Sans","Liberation Sans","Ubuntu"].includes(t)).length,u=e.filter(t=>["sans-serif-thin","Roboto"].includes(t)).length;let h="unknown";a>=2?h="windows":c>=2?h="macos":l>=1?h="linux":u>=1&&(h="android");const f=Math.min(o<100?1:.8,1),d=["Arial","Times New Roman","Helvetica"],p=e.filter(t=>!d.includes(t)),m=Math.min(p.length/10,1);return{confidence:Math.round(100*s)/100,uniqueness:Math.round(100*m)/100,osSignature:h,browserCapabilities:Math.round(100*f)/100}}function zt(t){return`${t.available.sort().join(",")}|${t.method}|${t.precision.toFixed(2)}`}const Ht=Math,Xt=()=>0;function Jt(){const t=Ht.acos||Xt,e=Ht.acosh||Xt,n=Ht.asin||Xt,r=Ht.asinh||Xt,i=Ht.atanh||Xt,o=Ht.atan||Xt,s=Ht.sin||Xt,a=Ht.sinh||Xt,c=Ht.cos||Xt,l=Ht.cosh||Xt,u=Ht.tan||Xt,h=Ht.tanh||Xt,f=Ht.exp||Xt,d=Ht.expm1||Xt,p=Ht.log1p||Xt,m=Ht.cbrt||Xt,g=Ht.hypot||Xt,y=Ht.log10||Xt,w=Ht.log2||Xt;return{acos:t(.12312423423423424),asin:n(.12312423423423424),atan:o(.5),cos:c(10.000000000123),sin:s(-1e300),tan:u(-1e300),acosh:e(1e308),asinh:r(1),atanh:i(.5),cosh:l(1),sinh:a(1),tanh:h(1),exp:f(1),expm1:d(1),log1p:p(10),powPI:Ht.pow(Ht.PI,-100),cbrt:m(27),hypot:g(3,4),log10:y(100),log2:w(8),acoshPf:(b=1e154,Ht.log(b+Ht.sqrt(b*b-1))),asinhPf:Ht.log(1+Ht.sqrt(2)),atanhPf:Ht.log(3)/2,sinhPf:(Ht.exp(1)-Ht.exp(-1))/2,coshPf:(Ht.exp(1)+Ht.exp(-1))/2,expm1Pf:Ht.exp(1)-1,tanhPf:(Ht.exp(2)-1)/(Ht.exp(2)+1),log1pPf:Ht.log(11),precision:{float32:Ht.abs(0),float64:Ht.abs(2-2.0000000000000004),bigNumbers:Ht.abs(1),smallNumbers:Ht.abs(1e-15+2e-15-3e-15)}};var b}function Kt(){try{const t=Jt();return[t.acos,t.asin,t.atan,t.cos,t.sin,t.tan,t.acosh,t.asinh,t.atanh,t.cosh,t.sinh,t.tanh,t.exp,t.expm1,t.log1p,t.powPI,t.cbrt,t.hypot,t.log10,t.log2,t.precision.float32,t.precision.float64,t.precision.bigNumbers,t.precision.smallNumbers].join(",")}catch{return"math-unavailable"}}function qt(t){let e=.9,n=.8;Object.values(t).some(t=>"number"==typeof t&&0!==t)||(e=.1,n=.1),e*=Object.values(t.precision).reduce((t,e)=>t+("number"!=typeof e||isNaN(e)?0:1),0)/4;let r="high";return e<.3?r="low":e<.7&&(r="medium"),{confidence:Math.round(100*e)/100,stability:r,uniqueness:Math.round(100*n)/100}}const Qt={gdprMode:!1,includeInvasive:!0,timeout:5e3,debug:!1,excludeComponents:[]},te=new Map;function ee(t,e){return!(e.excludeComponents.includes(t)||e.gdprMode&&!e.includeInvasive&&["canvas","webgl","audio","fontPreferences","enhancedFonts"].includes(t)||(["mathFingerprint","dateTimeLocale","accessibilityEnhanced","fontPreferences","enhancedFonts"].includes(t),0))}function ne(t,e){te.set(t,e)}async function re(t,e,n){const r=`${t}_${n.gdprMode}`,i=(o=r,te.get(o)||null);var o;if(i)return i;const s="webgl"===t,a=["canvas","webgl","audio","hardware","system"].includes(t),c=s?2:a?3:1,l=s?[200,500]:[100,250,500];for(let i=0;i<c;i++)try{const o=n.timeout+i*(s?2e3:1e3),a=new Promise((e,n)=>{setTimeout(()=>n(new Error(`${t} timeout after ${o}ms (attempt ${i+1})`)),o)}),c=await Promise.race([e(),a]);if(null!=c)return ne(r,c),c;throw new Error(`${t} returned null/undefined result`)}catch(e){const n=i===c-1,r=e instanceof Error?e.message:String(e);if(s&&r.includes("context")){console.warn(`[RabbitTracker] WebGL context issue detected: ${r}`);try{const{forceCleanupWebGL:t}=await Promise.resolve().then(function(){return it});t()}catch(t){}return null}if(n)return console.warn(`[RabbitTracker] Component ${t} failed after ${c} attempts: ${r}`),null;!r.includes("timeout")&&i<l.length&&await new Promise(t=>setTimeout(t,l[i])),s&&await new Promise(t=>setTimeout(t,100))}return null}async function ie(t={}){const e=performance.now(),n={...Qt,...t},r=[],i=[],o={collectionTime:e,gdprMode:n.gdprMode,components:[]},s=[];if(ee("canvas",n)&&function(){try{const t=document.createElement("canvas").getContext("2d");return null!==t&&"function"==typeof t.fillText}catch{return!1}}()&&s.push(re("canvas",U,n).then(t=>({component:"canvas",result:t}))),ee("webgl",n)&&ut()&&s.push(re("webgl",ct,n).then(t=>({component:"webgl",result:t}))),ee("audio",n)&&function(){try{return"function"==typeof(window.OfflineAudioContext||window.webkitOfflineAudioContext)||"function"==typeof(window.AudioContext||window.webkitAudioContext)}catch{return!1}}()&&s.push(re("audio",g,n).then(t=>({component:"audio",result:t}))),ee("fonts",n)&&function(){try{const t=document.createElement("span");return t&&"object"==typeof t.style}catch{return!1}}()&&s.push(re("fonts",()=>async function(t=!0){const e=performance.now();try{let n;if(t&&function(){try{const t=document.createElement("canvas").getContext("2d");return null!==t&&"function"==typeof t.measureText}catch{return!1}}()){const{available:t,measurements:e}=function(){const t=[],e={};for(const n of G)try{const r=V($,n);e[n]=r,Y(n,"canvas")&&t.push(n)}catch(t){continue}return{available:t,measurements:e}}();n={available:t.sort(),method:"advanced",measurements:e}}else n={available:function(){const t=[];for(const e of G)try{Y(e,"dom")&&t.push(e)}catch(t){continue}return t}().sort(),method:"basic"};return{value:n,duration:performance.now()-e}}catch(t){return{value:{available:[],method:"basic"},duration:performance.now()-e,error:t instanceof Error?t.message:"Font detection failed"}}}(!n.gdprMode),n).then(t=>({component:"fonts",result:t}))),ee("screen",n)&&function(){try{return"object"==typeof screen&&"number"==typeof screen.width&&"number"==typeof screen.height}catch{return!1}}()&&s.push(re("screen",H,n).then(t=>({component:"screen",result:t}))),ee("browser",n)&&function(){try{return"object"==typeof navigator&&null!==navigator}catch{return!1}}()&&s.push(re("browser",L,n).then(t=>({component:"browser",result:t}))),(await Promise.allSettled(s)).forEach((t,e)=>{if("fulfilled"===t.status&&t.value.result){const{component:e,result:n}=t.value;o[e]=n,r.push(e)}else{const n=s[e],r=n?.toString().match(/component: "(\w+)"/)?.[1]||"unknown";i.push({component:r,error:"rejected"===t.status?t.reason?.message||"Promise rejected":"Collection failed or timeout"})}}),!n.gdprMode)try{const{detectIncognitoHeuristics:t}=await Promise.resolve().then(function(){return Sh}),e=await t();e&&(o.incognitoDetection={likelihood:e.likelihood,methods:e.methods},r.push("incognito"))}catch(t){i.push({component:"incognito",error:t instanceof Error?t.message:"Incognito detection failed"})}if(ee("hardware",n))try{const t=await Promise.resolve().then(function(){return Ah}).catch(()=>null);if(t?.isHardwareDetectionAvailable?.()){const e=t.getHardwareFingerprint?.();e&&(o.hardware={value:e,duration:0},r.push("hardware"))}else if(!t){const t={hardwareConcurrency:navigator.hardwareConcurrency||0,deviceMemory:navigator.deviceMemory||0,platform:navigator.platform||"unknown"};o.hardware={value:t,duration:0},r.push("hardware")}}catch(t){i.push({component:"hardware",error:t instanceof Error?t.message:"Hardware detection failed"})}if(ee("system",n))try{const{getSystemFingerprint:t,isSystemDetectionAvailable:e}=await Promise.resolve().then(function(){return _h});if(e()){const e=t();e&&(o.system={value:e,duration:0},r.push("system"))}}catch(t){i.push({component:"system",error:t instanceof Error?t.message:"System detection failed"})}if(ee("storage",n))try{const{getStorageFingerprint:t,isStorageDetectionAvailable:e}=await Promise.resolve().then(function(){return Ph});if(e()){const e=performance.now(),n=await t(),i=performance.now()-e;n&&(o.storage={value:n,duration:i},r.push("storage"))}}catch(t){i.push({component:"storage",error:t instanceof Error?t.message:"Storage detection failed"})}if(ee("math",n))try{const{getCompleteMathFingerprint:t,isMathDetectionAvailable:e}=await Promise.resolve().then(function(){return Gh});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(o.math={value:n,duration:i},r.push("math"))}}catch(t){i.push({component:"math",error:t instanceof Error?t.message:"Math fingerprinting failed"})}if(ee("domBlockers",n))try{const{getDomBlockersFingerprint:t,isDomBlockersDetectionAvailable:e}=await Promise.resolve().then(function(){return Xh});if(e()){const e=performance.now(),i=await t({debug:n.debug}),s=performance.now()-e;i&&(o.domBlockers={value:i,duration:s},r.push("domBlockers"))}}catch(t){i.push({component:"domBlockers",error:t instanceof Error?t.message:"DOM blockers detection failed"})}if(ee("accessibility",n))try{const{getAccessibilityFingerprint:t,isAccessibilityDetectionAvailable:e}=await Promise.resolve().then(function(){return Ot});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(o.accessibility={value:n,duration:i},r.push("accessibility"))}}catch(t){i.push({component:"accessibility",error:t instanceof Error?t.message:"Accessibility detection failed"})}if(ee("browserApis",n))try{const{getBrowserApisFingerprint:t,isBrowserApisDetectionAvailable:e}=await Promise.resolve().then(function(){return af});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(o.browserApis={value:n,duration:i},r.push("browserApis"))}}catch(t){i.push({component:"browserApis",error:t instanceof Error?t.message:"Browser APIs detection failed"})}if(ee("pluginsEnhanced",n))try{const{getEnhancedPluginFingerprint:t,isEnhancedPluginDetectionAvailable:e}=await Promise.resolve().then(function(){return vf});if(e()){const e=performance.now(),n=t(),i=performance.now()-e;n&&(o.pluginsEnhanced={value:n,duration:i},r.push("pluginsEnhanced"))}}catch(t){i.push({component:"pluginsEnhanced",error:t instanceof Error?t.message:"Enhanced plugin detection failed"})}if(ee("mathFingerprint",n)&&function(){try{return"undefined"!=typeof Math&&"function"==typeof Math.sin}catch{return!1}}())try{const t=performance.now(),e=Jt(),n=performance.now()-t;e&&(o.mathFingerprint={value:e,duration:n,analysis:qt(e),hash:Kt()},r.push("mathFingerprint"))}catch(t){i.push({component:"mathFingerprint",error:t instanceof Error?t.message:"Math fingerprinting failed"})}if(ee("fontPreferences",n)&&function(){try{return"undefined"!=typeof document&&"function"==typeof document.createElement&&void 0!==document.body}catch{return!1}}())try{const t=performance.now(),e=await async function(){try{const{document:t,container:e,cleanup:n}=await new Promise((t,e)=>{const n=document.createElement("iframe");n.style.cssText="position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0;",n.srcdoc='<!doctype html>\n <html>\n <head>\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <style>\n body { \n margin: 0; \n padding: 20px; \n width: 4000px;\n text-size-adjust: none;\n -webkit-text-size-adjust: none;\n }\n </style>\n </head>\n <body></body>\n </html>',n.onload=()=>{try{const r=n.contentDocument,i=n.contentWindow;if(!r||!i)return void e(new Error("Cannot access iframe content"));const o=r.body;I()?o.style.zoom=""+1/i.devicePixelRatio:y()&&(o.style.zoom="reset");const s=r.createElement("div");s.textContent=Array(200).fill("word").join(" "),o.appendChild(s),t({document:r,container:o,cleanup:()=>{n.parentNode&&n.parentNode.removeChild(n)}})}catch(t){e(t)}},n.onerror=()=>{e(new Error("Failed to load iframe"))},document.body.appendChild(n)}),r={};for(const[n,i]of Object.entries(Bt))try{r[n]=Pt(t,e,i)}catch(t){r[n]=0}const i=function(t,e,n="Arial"){try{const e=t.createElement("canvas");e.width=100,e.height=50;const r=e.getContext("2d",{willReadFrequently:!0});if(!r)return{quality:0,antiAliasing:!1,smoothing:0};r.font=`24px "${n}"`,r.fillStyle="#000000",r.fillText("Wg",10.5,30.7);const i=r.getImageData(10,20,30,20).data;let o=0,s=0,a=0;for(let t=0;t<i.length;t+=4){const e=i[t]||0,n=i[t+1]||0,r=i[t+2]||0;(i[t+3]||0)<10||(a++,e===n&&n===r&&e>0&&e<255&&s++,t>4&&Math.abs(e-(i[t-4]||0))>50&&o++)}const c=a>0?s/a:0,l=a>0?100*s/a:0;return{quality:Math.round(l),antiAliasing:c>.1,smoothing:Math.round(100*l)/100}}catch(t){return{quality:0,antiAliasing:!1,smoothing:0}}}(t,0,"Arial"),o=function(t){try{const e=t.createElement("canvas");e.width=100,e.height=50;const n=e.getContext("2d",{willReadFrequently:!0});if(!n)return{clearType:!1,hintingLevel:0,subpixelRendering:!1};const r=["rn","il","WW","mm"];let i=0,o=0,s=0;for(const t of r){n.clearRect(0,0,e.width,e.height),n.font="16px Arial",n.fillStyle="#000",n.fillText(t,10,25);const r=n.getImageData(10,15,40,20).data;for(let t=0;t<r.length;t+=12){const e=r[t]||0,n=r[t+1]||0,a=r[t+2]||0,c=r[t+4]||0,l=r[t+5]||0,u=r[t+6]||0;(Math.abs(e-n)>20||Math.abs(n-a)>20)&&i++,Math.abs(e-c)+Math.abs(n-l)+Math.abs(a-u)>50&&o++,(e>0&&e<255||n>0&&n<255||a>0&&a<255)&&s++}}return{clearType:i>10,hintingLevel:Math.min(Math.round(s/10),5),subpixelRendering:o>5}}catch(t){return{clearType:!1,hintingLevel:0,subpixelRendering:!1}}}(t),s={},a=["Arial","Helvetica","Times New Roman","Georgia","Courier New"];for(const n of a)try{s[n]=Lt(t,e,n)}catch(t){s[n]="fallback-error"}const l=c([JSON.stringify(r),JSON.stringify(i),JSON.stringify(o),JSON.stringify(s)].join("|"));return n(),{...r,antiAliasing:{enabled:i.antiAliasing,type:o.clearType?"cleartype":i.antiAliasing?"standard":"none",smoothingLevel:i.smoothing},systemFontHints:o,fallbackBehavior:s,isolatedHash:l}}catch(t){return{...Object.keys(Bt).reduce((t,e)=>(t[e]=0,t),{}),antiAliasing:{enabled:!1,type:"unknown",smoothingLevel:0},systemFontHints:{clearType:!1,hintingLevel:0,subpixelRendering:!1},fallbackBehavior:{},isolatedHash:"error"}}}(),n=performance.now()-t;e&&(o.fontPreferences={value:e,duration:n,analysis:Dt(e),hash:(l=e,l.isolatedHash&&"error"!==l.isolatedHash?l.isolatedHash:[...[l.default,l.serif,l.sans,l.mono,l.apple,l.system,l.min,l.large,l.ui,l.emoji,l.math,l.cjk,l.arabic,l.hebrew,l.subpixel,l.kerning,l.ligatures].map(t=>Math.round(t)),l.antiAliasing.enabled?1:0,l.systemFontHints.clearType?1:0,l.systemFontHints.hintingLevel,Math.round(l.antiAliasing.smoothingLevel)].join(","))},r.push("fontPreferences"))}catch(t){i.push({component:"fontPreferences",error:t instanceof Error?t.message:"Font preferences detection failed"})}var l,h;if(ee("dateTimeLocale",n)&&function(){try{return"undefined"!=typeof window&&void 0!==window.Intl}catch{return!1}}())try{const t=performance.now(),e=function(){const t=function(){try{if(!window.Intl)return-1;const t=window.Intl.DateTimeFormat;if(!t)return-2;const e=(new t).resolvedOptions();return e.locale||""===e.locale?{locale:e.locale||"unknown",calendar:e.calendar||"unknown",numberingSystem:e.numberingSystem||"unknown",timeZone:e.timeZone||"unknown",hourCycle:e.hourCycle||"unknown",hour12:void 0!==e.hour12&&e.hour12}:-3}catch(t){return-2}}();if("number"==typeof t)return t;const e=function(){try{if(!window.Intl||!window.Intl.NumberFormat)return-4;const t=(new Intl.NumberFormat).resolvedOptions(),e=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"}).resolvedOptions();return{numberLocale:t.locale||"unknown",currencyDisplay:e.currencyDisplay||"unknown",currencySign:e.currencySign||"unknown",notation:t.notation||"unknown",signDisplay:t.signDisplay||"unknown"}}catch(t){return-4}}(),n="number"==typeof e?{}:e,r=function(){const t={listStyle:"unknown",relativeTimeStyle:"unknown",pluralRules:"unknown"};try{if(window.Intl&&window.Intl.ListFormat){const e=(new window.Intl.ListFormat).resolvedOptions();t.listStyle=e.style||"unknown"}}catch(t){}try{if(window.Intl&&window.Intl.RelativeTimeFormat){const e=(new window.Intl.RelativeTimeFormat).resolvedOptions();t.relativeTimeStyle=e.style||"unknown"}}catch(t){}try{if(window.Intl&&window.Intl.PluralRules){const e=(new window.Intl.PluralRules).select(1);t.pluralRules=e||"unknown"}}catch(t){}return t}(),i=function(){const t={DateTimeFormat:!1,NumberFormat:!1,RelativeTimeFormat:!1,ListFormat:!1,PluralRules:!1,Collator:!1};try{window.Intl&&(t.DateTimeFormat="function"==typeof window.Intl.DateTimeFormat,t.NumberFormat="function"==typeof window.Intl.NumberFormat,t.RelativeTimeFormat="function"==typeof window.Intl.RelativeTimeFormat,t.ListFormat="function"==typeof window.Intl.ListFormat,t.PluralRules="function"==typeof window.Intl.PluralRules,t.Collator="function"==typeof window.Intl.Collator)}catch(t){}return t}(),o=navigator.language||"unknown",s=t.locale===o;let a="unknown",c="unknown";try{if(window.Intl&&"function"==typeof window.Intl.DateTimeFormat){const t=new Intl.DateTimeFormat(void 0,{dateStyle:"long"}),e=new Intl.DateTimeFormat(void 0,{timeStyle:"long"}),n=t.resolvedOptions(),r=e.resolvedOptions();a=n.dateStyle||"unknown",c=r.timeStyle||"unknown"}}catch(t){}return{locale:t.locale||"unknown",calendar:t.calendar||"unknown",numberingSystem:t.numberingSystem||"unknown",timeZone:t.timeZone||"unknown",dateStyle:a,timeStyle:c,hourCycle:t.hourCycle||"unknown",hour12:t.hour12||!1,numberLocale:n.numberLocale||t.locale||"unknown",currencyDisplay:n.currencyDisplay||"unknown",currencySign:n.currencySign||"unknown",notation:n.notation||"unknown",signDisplay:n.signDisplay||"unknown",listStyle:r.listStyle||"unknown",relativeTimeStyle:r.relativeTimeStyle||"unknown",pluralRules:r.pluralRules||"unknown",navigatorLanguage:o,localeMatch:s,intlSupport:i}}(),n=performance.now()-t;e&&"object"==typeof e&&(o.dateTimeLocale={value:e,duration:n,analysis:Ft(e),hash:(h=e,"number"==typeof h?`status-${h}`:[h.locale,h.calendar,h.numberingSystem,h.timeZone,h.hourCycle,h.hour12?"1":"0",h.localeMatch?"1":"0",Object.values(h.intlSupport).map(t=>t?"1":"0").join("")].join("|"))},r.push("dateTimeLocale"))}catch(t){i.push({component:"dateTimeLocale",error:t instanceof Error?t.message:"DateTime locale detection failed"})}if(ee("accessibilityEnhanced",n)&&Ct())try{const t=performance.now(),e=Tt(),n=performance.now()-t;e&&(o.accessibilityEnhanced={value:e,duration:n,analysis:_t(e)},r.push("accessibilityEnhanced"))}catch(t){i.push({component:"accessibilityEnhanced",error:t instanceof Error?t.message:"Enhanced accessibility detection failed"})}if(ee("enhancedFonts",n)&&function(){try{return"undefined"!=typeof document&&"function"==typeof document.createElement&&void 0!==document.body}catch{return!1}}())try{const t=performance.now(),e=await async function(){const t=performance.now();try{const{document:e,body:n,cleanup:r}=await new Promise((t,e)=>{const n=document.createElement("iframe");n.style.cssText="position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none;",n.onload=()=>{try{const e=n.contentDocument;if(!e)throw new Error("Cannot access iframe document");const r=e.body;if(!r)throw new Error("Iframe body not available");r.style.fontSize=Gt,r.style.margin="0",r.style.padding="0",t({document:e,body:r,cleanup:()=>{n.parentNode&&n.parentNode.removeChild(n)}})}catch(t){e(t)}},n.onerror=()=>{e(new Error("Failed to load font measurement iframe"))},document.body.appendChild(n)});try{const r=e.createElement("div");r.style.setProperty("visibility","hidden","important");const i=Wt.map(t=>$t(e,t));i.forEach(t=>r.appendChild(t));const o={};for(const t of jt)o[t]=Wt.map(n=>Vt(e,t,n)),o[t].forEach(t=>r.appendChild(t));n.appendChild(r);const s={};Wt.forEach((t,e)=>{const n=i[e];n&&(s[t]={width:n.offsetWidth,height:n.offsetHeight})});const a=[],c={};for(const t of jt){const e=o[t];e&&(Zt(e,s)&&a.push(t),e.length>0&&e[0]&&(c[t]={width:e[0].offsetWidth,height:e[0].offsetHeight}))}const l=performance.now()-t,u=Object.values(c).map(t=>t.width);return{available:a,method:"iframe",measurements:c,precision:new Set(u).size/u.length,totalTested:jt.length,detectionTime:l}}finally{r()}}catch(e){return function(t){const e=[],n={};try{const t=document.createElement("div");t.style.cssText="position: absolute; left: -9999px; top: -9999px; visibility: hidden;";const r={};Wt.forEach(e=>{const n=document.createElement("span");n.style.fontFamily=e,n.style.fontSize=Gt,n.style.whiteSpace="nowrap",n.textContent=Ut,t.appendChild(n),document.body.appendChild(t),r[e]={width:n.offsetWidth,height:n.offsetHeight},document.body.removeChild(t),t.removeChild(n)});for(const i of jt){let o=!1;for(const e of Wt){const s=document.createElement("span");s.style.fontFamily=`'${i}',${e}`,s.style.fontSize=Gt,s.style.whiteSpace="nowrap",s.textContent=Ut,t.appendChild(s),document.body.appendChild(t);const a={width:s.offsetWidth,height:s.offsetHeight};n[i]=a;const c=r[e];if(!c||a.width===c.width&&a.height===c.height||(o=!0),document.body.removeChild(t),t.removeChild(s),o)break}o&&e.push(i)}}catch(t){}const r=performance.now()-t,i=Object.values(n).map(t=>t.width),o=new Set(i).size;return{available:e,method:"dom",measurements:n,precision:i.length>0?o/i.length:0,totalTested:jt.length,detectionTime:r}}(t)}}(),n=performance.now()-t;e&&(o.enhancedFonts={value:e,duration:n,analysis:Yt(e),hash:zt(e)},r.push("enhancedFonts"))}catch(t){i.push({component:"enhancedFonts",error:t instanceof Error?t.message:"Enhanced font detection failed"})}const f={};let d;r.forEach(t=>{const e=o[t];e&&e.value&&(f[t]=e.value)});try{const{calculateConfidence:t}=await Promise.resolve().then(function(){return If});d=t([...r.map(t=>({component:t,success:!0,duration:o[t]?.duration||0,value:o[t]?.value})),...i.map(t=>({component:t.component,success:!1,duration:0,error:t.error}))],{requireMinimumComponents:6,penalizeMissingCore:!0,adjustForIncognito:!0}),o.confidence={score:d.score,level:d.level,factors:d.factors,recommendations:d.recommendations}}catch(t){const e=r.length/(r.length+i.length||1);o.confidence={score:e>=.8?.95:e>=.6?.8:.5,level:e>=.8?"High":e>=.6?"Medium":"Low",factors:{componentCount:r.length,weightedScore:e,stabilityScore:e,entropyScore:e,spoofResistanceScore:e},recommendations:e<.8?["Enable more fingerprinting components"]:[]}}const p={...o,hash:"",components:r,collectionTime:performance.now()-e},m={success:r.length>0,collectedComponents:r,failedComponents:i,confidence:d||o.confidence};if(r.length>0){const t=p.browser?.value,e=p.screen?.value,o=t?.userAgent||"",s=(()=>{const t=!0===navigator.userAgentData?.mobile,n=navigator.maxTouchPoints||0,r=e?.width||0,i=e?.height||0,o=Math.min(r,i);return Math.max(r,i),t?"mobile":n>0?o<=480?"mobile":"tablet":o>1024?"desktop":o<=480?"mobile":"desktop"})();let c={};try{const{collectDeviceSignals:t}=await Promise.resolve().then(function(){return Of});c=t()}catch(t){}const l={ua:(()=>{try{return _().family}catch{const t=o,e=t.match(/(chrome|safari|firefox|edge|edg|brave|opera|opr|chromium)/i);return(e?.[1]||t.split(" ")[0]||"unknown").toLowerCase()}})(),timezone:t?.timezone||"unknown",primaryLanguage:(()=>{try{const e=t?.languages;return Array.isArray(e)&&e.length>0&&e[0]?e[0].toLowerCase().split("-")[0]:"undefined"!=typeof navigator&&navigator.language?navigator.language.toLowerCase().split("-")[0]:"unknown"}catch{return"unknown"}})(),platform:(t?.platform||"unknown").toLowerCase(),deviceType:s,hardware:(()=>{const t=c.hardwareConcurrency,e=c.deviceMemory;if(!t&&!e)return;const n=t?(t=>t>=32?"workstation":t>=20?"ultra":t>=16?"high":t>=12?"premium":t>=8?"mid":t>=6?"normal":t>=4?"basic":t>=2?"low":"minimal")(t):"unknown",r=e?(t=>t>=64?"workstation":t>=32?"ultra":t>=24?"high":t>=16?"premium":t>=12?"mid":t>=8?"normal":t>=4?"basic":t>=2?"low":"minimal")(e):"unknown";var i;return{cores:n,memory:r,arch:void 0===(i=c.architecture)?"unknown":255===i?"arm64":0===i?"x86_64":"other",class:((t,e)=>"workstation"!==t&&"ultra"!==t||"workstation"!==e&&"ultra"!==e?"high"!==t&&"premium"!==t||"high"!==e&&"premium"!==e&&"ultra"!==e?"mid"!==t&&"normal"!==t||"mid"!==e&&"normal"!==e&&"premium"!==e?"basic"!==t&&"low"!==t||"basic"!==e&&"low"!==e&&"normal"!==e?"minimal"===t||"minimal"===e?"mobile":"mixed":"budget":"mainstream":"enthusiast":"professional")(n,r),touch:c.touchSupport?.maxTouchPoints?c.touchSupport.maxTouchPoints>=10?"multi":c.touchSupport.maxTouchPoints>=5?"standard":"basic":"none"}})(),screenFrame:c?.screenFrame?{top:c.screenFrame.top||0,right:c.screenFrame.right||0,bottom:c.screenFrame.bottom||0,left:c.screenFrame.left||0}:void 0,display:(()=>{const t=c.colorDepth,e=c.colorGamut,n=(t=>t?t>=48?"ultra_high":t>=32?"high":t>=24?"normal":t>=16?"basic":"low":"unknown")(t),r=(t=>{if(!t)return"unknown";switch(t){case"rec2020":return"professional";case"p3":return"enhanced";case"srgb":return"standard";default:return"unknown"}})(e);return{depth:n,gamut:r,class:((t,e)=>"ultra_high"===t||"professional"===e?"professional":"high"===t||"enhanced"===e?"premium":"normal"===t&&"standard"===e?"standard":"basic"===t?"basic":"legacy")(n,r)}})()},h=[l.ua||"",l.platform||"",l.deviceType||"",l.timezone||"",l.primaryLanguage||""].filter(Boolean);if(h.length>=3){const t=h.join("|");let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)&4294967295;l.t=Math.abs(e).toString(36).substring(0,8)}(n.debug||"undefined"!=typeof window&&window._rabbitTrackerDebug)&&(l.ua,l.platform,l.deviceType,l.timezone,l.primaryLanguage,l.hardware,l.display,l.screenFrame,l.t);const g=function(t,e=!1){const n=u(t),r=JSON.stringify(n);e&&(Object.keys(t),Object.keys(n),r.length,r.substring(0,200));const i=a(r);return e&&i.substring(0,32),i}(l,n.debug),y=["canvas","webgl","audio","mathFingerprint","fontPreferences","enhancedFonts","dateTimeLocale","accessibilityEnhanced","domBlockers","pluginsEnhanced"],w={};for(const[t,e]of Object.entries(f))y.includes(t)||(w[t]=e);const b={...w,i:l},v=function(t,e=!1){const n=u(t),r=JSON.stringify(n);e&&(Object.keys(t),Object.keys(n),r.length,r.substring(0,200));const i=a(r);return e&&i.substring(0,32),i}(b,n.debug);p.hash=v,n.debug&&(Object.keys(l),l.t,g.substring(0,16),v.substring(0,16),l.ua,l.deviceType,l.platform,l.timezone,l.screenFrame,l.hardware,l.display,Object.keys(b).length),m.data={...p,stableCoreHash:g,stableCoreVector:l},n.debug&&(r.length,i.length,p.collectionTime,p.hash,d?.recommendations.length&&d.recommendations)}else m.error="No components could be collected";return m}var oe,se=Object.freeze({__proto__:null,collectFingerprint:ie,getCompleteFingerprint:async function(){return ie({gdprMode:!1,includeInvasive:!0,timeout:5e3})}}),ae=Object.defineProperty,ce=(t,e,n)=>((t,e,n)=>e in t?ae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),le=Object.defineProperty,ue=(t,e,n)=>((t,e,n)=>e in t?le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),he=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(he||{});const fe={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},de={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pe={};const me={};function ge(t,e,n){var r;const i=`${t}.${String(n)}`;if(me[i])return me[i].call(e);const o=function(t){if(pe[t])return pe[t];const e=globalThis[t],n=e.prototype,r=t in fe?fe[t]:void 0,i=Boolean(r&&r.every(t=>{var e,r;return Boolean(null==(r=null==(e=Object.getOwnPropertyDescriptor(n,t))?void 0:e.get)?void 0:r.toString().includes("[native code]"))})),o=t in de?de[t]:void 0,s=Boolean(o&&o.every(t=>{var e;return"function"==typeof n[t]&&(null==(e=n[t])?void 0:e.toString().includes("[native code]"))}));if(i&&s&&!globalThis.Zone)return pe[t]=e.prototype,e.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const i=r.contentWindow;if(!i)return e.prototype;const o=i[t].prototype;return document.body.removeChild(r),o?pe[t]=o:n}catch{return n}}(t),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(me[i]=s,s.call(e)):e[n]}const ye=function(t){return ge("Node",t,"childNodes")},we=function(t){return ge("Node",t,"parentNode")},be=function(t){return ge("Node",t,"parentElement")},ve=function(t){return ge("Node",t,"textContent")},Se=function(t){return t&&"shadowRoot"in t?ge("Element",t,"shadowRoot"):null};function Ce(t){return t.nodeType===t.ELEMENT_NODE}function ke(t){const e=t&&"host"in t&&"mode"in t&&function(t){return t&&"host"in t?ge("ShadowRoot",t,"host"):null}(t)||null;return Boolean(e&&"shadowRoot"in e&&Se(e)===t)}function Ie(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function Me(t){try{const n=t.rules||t.cssRules;if(!n)return null;let r=t.href;return!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href),(e=Array.from(n,t=>Ae(t,r)).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}catch(t){return null}var e}function Ae(t,e){if(function(t){return"styleSheet"in t}(t)){let e;try{e=Me(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(n){e=t.cssText}return t.styleSheet.href?Pe(e,t.styleSheet.href):e}{let n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?Pe(n,e):n}}class Re{constructor(){ue(this,"idNodeMap",new Map),ue(this,"nodeMetaMap",new WeakMap)}getId(t){var e;return t?(null==(e=this.getMeta(t))?void 0:e.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function xe({element:t,maskInputOptions:e,tagName:n,type:r,value:i,maskInputFn:o}){let s=i||"";const a=r&&Ee(r);return(e[n.toLowerCase()]||a&&e[a])&&(s=o?o(s,t):"*".repeat(s.length)),s}function Ee(t){return t.toLowerCase()}const Te="__rrweb_original__";function _e(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ee(e):null}function Oe(t,e){let n;try{n=new URL(t,e??window.location.href)}catch(t){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const Fe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ne=/^(?:[a-z+]+:)?\/\//i,Be=/^www\..*/i,Le=/^(data:)([^,]*),(.*)/i;function Pe(t,e){return(t||"").replace(Fe,(t,n,r,i,o,s)=>{const a=r||o||s,c=n||i||"";if(!a)return t;if(Ne.test(a)||Be.test(a))return`url(${c}${a}${c})`;if(Le.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${c})`;const l=e.split("/"),u=a.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`})}function De(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}let je=1;const Ue=new RegExp("[^a-z0-9-_:]");function Ge(){return je++}let We,$e;const Ve=/^[^ \t\n\r\u000c]+/,Ze=/^[, \t\n\r\u000c]+/,Ye=new WeakMap;function ze(t,e){return e&&""!==e.trim()?He(t,e):e}function He(t,e){let n=Ye.get(t);if(n||(n=t.createElement("a"),Ye.set(t,n)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return n.setAttribute("href",e),n.href}function Xe(t,e,n,r){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?ze(t,r):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}const i=[];for(;r(Ze),!(n>=e.length);){let o=r(Ve);if(","===o.slice(-1))o=ze(t,o.substring(0,o.length-1)),i.push(o);else{let r="";o=ze(t,o);let s=!1;for(;;){const t=e.charAt(n);if(""===t){i.push((o+r).trim());break}if(s)")"===t&&(s=!1);else{if(","===t){n+=1,i.push((o+r).trim());break}"("===t&&(s=!0)}r+=t,n+=1}}}return i.join(", ")}(t,r):"style"===n?Pe(r,He(t)):"object"===e&&"data"===n?ze(t,r):r:ze(t,r):r}function Je(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function Ke(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!n&&Ke(we(t),e,n);for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!!n&&Ke(we(t),e,n)}function qe(t,e,n,r){let i;if(Ce(t)){if(i=t,!ye(i).length)return!1}else{if(null===be(t))return!1;i=be(t)}try{if("string"==typeof e){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ke(i,e,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(t){}return!1}function Qe(t){return null==t?"":t.toLowerCase()}function tn(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c=!1,inlineStylesheet:l=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=e;let{needsMask:M}=e,{preserveWhiteSpace:A=!0}=e;M||(M=qe(t,s,a,void 0===M));const R=function(t,e){const{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:a,maskInputOptions:c={},maskTextFn:l,maskInputFn:u,dataURLOptions:h={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:g=!1}=e,y=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:he.Document,childNodes:[],compatMode:t.compatMode}:{type:he.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:he.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:y};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:a,dataURLOptions:c={},inlineImages:l,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:d}=e,p=function(t,e,n){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(t){}return!1}(t,r,i),m=function(t){if(t instanceof HTMLFormElement)return"form";const e=Ee(t.tagName);return Ue.test(e)?"div":e}(t);let g={};const y=t.attributes.length;for(let e=0;e<y;e++){const r=t.attributes[e];Je(m,r.name,r.value)||(g[r.name]=Xe(n,m,Ee(r.name),r.value))}if("link"===m&&o){const e=Array.from(n.styleSheets).find(e=>e.href===t.href);let r=null;e&&(r=Me(e)),r&&(delete g.rel,delete g.href,g.o=r)}if("style"===m&&t.sheet){let e=Me(t.sheet);e&&(t.childNodes.length>1&&(e=function(t,e){return function(t,e){const n=Array.from(e.childNodes),r=[];if(n.length>1&&t&&"string"==typeof t){const e=De(t);for(let i=1;i<n.length;i++)if(n[i].textContent&&"string"==typeof n[i].textContent){const o=De(n[i].textContent);for(let n=3;n<o.length;n++){const i=o.substring(0,n);if(2===e.split(i).length){const n=e.indexOf(i);for(let e=n;e<t.length;e++)if(De(t.substring(0,e)).length===n){r.push(t.substring(0,e)),t=t.substring(e);break}break}}}}return r.push(t),r}(t,e).join("/* rr_split */")}(e,t)),g.o=e)}if("input"===m||"textarea"===m||"select"===m){const e=t.value,n=t.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&e?g.value=xe({element:t,type:_e(t),tagName:m,value:e,maskInputOptions:s,maskInputFn:a}):n&&(g.checked=n)}if("option"===m&&(t.selected&&!s.select?g.selected=!0:delete g.selected),"dialog"===m&&t.open&&(g.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),"canvas"===m&&u)if("2d"===t.l)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const i=e.getImageData,o=Te in i?i[Te]:i;if(new Uint32Array(o.call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(g.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("l"in t)){const e=t.toDataURL(c.type,c.quality),r=n.createElement("canvas");r.width=t.width,r.height=t.height,e!==r.toDataURL(c.type,c.quality)&&(g.rr_dataURL=e)}if("img"===m&&l){We||(We=n.createElement("canvas"),$e=We.getContext("2d"));const e=t,r=e.currentSrc||e.getAttribute("src")||"<unknown-src>",i=e.crossOrigin,o=()=>{e.removeEventListener("load",o);try{We.width=e.naturalWidth,We.height=e.naturalHeight,$e.drawImage(e,0,0),g.rr_dataURL=We.toDataURL(c.type,c.quality)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(i?g.crossOrigin=i:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if("audio"===m||"video"===m){const e=g;e.rr_mediaState=t.paused?"paused":"played",e.rr_mediaCurrentTime=t.currentTime,e.rr_mediaPlaybackRate=t.playbackRate,e.rr_mediaMuted=t.muted,e.rr_mediaLoop=t.loop,e.rr_mediaVolume=t.volume}if(f||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),p){const{width:e,height:n}=t.getBoundingClientRect();g={class:g.class,rr_width:`${e}px`,rr_height:`${n}px`}}let w;"iframe"!==m||h(g.src)||(t.contentDocument||(g.rr_src=g.src),delete g.src);try{customElements.get(m)&&(w=!0)}catch(t){}return{type:he.Element,tagName:m,attributes:g,childNodes:[],isSVG:(b=t,Boolean("svg"===b.tagName||b.ownerSVGElement)||void 0),needBlock:p,rootId:d,isCustom:w};var b}(t,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:u,dataURLOptions:h,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case t.TEXT_NODE:return function(t,e){const{needsMask:n,maskTextFn:r,rootId:i,cssCaptured:o}=e,s=we(t),a=s&&s.tagName;let c="";const l="STYLE"===a||void 0,u="SCRIPT"===a||void 0;return u?c="SCRIPT_PLACEHOLDER":o||(c=ve(t),l&&c&&(c=Pe(c,He(e.doc)))),!l&&!u&&c&&n&&(c=r?r(c,be(t)):c.replace(/[\S]/g,"*")),{type:he.Text,textContent:c||"",rootId:i}}(t,{doc:n,needsMask:s,maskTextFn:l,rootId:y,cssCaptured:g});case t.CDATA_SECTION_NODE:return{type:he.CDATA,textContent:"",rootId:y};case t.COMMENT_NODE:return{type:he.Comment,textContent:ve(t)||"",rootId:y};default:return!1}}(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:k,cssCaptured:I});if(!R)return console.warn(t,"not serialized"),null;let x;x=r.hasNode(t)?r.getId(t):function(t,e){if(e.comment&&t.type===he.Comment)return!0;if(t.type===he.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Oe(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Qe(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Qe(t.attributes.name)||"icon"===Qe(t.attributes.rel)||"apple-touch-icon"===Qe(t.attributes.rel)||"shortcut icon"===Qe(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Qe(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Qe(t.attributes.property).match(/^(og|twitter|fb):/)||Qe(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Qe(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===Qe(t.attributes.name)||"googlebot"===Qe(t.attributes.name)||"bingbot"===Qe(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===Qe(t.attributes.name)||"generator"===Qe(t.attributes.name)||"framework"===Qe(t.attributes.name)||"publisher"===Qe(t.attributes.name)||"progid"===Qe(t.attributes.name)||Qe(t.attributes.property).match(/^article:/)||Qe(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===Qe(t.attributes.name)||"yandex-verification"===Qe(t.attributes.name)||"csrf-token"===Qe(t.attributes.name)||"p:domain_verify"===Qe(t.attributes.name)||"verify-v1"===Qe(t.attributes.name)||"verification"===Qe(t.attributes.name)||"shopify-checkout-api-token"===Qe(t.attributes.name)))return!0}}return!1}(R,d)||!A&&R.type===he.Text&&!R.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Ge();const E=Object.assign(R,{id:x});if(r.add(t,E),-2===x)return null;y&&y(t);let T=!c;if(E.type===he.Element){T=T&&!E.needBlock,delete E.needBlock;const e=Se(t);e&&Ie(e)&&(E.isShadowHost=!0)}if((E.type===he.Document||E.type===he.Element)&&T){d.headWhitespace&&E.type===he.Element&&"head"===E.tagName&&(A=!1);const e={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(E.type===he.Element&&"textarea"===E.tagName&&void 0!==E.attributes.value);else{E.type===he.Element&&void 0!==E.attributes.o&&"string"==typeof E.attributes.o&&(e.cssCaptured=!0);for(const n of Array.from(ye(t))){const t=tn(n,e);t&&E.childNodes.push(t)}}let k=null;if(Ce(t)&&(k=Se(t)))for(const t of Array.from(ye(k))){const n=tn(t,e);n&&(Ie(k)&&(n.isShadow=!0),E.childNodes.push(n))}}const _=we(t);return _&&ke(_)&&Ie(_)&&(E.isShadow=!0),E.type===he.Element&&"iframe"===E.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let i,o=!1;try{i=r.document.readyState}catch(t){return}if("complete"!==i){const r=setTimeout(()=>{o||(e(),o=!0)},n);return void t.addEventListener("load",()=>{clearTimeout(r),o=!0,e()})}const s="about:blank";if(r.location.href!==s||t.src===s||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,()=>{const e=t.contentDocument;if(e&&w){const n=tn(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:C});n&&w(t,n)}},b),E.type===he.Element&&"link"===E.tagName&&"string"==typeof E.attributes.rel&&("stylesheet"===E.attributes.rel||"preload"===E.attributes.rel&&"string"==typeof E.attributes.href&&"css"===Oe(E.attributes.href))&&function(t,e,n){let r,i=!1;try{r=t.sheet}catch(t){return}if(r)return;const o=setTimeout(()=>{i||(e(),i=!0)},n);t.addEventListener("load",()=>{clearTimeout(o),i=!0,e()})}(t,()=>{if(v){const e=tn(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:C});e&&v(t,e)}},S),E}function en(t){return t&&t.u&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nn(t){if(t.u)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"u",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),n}var rn={exports:{}},on=String,sn=function(){return{isColorSupported:!1,reset:on,bold:on,dim:on,italic:on,underline:on,inverse:on,hidden:on,strikethrough:on,black:on,red:on,green:on,yellow:on,blue:on,magenta:on,cyan:on,white:on,gray:on,bgBlack:on,bgRed:on,bgGreen:on,bgYellow:on,bgBlue:on,bgMagenta:on,bgCyan:on,bgWhite:on}};rn.exports=sn(),rn.exports.createColors=sn;var an=rn.exports;const cn=nn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let ln=an,un=cn,hn=class t extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=ln.isColorSupported),un&&t&&(e=un(e));let n,r,i=e.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,i.length),a=String(s).length;if(t){let{bold:t,gray:e,red:i}=ln.createColors(!0);n=e=>t(i(e)),r=t=>e(t)}else n=r=t=>t;return i.slice(o,s).map((t,e)=>{let i=o+1+e,s=" "+(" "+i).slice(-a)+" | ";if(i===this.line){let e=r(s.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(s)+t+"\n "+e+n("^")}return" "+r(s)+t}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};var fn=hn;hn.default=hn;var dn={};dn.isClean=Symbol("isClean"),dn.my=Symbol("my");const pn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let mn=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;n="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;t<i;t++)n+=e}return n}block(t,e){let n,r=this.raw(t,"between","beforeOpen");this.builder(e+r+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&"comment"===t.nodes[e].type;)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],void 0!==r))return r;let i=t.parent;if("before"===n){if(!i||"root"===i.type&&i.first===t)return"";if(i&&"document"===i.type)return""}if(!i)return pn[n];let o=t.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let i="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[i]?r=this[i](o,t):o.walk(t=>{if(r=t.raws[e],void 0!==r)return!1})}var s;return void 0===r&&(r=pn[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&void 0!==n.raws.before)return e=n.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&void 0!==n.raws.before){let t=n.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};var gn=mn;mn.default=mn;let yn=gn;function wn(t,e){new yn(e).stringify(t)}var bn=wn;wn.default=wn;let{isClean:vn,my:Sn}=dn,Cn=fn,kn=gn,In=bn;function Mn(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;if("proxyCache"===r)continue;let i=t[r],o=typeof i;"parent"===r&&"object"===o?e&&(n[r]=e):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(t=>Mn(t,n)):("object"===o&&null!==i&&(i=Mn(i)),n[r]=i)}return n}let An=class{constructor(t={}){this.raws={},this[vn]=!1,this[Sn]=!0;for(let e in t)if("nodes"===e){this.nodes=[];for(let n of t[e])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Mn(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new Cn(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,n)=>(t[e]===n||(t[e]=n,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[vn]){this[vn]=!1;let t=this;for(;t=t.parent;)t[vn]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,e){let n=this.source.start;if(t.index)n=this.positionInside(t.index,e);else if(t.word){let r=(e=this.toString()).indexOf(t.word);-1!==r&&(n=this.positionInside(r,e))}return n}positionInside(t,e){let n=e||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let e=0;e<t;e++)"\n"===n[e]?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r=this.toString(),i=r.indexOf(t.word);-1!==i&&(e=this.positionInside(i,r),n=this.positionInside(i+t.word.length,r))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return(new kn).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){let n={},r=null==e;e=e||new Map;let i=0;for(let t in this){if(!Object.prototype.hasOwnProperty.call(this,t))continue;if("parent"===t||"proxyCache"===t)continue;let r=this[t];if(Array.isArray(r))n[t]=r.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof r&&r.toJSON)n[t]=r.toJSON(null,e);else if("source"===t){let o=e.get(r.input);null==o&&(o=i,e.set(r.input,i),i++),n[t]={end:r.end,inputId:o,start:r.start}}else n[t]=r}return r&&(n.inputs=[...e.keys()].map(t=>t.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=In){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,n){let r={node:this};for(let t in n)r[t]=n[t];return t.warn(e,r)}get proxyOf(){return this}};var Rn=An;An.default=An;let xn=Rn,En=class extends xn{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Tn=En;En.default=En;var _n={nanoid:(t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}};let{SourceMapConsumer:On,SourceMapGenerator:Fn}=cn,{existsSync:Nn,readFileSync:Bn}=cn,{dirname:Ln,join:Pn}=cn,Dn=class{constructor(t,e){if(!1===e.map)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ln(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new On(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e;let n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t.h||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=Ln(t),Nn(t))return this.mapFile=t,Bn(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof On)return Fn.fromSourceMap(e).toString();if(e instanceof Fn)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let n=e(t);if(n){let t=this.loadFile(n);if(!t)throw new Error("Unable to load previous source map: "+n.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=Pn(Ln(t),e)),this.loadFile(e)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var jn=Dn;Dn.default=Dn;let{SourceMapConsumer:Un,SourceMapGenerator:Gn}=cn,{fileURLToPath:Wn,pathToFileURL:$n}=cn,{isAbsolute:Vn,resolve:Zn}=cn,{nanoid:Yn}=_n,zn=cn,Hn=fn,Xn=jn,Jn=Symbol("fromOffsetCache"),Kn=Boolean(Un&&Gn),qn=Boolean(Zn&&Vn),Qn=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!qn||/^\w+:\/\//.test(e.from)||Vn(e.from)?this.file=e.from:this.file=Zn(e.from)),qn&&Kn){let t=new Xn(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+Yn(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&"object"==typeof e){let t=e,r=n;if("number"==typeof t.offset){let r=this.fromOffset(t.offset);e=r.line,n=r.col}else e=t.line,n=t.column;if("number"==typeof r.offset){let t=this.fromOffset(r.offset);o=t.line,s=t.col}else o=r.line,s=r.column}else if(!n){let t=this.fromOffset(e);e=t.line,n=t.col}let a=this.origin(e,n,o,s);return i=a?new Hn(t,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new Hn(t,void 0===o?e:{column:n,line:e},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin),i.input={column:n,endColumn:s,endLine:o,line:e,source:this.css},this.file&&($n&&(i.input.url=$n(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let e,n;if(this[Jn])n=this[Jn];else{let t=this.css.split("\n");n=new Array(t.length);let e=0;for(let r=0,i=t.length;r<i;r++)n[r]=e,e+=t[r].length+1;this[Jn]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let e,i=n.length-2;for(;r<i;)if(e=r+(i-r>>1),t<n[e])i=e-1;else{if(!(t>=n[e+1])){r=e;break}r=e+1}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Zn(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i,o,s=this.map.consumer(),a=s.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=Vn(a.source)?$n(a.source):new URL(a.source,this.map.consumer().sourceRoot||$n(this.map.mapFile));let c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Wn)throw new Error("file: protocol is not available in this PostCSS build");c.file=Wn(o)}let l=s.sourceContentFor(a.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var tr=Qn;Qn.default=Qn,zn&&zn.registerInput&&zn.registerInput(Qn);let{SourceMapConsumer:er,SourceMapGenerator:nr}=cn,{dirname:rr,relative:ir,resolve:or,sep:sr}=cn,{pathToFileURL:ar}=cn,cr=tr,lr=Boolean(er&&nr),ur=Boolean(rr&&or&&ir&&sr);var hr=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,n=this.toUrl(this.path(t.file)),r=t.root||rr(t.file);!1===this.mapOpts.sourcesContent?(e=new er(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ur&&lr&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=nr.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new nr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new nr({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,n=1,r=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&"end"!==c&&(o.generated.line=n,o.generated.column=r-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,this.map.addMapping(o))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),r=s.length-e):r+=s.length,a&&"start"!==c){let t=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===t.last&&!t.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=n,o.generated.column=r-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=n,o.generated.column=r-1,this.map.addMapping(o)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?rr(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=rr(or(n,this.mapOpts.annotation)));let r=ir(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new cr(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(ar){let e=ar(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===sr&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}};let fr=Rn,dr=class extends fr{constructor(t){super(t),this.type="comment"}};var pr=dr;dr.default=dr;let mr,gr,yr,wr,{isClean:br,my:vr}=dn,Sr=Tn,Cr=pr,kr=Rn;function Ir(t){return t.map(t=>(t.nodes&&(t.nodes=Ir(t.nodes)),delete t.source,t))}function Mr(t){if(t[br]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Mr(e)}let Ar=class t extends kr{append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let e of this.nodes)e.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let e,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(e=this.indexes[r],n=t(this.proxyOf.nodes[e],e),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...n)=>t[e](...n.map(t=>"function"==typeof t?(e,n)=>t(e.toProxy(),n):t)):"every"===e||"some"===e?n=>t[e]((t,...e)=>n(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,n)=>(t[e]===n||(t[e]=n,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let n,r=this.index(t),i=this.normalize(e,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let t of i)this.proxyOf.nodes.splice(r+1,0,t);for(let t in this.indexes)n=this.indexes[t],r<n&&(this.indexes[t]=n+i.length);return this.markDirty(),this}insertBefore(t,e){let n,r=this.index(t),i=0===r&&"prepend",o=this.normalize(e,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let t of o)this.proxyOf.nodes.splice(r,0,t);for(let t in this.indexes)n=this.indexes[t],r<=n&&(this.indexes[t]=n+o.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=Ir(mr(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Sr(e)]}else if(e.selector)e=[new gr(e)];else if(e.name)e=[new yr(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Cr(e)]}return e.map(e=>(e[vr]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[br]&&Mr(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let n in this.indexes)e=this.indexes[n],e>=t&&(this.indexes[n]=e-1);return this.markDirty(),this}replaceValues(t,e,n){return n||(n=e,e={}),this.walkDecls(r=>{e.props&&!e.props.includes(r.prop)||e.fast&&!r.value.includes(e.fast)||(r.value=r.value.replace(t,n))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,n)=>{let r;try{r=t(e,n)}catch(t){throw e.addToError(t)}return!1!==r&&e.walk&&(r=e.walk(t)),r})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((n,r)=>{if("atrule"===n.type&&t.test(n.name))return e(n,r)}):this.walk((n,r)=>{if("atrule"===n.type&&n.name===t)return e(n,r)}):(e=t,this.walk((t,n)=>{if("atrule"===t.type)return e(t,n)}))}walkComments(t){return this.walk((e,n)=>{if("comment"===e.type)return t(e,n)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((n,r)=>{if("decl"===n.type&&t.test(n.prop))return e(n,r)}):this.walk((n,r)=>{if("decl"===n.type&&n.prop===t)return e(n,r)}):(e=t,this.walk((t,n)=>{if("decl"===t.type)return e(t,n)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((n,r)=>{if("rule"===n.type&&t.test(n.selector))return e(n,r)}):this.walk((n,r)=>{if("rule"===n.type&&n.selector===t)return e(n,r)}):(e=t,this.walk((t,n)=>{if("rule"===t.type)return e(t,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ar.registerParse=t=>{mr=t},Ar.registerRule=t=>{gr=t},Ar.registerAtRule=t=>{yr=t},Ar.registerRoot=t=>{wr=t};var Rr=Ar;Ar.default=Ar,Ar.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,yr.prototype):"rule"===t.type?Object.setPrototypeOf(t,gr.prototype):"decl"===t.type?Object.setPrototypeOf(t,Sr.prototype):"comment"===t.type?Object.setPrototypeOf(t,Cr.prototype):"root"===t.type&&Object.setPrototypeOf(t,wr.prototype),t[vr]=!0,t.nodes&&t.nodes.forEach(t=>{Ar.rebuild(t)})};let xr,Er,Tr=Rr,_r=class extends Tr{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new xr(new Er,this,t).stringify()}};_r.registerLazyResult=t=>{xr=t},_r.registerProcessor=t=>{Er=t};var Or=_r;_r.default=_r;let Fr={};var Nr=function(t){Fr[t]||(Fr[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))};let Br=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Lr=Br;Br.default=Br;let Pr=Lr,Dr=class{constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new Pr(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}};var jr=Dr;Dr.default=Dr;const Ur="'".charCodeAt(0),Gr='"'.charCodeAt(0),Wr="\\".charCodeAt(0),$r="/".charCodeAt(0),Vr="\n".charCodeAt(0),Zr=" ".charCodeAt(0),Yr="\f".charCodeAt(0),zr="\t".charCodeAt(0),Hr="\r".charCodeAt(0),Xr="[".charCodeAt(0),Jr="]".charCodeAt(0),Kr="(".charCodeAt(0),qr=")".charCodeAt(0),Qr="{".charCodeAt(0),ti="}".charCodeAt(0),ei=";".charCodeAt(0),ni="*".charCodeAt(0),ri=":".charCodeAt(0),ii="@".charCodeAt(0),oi=/[\t\n\f\r "#'()/;[\\\]{}]/g,si=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ai=/.[\r\n"'(/\\]/,ci=/[\da-f]/i;let li=Rr,ui=class extends li{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var hi=ui;ui.default=ui,li.registerAtRule(ui);let fi,di,pi=Rr,mi=class extends pi{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e)if("prepend"===n)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of r)t.raws.before=e.raws.before;return r}removeChild(t,e){let n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new fi(new di,this,t).stringify()}};mi.registerLazyResult=t=>{fi=t},mi.registerProcessor=t=>{di=t};var gi=mi;mi.default=mi,pi.registerRoot(mi);let yi={comma:t=>yi.split(t,[","],!0),space:t=>yi.split(t,[" ","\n","\t"]),split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let n of t)l?l=!1:"\\"===n?l=!0:a?n===c&&(a=!1):'"'===n||"'"===n?(a=!0,c=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&e.includes(n)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=n;return(n||""!==i)&&r.push(i.trim()),r}};var wi=yi;yi.default=yi;let bi=Rr,vi=wi,Si=class extends bi{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return vi.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}};var Ci=Si;Si.default=Si,bi.registerRule(Si);let ki=Tn,Ii=pr,Mi=hi,Ai=gi,Ri=Ci;const xi={empty:!0,space:!0};let Ei=Rr,Ti=class{constructor(t){this.input=t,this.root=new Ai,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,n,r,i=new Mi;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?c.push("("===e?")":"]"):"{"===e&&c.length>0?c.push("}"):e===c[c.length-1]&&c.pop(),0===c.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){s=!0;break}if("}"===e){if(a.length>0){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let n,r=0;for(let i=e-1;i>=0&&(n=t[i],"space"===n[0]||(r+=1,2!==r));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(t){let e,n,r,i=0;for(let[o,s]of t.entries()){if(e=s,n=e[0],"("===n&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return o}this.doubleColon(e)}r=e}return!1}comment(t){let e=new Ii;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let t=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=function(t,e={}){let n,r,i,o,s,a,c,l,u,h,f=t.css.valueOf(),d=e.ignoreErrors,p=f.length,m=0,g=[],y=[];function w(e){throw t.error("Unclosed "+e,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(m>=p)return;let e=!!t&&t.ignoreUnclosed;switch(n=f.charCodeAt(m),n){case Vr:case Zr:case zr:case Hr:case Yr:r=m;do{r+=1,n=f.charCodeAt(r)}while(n===Zr||n===Vr||n===zr||n===Hr||n===Yr);h=["space",f.slice(m,r)],m=r-1;break;case Xr:case Jr:case Qr:case ti:case ri:case ei:case qr:{let t=String.fromCharCode(n);h=[t,t,m];break}case Kr:if(l=g.length?g.pop()[1]:"",u=f.charCodeAt(m+1),"url"===l&&u!==Ur&&u!==Gr&&u!==Zr&&u!==Vr&&u!==zr&&u!==Yr&&u!==Hr){r=m;do{if(a=!1,r=f.indexOf(")",r+1),-1===r){if(d||e){r=m;break}w("bracket")}for(c=r;f.charCodeAt(c-1)===Wr;)c-=1,a=!a}while(a);h=["brackets",f.slice(m,r+1),m,r],m=r}else r=f.indexOf(")",m+1),o=f.slice(m,r+1),-1===r||ai.test(o)?h=["(","(",m]:(h=["brackets",o,m,r],m=r);break;case Ur:case Gr:i=n===Ur?"'":'"',r=m;do{if(a=!1,r=f.indexOf(i,r+1),-1===r){if(d||e){r=m+1;break}w("string")}for(c=r;f.charCodeAt(c-1)===Wr;)c-=1,a=!a}while(a);h=["string",f.slice(m,r+1),m,r],m=r;break;case ii:oi.lastIndex=m+1,oi.test(f),r=0===oi.lastIndex?f.length-1:oi.lastIndex-2,h=["at-word",f.slice(m,r+1),m,r],m=r;break;case Wr:for(r=m,s=!0;f.charCodeAt(r+1)===Wr;)r+=1,s=!s;if(n=f.charCodeAt(r+1),s&&n!==$r&&n!==Zr&&n!==Vr&&n!==zr&&n!==Hr&&n!==Yr&&(r+=1,ci.test(f.charAt(r)))){for(;ci.test(f.charAt(r+1));)r+=1;f.charCodeAt(r+1)===Zr&&(r+=1)}h=["word",f.slice(m,r+1),m,r],m=r;break;default:n===$r&&f.charCodeAt(m+1)===ni?(r=f.indexOf("*/",m+2)+1,0===r&&(d||e?r=f.length:w("comment")),h=["comment",f.slice(m,r+1),m,r],m=r):(si.lastIndex=m+1,si.test(f),r=0===si.lastIndex?f.length-1:si.lastIndex-2,h=["word",f.slice(m,r+1),m,r],g.push(h),m=r)}return m++,h},position:function(){return m}}}(this.input)}decl(t,e){let n=new ki;this.init(n,t[0][2]);let r,i=t[t.length-1];for(";"===i[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(r=t.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o,s=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)s.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(r=t[e],"!important"===r[1].toLowerCase()){n.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(n.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=t.slice(0),i="";for(let t=e;t>0;t--){let e=r[t][0];if(0===i.trim().indexOf("!")&&"space"!==e)break;i=r.pop()[1]+i}0===i.trim().indexOf("!")&&(n.important=!0,n.raws.important=i,t=r)}if("space"!==r[0]&&"comment"!==r[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(n.raws.between+=s.map(t=>t[1]).join(""),s=[]),this.raw(n,"value",s.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Ri;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),"("===n||"["===n)i||(i=c),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=c),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),e=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],"space"===c||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s,a,c=n.length,l="",u=!0;for(let t=0;t<c;t+=1)i=n[t],o=i[0],"space"!==o||t!==c-1||r?"comment"===o?(a=n[t-1]?n[t-1][0]:"empty",s=n[t+1]?n[t+1][0]:"empty",xi[a]||xi[s]||","===l.slice(-1)?u=!1:l+=i[1]):l+=i[1]:u=!1;if(!u){let r=n.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:r,value:l}}t[e]=l}rule(t){t.pop();let e=new Ri;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},_i=tr;function Oi(t,e){let n=new _i(t,e),r=new Ti(n);try{r.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}var Fi=Oi;Oi.default=Oi,Ei.registerParse(Oi);let{isClean:Ni,my:Bi}=dn,Li=hr,Pi=bn,Di=Rr,ji=Or,Ui=Nr,Gi=jr,Wi=Fi,$i=gi;const Vi={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Zi={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Yi={Once:!0,postcssPlugin:!0,prepare:!0};function zi(t){return"object"==typeof t&&"function"==typeof t.then}function Hi(t){let e=!1,n=Vi[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,0,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function Xi(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Hi(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Ji(t){return t[Ni]=!1,t.nodes&&t.nodes.forEach(t=>Ji(t)),t}let Ki={},qi=class t{constructor(e,n,r){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof t||n instanceof Gi)i=Ji(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let t=Wi;r.syntax&&(t=r.syntax.parse),r.parser&&(t=r.parser),t.parse&&(t=t.parse);try{i=t(n,r)}catch(t){this.processed=!0,this.error=t}i&&!i[Bi]&&Di.rebuild(i)}else i=Ji(n);this.result=new Gi(e,i,r),this.helpers={...Ki,postcss:Ki,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let n=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){let t=n.postcssPlugin,e=n.postcssVersion,r=this.result.processor.version,i=e.split("."),o=r.split(".");(i[0]!==o[0]||parseInt(i[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=n.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,n)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,n])};for(let e of this.plugins)if("object"==typeof e)for(let n in e){if(!Zi[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Yi[n])if("object"==typeof e[n])for(let r in e[n])t(e,"*"===r?n:n+"-"+r.toLowerCase(),e[n][r]);else"function"==typeof e[n]&&t(e,n,e[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let e=this.plugins[t],n=this.runOnRoot(e);if(zi(n))try{await n}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ni];){t[Ni]=!0;let e=[Xi(t)];for(;e.length>0;){let t=this.visitTick(e);if(zi(t))try{await t}catch(t){let n=e[e.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(t=>n(t,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return zi(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,e=Pi;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let n=new Li(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins)if(zi(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ni];)t[Ni]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Ui("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(let[n,r]of t){let t;this.result.lastPlugin=n;try{t=r(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(zi(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:n,visitors:r}=e;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(r.length>0&&e.visitorIndex<r.length){let[t,i]=r[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===r.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return i(n.toProxy(),this.helpers)}catch(t){throw this.handleError(t,n)}}if(0!==e.iterator){let r,i=e.iterator;for(;r=n.nodes[n.indexes[i]];)if(n.indexes[i]+=1,!r[Ni])return r[Ni]=!0,void t.push(Xi(r));e.iterator=0,delete n.indexes[i]}let i=e.events;for(;e.eventIndex<i.length;){let t=i[e.eventIndex];if(e.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[Ni]=!0,e.iterator=n.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[Ni]=!0;let e=Hi(t);for(let n of e)if(0===n)t.nodes&&t.each(t=>{t[Ni]||this.walkSync(t)});else{let e=this.listeners[n];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};qi.registerPostcss=t=>{Ki=t};var Qi=qi;qi.default=qi,$i.registerLazyResult(qi),ji.registerLazyResult(qi);let to=hr,eo=bn,no=Nr,ro=Fi;const io=jr;let oo=class{constructor(t,e,n){let r;e=e.toString(),this.stringified=!1,this.p=t,this.m=e,this.v=n,this.S=void 0;let i=eo;this.result=new io(this.p,r,this.v),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let s=new to(i,r,this.v,e);if(s.isMap()){let[t,e]=s.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.v||no("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.m}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.C)return this.C;let t,e=ro;try{t=e(this.m,this.v)}catch(t){this.error=t}if(this.error)throw this.error;return this.C=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var so=oo;oo.default=oo;let ao=so,co=Qi,lo=Or,uo=gi,ho=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)e.push(n);else if("function"==typeof n)e.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new co(this,t,e):new ao(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var fo=ho;ho.default=ho,uo.registerProcessor(ho),lo.registerProcessor(ho);let po=Tn,mo=jn,go=pr,yo=hi,wo=tr,bo=gi,vo=Ci;function So(t,e){if(Array.isArray(t))return t.map(t=>So(t));let{inputs:n,...r}=t;if(n){e=[];for(let t of n){let n={...t,__proto__:wo.prototype};n.map&&(n.map={...n.map,__proto__:mo.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=t.nodes.map(t=>So(t,e))),r.source){let{inputId:t,...n}=r.source;r.source=n,null!=t&&(r.source.input=e[t])}if("root"===r.type)return new bo(r);if("decl"===r.type)return new po(r);if("rule"===r.type)return new vo(r);if("comment"===r.type)return new go(r);if("atrule"===r.type)return new yo(r);throw new Error("Unknown node type: "+t.type)}var Co=So;So.default=So;let ko=fn,Io=Tn,Mo=Qi,Ao=Rr,Ro=fo,xo=bn,Eo=Co,To=Or,_o=Lr,Oo=pr,Fo=hi,No=jr,Bo=tr,Lo=Fi,Po=wi,Do=Ci,jo=gi,Uo=Rn;function Go(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Ro(t)}Go.plugin=function(t,e){let n,r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=e(...n);return i.postcssPlugin=t,i.postcssVersion=(new Ro).version,i}return Object.defineProperty(i,"postcss",{get:()=>(n||(n=i()),n)}),i.process=function(t,e,n){return Go([i(n)]).process(t,e)},i},Go.stringify=xo,Go.parse=Lo,Go.fromJSON=Eo,Go.list=Po,Go.comment=t=>new Oo(t),Go.atRule=t=>new Fo(t),Go.decl=t=>new Io(t),Go.rule=t=>new Do(t),Go.root=t=>new jo(t),Go.document=t=>new To(t),Go.CssSyntaxError=ko,Go.Declaration=Io,Go.Container=Ao,Go.Processor=Ro,Go.Document=To,Go.Comment=Oo,Go.Warning=_o,Go.AtRule=Fo,Go.Result=No,Go.Input=Bo,Go.Rule=Do,Go.Root=jo,Go.Node=Uo,Mo.registerPostcss(Go);var Wo=Go;Go.default=Go;const $o=en(Wo);$o.stringify,$o.fromJSON,$o.plugin,$o.parse,$o.list,$o.document,$o.comment,$o.atRule,$o.rule,$o.decl,$o.root,$o.CssSyntaxError,$o.Declaration,$o.Container,$o.Processor,$o.Document,$o.Comment,$o.Warning,$o.AtRule,$o.Result,$o.Input,$o.Rule,$o.Root,$o.Node;var Vo=Object.defineProperty,Zo=(t,e,n)=>((t,e,n)=>e in t?Vo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);function Yo(t){return t&&t.u&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zo(t){if(t.u)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"u",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),n}var Ho={exports:{}},Xo=String,Jo=function(){return{isColorSupported:!1,reset:Xo,bold:Xo,dim:Xo,italic:Xo,underline:Xo,inverse:Xo,hidden:Xo,strikethrough:Xo,black:Xo,red:Xo,green:Xo,yellow:Xo,blue:Xo,magenta:Xo,cyan:Xo,white:Xo,gray:Xo,bgBlack:Xo,bgRed:Xo,bgGreen:Xo,bgYellow:Xo,bgBlue:Xo,bgMagenta:Xo,bgCyan:Xo,bgWhite:Xo}};Ho.exports=Jo(),Ho.exports.createColors=Jo;var Ko=Ho.exports;const qo=zo(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Qo=Ko,ts=qo,es=class t extends Error{constructor(e,n,r,i,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),s&&(this.plugin=s),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=Qo.isColorSupported),ts&&t&&(e=ts(e));let n,r,i=e.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,i.length),a=String(s).length;if(t){let{bold:t,gray:e,red:i}=Qo.createColors(!0);n=e=>t(i(e)),r=t=>e(t)}else n=r=t=>t;return i.slice(o,s).map((t,e)=>{let i=o+1+e,s=" "+(" "+i).slice(-a)+" | ";if(i===this.line){let e=r(s.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(s)+t+"\n "+e+n("^")}return" "+r(s)+t}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};var ns=es;es.default=es;var rs={};rs.isClean=Symbol("isClean"),rs.my=Symbol("my");const is={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let os=class{constructor(t){this.builder=t}atrule(t,e){let n="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?n+=t.raws.afterName:r&&(n+=" "),t.nodes)this.block(t,n+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(n+r+i,t)}}beforeAfter(t,e){let n;n="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;t<i;t++)n+=e}return n}block(t,e){let n,r=this.raw(t,"between","beforeOpen");this.builder(e+r+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&"comment"===t.nodes[e].type;)e-=1;let n=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||n)}}comment(t){let e=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+n+"*/",t)}decl(t,e){let n=this.raw(t,"between","colon"),r=t.prop+n+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,n){let r;if(n||(n=e),e&&(r=t.raws[e],void 0!==r))return r;let i=t.parent;if("before"===n){if(!i||"root"===i.type&&i.first===t)return"";if(i&&"document"===i.type)return""}if(!i)return is[n];let o=t.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let i="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[i]?r=this[i](o,t):o.walk(t=>{if(r=t.raws[e],void 0!==r)return!1})}var s;return void 0===r&&(r=is[n]),o.rawCache[n]=r,r}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let n;return t.walkComments(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,e){let n;return t.walkDecls(t=>{if(void 0!==t.raws.before)return n=t.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(e,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&void 0!==n.raws.before)return e=n.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(n=>{let r=n.parent;if(r&&r!==t&&r.parent&&r.parent===t&&void 0!==n.raws.before){let t=n.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let n=t[e],r=t.raws[e];return r&&r.value===n?r.raw:n}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};var ss=os;os.default=os;let as=ss;function cs(t,e){new as(e).stringify(t)}var ls=cs;cs.default=cs;let{isClean:us,my:hs}=rs,fs=ns,ds=ss,ps=ls;function ms(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;if("proxyCache"===r)continue;let i=t[r],o=typeof i;"parent"===r&&"object"===o?e&&(n[r]=e):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(t=>ms(t,n)):("object"===o&&null!==i&&(i=ms(i)),n[r]=i)}return n}let gs=class{constructor(t={}){this.raws={},this[us]=!1,this[hs]=!0;for(let e in t)if("nodes"===e){this.nodes=[];for(let n of t[e])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=ms(this);for(let n in t)e[n]=t[n];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:n,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:n.column,line:n.line},e)}return new fs(t)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,n)=>(t[e]===n||(t[e]=n,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markDirty(){if(this[us]){this[us]=!1;let t=this;for(;t=t.parent;)t[us]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,e){let n=this.source.start;if(t.index)n=this.positionInside(t.index,e);else if(t.word){let r=(e=this.toString()).indexOf(t.word);-1!==r&&(n=this.positionInside(r,e))}return n}positionInside(t,e){let n=e||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let e=0;e<t;e++)"\n"===n[e]?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:e.column+1,line:e.line};if(t.word){let r=this.toString(),i=r.indexOf(t.word);-1!==i&&(e=this.positionInside(i,r),n=this.positionInside(i+t.word.length,r))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):t.index&&(n=this.positionInside(t.index+1));return(n.line<e.line||n.line===e.line&&n.column<=e.column)&&(n={column:e.column+1,line:e.line}),{end:n,start:e}}raw(t,e){return(new ds).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,n=!1;for(let r of t)r===this?n=!0:n?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);n||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){let n={},r=null==e;e=e||new Map;let i=0;for(let t in this){if(!Object.prototype.hasOwnProperty.call(this,t))continue;if("parent"===t||"proxyCache"===t)continue;let r=this[t];if(Array.isArray(r))n[t]=r.map(t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t);else if("object"==typeof r&&r.toJSON)n[t]=r.toJSON(null,e);else if("source"===t){let o=e.get(r.input);null==o&&(o=i,e.set(r.input,i),i++),n[t]={end:r.end,inputId:o,start:r.start}}else n[t]=r}return r&&(n.inputs=[...e.keys()].map(t=>t.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=ps){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,n){let r={node:this};for(let t in n)r[t]=n[t];return t.warn(e,r)}get proxyOf(){return this}};var ys=gs;gs.default=gs;let ws=ys,bs=class extends ws{constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var vs=bs;bs.default=bs;var Ss={nanoid:(t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e}};let{SourceMapConsumer:Cs,SourceMapGenerator:ks}=qo,{existsSync:Is,readFileSync:Ms}=qo,{dirname:As,join:Rs}=qo,xs=class{constructor(t,e){if(!1===e.map)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=e.map?e.map.prev:void 0,r=this.loadMap(e.from,n);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=As(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Cs(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),Buffer?Buffer.from(e,"base64").toString():window.atob(e);var e;let n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t.h||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!e)return;let n=t.lastIndexOf(e.pop()),r=t.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,r)))}loadFile(t){if(this.root=As(t),Is(t))return this.mapFile=t,Ms(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof Cs)return ks.fromSourceMap(e).toString();if(e instanceof ks)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let n=e(t);if(n){let t=this.loadFile(n);if(!t)throw new Error("Unable to load previous source map: "+n.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=Rs(As(t),e)),this.loadFile(e)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Es=xs;xs.default=xs;let{SourceMapConsumer:Ts,SourceMapGenerator:_s}=qo,{fileURLToPath:Os,pathToFileURL:Fs}=qo,{isAbsolute:Ns,resolve:Bs}=qo,{nanoid:Ls}=Ss,Ps=qo,Ds=ns,js=Es,Us=Symbol("fromOffsetCache"),Gs=Boolean(Ts&&_s),Ws=Boolean(Bs&&Ns),$s=class{constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(!Ws||/^\w+:\/\//.test(e.from)||Ns(e.from)?this.file=e.from:this.file=Bs(e.from)),Ws&&Gs){let t=new js(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+Ls(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,n,r={}){let i,o,s;if(e&&"object"==typeof e){let t=e,r=n;if("number"==typeof t.offset){let r=this.fromOffset(t.offset);e=r.line,n=r.col}else e=t.line,n=t.column;if("number"==typeof r.offset){let t=this.fromOffset(r.offset);o=t.line,s=t.col}else o=r.line,s=r.column}else if(!n){let t=this.fromOffset(e);e=t.line,n=t.col}let a=this.origin(e,n,o,s);return i=a?new Ds(t,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):new Ds(t,void 0===o?e:{column:n,line:e},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin),i.input={column:n,endColumn:s,endLine:o,line:e,source:this.css},this.file&&(Fs&&(i.input.url=Fs(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let e,n;if(this[Us])n=this[Us];else{let t=this.css.split("\n");n=new Array(t.length);let e=0;for(let r=0,i=t.length;r<i;r++)n[r]=e,e+=t[r].length+1;this[Us]=n}e=n[n.length-1];let r=0;if(t>=e)r=n.length-1;else{let e,i=n.length-2;for(;r<i;)if(e=r+(i-r>>1),t<n[e])i=e-1;else{if(!(t>=n[e+1])){r=e;break}r=e+1}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Bs(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,n,r){if(!this.map)return!1;let i,o,s=this.map.consumer(),a=s.originalPositionFor({column:e,line:t});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=Ns(a.source)?Fs(a.source):new URL(a.source,this.map.consumer().sourceRoot||Fs(this.map.mapFile));let c={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Os)throw new Error("file: protocol is not available in this PostCSS build");c.file=Os(o)}let l=s.sourceContentFor(a.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var Vs=$s;$s.default=$s,Ps&&Ps.registerInput&&Ps.registerInput($s);let{SourceMapConsumer:Zs,SourceMapGenerator:Ys}=qo,{dirname:zs,relative:Hs,resolve:Xs,sep:Js}=qo,{pathToFileURL:Ks}=qo,qs=Vs,Qs=Boolean(Zs&&Ys),ta=Boolean(zs&&Xs&&Hs&&Js);var ea=class{constructor(t,e,n,r){this.stringify=t,this.mapOpts=n.map||{},this.root=e,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,n=this.toUrl(this.path(t.file)),r=t.root||zs(t.file);!1===this.mapOpts.sourcesContent?(e=new Zs(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ta&&Qs&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Ys.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ys({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ys({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,n=1,r=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(s,a,c)=>{if(this.css+=s,a&&"end"!==c&&(o.generated.line=n,o.generated.column=r-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,this.map.addMapping(o))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),r=s.length-e):r+=s.length,a&&"start"!==c){let t=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===t.last&&!t.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=n,o.generated.column=r-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=n,o.generated.column=r-1,this.map.addMapping(o)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let n=this.opts.to?zs(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=zs(Xs(n,this.mapOpts.annotation)));let r=Hs(n,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new qs(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let n=e.source.input.from;if(n&&!t[n]){t[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,e.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Ks){let e=Ks(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===Js&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}};let na=ys,ra=class extends na{constructor(t){super(t),this.type="comment"}};var ia=ra;ra.default=ra;let oa,sa,aa,ca,{isClean:la,my:ua}=rs,ha=vs,fa=ia,da=ys;function pa(t){return t.map(t=>(t.nodes&&(t.nodes=pa(t.nodes)),delete t.source,t))}function ma(t){if(t[la]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ma(e)}let ga=class t extends da{append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let e of this.nodes)e.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let e,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(e=this.indexes[r],n=t(this.proxyOf.nodes[e],e),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...n)=>t[e](...n.map(t=>"function"==typeof t?(e,n)=>t(e.toProxy(),n):t)):"every"===e||"some"===e?n=>t[e]((t,...e)=>n(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,n)=>(t[e]===n||(t[e]=n,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let n,r=this.index(t),i=this.normalize(e,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let t of i)this.proxyOf.nodes.splice(r+1,0,t);for(let t in this.indexes)n=this.indexes[t],r<n&&(this.indexes[t]=n+i.length);return this.markDirty(),this}insertBefore(t,e){let n,r=this.index(t),i=0===r&&"prepend",o=this.normalize(e,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let t of o)this.proxyOf.nodes.splice(r,0,t);for(let t in this.indexes)n=this.indexes[t],r<=n&&(this.indexes[t]=n+o.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=pa(oa(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new ha(e)]}else if(e.selector)e=[new sa(e)];else if(e.name)e=[new aa(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new fa(e)]}return e.map(e=>(e[ua]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[la]&&ma(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let n in this.indexes)e=this.indexes[n],e>=t&&(this.indexes[n]=e-1);return this.markDirty(),this}replaceValues(t,e,n){return n||(n=e,e={}),this.walkDecls(r=>{e.props&&!e.props.includes(r.prop)||e.fast&&!r.value.includes(e.fast)||(r.value=r.value.replace(t,n))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((e,n)=>{let r;try{r=t(e,n)}catch(t){throw e.addToError(t)}return!1!==r&&e.walk&&(r=e.walk(t)),r})}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((n,r)=>{if("atrule"===n.type&&t.test(n.name))return e(n,r)}):this.walk((n,r)=>{if("atrule"===n.type&&n.name===t)return e(n,r)}):(e=t,this.walk((t,n)=>{if("atrule"===t.type)return e(t,n)}))}walkComments(t){return this.walk((e,n)=>{if("comment"===e.type)return t(e,n)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((n,r)=>{if("decl"===n.type&&t.test(n.prop))return e(n,r)}):this.walk((n,r)=>{if("decl"===n.type&&n.prop===t)return e(n,r)}):(e=t,this.walk((t,n)=>{if("decl"===t.type)return e(t,n)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((n,r)=>{if("rule"===n.type&&t.test(n.selector))return e(n,r)}):this.walk((n,r)=>{if("rule"===n.type&&n.selector===t)return e(n,r)}):(e=t,this.walk((t,n)=>{if("rule"===t.type)return e(t,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ga.registerParse=t=>{oa=t},ga.registerRule=t=>{sa=t},ga.registerAtRule=t=>{aa=t},ga.registerRoot=t=>{ca=t};var ya=ga;ga.default=ga,ga.rebuild=t=>{"atrule"===t.type?Object.setPrototypeOf(t,aa.prototype):"rule"===t.type?Object.setPrototypeOf(t,sa.prototype):"decl"===t.type?Object.setPrototypeOf(t,ha.prototype):"comment"===t.type?Object.setPrototypeOf(t,fa.prototype):"root"===t.type&&Object.setPrototypeOf(t,ca.prototype),t[ua]=!0,t.nodes&&t.nodes.forEach(t=>{ga.rebuild(t)})};let wa,ba,va=ya,Sa=class extends va{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new wa(new ba,this,t).stringify()}};Sa.registerLazyResult=t=>{wa=t},Sa.registerProcessor=t=>{ba=t};var Ca=Sa;Sa.default=Sa;let ka={};var Ia=function(t){ka[t]||(ka[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))};let Ma=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Aa=Ma;Ma.default=Ma;let Ra=Aa,xa=class{constructor(t,e,n){this.processor=t,this.messages=[],this.root=e,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new Ra(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}get content(){return this.css}};var Ea=xa;xa.default=xa;const Ta="'".charCodeAt(0),_a='"'.charCodeAt(0),Oa="\\".charCodeAt(0),Fa="/".charCodeAt(0),Na="\n".charCodeAt(0),Ba=" ".charCodeAt(0),La="\f".charCodeAt(0),Pa="\t".charCodeAt(0),Da="\r".charCodeAt(0),ja="[".charCodeAt(0),Ua="]".charCodeAt(0),Ga="(".charCodeAt(0),Wa=")".charCodeAt(0),$a="{".charCodeAt(0),Va="}".charCodeAt(0),Za=";".charCodeAt(0),Ya="*".charCodeAt(0),za=":".charCodeAt(0),Ha="@".charCodeAt(0),Xa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ja=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ka=/.[\r\n"'(/\\]/,qa=/[\da-f]/i;let Qa=ya,tc=class extends Qa{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var ec=tc;tc.default=tc,Qa.registerAtRule(tc);let nc,rc,ic=ya,oc=class extends ic{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,n){let r=super.normalize(t);if(e)if("prepend"===n)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of r)t.raws.before=e.raws.before;return r}removeChild(t,e){let n=this.index(t);return!e&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new nc(new rc,this,t).stringify()}};oc.registerLazyResult=t=>{nc=t},oc.registerProcessor=t=>{rc=t};var sc=oc;oc.default=oc,ic.registerRoot(oc);let ac={comma:t=>ac.split(t,[","],!0),space:t=>ac.split(t,[" ","\n","\t"]),split(t,e,n){let r=[],i="",o=!1,s=0,a=!1,c="",l=!1;for(let n of t)l?l=!1:"\\"===n?l=!0:a?n===c&&(a=!1):'"'===n||"'"===n?(a=!0,c=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&e.includes(n)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=n;return(n||""!==i)&&r.push(i.trim()),r}};var cc=ac;ac.default=ac;let lc=ya,uc=cc,hc=class extends lc{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return uc.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,n=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}};var fc=hc;hc.default=hc,lc.registerRule(hc);let dc=vs,pc=ia,mc=ec,gc=sc,yc=fc;const wc={empty:!0,space:!0};let bc=ya,vc=class{constructor(t){this.input=t,this.root=new gc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,n,r,i=new mc;i.name=t[1].slice(1),""===i.name&&this.unnamedAtrule(i,t),this.init(i,t[2]);let o=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?c.push("("===e?")":"]"):"{"===e&&c.length>0?c.push("}"):e===c[c.length-1]&&c.pop(),0===c.length){if(";"===e){i.source.end=this.getPosition(t[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===e){s=!0;break}if("}"===e){if(a.length>0){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(t=a[a.length-1],i.source.end=this.getPosition(t[3]||t[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let n,r=0;for(let i=e-1;i>=0&&(n=t[i],"space"===n[0]||(r+=1,2!==r));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(t){let e,n,r,i=0;for(let[o,s]of t.entries()){if(e=s,n=e[0],"("===n&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return o}this.doubleColon(e)}r=e}return!1}comment(t){let e=new pc;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let n=t[1].slice(2,-2);if(/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{let t=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=function(t,e={}){let n,r,i,o,s,a,c,l,u,h,f=t.css.valueOf(),d=e.ignoreErrors,p=f.length,m=0,g=[],y=[];function w(e){throw t.error("Unclosed "+e,m)}return{back:function(t){y.push(t)},endOfFile:function(){return 0===y.length&&m>=p},nextToken:function(t){if(y.length)return y.pop();if(m>=p)return;let e=!!t&&t.ignoreUnclosed;switch(n=f.charCodeAt(m),n){case Na:case Ba:case Pa:case Da:case La:r=m;do{r+=1,n=f.charCodeAt(r)}while(n===Ba||n===Na||n===Pa||n===Da||n===La);h=["space",f.slice(m,r)],m=r-1;break;case ja:case Ua:case $a:case Va:case za:case Za:case Wa:{let t=String.fromCharCode(n);h=[t,t,m];break}case Ga:if(l=g.length?g.pop()[1]:"",u=f.charCodeAt(m+1),"url"===l&&u!==Ta&&u!==_a&&u!==Ba&&u!==Na&&u!==Pa&&u!==La&&u!==Da){r=m;do{if(a=!1,r=f.indexOf(")",r+1),-1===r){if(d||e){r=m;break}w("bracket")}for(c=r;f.charCodeAt(c-1)===Oa;)c-=1,a=!a}while(a);h=["brackets",f.slice(m,r+1),m,r],m=r}else r=f.indexOf(")",m+1),o=f.slice(m,r+1),-1===r||Ka.test(o)?h=["(","(",m]:(h=["brackets",o,m,r],m=r);break;case Ta:case _a:i=n===Ta?"'":'"',r=m;do{if(a=!1,r=f.indexOf(i,r+1),-1===r){if(d||e){r=m+1;break}w("string")}for(c=r;f.charCodeAt(c-1)===Oa;)c-=1,a=!a}while(a);h=["string",f.slice(m,r+1),m,r],m=r;break;case Ha:Xa.lastIndex=m+1,Xa.test(f),r=0===Xa.lastIndex?f.length-1:Xa.lastIndex-2,h=["at-word",f.slice(m,r+1),m,r],m=r;break;case Oa:for(r=m,s=!0;f.charCodeAt(r+1)===Oa;)r+=1,s=!s;if(n=f.charCodeAt(r+1),s&&n!==Fa&&n!==Ba&&n!==Na&&n!==Pa&&n!==Da&&n!==La&&(r+=1,qa.test(f.charAt(r)))){for(;qa.test(f.charAt(r+1));)r+=1;f.charCodeAt(r+1)===Ba&&(r+=1)}h=["word",f.slice(m,r+1),m,r],m=r;break;default:n===Fa&&f.charCodeAt(m+1)===Ya?(r=f.indexOf("*/",m+2)+1,0===r&&(d||e?r=f.length:w("comment")),h=["comment",f.slice(m,r+1),m,r],m=r):(Ja.lastIndex=m+1,Ja.test(f),r=0===Ja.lastIndex?f.length-1:Ja.lastIndex-2,h=["word",f.slice(m,r+1),m,r],g.push(h),m=r)}return m++,h},position:function(){return m}}}(this.input)}decl(t,e){let n=new dc;this.init(n,t[0][2]);let r,i=t[t.length-1];for(";"===i[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(r=t.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o,s=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)s.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(r=t[e],"!important"===r[1].toLowerCase()){n.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(n.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=t.slice(0),i="";for(let t=e;t>0;t--){let e=r[t][0];if(0===i.trim().indexOf("!")&&"space"!==e)break;i=r.pop()[1]+i}0===i.trim().indexOf("!")&&(n.important=!0,n.raws.important=i,t=r)}if("space"!==r[0]&&"comment"!==r[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(n.raws.between+=s.map(t=>t[1]).join(""),s=[]),this.raw(n,"value",s.concat(t),e),n.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new yc;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,n=null,r=!1,i=null,o=[],s=t[1].startsWith("--"),a=[],c=t;for(;c;){if(n=c[0],a.push(c),"("===n||"["===n)i||(i=c),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=c),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),e=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!s)for(;a.length&&(c=a[a.length-1][0],"space"===c||"comment"===c);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,n,r){let i,o,s,a,c=n.length,l="",u=!0;for(let t=0;t<c;t+=1)i=n[t],o=i[0],"space"!==o||t!==c-1||r?"comment"===o?(a=n[t-1]?n[t-1][0]:"empty",s=n[t+1]?n[t+1][0]:"empty",wc[a]||wc[s]||","===l.slice(-1)?u=!1:l+=i[1]):l+=i[1]:u=!1;if(!u){let r=n.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:r,value:l}}t[e]=l}rule(t){t.pop();let e=new yc;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let e,n="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)n+=t.shift()[1];return n}spacesFromEnd(t){let e,n="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)n=t.pop()[1]+n;return n}stringFrom(t,e){let n="";for(let r=e;r<t.length;r++)n+=t[r][1];return t.splice(e,t.length-e),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}},Sc=Vs;function Cc(t,e){let n=new Sc(t,e),r=new vc(n);try{r.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}var kc=Cc;Cc.default=Cc,bc.registerParse(Cc);let{isClean:Ic,my:Mc}=rs,Ac=ea,Rc=ls,xc=ya,Ec=Ca,Tc=Ia,_c=Ea,Oc=kc,Fc=sc;const Nc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Bc={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Lc={Once:!0,postcssPlugin:!0,prepare:!0};function Pc(t){return"object"==typeof t&&"function"==typeof t.then}function Dc(t){let e=!1,n=Nc[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,0,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function jc(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:Dc(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Uc(t){return t[Ic]=!1,t.nodes&&t.nodes.forEach(t=>Uc(t)),t}let Gc={},Wc=class t{constructor(e,n,r){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof t||n instanceof _c)i=Uc(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let t=Oc;r.syntax&&(t=r.syntax.parse),r.parser&&(t=r.parser),t.parse&&(t=t.parse);try{i=t(n,r)}catch(t){this.processed=!0,this.error=t}i&&!i[Mc]&&xc.rebuild(i)}else i=Uc(n);this.result=new _c(e,i,r),this.helpers={...Gc,postcss:Gc,result:this.result},this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?{...t,...t.prepare(this.result)}:t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let n=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){let t=n.postcssPlugin,e=n.postcssVersion,r=this.result.processor.version,i=e.split("."),o=r.split(".");(i[0]!==o[0]||parseInt(i[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=n.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,n)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,n])};for(let e of this.plugins)if("object"==typeof e)for(let n in e){if(!Bc[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Lc[n])if("object"==typeof e[n])for(let r in e[n])t(e,"*"===r?n:n+"-"+r.toLowerCase(),e[n][r]);else"function"==typeof e[n]&&t(e,n,e[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let e=this.plugins[t],n=this.runOnRoot(e);if(Pc(n))try{await n}catch(t){throw this.handleError(t)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ic];){t[Ic]=!0;let e=[jc(t)];for(;e.length>0;){let t=this.visitTick(e);if(Pc(t))try{await t}catch(t){let n=e[e.length-1].node;throw this.handleError(t,n)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(t=>n(t,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return Pc(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,e=Rc;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let n=new Ac(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins)if(Pc(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Ic];)t[Ic]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Tc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(let[n,r]of t){let t;this.result.lastPlugin=n;try{t=r(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(Pc(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:n,visitors:r}=e;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(r.length>0&&e.visitorIndex<r.length){let[t,i]=r[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===r.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return i(n.toProxy(),this.helpers)}catch(t){throw this.handleError(t,n)}}if(0!==e.iterator){let r,i=e.iterator;for(;r=n.nodes[n.indexes[i]];)if(n.indexes[i]+=1,!r[Ic])return r[Ic]=!0,void t.push(jc(r));e.iterator=0,delete n.indexes[i]}let i=e.events;for(;e.eventIndex<i.length;){let t=i[e.eventIndex];if(e.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[Ic]=!0,e.iterator=n.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[Ic]=!0;let e=Dc(t);for(let n of e)if(0===n)t.nodes&&t.each(t=>{t[Ic]||this.walkSync(t)});else{let e=this.listeners[n];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Wc.registerPostcss=t=>{Gc=t};var $c=Wc;Wc.default=Wc,Fc.registerLazyResult(Wc),Ec.registerLazyResult(Wc);let Vc=ea,Zc=ls,Yc=Ia,zc=kc;const Hc=Ea;let Xc=class{constructor(t,e,n){let r;e=e.toString(),this.stringified=!1,this.p=t,this.m=e,this.v=n,this.S=void 0;let i=Zc;this.result=new Hc(this.p,r,this.v),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let s=new Vc(i,r,this.v,e);if(s.isMap()){let[t,e]=s.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.v||Yc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.m}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this.C)return this.C;let t,e=zc;try{t=e(this.m,this.v)}catch(t){this.error=t}if(this.error)throw this.error;return this.C=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var Jc=Xc;Xc.default=Xc;let Kc=Jc,qc=$c,Qc=Ca,tl=sc,el=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let n of t)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))e=e.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)e.push(n);else if("function"==typeof n)e.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new qc(this,t,e):new Kc(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var nl=el;el.default=el,tl.registerProcessor(el),Qc.registerProcessor(el);let rl=vs,il=Es,ol=ia,sl=ec,al=Vs,cl=sc,ll=fc;function ul(t,e){if(Array.isArray(t))return t.map(t=>ul(t));let{inputs:n,...r}=t;if(n){e=[];for(let t of n){let n={...t,__proto__:al.prototype};n.map&&(n.map={...n.map,__proto__:il.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=t.nodes.map(t=>ul(t,e))),r.source){let{inputId:t,...n}=r.source;r.source=n,null!=t&&(r.source.input=e[t])}if("root"===r.type)return new cl(r);if("decl"===r.type)return new rl(r);if("rule"===r.type)return new ll(r);if("comment"===r.type)return new ol(r);if("atrule"===r.type)return new sl(r);throw new Error("Unknown node type: "+t.type)}var hl=ul;ul.default=ul;let fl=ns,dl=vs,pl=$c,ml=ya,gl=nl,yl=ls,wl=hl,bl=Ca,vl=Aa,Sl=ia,Cl=ec,kl=Ea,Il=Vs,Ml=kc,Al=cc,Rl=fc,xl=sc,El=ys;function Tl(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new gl(t)}Tl.plugin=function(t,e){let n,r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=e(...n);return i.postcssPlugin=t,i.postcssVersion=(new gl).version,i}return Object.defineProperty(i,"postcss",{get:()=>(n||(n=i()),n)}),i.process=function(t,e,n){return Tl([i(n)]).process(t,e)},i},Tl.stringify=yl,Tl.parse=Ml,Tl.fromJSON=wl,Tl.list=Al,Tl.comment=t=>new Sl(t),Tl.atRule=t=>new Cl(t),Tl.decl=t=>new dl(t),Tl.rule=t=>new Rl(t),Tl.root=t=>new xl(t),Tl.document=t=>new bl(t),Tl.CssSyntaxError=fl,Tl.Declaration=dl,Tl.Container=ml,Tl.Processor=gl,Tl.Document=bl,Tl.Comment=Sl,Tl.Warning=vl,Tl.AtRule=Cl,Tl.Result=kl,Tl.Input=Il,Tl.Rule=Rl,Tl.Root=xl,Tl.Node=El,pl.registerPostcss(Tl);var _l=Tl;Tl.default=Tl;const Ol=Yo(_l);Ol.stringify,Ol.fromJSON,Ol.plugin,Ol.parse,Ol.list,Ol.document,Ol.comment,Ol.atRule,Ol.rule,Ol.decl,Ol.root,Ol.CssSyntaxError,Ol.Declaration,Ol.Container,Ol.Processor,Ol.Document,Ol.Comment,Ol.Warning,Ol.AtRule,Ol.Result,Ol.Input,Ol.Rule,Ol.Root,Ol.Node;class Fl{constructor(...t){Zo(this,"parentElement",null),Zo(this,"parentNode",null),Zo(this,"ownerDocument"),Zo(this,"firstChild",null),Zo(this,"lastChild",null),Zo(this,"previousSibling",null),Zo(this,"nextSibling",null),Zo(this,"ELEMENT_NODE",1),Zo(this,"TEXT_NODE",3),Zo(this,"nodeType"),Zo(this,"nodeName"),Zo(this,"RRNodeType")}get childNodes(){const t=[];let e=this.firstChild;for(;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Fl))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Nl={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Bl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ll={};function Pl(t){if(Ll[t])return Ll[t];const e=globalThis[t],n=e.prototype,r=t in Nl?Nl[t]:void 0,i=Boolean(r&&r.every(t=>{var e,r;return Boolean(null==(r=null==(e=Object.getOwnPropertyDescriptor(n,t))?void 0:e.get)?void 0:r.toString().includes("[native code]"))})),o=t in Bl?Bl[t]:void 0,s=Boolean(o&&o.every(t=>{var e;return"function"==typeof n[t]&&(null==(e=n[t])?void 0:e.toString().includes("[native code]"))}));if(i&&s&&!globalThis.Zone)return Ll[t]=e.prototype,e.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const i=r.contentWindow;if(!i)return e.prototype;const o=i[t].prototype;return document.body.removeChild(r),o?Ll[t]=o:n}catch{return n}}const Dl={};function jl(t,e,n){var r;const i=`${t}.${String(n)}`;if(Dl[i])return Dl[i].call(e);const o=Pl(t),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(Dl[i]=s,s.call(e)):e[n]}const Ul={};function Gl(t,e,n){const r=`${t}.${String(n)}`;if(Ul[r])return Ul[r].bind(e);const i=Pl(t)[n];return"function"!=typeof i?e[n]:(Ul[r]=i,i.bind(e))}const Wl=function(t){return jl("Node",t,"childNodes")},$l=function(t){return jl("Node",t,"parentNode")},Vl=function(t){return jl("Node",t,"parentElement")},Zl=function(t){return jl("Node",t,"textContent")},Yl=function(t,e){return Gl("Node",t,"contains")(e)},zl=function(t){return Gl("Node",t,"getRootNode")()},Hl=function(t){return t&&"host"in t?jl("ShadowRoot",t,"host"):null},Xl=function(t){return t&&"shadowRoot"in t?jl("Element",t,"shadowRoot"):null};function Jl(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const Kl="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ql={map:{},getId:()=>(console.error(Kl),-1),getNode:()=>(console.error(Kl),null),removeNodeFromMap(){console.error(Kl)},has:()=>(console.error(Kl),!1),reset(){console.error(Kl)}};function Ql(t,e,n={}){let r=null,i=0;return function(...o){const s=Date.now();i||!1!==n.leading||(i=s);const a=e-(s-i),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=s,t.apply(c,o)):r||!1===n.trailing||(r=setTimeout(()=>{i=!1===n.leading?0:Date.now(),r=null,t.apply(c,o)},a))}}function tu(t,e,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(t){setTimeout(()=>{n.set.call(this,t)},0),o&&o.set&&o.set.call(this,t)}}),()=>tu(t,e,o||{},!0)}function eu(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{k:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ql=new Proxy(ql,{get:(t,e,n)=>("map"===e&&console.error(Kl),Reflect.get(t,e,n))}));let nu=Date.now;function ru(t){var e,n,r,i;const o=t.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(e=Vl(o.body))?void 0:e.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=Vl(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function iu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ou(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function su(t){return t?t.nodeType===t.ELEMENT_NODE?t:Vl(t):null}function au(t,e,n,r){if(!t)return!1;const i=su(t);if(!i)return!1;try{if("string"==typeof e){if(i.classList.contains(e))return!0;if(r&&null!==i.closest("."+e))return!0}else if(Ke(i,e,r))return!0}catch(t){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function cu(t,e,n){return!("TITLE"!==t.tagName||!n.headTitleMutations)||-2===e.getId(t)}function lu(t,e){if(ke(t))return!1;const n=e.getId(t);if(!e.has(n))return!0;const r=$l(t);return(!r||r.nodeType!==t.DOCUMENT_NODE)&&(!r||lu(r,e))}function uu(t){return Boolean(t.changedTouches)}function hu(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function fu(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function du(t){return!!t&&(t instanceof Fl&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Xl(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(nu=()=>(new Date).getTime());class pu{constructor(){ce(this,"id",1),ce(this,"styleIDMap",new WeakMap),ce(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function mu(t){var e;let n=null;return"getRootNode"in t&&(null==(e=zl(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Hl(zl(t))&&(n=Hl(zl(t))),n}function gu(t){const e=t.ownerDocument;return!!e&&(Yl(e,t)||function(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=mu(n);)n=e;return n}(t);return Yl(e,n)}(t))}var yu=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(yu||{}),wu=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(wu||{}),bu=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(bu||{}),vu=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(vu||{}),Su=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Su||{}),Cu=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Cu||{}),ku=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(ku||{});function Iu(t){return"I"in t}class Mu{constructor(){ce(this,"length",0),ce(this,"head",null),ce(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.I=e,t.previousSibling&&Iu(t.previousSibling)){const n=t.previousSibling.I.next;e.next=n,e.previous=t.previousSibling.I,t.previousSibling.I.next=e,n&&(n.previous=e)}else if(t.nextSibling&&Iu(t.nextSibling)&&t.nextSibling.I.previous){const n=t.nextSibling.I.previous;e.previous=n,e.next=t.nextSibling.I,t.nextSibling.I.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.I;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.I&&delete t.I,this.length--)}}const Au=(t,e)=>`${t}@${e}`;class Ru{constructor(){ce(this,"frozen",!1),ce(this,"locked",!1),ce(this,"texts",[]),ce(this,"attributes",[]),ce(this,"attributeMap",new WeakMap),ce(this,"removes",[]),ce(this,"mapRemoves",[]),ce(this,"movedMap",{}),ce(this,"addedSet",new Set),ce(this,"movedSet",new Set),ce(this,"droppedSet",new Set),ce(this,"removesSubTreeCache",new Set),ce(this,"mutationCb"),ce(this,"blockClass"),ce(this,"blockSelector"),ce(this,"maskTextClass"),ce(this,"maskTextSelector"),ce(this,"inlineStylesheet"),ce(this,"maskInputOptions"),ce(this,"maskTextFn"),ce(this,"maskInputFn"),ce(this,"keepIframeSrcFn"),ce(this,"recordCanvas"),ce(this,"inlineImages"),ce(this,"slimDOMOptions"),ce(this,"dataURLOptions"),ce(this,"doc"),ce(this,"mirror"),ce(this,"iframeManager"),ce(this,"stylesheetManager"),ce(this,"shadowDomManager"),ce(this,"canvasManager"),ce(this,"processedNodeManager"),ce(this,"unattachedDoc"),ce(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),ce(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new Mu,r=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},i=i=>{const o=$l(i);if(!o||!gu(i))return;let s=!1;if(i.nodeType===Node.TEXT_NODE){const t=o.tagName;if("TEXTAREA"===t)return;"STYLE"===t&&this.addedSet.has(o)&&(s=!0)}const a=ke(o)?this.mirror.getId(mu(i)):this.mirror.getId(o),c=r(i);if(-1===a||-1===c)return n.addNode(i);const l=tn(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{hu(t,this.mirror)&&this.iframeManager.addIframe(t),fu(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),du(i)&&this.shadowDomManager.addShadowRoot(Xl(i),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},cssCaptured:s});l&&(t.push({parentId:a,nextId:c,node:l}),e.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Eu(this.removesSubTreeCache,t,this.mirror)&&!this.movedSet.has($l(t))||i(t);for(const t of this.addedSet)Tu(this.droppedSet,t)||Eu(this.removesSubTreeCache,t,this.mirror)?Tu(this.movedSet,t)?i(t):this.droppedSet.add(t):i(t);let o=null;for(;n.length;){let t=null;if(o){const e=this.mirror.getId($l(o.value)),n=r(o.value);-1!==e&&-1!==n&&(t=o)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId($l(n.value));if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value,r=$l(e);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const e=Hl(r);if(-1!==this.mirror.getId(e)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}o=t.previous,n.removeNode(t.value),i(t.value)}const s={texts:this.texts.map(t=>{const e=t.node,n=$l(e);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t.M);n.length<e.style.length&&(n+r).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(s))}),ce(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},M:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(Wl(t),t=>Zl(t)||"").join("")}),ce(this,"processMutation",t=>{if(!cu(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const e=Zl(t.target);au(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:qe(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,su(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=t.attributeName,r=t.target.getAttribute(n);if("value"===n){const t=_e(e);r=xe({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:t,value:r,maskInputFn:this.maskInputFn})}if(au(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let i=this.attributeMap.get(t.target);if("IFRAME"===e.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(e.contentDocument)return;n="rr_src"}if(i||(i={node:t.target,attributes:{},styleDiff:{},M:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),"type"===n&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),!Je(e.tagName,n))if(i.attributes[n]=Xe(this.doc,Ee(e.tagName),Ee(n),r),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue);for(const t of Array.from(e.style)){const r=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);r!==n.style.getPropertyValue(t)||o!==n.style.getPropertyPriority(t)?i.styleDiff[t]=""===o?r:[r,o]:i.M[t]=[r,o]}for(const t of Array.from(n.style))""===e.style.getPropertyValue(t)&&(i.styleDiff[t]=!1)}else"open"===n&&"DIALOG"===e.tagName&&(e.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(au(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=ke(t.target)?this.mirror.getId(Hl(t.target)):this.mirror.getId(t.target);au(t.target,this.blockClass,this.blockSelector,!1)||cu(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(xu(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||lu(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Au(n,r)]?xu(this.movedSet,e):(this.removes.push({parentId:r,id:n,isShadow:!(!ke(t.target)||!Ie(t.target))||void 0}),function(t,e){const n=[t];for(;n.length;){const t=n.pop();e.has(t)||(e.add(t),Wl(t).forEach(t=>n.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))})}}),ce(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(cu(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[Au(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);au(t,this.blockClass,this.blockSelector,!1)||(Wl(t).forEach(t=>this.genAdds(t)),du(t)&&Wl(Xl(t)).forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function xu(t,e){t.delete(e),Wl(e).forEach(e=>xu(t,e))}function Eu(t,e,n){return 0!==t.size&&function(t,e){const n=$l(e);return!!n&&t.has(n)}(t,e)}function Tu(t,e){return 0!==t.size&&_u(t,e)}function _u(t,e){const n=$l(e);return!!n&&(!!t.has(n)||_u(t,n))}let Ou;const Fu=t=>Ou?(...e)=>{try{return t(...e)}catch(t){if(Ou&&!0===Ou(t))return;throw t}}:t,Nu=[];function Bu(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Lu(t,e){const n=new Ru;Nu.push(n),n.init(t);const r=new(Pl("MutationObserver").constructor)(Fu(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Pu({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){return Jl("scroll",Fu(Ql(Fu(o=>{const s=Bu(o);if(!s||au(s,r,i,!0))return;const a=n.getId(s);if(s===e&&e.defaultView){const n=ru(e.defaultView);t({id:a,x:n.left,y:n.top})}else t({id:a,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),e)}const Du=["INPUT","TEXTAREA","SELECT"],ju=new WeakMap;function Uu(t){return function(t,e){if(Vu("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Vu("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Vu("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Vu("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function Gu(t,e,n){let r,i;return t?(t.ownerNode?r=e.getId(t.ownerNode):i=n.getId(t),{styleId:i,id:r}):{}}function Wu({mirror:t,stylesheetManager:e},n){var r,i,o;let s=null;s="#document"===n.nodeName?t.getId(n):t.getId(Hl(n));const a="#document"===n.nodeName?null==(r=n.defaultView)?void 0:r.Document:null==(o=null==(i=n.ownerDocument)?void 0:i.defaultView)?void 0:o.ShadowRoot,c=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&c?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var t;return null==(t=c.get)?void 0:t.call(this)},set(t){var n;const r=null==(n=c.set)?void 0:n.call(this,t);if(null!==s&&-1!==s)try{e.adoptStyleSheets(t,s)}catch(t){}return r}}),Fu(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})):()=>{}}function $u(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};let r;!function(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:h,fontCb:f,selectionCb:d,customElementCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),r(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),i(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),o(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),s(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),a(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),h(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),f(...t)},t.selectionCb=(...t)=>{e.selection&&e.selection(...t),d(...t)},t.customElementCb=(...t)=>{e.customElement&&e.customElement(...t),p(...t)}}(t,e),t.recordDOM&&(r=Lu(t,t.doc));const i=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50,o="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let s,a=[];const c=Ql(Fu(e=>{const n=Date.now()-s;t(a.map(t=>(t.timeOffset-=n,t)),e),a=[],s=null}),o),l=Fu(Ql(Fu(t=>{const e=Bu(t),{clientX:n,clientY:i}=uu(t)?t.changedTouches[0]:t;s||(s=nu()),a.push({x:n,y:i,id:r.getId(e),timeOffset:nu()-s}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?wu.Drag:t instanceof MouseEvent?wu.MouseMove:wu.TouchMove)}),i,{trailing:!1})),u=[Jl("mousemove",l,n),Jl("touchmove",l,n),Jl("drag",l,n)];return Fu(()=>{u.forEach(t=>t())})}(t),o=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const s=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let c=null;return Object.keys(bu).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==s[t]).forEach(o=>{let s=Ee(o);const l=(e=>o=>{const s=Bu(o);if(au(s,r,i,!0))return;let a=null,l=e;if("pointerType"in o){switch(o.pointerType){case"mouse":a=vu.Mouse;break;case"touch":a=vu.Touch;break;case"pen":a=vu.Pen}a===vu.Touch?bu[e]===bu.MouseDown?l="TouchStart":bu[e]===bu.MouseUp&&(l="TouchEnd"):vu.Pen}else uu(o)&&(a=vu.Touch);null!==a?(c=a,(l.startsWith("Touch")&&a===vu.Touch||l.startsWith("Mouse")&&a===vu.Mouse)&&(a=null)):bu[e]===bu.Click&&(a=c,c=null);const u=uu(o)?o.changedTouches[0]:o;if(!u)return;const h=n.getId(s),{clientX:f,clientY:d}=u;Fu(t)({type:bu[l],id:h,x:f,y:d,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(bu[o]){case bu.MouseDown:case bu.MouseUp:s=s.replace("mouse","pointer");break;case bu.TouchStart:case bu.TouchEnd:return}a.push(Jl(s,l,e))}),Fu(()=>{a.forEach(t=>t())})}(t),s=Pu(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return Jl("resize",Fu(Ql(Fu(()=>{const e=iu(),i=ou();n===e&&r===i||(t({width:Number(i),height:Number(e)}),n=e,r=i)}),200)),e)}(t,{win:n}),c=function({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function h(t){let n=Bu(t);const l=t.isTrusted,h=n&&n.tagName;if(n&&"OPTION"===h&&(n=Vl(n)),!n||!h||Du.indexOf(h)<0||au(n,r,i,!0))return;if(n.classList.contains(o)||s&&n.matches(s))return;let d=n.value,p=!1;const m=_e(n)||"";"radio"===m||"checkbox"===m?p=n.checked:(a[h.toLowerCase()]||a[m])&&(d=xe({element:n,maskInputOptions:a,tagName:h,type:m,value:d,maskInputFn:c})),f(n,u?{text:d,isChecked:p,userTriggered:l}:{text:d,isChecked:p});const g=n.name;"radio"===m&&g&&p&&e.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(t=>{if(t!==n){const e=t.value;f(t,u?{text:e,isChecked:!p,userTriggered:!1}:{text:e,isChecked:!p})}})}function f(e,r){const i=ju.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){ju.set(e,r);const i=n.getId(e);Fu(t)({...r,id:i})}}const d=("last"===l.input?["change"]:["input","change"]).map(t=>Jl(t,Fu(h),e)),p=e.defaultView;if(!p)return()=>{d.forEach(t=>t())};const m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),g=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map(t=>tu(t[0],t[1],{set(){Fu(h)({target:this,isTrusted:!1})}},!1,p))),Fu(()=>{d.forEach(t=>t())})}(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:i,doc:o}){const s=Fu(o=>Ql(Fu(i=>{const s=Bu(i);if(!s||au(s,e,n,!0))return;const{currentTime:a,volume:c,muted:l,playbackRate:u,loop:h}=s;t({type:o,id:r.getId(s),currentTime:a,volume:c,muted:l,playbackRate:u,loop:h})}),i.media||500)),a=[Jl("play",s(Cu.Play),o),Jl("pause",s(Cu.Pause),o),Jl("seeked",s(Cu.Seeked),o),Jl("volumechange",s(Cu.VolumeChange),o),Jl("ratechange",s(Cu.RateChange),o)];return Fu(()=>{a.forEach(t=>t())})}(t);let u=()=>{},h=()=>{},f=()=>{},d=()=>{};t.recordDOM&&(u=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Fu((r,i,o)=>{const[s,a]=o,{id:c,styleId:l}=Gu(i,e,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&t({id:c,styleId:l,adds:[{rule:s,index:a}]}),r.apply(i,o)})}),r.CSSStyleSheet.prototype.addRule=function(t,e,n=this.cssRules.length){const i=`${t} { ${e} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[i,n])};const o=r.CSSStyleSheet.prototype.deleteRule;let s,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Fu((r,i,o)=>{const[s]=o,{id:a,styleId:c}=Gu(i,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:s}]}),r.apply(i,o)})}),r.CSSStyleSheet.prototype.removeRule=function(t){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Fu((r,i,o)=>{const[s]=o,{id:a,styleId:c}=Gu(i,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replace:s}),r.apply(i,o)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Fu((r,i,o)=>{const[s]=o,{id:a,styleId:c}=Gu(i,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replaceSync:s}),r.apply(i,o)})}));const c={};Zu("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Zu("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Zu("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Zu("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Fu((r,i,o)=>{const[s,a]=o,{id:c,styleId:l}=Gu(i.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&t({id:c,styleId:l,adds:[{rule:s,index:[...Uu(i),a||0]}]}),r.apply(i,o)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Fu((r,i,o)=>{const[s]=o,{id:a,styleId:c}=Gu(i.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:[...Uu(i),s]}]}),r.apply(i,o)})})}),Fu(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([t,e])=>{e.prototype.insertRule=l[t].insertRule,e.prototype.deleteRule=l[t].deleteRule})})}(t,{win:n}),h=Wu(t,t.doc),f=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Fu((i,s,a)=>{var c;const[l,u,h]=a;if(n.has(l))return o.apply(s,[l,u,h]);const{id:f,styleId:d}=Gu(null==(c=s.parentRule)?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&-1!==f||d&&-1!==d)&&t({id:f,styleId:d,set:{property:l,value:u,priority:h},index:Uu(s.parentRule)}),i.apply(s,a)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Fu((i,o,a)=>{var c;const[l]=a;if(n.has(l))return s.apply(o,[l]);const{id:u,styleId:h}=Gu(null==(c=o.parentRule)?void 0:c.parentStyleSheet,e,r.styleMirror);return(u&&-1!==u||h&&-1!==h)&&t({id:u,styleId:h,remove:{property:l},index:Uu(o.parentRule)}),i.apply(o,a)})}),Fu(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}(t,{win:n}),t.collectFonts&&(d=function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(t,e,n){const r=new o(t,e,n);return i.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const s=eu(e.fonts,"add",function(e){return function(n){return setTimeout(Fu(()=>{const e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=o}),r.push(s),Fu(()=>{r.forEach(t=>t())})}(t)));const p=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=t;let s=!0;const a=Fu(()=>{const t=e.getSelection();if(!t||s&&(null==t?void 0:t.isCollapsed))return;s=t.isCollapsed||!1;const a=[],c=t.rangeCount||0;for(let e=0;e<c;e++){const o=t.getRangeAt(e),{startContainer:s,startOffset:c,endContainer:l,endOffset:u}=o;au(s,r,i,!0)||au(l,r,i,!0)||a.push({start:n.getId(s),startOffset:c,end:n.getId(l),endOffset:u})}o({ranges:a})});return a(),Jl("selectionchange",a)}(t),m=function({doc:t,customElementCb:e}){const n=t.defaultView;return n&&n.customElements?eu(n.customElements,"define",function(t){return function(n,r,i){try{e({define:{name:n}})}catch(t){console.warn(`Custom element callback failed for ${n}`)}return t.apply(this,[n,r,i])}}):()=>{}}(t),g=[];for(const e of t.plugins)g.push(e.observer(e.callback,n,e.options));return Fu(()=>{Nu.forEach(t=>t.reset()),null==r||r.disconnect(),i(),o(),s(),a(),c(),l(),u(),h(),f(),d(),p(),m(),g.forEach(t=>t())})}function Vu(t){return void 0!==window[t]}function Zu(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Yu{constructor(t){ce(this,"iframeIdToRemoteIdMap",new WeakMap),ce(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,n,r){const i=n||this.getIdToRemoteIdMap(t),o=r||this.getRemoteIdToIdMap(t);let s=i.get(e);return s||(s=this.generateIdFn(),i.set(e,s),o.set(s,e)),s}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,n,r))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:r.get(e)||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,n))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class zu{constructor(t){ce(this,"iframes",new WeakMap),ce(this,"crossOriginIframeMap",new WeakMap),ce(this,"crossOriginIframeMirror",new Yu(Ge)),ce(this,"crossOriginIframeStyleMirror"),ce(this,"crossOriginIframeRootIdMap",new WeakMap),ce(this,"mirror"),ce(this,"mutationCb"),ce(this,"wrappedEmit"),ce(this,"loadListener"),ce(this,"stylesheetManager"),ce(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yu(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=t.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){var n;switch(e.type){case yu.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:yu.IncrementalSnapshot,data:{source:wu.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case yu.Meta:case yu.Load:case yu.DomContentLoaded:return!1;case yu.Plugin:return e;case yu.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case yu.IncrementalSnapshot:switch(e.data.source){case wu.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case wu.Drag:case wu.TouchMove:case wu.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case wu.ViewportResize:return!1;case wu.MediaInteraction:case wu.MouseInteraction:case wu.Scroll:case wu.CanvasMutation:case wu.Input:return this.replaceIds(e.data,t,["id"]),e;case wu.StyleSheetRule:case wu.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case wu.Font:return e;case wu.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case wu.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(n=e.data.styles)||n.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,n,r){for(const i of r)(Array.isArray(e[i])||"number"==typeof e[i])&&(Array.isArray(e[i])?e[i]=t.getIds(n,e[i]):e[i]=t.getId(n,e[i]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===ku.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}}class Hu{constructor(t){ce(this,"shadowDoms",new WeakSet),ce(this,"mutationCb"),ce(this,"scrollCb"),ce(this,"bypassOptions"),ce(this,"mirror"),ce(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(!Ie(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=Lu({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Pu({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Hl(t))),this.restoreHandlers.push(Wu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(eu(t.prototype,"attachShadow",function(t){return function(r){const i=t.call(this,r),o=Xl(this);return o&&gu(this)&&n.addShadowRoot(o,e),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Xu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ju="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ku=0;Ku<64;Ku++)Ju[Xu.charCodeAt(Ku)]=Ku;const qu=new Map,Qu=(t,e,n)=>{if(!t||!nh(t,e)&&"object"!=typeof t)return;const r=function(t,e){let n=qu.get(t);return n||(n=new Map,qu.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let i=r.indexOf(t);return-1===i&&(i=r.length,r.push(t)),i};function th(t,e,n){if(t instanceof Array)return t.map(t=>th(t,e,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,n=new Uint8Array(t),r=n.length,i="";for(e=0;e<r;e+=3)i+=Xu[n[e]>>2],i+=Xu[(3&n[e])<<4|n[e+1]>>4],i+=Xu[(15&n[e+1])<<2|n[e+2]>>6],i+=Xu[63&n[e+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[th(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[th(t.data,e,n),t.width,t.height]}:nh(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Qu(t,e,n)}:t}const eh=(t,e,n)=>t.map(t=>th(t,e,n)),nh=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(n.find(n=>t instanceof e[n]))};function rh(t,e,n,r){const i=[];try{const o=eu(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(i,...o){if(!au(this,e,n,!0)){const t=function(t){return"experimental-webgl"===t?"webgl":t}(i);if("l"in this||(this.l=t),r&&["webgl","webgl2"].includes(t))if(o[0]&&"object"==typeof o[0]){const t=o[0];t.preserveDrawingBuffer||(t.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[i,...o])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(t=>t())}}function ih(t,e,n,r,i,o){const s=[],a=Object.getOwnPropertyNames(t);for(const c of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if("function"!=typeof t[c])continue;const a=eu(t,c,function(t){return function(...s){const a=t.apply(this,s);if(Qu(a,o,this),"tagName"in this.canvas&&!au(this.canvas,r,i,!0)){const t=eh(s,o,this),r={type:e,property:c,args:t};n(this.canvas,r)}return a}});s.push(a)}catch{const r=tu(t,c,{set(t){n(this.canvas,{type:e,property:c,args:[t],setter:!0})}});s.push(r)}return s}const oh="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",sh="undefined"!=typeof window&&window.Blob&&new Blob([(ah=oh,Uint8Array.from(atob(ah),t=>t.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var ah;function ch(t){let e;try{if(e=sh&&(window.URL||window.webkitURL).createObjectURL(sh),!e)throw"";const n=new Worker(e,{name:null==t?void 0:t.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),n}catch(e){return new Worker("data:text/javascript;base64,"+oh,{name:null==t?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class lh{constructor(t){ce(this,"pendingCanvasMutations",new Map),ce(this,"rafStamps",{latestId:0,invokeId:null}),ce(this,"mirror"),ce(this,"mutationCb"),ce(this,"resetObservers"),ce(this,"frozen",!1),ce(this,"locked",!1),ce(this,"processMutation",(t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});const{sampling:e="all",win:n,blockClass:r,blockSelector:i,recordCanvas:o,dataURLOptions:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===e&&this.initCanvasMutationObserver(n,r,i),o&&"number"==typeof e&&this.initCanvasFPSObserver(e,n,r,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,e,n,r,i){const o=rh(e,n,r,!0),s=new Map,a=new ch;a.onmessage=t=>{const{id:e}=t.data;if(s.set(e,!1),!("base64"in t.data))return;const{base64:n,type:r,width:i,height:o}=t.data;this.mutationCb({id:e,type:Su["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const c=1e3/t;let l,u=0;const h=t=>{u&&t-u<c||(u=t,(()=>{const t=[];return e.document.querySelectorAll("canvas").forEach(e=>{au(e,n,r,!0)||t.push(e)}),t})().forEach(async t=>{var e;const n=this.mirror.getId(t);if(s.get(n))return;if(0===t.width||0===t.height)return;if(s.set(n,!0),["webgl","webgl2"].includes(t.l)){const n=t.getContext(t.l);!1===(null==(e=null==n?void 0:n.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const r=await createImageBitmap(t);a.postMessage({id:n,bitmap:r,width:t.width,height:t.height,dataURLOptions:i.dataURLOptions},[r])})),l=requestAnimationFrame(h)};l=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,e,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=rh(t,e,n,!1),i=function(t,e,n,r){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])continue;const o=eu(e.CanvasRenderingContext2D.prototype,s,function(i){return function(...o){return au(this.canvas,n,r,!0)||setTimeout(()=>{const n=eh(o,e,this);t(this.canvas,{type:Su["2D"],property:s,args:n})},0),i.apply(this,o)}});i.push(o)}catch{const n=tu(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Su["2D"],property:s,args:[e],setter:!0})}});i.push(n)}return()=>{i.forEach(t=>t())}}(this.processMutation.bind(this),t,e,n),o=function(t,e,n,r){const i=[];return i.push(...ih(e.WebGLRenderingContext.prototype,Su.WebGL,t,n,r,e)),void 0!==e.WebGL2RenderingContext&&i.push(...ih(e.WebGL2RenderingContext.prototype,Su.WebGL2,t,n,r,e)),()=>{i.forEach(t=>t())}}(this.processMutation.bind(this),t,e,n);this.resetObservers=()=>{r(),i(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const r=n.map(t=>{const{type:e,...n}=t;return n}),{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r}),this.pendingCanvasMutations.delete(t)}}class uh{constructor(t){ce(this,"trackedLinkElements",new WeakSet),ce(this,"mutationCb"),ce(this,"adoptedStyleSheetCb"),ce(this,"styleMirror",new pu),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"o"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),r.push({styleId:t,rules:Array.from(e.rules||CSSRule,(t,n)=>({rule:Ae(t,e.href),index:n}))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class hh{constructor(){ce(this,"nodeMap",new WeakMap),ce(this,"active",!1)}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let fh,dh,ph,mh=!1;try{if(2!==Array.from([1],t=>2*t)[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(oe=t.contentWindow)?void 0:oe.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const gh=new Re;function yh(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:s="rr-ignore",ignoreSelector:a=null,maskTextClass:c="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:d,maskInputFn:p,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:A=!1,inlineImages:R=!1,plugins:x,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:_}=t;Ou=_;const O=!k||window.parent===window;let F=!1;if(!O)try{window.parent.document&&(F=!1)}catch(t){F=!0}if(O&&!e)throw new Error("emit function is required");if(!O&&!F)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),gh.reset();const N=!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==f?f:{password:!0},B=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let L;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let P=0;const D=t=>{for(const e of x||[])e.eventProcessor&&(t=e.eventProcessor(t));return y&&!F&&(t=y(t)),t};fh=(t,i)=>{var o;const s=t;if(s.timestamp=nu(),!(null==(o=Nu[0])?void 0:o.isFrozen())||s.type===yu.FullSnapshot||s.type===yu.IncrementalSnapshot&&s.data.source===wu.Mutation||Nu.forEach(t=>t.unfreeze()),O)null==e||e(D(s),i);else if(F){const t={type:"rrweb",event:D(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(s.type===yu.FullSnapshot)L=s,P=0;else if(s.type===yu.IncrementalSnapshot){if(s.data.source===wu.Mutation&&s.data.isAttachIframe)return;P++;const t=r&&P>=r,e=n&&s.timestamp-L.timestamp>n;(t||e)&&dh(!0)}};const j=t=>{fh({type:yu.IncrementalSnapshot,data:{source:wu.Mutation,...t}})},U=t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.Scroll,...t}}),G=t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.CanvasMutation,...t}}),W=new uh({mutationCb:j,adoptedStyleSheetCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.AdoptedStyleSheet,...t}})}),$=new zu({mirror:gh,mutationCb:j,stylesheetManager:W,recordCrossOriginIframes:k,wrappedEmit:fh});for(const t of x||[])t.getMirror&&t.getMirror({nodeMirror:gh,crossOriginIframeMirror:$.crossOriginIframeMirror,crossOriginIframeStyleMirror:$.crossOriginIframeStyleMirror});const V=new hh;ph=new lh({recordCanvas:C,mutationCb:G,win:window,blockClass:i,blockSelector:o,mirror:gh,sampling:w.canvas,dataURLOptions:b});const Z=new Hu({mutationCb:j,scrollCb:U,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:N,dataURLOptions:b,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:R,sampling:w,slimDOMOptions:B,iframeManager:$,stylesheetManager:W,canvasManager:ph,keepIframeSrcFn:E,processedNodeManager:V},mirror:gh});dh=(t=!1)=>{if(!S)return;fh({type:yu.Meta,data:{href:window.location.href,width:ou(),height:iu()}},t),W.reset(),Z.init(),Nu.forEach(t=>t.lock());const e=function(t,e){const{mirror:n=new Re,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:c=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:f,slimDOM:d=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=e||{};return tn(t,{doc:t,mirror:n,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===u?{password:!0}:u,maskTextFn:h,maskInputFn:f,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:p,inlineImages:c,recordCanvas:l,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:gh,blockClass:i,blockSelector:o,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:N,maskTextFn:m,maskInputFn:p,slimDOM:B,dataURLOptions:b,recordCanvas:C,inlineImages:R,onSerialize:t=>{hu(t,gh)&&$.addIframe(t),fu(t,gh)&&W.trackLinkElement(t),du(t)&&Z.addShadowRoot(Xl(t),document)},onIframeLoad:(t,e)=>{$.attachIframe(t,e),Z.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{W.attachLinkElement(t,e)},keepIframeSrcFn:E});if(!e)return console.warn("Failed to snapshot the document");fh({type:yu.FullSnapshot,data:{node:e,initialOffset:ru(window)}},t),Nu.forEach(t=>t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,gh.getId(document))};try{const t=[],e=t=>{var e;return Fu($u)({mutationCb:j,mousemoveCb:(t,e)=>fh({type:yu.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.MouseInteraction,...t}}),scrollCb:U,viewportResizeCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.ViewportResize,...t}}),inputCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.Input,...t}}),mediaInteractionCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.MediaInteraction,...t}}),styleSheetRuleCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.StyleSheetRule,...t}}),styleDeclarationCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.StyleDeclaration,...t}}),canvasMutationCb:G,fontCb:t=>fh({type:yu.IncrementalSnapshot,data:{source:wu.Font,...t}}),selectionCb:t=>{fh({type:yu.IncrementalSnapshot,data:{source:wu.Selection,...t}})},customElementCb:t=>{fh({type:yu.IncrementalSnapshot,data:{source:wu.CustomElement,...t}})},blockClass:i,ignoreClass:s,ignoreSelector:a,maskTextClass:c,maskTextSelector:l,maskInputOptions:N,inlineStylesheet:u,sampling:w,recordDOM:S,recordCanvas:C,inlineImages:R,userTriggeredOnInput:M,collectFonts:A,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:B,dataURLOptions:b,mirror:gh,iframeManager:$,stylesheetManager:W,shadowDomManager:Z,processedNodeManager:V,canvasManager:ph,ignoreCSSAttributes:T,plugins:(null==(e=null==x?void 0:x.filter(t=>t.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>fh({type:yu.Plugin,data:{plugin:t.name,payload:e}})})))||[]},g)};$.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{dh(),t.push(e(document)),mh=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(Jl("DOMContentLoaded",()=>{fh({type:yu.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&n()})),t.push(Jl("load",()=>{fh({type:yu.Load,data:{}}),"load"===I&&n()},window))),()=>{t.forEach(t=>t()),V.destroy(),mh=!1,Ou=void 0}}catch(t){console.warn(t)}}var wh,bh;yh.addCustomEvent=(t,e)=>{if(!mh)throw new Error("please add custom event after start recording");fh({type:yu.Custom,data:{tag:t,payload:e}})},yh.freezePage=()=>{Nu.forEach(t=>t.freeze())},yh.takeFullSnapshot=t=>{if(!mh)throw new Error("please take full snapshot after start recording");dh(t)},yh.mirror=gh,(bh=wh||(wh={}))[bh.NotStarted=0]="NotStarted",bh[bh.Running=1]="Running",bh[bh.Stopped=2]="Stopped";var vh=Object.freeze({__proto__:null,SessionReplayEngine:class{constructor(t,e,n={}){this.events=[],this.isActive=!1,this.isPaused=!1,this.lastActivityTime=Date.now(),this.sessionStartTime=Date.now(),this.sessionId=t,this.visitorId=e,this.config={enabled:!0,sampleRate:1,batchInterval:1e4,inactivityTimeout:3e4,pauseOnInactive:!0,...n}}start(){if(!this.config.enabled||this.isActive)return!1;if(Math.random()>this.config.sampleRate)return!1;try{return this.rrwebStopRecord=yh({emit:t=>{this.onActivity(),this.isPaused||this.events.push(t)}}),this.isActive=!0,this.startBatchTimer(),this.startInactivityTracking(),!0}catch(t){return console.error("[Zaplier] Failed to start rrweb recording:",t),!1}}stop(){this.isActive&&(this.isActive=!1,this.rrwebStopRecord&&(this.rrwebStopRecord(),this.rrwebStopRecord=void 0),this.batchTimer&&(clearInterval(this.batchTimer),this.batchTimer=void 0),this.inactivityTimer&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=void 0),this.sendBatch())}startBatchTimer(){this.batchTimer=window.setInterval(()=>{this.sendBatch()},this.config.batchInterval)}sendBatch(){if(0===this.events.length)return;const t={sessionId:this.sessionId,visitorId:this.visitorId,events:[...this.events],metadata:{userAgent:navigator.userAgent,timestamp:Date.now(),startUrl:window.location.href,duration:Date.now()-this.sessionStartTime,activeTime:this.getActiveTime(),funnelSteps:[],hasConversion:!1,eventsCount:this.events.length,isPaused:this.isPaused}};this.events=[],t.events.length,this.sendToBackend(t)}setSDKInstance(t){this.sdkInstance=t}async sendToBackend(t){try{if(!this.sdkInstance)return void console.error("[Zaplier] No SDK instance available for replay transport");const e=await this.sdkInstance.sendReplayBatch(t);e&&e.success||console.error("[Zaplier] Session replay batch failed:",e)}catch(t){console.error("[Zaplier] Session replay error:",t)}}getEventCount(){return this.events.length}isRecording(){return this.isActive}isPausedState(){return this.isPaused}startInactivityTracking(){this.config.pauseOnInactive&&(["mousedown","mousemove","keypress","scroll","touchstart","click"].forEach(t=>{document.addEventListener(t,this.onActivity.bind(this),!0)}),this.resetInactivityTimer())}onActivity(){this.lastActivityTime=Date.now(),this.isPaused&&this.resume(),this.resetInactivityTimer()}resetInactivityTimer(){this.inactivityTimer&&clearTimeout(this.inactivityTimer),this.inactivityTimer=window.setTimeout(()=>{this.pauseForInactivity()},this.config.inactivityTimeout)}pauseForInactivity(){this.isPaused||(this.isPaused=!0)}resume(){this.isPaused&&(this.isPaused=!1)}getActiveTime(){return Date.now()-this.sessionStartTime}getVisitorId(){return this.visitorId}}}),Sh=Object.freeze({__proto__:null,detectIncognitoHeuristics:async function(){const t=[];let e=0;const n=await async function(){try{const t="__incognito_test__",e=Date.now().toString();localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),n===e}catch{return!1}}();n||(e+=.25,t.push("localStorage_blocked"));const r=await async function(){try{const t="__incognito_test__",e=Date.now().toString();sessionStorage.setItem(t,e);const n=sessionStorage.getItem(t);return sessionStorage.removeItem(t),n===e}catch{return!1}}();r||(e+=.2,t.push("sessionStorage_blocked"));const i=await async function(){try{return!!window.indexedDB&&new Promise(t=>{const e=indexedDB.open("__incognito_test__",1);e.onsuccess=()=>{e.result.close(),indexedDB.deleteDatabase("__incognito_test__"),t(!0)},e.onerror=()=>t(!1),e.onblocked=()=>t(!1)})}catch{return!1}}();i||(e+=.15,t.push("indexedDB_blocked"));const o=function(){try{const t="__incognito_test__",e=Date.now().toString();document.cookie=`${t}=${e}; SameSite=Strict; path=/`;const n=-1!==document.cookie.indexOf(`${t}=${e}`);return document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`,n}catch{return!1}}();o||(e+=.2,t.push("cookies_blocked")),function(){try{return!(!Array.isArray(navigator.languages)||1!==navigator.languages.length||!navigator.language)&&navigator.languages[0]===navigator.language}catch{return!1}}()&&(e+=.25,t.push("languages_single_value"));try{if(n){const n="__incognito_persistence_test__",r="persist_test";localStorage.setItem(n,r);const i=localStorage.getItem(n)===r;localStorage.removeItem(n),i||(e+=.2,t.push("localStorage_not_persistent"))}}catch{}try{if(navigator.storage?.estimate){const n=await navigator.storage.estimate(),r=n?.quota||0,i=n?.usage||0;0===r?(e+=.3,t.push("storage_quota_zero")):r>0&&r<125829120&&(e+=.25,t.push("storage_quota_low")),0===i&&r>0&&(e+=.1,t.push("storage_usage_zero"))}else t.push("storage_estimate_unavailable")}catch{t.push("storage_estimate_error")}"serviceWorker"in navigator||(e+=.1,t.push("service_worker_absent")),"caches"in window||(e+=.05,t.push("cache_api_absent"));try{if(navigator.permissions?.query){const n=await navigator.permissions.query({name:"notifications"});"denied"===n?.state&&(e+=.05,t.push("notifications_denied"))}}catch{t.push("permissions_query_error")}(function(){try{return!!window.showOpenFilePicker}catch{return!1}})()||t.push("fs_access_absent"),"connection"in navigator||t.push("network_info_absent"),e=Math.max(0,Math.min(1,e));const s=[n,r,i,o].filter(t=>!t).length;return s>=3?e=Math.max(e,.85):s>=2&&(e=Math.max(e,.7)),t.includes("languages_single_value")&&(s>=1||e>=.2)&&(e=Math.max(e,.5)),{likelihood:e,methods:t}}});function Ch(){try{if("deviceMemory"in navigator){const t=navigator.deviceMemory;return"number"==typeof t?t:null}return null}catch{return null}}function kh(){try{if("hardwareConcurrency"in navigator){const t=navigator.hardwareConcurrency;return"number"==typeof t?t:null}return null}catch{return null}}function Ih(){try{return[navigator.platform,navigator.userAgent,navigator.userAgent.includes("ARM")?"ARM":null,navigator.userAgent.includes("arm64")?"ARM64":null,navigator.userAgent.includes("aarch64")?"ARM64":null,navigator.userAgent.includes("x86_64")?"x86_64":null,navigator.userAgent.includes("WOW64")?"x86_64":null,navigator.userAgent.includes("Win64")?"x86_64":null,navigator.userAgent.includes("Intel")?"Intel":null].filter(Boolean).join("|")||"unknown"}catch{return"unknown"}}function Mh(){try{return navigator.maxTouchPoints||0}catch{return 0}}var Ah=Object.freeze({__proto__:null,getArchitecture:Ih,getDeviceMemory:Ch,getHardwareConcurrency:kh,getHardwareFingerprint:function(){return{deviceMemory:Ch(),hardwareConcurrency:kh(),architecture:Ih(),maxTouchPoints:Mh(),platform:navigator.platform||"unknown"}},getMaxTouchPoints:Mh,isHardwareDetectionAvailable:function(){return"undefined"!=typeof navigator}});function Rh(){try{if("undefined"!=typeof Intl&&Intl.DateTimeFormat){const t=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t)return t}const t=new Date(2024,0,1).getTimezoneOffset();return`UTC${t>0?"-":"+"}${Math.abs(t/60)}`}catch{return"unknown"}}function xh(){try{const t=[];navigator.languages&&Array.isArray(navigator.languages)&&t.push(...navigator.languages),navigator.language&&t.push(navigator.language);const e=navigator.userLanguage||navigator.browserLanguage;return e&&t.push(e),[...new Set(t)]}catch{return["unknown"]}}function Eh(){try{if("undefined"!=typeof Intl&&Intl.DateTimeFormat){const t=(new Intl.DateTimeFormat).resolvedOptions();return{locale:t.locale||"unknown",calendar:t.calendar||"unknown",numberingSystem:t.numberingSystem||"unknown",timeZone:t.timeZone||"unknown"}}return{locale:"unknown"}}catch{return{locale:"unknown"}}}function Th(){try{const t={platform:navigator.platform||"unknown",oscpu:navigator.oscpu||null,vendor:navigator.vendor||null},e=navigator.userAgent;if(e.includes("Windows"))t.os="Windows",e.includes("Windows NT 10.0")?t.osVersion="10":e.includes("Windows NT 6.3")?t.osVersion="8.1":e.includes("Windows NT 6.2")?t.osVersion="8":e.includes("Windows NT 6.1")&&(t.osVersion="7");else if(e.includes("Macintosh")||e.includes("Mac OS")){t.os="macOS";const n=e.match(/Mac OS X ([0-9_]+)/);n&&n[1]&&(t.osVersion=n[1].replace(/_/g,"."))}else if(e.includes("Linux"))t.os="Linux";else if(e.includes("Android")){t.os="Android";const n=e.match(/Android ([0-9.]+)/);n&&n[1]&&(t.osVersion=n[1])}else if(e.includes("iOS")||e.includes("iPhone")||e.includes("iPad")){t.os="iOS";const n=e.match(/OS ([0-9_]+)/);n&&n[1]&&(t.osVersion=n[1].replace(/_/g,"."))}return t}catch{return{platform:"unknown"}}}var _h=Object.freeze({__proto__:null,getDateTimeLocale:Eh,getLanguages:xh,getPlatformExtended:Th,getSystemFingerprint:function(){return{timezone:Rh(),languages:xh(),dateTimeLocale:Eh(),platform:Th(),cookiesEnabled:navigator.cookieEnabled||!1}},getTimezone:Rh,isSystemDetectionAvailable:function(){return"undefined"!=typeof navigator}});function Oh(){try{if("undefined"==typeof localStorage)return!1;const t="__rb_test__",e="test";localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),n===e}catch(t){return"blocked"}}function Fh(){try{if("undefined"==typeof sessionStorage)return!1;const t="__rb_test__",e="test";sessionStorage.setItem(t,e);const n=sessionStorage.getItem(t);return sessionStorage.removeItem(t),n===e}catch(t){return"blocked"}}function Nh(){return new Promise(t=>{try{if(!("indexedDB"in window))return void t(!1);const e="__rb_test_db__",n=indexedDB.open(e,1);let r=!1;const i=e=>{r||(r=!0,t(e))};setTimeout(()=>i("blocked"),1e3),n.onerror=()=>i("blocked"),n.onsuccess=()=>{try{n.result.close();const t=indexedDB.deleteDatabase(e);t.onsuccess=()=>i(!0),t.onerror=()=>i(!0)}catch{i("blocked")}},n.onupgradeneeded=()=>{try{const t=n.result;t.objectStoreNames.contains("test")||t.createObjectStore("test")}catch{i("blocked")}}}catch{t("blocked")}})}function Bh(){try{return"openDatabase"in window&&"function"==typeof window.openDatabase}catch{return!1}}async function Lh(){try{if("storage"in navigator&&"estimate"in navigator.storage){const t=await navigator.storage.estimate();return{quota:t.quota||null,usage:t.usage||null,available:t.quota&&t.usage?t.quota-t.usage:null}}return{}}catch{return{}}}var Ph=Object.freeze({__proto__:null,getIndexedDBSupport:Nh,getLocalStorageSupport:Oh,getSessionStorageSupport:Fh,getStorageFingerprint:async function(){const[t,e]=await Promise.all([Nh(),Lh()]);return{localStorage:Oh(),sessionStorage:Fh(),indexedDB:t,webSQL:Bh(),quota:e}},getStorageQuota:Lh,getWebSQLSupport:Bh,isStorageDetectionAvailable:function(){return"undefined"!=typeof window}});function Dh(){const t=Math,e=()=>0,n=t.acos||e,r=t.acosh||e,i=t.asin||e,o=t.asinh||e,s=t.atanh||e,a=t.atan||e,c=t.sin||e,l=t.sinh||e,u=t.cos||e,h=t.cosh||e,f=t.tan||e,d=t.tanh||e,p=t.exp||e,m=t.expm1||e,g=t.log1p||e,y=e=>t.pow(t.PI,e),w=e=>t.log(e+t.sqrt(e*e+1)),b=e=>t.log((1+e)/(1-e))/2,v=e=>(t.exp(e)-1/t.exp(e))/2,S=e=>(t.exp(e)+1/t.exp(e))/2,C=e=>t.exp(e)-1,k=e=>(t.exp(2*e)-1)/(t.exp(2*e)+1),I=e=>t.log(1+e);try{return{acos:n(.12312423423423424),asin:i(.12312423423423424),atan:a(.5),cos:u(10.000000000123),sin:c(-1e300),tan:f(-1e300),acosh:r(1e308),acoshPf:(M=1e154,t.log(M+t.sqrt(M*M-1))),asinh:o(1),asinhPf:w(1),atanh:s(.5),atanhPf:b(.5),cosh:h(1),coshPf:S(1),sinh:l(1),sinhPf:v(1),tanh:d(1),tanhPf:k(1),exp:p(1),expm1:m(1),expm1Pf:C(1),log1p:g(10),log1pPf:I(10),powPI:y(-100),sqrt:t.sqrt(2),cbrt:t.cbrt?t.cbrt(8):0,log:t.log(t.E),log10:t.log10?t.log10(10):0,log2:t.log2?t.log2(2):0,special_0:t.sin(t.PI),special_1:t.cos(t.PI/2),special_2:t.tan(t.PI/4),special_3:t.sqrt(-1),special_4:t.log(-1),special_5:1/0,special_6:NaN}}catch(e){return{error:1,basicMath:t.PI+t.E}}var M}function jh(){try{return{PI:Math.PI,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2}}catch{return{}}}function Uh(){try{return{precision1:.1+.2,precision2:.3-.1,precision3:.1*3,precision4:1.1-.9,largeAdd:1e16,largeSub:1e16,tiny:Number.MIN_VALUE,epsilon:Number.EPSILON||2220446049250313e-31,maxValue:Number.MAX_VALUE,maxSafeInteger:Number.MAX_SAFE_INTEGER||9007199254740991,minSafeInteger:Number.MIN_SAFE_INTEGER||-9007199254740991}}catch{return{}}}var Gh=Object.freeze({__proto__:null,getCompleteMathFingerprint:function(){return{operations:Dh(),constants:jh(),floatingPoint:Uh()}},getFloatingPointBehavior:Uh,getMathConstants:jh,getMathFingerprint:Dh,isMathDetectionAvailable:function(){return"undefined"!=typeof Math}});function Wh(){const t=atob;return{adBlock:["#ad-banner",".advertisement",t("I2FkLWNvbnRhaW5lcg=="),t("LmFkdmVydGlzZW1lbnQ="),t("W2NsYXNzKj0iYWQtIl0=")],uBlockOrigin:["#ublock-stats",".adsbygoogle",t("I2dvb2dsZV9hZHM="),t("LmFkc2J5Z29vZ2xl"),t("LnVibG9jay1ibG9ja2Vk")],adGuardBase:[".BetterJsPopOverlay",t("I2FkXzMwMFgyNTA="),t("I2Jhbm5lcmZsb2F0"),t("I2NhbXBhaWduLWJhbm5lcg=="),t("I0FkLUNvbnRlbnQ=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],easyList:[".yb-floorad",t("LndpZGdldF9wb19hZHNfd2lkZ2V0"),t("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",t("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],privacyBadger:["#privacy-badger-popup",".privacy-badger-blocked",t("LnByaXZhY3ktYmFkZ2Vy")],ghostery:["#ghostery-popup",".ghostery-blocking",t("Lmdob3N0ZXJ5LWJsb2NrZWQ=")],brave:["#brave-ads-blocked",".brave-blocked",t("LmJyYXZlLWFkLWJsb2Nr")],facebookContainer:[".facebook-container-blocked",t("LmZiLWJsb2NrZWQ=")],cookieBlockers:[".cookie-notice-blocked","#cookie-banner-hidden",t("LmNvb2tpZS1ibG9ja2Vy")],trackingProtection:[".tracking-blocked","#tracking-protection-enabled",t("LnRyYWNrZXItYmxvY2tlZA==")]}}function $h(t){const e=document.createElement("div");if(t.startsWith("#"))e.id=t.substring(1);else if(t.startsWith("."))e.className=t.substring(1);else if(t.includes("["))try{const n=t.match(/\[([^=]+)([*^$|~]?=)"([^"]+)"\]/);if(n&&n[1]&&n[3]){const[,t,r,i]=n;"*="===r?e.setAttribute(t,`test-${i}-test`):e.setAttribute(t,i)}}catch{e.className="test-element"}else e.className=t.replace(/[^a-zA-Z0-9-_]/g,"");return e}function Vh(t){const e=t.style;e.setProperty("visibility","hidden","important"),e.setProperty("display","block","important"),e.setProperty("position","absolute","important"),e.setProperty("left","-9999px","important"),e.setProperty("width","1px","important"),e.setProperty("height","1px","important"),e.setProperty("pointer-events","none","important"),e.setProperty("z-index","-1","important")}function Zh(t){return new Promise(e=>setTimeout(e,t))}async function Yh(t){const e=document,n=e.createElement("div"),r=new Array(t.length),i={};Vh(n);const o=e.createDocumentFragment();for(let n=0;n<t.length;n++){const i=t[n];if(i)try{const t=$h(i),s=e.createElement("div");"DIALOG"===t.tagName&&t.show?.(),Vh(s),s.appendChild(t),o.appendChild(s),r[n]=t}catch(t){r[n]=void 0}}n.appendChild(o);let s=0;for(;!e.body&&s<100;)await Zh(50),s++;if(!e.body)throw new Error("Document body not available for DOM blockers detection");e.body.appendChild(n);try{await Zh(50),await new Promise(e=>{requestAnimationFrame(()=>{for(let e=0;e<t.length;e++){const n=r[e],o=t[e];n&&o&&!n.offsetParent&&(i[o]=!0)}e()})})}finally{try{n.parentNode&&n.parentNode.removeChild(n)}catch(t){setTimeout(()=>{try{n.parentNode&&n.parentNode.removeChild(n)}catch{}},0)}}return i}async function zh(t={}){const{debug:e=!1,timeout:n=5e3}=t;try{if(!Hh())return"BROWSER_INCOMPATIBLE";if(!document||!document.body)return"DOM_NOT_AVAILABLE";const t=Wh(),r=Object.keys(t),i=[].concat(...r.map(e=>t[e]||[])),o=new Promise((t,e)=>{setTimeout(()=>e(new Error("DOM blockers detection timeout")),n)}),s=await Promise.race([Yh(i),o]);return e&&(i.length,Object.keys(s).length),r.filter(e=>{const n=t[e];return!(!n||0===n.length)&&n.map(t=>s[t]).filter(Boolean).length>.6*n.length}).sort()}catch(t){if(e&&console.error("[RabbitTracker] DOM Blockers detection failed:",t),t instanceof Error){if(t.message.includes("timeout"))return"TIMEOUT";if("SecurityError"===t.name||t.message.includes("SecurityError"))return"SECURITY_ERROR"}return"NOT_SUPPORTED"}}function Hh(){return B().canRunDOMBlockers}var Xh=Object.freeze({__proto__:null,getBlockedSelectors:Yh,getBlockerFilters:Wh,getDomBlockers:zh,getDomBlockersFingerprint:async function(t={}){const e=await zh(t),n=Array.isArray(e)?e:[];return{activeBlockers:n,blockerCount:n.length,hasAdBlocker:n.some(t=>["adBlock","uBlockOrigin","adGuardBase","easyList"].includes(t)),hasPrivacyExtension:n.some(t=>["privacyBadger","ghostery","brave"].includes(t)),hasTrackingProtection:n.includes("trackingProtection")}},isDomBlockersDetectionAvailable:Hh});function Jh(){try{return I()?navigator.pdfViewerEnabled??null:null}catch{return null}}function Kh(){try{if(!R())return-1;const{ApplePaySession:t}=window;if("function"!=typeof t?.canMakePayments)return-1;if(!x())return-2;if(window.self!==window.top)return-3;try{return t.canMakePayments()?1:0}catch(t){if(t instanceof Error&&"InvalidAccessError"===t.name)return-2;throw t}}catch{return-1}}function qh(){try{return"attributionReporting"in window||"privateClickMeasurement"in window||null}catch{return null}}function Qh(){const t={enabled:!1,sameSiteSupport:!1,secureSupport:!1,partitionedSupport:!1};try{if(t.enabled=navigator.cookieEnabled,!t.enabled)return t;t.sameSiteSupport=tf("__rb_test_samesite","SameSite=Strict"),x()&&(t.secureSupport=tf("__rb_test_secure","Secure")),x()&&I()&&(t.partitionedSupport=tf("__rb_test_partitioned","Partitioned; Secure; SameSite=None"))}catch{}return t}function tf(t,e){try{const n="1",r=`${t}=${n}; ${e}; path=/`;document.cookie=r;const i=document.cookie.includes(`${t}=${n}`);return ef(t),i}catch{return ef(t),!1}}function ef(t){try{const e=[`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`,`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=${location.hostname}`,`${t}=; max-age=0; path=/`,`${t}=; max-age=0; path=/; domain=${location.hostname}`];for(const t of e)try{document.cookie=t}catch{}setTimeout(()=>{try{document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}catch{}},100)}catch{}}function nf(){try{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");return e?(e.getSupportedExtensions()||[]).sort():[]}catch{return[]}}function rf(){try{const t=performance.memory;return t?{usedJSHeapSize:t.usedJSHeapSize,totalJSHeapSize:t.totalJSHeapSize,jsHeapSizeLimit:t.jsHeapSizeLimit}:null}catch{return null}}function of(){try{const t=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return t?{effectiveType:t.effectiveType,downlink:t.downlink,rtt:t.rtt,saveData:t.saveData}:null}catch{return null}}function sf(){const t={};try{t.webkitTemporaryStorage="webkitTemporaryStorage"in navigator,t.webkitPersistentStorage="webkitPersistentStorage"in navigator,window.safari&&(t.safariObjectTypes=Object.getOwnPropertyNames(window.safari)),t.chromeRuntime=!!window.chrome?.runtime,t.mozInnerScreenX="mozInnerScreenX"in window,t.msCredentials="msCredentials"in navigator}catch{}return t}var af=Object.freeze({__proto__:null,getApplePayState:Kh,getBrowserApisFingerprint:function(){const t=Jh(),e=Kh(),n=qh(),r=Qh(),i=nf(),o=rf(),s=of(),a=sf();let c="unknown";a.chromeRuntime?c="chrome":-1!==e?c="safari":a.mozInnerScreenX?c="firefox":a.msCredentials&&(c="edge");const l=Boolean(t||e>-1||n||o||s),u=[null!==t,-1!==e,null!==n,r.enabled,i.length>0,null!==o,null!==s,Object.keys(a).length>0];return{pdfViewerEnabled:t,applePayState:e,privateClickMeasurement:n,cookieCapabilities:r,webglExtensions:i,performanceMemory:o,connectionInfo:s,vendorProperties:a,browserVendor:c,hasNativeFeatures:l,apiScore:Math.round(u.filter(Boolean).length/u.length*100)}},getConnectionInfo:of,getCookieCapabilities:Qh,getPdfViewerEnabled:Jh,getPerformanceMemory:rf,getPrivateClickMeasurement:qh,getVendorProperties:sf,getWebGLExtensions:nf,isBrowserApisDetectionAvailable:function(){return"undefined"!=typeof window&&"undefined"!=typeof navigator}});function cf(){try{if(!bf())return"NOT_SUPPORTED";const t=function(){try{return navigator.plugins||null}catch(t){if("SecurityError"===t.name)return null;throw t}}();if(!t)return"NAVIGATOR_UNAVAILABLE";const e=[];if(0===t.length)return e;for(let n=0;n<t.length;n++){const r=t[n];if(!r)continue;const i=[];if(r.length>0)for(let t=0;t<r.length;t++){const e=r[t];e&&e.type&&i.push(e.type)}e.push({name:r.name||"",filename:r.filename||"",description:r.description||"",version:r.version||void 0,mimeTypes:i})}return e.sort((t,e)=>t.name.localeCompare(e.name))}catch(t){return"SecurityError"===t.name?"SECURITY_RESTRICTED":[]}}function lf(){try{if(!navigator.mimeTypes||0===navigator.mimeTypes.length)return[];const t=[];for(let e=0;e<navigator.mimeTypes.length;e++){const n=navigator.mimeTypes[e];n&&n.type&&t.push(n.type)}return t.sort()}catch{return[]}}function uf(){try{if(navigator.plugins&&Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("flash")||t.description.toLowerCase().includes("flash")))return!0;if(navigator.mimeTypes&&Array.from(navigator.mimeTypes).some(t=>"application/x-shockwave-flash"===t.type))return!0;if(void 0!==window.ActiveXObject)try{return!!new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch{return!1}return!1}catch{return!1}}function hf(){try{if(navigator.plugins&&Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("java")&&!t.name.toLowerCase().includes("javascript")))return!0;const t=["application/x-java-applet","application/x-java-bean","application/x-java-vm"];return!(!navigator.mimeTypes||!t.some(t=>Array.from(navigator.mimeTypes).some(e=>e.type===t)))||"function"==typeof navigator.javaEnabled&&navigator.javaEnabled()}catch{return!1}}function ff(){try{if(navigator.plugins&&Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("silverlight")))return!0;if(navigator.mimeTypes&&Array.from(navigator.mimeTypes).some(t=>"application/x-silverlight"===t.type))return!0;if(void 0!==window.ActiveXObject)try{return!!new window.ActiveXObject("AgControl.AgControl")}catch{return!1}return!1}catch{return!1}}function df(){try{if(!I())return"NOT_SUPPORTED";if(!navigator.plugins)return"NAVIGATOR_UNAVAILABLE";const t=navigator.plugins.length;return 0===t||!window.chrome?.runtime&&!window.chrome?.webstore&&void 0!==window.chrome||!Array.from(navigator.plugins).some(t=>t.name.toLowerCase().includes("pdf")||t.name.toLowerCase().includes("chrome"))&&t<3}catch(t){return"SecurityError"===t.name&&"SECURITY_RESTRICTED"}}function pf(){try{if(!M())return"NOT_SUPPORTED";const t={mozInnerScreenX:"mozInnerScreenX"in window,mozPaintCount:"mozPaintCount"in window,mozApps:!!navigator.mozApps,buildID:!!navigator.buildID,oscpu:!!navigator.oscpu},e=Object.values(t).filter(Boolean).length;return 0===e||(navigator.plugins?0===navigator.plugins.length&&e<2:"NAVIGATOR_UNAVAILABLE")}catch(t){return"SecurityError"===t.name&&"SECURITY_RESTRICTED"}}function mf(t){const e=["antivirus","security","firewall","malware","protection","kaspersky","norton","mcafee","avast","avira","bitdefender","eset","sophos","symantec","trend micro","f-secure"];return t.filter(t=>e.some(e=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))).map(t=>t.name)}function gf(t){const e=["adblock","adblocker","ad block","ublock","ghostery","privacy badger","disconnect","noscript","tracking protection"];return t.filter(t=>e.some(e=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))).map(t=>t.name)}function yf(t,e,n,r){let i=50;return i+=10*t.length,i+=5*e.length,n&&(i-=15),r&&(i-=10),Math.max(0,Math.min(100,i))}function wf(t,e){const n=t.map(t=>t.name).sort(),r=e.slice(0,10).sort();return[`plugins:${n.length}`,`mimes:${e.length}`,...n.slice(0,5),...r.slice(0,5)].join("|")}function bf(){return B().canRunBrowserAPIs&&"undefined"!=typeof navigator}var vf=Object.freeze({__proto__:null,calculateSecurityScore:yf,detectChromeExtensionsBlocked:df,detectFirefoxExtensionsBlocked:pf,generatePluginSignature:wf,getEnhancedPluginFingerprint:function(){const t=cf(),e=Array.isArray(t)?t:[],n=lf(),r=Array.isArray(n)?n:[],i=uf(),o=hf(),s=ff(),a=df(),c="boolean"==typeof a&&a,l=pf(),u="boolean"==typeof l&&l,h=mf(e),f=gf(e),d=wf(e,r),p=yf(h,f,i,o);return{plugins:e,pluginCount:e.length,mimeTypes:r,mimeTypeCount:r.length,flashEnabled:i,javaEnabled:o,silverLightEnabled:s,chromeExtensionsBlocked:c,firefoxExtensionsBlocked:u,securityPlugins:h,adBlockerPlugins:f,pluginSignature:d,securityScore:p}},getMimeTypes:lf,getNavigatorPlugins:cf,identifyAdBlockerPlugins:gf,identifySecurityPlugins:mf,isEnhancedPluginDetectionAvailable:bf,testFlashEnabled:uf,testJavaEnabled:hf,testSilverlightEnabled:ff});const Sf={canvas:{stability:.95,entropy:.9,uniqueness:.85,spoofResistance:.8},webgl:{stability:.92,entropy:.88,uniqueness:.82,spoofResistance:.85},audio:{stability:.9,entropy:.85,uniqueness:.8,spoofResistance:.9},hardware:{stability:.98,entropy:.7,uniqueness:.75,spoofResistance:.95},screen:{stability:.85,entropy:.6,uniqueness:.65,spoofResistance:.7},system:{stability:.8,entropy:.65,uniqueness:.7,spoofResistance:.6},browser:{stability:.75,entropy:.6,uniqueness:.65,spoofResistance:.5},fonts:{stability:.7,entropy:.75,uniqueness:.7,spoofResistance:.4},math:{stability:.95,entropy:.8,uniqueness:.9,spoofResistance:.95},storage:{stability:.6,entropy:.5,uniqueness:.6,spoofResistance:.3},incognito:{stability:.5,entropy:.4,uniqueness:.3,spoofResistance:.2},domBlockers:{stability:.8,entropy:.7,uniqueness:.6,spoofResistance:.9},accessibility:{stability:.9,entropy:.6,uniqueness:.7,spoofResistance:.85},browserApis:{stability:.85,entropy:.75,uniqueness:.8,spoofResistance:.7},pluginsEnhanced:{stability:.7,entropy:.65,uniqueness:.75,spoofResistance:.5},mathFingerprint:{stability:.99,entropy:.95,uniqueness:.9,spoofResistance:.98},fontPreferences:{stability:.92,entropy:.88,uniqueness:.85,spoofResistance:.75},dateTimeLocale:{stability:.95,entropy:.7,uniqueness:.75,spoofResistance:.8},accessibilityEnhanced:{stability:.93,entropy:.65,uniqueness:.8,spoofResistance:.9},enhancedFonts:{stability:.88,entropy:.85,uniqueness:.82,spoofResistance:.7}},Cf={domBlockers:{stability:.8,entropy:.7,uniqueness:.6,spoofResistance:.9},accessibility:{stability:.9,entropy:.6,uniqueness:.7,spoofResistance:.85},browserApis:{stability:.85,entropy:.75,uniqueness:.8,spoofResistance:.7}};function kf(t){const e=Sf[t]||Cf[t];if(!e)return.5;const n=.3*e.stability+.25*e.entropy+.25*e.uniqueness+.2*e.spoofResistance;return Math.max(.1,Math.min(1,n))}var If=Object.freeze({__proto__:null,ADVANCED_COMPONENT_CHARACTERISTICS:Cf,COMPONENT_CHARACTERISTICS:Sf,calculateComponentWeight:kf,calculateConfidence:function(t,e={}){const{requireMinimumComponents:n=4,penalizeMissingCore:r=!0,adjustForIncognito:i=!0}=e,o=t.filter(t=>t.success),s=[];o.length<n&&s.push(`Collect at least ${n} components for reliable identification`);let a=0,c=0,l=0,u=0,h=0;const f=["canvas","webgl","audio","hardware"].filter(t=>!o.some(e=>e.component===t));for(const t of o){const e=kf(t.component),n=Sf[t.component]||Cf[t.component];n&&(a+=e,c+=n.stability*e,l+=n.entropy*e,u+=n.uniqueness*e,h+=n.spoofResistance*e)}const d=a>0?c/a:0,p=a>0?l/a:0,m=a>0?h/a:0;let g,y,w=.35*d+.25*p+.25*(a>0?u/a:0)+.15*m,b=w;return r&&f.length>0&&(b-=.1*f.length,s.push(`Missing core components: ${f.join(", ")}`)),o.length<6&&(b-=.05*(6-o.length)),i&&o.some(t=>"incognito"===t.component)&&(b+=.02),o.filter(t=>["domBlockers","accessibility","browserApis","math"].includes(t.component)).length>=2&&(b+=.05),b=Math.max(0,Math.min(1,b)),b>=.995?(g=.995,y="Very High"):b>=.99?(g=.99,y="High"):b>=.95?(g=.95,y="Medium"):b>=.8?(g=.8,y="Low"):(g=.5,y="Very Low",s.push("Consider implementing additional fingerprinting techniques")),b<.95&&s.push("Enable all available fingerprinting components for better accuracy"),m<.6&&s.push("Include more spoof-resistant components like audio and WebGL"),p<.6&&s.push("Add high-entropy components like canvas and math fingerprinting"),{score:g,level:y,factors:{componentCount:o.length,weightedScore:Math.round(1e3*w)/1e3,stabilityScore:Math.round(1e3*d)/1e3,entropyScore:Math.round(1e3*p)/1e3,spoofResistanceScore:Math.round(1e3*m)/1e3},recommendations:s.slice(0,3)}}});function Mf(){try{const t=screen,e=t.availTop??0,n=t.availLeft??0,r=t.availWidth??t.width,i=t.availHeight??t.height,o=e||null,s=t.width-r-n||null,a=t.height-i-e||null,c=n||null;if(null===o&&null===s&&null===a&&null===c)return null;const l=t=>null===t?null:10*Math.round(t/10);return{top:l(o),right:l(s),bottom:l(a),left:l(c)}}catch{return null}}function Af(){try{const t=navigator.platform?.toLowerCase()||"",e=navigator.userAgent?.toLowerCase()||"";if(t.includes("win")&&(e.includes("wow64")||e.includes("x64")||e.includes("x86_64")))return 0;if(t.includes("linux")&&(t.includes("x86_64")||e.includes("x86_64")))return 0;if(t.includes("mac")&&(t.includes("intel")||e.includes("intel mac")))return 0;if(t.includes("x86")||t.includes("x64")||t.includes("intel")||t.includes("amd64")||e.includes("x86")||e.includes("amd64"))return 0;if(t.includes("arm")||e.includes("arm")||e.includes("aarch64")||t.includes("aarch64"))return 255;try{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(e&&"getExtension"in e&&"getParameter"in e){const t=e.getExtension("WEBGL_debug_renderer_info");if(t){const n=e.getParameter(t.UNMASKED_VENDOR_WEBGL)?.toLowerCase()||"",r=e.getParameter(t.UNMASKED_RENDERER_WEBGL)?.toLowerCase()||"";if(n.includes("intel")||n.includes("nvidia")||n.includes("amd")||r.includes("intel")||r.includes("nvidia")||r.includes("amd")||r.includes("radeon")||r.includes("geforce")||r.includes("quadro")||r.includes("iris")||r.includes("uhd")||r.includes("hd graphics"))return 0;if(r.includes("mali")||r.includes("adreno")||r.includes("powervr")||r.includes("tegra")||r.includes("apple gpu")||n.includes("arm")||r.includes("videocore"))return 255}}}catch{}try{const e=new Float32Array(1),n=new Uint8Array(e.buffer);e[0]=1/0,e[0]=e[0]-e[0];const r=n[3];return t.includes("linux"),r}catch{return}}catch{return}}function Rf(){try{const t=navigator;let e=0;void 0!==t.maxTouchPoints?e=t.maxTouchPoints:void 0!==t.msMaxTouchPoints&&(e=t.msMaxTouchPoints);let n=!1;try{document.createEvent("TouchEvent"),n=!0}catch{n=!1}return{maxTouchPoints:e,touchEvent:n,touchStart:"ontouchstart"in window}}catch{return}}function xf(){const t=[],e=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];for(const n of e){const e=window[n];e&&"object"==typeof e&&t.push(n)}return t.sort()}function Ef(){try{const t=navigator.deviceMemory;if("number"==typeof t)return Math.round(t);if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?void 0:Math.round(e)}return}catch{return}}function Tf(){try{return screen.colorDepth||void 0}catch{return}}function _f(){try{for(const t of["rec2020","p3","srgb"])if(window.matchMedia(`(color-gamut: ${t})`).matches)return t;return}catch{return}}var Of=Object.freeze({__proto__:null,collectDeviceSignals:function(){return{screenFrame:Mf(),hardwareConcurrency:navigator.hardwareConcurrency||void 0,deviceMemory:Ef(),architecture:Af(),touchSupport:Rf(),vendorFlavors:xf(),cpuClass:navigator.cpuClass||void 0,colorDepth:Tf(),colorGamut:_f()}}});export{t as ZaplierCore,t as default,e as initZaplierCore};
|
|
6
|
+
class e{constructor(e){if(this.eventQueue=[],this.isInitialized=!1,this.modules=new Map,this.version="2.0.0",this.t=!1,!e.token)throw console.error('[Zaplier] Missing required "token" option. Get your token at https://app.zaplier.com/dashboard/keys'),new Error("Zaplier: token is required");if("string"!=typeof e.token||e.token.trim().length<5)throw console.error('[Zaplier] Invalid token format. Token should be a workspace API key (e.g., "ws_abc123...")'),new Error("Zaplier: invalid token format");this.config={deferAdvanced:!0,loadTimeout:5e3,debug:!1,...e},this.t=this.isDevEnvironment(),this.initializeCore()}isDevEnvironment(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"[::1]"===e||e.endsWith(".local")||e.endsWith(".test")||!0===this.config.debug}initializeCore(){try{this.config.debug&&this.version,this.sessionId=this.generateTempSessionId(),this.visitorId=this.generateTempVisitorId(),this.isInitialized=!0,this.processEventQueue(),this.config.debug,this.config.deferAdvanced||this.scheduleAdvancedLoading()}catch(e){console.error("[Zaplier Core] Initialization failed:",e)}}trackPageView(e={}){this.config.debug;const t={eventType:"page_view",eventName:"page_view",sessionId:this.sessionId,visitorId:this.visitorId,url:window.location.href,referrer:document.referrer,timestamp:(new Date).toISOString(),...e};this.sendEvent(t)}track(e,t={}){this.config.debug;const i={eventType:"custom",eventName:e,sessionId:this.sessionId,visitorId:this.visitorId,timestamp:(new Date).toISOString(),...t};this.sendEvent(i)}async enableAdvancedFeatures(){this.config.debug;try{await this.loadFingerprinting(),this.config.replay&&await this.loadReplayModule(),this.config.debug}catch(e){console.error("[Zaplier Core] Failed to load advanced features:",e)}}async loadFingerprinting(){if(!this.modules.has("fingerprint"))try{const{getCompleteFingerprint:e}=await import("./chunks/fingerprint-FfUEEIAd.min.js").then(function(e){return e.f}),t=await e();t.success&&t.data&&(this.visitorId=t.data.hash||this.visitorId,this.modules.set("fingerprint",t.data),this.config.debug)}catch(e){console.error("[Zaplier Core] Fingerprinting failed:",e)}}async loadReplayModule(){if(!this.modules.has("replay"))try{const{SessionReplayEngine:e}=await import("./chunks/session-replay-C5Tp0d16.min.js"),t=new e(this.sessionId,this.visitorId,{sampleRate:this.config.replaySampling||.1});t.start()&&(this.modules.set("replay",t),this.config.debug)}catch(e){console.error("[Zaplier Core] Replay loading failed:",e)}}scheduleAdvancedLoading(){((e,t=100)=>{"undefined"!=typeof requestIdleCallback?requestIdleCallback(e,{timeout:this.config.loadTimeout}):setTimeout(e,t)})(()=>this.enableAdvancedFeatures())}async sendEvent(e){try{const t={...e,isDev:this.t},i=await fetch(`${this.config.apiEndpoint||"https://api.zaplier.com"}/events?token=${encodeURIComponent(this.config.token)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0});this.config.debug&&!i.ok&&console.warn(`[Zaplier Core] Event sending failed: ${i.status}`)}catch(t){this.eventQueue.push(e),this.config.debug&&console.warn("[Zaplier Core] Event queued for retry:",t)}}processEventQueue(){if(0===this.eventQueue.length)return;const e=[...this.eventQueue];this.eventQueue=[],e.forEach(e=>this.sendEvent(e))}generateTempSessionId(){const e=new Date,t=e.getFullYear()+(e.getMonth()+1).toString().padStart(2,"0")+e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0");return`temp_${Date.now()}_${t}_${i}`}generateTempVisitorId(){return`temp_visitor_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}getVisitorInfo(){return{visitorId:this.visitorId,sessionId:this.sessionId,isReady:this.isInitialized,hasFingerprint:this.modules.has("fingerprint")}}}function t(t){return new e(t)}if("undefined"!=typeof window){window.Zaplier={init:t,version:"2.0.0"};const e=()=>{const e=document.getElementsByTagName("script");for(const i of Array.from(e))if(i.src&&(i.src.includes("zaplier")||i.src.includes("core.min.js"))&&i.dataset.token){const e=t({token:i.dataset.token,debug:"true"===i.dataset.debug,replay:"true"===i.dataset.replay,deferAdvanced:"false"!==i.dataset.deferAdvanced});return window.Zaplier.instance=e,e.trackPageView(),void(e.config.deferAdvanced&&e.enableAdvancedFeatures())}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}export{e as ZaplierCore,e as default,t as initZaplierCore};
|