@temps-sdk/analytics-browser 0.0.7 → 0.0.9-beta.1

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/temps.min.js CHANGED
@@ -1,62 +1,62 @@
1
- (()=>{var He="/api/_temps",Jr="session-replay",js="X-Temps-Analytics-Key",Ys="temps_key",Zs=["/login","/log-in","/signin","/sign-in","/logout","/log-out","/signup","/sign-up","/register","/checkout*","/payment*","/billing*","/reset-password*","/forgot-password*","/mfa*","/2fa*","/verify*"];function Xs(r){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();return`${r}_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function zt(){try{if(typeof localStorage>"u")return;let r=localStorage.getItem("temps_visitor_id");if(!r)r=Xs("visitor"),localStorage.setItem("temps_visitor_id",r);return r}catch{return}}function Ks(){try{if(typeof localStorage>"u")return;let r=Date.now(),e=Number(localStorage.getItem("temps_session_last_seen")),t=localStorage.getItem("temps_session_id");if(!t||!Number.isFinite(e)||r-e>1800000)t=Xs("session"),localStorage.setItem("temps_session_id",t);return localStorage.setItem("temps_session_last_seen",String(r)),t}catch{return}}function Ll(){if(typeof document>"u")return;let r=document.querySelector('meta[name="temps-metadata"]');if(r)try{let e=r.getAttribute("content")||"{}";return JSON.parse(e).request_id}catch(e){console.error("Failed to parse metadata:",e)}return}function Js(){try{let r=window.location.hostname,e=window.location.protocol==="file:",t=/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(r);return e||t}catch{return!1}}function qs(){if(typeof window>"u")return!1;let r=window,e=Boolean(r._phantom),t=Boolean(r.__nightmare),i=Boolean(window.navigator?.webdriver),s=Boolean(r.Cypress),n=Boolean(r.__temps);return(e||t||i||s)&&!n}function Qs(r){return{...r,request_id:Ll(),visitorId:zt(),sessionId:Ks()}}function Vt(r){return r?{[js]:r}:{}}function qr(r,e){if(!e)return r;let t=r.includes("?")?"&":"?";return`${r}${t}${Ys}=${encodeURIComponent(e)}`}function Qr(r,e){return new Blob([r],{type:e?"text/plain":"application/json"})}async function $e(r,e,t="POST",i,s){try{await fetch(`${i}/${r}`,{method:t,headers:{"Content-Type":"application/json",...Vt(s)},body:JSON.stringify(Qs(e))})}catch(n){console.error("Failed to send analytics:",n)}}function je(r,e,t,i){try{let s=qr(`${t}/${r}`,i),n=JSON.stringify(Qs(e));if(typeof navigator<"u"&&navigator.sendBeacon&&typeof navigator.sendBeacon==="function")try{if(navigator.sendBeacon(s,Qr(n,i)))return!0}catch{}return fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch((o)=>{console.error("Failed to send analytics (reliable):",o)}),!0}catch(s){return console.error("Failed to send analytics (reliable):",s),!1}}class ei{constructor(r={}){this.engagementTime=0,this.lastEngagementStart=null,this.heartbeatCount=0,this.isActive=!0,this.heartbeatTimer=null,this.inactivityTimer=null,this.hasTrackedLeave=!1,this.handleVisibilityChange=()=>{let e=this.isVisible;if(this.isVisible=document.visibilityState==="visible",!e&&this.isVisible)this.startHeartbeat();else if(e&&!this.isVisible)this.pauseEngagement()},this.handleFocus=()=>{this.isFocused=!0},this.handleBlur=()=>{this.isFocused=!1,this.pauseEngagement()},this.handleUserActivity=()=>{if(!this.isVisible||!this.isFocused)return;let e=Date.now();if(!this.isActive)this.isActive=!0,this.lastEngagementStart=e,this.startHeartbeat();this.lastActivityTime=e,this.resetInactivityTimer()},this.handlePageLeave=()=>{if(this.hasTrackedLeave)return;this.hasTrackedLeave=!0,this.updateEngagementTime();let e=this.getEngagementData();if(this.onPageLeave)this.onPageLeave(e);je("event",{event_name:"page_leave",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,language:navigator.language,event_data:{engagement_time_seconds:e.engagement_time_seconds,total_time_seconds:e.total_time_seconds,heartbeat_count:this.heartbeatCount,was_engaged:e.is_engaged,url:window.location.href,referrer:document.referrer}},this.basePath,this.ingestKey)},this.handleNavigation=()=>{this.handlePageLeave(),this.reset()},this.basePath=r.basePath||He,this.ingestKey=r.ingestKey,this.domain=r.domain||window.location.hostname,this.heartbeatInterval=r.heartbeatInterval||30000,this.inactivityTimeout=r.inactivityTimeout||30000,this.engagementThreshold=r.engagementThreshold||1e4,this.onHeartbeat=r.onHeartbeat,this.onPageLeave=r.onPageLeave,this.startTime=Date.now(),this.lastActivityTime=Date.now(),this.isVisible=document.visibilityState==="visible",this.isFocused=document.hasFocus(),this.lastEngagementStart=null,this.isActive=!1,this.originalPushState=window.history.pushState.bind(window.history),this.setupEventListeners(),this.startHeartbeat()}setupEventListeners(){document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur),["mousedown","keypress","scroll","touchstart","click"].forEach((t)=>{document.addEventListener(t,this.handleUserActivity,{passive:!0})}),window.addEventListener("pagehide",this.handlePageLeave),window.addEventListener("beforeunload",this.handlePageLeave);let e=this.originalPushState;window.history.pushState=(...t)=>{this.handlePageLeave(),e(...t),this.reset()},window.addEventListener("popstate",this.handleNavigation)}pauseEngagement(){if(this.updateEngagementTime(),this.lastEngagementStart=null,!this.isVisible)this.stopHeartbeat()}resetInactivityTimer(){if(this.inactivityTimer)clearTimeout(this.inactivityTimer);this.inactivityTimer=setTimeout(()=>{if(this.isVisible)this.updateEngagementTime(),this.isActive=!1,this.lastEngagementStart=null},this.inactivityTimeout)}updateEngagementTime(){if(this.lastEngagementStart!==null){let r=Date.now()-this.lastEngagementStart;this.engagementTime+=r}}startHeartbeat(){if(this.heartbeatTimer)return;this.heartbeatTimer=setInterval(()=>{if(this.isVisible&&this.isActive)this.sendHeartbeat()},this.heartbeatInterval)}stopHeartbeat(){if(this.heartbeatTimer)clearInterval(this.heartbeatTimer),this.heartbeatTimer=null}async sendHeartbeat(){this.updateEngagementTime(),this.heartbeatCount++;let r=this.getEngagementData();if(this.onHeartbeat)this.onHeartbeat(r);if(await $e("event",{event_name:"heartbeat",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,language:navigator.language,event_data:{engagement_time:Math.round(this.engagementTime),total_time:Math.round(Date.now()-this.startTime),is_engaged:r.is_engaged,is_visible:this.isVisible,time_since_last_activity:r.time_since_last_activity,heartbeat_count:this.heartbeatCount}},"POST",this.basePath,this.ingestKey),this.isActive&&this.isVisible)this.lastEngagementStart=Date.now()}getEngagementData(){let r=Date.now()-this.startTime,e=Date.now()-this.lastActivityTime;return{engagement_time_seconds:Math.round(this.engagementTime/1000),total_time_seconds:Math.round(r/1000),heartbeat_count:this.heartbeatCount,is_engaged:this.engagementTime>=this.engagementThreshold,is_visible:this.isVisible,time_since_last_activity:Math.round(e/1000)}}reset(){if(this.startTime=Date.now(),this.engagementTime=0,this.lastActivityTime=Date.now(),this.heartbeatCount=0,this.hasTrackedLeave=!1,this.isActive=!1,this.lastEngagementStart=null,this.isVisible)this.startHeartbeat()}destroy(){if(this.handlePageLeave(),this.stopHeartbeat(),this.inactivityTimer)clearTimeout(this.inactivityTimer);document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("focus",this.handleFocus),window.removeEventListener("blur",this.handleBlur),window.removeEventListener("pagehide",this.handlePageLeave),window.removeEventListener("beforeunload",this.handlePageLeave),window.removeEventListener("popstate",this.handleNavigation),window.history.pushState=this.originalPushState,["mousedown","keypress","scroll","touchstart","click"].forEach((e)=>{document.removeEventListener(e,this.handleUserActivity)})}}var ii,De,ft,cn,jt,hn=-1,Fe=function(r){addEventListener("pageshow",function(e){e.persisted&&(hn=e.timeStamp,r(e))},!0)},si=function(){var r=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(r&&r.responseStart>0&&r.responseStart<performance.now())return r},Zt=function(){var r=si();return r&&r.activationStart||0},he=function(r,e){var t=si(),i="navigate";return hn>=0?i="back-forward-cache":t&&(document.prerendering||Zt()>0?i="prerender":document.wasDiscarded?i="restore":t.type&&(i=t.type.replace(/_/g,"-"))),{name:r,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1000000000000),navigationType:i}},Ze=function(r,e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(r)){var i=new PerformanceObserver(function(s){Promise.resolve().then(function(){e(s.getEntries())})});return i.observe(Object.assign({type:r,buffered:!0},t||{})),i}}catch(s){}},fe=function(r,e,t,i){var s,n;return function(o){e.value>=0&&(o||i)&&((n=e.value-(s||0))||s===void 0)&&(s=e.value,e.delta=n,e.rating=function(l,a){return l>a[1]?"poor":l>a[0]?"needs-improvement":"good"}(e.value,t),r(e))}},ni=function(r){requestAnimationFrame(function(){return requestAnimationFrame(function(){return r()})})},dt=function(r){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&r()})},Xt=function(r){var e=!1;return function(){e||(r(),e=!0)}},Ye=-1,en=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Yt=function(r){document.visibilityState==="hidden"&&Ye>-1&&(Ye=r.type==="visibilitychange"?r.timeStamp:0,Pl())},tn=function(){addEventListener("visibilitychange",Yt,!0),addEventListener("prerenderingchange",Yt,!0)},Pl=function(){removeEventListener("visibilitychange",Yt,!0),removeEventListener("prerenderingchange",Yt,!0)},oi=function(){return Ye<0&&(Ye=en(),tn(),Fe(function(){setTimeout(function(){Ye=en(),tn()},0)})),{get firstHiddenTime(){return Ye}}},pt=function(r){document.prerendering?addEventListener("prerenderingchange",function(){return r()},!0):r()},rn=[1800,3000],ai=function(r,e){e=e||{},pt(function(){var t,i=oi(),s=he("FCP"),n=Ze("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(n.disconnect(),l.startTime<i.firstHiddenTime&&(s.value=Math.max(l.startTime-Zt(),0),s.entries.push(l),t(!0)))})});n&&(t=fe(r,s,rn,e.reportAllChanges),Fe(function(o){s=he("FCP"),t=fe(r,s,rn,e.reportAllChanges),ni(function(){s.value=performance.now()-o.timeStamp,t(!0)})}))})},sn=[0.1,0.25],fn=function(r,e){e=e||{},ai(Xt(function(){var t,i=he("CLS",0),s=0,n=[],o=function(a){a.forEach(function(u){if(!u.hadRecentInput){var c=n[0],f=n[n.length-1];s&&u.startTime-f.startTime<1000&&u.startTime-c.startTime<5000?(s+=u.value,n.push(u)):(s=u.value,n=[u])}}),s>i.value&&(i.value=s,i.entries=n,t())},l=Ze("layout-shift",o);l&&(t=fe(r,i,sn,e.reportAllChanges),dt(function(){o(l.takeRecords()),t(!0)}),Fe(function(){s=0,i=he("CLS",0),t=fe(r,i,sn,e.reportAllChanges),ni(function(){return t()})}),setTimeout(t,0))}))},dn=0,ti=1/0,Gt=0,$l=function(r){r.forEach(function(e){e.interactionId&&(ti=Math.min(ti,e.interactionId),Gt=Math.max(Gt,e.interactionId),dn=Gt?(Gt-ti)/7+1:0)})},pn=function(){return ii?dn:performance.interactionCount||0},Fl=function(){"interactionCount"in performance||ii||(ii=Ze("event",$l,{type:"event",buffered:!0,durationThreshold:0}))},Ce=[],Ht=new Map,mn=0,Ul=function(){var r=Math.min(Ce.length-1,Math.floor((pn()-mn)/50));return Ce[r]},Bl=[],Wl=function(r){if(Bl.forEach(function(s){return s(r)}),r.interactionId||r.entryType==="first-input"){var e=Ce[Ce.length-1],t=Ht.get(r.interactionId);if(t||Ce.length<10||r.duration>e.latency){if(t)r.duration>t.latency?(t.entries=[r],t.latency=r.duration):r.duration===t.latency&&r.startTime===t.entries[0].startTime&&t.entries.push(r);else{var i={id:r.interactionId,latency:r.duration,entries:[r]};Ht.set(i.id,i),Ce.push(i)}Ce.sort(function(s,n){return n.latency-s.latency}),Ce.length>10&&Ce.splice(10).forEach(function(s){return Ht.delete(s.id)})}}},gn=function(r){var e=self.requestIdleCallback||self.setTimeout,t=-1;return r=Xt(r),document.visibilityState==="hidden"?r():(t=e(r),dt(r)),t},nn=[200,500],yn=function(r,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},pt(function(){var t;Fl();var i,s=he("INP"),n=function(l){gn(function(){l.forEach(Wl);var a=Ul();a&&a.latency!==s.value&&(s.value=a.latency,s.entries=a.entries,i())})},o=Ze("event",n,{durationThreshold:(t=e.durationThreshold)!==null&&t!==void 0?t:40});i=fe(r,s,nn,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),dt(function(){n(o.takeRecords()),i(!0)}),Fe(function(){mn=pn(),Ce.length=0,Ht.clear(),s=he("INP"),i=fe(r,s,nn,e.reportAllChanges)}))}))},on=[2500,4000],ri={},vn=function(r,e){e=e||{},pt(function(){var t,i=oi(),s=he("LCP"),n=function(a){e.reportAllChanges||(a=a.slice(-1)),a.forEach(function(u){u.startTime<i.firstHiddenTime&&(s.value=Math.max(u.startTime-Zt(),0),s.entries=[u],t())})},o=Ze("largest-contentful-paint",n);if(o){t=fe(r,s,on,e.reportAllChanges);var l=Xt(function(){ri[s.id]||(n(o.takeRecords()),o.disconnect(),ri[s.id]=!0,t(!0))});["keydown","click"].forEach(function(a){addEventListener(a,function(){return gn(l)},{once:!0,capture:!0})}),dt(l),Fe(function(a){s=he("LCP"),t=fe(r,s,on,e.reportAllChanges),ni(function(){s.value=performance.now()-a.timeStamp,ri[s.id]=!0,t(!0)})})}})},an=[800,1800],zl=function r(e){document.prerendering?pt(function(){return r(e)}):document.readyState!=="complete"?addEventListener("load",function(){return r(e)},!0):setTimeout(e,0)},wn=function(r,e){e=e||{};var t=he("TTFB"),i=fe(r,t,an,e.reportAllChanges);zl(function(){var s=si();s&&(t.value=Math.max(s.responseStart-Zt(),0),t.entries=[s],i(!0),Fe(function(){t=he("TTFB",0),(i=fe(r,t,an,e.reportAllChanges))(!0)}))})},ht={passive:!0,capture:!0},Vl=new Date,ln=function(r,e){De||(De=e,ft=r,cn=new Date,Sn(removeEventListener),bn())},bn=function(){if(ft>=0&&ft<cn-Vl){var r={entryType:"first-input",name:De.type,target:De.target,cancelable:De.cancelable,startTime:De.timeStamp,processingStart:De.timeStamp+ft};jt.forEach(function(e){e(r)}),jt=[]}},Gl=function(r){if(r.cancelable){var e=(r.timeStamp>1000000000000?new Date:performance.now())-r.timeStamp;r.type=="pointerdown"?function(t,i){var s=function(){ln(t,i),o()},n=function(){o()},o=function(){removeEventListener("pointerup",s,ht),removeEventListener("pointercancel",n,ht)};addEventListener("pointerup",s,ht),addEventListener("pointercancel",n,ht)}(e,r):ln(e,r)}},Sn=function(r){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return r(e,Gl,ht)})},un=[100,300],Cn=function(r,e){e=e||{},pt(function(){var t,i=oi(),s=he("FID"),n=function(a){a.startTime<i.firstHiddenTime&&(s.value=a.processingStart-a.startTime,s.entries.push(a),t(!0))},o=function(a){a.forEach(n)},l=Ze("first-input",o);t=fe(r,s,un,e.reportAllChanges),l&&(dt(Xt(function(){o(l.takeRecords()),l.disconnect()})),Fe(function(){var a;s=he("FID"),t=fe(r,s,un,e.reportAllChanges),jt=[],ft=-1,De=null,Sn(addEventListener),a=n,jt.push(a),bn()}))})};class li{constructor(r){if(this.pathname="",this.query="",this.loadMetrics={},this.loadSent=!1,this.sentLoadMetrics=new Set,this.stopped=!1,this.handleVisibilityChange=()=>{if(document.visibilityState==="hidden")this.flushLoad()},this.handlePageHide=()=>{this.flushLoad()},this.basePath=r.basePath,this.ingestKey=r.ingestKey,typeof window>"u")return;this.pathname=window.location.pathname,this.query=window.location.search,this.start()}start(){wn((r)=>this.recordLoad("ttfb",r.value)),ai((r)=>this.recordLoad("fcp",r.value)),vn((r)=>this.recordLoad("lcp",r.value)),Cn((r)=>this.recordFid(r.value)),fn((r)=>this.sendLate("cls",r.value)),yn((r)=>this.sendLate("inp",r.value)),document.addEventListener("visibilitychange",this.handleVisibilityChange,!0),window.addEventListener("pagehide",this.handlePageHide,!0)}recordLoad(r,e){if(this.stopped||this.sentLoadMetrics.has(r))return;if(this.loadSent){this.sentLoadMetrics.add(r),this.send({[r]:e});return}this.loadMetrics[r]=e;let{ttfb:t,fcp:i,lcp:s}=this.loadMetrics;if(t!==void 0&&i!==void 0&&s!==void 0)this.flushLoad()}recordFid(r){if(this.stopped||this.sentLoadMetrics.has("fid"))return;if(this.loadSent){this.sentLoadMetrics.add("fid"),this.send({fid:r});return}this.loadMetrics.fid=r}flushLoad(){if(this.stopped||this.loadSent)return;let{ttfb:r,fcp:e,lcp:t,fid:i}=this.loadMetrics;if(r===void 0&&e===void 0&&t===void 0&&i===void 0)return;this.loadSent=!0;for(let[s,n]of Object.entries(this.loadMetrics))if(n!==void 0)this.sentLoadMetrics.add(s);this.send({ttfb:r??null,lcp:t??null,fid:i??null,fcp:e??null})}sendLate(r,e){if(this.stopped)return;this.send({[r]:e})}send(r){let e={...r,pathname:this.pathname,query:this.query};if(typeof document<"u"&&document.visibilityState==="hidden"){je("speed",e,this.basePath,this.ingestKey);return}$e("speed",e,"POST",this.basePath,this.ingestKey)}destroy(){if(this.stopped=!0,this.loadMetrics={},typeof window>"u")return;document.removeEventListener("visibilitychange",this.handleVisibilityChange,!0),window.removeEventListener("pagehide",this.handlePageHide,!0)}}var Hl=Object.defineProperty,jl=(r,e,t)=>(e in r)?Hl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,v=(r,e,t)=>jl(r,typeof e!=="symbol"?e+"":e,t),En,Yl=Object.defineProperty,Zl=(r,e,t)=>(e in r)?Yl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,In=(r,e,t)=>Zl(r,typeof e!=="symbol"?e+"":e,t),q=((r)=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(q||{}),xn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},An={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Kt={},Xl=()=>!!globalThis.Zone;function ns(r){if(Kt[r])return Kt[r];let e=globalThis[r],t=e.prototype,i=r in xn?xn[r]:void 0,s=Boolean(i&&i.every((l)=>{var a,u;return Boolean((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)==null?void 0:u.toString().includes("[native code]"))})),n=r in An?An[r]:void 0,o=Boolean(n&&n.every((l)=>{var a;return typeof t[l]==="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!Xl())return Kt[r]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[r].prototype;if(document.body.removeChild(l),!u)return t;return Kt[r]=u}catch{return t}}var ui={};function ke(r,e,t){var i;let s=`${r}.${String(t)}`;if(ui[s])return ui[s].call(e);let n=ns(r),o=(i=Object.getOwnPropertyDescriptor(n,t))==null?void 0:i.get;if(!o)return e[t];return ui[s]=o,o.call(e)}var ci={};function Io(r,e,t){let i=`${r}.${String(t)}`;if(ci[i])return ci[i].bind(e);let n=ns(r)[t];if(typeof n!=="function")return e[t];return ci[i]=n,n.bind(e)}function Kl(r){return ke("Node",r,"childNodes")}function Jl(r){return ke("Node",r,"parentNode")}function ql(r){return ke("Node",r,"parentElement")}function Ql(r){return ke("Node",r,"textContent")}function eu(r,e){return Io("Node",r,"contains")(e)}function tu(r){return Io("Node",r,"getRootNode")()}function ru(r){if(!r||!("host"in r))return null;return ke("ShadowRoot",r,"host")}function iu(r){return r.styleSheets}function su(r){if(!r||!("shadowRoot"in r))return null;return ke("Element",r,"shadowRoot")}function nu(r,e){return ke("Element",r,"querySelector")(e)}function ou(r,e){return ke("Element",r,"querySelectorAll")(e)}function au(){return ns("MutationObserver").constructor}var ie={childNodes:Kl,parentNode:Jl,parentElement:ql,textContent:Ql,contains:eu,getRootNode:tu,host:ru,styleSheets:iu,shadowRoot:su,querySelector:nu,querySelectorAll:ou,mutationObserver:au};function xo(r){return r.nodeType===r.ELEMENT_NODE}function wt(r){let e=r&&"host"in r&&"mode"in r&&ie.host(r)||null;return Boolean(e&&"shadowRoot"in e&&ie.shadowRoot(e)===r)}function bt(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function lu(r){if(r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;"))r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;");return r}function uu(r){let{cssText:e}=r;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(r.href)})`];if(r.layerName==="")t.push("layer");else if(r.layerName)t.push(`layer(${r.layerName})`);if(r.supportsText)t.push(`supports(${r.supportsText})`);if(r.media.length)t.push(r.media.mediaText);return t.join(" ")+";"}function Ii(r){try{let e=r.rules||r.cssRules;if(!e)return null;let t=r.href;if(!t&&r.ownerNode&&r.ownerNode.ownerDocument)t=r.ownerNode.ownerDocument.location.href;let i=Array.from(e,(s)=>Ao(s,t)).join("");return lu(i)}catch(e){return null}}function Ao(r,e){if(hu(r)){let t;try{t=Ii(r.styleSheet)||uu(r)}catch(i){t=r.cssText}if(r.styleSheet.href)return Ir(t,r.styleSheet.href);return t}else{let t=r.cssText;if(fu(r)&&r.selectorText.includes(":"))t=cu(t);if(e)return Ir(t,e);return t}}function cu(r){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function hu(r){return"styleSheet"in r}function fu(r){return"selectorText"in r}class os{constructor(){In(this,"idNodeMap",new Map),In(this,"nodeMetaMap",new WeakMap)}getId(r){var e;if(!r)return-1;return((e=this.getMeta(r))==null?void 0:e.id)??-1}getNode(r){return this.idNodeMap.get(r)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(r){return this.nodeMetaMap.get(r)||null}removeNodeFromMap(r){let e=this.getId(r);if(this.idNodeMap.delete(e),r.childNodes)r.childNodes.forEach((t)=>this.removeNodeFromMap(t))}has(r){return this.idNodeMap.has(r)}hasNode(r){return this.nodeMetaMap.has(r)}add(r,e){let t=e.id;this.idNodeMap.set(t,r),this.nodeMetaMap.set(r,e)}replace(r,e){let t=this.getNode(r);if(t){let i=this.nodeMetaMap.get(t);if(i)this.nodeMetaMap.set(e,i)}this.idNodeMap.set(r,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function du(){return new os}function as({element:r,maskInputOptions:e,tagName:t,type:i,value:s,maskInputFn:n}){let o=s||"",l=i&&Be(i);if(e[t.toLowerCase()]||l&&e[l])if(n)o=n(o,r);else o="*".repeat(o.length);return o}function Be(r){return r.toLowerCase()}var Mn="__rrweb_original__";function pu(r){let e=r.getContext("2d");if(!e)return!0;let t=50;for(let i=0;i<r.width;i+=t)for(let s=0;s<r.height;s+=t){let n=e.getImageData,o=Mn in n?n[Mn]:n;if(new Uint32Array(o.call(e,i,s,Math.min(t,r.width-i),Math.min(t,r.height-s)).data.buffer).some((a)=>a!==0))return!1}return!0}function ls(r){let e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?Be(e):null}function Mo(r,e){let t;try{t=new URL(r,e??window.location.href)}catch(n){return null}let i=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(i);return(s==null?void 0:s[1])??null}function mu(r){let e="";if(r.indexOf("//")>-1)e=r.split("/").slice(0,3).join("/");else e=r.split("/")[0];return e=e.split("?")[0],e}var gu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,yu=/^(?:[a-z+]+:)?\/\//i,vu=/^www\..*/i,wu=/^(data:)([^,]*),(.*)/i;function Ir(r,e){return(r||"").replace(gu,(t,i,s,n,o,l)=>{let a=s||o||l,u=i||n||"";if(!a)return t;if(yu.test(a)||vu.test(a))return`url(${u}${a}${u})`;if(wu.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${mu(e)+a}${u})`;let c=e.split("/"),f=a.split("/");c.pop();for(let p of f)if(p===".")continue;else if(p==="..")c.pop();else c.push(p);return`url(${u}${c.join("/")}${u})`})}function hi(r){return r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function bu(r,e){let t=Array.from(e.childNodes),i=[];if(t.length>1&&r&&typeof r==="string"){let s=hi(r);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent==="string"){let o=hi(t[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(s.split(a).length===2){let u=s.indexOf(a);for(let c=u;c<r.length;c++)if(hi(r.substring(0,c)).length===u){i.push(r.substring(0,c)),r=r.substring(c);break}break}}}}return i.push(r),i}function Su(r,e){return bu(r,e).join("/* rr_split */")}var Cu=1,Eu=new RegExp("[^a-z0-9-_:]"),Ct=-2;function To(){return Cu++}function Iu(r){if(r instanceof HTMLFormElement)return"form";let e=Be(r.tagName);if(Eu.test(e))return"div";return e}var Xe,Tn,xu=/^[^ \t\n\r\u000c]+/,Au=/^[, \t\n\r\u000c]+/;function Mu(r,e){if(e.trim()==="")return e;let t=0;function i(n){let o,l=n.exec(e.substring(t));if(l)return o=l[0],t+=o.length,o;return""}let s=[];while(!0){if(i(Au),t>=e.length)break;let n=i(xu);if(n.slice(-1)===",")n=Qe(r,n.substring(0,n.length-1)),s.push(n);else{let o="";n=Qe(r,n);let l=!1;while(!0){let a=e.charAt(t);if(a===""){s.push((n+o).trim());break}else if(!l){if(a===","){t+=1,s.push((n+o).trim());break}else if(a==="(")l=!0}else if(a===")")l=!1;o+=a,t+=1}}}return s.join(", ")}var Nn=new WeakMap;function Qe(r,e){if(!e||e.trim()==="")return e;return us(r,e)}function Tu(r){return Boolean(r.tagName==="svg"||r.ownerSVGElement)}function us(r,e){let t=Nn.get(r);if(!t)t=r.createElement("a"),Nn.set(r,t);if(!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function No(r,e,t,i){if(!i)return i;if(t==="src"||t==="href"&&!(e==="use"&&i[0]==="#"))return Qe(r,i);else if(t==="xlink:href"&&i[0]!=="#")return Qe(r,i);else if(t==="background"&&(e==="table"||e==="td"||e==="th"))return Qe(r,i);else if(t==="srcset")return Mu(r,i);else if(t==="style")return Ir(i,us(r));else if(e==="object"&&t==="data")return Qe(r,i);return i}function Ro(r,e,t){return(r==="video"||r==="audio")&&e==="autoplay"}function Nu(r,e,t){try{if(typeof e==="string"){if(r.classList.contains(e))return!0}else for(let i=r.classList.length;i--;){let s=r.classList[i];if(e.test(s))return!0}if(t)return r.matches(t)}catch(i){}return!1}function xr(r,e,t){if(!r)return!1;if(r.nodeType!==r.ELEMENT_NODE){if(!t)return!1;return xr(ie.parentNode(r),e,t)}for(let i=r.classList.length;i--;){let s=r.classList[i];if(e.test(s))return!0}if(!t)return!1;return xr(ie.parentNode(r),e,t)}function Oo(r,e,t,i){let s;if(xo(r)){if(s=r,!ie.childNodes(s).length)return!1}else if(ie.parentElement(r)===null)return!1;else s=ie.parentElement(r);try{if(typeof e==="string"){if(i){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(xr(s,e,i))return!0;if(t){if(i){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch(n){}return!1}function Ru(r,e,t){let i=r.contentWindow;if(!i)return;let s=!1,n;try{n=i.document.readyState}catch(l){return}if(n!=="complete"){let l=setTimeout(()=>{if(!s)e(),s=!0},t);r.addEventListener("load",()=>{clearTimeout(l),s=!0,e()});return}let o="about:blank";if(i.location.href!==o||r.src===o||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e)}function Ou(r,e,t){let i=!1,s;try{s=r.sheet}catch(o){return}if(s)return;let n=setTimeout(()=>{if(!i)e(),i=!0},t);r.addEventListener("load",()=>{clearTimeout(n),i=!0,e()})}function Du(r,e){let{doc:t,mirror:i,blockClass:s,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:f={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:h=!1}=e,b=_u(t,i);switch(r.nodeType){case r.DOCUMENT_NODE:if(r.compatMode!=="CSS1Compat")return{type:q.Document,childNodes:[],compatMode:r.compatMode};else return{type:q.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:b};case r.ELEMENT_NODE:return Lu(r,{doc:t,blockClass:s,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:f,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:b});case r.TEXT_NODE:return ku(r,{doc:t,needsMask:o,maskTextFn:u,rootId:b,cssCaptured:h});case r.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:b};case r.COMMENT_NODE:return{type:q.Comment,textContent:ie.textContent(r)||"",rootId:b};default:return!1}}function _u(r,e){if(!e.hasNode(r))return;let t=e.getId(r);return t===1?void 0:t}function ku(r,e){let{needsMask:t,maskTextFn:i,rootId:s,cssCaptured:n}=e,o=ie.parentNode(r),l=o&&o.tagName,a="",u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;if(c)a="SCRIPT_PLACEHOLDER";else if(!n){if(a=ie.textContent(r),u&&a)a=Ir(a,us(e.doc))}if(!u&&!c&&a&&t)a=i?i(a,ie.parentElement(r)):a.replace(/[\S]/g,"*");return{type:q.Text,textContent:a||"",rootId:s}}function Lu(r,e){let{doc:t,blockClass:i,blockSelector:s,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:f,newlyAddedElement:p=!1,rootId:d}=e,g=Nu(r,i,s),m=Iu(r),h={},b=r.attributes.length;for(let y=0;y<b;y++){let C=r.attributes[y];if(!Ro(m,C.name,C.value))h[C.name]=No(t,m,Be(C.name),C.value)}if(m==="link"&&n){let y=Array.from(t.styleSheets).find((I)=>I.href===r.href),C=null;if(y)C=Ii(y);if(C)delete h.rel,delete h.href,h._cssText=C}if(m==="style"&&r.sheet){let y=Ii(r.sheet);if(y){if(r.childNodes.length>1)y=Su(y,r);h._cssText=y}}if(m==="input"||m==="textarea"||m==="select"){let{value:y,checked:C}=r;if(h.type!=="radio"&&h.type!=="checkbox"&&h.type!=="submit"&&h.type!=="button"&&y)h.value=as({element:r,type:ls(r),tagName:m,value:y,maskInputOptions:o,maskInputFn:l});else if(C)h.checked=C}if(m==="option")if(r.selected&&!o.select)h.selected=!0;else delete h.selected;if(m==="dialog"&&r.open)h.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal";if(m==="canvas"&&c){if(r.__context==="2d"){if(!pu(r))h.rr_dataURL=r.toDataURL(a.type,a.quality)}else if(!("__context"in r)){let y=r.toDataURL(a.type,a.quality),C=t.createElement("canvas");C.width=r.width,C.height=r.height;let I=C.toDataURL(a.type,a.quality);if(y!==I)h.rr_dataURL=y}}if(m==="img"&&u){if(!Xe)Xe=t.createElement("canvas"),Tn=Xe.getContext("2d");let y=r,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",I=y.crossOrigin,E=()=>{y.removeEventListener("load",E);try{Xe.width=y.naturalWidth,Xe.height=y.naturalHeight,Tn.drawImage(y,0,0),h.rr_dataURL=Xe.toDataURL(a.type,a.quality)}catch(x){if(y.crossOrigin!=="anonymous"){if(y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0)E();else y.addEventListener("load",E);return}else console.warn(`Cannot inline img src=${C}! Error: ${x}`)}if(y.crossOrigin==="anonymous")I?h.crossOrigin=I:y.removeAttribute("crossorigin")};if(y.complete&&y.naturalWidth!==0)E();else y.addEventListener("load",E)}if(m==="audio"||m==="video"){let y=h;y.rr_mediaState=r.paused?"paused":"played",y.rr_mediaCurrentTime=r.currentTime,y.rr_mediaPlaybackRate=r.playbackRate,y.rr_mediaMuted=r.muted,y.rr_mediaLoop=r.loop,y.rr_mediaVolume=r.volume}if(!p){if(r.scrollLeft)h.rr_scrollLeft=r.scrollLeft;if(r.scrollTop)h.rr_scrollTop=r.scrollTop}if(g){let{width:y,height:C}=r.getBoundingClientRect();h={class:h.class,rr_width:`${y}px`,rr_height:`${C}px`}}if(m==="iframe"&&!f(h.src)){if(!r.contentDocument)h.rr_src=h.src;delete h.src}let w;try{if(customElements.get(m))w=!0}catch(y){}return{type:q.Element,tagName:m,attributes:h,childNodes:[],isSVG:Tu(r)||void 0,needBlock:g,rootId:d,isCustom:w}}function z(r){if(r===void 0||r===null)return"";else return r.toLowerCase()}function Pu(r,e){if(e.comment&&r.type===q.Comment)return!0;else if(r.type===q.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"||r.attributes.rel==="modulepreload")&&r.attributes.as==="script"||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href==="string"&&Mo(r.attributes.href)==="js"))return!0;else if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(z(r.attributes.name).match(/^msapplication-tile(image|color)$/)||z(r.attributes.name)==="application-name"||z(r.attributes.rel)==="icon"||z(r.attributes.rel)==="apple-touch-icon"||z(r.attributes.rel)==="shortcut icon")))return!0;else if(r.tagName==="meta"){if(e.headMetaDescKeywords&&z(r.attributes.name).match(/^description|keywords$/))return!0;else if(e.headMetaSocial&&(z(r.attributes.property).match(/^(og|twitter|fb):/)||z(r.attributes.name).match(/^(og|twitter):/)||z(r.attributes.name)==="pinterest"))return!0;else if(e.headMetaRobots&&(z(r.attributes.name)==="robots"||z(r.attributes.name)==="googlebot"||z(r.attributes.name)==="bingbot"))return!0;else if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return!0;else if(e.headMetaAuthorship&&(z(r.attributes.name)==="author"||z(r.attributes.name)==="generator"||z(r.attributes.name)==="framework"||z(r.attributes.name)==="publisher"||z(r.attributes.name)==="progid"||z(r.attributes.property).match(/^article:/)||z(r.attributes.property).match(/^product:/)))return!0;else if(e.headMetaVerification&&(z(r.attributes.name)==="google-site-verification"||z(r.attributes.name)==="yandex-verification"||z(r.attributes.name)==="csrf-token"||z(r.attributes.name)==="p:domain_verify"||z(r.attributes.name)==="verify-v1"||z(r.attributes.name)==="verification"||z(r.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function et(r,e){let{doc:t,mirror:i,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:f,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:h=!1,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y=5000,onStylesheetLoad:C,stylesheetLoadTimeout:I=5000,keepIframeSrcFn:E=()=>!1,newlyAddedElement:x=!1,cssCaptured:S=!1}=e,{needsMask:_}=e,{preserveWhiteSpace:k=!0}=e;if(!_)_=Oo(r,o,l,_===void 0);let Q=Du(r,{doc:t,mirror:i,blockClass:s,blockSelector:n,needsMask:_,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:h,keepIframeSrcFn:E,newlyAddedElement:x,cssCaptured:S});if(!Q)return console.warn(r,"not serialized"),null;let H;if(i.hasNode(r))H=i.getId(r);else if(Pu(Q,d)||!k&&Q.type===q.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length)H=Ct;else H=To();let A=Object.assign(Q,{id:H});if(i.add(r,A),H===Ct)return null;if(b)b(r);let ee=!a;if(A.type===q.Element){ee=ee&&!A.needBlock,delete A.needBlock;let L=ie.shadowRoot(r);if(L&&bt(L))A.isShadowHost=!0}if((A.type===q.Document||A.type===q.Element)&&ee){if(d.headWhitespace&&A.type===q.Element&&A.tagName==="head")k=!1;let L={doc:t,mirror:i,blockClass:s,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:h,preserveWhiteSpace:k,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:E,cssCaptured:!1};if(A.type===q.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0);else{if(A.type===q.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText==="string")L.cssCaptured=!0;for(let K of Array.from(ie.childNodes(r))){let J=et(K,L);if(J)A.childNodes.push(J)}}let P=null;if(xo(r)&&(P=ie.shadowRoot(r)))for(let K of Array.from(ie.childNodes(P))){let J=et(K,L);if(J)bt(P)&&(J.isShadow=!0),A.childNodes.push(J)}}let te=ie.parentNode(r);if(te&&wt(te)&&bt(te))A.isShadow=!0;if(A.type===q.Element&&A.tagName==="iframe")Ru(r,()=>{let L=r.contentDocument;if(L&&w){let P=et(L,{doc:L,mirror:i,blockClass:s,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:h,preserveWhiteSpace:k,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:E});if(P)w(r,P)}},y);if(A.type===q.Element&&A.tagName==="link"&&typeof A.attributes.rel==="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href==="string"&&Mo(A.attributes.href)==="css"))Ou(r,()=>{if(C){let L=et(r,{doc:t,mirror:i,blockClass:s,blockSelector:n,needsMask:_,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:f,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:h,preserveWhiteSpace:k,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:E});if(L)C(r,L)}},I);return A}function $u(r,e){let{mirror:t=new os,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:h,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I=()=>!1}=e||{};return et(r,{doc:r,mirror:t,blockClass:i,blockSelector:s,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:f,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:m,onSerialize:h,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}var Fu=/(max|min)-device-(width|height)/,Wp=new RegExp(Fu.source,"g");function Uu(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Bu(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){if(this instanceof i)return Reflect.construct(e,arguments,this.constructor);return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),t}var cs={exports:{}},V=String,Do=function(){return{isColorSupported:!1,reset:V,bold:V,dim:V,italic:V,underline:V,inverse:V,hidden:V,strikethrough:V,black:V,red:V,green:V,yellow:V,blue:V,magenta:V,cyan:V,white:V,gray:V,bgBlack:V,bgRed:V,bgGreen:V,bgYellow:V,bgBlue:V,bgMagenta:V,bgCyan:V,bgWhite:V}};cs.exports=Do();cs.exports.createColors=Do;var Wu=cs.exports,zu={},Vu=Object.freeze(Object.defineProperty({__proto__:null,default:zu},Symbol.toStringTag,{value:"Module"})),ve=Bu(Vu),Rn=Wu,On=ve,xi=class r extends Error{constructor(e,t,i,s,n,o){super(e);if(this.name="CssSyntaxError",this.reason=e,n)this.file=n;if(s)this.source=s;if(o)this.plugin=o;if(typeof t<"u"&&typeof i<"u")if(typeof t==="number")this.line=t,this.column=i;else this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,r)}setMessage(){if(this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u")this.message+=":"+this.line+":"+this.column;this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;if(e==null)e=Rn.isColorSupported;if(On){if(e)t=On(t)}let i=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,i.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:f}=Rn.createColors(!0);l=(p)=>u(f(p)),a=(p)=>c(p)}else l=a=(u)=>u;return i.slice(s,n).map((u,c)=>{let f=s+1+c,p=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
2
- `+d+l("^")}return" "+a(p)+u}).join(`
1
+ (()=>{var Ze="/api/_temps",oi="session-replay",fn="X-Temps-Analytics-Key",dn="temps_key",pn=["/login","/log-in","/signin","/sign-in","/logout","/log-out","/signup","/sign-up","/register","/checkout*","/payment*","/billing*","/reset-password*","/forgot-password*","/mfa*","/2fa*","/verify*"];var qe=!1;function mn(){let t=!qe;qe=!0,ci();try{if(typeof localStorage<"u")localStorage.removeItem("temps_identified")}catch{}if(!t)return;for(let e of Array.from(ai))try{e()}catch(r){console.error("[temps] cookieless switch listener failed:",r)}}function ci(){try{if(typeof localStorage<"u")localStorage.removeItem("temps_visitor_id"),localStorage.removeItem("temps_session_id"),localStorage.removeItem("temps_session_last_seen")}catch{}}function gn(){if(qe)return;try{if(typeof localStorage>"u")return;return localStorage.getItem("temps_visitor_id")??void 0}catch{return}}var ai=new Set;function yn(t){return ai.add(t),()=>{ai.delete(t)}}var li=new Set,vn=!1;function wn(){return vn}function bn(t){return li.add(t),()=>{li.delete(t)}}function Xt(t){vn=t==="started";for(let e of Array.from(li))try{e(t)}catch(r){console.error("[temps] identity reset listener failed:",r)}}function Ae(){return qe}var wc=1800000;function Sn(t){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();return`${t}_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function Qe(){if(qe)return;try{if(typeof localStorage>"u")return;let t=localStorage.getItem("temps_visitor_id");if(!t)t=Sn("visitor"),localStorage.setItem("temps_visitor_id",t);return t}catch{return}}function Cn(){if(qe)return;try{if(typeof localStorage>"u")return;let t=Date.now(),e=Number(localStorage.getItem("temps_session_last_seen")),r=localStorage.getItem("temps_session_id");if(!r||!Number.isFinite(e)||t-e>wc)r=Sn("session"),localStorage.setItem("temps_session_id",r);return localStorage.setItem("temps_session_last_seen",String(t)),r}catch{return}}function bc(){if(typeof document>"u")return;let t=document.querySelector('meta[name="temps-metadata"]');if(t)try{let e=t.getAttribute("content")||"{}";return JSON.parse(e).request_id}catch(e){console.error("Failed to parse metadata:",e)}return}function En(){try{let t=window.location.hostname,e=window.location.protocol==="file:",r=/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(t);return e||r}catch{return!1}}function In(){if(typeof window>"u")return!1;let t=window,e=Boolean(t._phantom),r=Boolean(t.__nightmare),i=Boolean(window.navigator?.webdriver),s=Boolean(t.Cypress),n=Boolean(t.__temps);return(e||r||i||s)&&!n}function xn(t){return{...t,request_id:bc(),visitorId:Qe(),sessionId:Cn()}}function We(t){return t?{[fn]:t}:{}}function ui(t,e){if(!e)return t;let r=t.includes("?")?"&":"?";return`${t}${r}${dn}=${encodeURIComponent(e)}`}function hi(t,e){return new Blob([t],{type:e?"text/plain":"application/json"})}async function Ve(t,e,r="POST",i,s){try{await fetch(`${i}/${t}`,{method:r,headers:{"Content-Type":"application/json",...We(s)},body:JSON.stringify(xn(e))})}catch(n){console.error("Failed to send analytics:",n)}}function ze(t,e,r,i){try{let s=ui(`${r}/${t}`,i),n=JSON.stringify(xn(e));if(typeof navigator<"u"&&navigator.sendBeacon&&typeof navigator.sendBeacon==="function")try{if(navigator.sendBeacon(s,hi(n,i)))return!0}catch{}return fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch((o)=>{console.error("Failed to send analytics (reliable):",o)}),!0}catch(s){return console.error("Failed to send analytics (reliable):",s),!1}}class fi{constructor(t={}){this.engagementTime=0,this.lastEngagementStart=null,this.heartbeatCount=0,this.isActive=!0,this.heartbeatTimer=null,this.inactivityTimer=null,this.hasTrackedLeave=!1,this.handleVisibilityChange=()=>{let e=this.isVisible;if(this.isVisible=document.visibilityState==="visible",!e&&this.isVisible)this.startHeartbeat();else if(e&&!this.isVisible)this.pauseEngagement()},this.handleFocus=()=>{this.isFocused=!0},this.handleBlur=()=>{this.isFocused=!1,this.pauseEngagement()},this.handleUserActivity=()=>{if(!this.isVisible||!this.isFocused)return;let e=Date.now();if(!this.isActive)this.isActive=!0,this.lastEngagementStart=e,this.startHeartbeat();this.lastActivityTime=e,this.resetInactivityTimer()},this.handlePageLeave=()=>{if(this.hasTrackedLeave)return;this.hasTrackedLeave=!0,this.updateEngagementTime();let e=this.getEngagementData();if(this.onPageLeave)this.onPageLeave(e);ze("event",{event_name:"page_leave",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,language:navigator.language,event_data:{engagement_time_seconds:e.engagement_time_seconds,total_time_seconds:e.total_time_seconds,heartbeat_count:this.heartbeatCount,was_engaged:e.is_engaged,url:window.location.href,referrer:document.referrer}},this.basePath,this.ingestKey)},this.handleNavigation=()=>{this.handlePageLeave(),this.reset()},this.basePath=t.basePath||Ze,this.ingestKey=t.ingestKey,this.domain=t.domain||window.location.hostname,this.heartbeatInterval=t.heartbeatInterval||30000,this.inactivityTimeout=t.inactivityTimeout||30000,this.engagementThreshold=t.engagementThreshold||1e4,this.onHeartbeat=t.onHeartbeat,this.onPageLeave=t.onPageLeave,this.startTime=Date.now(),this.lastActivityTime=Date.now(),this.isVisible=document.visibilityState==="visible",this.isFocused=document.hasFocus(),this.lastEngagementStart=null,this.isActive=!1,this.originalPushState=window.history.pushState.bind(window.history),this.setupEventListeners(),this.startHeartbeat()}setupEventListeners(){document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur),["mousedown","keypress","scroll","touchstart","click"].forEach((r)=>{document.addEventListener(r,this.handleUserActivity,{passive:!0})}),window.addEventListener("pagehide",this.handlePageLeave),window.addEventListener("beforeunload",this.handlePageLeave);let e=this.originalPushState;window.history.pushState=(...r)=>{this.handlePageLeave(),e(...r),this.reset()},window.addEventListener("popstate",this.handleNavigation)}pauseEngagement(){if(this.updateEngagementTime(),this.lastEngagementStart=null,!this.isVisible)this.stopHeartbeat()}resetInactivityTimer(){if(this.inactivityTimer)clearTimeout(this.inactivityTimer);this.inactivityTimer=setTimeout(()=>{if(this.isVisible)this.updateEngagementTime(),this.isActive=!1,this.lastEngagementStart=null},this.inactivityTimeout)}updateEngagementTime(){if(this.lastEngagementStart!==null){let t=Date.now()-this.lastEngagementStart;this.engagementTime+=t}}startHeartbeat(){if(this.heartbeatTimer)return;this.heartbeatTimer=setInterval(()=>{if(this.isVisible&&this.isActive)this.sendHeartbeat()},this.heartbeatInterval)}stopHeartbeat(){if(this.heartbeatTimer)clearInterval(this.heartbeatTimer),this.heartbeatTimer=null}async sendHeartbeat(){this.updateEngagementTime(),this.heartbeatCount++;let t=this.getEngagementData();if(this.onHeartbeat)this.onHeartbeat(t);if(await Ve("event",{event_name:"heartbeat",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,language:navigator.language,event_data:{engagement_time:Math.round(this.engagementTime),total_time:Math.round(Date.now()-this.startTime),is_engaged:t.is_engaged,is_visible:this.isVisible,time_since_last_activity:t.time_since_last_activity,heartbeat_count:this.heartbeatCount}},"POST",this.basePath,this.ingestKey),this.isActive&&this.isVisible)this.lastEngagementStart=Date.now()}getEngagementData(){let t=Date.now()-this.startTime,e=Date.now()-this.lastActivityTime;return{engagement_time_seconds:Math.round(this.engagementTime/1000),total_time_seconds:Math.round(t/1000),heartbeat_count:this.heartbeatCount,is_engaged:this.engagementTime>=this.engagementThreshold,is_visible:this.isVisible,time_since_last_activity:Math.round(e/1000)}}reset(){if(this.startTime=Date.now(),this.engagementTime=0,this.lastActivityTime=Date.now(),this.heartbeatCount=0,this.hasTrackedLeave=!1,this.isActive=!1,this.lastEngagementStart=null,this.isVisible)this.startHeartbeat()}destroy(){if(this.handlePageLeave(),this.stopHeartbeat(),this.inactivityTimer)clearTimeout(this.inactivityTimer);document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("focus",this.handleFocus),window.removeEventListener("blur",this.handleBlur),window.removeEventListener("pagehide",this.handlePageLeave),window.removeEventListener("beforeunload",this.handlePageLeave),window.removeEventListener("popstate",this.handleNavigation),window.history.pushState=this.originalPushState,["mousedown","keypress","scroll","touchstart","click"].forEach((e)=>{document.removeEventListener(e,this.handleUserActivity)})}}var mi,$e,vt,Ln,qt,Pn=-1,Ge=function(t){addEventListener("pageshow",function(e){e.persisted&&(Pn=e.timeStamp,t(e))},!0)},gi=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},er=function(){var t=gi();return t&&t.activationStart||0},ve=function(t,e){var r=gi(),i="navigate";return Pn>=0?i="back-forward-cache":r&&(document.prerendering||er()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1000000000000),navigationType:i}},tt=function(t,e,r){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var i=new PerformanceObserver(function(s){Promise.resolve().then(function(){e(s.getEntries())})});return i.observe(Object.assign({type:t,buffered:!0},r||{})),i}}catch(s){}},we=function(t,e,r,i){var s,n;return function(o){e.value>=0&&(o||i)&&((n=e.value-(s||0))||s===void 0)&&(s=e.value,e.delta=n,e.rating=function(l,a){return l>a[1]?"poor":l>a[0]?"needs-improvement":"good"}(e.value,r),t(e))}},yi=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},wt=function(t){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&t()})},tr=function(t){var e=!1;return function(){e||(t(),e=!0)}},et=-1,Tn=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Qt=function(t){document.visibilityState==="hidden"&&et>-1&&(et=t.type==="visibilitychange"?t.timeStamp:0,Sc())},An=function(){addEventListener("visibilitychange",Qt,!0),addEventListener("prerenderingchange",Qt,!0)},Sc=function(){removeEventListener("visibilitychange",Qt,!0),removeEventListener("prerenderingchange",Qt,!0)},vi=function(){return et<0&&(et=Tn(),An(),Ge(function(){setTimeout(function(){et=Tn(),An()},0)})),{get firstHiddenTime(){return et}}},bt=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},Mn=[1800,3000],wi=function(t,e){e=e||{},bt(function(){var r,i=vi(),s=ve("FCP"),n=tt("paint",function(o){o.forEach(function(l){l.name==="first-contentful-paint"&&(n.disconnect(),l.startTime<i.firstHiddenTime&&(s.value=Math.max(l.startTime-er(),0),s.entries.push(l),r(!0)))})});n&&(r=we(t,s,Mn,e.reportAllChanges),Ge(function(o){s=ve("FCP"),r=we(t,s,Mn,e.reportAllChanges),yi(function(){s.value=performance.now()-o.timeStamp,r(!0)})}))})},Nn=[0.1,0.25],$n=function(t,e){e=e||{},wi(tr(function(){var r,i=ve("CLS",0),s=0,n=[],o=function(a){a.forEach(function(c){if(!c.hadRecentInput){var u=n[0],h=n[n.length-1];s&&c.startTime-h.startTime<1000&&c.startTime-u.startTime<5000?(s+=c.value,n.push(c)):(s=c.value,n=[c])}}),s>i.value&&(i.value=s,i.entries=n,r())},l=tt("layout-shift",o);l&&(r=we(t,i,Nn,e.reportAllChanges),wt(function(){o(l.takeRecords()),r(!0)}),Ge(function(){s=0,i=ve("CLS",0),r=we(t,i,Nn,e.reportAllChanges),yi(function(){return r()})}),setTimeout(r,0))}))},Fn=0,di=1/0,Jt=0,Cc=function(t){t.forEach(function(e){e.interactionId&&(di=Math.min(di,e.interactionId),Jt=Math.max(Jt,e.interactionId),Fn=Jt?(Jt-di)/7+1:0)})},Un=function(){return mi?Fn:performance.interactionCount||0},Ec=function(){"interactionCount"in performance||mi||(mi=tt("event",Cc,{type:"event",buffered:!0,durationThreshold:0}))},Me=[],Zt=new Map,Bn=0,Ic=function(){var t=Math.min(Me.length-1,Math.floor((Un()-Bn)/50));return Me[t]},xc=[],Tc=function(t){if(xc.forEach(function(s){return s(t)}),t.interactionId||t.entryType==="first-input"){var e=Me[Me.length-1],r=Zt.get(t.interactionId);if(r||Me.length<10||t.duration>e.latency){if(r)t.duration>r.latency?(r.entries=[t],r.latency=t.duration):t.duration===r.latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t);else{var i={id:t.interactionId,latency:t.duration,entries:[t]};Zt.set(i.id,i),Me.push(i)}Me.sort(function(s,n){return n.latency-s.latency}),Me.length>10&&Me.splice(10).forEach(function(s){return Zt.delete(s.id)})}}},Wn=function(t){var e=self.requestIdleCallback||self.setTimeout,r=-1;return t=tr(t),document.visibilityState==="hidden"?t():(r=e(t),wt(t)),r},Rn=[200,500],Vn=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},bt(function(){var r;Ec();var i,s=ve("INP"),n=function(l){Wn(function(){l.forEach(Tc);var a=Ic();a&&a.latency!==s.value&&(s.value=a.latency,s.entries=a.entries,i())})},o=tt("event",n,{durationThreshold:(r=e.durationThreshold)!==null&&r!==void 0?r:40});i=we(t,s,Rn,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),wt(function(){n(o.takeRecords()),i(!0)}),Ge(function(){Bn=Un(),Me.length=0,Zt.clear(),s=ve("INP"),i=we(t,s,Rn,e.reportAllChanges)}))}))},On=[2500,4000],pi={},zn=function(t,e){e=e||{},bt(function(){var r,i=vi(),s=ve("LCP"),n=function(a){e.reportAllChanges||(a=a.slice(-1)),a.forEach(function(c){c.startTime<i.firstHiddenTime&&(s.value=Math.max(c.startTime-er(),0),s.entries=[c],r())})},o=tt("largest-contentful-paint",n);if(o){r=we(t,s,On,e.reportAllChanges);var l=tr(function(){pi[s.id]||(n(o.takeRecords()),o.disconnect(),pi[s.id]=!0,r(!0))});["keydown","click"].forEach(function(a){addEventListener(a,function(){return Wn(l)},{once:!0,capture:!0})}),wt(l),Ge(function(a){s=ve("LCP"),r=we(t,s,On,e.reportAllChanges),yi(function(){s.value=performance.now()-a.timeStamp,pi[s.id]=!0,r(!0)})})}})},_n=[800,1800],Ac=function t(e){document.prerendering?bt(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},Gn=function(t,e){e=e||{};var r=ve("TTFB"),i=we(t,r,_n,e.reportAllChanges);Ac(function(){var s=gi();s&&(r.value=Math.max(s.responseStart-er(),0),r.entries=[s],i(!0),Ge(function(){r=ve("TTFB",0),(i=we(t,r,_n,e.reportAllChanges))(!0)}))})},yt={passive:!0,capture:!0},Mc=new Date,Dn=function(t,e){$e||($e=e,vt=t,Ln=new Date,Yn(removeEventListener),Hn())},Hn=function(){if(vt>=0&&vt<Ln-Mc){var t={entryType:"first-input",name:$e.type,target:$e.target,cancelable:$e.cancelable,startTime:$e.timeStamp,processingStart:$e.timeStamp+vt};qt.forEach(function(e){e(t)}),qt=[]}},Nc=function(t){if(t.cancelable){var e=(t.timeStamp>1000000000000?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(r,i){var s=function(){Dn(r,i),o()},n=function(){o()},o=function(){removeEventListener("pointerup",s,yt),removeEventListener("pointercancel",n,yt)};addEventListener("pointerup",s,yt),addEventListener("pointercancel",n,yt)}(e,t):Dn(e,t)}},Yn=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Nc,yt)})},kn=[100,300],jn=function(t,e){e=e||{},bt(function(){var r,i=vi(),s=ve("FID"),n=function(a){a.startTime<i.firstHiddenTime&&(s.value=a.processingStart-a.startTime,s.entries.push(a),r(!0))},o=function(a){a.forEach(n)},l=tt("first-input",o);r=we(t,s,kn,e.reportAllChanges),l&&(wt(tr(function(){o(l.takeRecords()),l.disconnect()})),Ge(function(){var a;s=ve("FID"),r=we(t,s,kn,e.reportAllChanges),qt=[],vt=-1,$e=null,Yn(addEventListener),a=n,qt.push(a),Hn()}))})};class bi{constructor(t){if(this.pathname="",this.query="",this.referrer="",this.loadMetrics={},this.loadSent=!1,this.sentLoadMetrics=new Set,this.stopped=!1,this.handleVisibilityChange=()=>{if(document.visibilityState==="hidden")this.flushLoad()},this.handlePageHide=()=>{this.flushLoad()},this.basePath=t.basePath,this.ingestKey=t.ingestKey,typeof window>"u")return;this.pathname=window.location.pathname,this.query=window.location.search,this.referrer=typeof document<"u"?document.referrer:"",this.start()}start(){Gn((t)=>this.recordLoad("ttfb",t.value)),wi((t)=>this.recordLoad("fcp",t.value)),zn((t)=>this.recordLoad("lcp",t.value)),jn((t)=>this.recordFid(t.value)),$n((t)=>this.sendLate("cls",t.value)),Vn((t)=>this.sendLate("inp",t.value)),document.addEventListener("visibilitychange",this.handleVisibilityChange,!0),window.addEventListener("pagehide",this.handlePageHide,!0)}recordLoad(t,e){if(this.stopped||this.sentLoadMetrics.has(t))return;if(this.loadSent){this.sentLoadMetrics.add(t),this.send({[t]:e});return}this.loadMetrics[t]=e;let{ttfb:r,fcp:i,lcp:s}=this.loadMetrics;if(r!==void 0&&i!==void 0&&s!==void 0)this.flushLoad()}recordFid(t){if(this.stopped||this.sentLoadMetrics.has("fid"))return;if(this.loadSent){this.sentLoadMetrics.add("fid"),this.send({fid:t});return}this.loadMetrics.fid=t}flushLoad(){if(this.stopped||this.loadSent)return;let{ttfb:t,fcp:e,lcp:r,fid:i}=this.loadMetrics;if(t===void 0&&e===void 0&&r===void 0&&i===void 0)return;this.loadSent=!0;for(let[s,n]of Object.entries(this.loadMetrics))if(n!==void 0)this.sentLoadMetrics.add(s);this.send({ttfb:t??null,lcp:r??null,fid:i??null,fcp:e??null})}sendLate(t,e){if(this.stopped)return;this.send({[t]:e})}send(t){let e={...t,pathname:this.pathname,query:this.query,referrer:this.referrer};if(typeof document<"u"&&document.visibilityState==="hidden"){ze("speed",e,this.basePath,this.ingestKey);return}Ve("speed",e,"POST",this.basePath,this.ingestKey)}destroy(){if(this.stopped=!0,this.loadMetrics={},typeof window>"u")return;document.removeEventListener("visibilitychange",this.handleVisibilityChange,!0),window.removeEventListener("pagehide",this.handlePageHide,!0)}}var Rc=Object.defineProperty,Oc=(t,e,r)=>(e in t)?Rc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(t,e,r)=>Oc(t,typeof e!=="symbol"?e+"":e,r),Kn,_c=Object.defineProperty,Dc=(t,e,r)=>(e in t)?_c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xn=(t,e,r)=>Dc(t,typeof e!=="symbol"?e+"":e,r),se=((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))(se||{}),Jn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rr={},kc=()=>!!globalThis.Zone;function ys(t){if(rr[t])return rr[t];let e=globalThis[t],r=e.prototype,i=t in Jn?Jn[t]:void 0,s=Boolean(i&&i.every((l)=>{var a,c;return Boolean((c=(a=Object.getOwnPropertyDescriptor(r,l))==null?void 0:a.get)==null?void 0:c.toString().includes("[native code]"))})),n=t in Zn?Zn[t]:void 0,o=Boolean(n&&n.every((l)=>{var a;return typeof r[l]==="function"&&((a=r[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!kc())return rr[t]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[t].prototype;if(document.body.removeChild(l),!c)return r;return rr[t]=c}catch{return r}}var Si={};function Ue(t,e,r){var i;let s=`${t}.${String(r)}`;if(Si[s])return Si[s].call(e);let n=ys(t),o=(i=Object.getOwnPropertyDescriptor(n,r))==null?void 0:i.get;if(!o)return e[r];return Si[s]=o,o.call(e)}var Ci={};function Xo(t,e,r){let i=`${t}.${String(r)}`;if(Ci[i])return Ci[i].bind(e);let n=ys(t)[r];if(typeof n!=="function")return e[r];return Ci[i]=n,n.bind(e)}function Lc(t){return Ue("Node",t,"childNodes")}function Pc(t){return Ue("Node",t,"parentNode")}function $c(t){return Ue("Node",t,"parentElement")}function Fc(t){return Ue("Node",t,"textContent")}function Uc(t,e){return Xo("Node",t,"contains")(e)}function Bc(t){return Xo("Node",t,"getRootNode")()}function Wc(t){if(!t||!("host"in t))return null;return Ue("ShadowRoot",t,"host")}function Vc(t){return t.styleSheets}function zc(t){if(!t||!("shadowRoot"in t))return null;return Ue("Element",t,"shadowRoot")}function Gc(t,e){return Ue("Element",t,"querySelector")(e)}function Hc(t,e){return Ue("Element",t,"querySelectorAll")(e)}function Yc(){return ys("MutationObserver").constructor}var ce={childNodes:Lc,parentNode:Pc,parentElement:$c,textContent:Fc,contains:Uc,getRootNode:Bc,host:Wc,styleSheets:Vc,shadowRoot:zc,querySelector:Gc,querySelectorAll:Hc,mutationObserver:Yc};function Jo(t){return t.nodeType===t.ELEMENT_NODE}function xt(t){let e=t&&"host"in t&&"mode"in t&&ce.host(t)||null;return Boolean(e&&"shadowRoot"in e&&ce.shadowRoot(e)===t)}function Tt(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function jc(t){if(t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;"))t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;");return t}function Kc(t){let{cssText:e}=t;if(e.split('"').length<3)return e;let r=["@import",`url(${JSON.stringify(t.href)})`];if(t.layerName==="")r.push("layer");else if(t.layerName)r.push(`layer(${t.layerName})`);if(t.supportsText)r.push(`supports(${t.supportsText})`);if(t.media.length)r.push(t.media.mediaText);return r.join(" ")+";"}function Pi(t){try{let e=t.rules||t.cssRules;if(!e)return null;let r=t.href;if(!r&&t.ownerNode&&t.ownerNode.ownerDocument)r=t.ownerNode.ownerDocument.location.href;let i=Array.from(e,(s)=>Zo(s,r)).join("");return jc(i)}catch(e){return null}}function Zo(t,e){if(Jc(t)){let r;try{r=Pi(t.styleSheet)||Kc(t)}catch(i){r=t.cssText}if(t.styleSheet.href)return Rr(r,t.styleSheet.href);return r}else{let r=t.cssText;if(Zc(t)&&t.selectorText.includes(":"))r=Xc(r);if(e)return Rr(r,e);return r}}function Xc(t){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function Jc(t){return"styleSheet"in t}function Zc(t){return"selectorText"in t}class vs{constructor(){Xn(this,"idNodeMap",new Map),Xn(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;return((e=this.getMeta(t))==null?void 0:e.id)??-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){let e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes)t.childNodes.forEach((r)=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){let r=e.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,e)}replace(t,e){let r=this.getNode(t);if(r){let i=this.nodeMetaMap.get(r);if(i)this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function qc(){return new vs}function ws({element:t,maskInputOptions:e,tagName:r,type:i,value:s,maskInputFn:n}){let o=s||"",l=i&&Ye(i);if(e[r.toLowerCase()]||l&&e[l])if(n)o=n(o,t);else o="*".repeat(o.length);return o}function Ye(t){return t.toLowerCase()}var qn="__rrweb_original__";function Qc(t){let e=t.getContext("2d");if(!e)return!0;let r=50;for(let i=0;i<t.width;i+=r)for(let s=0;s<t.height;s+=r){let n=e.getImageData,o=qn in n?n[qn]:n;if(new Uint32Array(o.call(e,i,s,Math.min(r,t.width-i),Math.min(r,t.height-s)).data.buffer).some((a)=>a!==0))return!1}return!0}function bs(t){let e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ye(e):null}function qo(t,e){let r;try{r=new URL(t,e??window.location.href)}catch(n){return null}let i=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(i);return(s==null?void 0:s[1])??null}function eu(t){let e="";if(t.indexOf("//")>-1)e=t.split("/").slice(0,3).join("/");else e=t.split("/")[0];return e=e.split("?")[0],e}var tu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ru=/^(?:[a-z+]+:)?\/\//i,iu=/^www\..*/i,su=/^(data:)([^,]*),(.*)/i;function Rr(t,e){return(t||"").replace(tu,(r,i,s,n,o,l)=>{let a=s||o||l,c=i||n||"";if(!a)return r;if(ru.test(a)||iu.test(a))return`url(${c}${a}${c})`;if(su.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${eu(e)+a}${c})`;let u=e.split("/"),h=a.split("/");u.pop();for(let p of h)if(p===".")continue;else if(p==="..")u.pop();else u.push(p);return`url(${c}${u.join("/")}${c})`})}function Ei(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function nu(t,e){let r=Array.from(e.childNodes),i=[];if(r.length>1&&t&&typeof t==="string"){let s=Ei(t);for(let n=1;n<r.length;n++)if(r[n].textContent&&typeof r[n].textContent==="string"){let o=Ei(r[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(s.split(a).length===2){let c=s.indexOf(a);for(let u=c;u<t.length;u++)if(Ei(t.substring(0,u)).length===c){i.push(t.substring(0,u)),t=t.substring(u);break}break}}}}return i.push(t),i}function ou(t,e){return nu(t,e).join("/* rr_split */")}var au=1,lu=new RegExp("[^a-z0-9-_:]"),Mt=-2;function Qo(){return au++}function cu(t){if(t instanceof HTMLFormElement)return"form";let e=Ye(t.tagName);if(lu.test(e))return"div";return e}var rt,Qn,uu=/^[^ \t\n\r\u000c]+/,hu=/^[, \t\n\r\u000c]+/;function fu(t,e){if(e.trim()==="")return e;let r=0;function i(n){let o,l=n.exec(e.substring(r));if(l)return o=l[0],r+=o.length,o;return""}let s=[];while(!0){if(i(hu),r>=e.length)break;let n=i(uu);if(n.slice(-1)===",")n=ot(t,n.substring(0,n.length-1)),s.push(n);else{let o="";n=ot(t,n);let l=!1;while(!0){let a=e.charAt(r);if(a===""){s.push((n+o).trim());break}else if(!l){if(a===","){r+=1,s.push((n+o).trim());break}else if(a==="(")l=!0}else if(a===")")l=!1;o+=a,r+=1}}}return s.join(", ")}var eo=new WeakMap;function ot(t,e){if(!e||e.trim()==="")return e;return Ss(t,e)}function du(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Ss(t,e){let r=eo.get(t);if(!r)r=t.createElement("a"),eo.set(t,r);if(!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function ea(t,e,r,i){if(!i)return i;if(r==="src"||r==="href"&&!(e==="use"&&i[0]==="#"))return ot(t,i);else if(r==="xlink:href"&&i[0]!=="#")return ot(t,i);else if(r==="background"&&(e==="table"||e==="td"||e==="th"))return ot(t,i);else if(r==="srcset")return fu(t,i);else if(r==="style")return Rr(i,Ss(t));else if(e==="object"&&r==="data")return ot(t,i);return i}function ta(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function pu(t,e,r){try{if(typeof e==="string"){if(t.classList.contains(e))return!0}else for(let i=t.classList.length;i--;){let s=t.classList[i];if(e.test(s))return!0}if(r)return t.matches(r)}catch(i){}return!1}function Or(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE){if(!r)return!1;return Or(ce.parentNode(t),e,r)}for(let i=t.classList.length;i--;){let s=t.classList[i];if(e.test(s))return!0}if(!r)return!1;return Or(ce.parentNode(t),e,r)}function ra(t,e,r,i){let s;if(Jo(t)){if(s=t,!ce.childNodes(s).length)return!1}else if(ce.parentElement(t)===null)return!1;else s=ce.parentElement(t);try{if(typeof e==="string"){if(i){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Or(s,e,i))return!0;if(r){if(i){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch(n){}return!1}function mu(t,e,r){let i=t.contentWindow;if(!i)return;let s=!1,n;try{n=i.document.readyState}catch(l){return}if(n!=="complete"){let l=setTimeout(()=>{if(!s)e(),s=!0},r);t.addEventListener("load",()=>{clearTimeout(l),s=!0,e()});return}let o="about:blank";if(i.location.href!==o||t.src===o||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function gu(t,e,r){let i=!1,s;try{s=t.sheet}catch(o){return}if(s)return;let n=setTimeout(()=>{if(!i)e(),i=!0},r);t.addEventListener("load",()=>{clearTimeout(n),i=!0,e()})}function yu(t,e){let{doc:r,mirror:i,blockClass:s,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,b=vu(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:if(t.compatMode!=="CSS1Compat")return{type:se.Document,childNodes:[],compatMode:t.compatMode};else return{type:se.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:se.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:b};case t.ELEMENT_NODE:return bu(t,{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:b});case t.TEXT_NODE:return wu(t,{doc:r,needsMask:o,maskTextFn:c,rootId:b,cssCaptured:f});case t.CDATA_SECTION_NODE:return{type:se.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:se.Comment,textContent:ce.textContent(t)||"",rootId:b};default:return!1}}function vu(t,e){if(!e.hasNode(t))return;let r=e.getId(t);return r===1?void 0:r}function wu(t,e){let{needsMask:r,maskTextFn:i,rootId:s,cssCaptured:n}=e,o=ce.parentNode(t),l=o&&o.tagName,a="",c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;if(u)a="SCRIPT_PLACEHOLDER";else if(!n){if(a=ce.textContent(t),c&&a)a=Rr(a,Ss(e.doc))}if(!c&&!u&&a&&r)a=i?i(a,ce.parentElement(t)):a.replace(/[\S]/g,"*");return{type:se.Text,textContent:a||"",rootId:s}}function bu(t,e){let{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=e,g=pu(t,i,s),m=cu(t),f={},b=t.attributes.length;for(let y=0;y<b;y++){let C=t.attributes[y];if(!ta(m,C.name,C.value))f[C.name]=ea(r,m,Ye(C.name),C.value)}if(m==="link"&&n){let y=Array.from(r.styleSheets).find((x)=>x.href===t.href),C=null;if(y)C=Pi(y);if(C)delete f.rel,delete f.href,f._cssText=C}if(m==="style"&&t.sheet){let y=Pi(t.sheet);if(y){if(t.childNodes.length>1)y=ou(y,t);f._cssText=y}}if(m==="input"||m==="textarea"||m==="select"){let{value:y,checked:C}=t;if(f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y)f.value=ws({element:t,type:bs(t),tagName:m,value:y,maskInputOptions:o,maskInputFn:l});else if(C)f.checked=C}if(m==="option")if(t.selected&&!o.select)f.selected=!0;else delete f.selected;if(m==="dialog"&&t.open)f.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal";if(m==="canvas"&&u){if(t.__context==="2d"){if(!Qc(t))f.rr_dataURL=t.toDataURL(a.type,a.quality)}else if(!("__context"in t)){let y=t.toDataURL(a.type,a.quality),C=r.createElement("canvas");C.width=t.width,C.height=t.height;let x=C.toDataURL(a.type,a.quality);if(y!==x)f.rr_dataURL=y}}if(m==="img"&&c){if(!rt)rt=r.createElement("canvas"),Qn=rt.getContext("2d");let y=t,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",x=y.crossOrigin,I=()=>{y.removeEventListener("load",I);try{rt.width=y.naturalWidth,rt.height=y.naturalHeight,Qn.drawImage(y,0,0),f.rr_dataURL=rt.toDataURL(a.type,a.quality)}catch(E){if(y.crossOrigin!=="anonymous"){if(y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0)I();else y.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}if(y.crossOrigin==="anonymous")x?f.crossOrigin=x:y.removeAttribute("crossorigin")};if(y.complete&&y.naturalWidth!==0)I();else y.addEventListener("load",I)}if(m==="audio"||m==="video"){let y=f;y.rr_mediaState=t.paused?"paused":"played",y.rr_mediaCurrentTime=t.currentTime,y.rr_mediaPlaybackRate=t.playbackRate,y.rr_mediaMuted=t.muted,y.rr_mediaLoop=t.loop,y.rr_mediaVolume=t.volume}if(!p){if(t.scrollLeft)f.rr_scrollLeft=t.scrollLeft;if(t.scrollTop)f.rr_scrollTop=t.scrollTop}if(g){let{width:y,height:C}=t.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}if(m==="iframe"&&!h(f.src)){if(!t.contentDocument)f.rr_src=f.src;delete f.src}let w;try{if(customElements.get(m))w=!0}catch(y){}return{type:se.Element,tagName:m,attributes:f,childNodes:[],isSVG:du(t)||void 0,needBlock:g,rootId:d,isCustom:w}}function H(t){if(t===void 0||t===null)return"";else return t.toLowerCase()}function Su(t,e){if(e.comment&&t.type===se.Comment)return!0;else if(t.type===se.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href==="string"&&qo(t.attributes.href)==="js"))return!0;else if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(H(t.attributes.name).match(/^msapplication-tile(image|color)$/)||H(t.attributes.name)==="application-name"||H(t.attributes.rel)==="icon"||H(t.attributes.rel)==="apple-touch-icon"||H(t.attributes.rel)==="shortcut icon")))return!0;else if(t.tagName==="meta"){if(e.headMetaDescKeywords&&H(t.attributes.name).match(/^description|keywords$/))return!0;else if(e.headMetaSocial&&(H(t.attributes.property).match(/^(og|twitter|fb):/)||H(t.attributes.name).match(/^(og|twitter):/)||H(t.attributes.name)==="pinterest"))return!0;else if(e.headMetaRobots&&(H(t.attributes.name)==="robots"||H(t.attributes.name)==="googlebot"||H(t.attributes.name)==="bingbot"))return!0;else if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;else if(e.headMetaAuthorship&&(H(t.attributes.name)==="author"||H(t.attributes.name)==="generator"||H(t.attributes.name)==="framework"||H(t.attributes.name)==="publisher"||H(t.attributes.name)==="progid"||H(t.attributes.property).match(/^article:/)||H(t.attributes.property).match(/^product:/)))return!0;else if(e.headMetaVerification&&(H(t.attributes.name)==="google-site-verification"||H(t.attributes.name)==="yandex-verification"||H(t.attributes.name)==="csrf-token"||H(t.attributes.name)==="p:domain_verify"||H(t.attributes.name)==="verify-v1"||H(t.attributes.name)==="verification"||H(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function at(t,e){let{doc:r,mirror:i,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y=5000,onStylesheetLoad:C,stylesheetLoadTimeout:x=5000,keepIframeSrcFn:I=()=>!1,newlyAddedElement:E=!1,cssCaptured:S=!1}=e,{needsMask:A}=e,{preserveWhiteSpace:M=!0}=e;if(!A)A=ra(t,o,l,A===void 0);let Q=yu(t,{doc:r,mirror:i,blockClass:s,blockSelector:n,needsMask:A,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:I,newlyAddedElement:E,cssCaptured:S});if(!Q)return console.warn(t,"not serialized"),null;let V;if(i.hasNode(t))V=i.getId(t);else if(Su(Q,d)||!M&&Q.type===se.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length)V=Mt;else V=Qo();let T=Object.assign(Q,{id:V});if(i.add(t,T),V===Mt)return null;if(b)b(t);let te=!a;if(T.type===se.Element){te=te&&!T.needBlock,delete T.needBlock;let F=ce.shadowRoot(t);if(F&&Tt(F))T.isShadowHost=!0}if((T.type===se.Document||T.type===se.Element)&&te){if(d.headWhitespace&&T.type===se.Element&&T.tagName==="head")M=!1;let F={doc:r,mirror:i,blockClass:s,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:M,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:I,cssCaptured:!1};if(T.type===se.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0);else{if(T.type===se.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText==="string")F.cssCaptured=!0;for(let ee of Array.from(ce.childNodes(t))){let G=at(ee,F);if(G)T.childNodes.push(G)}}let L=null;if(Jo(t)&&(L=ce.shadowRoot(t)))for(let ee of Array.from(ce.childNodes(L))){let G=at(ee,F);if(G)Tt(L)&&(G.isShadow=!0),T.childNodes.push(G)}}let re=ce.parentNode(t);if(re&&xt(re)&&Tt(re))T.isShadow=!0;if(T.type===se.Element&&T.tagName==="iframe")mu(t,()=>{let F=t.contentDocument;if(F&&w){let L=at(F,{doc:F,mirror:i,blockClass:s,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:M,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:I});if(L)w(t,L)}},y);if(T.type===se.Element&&T.tagName==="link"&&typeof T.attributes.rel==="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href==="string"&&qo(T.attributes.href)==="css"))gu(t,()=>{if(C){let F=at(t,{doc:r,mirror:i,blockClass:s,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:M,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:I});if(F)C(t,F)}},x);return T}function Cu(t,e){let{mirror:r=new vs,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1}=e||{};return at(t,{doc:t,mirror:r,blockClass:i,blockSelector:s,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:a,recordCanvas:c,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1})}var Eu=/(max|min)-device-(width|height)/,jm=new RegExp(Eu.source,"g");function Iu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xu(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function i(){if(this instanceof i)return Reflect.construct(e,arguments,this.constructor);return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}),r}var Cs={exports:{}},Y=String,ia=function(){return{isColorSupported:!1,reset:Y,bold:Y,dim:Y,italic:Y,underline:Y,inverse:Y,hidden:Y,strikethrough:Y,black:Y,red:Y,green:Y,yellow:Y,blue:Y,magenta:Y,cyan:Y,white:Y,gray:Y,bgBlack:Y,bgRed:Y,bgGreen:Y,bgYellow:Y,bgBlue:Y,bgMagenta:Y,bgCyan:Y,bgWhite:Y}};Cs.exports=ia();Cs.exports.createColors=ia;var Tu=Cs.exports,Au={},Mu=Object.freeze(Object.defineProperty({__proto__:null,default:Au},Symbol.toStringTag,{value:"Module"})),Ee=xu(Mu),to=Tu,ro=Ee,$i=class t extends Error{constructor(e,r,i,s,n,o){super(e);if(this.name="CssSyntaxError",this.reason=e,n)this.file=n;if(s)this.source=s;if(o)this.plugin=o;if(typeof r<"u"&&typeof i<"u")if(typeof r==="number")this.line=r,this.column=i;else this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,t)}setMessage(){if(this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u")this.message+=":"+this.line+":"+this.column;this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;if(e==null)e=to.isColorSupported;if(ro){if(e)r=ro(r)}let i=r.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,i.length),o=String(n).length,l,a;if(e){let{bold:c,gray:u,red:h}=to.createColors(!0);l=(p)=>c(h(p)),a=(p)=>u(p)}else l=a=(c)=>c;return i.slice(s,n).map((c,u)=>{let h=s+1+u,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let d=a(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+c+`
2
+ `+d+l("^")}return" "+a(p)+c}).join(`
3
3
  `)}toString(){let e=this.showSourceCode();if(e)e=`
4
4
 
5
5
  `+e+`
6
- `;return this.name+": "+this.message+e}},hs=xi;xi.default=xi;var Dt={};Dt.isClean=Symbol("isClean");Dt.my=Symbol("my");var Dn={after:`
6
+ `;return this.name+": "+this.message+e}},Es=$i;$i.default=$i;var Ft={};Ft.isClean=Symbol("isClean");Ft.my=Symbol("my");var io={after:`
7
7
  `,beforeClose:`
8
8
  `,beforeComment:`
9
9
  `,beforeDecl:`
10
10
  `,beforeOpen:" ",beforeRule:`
11
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Gu(r){return r[0].toUpperCase()+r.slice(1)}var Ai=class{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u")i+=e.raws.afterName;else if(s)i+=" ";if(e.nodes)this.block(e,i+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(i+s+n,e)}}beforeAfter(e,t){let i;if(e.type==="decl")i=this.raw(e,null,"beforeDecl");else if(e.type==="comment")i=this.raw(e,null,"beforeComment");else if(t==="before")i=this.raw(e,null,"beforeRule");else i=this.raw(e,null,"beforeClose");let s=e.parent,n=0;while(s&&s.type!=="root")n+=1,s=s.parent;if(i.includes(`
12
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)i+=o}return i}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let s;if(e.nodes&&e.nodes.length)this.body(e),s=this.raw(e,"after");else s=this.raw(e,"after","emptyBody");if(s)this.builder(s);this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;while(t>0){if(e.nodes[t].type!=="comment")break;t-=1}let i=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");if(o)this.builder(o);this.stringify(n,t!==s||i)}}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),s=e.prop+i+this.rawValue(e,"value");if(e.important)s+=e.raws.important||" !important";if(t)s+=";";this.builder(s,e)}document(e){this.body(e)}raw(e,t,i){let s;if(!i)i=t;if(t){if(s=e.raws[t],typeof s<"u")return s}let n=e.parent;if(i==="before"){if(!n||n.type==="root"&&n.first===e)return"";if(n&&n.type==="document")return""}if(!n)return Dn[i];let o=e.root();if(!o.rawCache)o.rawCache={};if(typeof o.rawCache[i]<"u")return o.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);else{let l="raw"+Gu(i);if(this[l])s=this[l](o,e);else o.walk((a)=>{if(s=a.raws[t],typeof s<"u")return!1})}if(typeof s>"u")s=Dn[i];return o.rawCache[i]=s,s}rawBeforeClose(e){let t;if(e.walk((i)=>{if(i.nodes&&i.nodes.length>0){if(typeof i.raws.after<"u"){if(t=i.raws.after,t.includes(`
13
- `))t=t.replace(/[^\n]+$/,"");return!1}}}),t)t=t.replace(/\S/g,"");return t}rawBeforeComment(e,t){let i;if(e.walkComments((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
14
- `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(t,null,"beforeDecl");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeDecl(e,t){let i;if(e.walkDecls((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
15
- `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(t,null,"beforeRule");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeOpen(e){let t;return e.walk((i)=>{if(i.type!=="decl"){if(t=i.raws.between,typeof t<"u")return!1}}),t}rawBeforeRule(e){let t;if(e.walk((i)=>{if(i.nodes&&(i.parent!==e||e.first!==i)){if(typeof i.raws.before<"u"){if(t=i.raws.before,t.includes(`
16
- `))t=t.replace(/[^\n]+$/,"");return!1}}}),t)t=t.replace(/\S/g,"");return t}rawColon(e){let t;return e.walkDecls((i)=>{if(typeof i.raws.between<"u")return t=i.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk((i)=>{if(i.nodes&&i.nodes.length===0){if(t=i.raws.after,typeof t<"u")return!1}}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((i)=>{let s=i.parent;if(s&&s!==e&&s.parent&&s.parent===e){if(typeof i.raws.before<"u"){let n=i.raws.before.split(`
17
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}}),t}rawSemicolon(e){let t;return e.walk((i)=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"){if(t=i.raws.semicolon,typeof t<"u")return!1}}),t}rawValue(e,t){let i=e[t],s=e.raws[t];if(s&&s.value===i)return s.raw;return i}root(e){if(this.body(e),e.raws.after)this.builder(e.raws.after)}rule(e){if(this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon)this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},_o=Ai;Ai.default=Ai;var Hu=_o;function Mi(r,e){new Hu(e).stringify(r)}var $r=Mi;Mi.default=Mi;var{isClean:Jt,my:ju}=Dt,Yu=hs,Zu=_o,Xu=$r;function Ti(r,e){let t=new r.constructor;for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;if(i==="proxyCache")continue;let s=r[i],n=typeof s;if(i==="parent"&&n==="object"){if(e)t[i]=e}else if(i==="source")t[i]=s;else if(Array.isArray(s))t[i]=s.map((o)=>Ti(o,t));else{if(n==="object"&&s!==null)s=Ti(s);t[i]=s}}return t}var Ni=class{constructor(e={}){this.raws={},this[Jt]=!1,this[ju]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let i of e[t])if(typeof i.clone==="function")this.append(i.clone());else this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){if(delete this.raws.before,delete this.raws.after,!e)delete this.raws.between}clone(e={}){let t=Ti(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:i.column,line:i.line},t)}return new Yu(e)}getProxyProcessor(){return{get(e,t){if(t==="proxyOf")return e;else if(t==="root")return()=>e.root().toProxy();else return e[t]},set(e,t,i){if(e[t]===i)return!0;if(e[t]=i,t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")e.markDirty();return!0}}}markDirty(){if(this[Jt]){this[Jt]=!1;let e=this;while(e=e.parent)e[Jt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);if(s!==-1)i=this.positionInside(s,t)}return i}positionInside(e,t){let i=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)if(i[o]===`
18
- `)s=1,n+=1;else s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);if(n!==-1)t=this.positionInside(n,s),i=this.positionInside(n+e.word.length,s)}else{if(e.start)t={column:e.start.column,line:e.start.line};else if(e.index)t=this.positionInside(e.index);if(e.end)i={column:e.end.column,line:e.end.line};else if(typeof e.endIndex==="number")i=this.positionInside(e.endIndex);else if(e.index)i=this.positionInside(e.index+1)}if(i.line<t.line||i.line===t.line&&i.column<=t.column)i={column:t.column+1,line:t.line};return{end:i,start:t}}raw(e,t){return new Zu().raw(this,e,t)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,i=!1;for(let s of e)if(s===this)i=!0;else if(i)this.parent.insertAfter(t,s),t=s;else this.parent.insertBefore(t,s);if(!i)this.remove()}return this}root(){let e=this;while(e.parent&&e.parent.type!=="document")e=e.parent;return e}toJSON(e,t){let i={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o))continue;if(o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))i[o]=l.map((a)=>{if(typeof a==="object"&&a.toJSON)return a.toJSON(null,t);else return a});else if(typeof l==="object"&&l.toJSON)i[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);if(a==null)a=n,t.set(l.input,n),n++;i[o]={end:l.end,inputId:a,start:l.start}}else i[o]=l}if(s)i.inputs=[...t.keys()].map((o)=>o.toJSON());return i}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(e=Xu){if(e.stringify)e=e.stringify;let t="";return e(this,(i)=>{t+=i}),t}warn(e,t,i){let s={node:this};for(let n in i)s[n]=i[n];return e.warn(t,s)}get proxyOf(){return this}},Fr=Ni;Ni.default=Ni;var Ku=Fr,Ri=class extends Ku{constructor(e){if(e&&typeof e.value<"u"&&typeof e.value!=="string")e={...e,value:String(e.value)};super(e);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Ur=Ri;Ri.default=Ri;var Ju="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",qu=(r,e=21)=>(t=e)=>{let i="",s=t;while(s--)i+=r[Math.random()*r.length|0];return i},Qu=(r=21)=>{let e="",t=r;while(t--)e+=Ju[Math.random()*64|0];return e},ec={nanoid:Qu,customAlphabet:qu},{SourceMapConsumer:_n,SourceMapGenerator:kn}=ve,{existsSync:tc,readFileSync:rc}=ve,{dirname:fi,join:ic}=ve;function sc(r){if(Buffer)return Buffer.from(r,"base64").toString();else return window.atob(r)}var Oi=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,s=this.loadMap(t.from,i);if(!this.mapFile&&t.from)this.mapFile=t.from;if(this.mapFile)this.root=fi(this.mapFile);if(s)this.text=s}consumer(){if(!this.consumerCache)this.consumerCache=new _n(this.text);return this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||i.test(e))return sc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){if(typeof e!=="object")return!1;return typeof e.mappings==="string"||typeof e._mappings==="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let i=e.lastIndexOf(t.pop()),s=e.indexOf("*/",i);if(i>-1&&s>-1)this.annotation=this.getAnnotationURL(e.substring(i,s))}loadFile(e){if(this.root=fi(e),tc(e))return this.mapFile=e,rc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t)if(typeof t==="string")return t;else if(typeof t==="function"){let i=t(e);if(i){let s=this.loadFile(i);if(!s)throw Error("Unable to load previous source map: "+i.toString());return s}}else if(t instanceof _n)return kn.fromSourceMap(t).toString();else if(t instanceof kn)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let i=this.annotation;if(e)i=ic(fi(e),i);return this.loadFile(i)}}startWith(e,t){if(!e)return!1;return e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},ko=Oi;Oi.default=Oi;var{SourceMapConsumer:nc,SourceMapGenerator:oc}=ve,{fileURLToPath:Ln,pathToFileURL:qt}=ve,{isAbsolute:Di,resolve:_i}=ve,{nanoid:ac}=ec,di=ve,Pn=hs,lc=ko,pi=Symbol("fromOffsetCache"),uc=Boolean(nc&&oc),$n=Boolean(_i&&Di),Ar=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e==="object"&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(t.from)if(!$n||/^\w+:\/\//.test(t.from)||Di(t.from))this.file=t.from;else this.file=_i(t.from);if($n&&uc){let i=new lc(this.css,t);if(i.text){this.map=i;let s=i.consumer().file;if(!this.file&&s)this.file=this.mapResolve(s)}}if(!this.file)this.id="<input css "+ac(6)+">";if(this.map)this.map.file=this.from}error(e,t,i,s={}){let n,o,l;if(t&&typeof t==="object"){let u=t,c=i;if(typeof u.offset==="number"){let f=this.fromOffset(u.offset);t=f.line,i=f.col}else t=u.line,i=u.column;if(typeof c.offset==="number"){let f=this.fromOffset(c.offset);o=f.line,l=f.col}else o=c.line,l=c.column}else if(!i){let u=this.fromOffset(t);t=u.line,i=u.col}let a=this.origin(t,i,o,l);if(a)n=new Pn(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin);else n=new Pn(e,o===void 0?t:{column:i,line:t},o===void 0?i:{column:l,line:o},this.css,this.file,s.plugin);if(n.input={column:i,endColumn:l,endLine:o,line:t,source:this.css},this.file){if(qt)n.input.url=qt(this.file).toString();n.input.file=this.file}return n}fromOffset(e){let t,i;if(!this[pi]){let n=this.css.split(`
19
- `);i=Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)i[l]=o,o+=n[l].length+1;this[pi]=i}else i=this[pi];t=i[i.length-1];let s=0;if(e>=t)s=i.length-1;else{let n=i.length-2,o;while(s<n)if(o=s+(n-s>>1),e<i[o])n=o-1;else if(e>=i[o+1])s=o+1;else{s=o;break}}return{col:e-i[s]+1,line:s+1}}mapResolve(e){if(/^\w+:\/\//.test(e))return e;return _i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;if(typeof i==="number")l=n.originalPositionFor({column:s,line:i});let a;if(Di(o.source))a=qt(o.source);else a=new URL(o.source,this.map.consumer().sourceRoot||qt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ln)u.file=Ln(a);else throw Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);if(c)u.source=c;return u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])if(this[t]!=null)e[t]=this[t];if(this.map){if(e.map={...this.map},e.map.consumerCache)e.map.consumerCache=void 0}return e}get from(){return this.file||this.id}},Br=Ar;Ar.default=Ar;if(di&&di.registerInput)di.registerInput(Ar);var{SourceMapConsumer:Lo,SourceMapGenerator:vr}=ve,{dirname:wr,relative:Po,resolve:$o,sep:Fo}=ve,{pathToFileURL:Fn}=ve,cc=Br,hc=Boolean(Lo&&vr),fc=Boolean(wr&&$o&&Po&&Fo),dc=class{constructor(e,t,i,s){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;if(this.isInline())e="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")e=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")e=this.mapOpts.annotation(this.opts.to,this.root);else e=this.outputFile()+".map";let t=`
11
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Nu(t){return t[0].toUpperCase()+t.slice(1)}var Fi=class{constructor(e){this.builder=e}atrule(e,r){let i="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u")i+=e.raws.afterName;else if(s)i+=" ";if(e.nodes)this.block(e,i+s);else{let n=(e.raws.between||"")+(r?";":"");this.builder(i+s+n,e)}}beforeAfter(e,r){let i;if(e.type==="decl")i=this.raw(e,null,"beforeDecl");else if(e.type==="comment")i=this.raw(e,null,"beforeComment");else if(r==="before")i=this.raw(e,null,"beforeRule");else i=this.raw(e,null,"beforeClose");let s=e.parent,n=0;while(s&&s.type!=="root")n+=1,s=s.parent;if(i.includes(`
12
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)i+=o}return i}block(e,r){let i=this.raw(e,"between","beforeOpen");this.builder(r+i+"{",e,"start");let s;if(e.nodes&&e.nodes.length)this.body(e),s=this.raw(e,"after");else s=this.raw(e,"after","emptyBody");if(s)this.builder(s);this.builder("}",e,"end")}body(e){let r=e.nodes.length-1;while(r>0){if(e.nodes[r].type!=="comment")break;r-=1}let i=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");if(o)this.builder(o);this.stringify(n,r!==s||i)}}comment(e){let r=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+i+"*/",e)}decl(e,r){let i=this.raw(e,"between","colon"),s=e.prop+i+this.rawValue(e,"value");if(e.important)s+=e.raws.important||" !important";if(r)s+=";";this.builder(s,e)}document(e){this.body(e)}raw(e,r,i){let s;if(!i)i=r;if(r){if(s=e.raws[r],typeof s<"u")return s}let n=e.parent;if(i==="before"){if(!n||n.type==="root"&&n.first===e)return"";if(n&&n.type==="document")return""}if(!n)return io[i];let o=e.root();if(!o.rawCache)o.rawCache={};if(typeof o.rawCache[i]<"u")return o.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);else{let l="raw"+Nu(i);if(this[l])s=this[l](o,e);else o.walk((a)=>{if(s=a.raws[r],typeof s<"u")return!1})}if(typeof s>"u")s=io[i];return o.rawCache[i]=s,s}rawBeforeClose(e){let r;if(e.walk((i)=>{if(i.nodes&&i.nodes.length>0){if(typeof i.raws.after<"u"){if(r=i.raws.after,r.includes(`
13
+ `))r=r.replace(/[^\n]+$/,"");return!1}}}),r)r=r.replace(/\S/g,"");return r}rawBeforeComment(e,r){let i;if(e.walkComments((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
14
+ `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(r,null,"beforeDecl");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeDecl(e,r){let i;if(e.walkDecls((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
15
+ `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(r,null,"beforeRule");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeOpen(e){let r;return e.walk((i)=>{if(i.type!=="decl"){if(r=i.raws.between,typeof r<"u")return!1}}),r}rawBeforeRule(e){let r;if(e.walk((i)=>{if(i.nodes&&(i.parent!==e||e.first!==i)){if(typeof i.raws.before<"u"){if(r=i.raws.before,r.includes(`
16
+ `))r=r.replace(/[^\n]+$/,"");return!1}}}),r)r=r.replace(/\S/g,"");return r}rawColon(e){let r;return e.walkDecls((i)=>{if(typeof i.raws.between<"u")return r=i.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk((i)=>{if(i.nodes&&i.nodes.length===0){if(r=i.raws.after,typeof r<"u")return!1}}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk((i)=>{let s=i.parent;if(s&&s!==e&&s.parent&&s.parent===e){if(typeof i.raws.before<"u"){let n=i.raws.before.split(`
17
+ `);return r=n[n.length-1],r=r.replace(/\S/g,""),!1}}}),r}rawSemicolon(e){let r;return e.walk((i)=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"){if(r=i.raws.semicolon,typeof r<"u")return!1}}),r}rawValue(e,r){let i=e[r],s=e.raws[r];if(s&&s.value===i)return s.raw;return i}root(e){if(this.body(e),e.raws.after)this.builder(e.raws.after)}rule(e){if(this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon)this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,r){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}},sa=Fi;Fi.default=Fi;var Ru=sa;function Ui(t,e){new Ru(e).stringify(t)}var zr=Ui;Ui.default=Ui;var{isClean:ir,my:Ou}=Ft,_u=Es,Du=sa,ku=zr;function Bi(t,e){let r=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;if(i==="proxyCache")continue;let s=t[i],n=typeof s;if(i==="parent"&&n==="object"){if(e)r[i]=e}else if(i==="source")r[i]=s;else if(Array.isArray(s))r[i]=s.map((o)=>Bi(o,r));else{if(n==="object"&&s!==null)s=Bi(s);r[i]=s}}return r}var Wi=class{constructor(e={}){this.raws={},this[ir]=!1,this[Ou]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let i of e[r])if(typeof i.clone==="function")this.append(i.clone());else this.append(i)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){if(delete this.raws.before,delete this.raws.after,!e)delete this.raws.between}clone(e={}){let r=Bi(this);for(let i in e)r[i]=e[i];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:i,start:s}=this.rangeBy(r);return this.source.input.error(e,{column:s.column,line:s.line},{column:i.column,line:i.line},r)}return new _u(e)}getProxyProcessor(){return{get(e,r){if(r==="proxyOf")return e;else if(r==="root")return()=>e.root().toProxy();else return e[r]},set(e,r,i){if(e[r]===i)return!0;if(e[r]=i,r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")e.markDirty();return!0}}}markDirty(){if(this[ir]){this[ir]=!1;let e=this;while(e=e.parent)e[ir]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,r){let i=this.source.start;if(e.index)i=this.positionInside(e.index,r);else if(e.word){r=this.toString();let s=r.indexOf(e.word);if(s!==-1)i=this.positionInside(s,r)}return i}positionInside(e,r){let i=r||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)if(i[o]===`
18
+ `)s=1,n+=1;else s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);if(n!==-1)r=this.positionInside(n,s),i=this.positionInside(n+e.word.length,s)}else{if(e.start)r={column:e.start.column,line:e.start.line};else if(e.index)r=this.positionInside(e.index);if(e.end)i={column:e.end.column,line:e.end.line};else if(typeof e.endIndex==="number")i=this.positionInside(e.endIndex);else if(e.index)i=this.positionInside(e.index+1)}if(i.line<r.line||i.line===r.line&&i.column<=r.column)i={column:r.column+1,line:r.line};return{end:i,start:r}}raw(e,r){return new Du().raw(this,e,r)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...e){if(this.parent){let r=this,i=!1;for(let s of e)if(s===this)i=!0;else if(i)this.parent.insertAfter(r,s),r=s;else this.parent.insertBefore(r,s);if(!i)this.remove()}return this}root(){let e=this;while(e.parent&&e.parent.type!=="document")e=e.parent;return e}toJSON(e,r){let i={},s=r==null;r=r||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o))continue;if(o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))i[o]=l.map((a)=>{if(typeof a==="object"&&a.toJSON)return a.toJSON(null,r);else return a});else if(typeof l==="object"&&l.toJSON)i[o]=l.toJSON(null,r);else if(o==="source"){let a=r.get(l.input);if(a==null)a=n,r.set(l.input,n),n++;i[o]={end:l.end,inputId:a,start:l.start}}else i[o]=l}if(s)i.inputs=[...r.keys()].map((o)=>o.toJSON());return i}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(e=ku){if(e.stringify)e=e.stringify;let r="";return e(this,(i)=>{r+=i}),r}warn(e,r,i){let s={node:this};for(let n in i)s[n]=i[n];return e.warn(r,s)}get proxyOf(){return this}},Gr=Wi;Wi.default=Wi;var Lu=Gr,Vi=class extends Lu{constructor(e){if(e&&typeof e.value<"u"&&typeof e.value!=="string")e={...e,value:String(e.value)};super(e);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Hr=Vi;Vi.default=Vi;var Pu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$u=(t,e=21)=>(r=e)=>{let i="",s=r;while(s--)i+=t[Math.random()*t.length|0];return i},Fu=(t=21)=>{let e="",r=t;while(r--)e+=Pu[Math.random()*64|0];return e},Uu={nanoid:Fu,customAlphabet:$u},{SourceMapConsumer:so,SourceMapGenerator:no}=Ee,{existsSync:Bu,readFileSync:Wu}=Ee,{dirname:Ii,join:Vu}=Ee;function zu(t){if(Buffer)return Buffer.from(t,"base64").toString();else return window.atob(t)}var zi=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=r.map?r.map.prev:void 0,s=this.loadMap(r.from,i);if(!this.mapFile&&r.from)this.mapFile=r.from;if(this.mapFile)this.root=Ii(this.mapFile);if(s)this.text=s}consumer(){if(!this.consumerCache)this.consumerCache=new so(this.text);return this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||i.test(e))return zu(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){if(typeof e!=="object")return!1;return typeof e.mappings==="string"||typeof e._mappings==="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let i=e.lastIndexOf(r.pop()),s=e.indexOf("*/",i);if(i>-1&&s>-1)this.annotation=this.getAnnotationURL(e.substring(i,s))}loadFile(e){if(this.root=Ii(e),Bu(e))return this.mapFile=e,Wu(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r)if(typeof r==="string")return r;else if(typeof r==="function"){let i=r(e);if(i){let s=this.loadFile(i);if(!s)throw Error("Unable to load previous source map: "+i.toString());return s}}else if(r instanceof so)return no.fromSourceMap(r).toString();else if(r instanceof no)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error("Unsupported previous source map format: "+r.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let i=this.annotation;if(e)i=Vu(Ii(e),i);return this.loadFile(i)}}startWith(e,r){if(!e)return!1;return e.substr(0,r.length)===r}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},na=zi;zi.default=zi;var{SourceMapConsumer:Gu,SourceMapGenerator:Hu}=Ee,{fileURLToPath:oo,pathToFileURL:sr}=Ee,{isAbsolute:Gi,resolve:Hi}=Ee,{nanoid:Yu}=Uu,xi=Ee,ao=Es,ju=na,Ti=Symbol("fromOffsetCache"),Ku=Boolean(Gu&&Hu),lo=Boolean(Hi&&Gi),_r=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e==="object"&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(r.from)if(!lo||/^\w+:\/\//.test(r.from)||Gi(r.from))this.file=r.from;else this.file=Hi(r.from);if(lo&&Ku){let i=new ju(this.css,r);if(i.text){this.map=i;let s=i.consumer().file;if(!this.file&&s)this.file=this.mapResolve(s)}}if(!this.file)this.id="<input css "+Yu(6)+">";if(this.map)this.map.file=this.from}error(e,r,i,s={}){let n,o,l;if(r&&typeof r==="object"){let c=r,u=i;if(typeof c.offset==="number"){let h=this.fromOffset(c.offset);r=h.line,i=h.col}else r=c.line,i=c.column;if(typeof u.offset==="number"){let h=this.fromOffset(u.offset);o=h.line,l=h.col}else o=u.line,l=u.column}else if(!i){let c=this.fromOffset(r);r=c.line,i=c.col}let a=this.origin(r,i,o,l);if(a)n=new ao(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin);else n=new ao(e,o===void 0?r:{column:i,line:r},o===void 0?i:{column:l,line:o},this.css,this.file,s.plugin);if(n.input={column:i,endColumn:l,endLine:o,line:r,source:this.css},this.file){if(sr)n.input.url=sr(this.file).toString();n.input.file=this.file}return n}fromOffset(e){let r,i;if(!this[Ti]){let n=this.css.split(`
19
+ `);i=Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)i[l]=o,o+=n[l].length+1;this[Ti]=i}else i=this[Ti];r=i[i.length-1];let s=0;if(e>=r)s=i.length-1;else{let n=i.length-2,o;while(s<n)if(o=s+(n-s>>1),e<i[o])n=o-1;else if(e>=i[o+1])s=o+1;else{s=o;break}}return{col:e-i[s]+1,line:s+1}}mapResolve(e){if(/^\w+:\/\//.test(e))return e;return Hi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,i,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:r,line:e});if(!o.source)return!1;let l;if(typeof i==="number")l=n.originalPositionFor({column:s,line:i});let a;if(Gi(o.source))a=sr(o.source);else a=new URL(o.source,this.map.consumer().sourceRoot||sr(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(oo)c.file=oo(a);else throw Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);if(u)c.source=u;return c}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])if(this[r]!=null)e[r]=this[r];if(this.map){if(e.map={...this.map},e.map.consumerCache)e.map.consumerCache=void 0}return e}get from(){return this.file||this.id}},Yr=_r;_r.default=_r;if(xi&&xi.registerInput)xi.registerInput(_r);var{SourceMapConsumer:oa,SourceMapGenerator:Ir}=Ee,{dirname:xr,relative:aa,resolve:la,sep:ca}=Ee,{pathToFileURL:co}=Ee,Xu=Yr,Ju=Boolean(oa&&Ir),Zu=Boolean(xr&&la&&aa&&ca),qu=class{constructor(e,r,i,s){this.stringify=e,this.mapOpts=i.map||{},this.root=r,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;if(this.isInline())e="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")e=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")e=this.mapOpts.annotation(this.opts.to,this.root);else e=this.outputFile()+".map";let r=`
20
20
  `;if(this.css.includes(`\r
21
- `))t=`\r
22
- `;this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),i=e.root||wr(e.file),s;if(this.mapOpts.sourcesContent===!1){if(s=new Lo(e.text),s.sourcesContent)s.sourcesContent=null}else s=e.consumer();this.map.applySourceMap(s,t,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--){if(e=this.root.nodes[t],e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(t)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),fc&&hc&&this.isMap())return this.generateMap();else{let e="";return this.stringify(this.root,(t)=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=vr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new vr({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new vr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end")if(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start)s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s);if(n=l.match(/\n/g),n)e+=n.length,o=l.lastIndexOf(`
23
- `),t=l.length-o;else t+=l.length;if(a&&u!=="start"){let c=a.parent||{raws:{}};if(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)if(a.source&&a.source.end)s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((e)=>e.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;if(typeof e<"u"&&e!==!0)return!1;if(this.previous().length)return this.previous().some((t)=>t.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((e)=>e.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(e){if(this.mapOpts.absolute)return e;if(e.charCodeAt(0)===60)return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?wr(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")i=wr($o(i,this.mapOpts.annotation));let s=Po(i,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e)=>{if(e.source&&e.source.input.map){let t=e.source.input.map;if(!this.previousMaps.includes(t))this.previousMaps.push(t)}});else{let e=new cc(this.originalCSS,this.opts);if(e.map)this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t)=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(e.source.input.from);else return this.toUrl(this.path(e.source.input.from))}toBase64(e){if(Buffer)return Buffer.from(e).toString("base64");else return window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Fn){let i=Fn(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;if(Fo==="\\")e=e.replace(/\\/g,"/");let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}},Uo=dc,pc=Fr,ki=class extends pc{constructor(e){super(e);this.type="comment"}},Wr=ki;ki.default=ki;var{isClean:Bo,my:Wo}=Dt,zo=Ur,Vo=Wr,mc=Fr,Go,fs,ds,Ho;function jo(r){return r.map((e)=>{if(e.nodes)e.nodes=jo(e.nodes);return delete e.source,e})}function Yo(r){if(r[Bo]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)Yo(e)}var Me=class r extends mc{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let s of i)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),i,s;while(this.indexes[t]<this.proxyOf.nodes.length){if(i=this.indexes[t],s=e(this.proxyOf.nodes[i],i),s===!1)break;this.indexes[t]+=1}return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if(t==="proxyOf")return e;else if(!e[t])return e[t];else if(t==="each"||typeof t==="string"&&t.startsWith("walk"))return(...i)=>e[t](...i.map((s)=>{if(typeof s==="function")return(n,o)=>s(n.toProxy(),o);else return s}));else if(t==="every"||t==="some")return(i)=>e[t]((s,...n)=>i(s.toProxy(),...n));else if(t==="root")return()=>e.root().toProxy();else if(t==="nodes")return e.nodes.map((i)=>i.toProxy());else if(t==="first"||t==="last")return e[t].toProxy();else return e[t]},set(e,t,i){if(e[t]===i)return!0;if(e[t]=i,t==="name"||t==="params"||t==="selector")e.markDirty();return!0}}}index(e){if(typeof e==="number")return e;if(e.proxyOf)e=e.proxyOf;return this.proxyOf.nodes.indexOf(e)}insertAfter(e,t){let i=this.index(e),s=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i+1,0,o);let n;for(let o in this.indexes)if(n=this.indexes[o],i<n)this.indexes[o]=n+s.length;return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),s=i===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[i],s).reverse();i=this.index(e);for(let l of n)this.proxyOf.nodes.splice(i,0,l);let o;for(let l in this.indexes)if(o=this.indexes[l],i<=o)this.indexes[l]=o+n.length;return this.markDirty(),this}normalize(e,t){if(typeof e==="string")e=jo(Go(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw Error("Value field is missed in node creation");else if(typeof e.value!=="string")e.value=String(e.value);e=[new zo(e)]}else if(e.selector)e=[new fs(e)];else if(e.name)e=[new ds(e)];else if(e.text)e=[new Vo(e)];else throw Error("Unknown node type in node creation");return e.map((s)=>{if(!s[Wo])r.rebuild(s);if(s=s.proxyOf,s.parent)s.parent.removeChild(s);if(s[Bo])Yo(s);if(typeof s.raws.before>"u"){if(t&&typeof t.raws.before<"u")s.raws.before=t.raws.before.replace(/\S/g,"")}return s.parent=this.proxyOf,s})}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let s of i)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let i in this.indexes)if(t=this.indexes[i],t>=e)this.indexes[i]=t-1;return this.markDirty(),this}replaceValues(e,t,i){if(!i)i=t,t={};return this.walkDecls((s)=>{if(t.props&&!t.props.includes(s.prop))return;if(t.fast&&!s.value.includes(t.fast))return;s.value=s.value.replace(e,i)}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let s;try{s=e(t,i)}catch(n){throw t.addToError(n)}if(s!==!1&&t.walk)s=t.walk(e);return s})}walkAtRules(e,t){if(!t)return t=e,this.walk((i,s)=>{if(i.type==="atrule")return t(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,s)});return this.walk((i,s)=>{if(i.type==="atrule"&&i.name===e)return t(i,s)})}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){if(!t)return t=e,this.walk((i,s)=>{if(i.type==="decl")return t(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,s)});return this.walk((i,s)=>{if(i.type==="decl"&&i.prop===e)return t(i,s)})}walkRules(e,t){if(!t)return t=e,this.walk((i,s)=>{if(i.type==="rule")return t(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,s)});return this.walk((i,s)=>{if(i.type==="rule"&&i.selector===e)return t(i,s)})}get first(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Me.registerParse=(r)=>{Go=r};Me.registerRule=(r)=>{fs=r};Me.registerAtRule=(r)=>{ds=r};Me.registerRoot=(r)=>{Ho=r};var We=Me;Me.default=Me;Me.rebuild=(r)=>{if(r.type==="atrule")Object.setPrototypeOf(r,ds.prototype);else if(r.type==="rule")Object.setPrototypeOf(r,fs.prototype);else if(r.type==="decl")Object.setPrototypeOf(r,zo.prototype);else if(r.type==="comment")Object.setPrototypeOf(r,Vo.prototype);else if(r.type==="root")Object.setPrototypeOf(r,Ho.prototype);if(r[Wo]=!0,r.nodes)r.nodes.forEach((e)=>{Me.rebuild(e)})};var gc=We,Zo,Xo,Et=class extends gc{constructor(e){super({type:"document",...e});if(!this.nodes)this.nodes=[]}toResult(e={}){return new Zo(new Xo,this,e).stringify()}};Et.registerLazyResult=(r)=>{Zo=r};Et.registerProcessor=(r)=>{Xo=r};var ps=Et;Et.default=Et;var Un={},Ko=function(e){if(Un[e])return;if(Un[e]=!0,typeof console<"u"&&console.warn)console.warn(e)},Li=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},Jo=Li;Li.default=Li;var yc=Jo,Pi=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){if(!t.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)t.plugin=this.lastPlugin.postcssPlugin}let i=new yc(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter((e)=>e.type==="warning")}get content(){return this.css}},ms=Pi;Pi.default=Pi;var mi=39,Bn=34,Qt=92,Wn=47,er=10,mt=32,tr=12,rr=9,ir=13,vc=91,wc=93,bc=40,Sc=41,Cc=123,Ec=125,Ic=59,xc=42,Ac=58,Mc=64,sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Tc=/.[\r\n"'(/\\]/,zn=/[\da-f]/i,Nc=function(e,t={}){let i=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,u,c,f,p,d,g,m=i.length,h=0,b=[],w=[];function y(){return h}function C(S){throw e.error("Unclosed "+S,h)}function I(){return w.length===0&&h>=m}function E(S){if(w.length)return w.pop();if(h>=m)return;let _=S?S.ignoreUnclosed:!1;switch(n=i.charCodeAt(h),n){case er:case mt:case rr:case ir:case tr:{o=h;do o+=1,n=i.charCodeAt(o);while(n===mt||n===er||n===rr||n===ir||n===tr);g=["space",i.slice(h,o)],h=o-1;break}case vc:case wc:case Cc:case Ec:case Ac:case Ic:case Sc:{let k=String.fromCharCode(n);g=[k,k,h];break}case bc:{if(p=b.length?b.pop()[1]:"",d=i.charCodeAt(h+1),p==="url"&&d!==mi&&d!==Bn&&d!==mt&&d!==er&&d!==rr&&d!==tr&&d!==ir){o=h;do{if(c=!1,o=i.indexOf(")",o+1),o===-1)if(s||_){o=h;break}else C("bracket");f=o;while(i.charCodeAt(f-1)===Qt)f-=1,c=!c}while(c);g=["brackets",i.slice(h,o+1),h,o],h=o}else if(o=i.indexOf(")",h+1),a=i.slice(h,o+1),o===-1||Tc.test(a))g=["(","(",h];else g=["brackets",a,h,o],h=o;break}case mi:case Bn:{l=n===mi?"'":'"',o=h;do{if(c=!1,o=i.indexOf(l,o+1),o===-1)if(s||_){o=h+1;break}else C("string");f=o;while(i.charCodeAt(f-1)===Qt)f-=1,c=!c}while(c);g=["string",i.slice(h,o+1),h,o],h=o;break}case Mc:{if(sr.lastIndex=h+1,sr.test(i),sr.lastIndex===0)o=i.length-1;else o=sr.lastIndex-2;g=["at-word",i.slice(h,o+1),h,o],h=o;break}case Qt:{o=h,u=!0;while(i.charCodeAt(o+1)===Qt)o+=1,u=!u;if(n=i.charCodeAt(o+1),u&&n!==Wn&&n!==mt&&n!==er&&n!==rr&&n!==ir&&n!==tr){if(o+=1,zn.test(i.charAt(o))){while(zn.test(i.charAt(o+1)))o+=1;if(i.charCodeAt(o+1)===mt)o+=1}}g=["word",i.slice(h,o+1),h,o],h=o;break}default:{if(n===Wn&&i.charCodeAt(h+1)===xc){if(o=i.indexOf("*/",h+2)+1,o===0)if(s||_)o=i.length;else C("comment");g=["comment",i.slice(h,o+1),h,o],h=o}else{if(nr.lastIndex=h+1,nr.test(i),nr.lastIndex===0)o=i.length-1;else o=nr.lastIndex-2;g=["word",i.slice(h,o+1),h,o],b.push(g),h=o}break}}return h++,g}function x(S){w.push(S)}return{back:x,endOfFile:I,nextToken:E,position:y}},qo=We,Mr=class extends qo{constructor(e){super(e);this.type="atrule"}append(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...e)}prepend(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...e)}},gs=Mr;Mr.default=Mr;qo.registerAtRule(Mr);var Qo=We,ea,ta,rt=class extends Qo{constructor(e){super(e);if(this.type="root",!this.nodes)this.nodes=[]}normalize(e,t,i){let s=super.normalize(e);if(t){if(i==="prepend")if(this.nodes.length>1)t.raws.before=this.nodes[1].raws.before;else delete t.raws.before;else if(this.first!==t)for(let n of s)n.raws.before=t.raws.before}return s}removeChild(e,t){let i=this.index(e);if(!t&&i===0&&this.nodes.length>1)this.nodes[1].raws.before=this.nodes[i].raws.before;return super.removeChild(e)}toResult(e={}){return new ea(new ta,this,e).stringify()}};rt.registerLazyResult=(r)=>{ea=r};rt.registerProcessor=(r)=>{ta=r};var _t=rt;rt.default=rt;Qo.registerRoot(rt);var It={comma(r){return It.split(r,[","],!0)},space(r){let e=[" ",`
24
- `,"\t"];return It.split(r,e)},split(r,e,t){let i=[],s="",n=!1,o=0,l=!1,a="",u=!1;for(let c of r){if(u)u=!1;else if(c==="\\")u=!0;else if(l){if(c===a)l=!1}else if(c==='"'||c==="'")l=!0,a=c;else if(c==="(")o+=1;else if(c===")"){if(o>0)o-=1}else if(o===0){if(e.includes(c))n=!0}if(n){if(s!=="")i.push(s.trim());s="",n=!1}else s+=c}if(t||s!=="")i.push(s.trim());return i}},ra=It;It.default=It;var ia=We,Rc=ra,Tr=class extends ia{constructor(e){super(e);if(this.type="rule",!this.nodes)this.nodes=[]}get selectors(){return Rc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}},ys=Tr;Tr.default=Tr;ia.registerRule(Tr);var Oc=Ur,Dc=Nc,_c=Wr,kc=gs,Lc=_t,Vn=ys,Gn={empty:!0,space:!0};function Pc(r){for(let e=r.length-1;e>=0;e--){let t=r[e],i=t[3]||t[2];if(i)return i}}var $c=class{constructor(e){this.input=e,this.root=new Lc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new kc;if(t.name=e[1].slice(1),t.name==="")this.unnamedAtrule(t,e);this.init(t,e[2]);let i,s,n,o=!1,l=!1,a=[],u=[];while(!this.tokenizer.endOfFile()){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="[")u.push(i==="("?")":"]");else if(i==="{"&&u.length>0)u.push("}");else if(i===u[u.length-1])u.pop();if(u.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){n=a.length-1,s=a[n];while(s&&s[0]==="space")s=a[--n];if(s)t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}if(t.raws.between=this.spacesAndCommentsFromEnd(a),a.length){if(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o)e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=""}else t.raws.afterName="",t.params="";if(l)t.nodes=[],this.current=t}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,s;for(let n=t-1;n>=0;n--)if(s=e[n],s[0]!=="space"){if(i+=1,i===2)break}throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,i,s,n;for(let[o,l]of e.entries()){if(i=l,s=i[0],s==="(")t+=1;if(s===")")t-=1;if(t===0&&s===":")if(!n)this.doubleColon(i);else if(n[0]==="word"&&n[1]==="progid")continue;else return o;n=i}return!1}comment(e){let t=new _c;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Dc(this.input)}decl(e,t){let i=new Oc;this.init(i,e[0][2]);let s=e[e.length-1];if(s[0]===";")this.semicolon=!0,e.pop();i.source.end=this.getPosition(s[3]||s[2]||Pc(e)),i.source.end.offset++;while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);i.raws.before+=e.shift()[1]}i.source.start=this.getPosition(e[0][2]),i.prop="";while(e.length){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let n;while(e.length)if(n=e.shift(),n[0]===":"){i.raws.between+=n[1];break}else{if(n[0]==="word"&&/\w/.test(n[1]))this.unknownWord([n]);i.raws.between+=n[1]}if(i.prop[0]==="_"||i.prop[0]==="*")i.raws.before+=i.prop[0],i.prop=i.prop.slice(1);let o=[],l;while(e.length){if(l=e[0][0],l!=="space"&&l!=="comment")break;o.push(e.shift())}this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){i.important=!0;let c=this.stringFrom(e,u);if(c=this.spacesFromEnd(e)+c,c!==" !important")i.raws.important=c;break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let p=u;p>0;p--){let d=c[p][0];if(f.trim().indexOf("!")===0&&d!=="space")break;f=c.pop()[1]+f}if(f.trim().indexOf("!")===0)i.important=!0,i.raws.important=f,e=c}if(n[0]!=="space"&&n[0]!=="comment")break}if(e.some((u)=>u[0]!=="space"&&u[0]!=="comment"))i.raws.between+=o.map((u)=>u[1]).join(""),o=[];if(this.raw(i,"value",o.concat(e),t),i.value.includes(":")&&!t)this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Vn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(e)}endFile(){if(this.current.parent)this.unclosedBlock();if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];if(t&&t.type==="rule"&&!t.raws.ownSemicolon)t.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){if(this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment")this.semicolon=!1}other(e){let t=!1,i=null,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;while(u){if(i=u[0],a.push(u),i==="("||i==="["){if(!n)n=u;o.push(i==="("?")":"]")}else if(l&&s&&i==="{"){if(!n)n=u;o.push("}")}else if(o.length===0){if(i===";")if(s){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),t=!0;break}else if(i===":")s=!0}else if(i===o[o.length-1]){if(o.pop(),o.length===0)n=null}u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=!0;if(o.length>0)this.unclosedBracket(n);if(t&&s){if(!l)while(a.length){if(u=a[a.length-1][0],u!=="space"&&u!=="comment")break;this.tokenizer.back(a.pop())}this.decl(a,l)}else this.unknownWord(a)}parse(){let e;while(!this.tokenizer.endOfFile())switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,s){let n,o,l=i.length,a="",u=!0,c,f;for(let p=0;p<l;p+=1)if(n=i[p],o=n[0],o==="space"&&p===l-1&&!s)u=!1;else if(o==="comment")if(f=i[p-1]?i[p-1][0]:"empty",c=i[p+1]?i[p+1][0]:"empty",!Gn[f]&&!Gn[c])if(a.slice(-1)===",")u=!1;else a+=n[1];else u=!1;else a+=n[1];if(!u){let p=i.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Vn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";while(e.length){if(t=e[e.length-1][0],t!=="space"&&t!=="comment")break;i=e.pop()[1]+i}return i}spacesAndCommentsFromStart(e){let t,i="";while(e.length){if(t=e[0][0],t!=="space"&&t!=="comment")break;i+=e.shift()[1]}return i}spacesFromEnd(e){let t,i="";while(e.length){if(t=e[e.length-1][0],t!=="space")break;i=e.pop()[1]+i}return i}stringFrom(e,t){let i="";for(let s=t;s<e.length;s++)i+=e[s][1];return e.splice(t,e.length-t),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Fc=$c,Uc=We,Bc=Fc,Wc=Br;function Nr(r,e){let t=new Wc(r,e),i=new Bc(t);try{i.parse()}catch(s){if(s.name==="CssSyntaxError"&&e&&e.from){if(/\.scss$/i.test(e.from))s.message+=`
21
+ `))r=`\r
22
+ `;this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),i=e.root||xr(e.file),s;if(this.mapOpts.sourcesContent===!1){if(s=new oa(e.text),s.sourcesContent)s.sourcesContent=null}else s=e.consumer();this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--){if(e=this.root.nodes[r],e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(r)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),Zu&&Ju&&this.isMap())return this.generateMap();else{let e="";return this.stringify(this.root,(r)=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ir.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ir({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new Ir({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end")if(s.generated.line=e,s.generated.column=r-1,a.source&&a.source.start)s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s);if(n=l.match(/\n/g),n)e+=n.length,o=l.lastIndexOf(`
23
+ `),r=l.length-o;else r+=l.length;if(a&&c!=="start"){let u=a.parent||{raws:{}};if(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)if(a.source&&a.source.end)s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=r-2,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=r-1,this.map.addMapping(s)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((e)=>e.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;if(typeof e<"u"&&e!==!0)return!1;if(this.previous().length)return this.previous().some((r)=>r.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((e)=>e.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(e){if(this.mapOpts.absolute)return e;if(e.charCodeAt(0)===60)return e;if(/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let i=this.opts.to?xr(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")i=xr(la(i,this.mapOpts.annotation));let s=aa(i,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e)=>{if(e.source&&e.source.input.map){let r=e.source.input.map;if(!this.previousMaps.includes(r))this.previousMaps.push(r)}});else{let e=new Xu(this.originalCSS,this.opts);if(e.map)this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((r)=>{if(r.source){let i=r.source.input.from;if(i&&!e[i]){e[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(s,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(e.source.input.from);else return this.toUrl(this.path(e.source.input.from))}toBase64(e){if(Buffer)return Buffer.from(e).toString("base64");else return window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(co){let i=co(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;if(ca==="\\")e=e.replace(/\\/g,"/");let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}},ua=qu,Qu=Gr,Yi=class extends Qu{constructor(e){super(e);this.type="comment"}},jr=Yi;Yi.default=Yi;var{isClean:ha,my:fa}=Ft,da=Hr,pa=jr,eh=Gr,ma,Is,xs,ga;function ya(t){return t.map((e)=>{if(e.nodes)e.nodes=ya(e.nodes);return delete e.source,e})}function va(t){if(t[ha]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)va(e)}var De=class t extends eh{append(...e){for(let r of e){let i=this.normalize(r,this.last);for(let s of i)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),i,s;while(this.indexes[r]<this.proxyOf.nodes.length){if(i=this.indexes[r],s=e(this.proxyOf.nodes[i],i),s===!1)break;this.indexes[r]+=1}return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,r){if(r==="proxyOf")return e;else if(!e[r])return e[r];else if(r==="each"||typeof r==="string"&&r.startsWith("walk"))return(...i)=>e[r](...i.map((s)=>{if(typeof s==="function")return(n,o)=>s(n.toProxy(),o);else return s}));else if(r==="every"||r==="some")return(i)=>e[r]((s,...n)=>i(s.toProxy(),...n));else if(r==="root")return()=>e.root().toProxy();else if(r==="nodes")return e.nodes.map((i)=>i.toProxy());else if(r==="first"||r==="last")return e[r].toProxy();else return e[r]},set(e,r,i){if(e[r]===i)return!0;if(e[r]=i,r==="name"||r==="params"||r==="selector")e.markDirty();return!0}}}index(e){if(typeof e==="number")return e;if(e.proxyOf)e=e.proxyOf;return this.proxyOf.nodes.indexOf(e)}insertAfter(e,r){let i=this.index(e),s=this.normalize(r,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i+1,0,o);let n;for(let o in this.indexes)if(n=this.indexes[o],i<n)this.indexes[o]=n+s.length;return this.markDirty(),this}insertBefore(e,r){let i=this.index(e),s=i===0?"prepend":!1,n=this.normalize(r,this.proxyOf.nodes[i],s).reverse();i=this.index(e);for(let l of n)this.proxyOf.nodes.splice(i,0,l);let o;for(let l in this.indexes)if(o=this.indexes[l],i<=o)this.indexes[l]=o+n.length;return this.markDirty(),this}normalize(e,r){if(typeof e==="string")e=ya(ma(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw Error("Value field is missed in node creation");else if(typeof e.value!=="string")e.value=String(e.value);e=[new da(e)]}else if(e.selector)e=[new Is(e)];else if(e.name)e=[new xs(e)];else if(e.text)e=[new pa(e)];else throw Error("Unknown node type in node creation");return e.map((s)=>{if(!s[fa])t.rebuild(s);if(s=s.proxyOf,s.parent)s.parent.removeChild(s);if(s[ha])va(s);if(typeof s.raws.before>"u"){if(r&&typeof r.raws.before<"u")s.raws.before=r.raws.before.replace(/\S/g,"")}return s.parent=this.proxyOf,s})}prepend(...e){e=e.reverse();for(let r of e){let i=this.normalize(r,this.first,"prepend").reverse();for(let s of i)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let i in this.indexes)if(r=this.indexes[i],r>=e)this.indexes[i]=r-1;return this.markDirty(),this}replaceValues(e,r,i){if(!i)i=r,r={};return this.walkDecls((s)=>{if(r.props&&!r.props.includes(s.prop))return;if(r.fast&&!s.value.includes(r.fast))return;s.value=s.value.replace(e,i)}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,i)=>{let s;try{s=e(r,i)}catch(n){throw r.addToError(n)}if(s!==!1&&r.walk)s=r.walk(e);return s})}walkAtRules(e,r){if(!r)return r=e,this.walk((i,s)=>{if(i.type==="atrule")return r(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="atrule"&&e.test(i.name))return r(i,s)});return this.walk((i,s)=>{if(i.type==="atrule"&&i.name===e)return r(i,s)})}walkComments(e){return this.walk((r,i)=>{if(r.type==="comment")return e(r,i)})}walkDecls(e,r){if(!r)return r=e,this.walk((i,s)=>{if(i.type==="decl")return r(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="decl"&&e.test(i.prop))return r(i,s)});return this.walk((i,s)=>{if(i.type==="decl"&&i.prop===e)return r(i,s)})}walkRules(e,r){if(!r)return r=e,this.walk((i,s)=>{if(i.type==="rule")return r(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="rule"&&e.test(i.selector))return r(i,s)});return this.walk((i,s)=>{if(i.type==="rule"&&i.selector===e)return r(i,s)})}get first(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};De.registerParse=(t)=>{ma=t};De.registerRule=(t)=>{Is=t};De.registerAtRule=(t)=>{xs=t};De.registerRoot=(t)=>{ga=t};var je=De;De.default=De;De.rebuild=(t)=>{if(t.type==="atrule")Object.setPrototypeOf(t,xs.prototype);else if(t.type==="rule")Object.setPrototypeOf(t,Is.prototype);else if(t.type==="decl")Object.setPrototypeOf(t,da.prototype);else if(t.type==="comment")Object.setPrototypeOf(t,pa.prototype);else if(t.type==="root")Object.setPrototypeOf(t,ga.prototype);if(t[fa]=!0,t.nodes)t.nodes.forEach((e)=>{De.rebuild(e)})};var th=je,wa,ba,Nt=class extends th{constructor(e){super({type:"document",...e});if(!this.nodes)this.nodes=[]}toResult(e={}){return new wa(new ba,this,e).stringify()}};Nt.registerLazyResult=(t)=>{wa=t};Nt.registerProcessor=(t)=>{ba=t};var Ts=Nt;Nt.default=Nt;var uo={},Sa=function(e){if(uo[e])return;if(uo[e]=!0,typeof console<"u"&&console.warn)console.warn(e)},ji=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},Ca=ji;ji.default=ji;var rh=Ca,Ki=class{constructor(e,r,i){this.processor=e,this.messages=[],this.root=r,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){if(!r.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)r.plugin=this.lastPlugin.postcssPlugin}let i=new rh(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((e)=>e.type==="warning")}get content(){return this.css}},As=Ki;Ki.default=Ki;var Ai=39,ho=34,nr=92,fo=47,or=10,St=32,ar=12,lr=9,cr=13,ih=91,sh=93,nh=40,oh=41,ah=123,lh=125,ch=59,uh=42,hh=58,fh=64,ur=/[\t\n\f\r "#'()/;[\\\]{}]/g,hr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,dh=/.[\r\n"'(/\\]/,po=/[\da-f]/i,ph=function(e,r={}){let i=e.css.valueOf(),s=r.ignoreErrors,n,o,l,a,c,u,h,p,d,g,m=i.length,f=0,b=[],w=[];function y(){return f}function C(S){throw e.error("Unclosed "+S,f)}function x(){return w.length===0&&f>=m}function I(S){if(w.length)return w.pop();if(f>=m)return;let A=S?S.ignoreUnclosed:!1;switch(n=i.charCodeAt(f),n){case or:case St:case lr:case cr:case ar:{o=f;do o+=1,n=i.charCodeAt(o);while(n===St||n===or||n===lr||n===cr||n===ar);g=["space",i.slice(f,o)],f=o-1;break}case ih:case sh:case ah:case lh:case hh:case ch:case oh:{let M=String.fromCharCode(n);g=[M,M,f];break}case nh:{if(p=b.length?b.pop()[1]:"",d=i.charCodeAt(f+1),p==="url"&&d!==Ai&&d!==ho&&d!==St&&d!==or&&d!==lr&&d!==ar&&d!==cr){o=f;do{if(u=!1,o=i.indexOf(")",o+1),o===-1)if(s||A){o=f;break}else C("bracket");h=o;while(i.charCodeAt(h-1)===nr)h-=1,u=!u}while(u);g=["brackets",i.slice(f,o+1),f,o],f=o}else if(o=i.indexOf(")",f+1),a=i.slice(f,o+1),o===-1||dh.test(a))g=["(","(",f];else g=["brackets",a,f,o],f=o;break}case Ai:case ho:{l=n===Ai?"'":'"',o=f;do{if(u=!1,o=i.indexOf(l,o+1),o===-1)if(s||A){o=f+1;break}else C("string");h=o;while(i.charCodeAt(h-1)===nr)h-=1,u=!u}while(u);g=["string",i.slice(f,o+1),f,o],f=o;break}case fh:{if(ur.lastIndex=f+1,ur.test(i),ur.lastIndex===0)o=i.length-1;else o=ur.lastIndex-2;g=["at-word",i.slice(f,o+1),f,o],f=o;break}case nr:{o=f,c=!0;while(i.charCodeAt(o+1)===nr)o+=1,c=!c;if(n=i.charCodeAt(o+1),c&&n!==fo&&n!==St&&n!==or&&n!==lr&&n!==cr&&n!==ar){if(o+=1,po.test(i.charAt(o))){while(po.test(i.charAt(o+1)))o+=1;if(i.charCodeAt(o+1)===St)o+=1}}g=["word",i.slice(f,o+1),f,o],f=o;break}default:{if(n===fo&&i.charCodeAt(f+1)===uh){if(o=i.indexOf("*/",f+2)+1,o===0)if(s||A)o=i.length;else C("comment");g=["comment",i.slice(f,o+1),f,o],f=o}else{if(hr.lastIndex=f+1,hr.test(i),hr.lastIndex===0)o=i.length-1;else o=hr.lastIndex-2;g=["word",i.slice(f,o+1),f,o],b.push(g),f=o}break}}return f++,g}function E(S){w.push(S)}return{back:E,endOfFile:x,nextToken:I,position:y}},Ea=je,Dr=class extends Ea{constructor(e){super(e);this.type="atrule"}append(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...e)}prepend(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...e)}},Ms=Dr;Dr.default=Dr;Ea.registerAtRule(Dr);var Ia=je,xa,Ta,ct=class extends Ia{constructor(e){super(e);if(this.type="root",!this.nodes)this.nodes=[]}normalize(e,r,i){let s=super.normalize(e);if(r){if(i==="prepend")if(this.nodes.length>1)r.raws.before=this.nodes[1].raws.before;else delete r.raws.before;else if(this.first!==r)for(let n of s)n.raws.before=r.raws.before}return s}removeChild(e,r){let i=this.index(e);if(!r&&i===0&&this.nodes.length>1)this.nodes[1].raws.before=this.nodes[i].raws.before;return super.removeChild(e)}toResult(e={}){return new xa(new Ta,this,e).stringify()}};ct.registerLazyResult=(t)=>{xa=t};ct.registerProcessor=(t)=>{Ta=t};var Ut=ct;ct.default=ct;Ia.registerRoot(ct);var Rt={comma(t){return Rt.split(t,[","],!0)},space(t){let e=[" ",`
24
+ `,"\t"];return Rt.split(t,e)},split(t,e,r){let i=[],s="",n=!1,o=0,l=!1,a="",c=!1;for(let u of t){if(c)c=!1;else if(u==="\\")c=!0;else if(l){if(u===a)l=!1}else if(u==='"'||u==="'")l=!0,a=u;else if(u==="(")o+=1;else if(u===")"){if(o>0)o-=1}else if(o===0){if(e.includes(u))n=!0}if(n){if(s!=="")i.push(s.trim());s="",n=!1}else s+=u}if(r||s!=="")i.push(s.trim());return i}},Aa=Rt;Rt.default=Rt;var Ma=je,mh=Aa,kr=class extends Ma{constructor(e){super(e);if(this.type="rule",!this.nodes)this.nodes=[]}get selectors(){return mh.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,i=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}},Ns=kr;kr.default=kr;Ma.registerRule(kr);var gh=Hr,yh=ph,vh=jr,wh=Ms,bh=Ut,mo=Ns,go={empty:!0,space:!0};function Sh(t){for(let e=t.length-1;e>=0;e--){let r=t[e],i=r[3]||r[2];if(i)return i}}var Ch=class{constructor(e){this.input=e,this.root=new bh,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new wh;if(r.name=e[1].slice(1),r.name==="")this.unnamedAtrule(r,e);this.init(r,e[2]);let i,s,n,o=!1,l=!1,a=[],c=[];while(!this.tokenizer.endOfFile()){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="[")c.push(i==="("?")":"]");else if(i==="{"&&c.length>0)c.push("}");else if(i===c[c.length-1])c.pop();if(c.length===0)if(i===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){n=a.length-1,s=a[n];while(s&&s[0]==="space")s=a[--n];if(s)r.source.end=this.getPosition(s[3]||s[2]),r.source.end.offset++}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}if(r.raws.between=this.spacesAndCommentsFromEnd(a),a.length){if(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o)e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between=""}else r.raws.afterName="",r.params="";if(l)r.nodes=[],this.current=r}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let i=0,s;for(let n=r-1;n>=0;n--)if(s=e[n],s[0]!=="space"){if(i+=1,i===2)break}throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let r=0,i,s,n;for(let[o,l]of e.entries()){if(i=l,s=i[0],s==="(")r+=1;if(s===")")r-=1;if(r===0&&s===":")if(!n)this.doubleColon(i);else if(n[0]==="word"&&n[1]==="progid")continue;else return o;n=i}return!1}comment(e){let r=new vh;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=yh(this.input)}decl(e,r){let i=new gh;this.init(i,e[0][2]);let s=e[e.length-1];if(s[0]===";")this.semicolon=!0,e.pop();i.source.end=this.getPosition(s[3]||s[2]||Sh(e)),i.source.end.offset++;while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);i.raws.before+=e.shift()[1]}i.source.start=this.getPosition(e[0][2]),i.prop="";while(e.length){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let n;while(e.length)if(n=e.shift(),n[0]===":"){i.raws.between+=n[1];break}else{if(n[0]==="word"&&/\w/.test(n[1]))this.unknownWord([n]);i.raws.between+=n[1]}if(i.prop[0]==="_"||i.prop[0]==="*")i.raws.before+=i.prop[0],i.prop=i.prop.slice(1);let o=[],l;while(e.length){if(l=e[0][0],l!=="space"&&l!=="comment")break;o.push(e.shift())}this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){i.important=!0;let u=this.stringFrom(e,c);if(u=this.spacesFromEnd(e)+u,u!==" !important")i.raws.important=u;break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().indexOf("!")===0&&d!=="space")break;h=u.pop()[1]+h}if(h.trim().indexOf("!")===0)i.important=!0,i.raws.important=h,e=u}if(n[0]!=="space"&&n[0]!=="comment")break}if(e.some((c)=>c[0]!=="space"&&c[0]!=="comment"))i.raws.between+=o.map((c)=>c[1]).join(""),o=[];if(this.raw(i,"value",o.concat(e),r),i.value.includes(":")&&!r)this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new mo;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(e)}endFile(){if(this.current.parent)this.unclosedBlock();if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];if(r&&r.type==="rule"&&!r.raws.ownSemicolon)r.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){if(this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment")this.semicolon=!1}other(e){let r=!1,i=null,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;while(c){if(i=c[0],a.push(c),i==="("||i==="["){if(!n)n=c;o.push(i==="("?")":"]")}else if(l&&s&&i==="{"){if(!n)n=c;o.push("}")}else if(o.length===0){if(i===";")if(s){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),r=!0;break}else if(i===":")s=!0}else if(i===o[o.length-1]){if(o.pop(),o.length===0)n=null}c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())r=!0;if(o.length>0)this.unclosedBracket(n);if(r&&s){if(!l)while(a.length){if(c=a[a.length-1][0],c!=="space"&&c!=="comment")break;this.tokenizer.back(a.pop())}this.decl(a,l)}else this.unknownWord(a)}parse(){let e;while(!this.tokenizer.endOfFile())switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,i,s){let n,o,l=i.length,a="",c=!0,u,h;for(let p=0;p<l;p+=1)if(n=i[p],o=n[0],o==="space"&&p===l-1&&!s)c=!1;else if(o==="comment")if(h=i[p-1]?i[p-1][0]:"empty",u=i[p+1]?i[p+1][0]:"empty",!go[h]&&!go[u])if(a.slice(-1)===",")c=!1;else a+=n[1];else c=!1;else a+=n[1];if(!c){let p=i.reduce((d,g)=>d+g[1],"");e.raws[r]={raw:p,value:a}}e[r]=a}rule(e){e.pop();let r=new mo;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,i="";while(e.length){if(r=e[e.length-1][0],r!=="space"&&r!=="comment")break;i=e.pop()[1]+i}return i}spacesAndCommentsFromStart(e){let r,i="";while(e.length){if(r=e[0][0],r!=="space"&&r!=="comment")break;i+=e.shift()[1]}return i}spacesFromEnd(e){let r,i="";while(e.length){if(r=e[e.length-1][0],r!=="space")break;i=e.pop()[1]+i}return i}stringFrom(e,r){let i="";for(let s=r;s<e.length;s++)i+=e[s][1];return e.splice(r,e.length-r),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,r){throw this.input.error("At-rule without name",{offset:r[2]},{offset:r[2]+r[1].length})}},Eh=Ch,Ih=je,xh=Eh,Th=Yr;function Lr(t,e){let r=new Th(t,e),i=new xh(r);try{i.parse()}catch(s){if(s.name==="CssSyntaxError"&&e&&e.from){if(/\.scss$/i.test(e.from))s.message+=`
25
25
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`;else if(/\.sass/i.test(e.from))s.message+=`
26
26
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;else if(/\.less$/i.test(e.from))s.message+=`
27
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw s}return i.root}var vs=Nr;Nr.default=Nr;Uc.registerParse(Nr);var{isClean:Ee,my:zc}=Dt,Vc=Uo,Gc=$r,Hc=We,jc=ps,Yc=Ko,Hn=ms,Zc=vs,Xc=_t,Kc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jc={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},qc={Once:!0,postcssPlugin:!0,prepare:!0},it=0;function gt(r){return typeof r==="object"&&typeof r.then==="function"}function sa(r){let e=!1,t=Kc[r.type];if(r.type==="decl")e=r.prop.toLowerCase();else if(r.type==="atrule")e=r.name.toLowerCase();if(e&&r.append)return[t,t+"-"+e,it,t+"Exit",t+"Exit-"+e];else if(e)return[t,t+"-"+e,t+"Exit",t+"Exit-"+e];else if(r.append)return[t,it,t+"Exit"];else return[t,t+"Exit"]}function jn(r){let e;if(r.type==="document")e=["Document",it,"DocumentExit"];else if(r.type==="root")e=["Root",it,"RootExit"];else e=sa(r);return{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function $i(r){if(r[Ee]=!1,r.nodes)r.nodes.forEach((e)=>$i(e));return r}var Fi={},st=class r{constructor(e,t,i){this.stringified=!1,this.processed=!1;let s;if(typeof t==="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=$i(t);else if(t instanceof r||t instanceof Hn){if(s=$i(t.root),t.map){if(typeof i.map>"u")i.map={};if(!i.map.inline)i.map.inline=!1;i.map.prev=t.map}}else{let n=Zc;if(i.syntax)n=i.syntax.parse;if(i.parser)n=i.parser;if(n.parse)n=n.parse;try{s=n(t,i)}catch(o){this.processed=!0,this.error=o}if(s&&!s[zc])Hc.rebuild(s)}this.result=new Hn(e,s,i),this.helpers={...Fi,postcss:Fi,result:this.result},this.plugins=this.processor.plugins.map((n)=>{if(typeof n==="object"&&n.prepare)return{...n,...n.prepare(this.result)};else return n})}async(){if(this.error)return Promise.reject(this.error);if(this.processed)return Promise.resolve(this.result);if(!this.processing)this.processing=this.runAsync();return this.processing}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{if(t)t.addToError(e);if(this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion){let{postcssPlugin:s,postcssVersion:n}=i,o=this.result.processor.version,l=n.split("."),a=o.split(".");if(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+s+" uses "+n+". Perhaps this is the source of the error below.")}}catch(s){if(console&&console.error)console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,i,s)=>{if(!this.listeners[i])this.listeners[i]=[];this.listeners[i].push([t,s])};for(let t of this.plugins)if(typeof t==="object")for(let i in t){if(!Jc[i]&&/^[A-Z]/.test(i))throw Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qc[i]){if(typeof t[i]==="object")for(let s in t[i])if(s==="*")e(t,i,t[i][s]);else e(t,i+"-"+s.toLowerCase(),t[i][s]);else if(typeof t[i]==="function")e(t,i,t[i])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],i=this.runOnRoot(t);if(gt(i))try{await i}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Ee]){e[Ee]=!0;let t=[jn(e)];while(t.length>0){let i=this.visitTick(t);if(gt(i))try{await i}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map((n)=>i(n,this.helpers));await Promise.all(s)}else await i(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map((i)=>e.Once(i,this.helpers));if(gt(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}else if(typeof e==="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Gc;if(e.syntax)t=e.syntax.stringify;if(e.stringifier)t=e.stringifier;if(t.stringify)t=t.stringify;let s=new Vc(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(gt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Ee])e[Ee]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){if(!("from"in this.opts))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.");return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,s]of e){this.result.lastPlugin=i;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(gt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:s}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];if(t.visitorIndex+=1,t.visitorIndex===s.length)t.visitors=[],t.visitorIndex=0;this.result.lastPlugin=o;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(t.iterator!==0){let o=t.iterator,l;while(l=i.nodes[i.indexes[o]])if(i.indexes[o]+=1,!l[Ee]){l[Ee]=!0,e.push(jn(l));return}t.iterator=0,delete i.indexes[o]}let n=t.events;while(t.eventIndex<n.length){let o=n[t.eventIndex];if(t.eventIndex+=1,o===it){if(i.nodes&&i.nodes.length)i[Ee]=!0,t.iterator=i.getIterator();return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ee]=!0;let t=sa(e);for(let i of t)if(i===it){if(e.nodes)e.each((s)=>{if(!s[Ee])this.walkSync(s)})}else{let s=this.listeners[i];if(s){if(this.visitSync(s,e.toProxy()))return}}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};st.registerPostcss=(r)=>{Fi=r};var na=st;st.default=st;Xc.registerLazyResult(st);jc.registerLazyResult(st);var Qc=Uo,eh=$r,th=Ko,rh=vs,ih=ms,Ui=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let s,n=eh;this.result=new ih(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Qc(n,s,this._opts,t);if(l.isMap()){let[a,u]=l.generate();if(a)this.result.css=a;if(u)this.result.map=u}else l.clearAnnotation(),this.result.css=l.css}async(){if(this.error)return Promise.reject(this.error);return Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){if(!("from"in this._opts))th("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.");return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=rh;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;else return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},sh=Ui;Ui.default=Ui;var nh=sh,oh=na,ah=ps,lh=_t,xt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e){if(i.postcss===!0)i=i();else if(i.postcss)i=i.postcss;if(typeof i==="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i==="object"&&i.postcssPlugin)t.push(i);else if(typeof i==="function")t.push(i);else if(typeof i==="object"&&(i.parse||i.stringify))throw 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.");else throw Error(i+" is not a PostCSS plugin")}return t}process(e,t={}){if(!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax)return new nh(this,e,t);else return new oh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},uh=xt;xt.default=xt;lh.registerProcessor(xt);ah.registerProcessor(xt);var ch=Ur,hh=ko,fh=Wr,dh=gs,ph=Br,mh=_t,gh=ys;function At(r,e){if(Array.isArray(r))return r.map((s)=>At(s));let{inputs:t,...i}=r;if(t){e=[];for(let s of t){let n={...s,__proto__:ph.prototype};if(n.map)n.map={...n.map,__proto__:hh.prototype};e.push(n)}}if(i.nodes)i.nodes=r.nodes.map((s)=>At(s,e));if(i.source){let{inputId:s,...n}=i.source;if(i.source=n,s!=null)i.source.input=e[s]}if(i.type==="root")return new mh(i);else if(i.type==="decl")return new ch(i);else if(i.type==="rule")return new gh(i);else if(i.type==="comment")return new fh(i);else if(i.type==="atrule")return new dh(i);else throw Error("Unknown node type: "+r.type)}var yh=At;At.default=At;var vh=hs,oa=Ur,wh=na,bh=We,ws=uh,Sh=$r,Ch=yh,aa=ps,Eh=Jo,la=Wr,ua=gs,Ih=ms,xh=Br,Ah=vs,Mh=ra,ca=ys,ha=_t,Th=Fr;function F(...r){if(r.length===1&&Array.isArray(r[0]))r=r[0];return new ws(r)}F.plugin=function(e,t){let i=!1;function s(...o){if(console&&console.warn&&!i){if(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
27
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw s}return i.root}var Rs=Lr;Lr.default=Lr;Ih.registerParse(Lr);var{isClean:Ne,my:Ah}=Ft,Mh=ua,Nh=zr,Rh=je,Oh=Ts,_h=Sa,yo=As,Dh=Rs,kh=Ut,Lh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ph={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},$h={Once:!0,postcssPlugin:!0,prepare:!0},ut=0;function Ct(t){return typeof t==="object"&&typeof t.then==="function"}function Na(t){let e=!1,r=Lh[t.type];if(t.type==="decl")e=t.prop.toLowerCase();else if(t.type==="atrule")e=t.name.toLowerCase();if(e&&t.append)return[r,r+"-"+e,ut,r+"Exit",r+"Exit-"+e];else if(e)return[r,r+"-"+e,r+"Exit",r+"Exit-"+e];else if(t.append)return[r,ut,r+"Exit"];else return[r,r+"Exit"]}function vo(t){let e;if(t.type==="document")e=["Document",ut,"DocumentExit"];else if(t.type==="root")e=["Root",ut,"RootExit"];else e=Na(t);return{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Xi(t){if(t[Ne]=!1,t.nodes)t.nodes.forEach((e)=>Xi(e));return t}var Ji={},ht=class t{constructor(e,r,i){this.stringified=!1,this.processed=!1;let s;if(typeof r==="object"&&r!==null&&(r.type==="root"||r.type==="document"))s=Xi(r);else if(r instanceof t||r instanceof yo){if(s=Xi(r.root),r.map){if(typeof i.map>"u")i.map={};if(!i.map.inline)i.map.inline=!1;i.map.prev=r.map}}else{let n=Dh;if(i.syntax)n=i.syntax.parse;if(i.parser)n=i.parser;if(n.parse)n=n.parse;try{s=n(r,i)}catch(o){this.processed=!0,this.error=o}if(s&&!s[Ah])Rh.rebuild(s)}this.result=new yo(e,s,i),this.helpers={...Ji,postcss:Ji,result:this.result},this.plugins=this.processor.plugins.map((n)=>{if(typeof n==="object"&&n.prepare)return{...n,...n.prepare(this.result)};else return n})}async(){if(this.error)return Promise.reject(this.error);if(this.processed)return Promise.resolve(this.result);if(!this.processing)this.processing=this.runAsync();return this.processing}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let i=this.result.lastPlugin;try{if(r)r.addToError(e);if(this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion){let{postcssPlugin:s,postcssVersion:n}=i,o=this.result.processor.version,l=n.split("."),a=o.split(".");if(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+s+" uses "+n+". Perhaps this is the source of the error below.")}}catch(s){if(console&&console.error)console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(r,i,s)=>{if(!this.listeners[i])this.listeners[i]=[];this.listeners[i].push([r,s])};for(let r of this.plugins)if(typeof r==="object")for(let i in r){if(!Ph[i]&&/^[A-Z]/.test(i))throw Error(`Unknown event ${i} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!$h[i]){if(typeof r[i]==="object")for(let s in r[i])if(s==="*")e(r,i,r[i][s]);else e(r,i+"-"+s.toLowerCase(),r[i][s]);else if(typeof r[i]==="function")e(r,i,r[i])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let r=this.plugins[e],i=this.runOnRoot(r);if(Ct(i))try{await i}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Ne]){e[Ne]=!0;let r=[vo(e)];while(r.length>0){let i=this.visitTick(r);if(Ct(i))try{await i}catch(s){let n=r[r.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[r,i]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let s=e.nodes.map((n)=>i(n,this.helpers));await Promise.all(s)}else await i(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map((i)=>e.Once(i,this.helpers));if(Ct(r[0]))return Promise.all(r);return r}return e.Once(this.result.root,this.helpers)}else if(typeof e==="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=Nh;if(e.syntax)r=e.syntax.stringify;if(e.stringifier)r=e.stringifier;if(r.stringify)r=r.stringify;let s=new Mh(r,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(Ct(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Ne])e[Ne]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){if(!("from"in this.opts))_h("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.");return this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[i,s]of e){this.result.lastPlugin=i;let n;try{n=s(r,this.helpers)}catch(o){throw this.handleError(o,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(Ct(n))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:i,visitors:s}=r;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(s.length>0&&r.visitorIndex<s.length){let[o,l]=s[r.visitorIndex];if(r.visitorIndex+=1,r.visitorIndex===s.length)r.visitors=[],r.visitorIndex=0;this.result.lastPlugin=o;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(r.iterator!==0){let o=r.iterator,l;while(l=i.nodes[i.indexes[o]])if(i.indexes[o]+=1,!l[Ne]){l[Ne]=!0,e.push(vo(l));return}r.iterator=0,delete i.indexes[o]}let n=r.events;while(r.eventIndex<n.length){let o=n[r.eventIndex];if(r.eventIndex+=1,o===ut){if(i.nodes&&i.nodes.length)i[Ne]=!0,r.iterator=i.getIterator();return}else if(this.listeners[o]){r.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ne]=!0;let r=Na(e);for(let i of r)if(i===ut){if(e.nodes)e.each((s)=>{if(!s[Ne])this.walkSync(s)})}else{let s=this.listeners[i];if(s){if(this.visitSync(s,e.toProxy()))return}}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ht.registerPostcss=(t)=>{Ji=t};var Ra=ht;ht.default=ht;kh.registerLazyResult(ht);Oh.registerLazyResult(ht);var Fh=ua,Uh=zr,Bh=Sa,Wh=Rs,Vh=As,Zi=class{constructor(e,r,i){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=i,this._map=void 0;let s,n=Uh;this.result=new Vh(this._processor,s,this._opts),this.result.css=r;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Fh(n,s,this._opts,r);if(l.isMap()){let[a,c]=l.generate();if(a)this.result.css=a;if(c)this.result.map=c}else l.clearAnnotation(),this.result.css=l.css}async(){if(this.error)return Promise.reject(this.error);return Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){if(!("from"in this._opts))Bh("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.");return this.async().then(e,r)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=Wh;try{e=r(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;else return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},zh=Zi;Zi.default=Zi;var Gh=zh,Hh=Ra,Yh=Ts,jh=Ut,Ot=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let i of e){if(i.postcss===!0)i=i();else if(i.postcss)i=i.postcss;if(typeof i==="object"&&Array.isArray(i.plugins))r=r.concat(i.plugins);else if(typeof i==="object"&&i.postcssPlugin)r.push(i);else if(typeof i==="function")r.push(i);else if(typeof i==="object"&&(i.parse||i.stringify))throw 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.");else throw Error(i+" is not a PostCSS plugin")}return r}process(e,r={}){if(!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax)return new Gh(this,e,r);else return new Hh(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Kh=Ot;Ot.default=Ot;jh.registerProcessor(Ot);Yh.registerProcessor(Ot);var Xh=Hr,Jh=na,Zh=jr,qh=Ms,Qh=Yr,ef=Ut,tf=Ns;function _t(t,e){if(Array.isArray(t))return t.map((s)=>_t(s));let{inputs:r,...i}=t;if(r){e=[];for(let s of r){let n={...s,__proto__:Qh.prototype};if(n.map)n.map={...n.map,__proto__:Jh.prototype};e.push(n)}}if(i.nodes)i.nodes=t.nodes.map((s)=>_t(s,e));if(i.source){let{inputId:s,...n}=i.source;if(i.source=n,s!=null)i.source.input=e[s]}if(i.type==="root")return new ef(i);else if(i.type==="decl")return new Xh(i);else if(i.type==="rule")return new tf(i);else if(i.type==="comment")return new Zh(i);else if(i.type==="atrule")return new qh(i);else throw Error("Unknown node type: "+t.type)}var rf=_t;_t.default=_t;var sf=Es,Oa=Hr,nf=Ra,of=je,Os=Kh,af=zr,lf=rf,_a=Ts,cf=Ca,Da=jr,ka=Ms,uf=As,hf=Yr,ff=Rs,df=Aa,La=Ns,Pa=Ut,pf=Gr;function B(...t){if(t.length===1&&Array.isArray(t[0]))t=t[0];return new Os(t)}B.plugin=function(e,r){let i=!1;function s(...o){if(console&&console.warn&&!i){if(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
28
28
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn"))console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
29
- https://www.w3ctech.com/topic/2226`)}let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ws().version,l}let n;return Object.defineProperty(s,"postcss",{get(){if(!n)n=s();return n}}),s.process=function(o,l,a){return F([s(a)]).process(o,l)},s};F.stringify=Sh;F.parse=Ah;F.fromJSON=Ch;F.list=Mh;F.comment=(r)=>new la(r);F.atRule=(r)=>new ua(r);F.decl=(r)=>new oa(r);F.rule=(r)=>new ca(r);F.root=(r)=>new ha(r);F.document=(r)=>new aa(r);F.CssSyntaxError=vh;F.Declaration=oa;F.Container=bh;F.Processor=ws;F.Document=aa;F.Comment=la;F.Warning=Eh;F.AtRule=ua;F.Result=Ih;F.Input=xh;F.Rule=ca;F.Root=ha;F.Node=Th;wh.registerPostcss(F);var Nh=F;F.default=F;var j=Uu(Nh);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;var Rh=Object.defineProperty,Oh=(r,e,t)=>(e in r)?Rh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,de=(r,e,t)=>Oh(r,typeof e!=="symbol"?e+"":e,t);function Dh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function _h(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){if(this instanceof i)return Reflect.construct(e,arguments,this.constructor);return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),t}var bs={exports:{}},G=String,fa=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};bs.exports=fa();bs.exports.createColors=fa;var kh=bs.exports,Lh={},Ph=Object.freeze(Object.defineProperty({__proto__:null,default:Lh},Symbol.toStringTag,{value:"Module"})),we=_h(Ph),Yn=kh,Zn=we,Bi=class r extends Error{constructor(e,t,i,s,n,o){super(e);if(this.name="CssSyntaxError",this.reason=e,n)this.file=n;if(s)this.source=s;if(o)this.plugin=o;if(typeof t<"u"&&typeof i<"u")if(typeof t==="number")this.line=t,this.column=i;else this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,r)}setMessage(){if(this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u")this.message+=":"+this.line+":"+this.column;this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;if(e==null)e=Yn.isColorSupported;if(Zn){if(e)t=Zn(t)}let i=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,i.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:f}=Yn.createColors(!0);l=(p)=>u(f(p)),a=(p)=>c(p)}else l=a=(u)=>u;return i.slice(s,n).map((u,c)=>{let f=s+1+c,p=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
30
- `+d+l("^")}return" "+a(p)+u}).join(`
29
+ https://www.w3ctech.com/topic/2226`)}let l=r(...o);return l.postcssPlugin=e,l.postcssVersion=new Os().version,l}let n;return Object.defineProperty(s,"postcss",{get(){if(!n)n=s();return n}}),s.process=function(o,l,a){return B([s(a)]).process(o,l)},s};B.stringify=af;B.parse=ff;B.fromJSON=lf;B.list=df;B.comment=(t)=>new Da(t);B.atRule=(t)=>new ka(t);B.decl=(t)=>new Oa(t);B.rule=(t)=>new La(t);B.root=(t)=>new Pa(t);B.document=(t)=>new _a(t);B.CssSyntaxError=sf;B.Declaration=Oa;B.Container=of;B.Processor=Os;B.Document=_a;B.Comment=Da;B.Warning=cf;B.AtRule=ka;B.Result=uf;B.Input=hf;B.Rule=La;B.Root=Pa;B.Node=pf;nf.registerPostcss(B);var mf=B;B.default=B;var X=Iu(mf);X.stringify;X.fromJSON;X.plugin;X.parse;X.list;X.document;X.comment;X.atRule;X.rule;X.decl;X.root;X.CssSyntaxError;X.Declaration;X.Container;X.Processor;X.Document;X.Comment;X.Warning;X.AtRule;X.Result;X.Input;X.Rule;X.Root;X.Node;var gf=Object.defineProperty,yf=(t,e,r)=>(e in t)?gf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,be=(t,e,r)=>yf(t,typeof e!=="symbol"?e+"":e,r);function vf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wf(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function i(){if(this instanceof i)return Reflect.construct(e,arguments,this.constructor);return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}),r}var _s={exports:{}},j=String,$a=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};_s.exports=$a();_s.exports.createColors=$a;var bf=_s.exports,Sf={},Cf=Object.freeze(Object.defineProperty({__proto__:null,default:Sf},Symbol.toStringTag,{value:"Module"})),Ie=wf(Cf),wo=bf,bo=Ie,qi=class t extends Error{constructor(e,r,i,s,n,o){super(e);if(this.name="CssSyntaxError",this.reason=e,n)this.file=n;if(s)this.source=s;if(o)this.plugin=o;if(typeof r<"u"&&typeof i<"u")if(typeof r==="number")this.line=r,this.column=i;else this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,t)}setMessage(){if(this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u")this.message+=":"+this.line+":"+this.column;this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;if(e==null)e=wo.isColorSupported;if(bo){if(e)r=bo(r)}let i=r.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,i.length),o=String(n).length,l,a;if(e){let{bold:c,gray:u,red:h}=wo.createColors(!0);l=(p)=>c(h(p)),a=(p)=>u(p)}else l=a=(c)=>c;return i.slice(s,n).map((c,u)=>{let h=s+1+u,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let d=a(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+c+`
30
+ `+d+l("^")}return" "+a(p)+c}).join(`
31
31
  `)}toString(){let e=this.showSourceCode();if(e)e=`
32
32
 
33
33
  `+e+`
34
- `;return this.name+": "+this.message+e}},Ss=Bi;Bi.default=Bi;var kt={};kt.isClean=Symbol("isClean");kt.my=Symbol("my");var Xn={after:`
34
+ `;return this.name+": "+this.message+e}},Ds=qi;qi.default=qi;var Bt={};Bt.isClean=Symbol("isClean");Bt.my=Symbol("my");var So={after:`
35
35
  `,beforeClose:`
36
36
  `,beforeComment:`
37
37
  `,beforeDecl:`
38
38
  `,beforeOpen:" ",beforeRule:`
39
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function $h(r){return r[0].toUpperCase()+r.slice(1)}var Wi=class{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u")i+=e.raws.afterName;else if(s)i+=" ";if(e.nodes)this.block(e,i+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(i+s+n,e)}}beforeAfter(e,t){let i;if(e.type==="decl")i=this.raw(e,null,"beforeDecl");else if(e.type==="comment")i=this.raw(e,null,"beforeComment");else if(t==="before")i=this.raw(e,null,"beforeRule");else i=this.raw(e,null,"beforeClose");let s=e.parent,n=0;while(s&&s.type!=="root")n+=1,s=s.parent;if(i.includes(`
40
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)i+=o}return i}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let s;if(e.nodes&&e.nodes.length)this.body(e),s=this.raw(e,"after");else s=this.raw(e,"after","emptyBody");if(s)this.builder(s);this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;while(t>0){if(e.nodes[t].type!=="comment")break;t-=1}let i=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");if(o)this.builder(o);this.stringify(n,t!==s||i)}}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),s=e.prop+i+this.rawValue(e,"value");if(e.important)s+=e.raws.important||" !important";if(t)s+=";";this.builder(s,e)}document(e){this.body(e)}raw(e,t,i){let s;if(!i)i=t;if(t){if(s=e.raws[t],typeof s<"u")return s}let n=e.parent;if(i==="before"){if(!n||n.type==="root"&&n.first===e)return"";if(n&&n.type==="document")return""}if(!n)return Xn[i];let o=e.root();if(!o.rawCache)o.rawCache={};if(typeof o.rawCache[i]<"u")return o.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);else{let l="raw"+$h(i);if(this[l])s=this[l](o,e);else o.walk((a)=>{if(s=a.raws[t],typeof s<"u")return!1})}if(typeof s>"u")s=Xn[i];return o.rawCache[i]=s,s}rawBeforeClose(e){let t;if(e.walk((i)=>{if(i.nodes&&i.nodes.length>0){if(typeof i.raws.after<"u"){if(t=i.raws.after,t.includes(`
41
- `))t=t.replace(/[^\n]+$/,"");return!1}}}),t)t=t.replace(/\S/g,"");return t}rawBeforeComment(e,t){let i;if(e.walkComments((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
42
- `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(t,null,"beforeDecl");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeDecl(e,t){let i;if(e.walkDecls((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
43
- `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(t,null,"beforeRule");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeOpen(e){let t;return e.walk((i)=>{if(i.type!=="decl"){if(t=i.raws.between,typeof t<"u")return!1}}),t}rawBeforeRule(e){let t;if(e.walk((i)=>{if(i.nodes&&(i.parent!==e||e.first!==i)){if(typeof i.raws.before<"u"){if(t=i.raws.before,t.includes(`
44
- `))t=t.replace(/[^\n]+$/,"");return!1}}}),t)t=t.replace(/\S/g,"");return t}rawColon(e){let t;return e.walkDecls((i)=>{if(typeof i.raws.between<"u")return t=i.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk((i)=>{if(i.nodes&&i.nodes.length===0){if(t=i.raws.after,typeof t<"u")return!1}}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((i)=>{let s=i.parent;if(s&&s!==e&&s.parent&&s.parent===e){if(typeof i.raws.before<"u"){let n=i.raws.before.split(`
45
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}}),t}rawSemicolon(e){let t;return e.walk((i)=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"){if(t=i.raws.semicolon,typeof t<"u")return!1}}),t}rawValue(e,t){let i=e[t],s=e.raws[t];if(s&&s.value===i)return s.raw;return i}root(e){if(this.body(e),e.raws.after)this.builder(e.raws.after)}rule(e){if(this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon)this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},da=Wi;Wi.default=Wi;var Fh=da;function zi(r,e){new Fh(e).stringify(r)}var zr=zi;zi.default=zi;var{isClean:or,my:Uh}=kt,Bh=Ss,Wh=da,zh=zr;function Vi(r,e){let t=new r.constructor;for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;if(i==="proxyCache")continue;let s=r[i],n=typeof s;if(i==="parent"&&n==="object"){if(e)t[i]=e}else if(i==="source")t[i]=s;else if(Array.isArray(s))t[i]=s.map((o)=>Vi(o,t));else{if(n==="object"&&s!==null)s=Vi(s);t[i]=s}}return t}var Gi=class{constructor(e={}){this.raws={},this[or]=!1,this[Uh]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let i of e[t])if(typeof i.clone==="function")this.append(i.clone());else this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){if(delete this.raws.before,delete this.raws.after,!e)delete this.raws.between}clone(e={}){let t=Vi(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:i.column,line:i.line},t)}return new Bh(e)}getProxyProcessor(){return{get(e,t){if(t==="proxyOf")return e;else if(t==="root")return()=>e.root().toProxy();else return e[t]},set(e,t,i){if(e[t]===i)return!0;if(e[t]=i,t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")e.markDirty();return!0}}}markDirty(){if(this[or]){this[or]=!1;let e=this;while(e=e.parent)e[or]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);if(s!==-1)i=this.positionInside(s,t)}return i}positionInside(e,t){let i=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)if(i[o]===`
46
- `)s=1,n+=1;else s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);if(n!==-1)t=this.positionInside(n,s),i=this.positionInside(n+e.word.length,s)}else{if(e.start)t={column:e.start.column,line:e.start.line};else if(e.index)t=this.positionInside(e.index);if(e.end)i={column:e.end.column,line:e.end.line};else if(typeof e.endIndex==="number")i=this.positionInside(e.endIndex);else if(e.index)i=this.positionInside(e.index+1)}if(i.line<t.line||i.line===t.line&&i.column<=t.column)i={column:t.column+1,line:t.line};return{end:i,start:t}}raw(e,t){return new Wh().raw(this,e,t)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,i=!1;for(let s of e)if(s===this)i=!0;else if(i)this.parent.insertAfter(t,s),t=s;else this.parent.insertBefore(t,s);if(!i)this.remove()}return this}root(){let e=this;while(e.parent&&e.parent.type!=="document")e=e.parent;return e}toJSON(e,t){let i={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o))continue;if(o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))i[o]=l.map((a)=>{if(typeof a==="object"&&a.toJSON)return a.toJSON(null,t);else return a});else if(typeof l==="object"&&l.toJSON)i[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);if(a==null)a=n,t.set(l.input,n),n++;i[o]={end:l.end,inputId:a,start:l.start}}else i[o]=l}if(s)i.inputs=[...t.keys()].map((o)=>o.toJSON());return i}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(e=zh){if(e.stringify)e=e.stringify;let t="";return e(this,(i)=>{t+=i}),t}warn(e,t,i){let s={node:this};for(let n in i)s[n]=i[n];return e.warn(t,s)}get proxyOf(){return this}},Vr=Gi;Gi.default=Gi;var Vh=Vr,Hi=class extends Vh{constructor(e){if(e&&typeof e.value<"u"&&typeof e.value!=="string")e={...e,value:String(e.value)};super(e);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Gr=Hi;Hi.default=Hi;var Gh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Hh=(r,e=21)=>(t=e)=>{let i="",s=t;while(s--)i+=r[Math.random()*r.length|0];return i},jh=(r=21)=>{let e="",t=r;while(t--)e+=Gh[Math.random()*64|0];return e},Yh={nanoid:jh,customAlphabet:Hh},{SourceMapConsumer:Kn,SourceMapGenerator:Jn}=we,{existsSync:Zh,readFileSync:Xh}=we,{dirname:gi,join:Kh}=we;function Jh(r){if(Buffer)return Buffer.from(r,"base64").toString();else return window.atob(r)}var ji=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,s=this.loadMap(t.from,i);if(!this.mapFile&&t.from)this.mapFile=t.from;if(this.mapFile)this.root=gi(this.mapFile);if(s)this.text=s}consumer(){if(!this.consumerCache)this.consumerCache=new Kn(this.text);return this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||i.test(e))return Jh(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){if(typeof e!=="object")return!1;return typeof e.mappings==="string"||typeof e._mappings==="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let i=e.lastIndexOf(t.pop()),s=e.indexOf("*/",i);if(i>-1&&s>-1)this.annotation=this.getAnnotationURL(e.substring(i,s))}loadFile(e){if(this.root=gi(e),Zh(e))return this.mapFile=e,Xh(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t)if(typeof t==="string")return t;else if(typeof t==="function"){let i=t(e);if(i){let s=this.loadFile(i);if(!s)throw Error("Unable to load previous source map: "+i.toString());return s}}else if(t instanceof Kn)return Jn.fromSourceMap(t).toString();else if(t instanceof Jn)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let i=this.annotation;if(e)i=Kh(gi(e),i);return this.loadFile(i)}}startWith(e,t){if(!e)return!1;return e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},pa=ji;ji.default=ji;var{SourceMapConsumer:qh,SourceMapGenerator:Qh}=we,{fileURLToPath:qn,pathToFileURL:ar}=we,{isAbsolute:Yi,resolve:Zi}=we,{nanoid:ef}=Yh,yi=we,Qn=Ss,tf=pa,vi=Symbol("fromOffsetCache"),rf=Boolean(qh&&Qh),eo=Boolean(Zi&&Yi),Rr=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e==="object"&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(t.from)if(!eo||/^\w+:\/\//.test(t.from)||Yi(t.from))this.file=t.from;else this.file=Zi(t.from);if(eo&&rf){let i=new tf(this.css,t);if(i.text){this.map=i;let s=i.consumer().file;if(!this.file&&s)this.file=this.mapResolve(s)}}if(!this.file)this.id="<input css "+ef(6)+">";if(this.map)this.map.file=this.from}error(e,t,i,s={}){let n,o,l;if(t&&typeof t==="object"){let u=t,c=i;if(typeof u.offset==="number"){let f=this.fromOffset(u.offset);t=f.line,i=f.col}else t=u.line,i=u.column;if(typeof c.offset==="number"){let f=this.fromOffset(c.offset);o=f.line,l=f.col}else o=c.line,l=c.column}else if(!i){let u=this.fromOffset(t);t=u.line,i=u.col}let a=this.origin(t,i,o,l);if(a)n=new Qn(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin);else n=new Qn(e,o===void 0?t:{column:i,line:t},o===void 0?i:{column:l,line:o},this.css,this.file,s.plugin);if(n.input={column:i,endColumn:l,endLine:o,line:t,source:this.css},this.file){if(ar)n.input.url=ar(this.file).toString();n.input.file=this.file}return n}fromOffset(e){let t,i;if(!this[vi]){let n=this.css.split(`
47
- `);i=Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)i[l]=o,o+=n[l].length+1;this[vi]=i}else i=this[vi];t=i[i.length-1];let s=0;if(e>=t)s=i.length-1;else{let n=i.length-2,o;while(s<n)if(o=s+(n-s>>1),e<i[o])n=o-1;else if(e>=i[o+1])s=o+1;else{s=o;break}}return{col:e-i[s]+1,line:s+1}}mapResolve(e){if(/^\w+:\/\//.test(e))return e;return Zi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;if(typeof i==="number")l=n.originalPositionFor({column:s,line:i});let a;if(Yi(o.source))a=ar(o.source);else a=new URL(o.source,this.map.consumer().sourceRoot||ar(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(qn)u.file=qn(a);else throw Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);if(c)u.source=c;return u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])if(this[t]!=null)e[t]=this[t];if(this.map){if(e.map={...this.map},e.map.consumerCache)e.map.consumerCache=void 0}return e}get from(){return this.file||this.id}},Hr=Rr;Rr.default=Rr;if(yi&&yi.registerInput)yi.registerInput(Rr);var{SourceMapConsumer:ma,SourceMapGenerator:br}=we,{dirname:Sr,relative:ga,resolve:ya,sep:va}=we,{pathToFileURL:to}=we,sf=Hr,nf=Boolean(ma&&br),of=Boolean(Sr&&ya&&ga&&va),af=class{constructor(e,t,i,s){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;if(this.isInline())e="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")e=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")e=this.mapOpts.annotation(this.opts.to,this.root);else e=this.outputFile()+".map";let t=`
39
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ef(t){return t[0].toUpperCase()+t.slice(1)}var Qi=class{constructor(e){this.builder=e}atrule(e,r){let i="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u")i+=e.raws.afterName;else if(s)i+=" ";if(e.nodes)this.block(e,i+s);else{let n=(e.raws.between||"")+(r?";":"");this.builder(i+s+n,e)}}beforeAfter(e,r){let i;if(e.type==="decl")i=this.raw(e,null,"beforeDecl");else if(e.type==="comment")i=this.raw(e,null,"beforeComment");else if(r==="before")i=this.raw(e,null,"beforeRule");else i=this.raw(e,null,"beforeClose");let s=e.parent,n=0;while(s&&s.type!=="root")n+=1,s=s.parent;if(i.includes(`
40
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)i+=o}return i}block(e,r){let i=this.raw(e,"between","beforeOpen");this.builder(r+i+"{",e,"start");let s;if(e.nodes&&e.nodes.length)this.body(e),s=this.raw(e,"after");else s=this.raw(e,"after","emptyBody");if(s)this.builder(s);this.builder("}",e,"end")}body(e){let r=e.nodes.length-1;while(r>0){if(e.nodes[r].type!=="comment")break;r-=1}let i=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");if(o)this.builder(o);this.stringify(n,r!==s||i)}}comment(e){let r=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+r+e.text+i+"*/",e)}decl(e,r){let i=this.raw(e,"between","colon"),s=e.prop+i+this.rawValue(e,"value");if(e.important)s+=e.raws.important||" !important";if(r)s+=";";this.builder(s,e)}document(e){this.body(e)}raw(e,r,i){let s;if(!i)i=r;if(r){if(s=e.raws[r],typeof s<"u")return s}let n=e.parent;if(i==="before"){if(!n||n.type==="root"&&n.first===e)return"";if(n&&n.type==="document")return""}if(!n)return So[i];let o=e.root();if(!o.rawCache)o.rawCache={};if(typeof o.rawCache[i]<"u")return o.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);else{let l="raw"+Ef(i);if(this[l])s=this[l](o,e);else o.walk((a)=>{if(s=a.raws[r],typeof s<"u")return!1})}if(typeof s>"u")s=So[i];return o.rawCache[i]=s,s}rawBeforeClose(e){let r;if(e.walk((i)=>{if(i.nodes&&i.nodes.length>0){if(typeof i.raws.after<"u"){if(r=i.raws.after,r.includes(`
41
+ `))r=r.replace(/[^\n]+$/,"");return!1}}}),r)r=r.replace(/\S/g,"");return r}rawBeforeComment(e,r){let i;if(e.walkComments((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
42
+ `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(r,null,"beforeDecl");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeDecl(e,r){let i;if(e.walkDecls((s)=>{if(typeof s.raws.before<"u"){if(i=s.raws.before,i.includes(`
43
+ `))i=i.replace(/[^\n]+$/,"");return!1}}),typeof i>"u")i=this.raw(r,null,"beforeRule");else if(i)i=i.replace(/\S/g,"");return i}rawBeforeOpen(e){let r;return e.walk((i)=>{if(i.type!=="decl"){if(r=i.raws.between,typeof r<"u")return!1}}),r}rawBeforeRule(e){let r;if(e.walk((i)=>{if(i.nodes&&(i.parent!==e||e.first!==i)){if(typeof i.raws.before<"u"){if(r=i.raws.before,r.includes(`
44
+ `))r=r.replace(/[^\n]+$/,"");return!1}}}),r)r=r.replace(/\S/g,"");return r}rawColon(e){let r;return e.walkDecls((i)=>{if(typeof i.raws.between<"u")return r=i.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk((i)=>{if(i.nodes&&i.nodes.length===0){if(r=i.raws.after,typeof r<"u")return!1}}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk((i)=>{let s=i.parent;if(s&&s!==e&&s.parent&&s.parent===e){if(typeof i.raws.before<"u"){let n=i.raws.before.split(`
45
+ `);return r=n[n.length-1],r=r.replace(/\S/g,""),!1}}}),r}rawSemicolon(e){let r;return e.walk((i)=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"){if(r=i.raws.semicolon,typeof r<"u")return!1}}),r}rawValue(e,r){let i=e[r],s=e.raws[r];if(s&&s.value===i)return s.raw;return i}root(e){if(this.body(e),e.raws.after)this.builder(e.raws.after)}rule(e){if(this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon)this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,r){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}},Fa=Qi;Qi.default=Qi;var If=Fa;function es(t,e){new If(e).stringify(t)}var Kr=es;es.default=es;var{isClean:fr,my:xf}=Bt,Tf=Ds,Af=Fa,Mf=Kr;function ts(t,e){let r=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;if(i==="proxyCache")continue;let s=t[i],n=typeof s;if(i==="parent"&&n==="object"){if(e)r[i]=e}else if(i==="source")r[i]=s;else if(Array.isArray(s))r[i]=s.map((o)=>ts(o,r));else{if(n==="object"&&s!==null)s=ts(s);r[i]=s}}return r}var rs=class{constructor(e={}){this.raws={},this[fr]=!1,this[xf]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let i of e[r])if(typeof i.clone==="function")this.append(i.clone());else this.append(i)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){if(delete this.raws.before,delete this.raws.after,!e)delete this.raws.between}clone(e={}){let r=ts(this);for(let i in e)r[i]=e[i];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:i,start:s}=this.rangeBy(r);return this.source.input.error(e,{column:s.column,line:s.line},{column:i.column,line:i.line},r)}return new Tf(e)}getProxyProcessor(){return{get(e,r){if(r==="proxyOf")return e;else if(r==="root")return()=>e.root().toProxy();else return e[r]},set(e,r,i){if(e[r]===i)return!0;if(e[r]=i,r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")e.markDirty();return!0}}}markDirty(){if(this[fr]){this[fr]=!1;let e=this;while(e=e.parent)e[fr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,r){let i=this.source.start;if(e.index)i=this.positionInside(e.index,r);else if(e.word){r=this.toString();let s=r.indexOf(e.word);if(s!==-1)i=this.positionInside(s,r)}return i}positionInside(e,r){let i=r||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)if(i[o]===`
46
+ `)s=1,n+=1;else s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);if(n!==-1)r=this.positionInside(n,s),i=this.positionInside(n+e.word.length,s)}else{if(e.start)r={column:e.start.column,line:e.start.line};else if(e.index)r=this.positionInside(e.index);if(e.end)i={column:e.end.column,line:e.end.line};else if(typeof e.endIndex==="number")i=this.positionInside(e.endIndex);else if(e.index)i=this.positionInside(e.index+1)}if(i.line<r.line||i.line===r.line&&i.column<=r.column)i={column:r.column+1,line:r.line};return{end:i,start:r}}raw(e,r){return new Af().raw(this,e,r)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...e){if(this.parent){let r=this,i=!1;for(let s of e)if(s===this)i=!0;else if(i)this.parent.insertAfter(r,s),r=s;else this.parent.insertBefore(r,s);if(!i)this.remove()}return this}root(){let e=this;while(e.parent&&e.parent.type!=="document")e=e.parent;return e}toJSON(e,r){let i={},s=r==null;r=r||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o))continue;if(o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))i[o]=l.map((a)=>{if(typeof a==="object"&&a.toJSON)return a.toJSON(null,r);else return a});else if(typeof l==="object"&&l.toJSON)i[o]=l.toJSON(null,r);else if(o==="source"){let a=r.get(l.input);if(a==null)a=n,r.set(l.input,n),n++;i[o]={end:l.end,inputId:a,start:l.start}}else i[o]=l}if(s)i.inputs=[...r.keys()].map((o)=>o.toJSON());return i}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(e=Mf){if(e.stringify)e=e.stringify;let r="";return e(this,(i)=>{r+=i}),r}warn(e,r,i){let s={node:this};for(let n in i)s[n]=i[n];return e.warn(r,s)}get proxyOf(){return this}},Xr=rs;rs.default=rs;var Nf=Xr,is=class extends Nf{constructor(e){if(e&&typeof e.value<"u"&&typeof e.value!=="string")e={...e,value:String(e.value)};super(e);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Jr=is;is.default=is;var Rf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Of=(t,e=21)=>(r=e)=>{let i="",s=r;while(s--)i+=t[Math.random()*t.length|0];return i},_f=(t=21)=>{let e="",r=t;while(r--)e+=Rf[Math.random()*64|0];return e},Df={nanoid:_f,customAlphabet:Of},{SourceMapConsumer:Co,SourceMapGenerator:Eo}=Ie,{existsSync:kf,readFileSync:Lf}=Ie,{dirname:Mi,join:Pf}=Ie;function $f(t){if(Buffer)return Buffer.from(t,"base64").toString();else return window.atob(t)}var ss=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=r.map?r.map.prev:void 0,s=this.loadMap(r.from,i);if(!this.mapFile&&r.from)this.mapFile=r.from;if(this.mapFile)this.root=Mi(this.mapFile);if(s)this.text=s}consumer(){if(!this.consumerCache)this.consumerCache=new Co(this.text);return this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(r.test(e)||i.test(e))return $f(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){if(typeof e!=="object")return!1;return typeof e.mappings==="string"||typeof e._mappings==="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!r)return;let i=e.lastIndexOf(r.pop()),s=e.indexOf("*/",i);if(i>-1&&s>-1)this.annotation=this.getAnnotationURL(e.substring(i,s))}loadFile(e){if(this.root=Mi(e),kf(e))return this.mapFile=e,Lf(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r)if(typeof r==="string")return r;else if(typeof r==="function"){let i=r(e);if(i){let s=this.loadFile(i);if(!s)throw Error("Unable to load previous source map: "+i.toString());return s}}else if(r instanceof Co)return Eo.fromSourceMap(r).toString();else if(r instanceof Eo)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error("Unsupported previous source map format: "+r.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let i=this.annotation;if(e)i=Pf(Mi(e),i);return this.loadFile(i)}}startWith(e,r){if(!e)return!1;return e.substr(0,r.length)===r}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Ua=ss;ss.default=ss;var{SourceMapConsumer:Ff,SourceMapGenerator:Uf}=Ie,{fileURLToPath:Io,pathToFileURL:dr}=Ie,{isAbsolute:ns,resolve:os}=Ie,{nanoid:Bf}=Df,Ni=Ie,xo=Ds,Wf=Ua,Ri=Symbol("fromOffsetCache"),Vf=Boolean(Ff&&Uf),To=Boolean(os&&ns),Pr=class{constructor(e,r={}){if(e===null||typeof e>"u"||typeof e==="object"&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(r.from)if(!To||/^\w+:\/\//.test(r.from)||ns(r.from))this.file=r.from;else this.file=os(r.from);if(To&&Vf){let i=new Wf(this.css,r);if(i.text){this.map=i;let s=i.consumer().file;if(!this.file&&s)this.file=this.mapResolve(s)}}if(!this.file)this.id="<input css "+Bf(6)+">";if(this.map)this.map.file=this.from}error(e,r,i,s={}){let n,o,l;if(r&&typeof r==="object"){let c=r,u=i;if(typeof c.offset==="number"){let h=this.fromOffset(c.offset);r=h.line,i=h.col}else r=c.line,i=c.column;if(typeof u.offset==="number"){let h=this.fromOffset(u.offset);o=h.line,l=h.col}else o=u.line,l=u.column}else if(!i){let c=this.fromOffset(r);r=c.line,i=c.col}let a=this.origin(r,i,o,l);if(a)n=new xo(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin);else n=new xo(e,o===void 0?r:{column:i,line:r},o===void 0?i:{column:l,line:o},this.css,this.file,s.plugin);if(n.input={column:i,endColumn:l,endLine:o,line:r,source:this.css},this.file){if(dr)n.input.url=dr(this.file).toString();n.input.file=this.file}return n}fromOffset(e){let r,i;if(!this[Ri]){let n=this.css.split(`
47
+ `);i=Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)i[l]=o,o+=n[l].length+1;this[Ri]=i}else i=this[Ri];r=i[i.length-1];let s=0;if(e>=r)s=i.length-1;else{let n=i.length-2,o;while(s<n)if(o=s+(n-s>>1),e<i[o])n=o-1;else if(e>=i[o+1])s=o+1;else{s=o;break}}return{col:e-i[s]+1,line:s+1}}mapResolve(e){if(/^\w+:\/\//.test(e))return e;return os(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,i,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:r,line:e});if(!o.source)return!1;let l;if(typeof i==="number")l=n.originalPositionFor({column:s,line:i});let a;if(ns(o.source))a=dr(o.source);else a=new URL(o.source,this.map.consumer().sourceRoot||dr(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Io)c.file=Io(a);else throw Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);if(u)c.source=u;return c}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])if(this[r]!=null)e[r]=this[r];if(this.map){if(e.map={...this.map},e.map.consumerCache)e.map.consumerCache=void 0}return e}get from(){return this.file||this.id}},Zr=Pr;Pr.default=Pr;if(Ni&&Ni.registerInput)Ni.registerInput(Pr);var{SourceMapConsumer:Ba,SourceMapGenerator:Tr}=Ie,{dirname:Ar,relative:Wa,resolve:Va,sep:za}=Ie,{pathToFileURL:Ao}=Ie,zf=Zr,Gf=Boolean(Ba&&Tr),Hf=Boolean(Ar&&Va&&Wa&&za),Yf=class{constructor(e,r,i,s){this.stringify=e,this.mapOpts=i.map||{},this.root=r,this.opts=i,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;if(this.isInline())e="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")e=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")e=this.mapOpts.annotation(this.opts.to,this.root);else e=this.outputFile()+".map";let r=`
48
48
  `;if(this.css.includes(`\r
49
- `))t=`\r
50
- `;this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),i=e.root||Sr(e.file),s;if(this.mapOpts.sourcesContent===!1){if(s=new ma(e.text),s.sourcesContent)s.sourcesContent=null}else s=e.consumer();this.map.applySourceMap(s,t,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--){if(e=this.root.nodes[t],e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(t)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),of&&nf&&this.isMap())return this.generateMap();else{let e="";return this.stringify(this.root,(t)=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=br.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new br({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new br({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end")if(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start)s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s);if(n=l.match(/\n/g),n)e+=n.length,o=l.lastIndexOf(`
51
- `),t=l.length-o;else t+=l.length;if(a&&u!=="start"){let c=a.parent||{raws:{}};if(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)if(a.source&&a.source.end)s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((e)=>e.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;if(typeof e<"u"&&e!==!0)return!1;if(this.previous().length)return this.previous().some((t)=>t.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((e)=>e.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(e){if(this.mapOpts.absolute)return e;if(e.charCodeAt(0)===60)return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?Sr(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")i=Sr(ya(i,this.mapOpts.annotation));let s=ga(i,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e)=>{if(e.source&&e.source.input.map){let t=e.source.input.map;if(!this.previousMaps.includes(t))this.previousMaps.push(t)}});else{let e=new sf(this.originalCSS,this.opts);if(e.map)this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t)=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(e.source.input.from);else return this.toUrl(this.path(e.source.input.from))}toBase64(e){if(Buffer)return Buffer.from(e).toString("base64");else return window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(to){let i=to(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;if(va==="\\")e=e.replace(/\\/g,"/");let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}},wa=af,lf=Vr,Xi=class extends lf{constructor(e){super(e);this.type="comment"}},jr=Xi;Xi.default=Xi;var{isClean:ba,my:Sa}=kt,Ca=Gr,Ea=jr,uf=Vr,Ia,Cs,Es,xa;function Aa(r){return r.map((e)=>{if(e.nodes)e.nodes=Aa(e.nodes);return delete e.source,e})}function Ma(r){if(r[ba]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)Ma(e)}var Te=class r extends uf{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let s of i)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),i,s;while(this.indexes[t]<this.proxyOf.nodes.length){if(i=this.indexes[t],s=e(this.proxyOf.nodes[i],i),s===!1)break;this.indexes[t]+=1}return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if(t==="proxyOf")return e;else if(!e[t])return e[t];else if(t==="each"||typeof t==="string"&&t.startsWith("walk"))return(...i)=>e[t](...i.map((s)=>{if(typeof s==="function")return(n,o)=>s(n.toProxy(),o);else return s}));else if(t==="every"||t==="some")return(i)=>e[t]((s,...n)=>i(s.toProxy(),...n));else if(t==="root")return()=>e.root().toProxy();else if(t==="nodes")return e.nodes.map((i)=>i.toProxy());else if(t==="first"||t==="last")return e[t].toProxy();else return e[t]},set(e,t,i){if(e[t]===i)return!0;if(e[t]=i,t==="name"||t==="params"||t==="selector")e.markDirty();return!0}}}index(e){if(typeof e==="number")return e;if(e.proxyOf)e=e.proxyOf;return this.proxyOf.nodes.indexOf(e)}insertAfter(e,t){let i=this.index(e),s=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i+1,0,o);let n;for(let o in this.indexes)if(n=this.indexes[o],i<n)this.indexes[o]=n+s.length;return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),s=i===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[i],s).reverse();i=this.index(e);for(let l of n)this.proxyOf.nodes.splice(i,0,l);let o;for(let l in this.indexes)if(o=this.indexes[l],i<=o)this.indexes[l]=o+n.length;return this.markDirty(),this}normalize(e,t){if(typeof e==="string")e=Aa(Ia(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw Error("Value field is missed in node creation");else if(typeof e.value!=="string")e.value=String(e.value);e=[new Ca(e)]}else if(e.selector)e=[new Cs(e)];else if(e.name)e=[new Es(e)];else if(e.text)e=[new Ea(e)];else throw Error("Unknown node type in node creation");return e.map((s)=>{if(!s[Sa])r.rebuild(s);if(s=s.proxyOf,s.parent)s.parent.removeChild(s);if(s[ba])Ma(s);if(typeof s.raws.before>"u"){if(t&&typeof t.raws.before<"u")s.raws.before=t.raws.before.replace(/\S/g,"")}return s.parent=this.proxyOf,s})}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let s of i)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let i in this.indexes)if(t=this.indexes[i],t>=e)this.indexes[i]=t-1;return this.markDirty(),this}replaceValues(e,t,i){if(!i)i=t,t={};return this.walkDecls((s)=>{if(t.props&&!t.props.includes(s.prop))return;if(t.fast&&!s.value.includes(t.fast))return;s.value=s.value.replace(e,i)}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let s;try{s=e(t,i)}catch(n){throw t.addToError(n)}if(s!==!1&&t.walk)s=t.walk(e);return s})}walkAtRules(e,t){if(!t)return t=e,this.walk((i,s)=>{if(i.type==="atrule")return t(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,s)});return this.walk((i,s)=>{if(i.type==="atrule"&&i.name===e)return t(i,s)})}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){if(!t)return t=e,this.walk((i,s)=>{if(i.type==="decl")return t(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,s)});return this.walk((i,s)=>{if(i.type==="decl"&&i.prop===e)return t(i,s)})}walkRules(e,t){if(!t)return t=e,this.walk((i,s)=>{if(i.type==="rule")return t(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,s)});return this.walk((i,s)=>{if(i.type==="rule"&&i.selector===e)return t(i,s)})}get first(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Te.registerParse=(r)=>{Ia=r};Te.registerRule=(r)=>{Cs=r};Te.registerAtRule=(r)=>{Es=r};Te.registerRoot=(r)=>{xa=r};var ze=Te;Te.default=Te;Te.rebuild=(r)=>{if(r.type==="atrule")Object.setPrototypeOf(r,Es.prototype);else if(r.type==="rule")Object.setPrototypeOf(r,Cs.prototype);else if(r.type==="decl")Object.setPrototypeOf(r,Ca.prototype);else if(r.type==="comment")Object.setPrototypeOf(r,Ea.prototype);else if(r.type==="root")Object.setPrototypeOf(r,xa.prototype);if(r[Sa]=!0,r.nodes)r.nodes.forEach((e)=>{Te.rebuild(e)})};var cf=ze,Ta,Na,Mt=class extends cf{constructor(e){super({type:"document",...e});if(!this.nodes)this.nodes=[]}toResult(e={}){return new Ta(new Na,this,e).stringify()}};Mt.registerLazyResult=(r)=>{Ta=r};Mt.registerProcessor=(r)=>{Na=r};var Is=Mt;Mt.default=Mt;var ro={},Ra=function(e){if(ro[e])return;if(ro[e]=!0,typeof console<"u"&&console.warn)console.warn(e)},Ki=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},Oa=Ki;Ki.default=Ki;var hf=Oa,Ji=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){if(!t.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)t.plugin=this.lastPlugin.postcssPlugin}let i=new hf(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter((e)=>e.type==="warning")}get content(){return this.css}},xs=Ji;Ji.default=Ji;var wi=39,io=34,lr=92,so=47,ur=10,yt=32,cr=12,hr=9,fr=13,ff=91,df=93,pf=40,mf=41,gf=123,yf=125,vf=59,wf=42,bf=58,Sf=64,dr=/[\t\n\f\r "#'()/;[\\\]{}]/g,pr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cf=/.[\r\n"'(/\\]/,no=/[\da-f]/i,Ef=function(e,t={}){let i=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,u,c,f,p,d,g,m=i.length,h=0,b=[],w=[];function y(){return h}function C(S){throw e.error("Unclosed "+S,h)}function I(){return w.length===0&&h>=m}function E(S){if(w.length)return w.pop();if(h>=m)return;let _=S?S.ignoreUnclosed:!1;switch(n=i.charCodeAt(h),n){case ur:case yt:case hr:case fr:case cr:{o=h;do o+=1,n=i.charCodeAt(o);while(n===yt||n===ur||n===hr||n===fr||n===cr);g=["space",i.slice(h,o)],h=o-1;break}case ff:case df:case gf:case yf:case bf:case vf:case mf:{let k=String.fromCharCode(n);g=[k,k,h];break}case pf:{if(p=b.length?b.pop()[1]:"",d=i.charCodeAt(h+1),p==="url"&&d!==wi&&d!==io&&d!==yt&&d!==ur&&d!==hr&&d!==cr&&d!==fr){o=h;do{if(c=!1,o=i.indexOf(")",o+1),o===-1)if(s||_){o=h;break}else C("bracket");f=o;while(i.charCodeAt(f-1)===lr)f-=1,c=!c}while(c);g=["brackets",i.slice(h,o+1),h,o],h=o}else if(o=i.indexOf(")",h+1),a=i.slice(h,o+1),o===-1||Cf.test(a))g=["(","(",h];else g=["brackets",a,h,o],h=o;break}case wi:case io:{l=n===wi?"'":'"',o=h;do{if(c=!1,o=i.indexOf(l,o+1),o===-1)if(s||_){o=h+1;break}else C("string");f=o;while(i.charCodeAt(f-1)===lr)f-=1,c=!c}while(c);g=["string",i.slice(h,o+1),h,o],h=o;break}case Sf:{if(dr.lastIndex=h+1,dr.test(i),dr.lastIndex===0)o=i.length-1;else o=dr.lastIndex-2;g=["at-word",i.slice(h,o+1),h,o],h=o;break}case lr:{o=h,u=!0;while(i.charCodeAt(o+1)===lr)o+=1,u=!u;if(n=i.charCodeAt(o+1),u&&n!==so&&n!==yt&&n!==ur&&n!==hr&&n!==fr&&n!==cr){if(o+=1,no.test(i.charAt(o))){while(no.test(i.charAt(o+1)))o+=1;if(i.charCodeAt(o+1)===yt)o+=1}}g=["word",i.slice(h,o+1),h,o],h=o;break}default:{if(n===so&&i.charCodeAt(h+1)===wf){if(o=i.indexOf("*/",h+2)+1,o===0)if(s||_)o=i.length;else C("comment");g=["comment",i.slice(h,o+1),h,o],h=o}else{if(pr.lastIndex=h+1,pr.test(i),pr.lastIndex===0)o=i.length-1;else o=pr.lastIndex-2;g=["word",i.slice(h,o+1),h,o],b.push(g),h=o}break}}return h++,g}function x(S){w.push(S)}return{back:x,endOfFile:I,nextToken:E,position:y}},Da=ze,Or=class extends Da{constructor(e){super(e);this.type="atrule"}append(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...e)}prepend(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...e)}},As=Or;Or.default=Or;Da.registerAtRule(Or);var _a=ze,ka,La,nt=class extends _a{constructor(e){super(e);if(this.type="root",!this.nodes)this.nodes=[]}normalize(e,t,i){let s=super.normalize(e);if(t){if(i==="prepend")if(this.nodes.length>1)t.raws.before=this.nodes[1].raws.before;else delete t.raws.before;else if(this.first!==t)for(let n of s)n.raws.before=t.raws.before}return s}removeChild(e,t){let i=this.index(e);if(!t&&i===0&&this.nodes.length>1)this.nodes[1].raws.before=this.nodes[i].raws.before;return super.removeChild(e)}toResult(e={}){return new ka(new La,this,e).stringify()}};nt.registerLazyResult=(r)=>{ka=r};nt.registerProcessor=(r)=>{La=r};var Lt=nt;nt.default=nt;_a.registerRoot(nt);var Tt={comma(r){return Tt.split(r,[","],!0)},space(r){let e=[" ",`
52
- `,"\t"];return Tt.split(r,e)},split(r,e,t){let i=[],s="",n=!1,o=0,l=!1,a="",u=!1;for(let c of r){if(u)u=!1;else if(c==="\\")u=!0;else if(l){if(c===a)l=!1}else if(c==='"'||c==="'")l=!0,a=c;else if(c==="(")o+=1;else if(c===")"){if(o>0)o-=1}else if(o===0){if(e.includes(c))n=!0}if(n){if(s!=="")i.push(s.trim());s="",n=!1}else s+=c}if(t||s!=="")i.push(s.trim());return i}},Pa=Tt;Tt.default=Tt;var $a=ze,If=Pa,Dr=class extends $a{constructor(e){super(e);if(this.type="rule",!this.nodes)this.nodes=[]}get selectors(){return If.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}},Ms=Dr;Dr.default=Dr;$a.registerRule(Dr);var xf=Gr,Af=Ef,Mf=jr,Tf=As,Nf=Lt,oo=Ms,ao={empty:!0,space:!0};function Rf(r){for(let e=r.length-1;e>=0;e--){let t=r[e],i=t[3]||t[2];if(i)return i}}var Of=class{constructor(e){this.input=e,this.root=new Nf,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Tf;if(t.name=e[1].slice(1),t.name==="")this.unnamedAtrule(t,e);this.init(t,e[2]);let i,s,n,o=!1,l=!1,a=[],u=[];while(!this.tokenizer.endOfFile()){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="[")u.push(i==="("?")":"]");else if(i==="{"&&u.length>0)u.push("}");else if(i===u[u.length-1])u.pop();if(u.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){n=a.length-1,s=a[n];while(s&&s[0]==="space")s=a[--n];if(s)t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}if(t.raws.between=this.spacesAndCommentsFromEnd(a),a.length){if(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o)e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=""}else t.raws.afterName="",t.params="";if(l)t.nodes=[],this.current=t}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,s;for(let n=t-1;n>=0;n--)if(s=e[n],s[0]!=="space"){if(i+=1,i===2)break}throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,i,s,n;for(let[o,l]of e.entries()){if(i=l,s=i[0],s==="(")t+=1;if(s===")")t-=1;if(t===0&&s===":")if(!n)this.doubleColon(i);else if(n[0]==="word"&&n[1]==="progid")continue;else return o;n=i}return!1}comment(e){let t=new Mf;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Af(this.input)}decl(e,t){let i=new xf;this.init(i,e[0][2]);let s=e[e.length-1];if(s[0]===";")this.semicolon=!0,e.pop();i.source.end=this.getPosition(s[3]||s[2]||Rf(e)),i.source.end.offset++;while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);i.raws.before+=e.shift()[1]}i.source.start=this.getPosition(e[0][2]),i.prop="";while(e.length){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let n;while(e.length)if(n=e.shift(),n[0]===":"){i.raws.between+=n[1];break}else{if(n[0]==="word"&&/\w/.test(n[1]))this.unknownWord([n]);i.raws.between+=n[1]}if(i.prop[0]==="_"||i.prop[0]==="*")i.raws.before+=i.prop[0],i.prop=i.prop.slice(1);let o=[],l;while(e.length){if(l=e[0][0],l!=="space"&&l!=="comment")break;o.push(e.shift())}this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){i.important=!0;let c=this.stringFrom(e,u);if(c=this.spacesFromEnd(e)+c,c!==" !important")i.raws.important=c;break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let p=u;p>0;p--){let d=c[p][0];if(f.trim().indexOf("!")===0&&d!=="space")break;f=c.pop()[1]+f}if(f.trim().indexOf("!")===0)i.important=!0,i.raws.important=f,e=c}if(n[0]!=="space"&&n[0]!=="comment")break}if(e.some((u)=>u[0]!=="space"&&u[0]!=="comment"))i.raws.between+=o.map((u)=>u[1]).join(""),o=[];if(this.raw(i,"value",o.concat(e),t),i.value.includes(":")&&!t)this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new oo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(e)}endFile(){if(this.current.parent)this.unclosedBlock();if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];if(t&&t.type==="rule"&&!t.raws.ownSemicolon)t.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){if(this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment")this.semicolon=!1}other(e){let t=!1,i=null,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;while(u){if(i=u[0],a.push(u),i==="("||i==="["){if(!n)n=u;o.push(i==="("?")":"]")}else if(l&&s&&i==="{"){if(!n)n=u;o.push("}")}else if(o.length===0){if(i===";")if(s){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),t=!0;break}else if(i===":")s=!0}else if(i===o[o.length-1]){if(o.pop(),o.length===0)n=null}u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=!0;if(o.length>0)this.unclosedBracket(n);if(t&&s){if(!l)while(a.length){if(u=a[a.length-1][0],u!=="space"&&u!=="comment")break;this.tokenizer.back(a.pop())}this.decl(a,l)}else this.unknownWord(a)}parse(){let e;while(!this.tokenizer.endOfFile())switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,s){let n,o,l=i.length,a="",u=!0,c,f;for(let p=0;p<l;p+=1)if(n=i[p],o=n[0],o==="space"&&p===l-1&&!s)u=!1;else if(o==="comment")if(f=i[p-1]?i[p-1][0]:"empty",c=i[p+1]?i[p+1][0]:"empty",!ao[f]&&!ao[c])if(a.slice(-1)===",")u=!1;else a+=n[1];else u=!1;else a+=n[1];if(!u){let p=i.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new oo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";while(e.length){if(t=e[e.length-1][0],t!=="space"&&t!=="comment")break;i=e.pop()[1]+i}return i}spacesAndCommentsFromStart(e){let t,i="";while(e.length){if(t=e[0][0],t!=="space"&&t!=="comment")break;i+=e.shift()[1]}return i}spacesFromEnd(e){let t,i="";while(e.length){if(t=e[e.length-1][0],t!=="space")break;i=e.pop()[1]+i}return i}stringFrom(e,t){let i="";for(let s=t;s<e.length;s++)i+=e[s][1];return e.splice(t,e.length-t),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Df=Of,_f=ze,kf=Df,Lf=Hr;function _r(r,e){let t=new Lf(r,e),i=new kf(t);try{i.parse()}catch(s){if(s.name==="CssSyntaxError"&&e&&e.from){if(/\.scss$/i.test(e.from))s.message+=`
49
+ `))r=`\r
50
+ `;this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),i=e.root||Ar(e.file),s;if(this.mapOpts.sourcesContent===!1){if(s=new Ba(e.text),s.sourcesContent)s.sourcesContent=null}else s=e.consumer();this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--){if(e=this.root.nodes[r],e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(r)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),Hf&&Gf&&this.isMap())return this.generateMap();else{let e="";return this.stringify(this.root,(r)=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Tr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Tr({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new Tr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end")if(s.generated.line=e,s.generated.column=r-1,a.source&&a.source.start)s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s);if(n=l.match(/\n/g),n)e+=n.length,o=l.lastIndexOf(`
51
+ `),r=l.length-o;else r+=l.length;if(a&&c!=="start"){let u=a.parent||{raws:{}};if(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)if(a.source&&a.source.end)s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=r-2,this.map.addMapping(s);else s.source=i,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=r-1,this.map.addMapping(s)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((e)=>e.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;if(typeof e<"u"&&e!==!0)return!1;if(this.previous().length)return this.previous().some((r)=>r.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((e)=>e.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(e){if(this.mapOpts.absolute)return e;if(e.charCodeAt(0)===60)return e;if(/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let i=this.opts.to?Ar(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")i=Ar(Va(i,this.mapOpts.annotation));let s=Wa(i,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e)=>{if(e.source&&e.source.input.map){let r=e.source.input.map;if(!this.previousMaps.includes(r))this.previousMaps.push(r)}});else{let e=new zf(this.originalCSS,this.opts);if(e.map)this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((r)=>{if(r.source){let i=r.source.input.from;if(i&&!e[i]){e[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(s,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(e.source.input.from);else return this.toUrl(this.path(e.source.input.from))}toBase64(e){if(Buffer)return Buffer.from(e).toString("base64");else return window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(Ao){let i=Ao(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;if(za==="\\")e=e.replace(/\\/g,"/");let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}},Ga=Yf,jf=Xr,as=class extends jf{constructor(e){super(e);this.type="comment"}},qr=as;as.default=as;var{isClean:Ha,my:Ya}=Bt,ja=Jr,Ka=qr,Kf=Xr,Xa,ks,Ls,Ja;function Za(t){return t.map((e)=>{if(e.nodes)e.nodes=Za(e.nodes);return delete e.source,e})}function qa(t){if(t[Ha]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)qa(e)}var ke=class t extends Kf{append(...e){for(let r of e){let i=this.normalize(r,this.last);for(let s of i)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),i,s;while(this.indexes[r]<this.proxyOf.nodes.length){if(i=this.indexes[r],s=e(this.proxyOf.nodes[i],i),s===!1)break;this.indexes[r]+=1}return delete this.indexes[r],s}every(e){return this.nodes.every(e)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,r){if(r==="proxyOf")return e;else if(!e[r])return e[r];else if(r==="each"||typeof r==="string"&&r.startsWith("walk"))return(...i)=>e[r](...i.map((s)=>{if(typeof s==="function")return(n,o)=>s(n.toProxy(),o);else return s}));else if(r==="every"||r==="some")return(i)=>e[r]((s,...n)=>i(s.toProxy(),...n));else if(r==="root")return()=>e.root().toProxy();else if(r==="nodes")return e.nodes.map((i)=>i.toProxy());else if(r==="first"||r==="last")return e[r].toProxy();else return e[r]},set(e,r,i){if(e[r]===i)return!0;if(e[r]=i,r==="name"||r==="params"||r==="selector")e.markDirty();return!0}}}index(e){if(typeof e==="number")return e;if(e.proxyOf)e=e.proxyOf;return this.proxyOf.nodes.indexOf(e)}insertAfter(e,r){let i=this.index(e),s=this.normalize(r,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i+1,0,o);let n;for(let o in this.indexes)if(n=this.indexes[o],i<n)this.indexes[o]=n+s.length;return this.markDirty(),this}insertBefore(e,r){let i=this.index(e),s=i===0?"prepend":!1,n=this.normalize(r,this.proxyOf.nodes[i],s).reverse();i=this.index(e);for(let l of n)this.proxyOf.nodes.splice(i,0,l);let o;for(let l in this.indexes)if(o=this.indexes[l],i<=o)this.indexes[l]=o+n.length;return this.markDirty(),this}normalize(e,r){if(typeof e==="string")e=Za(Xa(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)if(s.parent)s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw Error("Value field is missed in node creation");else if(typeof e.value!=="string")e.value=String(e.value);e=[new ja(e)]}else if(e.selector)e=[new ks(e)];else if(e.name)e=[new Ls(e)];else if(e.text)e=[new Ka(e)];else throw Error("Unknown node type in node creation");return e.map((s)=>{if(!s[Ya])t.rebuild(s);if(s=s.proxyOf,s.parent)s.parent.removeChild(s);if(s[Ha])qa(s);if(typeof s.raws.before>"u"){if(r&&typeof r.raws.before<"u")s.raws.before=r.raws.before.replace(/\S/g,"")}return s.parent=this.proxyOf,s})}prepend(...e){e=e.reverse();for(let r of e){let i=this.normalize(r,this.first,"prepend").reverse();for(let s of i)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let i in this.indexes)if(r=this.indexes[i],r>=e)this.indexes[i]=r-1;return this.markDirty(),this}replaceValues(e,r,i){if(!i)i=r,r={};return this.walkDecls((s)=>{if(r.props&&!r.props.includes(s.prop))return;if(r.fast&&!s.value.includes(r.fast))return;s.value=s.value.replace(e,i)}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,i)=>{let s;try{s=e(r,i)}catch(n){throw r.addToError(n)}if(s!==!1&&r.walk)s=r.walk(e);return s})}walkAtRules(e,r){if(!r)return r=e,this.walk((i,s)=>{if(i.type==="atrule")return r(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="atrule"&&e.test(i.name))return r(i,s)});return this.walk((i,s)=>{if(i.type==="atrule"&&i.name===e)return r(i,s)})}walkComments(e){return this.walk((r,i)=>{if(r.type==="comment")return e(r,i)})}walkDecls(e,r){if(!r)return r=e,this.walk((i,s)=>{if(i.type==="decl")return r(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="decl"&&e.test(i.prop))return r(i,s)});return this.walk((i,s)=>{if(i.type==="decl"&&i.prop===e)return r(i,s)})}walkRules(e,r){if(!r)return r=e,this.walk((i,s)=>{if(i.type==="rule")return r(i,s)});if(e instanceof RegExp)return this.walk((i,s)=>{if(i.type==="rule"&&e.test(i.selector))return r(i,s)});return this.walk((i,s)=>{if(i.type==="rule"&&i.selector===e)return r(i,s)})}get first(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ke.registerParse=(t)=>{Xa=t};ke.registerRule=(t)=>{ks=t};ke.registerAtRule=(t)=>{Ls=t};ke.registerRoot=(t)=>{Ja=t};var Ke=ke;ke.default=ke;ke.rebuild=(t)=>{if(t.type==="atrule")Object.setPrototypeOf(t,Ls.prototype);else if(t.type==="rule")Object.setPrototypeOf(t,ks.prototype);else if(t.type==="decl")Object.setPrototypeOf(t,ja.prototype);else if(t.type==="comment")Object.setPrototypeOf(t,Ka.prototype);else if(t.type==="root")Object.setPrototypeOf(t,Ja.prototype);if(t[Ya]=!0,t.nodes)t.nodes.forEach((e)=>{ke.rebuild(e)})};var Xf=Ke,Qa,el,Dt=class extends Xf{constructor(e){super({type:"document",...e});if(!this.nodes)this.nodes=[]}toResult(e={}){return new Qa(new el,this,e).stringify()}};Dt.registerLazyResult=(t)=>{Qa=t};Dt.registerProcessor=(t)=>{el=t};var Ps=Dt;Dt.default=Dt;var Mo={},tl=function(e){if(Mo[e])return;if(Mo[e]=!0,typeof console<"u"&&console.warn)console.warn(e)},ls=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},rl=ls;ls.default=ls;var Jf=rl,cs=class{constructor(e,r,i){this.processor=e,this.messages=[],this.root=r,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,r={}){if(!r.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)r.plugin=this.lastPlugin.postcssPlugin}let i=new Jf(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((e)=>e.type==="warning")}get content(){return this.css}},$s=cs;cs.default=cs;var Oi=39,No=34,pr=92,Ro=47,mr=10,Et=32,gr=12,yr=9,vr=13,Zf=91,qf=93,Qf=40,ed=41,td=123,rd=125,id=59,sd=42,nd=58,od=64,wr=/[\t\n\f\r "#'()/;[\\\]{}]/g,br=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ad=/.[\r\n"'(/\\]/,Oo=/[\da-f]/i,ld=function(e,r={}){let i=e.css.valueOf(),s=r.ignoreErrors,n,o,l,a,c,u,h,p,d,g,m=i.length,f=0,b=[],w=[];function y(){return f}function C(S){throw e.error("Unclosed "+S,f)}function x(){return w.length===0&&f>=m}function I(S){if(w.length)return w.pop();if(f>=m)return;let A=S?S.ignoreUnclosed:!1;switch(n=i.charCodeAt(f),n){case mr:case Et:case yr:case vr:case gr:{o=f;do o+=1,n=i.charCodeAt(o);while(n===Et||n===mr||n===yr||n===vr||n===gr);g=["space",i.slice(f,o)],f=o-1;break}case Zf:case qf:case td:case rd:case nd:case id:case ed:{let M=String.fromCharCode(n);g=[M,M,f];break}case Qf:{if(p=b.length?b.pop()[1]:"",d=i.charCodeAt(f+1),p==="url"&&d!==Oi&&d!==No&&d!==Et&&d!==mr&&d!==yr&&d!==gr&&d!==vr){o=f;do{if(u=!1,o=i.indexOf(")",o+1),o===-1)if(s||A){o=f;break}else C("bracket");h=o;while(i.charCodeAt(h-1)===pr)h-=1,u=!u}while(u);g=["brackets",i.slice(f,o+1),f,o],f=o}else if(o=i.indexOf(")",f+1),a=i.slice(f,o+1),o===-1||ad.test(a))g=["(","(",f];else g=["brackets",a,f,o],f=o;break}case Oi:case No:{l=n===Oi?"'":'"',o=f;do{if(u=!1,o=i.indexOf(l,o+1),o===-1)if(s||A){o=f+1;break}else C("string");h=o;while(i.charCodeAt(h-1)===pr)h-=1,u=!u}while(u);g=["string",i.slice(f,o+1),f,o],f=o;break}case od:{if(wr.lastIndex=f+1,wr.test(i),wr.lastIndex===0)o=i.length-1;else o=wr.lastIndex-2;g=["at-word",i.slice(f,o+1),f,o],f=o;break}case pr:{o=f,c=!0;while(i.charCodeAt(o+1)===pr)o+=1,c=!c;if(n=i.charCodeAt(o+1),c&&n!==Ro&&n!==Et&&n!==mr&&n!==yr&&n!==vr&&n!==gr){if(o+=1,Oo.test(i.charAt(o))){while(Oo.test(i.charAt(o+1)))o+=1;if(i.charCodeAt(o+1)===Et)o+=1}}g=["word",i.slice(f,o+1),f,o],f=o;break}default:{if(n===Ro&&i.charCodeAt(f+1)===sd){if(o=i.indexOf("*/",f+2)+1,o===0)if(s||A)o=i.length;else C("comment");g=["comment",i.slice(f,o+1),f,o],f=o}else{if(br.lastIndex=f+1,br.test(i),br.lastIndex===0)o=i.length-1;else o=br.lastIndex-2;g=["word",i.slice(f,o+1),f,o],b.push(g),f=o}break}}return f++,g}function E(S){w.push(S)}return{back:E,endOfFile:x,nextToken:I,position:y}},il=Ke,$r=class extends il{constructor(e){super(e);this.type="atrule"}append(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...e)}prepend(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...e)}},Fs=$r;$r.default=$r;il.registerAtRule($r);var sl=Ke,nl,ol,ft=class extends sl{constructor(e){super(e);if(this.type="root",!this.nodes)this.nodes=[]}normalize(e,r,i){let s=super.normalize(e);if(r){if(i==="prepend")if(this.nodes.length>1)r.raws.before=this.nodes[1].raws.before;else delete r.raws.before;else if(this.first!==r)for(let n of s)n.raws.before=r.raws.before}return s}removeChild(e,r){let i=this.index(e);if(!r&&i===0&&this.nodes.length>1)this.nodes[1].raws.before=this.nodes[i].raws.before;return super.removeChild(e)}toResult(e={}){return new nl(new ol,this,e).stringify()}};ft.registerLazyResult=(t)=>{nl=t};ft.registerProcessor=(t)=>{ol=t};var Wt=ft;ft.default=ft;sl.registerRoot(ft);var kt={comma(t){return kt.split(t,[","],!0)},space(t){let e=[" ",`
52
+ `,"\t"];return kt.split(t,e)},split(t,e,r){let i=[],s="",n=!1,o=0,l=!1,a="",c=!1;for(let u of t){if(c)c=!1;else if(u==="\\")c=!0;else if(l){if(u===a)l=!1}else if(u==='"'||u==="'")l=!0,a=u;else if(u==="(")o+=1;else if(u===")"){if(o>0)o-=1}else if(o===0){if(e.includes(u))n=!0}if(n){if(s!=="")i.push(s.trim());s="",n=!1}else s+=u}if(r||s!=="")i.push(s.trim());return i}},al=kt;kt.default=kt;var ll=Ke,cd=al,Fr=class extends ll{constructor(e){super(e);if(this.type="rule",!this.nodes)this.nodes=[]}get selectors(){return cd.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,i=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}},Us=Fr;Fr.default=Fr;ll.registerRule(Fr);var ud=Jr,hd=ld,fd=qr,dd=Fs,pd=Wt,_o=Us,Do={empty:!0,space:!0};function md(t){for(let e=t.length-1;e>=0;e--){let r=t[e],i=r[3]||r[2];if(i)return i}}var gd=class{constructor(e){this.input=e,this.root=new pd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new dd;if(r.name=e[1].slice(1),r.name==="")this.unnamedAtrule(r,e);this.init(r,e[2]);let i,s,n,o=!1,l=!1,a=[],c=[];while(!this.tokenizer.endOfFile()){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="[")c.push(i==="("?")":"]");else if(i==="{"&&c.length>0)c.push("}");else if(i===c[c.length-1])c.pop();if(c.length===0)if(i===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){n=a.length-1,s=a[n];while(s&&s[0]==="space")s=a[--n];if(s)r.source.end=this.getPosition(s[3]||s[2]),r.source.end.offset++}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}if(r.raws.between=this.spacesAndCommentsFromEnd(a),a.length){if(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o)e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between=""}else r.raws.afterName="",r.params="";if(l)r.nodes=[],this.current=r}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let i=0,s;for(let n=r-1;n>=0;n--)if(s=e[n],s[0]!=="space"){if(i+=1,i===2)break}throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let r=0,i,s,n;for(let[o,l]of e.entries()){if(i=l,s=i[0],s==="(")r+=1;if(s===")")r-=1;if(r===0&&s===":")if(!n)this.doubleColon(i);else if(n[0]==="word"&&n[1]==="progid")continue;else return o;n=i}return!1}comment(e){let r=new fd;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=hd(this.input)}decl(e,r){let i=new ud;this.init(i,e[0][2]);let s=e[e.length-1];if(s[0]===";")this.semicolon=!0,e.pop();i.source.end=this.getPosition(s[3]||s[2]||md(e)),i.source.end.offset++;while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);i.raws.before+=e.shift()[1]}i.source.start=this.getPosition(e[0][2]),i.prop="";while(e.length){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let n;while(e.length)if(n=e.shift(),n[0]===":"){i.raws.between+=n[1];break}else{if(n[0]==="word"&&/\w/.test(n[1]))this.unknownWord([n]);i.raws.between+=n[1]}if(i.prop[0]==="_"||i.prop[0]==="*")i.raws.before+=i.prop[0],i.prop=i.prop.slice(1);let o=[],l;while(e.length){if(l=e[0][0],l!=="space"&&l!=="comment")break;o.push(e.shift())}this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){i.important=!0;let u=this.stringFrom(e,c);if(u=this.spacesFromEnd(e)+u,u!==" !important")i.raws.important=u;break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().indexOf("!")===0&&d!=="space")break;h=u.pop()[1]+h}if(h.trim().indexOf("!")===0)i.important=!0,i.raws.important=h,e=u}if(n[0]!=="space"&&n[0]!=="comment")break}if(e.some((c)=>c[0]!=="space"&&c[0]!=="comment"))i.raws.between+=o.map((c)=>c[1]).join(""),o=[];if(this.raw(i,"value",o.concat(e),r),i.value.includes(":")&&!r)this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new _o;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(e)}endFile(){if(this.current.parent)this.unclosedBlock();if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];if(r&&r.type==="rule"&&!r.raws.ownSemicolon)r.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){if(this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment")this.semicolon=!1}other(e){let r=!1,i=null,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;while(c){if(i=c[0],a.push(c),i==="("||i==="["){if(!n)n=c;o.push(i==="("?")":"]")}else if(l&&s&&i==="{"){if(!n)n=c;o.push("}")}else if(o.length===0){if(i===";")if(s){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),r=!0;break}else if(i===":")s=!0}else if(i===o[o.length-1]){if(o.pop(),o.length===0)n=null}c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())r=!0;if(o.length>0)this.unclosedBracket(n);if(r&&s){if(!l)while(a.length){if(c=a[a.length-1][0],c!=="space"&&c!=="comment")break;this.tokenizer.back(a.pop())}this.decl(a,l)}else this.unknownWord(a)}parse(){let e;while(!this.tokenizer.endOfFile())switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,i,s){let n,o,l=i.length,a="",c=!0,u,h;for(let p=0;p<l;p+=1)if(n=i[p],o=n[0],o==="space"&&p===l-1&&!s)c=!1;else if(o==="comment")if(h=i[p-1]?i[p-1][0]:"empty",u=i[p+1]?i[p+1][0]:"empty",!Do[h]&&!Do[u])if(a.slice(-1)===",")c=!1;else a+=n[1];else c=!1;else a+=n[1];if(!c){let p=i.reduce((d,g)=>d+g[1],"");e.raws[r]={raw:p,value:a}}e[r]=a}rule(e){e.pop();let r=new _o;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,i="";while(e.length){if(r=e[e.length-1][0],r!=="space"&&r!=="comment")break;i=e.pop()[1]+i}return i}spacesAndCommentsFromStart(e){let r,i="";while(e.length){if(r=e[0][0],r!=="space"&&r!=="comment")break;i+=e.shift()[1]}return i}spacesFromEnd(e){let r,i="";while(e.length){if(r=e[e.length-1][0],r!=="space")break;i=e.pop()[1]+i}return i}stringFrom(e,r){let i="";for(let s=r;s<e.length;s++)i+=e[s][1];return e.splice(r,e.length-r),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,r){throw this.input.error("At-rule without name",{offset:r[2]},{offset:r[2]+r[1].length})}},yd=gd,vd=Ke,wd=yd,bd=Zr;function Ur(t,e){let r=new bd(t,e),i=new wd(r);try{i.parse()}catch(s){if(s.name==="CssSyntaxError"&&e&&e.from){if(/\.scss$/i.test(e.from))s.message+=`
53
53
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`;else if(/\.sass/i.test(e.from))s.message+=`
54
54
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;else if(/\.less$/i.test(e.from))s.message+=`
55
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw s}return i.root}var Ts=_r;_r.default=_r;_f.registerParse(_r);var{isClean:Ie,my:Pf}=kt,$f=wa,Ff=zr,Uf=ze,Bf=Is,Wf=Ra,lo=xs,zf=Ts,Vf=Lt,Gf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Hf={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},jf={Once:!0,postcssPlugin:!0,prepare:!0},ot=0;function vt(r){return typeof r==="object"&&typeof r.then==="function"}function Fa(r){let e=!1,t=Gf[r.type];if(r.type==="decl")e=r.prop.toLowerCase();else if(r.type==="atrule")e=r.name.toLowerCase();if(e&&r.append)return[t,t+"-"+e,ot,t+"Exit",t+"Exit-"+e];else if(e)return[t,t+"-"+e,t+"Exit",t+"Exit-"+e];else if(r.append)return[t,ot,t+"Exit"];else return[t,t+"Exit"]}function uo(r){let e;if(r.type==="document")e=["Document",ot,"DocumentExit"];else if(r.type==="root")e=["Root",ot,"RootExit"];else e=Fa(r);return{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function qi(r){if(r[Ie]=!1,r.nodes)r.nodes.forEach((e)=>qi(e));return r}var Qi={},at=class r{constructor(e,t,i){this.stringified=!1,this.processed=!1;let s;if(typeof t==="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=qi(t);else if(t instanceof r||t instanceof lo){if(s=qi(t.root),t.map){if(typeof i.map>"u")i.map={};if(!i.map.inline)i.map.inline=!1;i.map.prev=t.map}}else{let n=zf;if(i.syntax)n=i.syntax.parse;if(i.parser)n=i.parser;if(n.parse)n=n.parse;try{s=n(t,i)}catch(o){this.processed=!0,this.error=o}if(s&&!s[Pf])Uf.rebuild(s)}this.result=new lo(e,s,i),this.helpers={...Qi,postcss:Qi,result:this.result},this.plugins=this.processor.plugins.map((n)=>{if(typeof n==="object"&&n.prepare)return{...n,...n.prepare(this.result)};else return n})}async(){if(this.error)return Promise.reject(this.error);if(this.processed)return Promise.resolve(this.result);if(!this.processing)this.processing=this.runAsync();return this.processing}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{if(t)t.addToError(e);if(this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion){let{postcssPlugin:s,postcssVersion:n}=i,o=this.result.processor.version,l=n.split("."),a=o.split(".");if(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+s+" uses "+n+". Perhaps this is the source of the error below.")}}catch(s){if(console&&console.error)console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,i,s)=>{if(!this.listeners[i])this.listeners[i]=[];this.listeners[i].push([t,s])};for(let t of this.plugins)if(typeof t==="object")for(let i in t){if(!Hf[i]&&/^[A-Z]/.test(i))throw Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jf[i]){if(typeof t[i]==="object")for(let s in t[i])if(s==="*")e(t,i,t[i][s]);else e(t,i+"-"+s.toLowerCase(),t[i][s]);else if(typeof t[i]==="function")e(t,i,t[i])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],i=this.runOnRoot(t);if(vt(i))try{await i}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Ie]){e[Ie]=!0;let t=[uo(e)];while(t.length>0){let i=this.visitTick(t);if(vt(i))try{await i}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map((n)=>i(n,this.helpers));await Promise.all(s)}else await i(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map((i)=>e.Once(i,this.helpers));if(vt(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}else if(typeof e==="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Ff;if(e.syntax)t=e.syntax.stringify;if(e.stringifier)t=e.stringifier;if(t.stringify)t=t.stringify;let s=new $f(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(vt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Ie])e[Ie]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){if(!("from"in this.opts))Wf("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.");return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,s]of e){this.result.lastPlugin=i;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(vt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:s}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];if(t.visitorIndex+=1,t.visitorIndex===s.length)t.visitors=[],t.visitorIndex=0;this.result.lastPlugin=o;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(t.iterator!==0){let o=t.iterator,l;while(l=i.nodes[i.indexes[o]])if(i.indexes[o]+=1,!l[Ie]){l[Ie]=!0,e.push(uo(l));return}t.iterator=0,delete i.indexes[o]}let n=t.events;while(t.eventIndex<n.length){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ot){if(i.nodes&&i.nodes.length)i[Ie]=!0,t.iterator=i.getIterator();return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ie]=!0;let t=Fa(e);for(let i of t)if(i===ot){if(e.nodes)e.each((s)=>{if(!s[Ie])this.walkSync(s)})}else{let s=this.listeners[i];if(s){if(this.visitSync(s,e.toProxy()))return}}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};at.registerPostcss=(r)=>{Qi=r};var Ua=at;at.default=at;Vf.registerLazyResult(at);Bf.registerLazyResult(at);var Yf=wa,Zf=zr,Xf=Ra,Kf=Ts,Jf=xs,es=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let s,n=Zf;this.result=new Jf(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Yf(n,s,this._opts,t);if(l.isMap()){let[a,u]=l.generate();if(a)this.result.css=a;if(u)this.result.map=u}else l.clearAnnotation(),this.result.css=l.css}async(){if(this.error)return Promise.reject(this.error);return Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){if(!("from"in this._opts))Xf("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.");return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Kf;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;else return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},qf=es;es.default=es;var Qf=qf,ed=Ua,td=Is,rd=Lt,Nt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e){if(i.postcss===!0)i=i();else if(i.postcss)i=i.postcss;if(typeof i==="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i==="object"&&i.postcssPlugin)t.push(i);else if(typeof i==="function")t.push(i);else if(typeof i==="object"&&(i.parse||i.stringify))throw 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.");else throw Error(i+" is not a PostCSS plugin")}return t}process(e,t={}){if(!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax)return new Qf(this,e,t);else return new ed(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},id=Nt;Nt.default=Nt;rd.registerProcessor(Nt);td.registerProcessor(Nt);var sd=Gr,nd=pa,od=jr,ad=As,ld=Hr,ud=Lt,cd=Ms;function Rt(r,e){if(Array.isArray(r))return r.map((s)=>Rt(s));let{inputs:t,...i}=r;if(t){e=[];for(let s of t){let n={...s,__proto__:ld.prototype};if(n.map)n.map={...n.map,__proto__:nd.prototype};e.push(n)}}if(i.nodes)i.nodes=r.nodes.map((s)=>Rt(s,e));if(i.source){let{inputId:s,...n}=i.source;if(i.source=n,s!=null)i.source.input=e[s]}if(i.type==="root")return new ud(i);else if(i.type==="decl")return new sd(i);else if(i.type==="rule")return new cd(i);else if(i.type==="comment")return new od(i);else if(i.type==="atrule")return new ad(i);else throw Error("Unknown node type: "+r.type)}var hd=Rt;Rt.default=Rt;var fd=Ss,Ba=Gr,dd=Ua,pd=ze,Ns=id,md=zr,gd=hd,Wa=Is,yd=Oa,za=jr,Va=As,vd=xs,wd=Hr,bd=Ts,Sd=Pa,Ga=Ms,Ha=Lt,Cd=Vr;function U(...r){if(r.length===1&&Array.isArray(r[0]))r=r[0];return new Ns(r)}U.plugin=function(e,t){let i=!1;function s(...o){if(console&&console.warn&&!i){if(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
55
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw s}return i.root}var Bs=Ur;Ur.default=Ur;vd.registerParse(Ur);var{isClean:Re,my:Sd}=Bt,Cd=Ga,Ed=Kr,Id=Ke,xd=Ps,Td=tl,ko=$s,Ad=Bs,Md=Wt,Nd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Rd={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},Od={Once:!0,postcssPlugin:!0,prepare:!0},dt=0;function It(t){return typeof t==="object"&&typeof t.then==="function"}function cl(t){let e=!1,r=Nd[t.type];if(t.type==="decl")e=t.prop.toLowerCase();else if(t.type==="atrule")e=t.name.toLowerCase();if(e&&t.append)return[r,r+"-"+e,dt,r+"Exit",r+"Exit-"+e];else if(e)return[r,r+"-"+e,r+"Exit",r+"Exit-"+e];else if(t.append)return[r,dt,r+"Exit"];else return[r,r+"Exit"]}function Lo(t){let e;if(t.type==="document")e=["Document",dt,"DocumentExit"];else if(t.type==="root")e=["Root",dt,"RootExit"];else e=cl(t);return{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function us(t){if(t[Re]=!1,t.nodes)t.nodes.forEach((e)=>us(e));return t}var hs={},pt=class t{constructor(e,r,i){this.stringified=!1,this.processed=!1;let s;if(typeof r==="object"&&r!==null&&(r.type==="root"||r.type==="document"))s=us(r);else if(r instanceof t||r instanceof ko){if(s=us(r.root),r.map){if(typeof i.map>"u")i.map={};if(!i.map.inline)i.map.inline=!1;i.map.prev=r.map}}else{let n=Ad;if(i.syntax)n=i.syntax.parse;if(i.parser)n=i.parser;if(n.parse)n=n.parse;try{s=n(r,i)}catch(o){this.processed=!0,this.error=o}if(s&&!s[Sd])Id.rebuild(s)}this.result=new ko(e,s,i),this.helpers={...hs,postcss:hs,result:this.result},this.plugins=this.processor.plugins.map((n)=>{if(typeof n==="object"&&n.prepare)return{...n,...n.prepare(this.result)};else return n})}async(){if(this.error)return Promise.reject(this.error);if(this.processed)return Promise.resolve(this.result);if(!this.processing)this.processing=this.runAsync();return this.processing}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let i=this.result.lastPlugin;try{if(r)r.addToError(e);if(this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion){let{postcssPlugin:s,postcssVersion:n}=i,o=this.result.processor.version,l=n.split("."),a=o.split(".");if(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+s+" uses "+n+". Perhaps this is the source of the error below.")}}catch(s){if(console&&console.error)console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(r,i,s)=>{if(!this.listeners[i])this.listeners[i]=[];this.listeners[i].push([r,s])};for(let r of this.plugins)if(typeof r==="object")for(let i in r){if(!Rd[i]&&/^[A-Z]/.test(i))throw Error(`Unknown event ${i} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Od[i]){if(typeof r[i]==="object")for(let s in r[i])if(s==="*")e(r,i,r[i][s]);else e(r,i+"-"+s.toLowerCase(),r[i][s]);else if(typeof r[i]==="function")e(r,i,r[i])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let r=this.plugins[e],i=this.runOnRoot(r);if(It(i))try{await i}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Re]){e[Re]=!0;let r=[Lo(e)];while(r.length>0){let i=this.visitTick(r);if(It(i))try{await i}catch(s){let n=r[r.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[r,i]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let s=e.nodes.map((n)=>i(n,this.helpers));await Promise.all(s)}else await i(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map((i)=>e.Once(i,this.helpers));if(It(r[0]))return Promise.all(r);return r}return e.Once(this.result.root,this.helpers)}else if(typeof e==="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=Ed;if(e.syntax)r=e.syntax.stringify;if(e.stringifier)r=e.stringifier;if(r.stringify)r=r.stringify;let s=new Cd(r,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(It(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;while(!e[Re])e[Re]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){if(!("from"in this.opts))Td("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.");return this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[i,s]of e){this.result.lastPlugin=i;let n;try{n=s(r,this.helpers)}catch(o){throw this.handleError(o,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(It(n))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:i,visitors:s}=r;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(s.length>0&&r.visitorIndex<s.length){let[o,l]=s[r.visitorIndex];if(r.visitorIndex+=1,r.visitorIndex===s.length)r.visitors=[],r.visitorIndex=0;this.result.lastPlugin=o;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(r.iterator!==0){let o=r.iterator,l;while(l=i.nodes[i.indexes[o]])if(i.indexes[o]+=1,!l[Re]){l[Re]=!0,e.push(Lo(l));return}r.iterator=0,delete i.indexes[o]}let n=r.events;while(r.eventIndex<n.length){let o=n[r.eventIndex];if(r.eventIndex+=1,o===dt){if(i.nodes&&i.nodes.length)i[Re]=!0,r.iterator=i.getIterator();return}else if(this.listeners[o]){r.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Re]=!0;let r=cl(e);for(let i of r)if(i===dt){if(e.nodes)e.each((s)=>{if(!s[Re])this.walkSync(s)})}else{let s=this.listeners[i];if(s){if(this.visitSync(s,e.toProxy()))return}}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};pt.registerPostcss=(t)=>{hs=t};var ul=pt;pt.default=pt;Md.registerLazyResult(pt);xd.registerLazyResult(pt);var _d=Ga,Dd=Kr,kd=tl,Ld=Bs,Pd=$s,fs=class{constructor(e,r,i){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=i,this._map=void 0;let s,n=Dd;this.result=new Pd(this._processor,s,this._opts),this.result.css=r;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new _d(n,s,this._opts,r);if(l.isMap()){let[a,c]=l.generate();if(a)this.result.css=a;if(c)this.result.map=c}else l.clearAnnotation(),this.result.css=l.css}async(){if(this.error)return Promise.reject(this.error);return Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){if(!("from"in this._opts))kd("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.");return this.async().then(e,r)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=Ld;try{e=r(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;else return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},$d=fs;fs.default=fs;var Fd=$d,Ud=ul,Bd=Ps,Wd=Wt,Lt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let i of e){if(i.postcss===!0)i=i();else if(i.postcss)i=i.postcss;if(typeof i==="object"&&Array.isArray(i.plugins))r=r.concat(i.plugins);else if(typeof i==="object"&&i.postcssPlugin)r.push(i);else if(typeof i==="function")r.push(i);else if(typeof i==="object"&&(i.parse||i.stringify))throw 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.");else throw Error(i+" is not a PostCSS plugin")}return r}process(e,r={}){if(!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax)return new Fd(this,e,r);else return new Ud(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Vd=Lt;Lt.default=Lt;Wd.registerProcessor(Lt);Bd.registerProcessor(Lt);var zd=Jr,Gd=Ua,Hd=qr,Yd=Fs,jd=Zr,Kd=Wt,Xd=Us;function Pt(t,e){if(Array.isArray(t))return t.map((s)=>Pt(s));let{inputs:r,...i}=t;if(r){e=[];for(let s of r){let n={...s,__proto__:jd.prototype};if(n.map)n.map={...n.map,__proto__:Gd.prototype};e.push(n)}}if(i.nodes)i.nodes=t.nodes.map((s)=>Pt(s,e));if(i.source){let{inputId:s,...n}=i.source;if(i.source=n,s!=null)i.source.input=e[s]}if(i.type==="root")return new Kd(i);else if(i.type==="decl")return new zd(i);else if(i.type==="rule")return new Xd(i);else if(i.type==="comment")return new Hd(i);else if(i.type==="atrule")return new Yd(i);else throw Error("Unknown node type: "+t.type)}var Jd=Pt;Pt.default=Pt;var Zd=Ds,hl=Jr,qd=ul,Qd=Ke,Ws=Vd,ep=Kr,tp=Jd,fl=Ps,rp=rl,dl=qr,pl=Fs,ip=$s,sp=Zr,np=Bs,op=al,ml=Us,gl=Wt,ap=Xr;function W(...t){if(t.length===1&&Array.isArray(t[0]))t=t[0];return new Ws(t)}W.plugin=function(e,r){let i=!1;function s(...o){if(console&&console.warn&&!i){if(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
56
56
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn"))console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
57
- https://www.w3ctech.com/topic/2226`)}let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ns().version,l}let n;return Object.defineProperty(s,"postcss",{get(){if(!n)n=s();return n}}),s.process=function(o,l,a){return U([s(a)]).process(o,l)},s};U.stringify=md;U.parse=bd;U.fromJSON=gd;U.list=Sd;U.comment=(r)=>new za(r);U.atRule=(r)=>new Va(r);U.decl=(r)=>new Ba(r);U.rule=(r)=>new Ga(r);U.root=(r)=>new Ha(r);U.document=(r)=>new Wa(r);U.CssSyntaxError=fd;U.Declaration=Ba;U.Container=pd;U.Processor=Ns;U.Document=Wa;U.Comment=za;U.Warning=yd;U.AtRule=Va;U.Result=vd;U.Input=wd;U.Rule=Ga;U.Root=Ha;U.Node=Cd;dd.registerPostcss(U);var Ed=U;U.default=U;var Y=Dh(Ed);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;class Rs{constructor(...r){de(this,"parentElement",null),de(this,"parentNode",null),de(this,"ownerDocument"),de(this,"firstChild",null),de(this,"lastChild",null),de(this,"previousSibling",null),de(this,"nextSibling",null),de(this,"ELEMENT_NODE",1),de(this,"TEXT_NODE",3),de(this,"nodeType"),de(this,"nodeName"),de(this,"RRNodeType")}get childNodes(){let r=[],e=this.firstChild;while(e)r.push(e),e=e.nextSibling;return r}contains(r){if(!(r instanceof Rs))return!1;else if(r.ownerDocument!==this.ownerDocument)return!1;else if(r===this)return!0;while(r.parentNode){if(r.parentNode===this)return!0;r=r.parentNode}return!1}appendChild(r){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(r,e){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(r){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var co={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ho={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mr={},Id=()=>!!globalThis.Zone;function Os(r){if(mr[r])return mr[r];let e=globalThis[r],t=e.prototype,i=r in co?co[r]:void 0,s=Boolean(i&&i.every((l)=>{var a,u;return Boolean((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)==null?void 0:u.toString().includes("[native code]"))})),n=r in ho?ho[r]:void 0,o=Boolean(n&&n.every((l)=>{var a;return typeof t[l]==="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!Id())return mr[r]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[r].prototype;if(document.body.removeChild(l),!u)return t;return mr[r]=u}catch{return t}}var bi={};function Le(r,e,t){var i;let s=`${r}.${String(t)}`;if(bi[s])return bi[s].call(e);let n=Os(r),o=(i=Object.getOwnPropertyDescriptor(n,t))==null?void 0:i.get;if(!o)return e[t];return bi[s]=o,o.call(e)}var Si={};function ja(r,e,t){let i=`${r}.${String(t)}`;if(Si[i])return Si[i].bind(e);let n=Os(r)[t];if(typeof n!=="function")return e[t];return Si[i]=n,n.bind(e)}function xd(r){return Le("Node",r,"childNodes")}function Ad(r){return Le("Node",r,"parentNode")}function Md(r){return Le("Node",r,"parentElement")}function Td(r){return Le("Node",r,"textContent")}function Nd(r,e){return ja("Node",r,"contains")(e)}function Rd(r){return ja("Node",r,"getRootNode")()}function Od(r){if(!r||!("host"in r))return null;return Le("ShadowRoot",r,"host")}function Dd(r){return r.styleSheets}function _d(r){if(!r||!("shadowRoot"in r))return null;return Le("Element",r,"shadowRoot")}function kd(r,e){return Le("Element",r,"querySelector")(e)}function Ld(r,e){return Le("Element",r,"querySelectorAll")(e)}function Ya(){return Os("MutationObserver").constructor}var T={childNodes:xd,parentNode:Ad,parentElement:Md,textContent:Td,contains:Nd,getRootNode:Rd,host:Od,styleSheets:Dd,shadowRoot:_d,querySelector:kd,querySelectorAll:Ld,mutationObserver:Ya};function se(r,e,t=document){let i={capture:!0,passive:!0};return t.addEventListener(r,e,i),()=>t.removeEventListener(r,e,i)}var Ke=`Please stop import mirror directly. Instead of that,\r
57
+ https://www.w3ctech.com/topic/2226`)}let l=r(...o);return l.postcssPlugin=e,l.postcssVersion=new Ws().version,l}let n;return Object.defineProperty(s,"postcss",{get(){if(!n)n=s();return n}}),s.process=function(o,l,a){return W([s(a)]).process(o,l)},s};W.stringify=ep;W.parse=np;W.fromJSON=tp;W.list=op;W.comment=(t)=>new dl(t);W.atRule=(t)=>new pl(t);W.decl=(t)=>new hl(t);W.rule=(t)=>new ml(t);W.root=(t)=>new gl(t);W.document=(t)=>new fl(t);W.CssSyntaxError=Zd;W.Declaration=hl;W.Container=Qd;W.Processor=Ws;W.Document=fl;W.Comment=dl;W.Warning=rp;W.AtRule=pl;W.Result=ip;W.Input=sp;W.Rule=ml;W.Root=gl;W.Node=ap;qd.registerPostcss(W);var lp=W;W.default=W;var J=vf(lp);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;class Vs{constructor(...t){be(this,"parentElement",null),be(this,"parentNode",null),be(this,"ownerDocument"),be(this,"firstChild",null),be(this,"lastChild",null),be(this,"previousSibling",null),be(this,"nextSibling",null),be(this,"ELEMENT_NODE",1),be(this,"TEXT_NODE",3),be(this,"nodeType"),be(this,"nodeName"),be(this,"RRNodeType")}get childNodes(){let t=[],e=this.firstChild;while(e)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Vs))return!1;else if(t.ownerDocument!==this.ownerDocument)return!1;else if(t===this)return!0;while(t.parentNode){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var Po={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},$o={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Sr={},cp=()=>!!globalThis.Zone;function zs(t){if(Sr[t])return Sr[t];let e=globalThis[t],r=e.prototype,i=t in Po?Po[t]:void 0,s=Boolean(i&&i.every((l)=>{var a,c;return Boolean((c=(a=Object.getOwnPropertyDescriptor(r,l))==null?void 0:a.get)==null?void 0:c.toString().includes("[native code]"))})),n=t in $o?$o[t]:void 0,o=Boolean(n&&n.every((l)=>{var a;return typeof r[l]==="function"&&((a=r[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!cp())return Sr[t]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[t].prototype;if(document.body.removeChild(l),!c)return r;return Sr[t]=c}catch{return r}}var _i={};function Be(t,e,r){var i;let s=`${t}.${String(r)}`;if(_i[s])return _i[s].call(e);let n=zs(t),o=(i=Object.getOwnPropertyDescriptor(n,r))==null?void 0:i.get;if(!o)return e[r];return _i[s]=o,o.call(e)}var Di={};function yl(t,e,r){let i=`${t}.${String(r)}`;if(Di[i])return Di[i].bind(e);let n=zs(t)[r];if(typeof n!=="function")return e[r];return Di[i]=n,n.bind(e)}function up(t){return Be("Node",t,"childNodes")}function hp(t){return Be("Node",t,"parentNode")}function fp(t){return Be("Node",t,"parentElement")}function dp(t){return Be("Node",t,"textContent")}function pp(t,e){return yl("Node",t,"contains")(e)}function mp(t){return yl("Node",t,"getRootNode")()}function gp(t){if(!t||!("host"in t))return null;return Be("ShadowRoot",t,"host")}function yp(t){return t.styleSheets}function vp(t){if(!t||!("shadowRoot"in t))return null;return Be("Element",t,"shadowRoot")}function wp(t,e){return Be("Element",t,"querySelector")(e)}function bp(t,e){return Be("Element",t,"querySelectorAll")(e)}function vl(){return zs("MutationObserver").constructor}var O={childNodes:up,parentNode:hp,parentElement:fp,textContent:dp,contains:pp,getRootNode:mp,host:gp,styleSheets:yp,shadowRoot:vp,querySelector:wp,querySelectorAll:bp,mutationObserver:vl};function fe(t,e,r=document){let i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}var it=`Please stop import mirror directly. Instead of that,\r
58
58
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
59
- or you can use record.mirror to access the mirror instance during recording.`,fo={map:{},getId(){return console.error(Ke),-1},getNode(){return console.error(Ke),null},removeNodeFromMap(){console.error(Ke)},has(){return console.error(Ke),!1},reset(){console.error(Ke)}};if(typeof window<"u"&&window.Proxy&&window.Reflect)fo=new Proxy(fo,{get(r,e,t){if(e==="map")console.error(Ke);return Reflect.get(r,e,t)}});function Ot(r,e,t={}){let i=null,s=0;return function(...n){let o=Date.now();if(!s&&t.leading===!1)s=o;let l=e-(o-s),a=this;if(l<=0||l>e){if(i)clearTimeout(i),i=null;s=o,r.apply(a,n)}else if(!i&&t.trailing!==!1)i=setTimeout(()=>{s=t.leading===!1?0:Date.now(),i=null,r.apply(a,n)},l)}}function Yr(r,e,t,i,s=window){let n=s.Object.getOwnPropertyDescriptor(r,e);return s.Object.defineProperty(r,e,i?t:{set(o){if(setTimeout(()=>{t.set.call(this,o)},0),n&&n.set)n.set.call(this,o)}}),()=>Yr(r,e,n||{},!0)}function ut(r,e,t){try{if(!(e in r))return()=>{};let i=r[e],s=t(i);if(typeof s==="function")s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i}});return r[e]=s,()=>{r[e]=i}}catch{return()=>{}}}var kr=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString()))kr=()=>new Date().getTime();function Za(r){var e,t,i,s;let n=r.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=T.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:r.pageYOffset!==void 0?r.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((i=T.parentElement(n.body))==null?void 0:i.scrollTop)||((s=n==null?void 0:n.body)==null?void 0:s.scrollTop)||0}}function Xa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ka(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ja(r){if(!r)return null;return r.nodeType===r.ELEMENT_NODE?r:T.parentElement(r)}function ne(r,e,t,i){if(!r)return!1;let s=Ja(r);if(!s)return!1;try{if(typeof e==="string"){if(s.classList.contains(e))return!0;if(i&&s.closest("."+e)!==null)return!0}else if(xr(s,e,i))return!0}catch(n){}if(t){if(s.matches(t))return!0;if(i&&s.closest(t)!==null)return!0}return!1}function Pd(r,e){return e.getId(r)!==-1}function Ci(r,e,t){if(r.tagName==="TITLE"&&t.headTitleMutations)return!0;return e.getId(r)===Ct}function qa(r,e){if(wt(r))return!1;let t=e.getId(r);if(!e.has(t))return!0;let i=T.parentNode(r);if(i&&i.nodeType===r.DOCUMENT_NODE)return!1;if(!i)return!0;return qa(i,e)}function ts(r){return Boolean(r.changedTouches)}function $d(r=window){if("NodeList"in r&&!r.NodeList.prototype.forEach)r.NodeList.prototype.forEach=Array.prototype.forEach;if("DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach)r.DOMTokenList.prototype.forEach=Array.prototype.forEach}function Qa(r,e){return Boolean(r.nodeName==="IFRAME"&&e.getMeta(r))}function el(r,e){return Boolean(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function rs(r){if(!r)return!1;if(r instanceof Rs&&"shadowRoot"in r)return Boolean(r.shadowRoot);return Boolean(T.shadowRoot(r))}class tl{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(this,"idStyleMap",new Map)}getId(r){return this.styleIDMap.get(r)??-1}has(r){return this.styleIDMap.has(r)}add(r,e){if(this.has(r))return this.getId(r);let t;if(e===void 0)t=this.id++;else t=e;return this.styleIDMap.set(r,t),this.idStyleMap.set(t,r),t}getStyle(r){return this.idStyleMap.get(r)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function rl(r){var e;let t=null;if("getRootNode"in r&&((e=T.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&T.host(T.getRootNode(r)))t=T.host(T.getRootNode(r));return t}function Fd(r){let e=r,t;while(t=rl(e))e=t;return e}function Ud(r){let e=r.ownerDocument;if(!e)return!1;let t=Fd(r);return T.contains(e,t)}function il(r){let e=r.ownerDocument;if(!e)return!1;return T.contains(e,r)||Ud(r)}var D=((r)=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(D||{}),N=((r)=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r))(N||{}),ue=((r)=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(ue||{}),Ae=((r)=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(Ae||{}),lt=((r)=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(lt||{}),Je=((r)=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(Je||{});var sl=((r)=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(sl||{});function po(r){return"__ln"in r}class nl{constructor(){v(this,"length",0),v(this,"head",null),v(this,"tail",null)}get(r){if(r>=this.length)throw Error("Position outside of list range");let e=this.head;for(let t=0;t<r;t++)e=(e==null?void 0:e.next)||null;return e}addNode(r){let e={value:r,previous:null,next:null};if(r.__ln=e,r.previousSibling&&po(r.previousSibling)){let t=r.previousSibling.__ln.next;if(e.next=t,e.previous=r.previousSibling.__ln,r.previousSibling.__ln.next=e,t)t.previous=e}else if(r.nextSibling&&po(r.nextSibling)&&r.nextSibling.__ln.previous){let t=r.nextSibling.__ln.previous;if(e.previous=t,e.next=r.nextSibling.__ln,r.nextSibling.__ln.previous=e,t)t.next=e}else{if(this.head)this.head.previous=e;e.next=this.head,this.head=e}if(e.next===null)this.tail=e;this.length++}removeNode(r){let e=r.__ln;if(!this.head)return;if(!e.previous)if(this.head=e.next,this.head)this.head.previous=null;else this.tail=null;else if(e.previous.next=e.next,e.next)e.next.previous=e.previous;else this.tail=e.previous;if(r.__ln)delete r.__ln;this.length--}}var mo=(r,e)=>`${r}@${e}`;class ol{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",(r)=>{r.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;let r=[],e=new Set,t=new nl,i=(l)=>{let a=l,u=Ct;while(u===Ct)a=a&&a.nextSibling,u=a&&this.mirror.getId(a);return u},s=(l)=>{let a=T.parentNode(l);if(!a||!il(l))return;let u=!1;if(l.nodeType===Node.TEXT_NODE){let d=a.tagName;if(d==="TEXTAREA")return;else if(d==="STYLE"&&this.addedSet.has(a))u=!0}let c=wt(a)?this.mirror.getId(rl(l)):this.mirror.getId(a),f=i(l);if(c===-1||f===-1)return t.addNode(l);let p=et(l,{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:(d)=>{if(Qa(d,this.mirror))this.iframeManager.addIframe(d);if(el(d,this.mirror))this.stylesheetManager.trackLinkElement(d);if(rs(l))this.shadowDomManager.addShadowRoot(T.shadowRoot(l),this.doc)},onIframeLoad:(d,g)=>{this.iframeManager.attachIframe(d,g),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,g)=>{this.stylesheetManager.attachLinkElement(d,g)},cssCaptured:u});if(p)r.push({parentId:c,nextId:f,node:p}),e.add(p.id)};while(this.mapRemoves.length)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet){if(go(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(T.parentNode(l)))continue;s(l)}for(let l of this.addedSet)if(!yo(this.droppedSet,l)&&!go(this.removesSubTreeCache,l,this.mirror))s(l);else if(yo(this.movedSet,l))s(l);else this.droppedSet.add(l);let n=null;while(t.length){let l=null;if(n){let a=this.mirror.getId(T.parentNode(n.value)),u=i(n.value);if(a!==-1&&u!==-1)l=n}if(!l){let a=t.tail;while(a){let u=a;if(a=a.previous,u){let c=this.mirror.getId(T.parentNode(u.value));if(i(u.value)===-1)continue;else if(c!==-1){l=u;break}else{let p=u.value,d=T.parentNode(p);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let g=T.host(d);if(this.mirror.getId(g)!==-1){l=u;break}}}}}}if(!l){while(t.head)t.removeNode(t.head.value);break}n=l.previous,t.removeNode(l.value),s(l.value)}let o={texts:this.texts.map((l)=>{let a=l.node,u=T.parentNode(a);if(u&&u.tagName==="TEXTAREA")this.genTextAreaValueMutation(u);return{id:this.mirror.getId(a),value:l.value}}).filter((l)=>!e.has(l.id)).filter((l)=>this.mirror.has(l.id)),attributes:this.attributes.map((l)=>{let{attributes:a}=l;if(typeof a.style==="string"){let u=JSON.stringify(l.styleDiff),c=JSON.stringify(l._unchangedStyles);if(u.length<a.style.length){if((u+c).split("var(").length===a.style.split("var(").length)a.style=l.styleDiff}}return{id:this.mirror.getId(l.node),attributes:a}}).filter((l)=>!e.has(l.id)).filter((l)=>this.mirror.has(l.id)),removes:this.removes,adds:r};if(!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length)return;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(o)}),v(this,"genTextAreaValueMutation",(r)=>{let e=this.attributeMap.get(r);if(!e)e={node:r,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(r,e);e.attributes.value=Array.from(T.childNodes(r),(t)=>T.textContent(t)||"").join("")}),v(this,"processMutation",(r)=>{if(Ci(r.target,this.mirror,this.slimDOMOptions))return;switch(r.type){case"characterData":{let e=T.textContent(r.target);if(!ne(r.target,this.blockClass,this.blockSelector,!1)&&e!==r.oldValue)this.texts.push({value:Oo(r.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,Ja(r.target)):e.replace(/[\S]/g,"*"):e,node:r.target});break}case"attributes":{let{target:e,attributeName:t}=r,i=r.target.getAttribute(t);if(t==="value"){let n=ls(e);i=as({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:n,value:i,maskInputFn:this.maskInputFn})}if(ne(r.target,this.blockClass,this.blockSelector,!1)||i===r.oldValue)return;let s=this.attributeMap.get(r.target);if(e.tagName==="IFRAME"&&t==="src"&&!this.keepIframeSrcFn(i))if(!e.contentDocument)t="rr_src";else return;if(!s)s={node:r.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(r.target,s);if(t==="type"&&e.tagName==="INPUT"&&(r.oldValue||"").toLowerCase()==="password")e.setAttribute("data-rr-is-password","true");if(!Ro(e.tagName,t)){if(s.attributes[t]=No(this.doc,Be(e.tagName),Be(t),i),t==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(o){this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement("span");if(r.oldValue)n.setAttribute("style",r.oldValue);for(let o of Array.from(e.style)){let l=e.style.getPropertyValue(o),a=e.style.getPropertyPriority(o);if(l!==n.style.getPropertyValue(o)||a!==n.style.getPropertyPriority(o))if(a==="")s.styleDiff[o]=l;else s.styleDiff[o]=[l,a];else s._unchangedStyles[o]=[l,a]}for(let o of Array.from(n.style))if(e.style.getPropertyValue(o)==="")s.styleDiff[o]=!1}else if(t==="open"&&e.tagName==="DIALOG")if(e.matches("dialog:modal"))s.attributes.rr_open_mode="modal";else s.attributes.rr_open_mode="non-modal"}break}case"childList":{if(ne(r.target,this.blockClass,this.blockSelector,!0))return;if(r.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(r.target);return}r.addedNodes.forEach((e)=>this.genAdds(e,r.target)),r.removedNodes.forEach((e)=>{let t=this.mirror.getId(e),i=wt(r.target)?this.mirror.getId(T.host(r.target)):this.mirror.getId(r.target);if(ne(r.target,this.blockClass,this.blockSelector,!1)||Ci(e,this.mirror,this.slimDOMOptions)||!Pd(e,this.mirror))return;if(this.addedSet.has(e))is(this.addedSet,e),this.droppedSet.add(e);else if(this.addedSet.has(r.target)&&t===-1);else if(qa(r.target,this.mirror));else if(this.movedSet.has(e)&&this.movedMap[mo(t,i)])is(this.movedSet,e);else this.removes.push({parentId:i,id:t,isShadow:wt(r.target)&&bt(r.target)?!0:void 0}),Bd(e,this.removesSubTreeCache);this.mapRemoves.push(e)});break}}}),v(this,"genAdds",(r,e)=>{if(this.processedNodeManager.inOtherBuffer(r,this))return;if(this.addedSet.has(r)||this.movedSet.has(r))return;if(this.mirror.hasNode(r)){if(Ci(r,this.mirror,this.slimDOMOptions))return;this.movedSet.add(r);let t=null;if(e&&this.mirror.hasNode(e))t=this.mirror.getId(e);if(t&&t!==-1)this.movedMap[mo(this.mirror.getId(r),t)]=!0}else this.addedSet.add(r),this.droppedSet.delete(r);if(!ne(r,this.blockClass,this.blockSelector,!1)){if(T.childNodes(r).forEach((t)=>this.genAdds(t)),rs(r))T.childNodes(T.shadowRoot(r)).forEach((t)=>{this.processedNodeManager.add(t,this),this.genAdds(t,r)})}})}init(r){["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]=r[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 is(r,e){r.delete(e),T.childNodes(e).forEach((t)=>is(r,t))}function Bd(r,e){let t=[r];while(t.length){let i=t.pop();if(e.has(i))continue;e.add(i),T.childNodes(i).forEach((s)=>t.push(s))}return}function go(r,e,t){if(r.size===0)return!1;return Wd(r,e)}function Wd(r,e,t){let i=T.parentNode(e);if(!i)return!1;return r.has(i)}function yo(r,e){if(r.size===0)return!1;return al(r,e)}function al(r,e){let t=T.parentNode(e);if(!t)return!1;if(r.has(t))return!0;return al(r,t)}var St;function zd(r){St=r}function Vd(){St=void 0}var R=(r)=>{if(!St)return r;return(...t)=>{try{return r(...t)}catch(i){if(St&&St(i)===!0)return;throw i}}},Ue=[];function Pt(r){try{if("composedPath"in r){let e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch{}return r&&r.target}function ll(r,e){let t=new ol;Ue.push(t),t.init(r);let i=new(Ya())(R(t.processMutations.bind(t)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Gd({mousemoveCb:r,sampling:e,doc:t,mirror:i}){if(e.mousemove===!1)return()=>{};let s=typeof e.mousemove==="number"?e.mousemove:50,n=typeof e.mousemoveCallback==="number"?e.mousemoveCallback:500,o=[],l,a=Ot(R((f)=>{let p=Date.now()-l;r(o.map((d)=>(d.timeOffset-=p,d)),f),o=[],l=null}),n),u=R(Ot(R((f)=>{let p=Pt(f),{clientX:d,clientY:g}=ts(f)?f.changedTouches[0]:f;if(!l)l=kr();o.push({x:d,y:g,id:i.getId(p),timeOffset:kr()-l}),a(typeof DragEvent<"u"&&f instanceof DragEvent?N.Drag:f instanceof MouseEvent?N.MouseMove:N.TouchMove)}),s,{trailing:!1})),c=[se("mousemove",u,t),se("touchmove",u,t),se("drag",u,t)];return R(()=>{c.forEach((f)=>f())})}function Hd({mouseInteractionCb:r,doc:e,mirror:t,blockClass:i,blockSelector:s,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,u=(c)=>(f)=>{let p=Pt(f);if(ne(p,i,s,!0))return;let d=null,g=c;if("pointerType"in f){switch(f.pointerType){case"mouse":d=Ae.Mouse;break;case"touch":d=Ae.Touch;break;case"pen":d=Ae.Pen;break}if(d===Ae.Touch){if(ue[c]===ue.MouseDown)g="TouchStart";else if(ue[c]===ue.MouseUp)g="TouchEnd"}else if(d===Ae.Pen);}else if(ts(f))d=Ae.Touch;if(d!==null){if(a=d,g.startsWith("Touch")&&d===Ae.Touch||g.startsWith("Mouse")&&d===Ae.Mouse)d=null}else if(ue[c]===ue.Click)d=a,a=null;let m=ts(f)?f.changedTouches[0]:f;if(!m)return;let h=t.getId(p),{clientX:b,clientY:w}=m;R(r)({type:ue[g],id:h,x:b,y:w,...d!==null&&{pointerType:d}})};return Object.keys(ue).filter((c)=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach((c)=>{let f=Be(c),p=u(c);if(window.PointerEvent)switch(ue[c]){case ue.MouseDown:case ue.MouseUp:f=f.replace("mouse","pointer");break;case ue.TouchStart:case ue.TouchEnd:return}l.push(se(f,p,e))}),R(()=>{l.forEach((c)=>c())})}function ul({scrollCb:r,doc:e,mirror:t,blockClass:i,blockSelector:s,sampling:n}){let o=R(Ot(R((l)=>{let a=Pt(l);if(!a||ne(a,i,s,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let c=Za(e.defaultView);r({id:u,x:c.left,y:c.top})}else r({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return se("scroll",o,e)}function jd({viewportResizeCb:r},{win:e}){let t=-1,i=-1,s=R(Ot(R(()=>{let n=Xa(),o=Ka();if(t!==n||i!==o)r({width:Number(o),height:Number(n)}),t=n,i=o}),200));return se("resize",s,e)}var Yd=["INPUT","TEXTAREA","SELECT"],vo=new WeakMap;function Zd({inputCb:r,doc:e,mirror:t,blockClass:i,blockSelector:s,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function f(w){let y=Pt(w),C=w.isTrusted,I=y&&y.tagName;if(y&&I==="OPTION")y=T.parentElement(y);if(!y||!I||Yd.indexOf(I)<0||ne(y,i,s,!0))return;if(y.classList.contains(n)||o&&y.matches(o))return;let E=y.value,x=!1,S=ls(y)||"";if(S==="radio"||S==="checkbox")x=y.checked;else if(l[I.toLowerCase()]||l[S])E=as({element:y,maskInputOptions:l,tagName:I,type:S,value:E,maskInputFn:a});p(y,c?{text:E,isChecked:x,userTriggered:C}:{text:E,isChecked:x});let _=y.name;if(S==="radio"&&_&&x)e.querySelectorAll(`input[type="radio"][name="${_}"]`).forEach((k)=>{if(k!==y){let Q=k.value;p(k,c?{text:Q,isChecked:!x,userTriggered:!1}:{text:Q,isChecked:!x})}})}function p(w,y){let C=vo.get(w);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){vo.set(w,y);let I=t.getId(w);R(r)({...y,id:I})}}let g=(u.input==="last"?["change"]:["input","change"]).map((w)=>se(w,R(f),e)),m=e.defaultView;if(!m)return()=>{g.forEach((w)=>w())};let h=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];if(h&&h.set)g.push(...b.map((w)=>Yr(w[0],w[1],{set(){R(f)({target:this,isTrusted:!1})}},!1,m)));return R(()=>{g.forEach((w)=>w())})}function Lr(r){let e=[];function t(i,s){if(gr("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||gr("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||gr("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||gr("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){let o=Array.from(i.parentRule.cssRules).indexOf(i);s.unshift(o)}else if(i.parentStyleSheet){let o=Array.from(i.parentStyleSheet.cssRules).indexOf(i);s.unshift(o)}return s}return t(r,e)}function _e(r,e,t){let i,s;if(!r)return{};if(r.ownerNode)i=e.getId(r.ownerNode);else s=t.getId(r);return{styleId:s,id:i}}function Xd({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};let s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:R((c,f,p)=>{let[d,g]=p,{id:m,styleId:h}=_e(f,e,t.styleMirror);if(m&&m!==-1||h&&h!==-1)r({id:m,styleId:h,adds:[{rule:d,index:g}]});return c.apply(f,p)})}),i.CSSStyleSheet.prototype.addRule=function(c,f,p=this.cssRules.length){let d=`${c} { ${f} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};let n=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:R((c,f,p)=>{let[d]=p,{id:g,styleId:m}=_e(f,e,t.styleMirror);if(g&&g!==-1||m&&m!==-1)r({id:g,styleId:m,removes:[{index:d}]});return c.apply(f,p)})}),i.CSSStyleSheet.prototype.removeRule=function(c){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;if(i.CSSStyleSheet.prototype.replace)o=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:R((c,f,p)=>{let[d]=p,{id:g,styleId:m}=_e(f,e,t.styleMirror);if(g&&g!==-1||m&&m!==-1)r({id:g,styleId:m,replace:d});return c.apply(f,p)})});let l;if(i.CSSStyleSheet.prototype.replaceSync)l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:R((c,f,p)=>{let[d]=p,{id:g,styleId:m}=_e(f,e,t.styleMirror);if(g&&g!==-1||m&&m!==-1)r({id:g,styleId:m,replaceSync:d});return c.apply(f,p)})});let a={};if(yr("CSSGroupingRule"))a.CSSGroupingRule=i.CSSGroupingRule;else{if(yr("CSSMediaRule"))a.CSSMediaRule=i.CSSMediaRule;if(yr("CSSConditionRule"))a.CSSConditionRule=i.CSSConditionRule;if(yr("CSSSupportsRule"))a.CSSSupportsRule=i.CSSSupportsRule}let u={};return Object.entries(a).forEach(([c,f])=>{u[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[c].insertRule,{apply:R((p,d,g)=>{let[m,h]=g,{id:b,styleId:w}=_e(d.parentStyleSheet,e,t.styleMirror);if(b&&b!==-1||w&&w!==-1)r({id:b,styleId:w,adds:[{rule:m,index:[...Lr(d),h||0]}]});return p.apply(d,g)})}),f.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:R((p,d,g)=>{let[m]=g,{id:h,styleId:b}=_e(d.parentStyleSheet,e,t.styleMirror);if(h&&h!==-1||b&&b!==-1)r({id:h,styleId:b,removes:[{index:[...Lr(d),m]}]});return p.apply(d,g)})})}),R(()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=n,o&&(i.CSSStyleSheet.prototype.replace=o),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,f])=>{f.prototype.insertRule=u[c].insertRule,f.prototype.deleteRule=u[c].deleteRule})})}function cl({mirror:r,stylesheetManager:e},t){var i,s,n;let o=null;if(t.nodeName==="#document")o=r.getId(t);else o=r.getId(T.host(t));let l=t.nodeName==="#document"?(i=t.defaultView)==null?void 0:i.Document:(n=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:n.ShadowRoot,a=(l==null?void 0:l.prototype)?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;if(o===null||o===-1||!l||!a)return()=>{};return Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;let f=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(p){}return f}}),R(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})}function Kd({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:i},{win:s}){let n=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:R((l,a,u)=>{var c;let[f,p,d]=u;if(t.has(f))return n.apply(a,[f,p,d]);let{id:g,styleId:m}=_e((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,i.styleMirror);if(g&&g!==-1||m&&m!==-1)r({id:g,styleId:m,set:{property:f,value:p,priority:d},index:Lr(a.parentRule)});return l.apply(a,u)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:R((l,a,u)=>{var c;let[f]=u;if(t.has(f))return o.apply(a,[f]);let{id:p,styleId:d}=_e((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,i.styleMirror);if(p&&p!==-1||d&&d!==-1)r({id:p,styleId:d,remove:{property:f},index:Lr(a.parentRule)});return l.apply(a,u)})}),R(()=>{s.CSSStyleDeclaration.prototype.setProperty=n,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Jd({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:i,sampling:s,doc:n}){let o=R((a)=>Ot(R((u)=>{let c=Pt(u);if(!c||ne(c,e,t,!0))return;let{currentTime:f,volume:p,muted:d,playbackRate:g,loop:m}=c;r({type:a,id:i.getId(c),currentTime:f,volume:p,muted:d,playbackRate:g,loop:m})}),s.media||500)),l=[se("play",o(Je.Play),n),se("pause",o(Je.Pause),n),se("seeked",o(Je.Seeked),n),se("volumechange",o(Je.VolumeChange),n),se("ratechange",o(Je.RateChange),n)];return R(()=>{l.forEach((a)=>a())})}function qd({fontCb:r,doc:e}){let t=e.defaultView;if(!t)return()=>{};let i=[],s=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){let f=new n(a,u,c);return s.set(f,{family:a,buffer:typeof u!=="string",descriptors:c,fontSource:typeof u==="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};let o=ut(e.fonts,"add",function(l){return function(a){return setTimeout(R(()=>{let u=s.get(a);if(u)r(u),s.delete(a)}),0),l.apply(this,[a])}});return i.push(()=>{t.FontFace=n}),i.push(o),R(()=>{i.forEach((l)=>l())})}function Qd(r){let{doc:e,mirror:t,blockClass:i,blockSelector:s,selectionCb:n}=r,o=!0,l=R(()=>{let a=e.getSelection();if(!a||o&&(a==null?void 0:a.isCollapsed))return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let f=0;f<c;f++){let p=a.getRangeAt(f),{startContainer:d,startOffset:g,endContainer:m,endOffset:h}=p;if(ne(d,i,s,!0)||ne(m,i,s,!0))continue;u.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:h})}n({ranges:u})});return l(),se("selectionchange",l)}function ep({doc:r,customElementCb:e}){let t=r.defaultView;if(!t||!t.customElements)return()=>{};return ut(t.customElements,"define",function(s){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return s.apply(this,[n,o,l])}})}function tp(r,e){let{mutationCb:t,mousemoveCb:i,mouseInteractionCb:s,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:f,fontCb:p,selectionCb:d,customElementCb:g}=r;r.mutationCb=(...m)=>{if(e.mutation)e.mutation(...m);t(...m)},r.mousemoveCb=(...m)=>{if(e.mousemove)e.mousemove(...m);i(...m)},r.mouseInteractionCb=(...m)=>{if(e.mouseInteraction)e.mouseInteraction(...m);s(...m)},r.scrollCb=(...m)=>{if(e.scroll)e.scroll(...m);n(...m)},r.viewportResizeCb=(...m)=>{if(e.viewportResize)e.viewportResize(...m);o(...m)},r.inputCb=(...m)=>{if(e.input)e.input(...m);l(...m)},r.mediaInteractionCb=(...m)=>{if(e.mediaInteaction)e.mediaInteaction(...m);a(...m)},r.styleSheetRuleCb=(...m)=>{if(e.styleSheetRule)e.styleSheetRule(...m);u(...m)},r.styleDeclarationCb=(...m)=>{if(e.styleDeclaration)e.styleDeclaration(...m);c(...m)},r.canvasMutationCb=(...m)=>{if(e.canvasMutation)e.canvasMutation(...m);f(...m)},r.fontCb=(...m)=>{if(e.font)e.font(...m);p(...m)},r.selectionCb=(...m)=>{if(e.selection)e.selection(...m);d(...m)},r.customElementCb=(...m)=>{if(e.customElement)e.customElement(...m);g(...m)}}function rp(r,e={}){let t=r.doc.defaultView;if(!t)return()=>{};tp(r,e);let i;if(r.recordDOM)i=ll(r,r.doc);let s=Gd(r),n=Hd(r),o=ul(r),l=jd(r,{win:t}),a=Zd(r),u=Jd(r),c=()=>{},f=()=>{},p=()=>{},d=()=>{};if(r.recordDOM){if(c=Xd(r,{win:t}),f=cl(r,r.doc),p=Kd(r,{win:t}),r.collectFonts)d=qd(r)}let g=Qd(r),m=ep(r),h=[];for(let b of r.plugins)h.push(b.observer(b.callback,t,b.options));return R(()=>{Ue.forEach((b)=>b.reset()),i==null||i.disconnect(),s(),n(),o(),l(),a(),u(),c(),f(),p(),d(),g(),m(),h.forEach((b)=>b())})}function gr(r){return typeof window[r]<"u"}function yr(r){return Boolean(typeof window[r]<"u"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}class ss{constructor(r){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=r}getId(r,e,t,i){let s=t||this.getIdToRemoteIdMap(r),n=i||this.getRemoteIdToIdMap(r),o=s.get(e);if(!o)o=this.generateIdFn(),s.set(e,o),n.set(o,e);return o}getIds(r,e){let t=this.getIdToRemoteIdMap(r),i=this.getRemoteIdToIdMap(r);return e.map((s)=>this.getId(r,s,t,i))}getRemoteId(r,e,t){let i=t||this.getRemoteIdToIdMap(r);if(typeof e!=="number")return e;let s=i.get(e);if(!s)return-1;return s}getRemoteIds(r,e){let t=this.getRemoteIdToIdMap(r);return e.map((i)=>this.getRemoteId(r,i,t))}reset(r){if(!r){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(r),this.iframeRemoteIdToIdMap.delete(r)}getIdToRemoteIdMap(r){let e=this.iframeIdToRemoteIdMap.get(r);if(!e)e=new Map,this.iframeIdToRemoteIdMap.set(r,e);return e}getRemoteIdToIdMap(r){let e=this.iframeRemoteIdToIdMap.get(r);if(!e)e=new Map,this.iframeRemoteIdToIdMap.set(r,e);return e}}class hl{constructor(r){if(v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new ss(To)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=r.mutationCb,this.wrappedEmit=r.wrappedEmit,this.stylesheetManager=r.stylesheetManager,this.recordCrossOriginIframes=r.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ss(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=r.mirror,this.recordCrossOriginIframes)window.addEventListener("message",this.handleMessage.bind(this))}addIframe(r){if(this.iframes.set(r,!0),r.contentWindow)this.crossOriginIframeMap.set(r.contentWindow,r)}addLoadListener(r){this.loadListener=r}attachIframe(r,e){var t,i;if(this.mutationCb({adds:[{parentId:this.mirror.getId(r),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes)(t=r.contentWindow)==null||t.addEventListener("message",this.handleMessage.bind(this));if((i=this.loadListener)==null||i.call(this,r),r.contentDocument&&r.contentDocument.adoptedStyleSheets&&r.contentDocument.adoptedStyleSheets.length>0)this.stylesheetManager.adoptStyleSheets(r.contentDocument.adoptedStyleSheets,this.mirror.getId(r.contentDocument))}handleMessage(r){let e=r;if(e.data.type!=="rrweb"||e.origin!==e.data.origin)return;if(!r.source)return;let i=this.crossOriginIframeMap.get(r.source);if(!i)return;let s=this.transformCrossOriginEvent(i,e.data.event);if(s)this.wrappedEmit(s,e.data.isCheckout)}transformCrossOriginEvent(r,e){var t;switch(e.type){case D.FullSnapshot:{this.crossOriginIframeMirror.reset(r),this.crossOriginIframeStyleMirror.reset(r),this.replaceIdOnNode(e.data.node,r);let i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(r,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:D.IncrementalSnapshot,data:{source:N.Mutation,adds:[{parentId:this.mirror.getId(r),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case D.Meta:case D.Load:case D.DomContentLoaded:return!1;case D.Plugin:return e;case D.Custom:return this.replaceIds(e.data.payload,r,["id","parentId","previousId","nextId"]),e;case D.IncrementalSnapshot:switch(e.data.source){case N.Mutation:return e.data.adds.forEach((i)=>{this.replaceIds(i,r,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,r);let s=this.crossOriginIframeRootIdMap.get(r);s&&this.patchRootIdOnNode(i.node,s)}),e.data.removes.forEach((i)=>{this.replaceIds(i,r,["parentId","id"])}),e.data.attributes.forEach((i)=>{this.replaceIds(i,r,["id"])}),e.data.texts.forEach((i)=>{this.replaceIds(i,r,["id"])}),e;case N.Drag:case N.TouchMove:case N.MouseMove:return e.data.positions.forEach((i)=>{this.replaceIds(i,r,["id"])}),e;case N.ViewportResize:return!1;case N.MediaInteraction:case N.MouseInteraction:case N.Scroll:case N.CanvasMutation:case N.Input:return this.replaceIds(e.data,r,["id"]),e;case N.StyleSheetRule:case N.StyleDeclaration:return this.replaceIds(e.data,r,["id"]),this.replaceStyleIds(e.data,r,["styleId"]),e;case N.Font:return e;case N.Selection:return e.data.ranges.forEach((i)=>{this.replaceIds(i,r,["start","end"])}),e;case N.AdoptedStyleSheet:return this.replaceIds(e.data,r,["id"]),this.replaceStyleIds(e.data,r,["styleIds"]),(t=e.data.styles)==null||t.forEach((i)=>{this.replaceStyleIds(i,r,["styleId"])}),e}}return!1}replace(r,e,t,i){for(let s of i){if(!Array.isArray(e[s])&&typeof e[s]!=="number")continue;if(Array.isArray(e[s]))e[s]=r.getIds(t,e[s]);else e[s]=r.getId(t,e[s])}return e}replaceIds(r,e,t){return this.replace(this.crossOriginIframeMirror,r,e,t)}replaceStyleIds(r,e,t){return this.replace(this.crossOriginIframeStyleMirror,r,e,t)}replaceIdOnNode(r,e){if(this.replaceIds(r,e,["id","rootId"]),"childNodes"in r)r.childNodes.forEach((t)=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(r,e){if(r.type!==sl.Document&&!r.rootId)r.rootId=e;if("childNodes"in r)r.childNodes.forEach((t)=>{this.patchRootIdOnNode(t,e)})}}class fl{constructor(r){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(this,"restoreHandlers",[]),this.mutationCb=r.mutationCb,this.scrollCb=r.scrollCb,this.bypassOptions=r.bypassOptions,this.mirror=r.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(r,e){if(!bt(r))return;if(this.shadowDoms.has(r))return;this.shadowDoms.add(r);let t=ll({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},r);this.restoreHandlers.push(()=>t.disconnect()),this.restoreHandlers.push(ul({...this.bypassOptions,scrollCb:this.scrollCb,doc:r,mirror:this.mirror})),setTimeout(()=>{if(r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(T.host(r)));this.restoreHandlers.push(cl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},r))},0)}observeAttachShadow(r){if(!r.contentWindow||!r.contentDocument)return;this.patchAttachShadow(r.contentWindow.Element,r.contentDocument)}patchAttachShadow(r,e){let t=this;this.restoreHandlers.push(ut(r.prototype,"attachShadow",function(i){return function(s){let n=i.call(this,s),o=T.shadowRoot(this);if(o&&il(this))t.addShadowRoot(o,e);return n}}))}reset(){this.restoreHandlers.forEach((r)=>{try{r()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ip=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(qe=0;qe<tt.length;qe++)ip[tt.charCodeAt(qe)]=qe;var qe,sp=function(r){var e=new Uint8Array(r),t,i=e.length,s="";for(t=0;t<i;t+=3)s+=tt[e[t]>>2],s+=tt[(e[t]&3)<<4|e[t+1]>>4],s+=tt[(e[t+1]&15)<<2|e[t+2]>>6],s+=tt[e[t+2]&63];if(i%3===2)s=s.substring(0,s.length-1)+"=";else if(i%3===1)s=s.substring(0,s.length-2)+"==";return s};var wo=new Map;function np(r,e){let t=wo.get(r);if(!t)t=new Map,wo.set(r,t);if(!t.has(e))t.set(e,[]);return t.get(e)}var dl=(r,e,t)=>{if(!r||!(ml(r,e)||typeof r==="object"))return;let i=r.constructor.name,s=np(t,i),n=s.indexOf(r);if(n===-1)n=s.length,s.push(r);return n};function Cr(r,e,t){if(r instanceof Array)return r.map((i)=>Cr(i,e,t));else if(r===null)return r;else if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return{rr_type:r.constructor.name,args:[Object.values(r)]};else if(r instanceof ArrayBuffer){let i=r.constructor.name,s=sp(r);return{rr_type:i,base64:s}}else if(r instanceof DataView)return{rr_type:r.constructor.name,args:[Cr(r.buffer,e,t),r.byteOffset,r.byteLength]};else if(r instanceof HTMLImageElement){let i=r.constructor.name,{src:s}=r;return{rr_type:i,src:s}}else if(r instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:r.toDataURL()};else if(r instanceof ImageData)return{rr_type:r.constructor.name,args:[Cr(r.data,e,t),r.width,r.height]};else if(ml(r,e)||typeof r==="object"){let i=r.constructor.name,s=dl(r,e,t);return{rr_type:i,index:s}}return r}var pl=(r,e,t)=>r.map((i)=>Cr(i,e,t)),ml=(r,e)=>{let i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((s)=>typeof e[s]==="function");return Boolean(i.find((s)=>r instanceof e[s]))};function op(r,e,t,i){let s=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!=="function")continue;let l=ut(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){if(!ne(this.canvas,t,i,!0))setTimeout(()=>{let c=pl(u,e,this);r(this.canvas,{type:lt["2D"],property:o,args:c})},0);return a.apply(this,u)}});s.push(l)}catch{let l=Yr(e.CanvasRenderingContext2D.prototype,o,{set(a){r(this.canvas,{type:lt["2D"],property:o,args:[a],setter:!0})}});s.push(l)}return()=>{s.forEach((o)=>o())}}function ap(r){return r==="experimental-webgl"?"webgl":r}function bo(r,e,t,i){let s=[];try{let n=ut(r.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!ne(this,e,t,!0)){let u=ap(l);if(!("__context"in this))this.__context=u;if(i&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]==="object"){let c=a[0];if(!c.preserveDrawingBuffer)c.preserveDrawingBuffer=!0}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});s.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((n)=>n())}}function So(r,e,t,i,s,n){let o=[],l=Object.getOwnPropertyNames(r);for(let a of l){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))continue;try{if(typeof r[a]!=="function")continue;let u=ut(r,a,function(c){return function(...f){let p=c.apply(this,f);if(dl(p,n,this),"tagName"in this.canvas&&!ne(this.canvas,i,s,!0)){let d=pl(f,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return p}});o.push(u)}catch{let u=Yr(r,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}}return o}function lp(r,e,t,i){let s=[];if(s.push(...So(e.WebGLRenderingContext.prototype,lt.WebGL,r,t,i,e)),typeof e.WebGL2RenderingContext<"u")s.push(...So(e.WebGL2RenderingContext.prototype,lt.WebGL2,r,t,i,e));return()=>{s.forEach((n)=>n())}}var gl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",up=(r)=>Uint8Array.from(atob(r),(e)=>e.charCodeAt(0)),Co=typeof window<"u"&&window.Blob&&new Blob([up(gl)],{type:"text/javascript;charset=utf-8"});function cp(r){let e;try{if(e=Co&&(window.URL||window.webkitURL).createObjectURL(Co),!e)throw"";let t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+gl,{name:r==null?void 0:r.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class yl{constructor(r){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(l,a)=>{if(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(l))this.pendingCanvasMutations.set(l,[]);this.pendingCanvasMutations.get(l).push(a)});let{sampling:e="all",win:t,blockClass:i,blockSelector:s,recordCanvas:n,dataURLOptions:o}=r;if(this.mutationCb=r.mutationCb,this.mirror=r.mirror,n&&e==="all")this.initCanvasMutationObserver(t,i,s);if(n&&typeof e==="number")this.initCanvasFPSObserver(e,t,i,s,{dataURLOptions:o})}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(r,e,t,i,s){let n=bo(e,t,i,!0),o=new Map,l=new cp;l.onmessage=(d)=>{let{id:g}=d.data;if(o.set(g,!1),!("base64"in d.data))return;let{base64:m,type:h,width:b,height:w}=d.data;this.mutationCb({id:g,type:lt["2D"],commands:[{property:"clearRect",args:[0,0,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:h}]},0,0]}]})};let a=1000/r,u=0,c,f=()=>{let d=[];return e.document.querySelectorAll("canvas").forEach((g)=>{if(!ne(g,t,i,!0))d.push(g)}),d},p=(d)=>{if(u&&d-u<a){c=requestAnimationFrame(p);return}u=d,f().forEach(async(g)=>{var m;let h=this.mirror.getId(g);if(o.get(h))return;if(g.width===0||g.height===0)return;if(o.set(h,!0),["webgl","webgl2"].includes(g.__context)){let w=g.getContext(g.__context);if(((m=w==null?void 0:w.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1)w.clear(w.COLOR_BUFFER_BIT)}let b=await createImageBitmap(g);l.postMessage({id:h,bitmap:b,width:g.width,height:g.height,dataURLOptions:s.dataURLOptions},[b])}),c=requestAnimationFrame(p)};c=requestAnimationFrame(p),this.resetObservers=()=>{n(),cancelAnimationFrame(c)}}initCanvasMutationObserver(r,e,t){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=bo(r,e,t,!1),s=op(this.processMutation.bind(this),r,e,t),n=lp(this.processMutation.bind(this),r,e,t);this.resetObservers=()=>{i(),s(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let r=(e)=>{this.rafStamps.latestId=e,requestAnimationFrame(r)};requestAnimationFrame(r)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((r,e)=>{let t=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,t)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(r,e){if(this.frozen||this.locked)return;let t=this.pendingCanvasMutations.get(r);if(!t||e===-1)return;let i=t.map((n)=>{let{type:o,...l}=n;return l}),{type:s}=t[0];this.mutationCb({id:e,type:s,commands:i}),this.pendingCanvasMutations.delete(r)}}class vl{constructor(r){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new tl),this.mutationCb=r.mutationCb,this.adoptedStyleSheetCb=r.adoptedStyleSheetCb}attachLinkElement(r,e){if("_cssText"in e.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]});this.trackLinkElement(r)}trackLinkElement(r){if(this.trackedLinkElements.has(r))return;this.trackedLinkElements.add(r),this.trackStylesheetInLinkElement(r)}adoptStyleSheets(r,e){if(r.length===0)return;let t={id:e,styleIds:[]},i=[];for(let s of r){let n;if(!this.styleMirror.has(s))n=this.styleMirror.add(s),i.push({styleId:n,rules:Array.from(s.rules||CSSRule,(o,l)=>({rule:Ao(o,s.href),index:l}))});else n=this.styleMirror.getId(s);t.styleIds.push(n)}if(i.length>0)t.styles=i;this.adoptedStyleSheetCb(t)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(r){}}class wl{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(r,e){let t=this.nodeMap.get(r);return t&&Array.from(t).some((i)=>i!==e)}add(r,e){if(!this.active)this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1});this.nodeMap.set(r,(this.nodeMap.get(r)||new Set).add(e))}destroy(){}}var X,Er,Ei,Pr=!1;try{if(Array.from([1],(r)=>r*2)[0]!==2){let r=document.createElement("iframe");document.body.appendChild(r),Array.from=((En=r.contentWindow)==null?void 0:En.Array.from)||Array.from,document.body.removeChild(r)}}catch(r){console.debug("Unable to override Array.from",r)}var ye=du();function Ne(r={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:i,blockClass:s="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:h,packFn:b,sampling:w={},dataURLOptions:y={},mousemoveWait:C,recordDOM:I=!0,recordCanvas:E=!1,recordCrossOriginIframes:x=!1,recordAfter:S=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",userTriggeredOnInput:_=!1,collectFonts:k=!1,inlineImages:Q=!1,plugins:H,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:ee=new Set([]),errorHandler:te}=r;zd(te);let L=x?window.parent===window:!0,P=!1;if(!L)try{if(window.parent.document)P=!1}catch(O){P=!0}if(L&&!e)throw Error("emit function is required");if(!L&&!P)return()=>{};if(C!==void 0&&w.mousemove===void 0)w.mousemove=C;ye.reset();let K=f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},J=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d?d:{};$d();let Ge,ae=0,Oe=(O)=>{for(let le of H||[])if(le.eventProcessor)O=le.eventProcessor(O);if(b&&!P)O=b(O);return O};X=(O,le)=>{var Z;let W=O;if(W.timestamp=kr(),((Z=Ue[0])==null?void 0:Z.isFrozen())&&W.type!==D.FullSnapshot&&!(W.type===D.IncrementalSnapshot&&W.data.source===N.Mutation))Ue.forEach((Se)=>Se.unfreeze());if(L)e==null||e(Oe(W),le);else if(P){let Se={type:"rrweb",event:Oe(W),origin:window.location.origin,isCheckout:le};window.parent.postMessage(Se,"*")}if(W.type===D.FullSnapshot)Ge=W,ae=0;else if(W.type===D.IncrementalSnapshot){if(W.data.source===N.Mutation&&W.data.isAttachIframe)return;ae++;let Se=i&&ae>=i,B=t&&W.timestamp-Ge.timestamp>t;if(Se||B)Er(!0)}};let me=(O)=>{X({type:D.IncrementalSnapshot,data:{source:N.Mutation,...O}})},ce=(O)=>X({type:D.IncrementalSnapshot,data:{source:N.Scroll,...O}}),re=(O)=>X({type:D.IncrementalSnapshot,data:{source:N.CanvasMutation,...O}}),be=new vl({mutationCb:me,adoptedStyleSheetCb:(O)=>X({type:D.IncrementalSnapshot,data:{source:N.AdoptedStyleSheet,...O}})}),ge=new hl({mirror:ye,mutationCb:me,stylesheetManager:be,recordCrossOriginIframes:x,wrappedEmit:X});for(let O of H||[])if(O.getMirror)O.getMirror({nodeMirror:ye,crossOriginIframeMirror:ge.crossOriginIframeMirror,crossOriginIframeStyleMirror:ge.crossOriginIframeStyleMirror});let ct=new wl;Ei=new yl({recordCanvas:E,mutationCb:re,win:window,blockClass:s,blockSelector:n,mirror:ye,sampling:w.canvas,dataURLOptions:y});let Pe=new fl({mutationCb:me,scrollCb:ce,bypassOptions:{blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:K,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:E,inlineImages:Q,sampling:w,slimDOMOptions:J,iframeManager:ge,stylesheetManager:be,canvasManager:Ei,keepIframeSrcFn:A,processedNodeManager:ct},mirror:ye});Er=(O=!1)=>{if(!I)return;X({type:D.Meta,data:{href:window.location.href,width:Ka(),height:Xa()}},O),be.reset(),Pe.init(),Ue.forEach((Z)=>Z.lock());let le=$u(document,{mirror:ye,blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:K,maskTextFn:m,maskInputFn:g,slimDOM:J,dataURLOptions:y,recordCanvas:E,inlineImages:Q,onSerialize:(Z)=>{if(Qa(Z,ye))ge.addIframe(Z);if(el(Z,ye))be.trackLinkElement(Z);if(rs(Z))Pe.addShadowRoot(T.shadowRoot(Z),document)},onIframeLoad:(Z,W)=>{ge.attachIframe(Z,W),Pe.observeAttachShadow(Z)},onStylesheetLoad:(Z,W)=>{be.attachLinkElement(Z,W)},keepIframeSrcFn:A});if(!le)return console.warn("Failed to snapshot the document");if(X({type:D.FullSnapshot,data:{node:le,initialOffset:Za(window)}},O),Ue.forEach((Z)=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)be.adoptStyleSheets(document.adoptedStyleSheets,ye.getId(document))};try{let O=[],le=(W)=>{var Se;return R(rp)({mutationCb:me,mousemoveCb:(B,Kr)=>X({type:D.IncrementalSnapshot,data:{source:Kr,positions:B}}),mouseInteractionCb:(B)=>X({type:D.IncrementalSnapshot,data:{source:N.MouseInteraction,...B}}),scrollCb:ce,viewportResizeCb:(B)=>X({type:D.IncrementalSnapshot,data:{source:N.ViewportResize,...B}}),inputCb:(B)=>X({type:D.IncrementalSnapshot,data:{source:N.Input,...B}}),mediaInteractionCb:(B)=>X({type:D.IncrementalSnapshot,data:{source:N.MediaInteraction,...B}}),styleSheetRuleCb:(B)=>X({type:D.IncrementalSnapshot,data:{source:N.StyleSheetRule,...B}}),styleDeclarationCb:(B)=>X({type:D.IncrementalSnapshot,data:{source:N.StyleDeclaration,...B}}),canvasMutationCb:re,fontCb:(B)=>X({type:D.IncrementalSnapshot,data:{source:N.Font,...B}}),selectionCb:(B)=>{X({type:D.IncrementalSnapshot,data:{source:N.Selection,...B}})},customElementCb:(B)=>{X({type:D.IncrementalSnapshot,data:{source:N.CustomElement,...B}})},blockClass:s,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:K,inlineStylesheet:c,sampling:w,recordDOM:I,recordCanvas:E,inlineImages:Q,userTriggeredOnInput:_,collectFonts:k,doc:W,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:A,blockSelector:n,slimDOMOptions:J,dataURLOptions:y,mirror:ye,iframeManager:ge,stylesheetManager:be,shadowDomManager:Pe,processedNodeManager:ct,canvasManager:Ei,ignoreCSSAttributes:ee,plugins:((Se=H==null?void 0:H.filter((B)=>B.observer))==null?void 0:Se.map((B)=>({observer:B.observer,options:B.options,callback:(Kr)=>X({type:D.Plugin,data:{plugin:B.name,payload:Kr}})})))||[]},h)};ge.addLoadListener((W)=>{try{O.push(le(W.contentDocument))}catch(Se){console.warn(Se)}});let Z=()=>{Er(),O.push(le(document)),Pr=!0};if(document.readyState==="interactive"||document.readyState==="complete")Z();else O.push(se("DOMContentLoaded",()=>{if(X({type:D.DomContentLoaded,data:{}}),S==="DOMContentLoaded")Z()})),O.push(se("load",()=>{if(X({type:D.Load,data:{}}),S==="load")Z()},window));return()=>{O.forEach((W)=>W()),ct.destroy(),Pr=!1,Vd()}}catch(O){console.warn(O)}}Ne.addCustomEvent=(r,e)=>{if(!Pr)throw Error("please add custom event after start recording");X({type:D.Custom,data:{tag:r,payload:e}})};Ne.freezePage=()=>{Ue.forEach((r)=>r.freeze())};Ne.takeFullSnapshot=(r)=>{if(!Pr)throw Error("please take full snapshot after start recording");Er(r)};Ne.mirror=ye;/*! *****************************************************************************
59
+ or you can use record.mirror to access the mirror instance during recording.`,Fo={map:{},getId(){return console.error(it),-1},getNode(){return console.error(it),null},removeNodeFromMap(){console.error(it)},has(){return console.error(it),!1},reset(){console.error(it)}};if(typeof window<"u"&&window.Proxy&&window.Reflect)Fo=new Proxy(Fo,{get(t,e,r){if(e==="map")console.error(it);return Reflect.get(t,e,r)}});function $t(t,e,r={}){let i=null,s=0;return function(...n){let o=Date.now();if(!s&&r.leading===!1)s=o;let l=e-(o-s),a=this;if(l<=0||l>e){if(i)clearTimeout(i),i=null;s=o,t.apply(a,n)}else if(!i&&r.trailing!==!1)i=setTimeout(()=>{s=r.leading===!1?0:Date.now(),i=null,t.apply(a,n)},l)}}function Qr(t,e,r,i,s=window){let n=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,i?r:{set(o){if(setTimeout(()=>{r.set.call(this,o)},0),n&&n.set)n.set.call(this,o)}}),()=>Qr(t,e,n||{},!0)}function gt(t,e,r){try{if(!(e in t))return()=>{};let i=t[e],s=r(i);if(typeof s==="function")s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i}});return t[e]=s,()=>{t[e]=i}}catch{return()=>{}}}var Br=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString()))Br=()=>new Date().getTime();function wl(t){var e,r,i,s;let n=t.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=O.parentElement(n.body))==null?void 0:e.scrollLeft)||((r=n==null?void 0:n.body)==null?void 0:r.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((i=O.parentElement(n.body))==null?void 0:i.scrollTop)||((s=n==null?void 0:n.body)==null?void 0:s.scrollTop)||0}}function bl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Sl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Cl(t){if(!t)return null;return t.nodeType===t.ELEMENT_NODE?t:O.parentElement(t)}function de(t,e,r,i){if(!t)return!1;let s=Cl(t);if(!s)return!1;try{if(typeof e==="string"){if(s.classList.contains(e))return!0;if(i&&s.closest("."+e)!==null)return!0}else if(Or(s,e,i))return!0}catch(n){}if(r){if(s.matches(r))return!0;if(i&&s.closest(r)!==null)return!0}return!1}function Sp(t,e){return e.getId(t)!==-1}function ki(t,e,r){if(t.tagName==="TITLE"&&r.headTitleMutations)return!0;return e.getId(t)===Mt}function El(t,e){if(xt(t))return!1;let r=e.getId(t);if(!e.has(r))return!0;let i=O.parentNode(t);if(i&&i.nodeType===t.DOCUMENT_NODE)return!1;if(!i)return!0;return El(i,e)}function ds(t){return Boolean(t.changedTouches)}function Cp(t=window){if("NodeList"in t&&!t.NodeList.prototype.forEach)t.NodeList.prototype.forEach=Array.prototype.forEach;if("DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach)t.DOMTokenList.prototype.forEach=Array.prototype.forEach}function Il(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function xl(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function ps(t){if(!t)return!1;if(t instanceof Vs&&"shadowRoot"in t)return Boolean(t.shadowRoot);return Boolean(O.shadowRoot(t))}class Tl{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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 r;if(e===void 0)r=this.id++;else r=e;return this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Al(t){var e;let r=null;if("getRootNode"in t&&((e=O.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&O.host(O.getRootNode(t)))r=O.host(O.getRootNode(t));return r}function Ep(t){let e=t,r;while(r=Al(e))e=r;return e}function Ip(t){let e=t.ownerDocument;if(!e)return!1;let r=Ep(t);return O.contains(e,r)}function Ml(t){let e=t.ownerDocument;if(!e)return!1;return O.contains(e,t)||Ip(t)}var P=((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))(P||{}),D=((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))(D||{}),me=((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))(me||{}),_e=((t)=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(_e||{}),mt=((t)=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(mt||{}),st=((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))(st||{});var Nl=((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))(Nl||{});function Uo(t){return"__ln"in t}class Rl{constructor(){v(this,"length",0),v(this,"head",null),v(this,"tail",null)}get(t){if(t>=this.length)throw Error("Position outside of list range");let e=this.head;for(let r=0;r<t;r++)e=(e==null?void 0:e.next)||null;return e}addNode(t){let e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Uo(t.previousSibling)){let r=t.previousSibling.__ln.next;if(e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r)r.previous=e}else if(t.nextSibling&&Uo(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;if(e.previous=r,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,r)r.next=e}else{if(this.head)this.head.previous=e;e.next=this.head,this.head=e}if(e.next===null)this.tail=e;this.length++}removeNode(t){let e=t.__ln;if(!this.head)return;if(!e.previous)if(this.head=e.next,this.head)this.head.previous=null;else this.tail=null;else if(e.previous.next=e.next,e.next)e.next.previous=e.previous;else this.tail=e.previous;if(t.__ln)delete t.__ln;this.length--}}var Bo=(t,e)=>`${t}@${e}`;class Ol{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",(t)=>{t.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],e=new Set,r=new Rl,i=(l)=>{let a=l,c=Mt;while(c===Mt)a=a&&a.nextSibling,c=a&&this.mirror.getId(a);return c},s=(l)=>{let a=O.parentNode(l);if(!a||!Ml(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){let d=a.tagName;if(d==="TEXTAREA")return;else if(d==="STYLE"&&this.addedSet.has(a))c=!0}let u=xt(a)?this.mirror.getId(Al(l)):this.mirror.getId(a),h=i(l);if(u===-1||h===-1)return r.addNode(l);let p=at(l,{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:(d)=>{if(Il(d,this.mirror))this.iframeManager.addIframe(d);if(xl(d,this.mirror))this.stylesheetManager.trackLinkElement(d);if(ps(l))this.shadowDomManager.addShadowRoot(O.shadowRoot(l),this.doc)},onIframeLoad:(d,g)=>{this.iframeManager.attachIframe(d,g),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,g)=>{this.stylesheetManager.attachLinkElement(d,g)},cssCaptured:c});if(p)t.push({parentId:u,nextId:h,node:p}),e.add(p.id)};while(this.mapRemoves.length)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet){if(Wo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(O.parentNode(l)))continue;s(l)}for(let l of this.addedSet)if(!Vo(this.droppedSet,l)&&!Wo(this.removesSubTreeCache,l,this.mirror))s(l);else if(Vo(this.movedSet,l))s(l);else this.droppedSet.add(l);let n=null;while(r.length){let l=null;if(n){let a=this.mirror.getId(O.parentNode(n.value)),c=i(n.value);if(a!==-1&&c!==-1)l=n}if(!l){let a=r.tail;while(a){let c=a;if(a=a.previous,c){let u=this.mirror.getId(O.parentNode(c.value));if(i(c.value)===-1)continue;else if(u!==-1){l=c;break}else{let p=c.value,d=O.parentNode(p);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let g=O.host(d);if(this.mirror.getId(g)!==-1){l=c;break}}}}}}if(!l){while(r.head)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),s(l.value)}let o={texts:this.texts.map((l)=>{let a=l.node,c=O.parentNode(a);if(c&&c.tagName==="TEXTAREA")this.genTextAreaValueMutation(c);return{id:this.mirror.getId(a),value:l.value}}).filter((l)=>!e.has(l.id)).filter((l)=>this.mirror.has(l.id)),attributes:this.attributes.map((l)=>{let{attributes:a}=l;if(typeof a.style==="string"){let c=JSON.stringify(l.styleDiff),u=JSON.stringify(l._unchangedStyles);if(c.length<a.style.length){if((c+u).split("var(").length===a.style.split("var(").length)a.style=l.styleDiff}}return{id:this.mirror.getId(l.node),attributes:a}}).filter((l)=>!e.has(l.id)).filter((l)=>this.mirror.has(l.id)),removes:this.removes,adds:t};if(!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length)return;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(o)}),v(this,"genTextAreaValueMutation",(t)=>{let e=this.attributeMap.get(t);if(!e)e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e);e.attributes.value=Array.from(O.childNodes(t),(r)=>O.textContent(r)||"").join("")}),v(this,"processMutation",(t)=>{if(ki(t.target,this.mirror,this.slimDOMOptions))return;switch(t.type){case"characterData":{let e=O.textContent(t.target);if(!de(t.target,this.blockClass,this.blockSelector,!1)&&e!==t.oldValue)this.texts.push({value:ra(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,Cl(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{let{target:e,attributeName:r}=t,i=t.target.getAttribute(r);if(r==="value"){let n=bs(e);i=ws({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:n,value:i,maskInputFn:this.maskInputFn})}if(de(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(e.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!e.contentDocument)r="rr_src";else return;if(!s)s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s);if(r==="type"&&e.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password")e.setAttribute("data-rr-is-password","true");if(!ta(e.tagName,r)){if(s.attributes[r]=ea(this.doc,Ye(e.tagName),Ye(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(o){this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement("span");if(t.oldValue)n.setAttribute("style",t.oldValue);for(let o of Array.from(e.style)){let l=e.style.getPropertyValue(o),a=e.style.getPropertyPriority(o);if(l!==n.style.getPropertyValue(o)||a!==n.style.getPropertyPriority(o))if(a==="")s.styleDiff[o]=l;else s.styleDiff[o]=[l,a];else s._unchangedStyles[o]=[l,a]}for(let o of Array.from(n.style))if(e.style.getPropertyValue(o)==="")s.styleDiff[o]=!1}else if(r==="open"&&e.tagName==="DIALOG")if(e.matches("dialog:modal"))s.attributes.rr_open_mode="modal";else s.attributes.rr_open_mode="non-modal"}break}case"childList":{if(de(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach((e)=>this.genAdds(e,t.target)),t.removedNodes.forEach((e)=>{let r=this.mirror.getId(e),i=xt(t.target)?this.mirror.getId(O.host(t.target)):this.mirror.getId(t.target);if(de(t.target,this.blockClass,this.blockSelector,!1)||ki(e,this.mirror,this.slimDOMOptions)||!Sp(e,this.mirror))return;if(this.addedSet.has(e))ms(this.addedSet,e),this.droppedSet.add(e);else if(this.addedSet.has(t.target)&&r===-1);else if(El(t.target,this.mirror));else if(this.movedSet.has(e)&&this.movedMap[Bo(r,i)])ms(this.movedSet,e);else this.removes.push({parentId:i,id:r,isShadow:xt(t.target)&&Tt(t.target)?!0:void 0}),xp(e,this.removesSubTreeCache);this.mapRemoves.push(e)});break}}}),v(this,"genAdds",(t,e)=>{if(this.processedNodeManager.inOtherBuffer(t,this))return;if(this.addedSet.has(t)||this.movedSet.has(t))return;if(this.mirror.hasNode(t)){if(ki(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let r=null;if(e&&this.mirror.hasNode(e))r=this.mirror.getId(e);if(r&&r!==-1)this.movedMap[Bo(this.mirror.getId(t),r)]=!0}else this.addedSet.add(t),this.droppedSet.delete(t);if(!de(t,this.blockClass,this.blockSelector,!1)){if(O.childNodes(t).forEach((r)=>this.genAdds(r)),ps(t))O.childNodes(O.shadowRoot(t)).forEach((r)=>{this.processedNodeManager.add(r,this),this.genAdds(r,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 ms(t,e){t.delete(e),O.childNodes(e).forEach((r)=>ms(t,r))}function xp(t,e){let r=[t];while(r.length){let i=r.pop();if(e.has(i))continue;e.add(i),O.childNodes(i).forEach((s)=>r.push(s))}return}function Wo(t,e,r){if(t.size===0)return!1;return Tp(t,e)}function Tp(t,e,r){let i=O.parentNode(e);if(!i)return!1;return t.has(i)}function Vo(t,e){if(t.size===0)return!1;return _l(t,e)}function _l(t,e){let r=O.parentNode(e);if(!r)return!1;if(t.has(r))return!0;return _l(t,r)}var At;function Ap(t){At=t}function Mp(){At=void 0}var k=(t)=>{if(!At)return t;return(...r)=>{try{return t(...r)}catch(i){if(At&&At(i)===!0)return;throw i}}},He=[];function Vt(t){try{if("composedPath"in t){let 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 Dl(t,e){let r=new Ol;He.push(r),r.init(t);let i=new(vl())(k(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Np({mousemoveCb:t,sampling:e,doc:r,mirror:i}){if(e.mousemove===!1)return()=>{};let s=typeof e.mousemove==="number"?e.mousemove:50,n=typeof e.mousemoveCallback==="number"?e.mousemoveCallback:500,o=[],l,a=$t(k((h)=>{let p=Date.now()-l;t(o.map((d)=>(d.timeOffset-=p,d)),h),o=[],l=null}),n),c=k($t(k((h)=>{let p=Vt(h),{clientX:d,clientY:g}=ds(h)?h.changedTouches[0]:h;if(!l)l=Br();o.push({x:d,y:g,id:i.getId(p),timeOffset:Br()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?D.Drag:h instanceof MouseEvent?D.MouseMove:D.TouchMove)}),s,{trailing:!1})),u=[fe("mousemove",c,r),fe("touchmove",c,r),fe("drag",c,r)];return k(()=>{u.forEach((h)=>h())})}function Rp({mouseInteractionCb:t,doc:e,mirror:r,blockClass:i,blockSelector:s,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,c=(u)=>(h)=>{let p=Vt(h);if(de(p,i,s,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=_e.Mouse;break;case"touch":d=_e.Touch;break;case"pen":d=_e.Pen;break}if(d===_e.Touch){if(me[u]===me.MouseDown)g="TouchStart";else if(me[u]===me.MouseUp)g="TouchEnd"}else if(d===_e.Pen);}else if(ds(h))d=_e.Touch;if(d!==null){if(a=d,g.startsWith("Touch")&&d===_e.Touch||g.startsWith("Mouse")&&d===_e.Mouse)d=null}else if(me[u]===me.Click)d=a,a=null;let m=ds(h)?h.changedTouches[0]:h;if(!m)return;let f=r.getId(p),{clientX:b,clientY:w}=m;k(t)({type:me[g],id:f,x:b,y:w,...d!==null&&{pointerType:d}})};return Object.keys(me).filter((u)=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach((u)=>{let h=Ye(u),p=c(u);if(window.PointerEvent)switch(me[u]){case me.MouseDown:case me.MouseUp:h=h.replace("mouse","pointer");break;case me.TouchStart:case me.TouchEnd:return}l.push(fe(h,p,e))}),k(()=>{l.forEach((u)=>u())})}function kl({scrollCb:t,doc:e,mirror:r,blockClass:i,blockSelector:s,sampling:n}){let o=k($t(k((l)=>{let a=Vt(l);if(!a||de(a,i,s,!0))return;let c=r.getId(a);if(a===e&&e.defaultView){let u=wl(e.defaultView);t({id:c,x:u.left,y:u.top})}else t({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return fe("scroll",o,e)}function Op({viewportResizeCb:t},{win:e}){let r=-1,i=-1,s=k($t(k(()=>{let n=bl(),o=Sl();if(r!==n||i!==o)t({width:Number(o),height:Number(n)}),r=n,i=o}),200));return fe("resize",s,e)}var _p=["INPUT","TEXTAREA","SELECT"],zo=new WeakMap;function Dp({inputCb:t,doc:e,mirror:r,blockClass:i,blockSelector:s,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(w){let y=Vt(w),C=w.isTrusted,x=y&&y.tagName;if(y&&x==="OPTION")y=O.parentElement(y);if(!y||!x||_p.indexOf(x)<0||de(y,i,s,!0))return;if(y.classList.contains(n)||o&&y.matches(o))return;let I=y.value,E=!1,S=bs(y)||"";if(S==="radio"||S==="checkbox")E=y.checked;else if(l[x.toLowerCase()]||l[S])I=ws({element:y,maskInputOptions:l,tagName:x,type:S,value:I,maskInputFn:a});p(y,u?{text:I,isChecked:E,userTriggered:C}:{text:I,isChecked:E});let A=y.name;if(S==="radio"&&A&&E)e.querySelectorAll(`input[type="radio"][name="${A}"]`).forEach((M)=>{if(M!==y){let Q=M.value;p(M,u?{text:Q,isChecked:!E,userTriggered:!1}:{text:Q,isChecked:!E})}})}function p(w,y){let C=zo.get(w);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){zo.set(w,y);let x=r.getId(w);k(t)({...y,id:x})}}let g=(c.input==="last"?["change"]:["input","change"]).map((w)=>fe(w,k(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach((w)=>w())};let f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];if(f&&f.set)g.push(...b.map((w)=>Qr(w[0],w[1],{set(){k(h)({target:this,isTrusted:!1})}},!1,m)));return k(()=>{g.forEach((w)=>w())})}function Wr(t){let e=[];function r(i,s){if(Cr("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||Cr("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||Cr("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||Cr("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){let o=Array.from(i.parentRule.cssRules).indexOf(i);s.unshift(o)}else if(i.parentStyleSheet){let o=Array.from(i.parentStyleSheet.cssRules).indexOf(i);s.unshift(o)}return s}return r(t,e)}function Fe(t,e,r){let i,s;if(!t)return{};if(t.ownerNode)i=e.getId(t.ownerNode);else s=r.getId(t);return{styleId:s,id:i}}function kp({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};let s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:k((u,h,p)=>{let[d,g]=p,{id:m,styleId:f}=Fe(h,e,r.styleMirror);if(m&&m!==-1||f&&f!==-1)t({id:m,styleId:f,adds:[{rule:d,index:g}]});return u.apply(h,p)})}),i.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let d=`${u} { ${h} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};let n=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:k((u,h,p)=>{let[d]=p,{id:g,styleId:m}=Fe(h,e,r.styleMirror);if(g&&g!==-1||m&&m!==-1)t({id:g,styleId:m,removes:[{index:d}]});return u.apply(h,p)})}),i.CSSStyleSheet.prototype.removeRule=function(u){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;if(i.CSSStyleSheet.prototype.replace)o=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:k((u,h,p)=>{let[d]=p,{id:g,styleId:m}=Fe(h,e,r.styleMirror);if(g&&g!==-1||m&&m!==-1)t({id:g,styleId:m,replace:d});return u.apply(h,p)})});let l;if(i.CSSStyleSheet.prototype.replaceSync)l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:k((u,h,p)=>{let[d]=p,{id:g,styleId:m}=Fe(h,e,r.styleMirror);if(g&&g!==-1||m&&m!==-1)t({id:g,styleId:m,replaceSync:d});return u.apply(h,p)})});let a={};if(Er("CSSGroupingRule"))a.CSSGroupingRule=i.CSSGroupingRule;else{if(Er("CSSMediaRule"))a.CSSMediaRule=i.CSSMediaRule;if(Er("CSSConditionRule"))a.CSSConditionRule=i.CSSConditionRule;if(Er("CSSSupportsRule"))a.CSSSupportsRule=i.CSSSupportsRule}let c={};return Object.entries(a).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:k((p,d,g)=>{let[m,f]=g,{id:b,styleId:w}=Fe(d.parentStyleSheet,e,r.styleMirror);if(b&&b!==-1||w&&w!==-1)t({id:b,styleId:w,adds:[{rule:m,index:[...Wr(d),f||0]}]});return p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:k((p,d,g)=>{let[m]=g,{id:f,styleId:b}=Fe(d.parentStyleSheet,e,r.styleMirror);if(f&&f!==-1||b&&b!==-1)t({id:f,styleId:b,removes:[{index:[...Wr(d),m]}]});return p.apply(d,g)})})}),k(()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=n,o&&(i.CSSStyleSheet.prototype.replace=o),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function Ll({mirror:t,stylesheetManager:e},r){var i,s,n;let o=null;if(r.nodeName==="#document")o=t.getId(r);else o=t.getId(O.host(r));let l=r.nodeName==="#document"?(i=r.defaultView)==null?void 0:i.Document:(n=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:n.ShadowRoot,a=(l==null?void 0:l.prototype)?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;if(o===null||o===-1||!l||!a)return()=>{};return Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;let h=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o)}catch(p){}return h}}),k(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})}function Lp({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:i},{win:s}){let n=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:k((l,a,c)=>{var u;let[h,p,d]=c;if(r.has(h))return n.apply(a,[h,p,d]);let{id:g,styleId:m}=Fe((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,i.styleMirror);if(g&&g!==-1||m&&m!==-1)t({id:g,styleId:m,set:{property:h,value:p,priority:d},index:Wr(a.parentRule)});return l.apply(a,c)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:k((l,a,c)=>{var u;let[h]=c;if(r.has(h))return o.apply(a,[h]);let{id:p,styleId:d}=Fe((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,i.styleMirror);if(p&&p!==-1||d&&d!==-1)t({id:p,styleId:d,remove:{property:h},index:Wr(a.parentRule)});return l.apply(a,c)})}),k(()=>{s.CSSStyleDeclaration.prototype.setProperty=n,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Pp({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:i,sampling:s,doc:n}){let o=k((a)=>$t(k((c)=>{let u=Vt(c);if(!u||de(u,e,r,!0))return;let{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=u;t({type:a,id:i.getId(u),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),s.media||500)),l=[fe("play",o(st.Play),n),fe("pause",o(st.Pause),n),fe("seeked",o(st.Seeked),n),fe("volumechange",o(st.VolumeChange),n),fe("ratechange",o(st.RateChange),n)];return k(()=>{l.forEach((a)=>a())})}function $p({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return()=>{};let i=[],s=new WeakMap,n=r.FontFace;r.FontFace=function(a,c,u){let h=new n(a,c,u);return s.set(h,{family:a,buffer:typeof c!=="string",descriptors:u,fontSource:typeof c==="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};let o=gt(e.fonts,"add",function(l){return function(a){return setTimeout(k(()=>{let c=s.get(a);if(c)t(c),s.delete(a)}),0),l.apply(this,[a])}});return i.push(()=>{r.FontFace=n}),i.push(o),k(()=>{i.forEach((l)=>l())})}function Fp(t){let{doc:e,mirror:r,blockClass:i,blockSelector:s,selectionCb:n}=t,o=!0,l=k(()=>{let a=e.getSelection();if(!a||o&&(a==null?void 0:a.isCollapsed))return;o=a.isCollapsed||!1;let c=[],u=a.rangeCount||0;for(let h=0;h<u;h++){let p=a.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;if(de(d,i,s,!0)||de(m,i,s,!0))continue;c.push({start:r.getId(d),startOffset:g,end:r.getId(m),endOffset:f})}n({ranges:c})});return l(),fe("selectionchange",l)}function Up({doc:t,customElementCb:e}){let r=t.defaultView;if(!r||!r.customElements)return()=>{};return gt(r.customElements,"define",function(s){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return s.apply(this,[n,o,l])}})}function Bp(t,e){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:s,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=t;t.mutationCb=(...m)=>{if(e.mutation)e.mutation(...m);r(...m)},t.mousemoveCb=(...m)=>{if(e.mousemove)e.mousemove(...m);i(...m)},t.mouseInteractionCb=(...m)=>{if(e.mouseInteraction)e.mouseInteraction(...m);s(...m)},t.scrollCb=(...m)=>{if(e.scroll)e.scroll(...m);n(...m)},t.viewportResizeCb=(...m)=>{if(e.viewportResize)e.viewportResize(...m);o(...m)},t.inputCb=(...m)=>{if(e.input)e.input(...m);l(...m)},t.mediaInteractionCb=(...m)=>{if(e.mediaInteaction)e.mediaInteaction(...m);a(...m)},t.styleSheetRuleCb=(...m)=>{if(e.styleSheetRule)e.styleSheetRule(...m);c(...m)},t.styleDeclarationCb=(...m)=>{if(e.styleDeclaration)e.styleDeclaration(...m);u(...m)},t.canvasMutationCb=(...m)=>{if(e.canvasMutation)e.canvasMutation(...m);h(...m)},t.fontCb=(...m)=>{if(e.font)e.font(...m);p(...m)},t.selectionCb=(...m)=>{if(e.selection)e.selection(...m);d(...m)},t.customElementCb=(...m)=>{if(e.customElement)e.customElement(...m);g(...m)}}function Wp(t,e={}){let r=t.doc.defaultView;if(!r)return()=>{};Bp(t,e);let i;if(t.recordDOM)i=Dl(t,t.doc);let s=Np(t),n=Rp(t),o=kl(t),l=Op(t,{win:r}),a=Dp(t),c=Pp(t),u=()=>{},h=()=>{},p=()=>{},d=()=>{};if(t.recordDOM){if(u=kp(t,{win:r}),h=Ll(t,t.doc),p=Lp(t,{win:r}),t.collectFonts)d=$p(t)}let g=Fp(t),m=Up(t),f=[];for(let b of t.plugins)f.push(b.observer(b.callback,r,b.options));return k(()=>{He.forEach((b)=>b.reset()),i==null||i.disconnect(),s(),n(),o(),l(),a(),c(),u(),h(),p(),d(),g(),m(),f.forEach((b)=>b())})}function Cr(t){return typeof window[t]<"u"}function Er(t){return Boolean(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class gs{constructor(t){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){let s=r||this.getIdToRemoteIdMap(t),n=i||this.getRemoteIdToIdMap(t),o=s.get(e);if(!o)o=this.generateIdFn(),s.set(e,o),n.set(o,e);return o}getIds(t,e){let r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((s)=>this.getId(t,s,r,i))}getRemoteId(t,e,r){let i=r||this.getRemoteIdToIdMap(t);if(typeof e!=="number")return e;let s=i.get(e);if(!s)return-1;return s}getRemoteIds(t,e){let r=this.getRemoteIdToIdMap(t);return e.map((i)=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);if(!e)e=new Map,this.iframeIdToRemoteIdMap.set(t,e);return e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);if(!e)e=new Map,this.iframeRemoteIdToIdMap.set(t,e);return e}}class Pl{constructor(t){if(v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new gs(Qo)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gs(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes)window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){if(this.iframes.set(t,!0),t.contentWindow)this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var r,i;if(this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes)(r=t.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this));if((i=this.loadListener)==null||i.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){let e=t;if(e.data.type!=="rrweb"||e.origin!==e.data.origin)return;if(!t.source)return;let i=this.crossOriginIframeMap.get(t.source);if(!i)return;let s=this.transformCrossOriginEvent(i,e.data.event);if(s)this.wrappedEmit(s,e.data.isCheckout)}transformCrossOriginEvent(t,e){var r;switch(e.type){case P.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);let i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:P.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case P.Meta:case P.Load:case P.DomContentLoaded:return!1;case P.Plugin:return e;case P.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case P.IncrementalSnapshot:switch(e.data.source){case D.Mutation:return e.data.adds.forEach((i)=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);let s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(i.node,s)}),e.data.removes.forEach((i)=>{this.replaceIds(i,t,["parentId","id"])}),e.data.attributes.forEach((i)=>{this.replaceIds(i,t,["id"])}),e.data.texts.forEach((i)=>{this.replaceIds(i,t,["id"])}),e;case D.Drag:case D.TouchMove:case D.MouseMove:return e.data.positions.forEach((i)=>{this.replaceIds(i,t,["id"])}),e;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(e.data,t,["id"]),e;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case D.Font:return e;case D.Selection:return e.data.ranges.forEach((i)=>{this.replaceIds(i,t,["start","end"])}),e;case D.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),(r=e.data.styles)==null||r.forEach((i)=>{this.replaceStyleIds(i,t,["styleId"])}),e}}return!1}replace(t,e,r,i){for(let s of i){if(!Array.isArray(e[s])&&typeof e[s]!=="number")continue;if(Array.isArray(e[s]))e[s]=t.getIds(r,e[s]);else e[s]=t.getId(r,e[s])}return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){if(this.replaceIds(t,e,["id","rootId"]),"childNodes"in t)t.childNodes.forEach((r)=>{this.replaceIdOnNode(r,e)})}patchRootIdOnNode(t,e){if(t.type!==Nl.Document&&!t.rootId)t.rootId=e;if("childNodes"in t)t.childNodes.forEach((r)=>{this.patchRootIdOnNode(r,e)})}}class $l{constructor(t){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!Tt(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);let r=Dl({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(kl({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{if(t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(O.host(t)));this.restoreHandlers.push(Ll({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){if(!t.contentWindow||!t.contentDocument)return;this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){let r=this;this.restoreHandlers.push(gt(t.prototype,"attachShadow",function(i){return function(s){let n=i.call(this,s),o=O.shadowRoot(this);if(o&&Ml(this))r.addShadowRoot(o,e);return n}}))}reset(){this.restoreHandlers.forEach((t)=>{try{t()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vp=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(nt=0;nt<lt.length;nt++)Vp[lt.charCodeAt(nt)]=nt;var nt,zp=function(t){var e=new Uint8Array(t),r,i=e.length,s="";for(r=0;r<i;r+=3)s+=lt[e[r]>>2],s+=lt[(e[r]&3)<<4|e[r+1]>>4],s+=lt[(e[r+1]&15)<<2|e[r+2]>>6],s+=lt[e[r+2]&63];if(i%3===2)s=s.substring(0,s.length-1)+"=";else if(i%3===1)s=s.substring(0,s.length-2)+"==";return s};var Go=new Map;function Gp(t,e){let r=Go.get(t);if(!r)r=new Map,Go.set(t,r);if(!r.has(e))r.set(e,[]);return r.get(e)}var Fl=(t,e,r)=>{if(!t||!(Bl(t,e)||typeof t==="object"))return;let i=t.constructor.name,s=Gp(r,i),n=s.indexOf(t);if(n===-1)n=s.length,s.push(t);return n};function Mr(t,e,r){if(t instanceof Array)return t.map((i)=>Mr(i,e,r));else if(t===null)return t;else 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)]};else if(t instanceof ArrayBuffer){let i=t.constructor.name,s=zp(t);return{rr_type:i,base64:s}}else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Mr(t.buffer,e,r),t.byteOffset,t.byteLength]};else if(t instanceof HTMLImageElement){let i=t.constructor.name,{src:s}=t;return{rr_type:i,src:s}}else if(t instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[Mr(t.data,e,r),t.width,t.height]};else if(Bl(t,e)||typeof t==="object"){let i=t.constructor.name,s=Fl(t,e,r);return{rr_type:i,index:s}}return t}var Ul=(t,e,r)=>t.map((i)=>Mr(i,e,r)),Bl=(t,e)=>{let i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((s)=>typeof e[s]==="function");return Boolean(i.find((s)=>t instanceof e[s]))};function Hp(t,e,r,i){let s=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!=="function")continue;let l=gt(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){if(!de(this.canvas,r,i,!0))setTimeout(()=>{let u=Ul(c,e,this);t(this.canvas,{type:mt["2D"],property:o,args:u})},0);return a.apply(this,c)}});s.push(l)}catch{let l=Qr(e.CanvasRenderingContext2D.prototype,o,{set(a){t(this.canvas,{type:mt["2D"],property:o,args:[a],setter:!0})}});s.push(l)}return()=>{s.forEach((o)=>o())}}function Yp(t){return t==="experimental-webgl"?"webgl":t}function Ho(t,e,r,i){let s=[];try{let n=gt(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!de(this,e,r,!0)){let c=Yp(l);if(!("__context"in this))this.__context=c;if(i&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]==="object"){let u=a[0];if(!u.preserveDrawingBuffer)u.preserveDrawingBuffer=!0}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});s.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((n)=>n())}}function Yo(t,e,r,i,s,n){let o=[],l=Object.getOwnPropertyNames(t);for(let a of l){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))continue;try{if(typeof t[a]!=="function")continue;let c=gt(t,a,function(u){return function(...h){let p=u.apply(this,h);if(Fl(p,n,this),"tagName"in this.canvas&&!de(this.canvas,i,s,!0)){let d=Ul(h,n,this),g={type:e,property:a,args:d};r(this.canvas,g)}return p}});o.push(c)}catch{let c=Qr(t,a,{set(u){r(this.canvas,{type:e,property:a,args:[u],setter:!0})}});o.push(c)}}return o}function jp(t,e,r,i){let s=[];if(s.push(...Yo(e.WebGLRenderingContext.prototype,mt.WebGL,t,r,i,e)),typeof e.WebGL2RenderingContext<"u")s.push(...Yo(e.WebGL2RenderingContext.prototype,mt.WebGL2,t,r,i,e));return()=>{s.forEach((n)=>n())}}var Wl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Kp=(t)=>Uint8Array.from(atob(t),(e)=>e.charCodeAt(0)),jo=typeof window<"u"&&window.Blob&&new Blob([Kp(Wl)],{type:"text/javascript;charset=utf-8"});function Xp(t){let e;try{if(e=jo&&(window.URL||window.webkitURL).createObjectURL(jo),!e)throw"";let r=new Worker(e,{name:t==null?void 0:t.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),r}catch(r){return new Worker("data:text/javascript;base64,"+Wl,{name:t==null?void 0:t.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Vl{constructor(t){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(l,a)=>{if(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(l))this.pendingCanvasMutations.set(l,[]);this.pendingCanvasMutations.get(l).push(a)});let{sampling:e="all",win:r,blockClass:i,blockSelector:s,recordCanvas:n,dataURLOptions:o}=t;if(this.mutationCb=t.mutationCb,this.mirror=t.mirror,n&&e==="all")this.initCanvasMutationObserver(r,i,s);if(n&&typeof e==="number")this.initCanvasFPSObserver(e,r,i,s,{dataURLOptions:o})}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,r,i,s){let n=Ho(e,r,i,!0),o=new Map,l=new Xp;l.onmessage=(d)=>{let{id:g}=d.data;if(o.set(g,!1),!("base64"in d.data))return;let{base64:m,type:f,width:b,height:w}=d.data;this.mutationCb({id:g,type:mt["2D"],commands:[{property:"clearRect",args:[0,0,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:f}]},0,0]}]})};let a=1000/t,c=0,u,h=()=>{let d=[];return e.document.querySelectorAll("canvas").forEach((g)=>{if(!de(g,r,i,!0))d.push(g)}),d},p=(d)=>{if(c&&d-c<a){u=requestAnimationFrame(p);return}c=d,h().forEach(async(g)=>{var m;let f=this.mirror.getId(g);if(o.get(f))return;if(g.width===0||g.height===0)return;if(o.set(f,!0),["webgl","webgl2"].includes(g.__context)){let w=g.getContext(g.__context);if(((m=w==null?void 0:w.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1)w.clear(w.COLOR_BUFFER_BIT)}let b=await createImageBitmap(g);l.postMessage({id:f,bitmap:b,width:g.width,height:g.height,dataURLOptions:s.dataURLOptions},[b])}),u=requestAnimationFrame(p)};u=requestAnimationFrame(p),this.resetObservers=()=>{n(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,e,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=Ho(t,e,r,!1),s=Hp(this.processMutation.bind(this),t,e,r),n=jp(this.processMutation.bind(this),t,e,r);this.resetObservers=()=>{i(),s(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=(e)=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{let r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||e===-1)return;let i=r.map((n)=>{let{type:o,...l}=n;return l}),{type:s}=r[0];this.mutationCb({id:e,type:s,commands:i}),this.pendingCanvasMutations.delete(t)}}class zl{constructor(t){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new Tl),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){if("_cssText"in e.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]});this.trackLinkElement(t)}trackLinkElement(t){if(this.trackedLinkElements.has(t))return;this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t)}adoptStyleSheets(t,e){if(t.length===0)return;let r={id:e,styleIds:[]},i=[];for(let s of t){let n;if(!this.styleMirror.has(s))n=this.styleMirror.add(s),i.push({styleId:n,rules:Array.from(s.rules||CSSRule,(o,l)=>({rule:Zo(o,s.href),index:l}))});else n=this.styleMirror.getId(s);r.styleIds.push(n)}if(i.length>0)r.styles=i;this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Gl{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(t,e){let r=this.nodeMap.get(t);return r&&Array.from(r).some((i)=>i!==e)}add(t,e){if(!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(){}}var q,Nr,Li,Vr=!1;try{if(Array.from([1],(t)=>t*2)[0]!==2){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=((Kn=t.contentWindow)==null?void 0:Kn.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}var Ce=qc();function Le(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:s="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:b,sampling:w={},dataURLOptions:y={},mousemoveWait:C,recordDOM:x=!0,recordCanvas:I=!1,recordCrossOriginIframes:E=!1,recordAfter:S=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:A=!1,collectFonts:M=!1,inlineImages:Q=!1,plugins:V,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:re}=t;Ap(re);let F=E?window.parent===window:!0,L=!1;if(!F)try{if(window.parent.document)L=!1}catch(_){L=!0}if(F&&!e)throw Error("emit function is required");if(!F&&!L)return()=>{};if(C!==void 0&&w.mousemove===void 0)w.mousemove=C;Ce.reset();let ee=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},G=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d?d:{};Cp();let ge,ne=0,ye=(_)=>{for(let le of V||[])if(le.eventProcessor)_=le.eventProcessor(_);if(b&&!L)_=b(_);return _};q=(_,le)=>{var K;let U=_;if(U.timestamp=Br(),((K=He[0])==null?void 0:K.isFrozen())&&U.type!==P.FullSnapshot&&!(U.type===P.IncrementalSnapshot&&U.data.source===D.Mutation))He.forEach((Te)=>Te.unfreeze());if(F)e==null||e(ye(U),le);else if(L){let Te={type:"rrweb",event:ye(U),origin:window.location.origin,isCheckout:le};window.parent.postMessage(Te,"*")}if(U.type===P.FullSnapshot)ge=U,ne=0;else if(U.type===P.IncrementalSnapshot){if(U.data.source===D.Mutation&&U.data.isAttachIframe)return;ne++;let Te=i&&ne>=i,z=r&&U.timestamp-ge.timestamp>r;if(Te||z)Nr(!0)}};let ue=(_)=>{q({type:P.IncrementalSnapshot,data:{source:D.Mutation,..._}})},he=(_)=>q({type:P.IncrementalSnapshot,data:{source:D.Scroll,..._}}),oe=(_)=>q({type:P.IncrementalSnapshot,data:{source:D.CanvasMutation,..._}}),ie=new zl({mutationCb:ue,adoptedStyleSheetCb:(_)=>q({type:P.IncrementalSnapshot,data:{source:D.AdoptedStyleSheet,..._}})}),N=new Pl({mirror:Ce,mutationCb:ue,stylesheetManager:ie,recordCrossOriginIframes:E,wrappedEmit:q});for(let _ of V||[])if(_.getMirror)_.getMirror({nodeMirror:Ce,crossOriginIframeMirror:N.crossOriginIframeMirror,crossOriginIframeStyleMirror:N.crossOriginIframeStyleMirror});let Z=new Gl;Li=new Vl({recordCanvas:I,mutationCb:oe,win:window,blockClass:s,blockSelector:n,mirror:Ce,sampling:w.canvas,dataURLOptions:y});let xe=new $l({mutationCb:ue,scrollCb:he,bypassOptions:{blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:ee,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:I,inlineImages:Q,sampling:w,slimDOMOptions:G,iframeManager:N,stylesheetManager:ie,canvasManager:Li,keepIframeSrcFn:T,processedNodeManager:Z},mirror:Ce});Nr=(_=!1)=>{if(!x)return;q({type:P.Meta,data:{href:window.location.href,width:Sl(),height:bl()}},_),ie.reset(),xe.init(),He.forEach((K)=>K.lock());let le=Cu(document,{mirror:Ce,blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:ee,maskTextFn:m,maskInputFn:g,slimDOM:G,dataURLOptions:y,recordCanvas:I,inlineImages:Q,onSerialize:(K)=>{if(Il(K,Ce))N.addIframe(K);if(xl(K,Ce))ie.trackLinkElement(K);if(ps(K))xe.addShadowRoot(O.shadowRoot(K),document)},onIframeLoad:(K,U)=>{N.attachIframe(K,U),xe.observeAttachShadow(K)},onStylesheetLoad:(K,U)=>{ie.attachLinkElement(K,U)},keepIframeSrcFn:T});if(!le)return console.warn("Failed to snapshot the document");if(q({type:P.FullSnapshot,data:{node:le,initialOffset:wl(window)}},_),He.forEach((K)=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)ie.adoptStyleSheets(document.adoptedStyleSheets,Ce.getId(document))};try{let _=[],le=(U)=>{var Te;return k(Wp)({mutationCb:ue,mousemoveCb:(z,ni)=>q({type:P.IncrementalSnapshot,data:{source:ni,positions:z}}),mouseInteractionCb:(z)=>q({type:P.IncrementalSnapshot,data:{source:D.MouseInteraction,...z}}),scrollCb:he,viewportResizeCb:(z)=>q({type:P.IncrementalSnapshot,data:{source:D.ViewportResize,...z}}),inputCb:(z)=>q({type:P.IncrementalSnapshot,data:{source:D.Input,...z}}),mediaInteractionCb:(z)=>q({type:P.IncrementalSnapshot,data:{source:D.MediaInteraction,...z}}),styleSheetRuleCb:(z)=>q({type:P.IncrementalSnapshot,data:{source:D.StyleSheetRule,...z}}),styleDeclarationCb:(z)=>q({type:P.IncrementalSnapshot,data:{source:D.StyleDeclaration,...z}}),canvasMutationCb:oe,fontCb:(z)=>q({type:P.IncrementalSnapshot,data:{source:D.Font,...z}}),selectionCb:(z)=>{q({type:P.IncrementalSnapshot,data:{source:D.Selection,...z}})},customElementCb:(z)=>{q({type:P.IncrementalSnapshot,data:{source:D.CustomElement,...z}})},blockClass:s,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:ee,inlineStylesheet:u,sampling:w,recordDOM:x,recordCanvas:I,inlineImages:Q,userTriggeredOnInput:A,collectFonts:M,doc:U,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:T,blockSelector:n,slimDOMOptions:G,dataURLOptions:y,mirror:Ce,iframeManager:N,stylesheetManager:ie,shadowDomManager:xe,processedNodeManager:Z,canvasManager:Li,ignoreCSSAttributes:te,plugins:((Te=V==null?void 0:V.filter((z)=>z.observer))==null?void 0:Te.map((z)=>({observer:z.observer,options:z.options,callback:(ni)=>q({type:P.Plugin,data:{plugin:z.name,payload:ni}})})))||[]},f)};N.addLoadListener((U)=>{try{_.push(le(U.contentDocument))}catch(Te){console.warn(Te)}});let K=()=>{Nr(),_.push(le(document)),Vr=!0};if(document.readyState==="interactive"||document.readyState==="complete")K();else _.push(fe("DOMContentLoaded",()=>{if(q({type:P.DomContentLoaded,data:{}}),S==="DOMContentLoaded")K()})),_.push(fe("load",()=>{if(q({type:P.Load,data:{}}),S==="load")K()},window));return()=>{_.forEach((U)=>U()),Z.destroy(),Vr=!1,Mp()}}catch(_){console.warn(_)}}Le.addCustomEvent=(t,e)=>{if(!Vr)throw Error("please add custom event after start recording");q({type:P.Custom,data:{tag:t,payload:e}})};Le.freezePage=()=>{He.forEach((t)=>t.freeze())};Le.takeFullSnapshot=(t)=>{if(!Vr)throw Error("please take full snapshot after start recording");Nr(t)};Le.mirror=Ce;/*! *****************************************************************************
60
60
  Copyright (c) Microsoft Corporation.
61
61
 
62
62
  Permission to use, copy, modify, and/or distribute this software for any
@@ -69,4 +69,28 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
69
69
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
70
70
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
71
71
  PERFORMANCE OF THIS SOFTWARE.
72
- ***************************************************************************** */var Eo;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped"})(Eo||(Eo={}));var{addCustomEvent:zp}=Ne,{freezePage:Vp}=Ne,{takeFullSnapshot:Gp}=Ne;var pe=Uint8Array,oe=Uint16Array,Bt=Uint32Array,$s=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fs=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),bl=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Il=function(r,e){var t=new oe(31);for(var i=0;i<31;++i)t[i]=e+=1<<r[i-1];var s=new Bt(t[30]);for(var i=1;i<30;++i)for(var n=t[i];n<t[i+1];++n)s[n]=n-t[i]<<5|i;return[t,s]},xl=Il($s,2),hp=xl[0],_s=xl[1];hp[28]=258,_s[258]=28;var Al=Il(Fs,0),jp=Al[0],Sl=Al[1],ks=new oe(32768);for(M=0;M<32768;++M)xe=(M&43690)>>>1|(M&21845)<<1,xe=(xe&52428)>>>2|(xe&13107)<<2,xe=(xe&61680)>>>4|(xe&3855)<<4,ks[M]=((xe&65280)>>>8|(xe&255)<<8)>>>1;var xe,M,Ut=function(r,e,t){var i=r.length,s=0,n=new oe(e);for(;s<i;++s)++n[r[s]-1];var o=new oe(e);for(s=0;s<e;++s)o[s]=o[s-1]+n[s-1]<<1;var l;if(t){l=new oe(1<<e);var a=15-e;for(s=0;s<i;++s)if(r[s]){var u=s<<4|r[s],c=e-r[s],f=o[r[s]-1]++<<c;for(var p=f|(1<<c)-1;f<=p;++f)l[ks[f]>>>a]=u}}else{l=new oe(i);for(s=0;s<i;++s)l[s]=ks[o[r[s]-1]++]>>>15-r[s]}return l},Ve=new pe(288);for(M=0;M<144;++M)Ve[M]=8;var M;for(M=144;M<256;++M)Ve[M]=9;var M;for(M=256;M<280;++M)Ve[M]=7;var M;for(M=280;M<288;++M)Ve[M]=8;var M,Zr=new pe(32);for(M=0;M<32;++M)Zr[M]=5;var M,fp=Ut(Ve,9,0);var dp=Ut(Zr,5,0);var Ml=function(r){return(r/8>>0)+(r&7&&1)},Tl=function(r,e,t){if(t==null||t>r.length)t=r.length;var i=new(r instanceof oe?oe:r instanceof Bt?Bt:pe)(t-e);return i.set(r.subarray(e,t)),i};var Re=function(r,e,t){t<<=e&7;var i=e/8>>0;r[i]|=t,r[i+1]|=t>>>8},$t=function(r,e,t){t<<=e&7;var i=e/8>>0;r[i]|=t,r[i+1]|=t>>>8,r[i+2]|=t>>>16},Ds=function(r,e){var t=[];for(var i=0;i<r.length;++i)if(r[i])t.push({s:i,f:r[i]});var s=t.length,n=t.slice();if(!s)return[new pe(0),0];if(s==1){var o=new pe(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(I,E){return I.f-E.f}),t.push({s:-1,f:25001});var l=t[0],a=t[1],u=0,c=1,f=2;t[0]={s:-1,f:l.f+a.f,l,r:a};while(c!=s-1)l=t[t[u].f<t[f].f?u++:f++],a=t[u!=c&&t[u].f<t[f].f?u++:f++],t[c++]={s:-1,f:l.f+a.f,l,r:a};var p=n[0].s;for(var i=1;i<s;++i)if(n[i].s>p)p=n[i].s;var d=new oe(p+1),g=Ls(t[c-1],d,0);if(g>e){var i=0,m=0,h=g-e,b=1<<h;n.sort(function(E,x){return d[x.s]-d[E.s]||E.f-x.f});for(;i<s;++i){var w=n[i].s;if(d[w]>e)m+=b-(1<<g-d[w]),d[w]=e;else break}m>>>=h;while(m>0){var y=n[i].s;if(d[y]<e)m-=1<<e-d[y]++-1;else++i}for(;i>=0&&m;--i){var C=n[i].s;if(d[C]==e)--d[C],++m}g=e}return[new pe(d),g]},Ls=function(r,e,t){return r.s==-1?Math.max(Ls(r.l,e,t+1),Ls(r.r,e,t+1)):e[r.s]=t},Cl=function(r){var e=r.length;while(e&&!r[--e]);var t=new oe(++e),i=0,s=r[0],n=1,o=function(a){t[i++]=a};for(var l=1;l<=e;++l)if(r[l]==s&&l!=e)++n;else{if(!s&&n>2){for(;n>138;n-=138)o(32754);if(n>2)o(n>10?n-11<<5|28690:n-3<<5|12305),n=0}else if(n>3){o(s),--n;for(;n>6;n-=6)o(8304);if(n>2)o(n-3<<5|8208),n=0}while(n--)o(s);n=1,s=r[l]}return[t.subarray(0,i),e]},Ft=function(r,e){var t=0;for(var i=0;i<e.length;++i)t+=r[i]*e[i];return t},Ps=function(r,e,t){var i=t.length,s=Ml(e+2);r[s]=i&255,r[s+1]=i>>>8,r[s+2]=r[s]^255,r[s+3]=r[s+1]^255;for(var n=0;n<i;++n)r[s+n+4]=t[n];return(s+4+i)*8},El=function(r,e,t,i,s,n,o,l,a,u,c){Re(e,c++,t),++s[256];var f=Ds(s,15),p=f[0],d=f[1],g=Ds(n,15),m=g[0],h=g[1],b=Cl(p),w=b[0],y=b[1],C=Cl(m),I=C[0],E=C[1],x=new oe(19);for(var S=0;S<w.length;++S)x[w[S]&31]++;for(var S=0;S<I.length;++S)x[I[S]&31]++;var _=Ds(x,7),k=_[0],Q=_[1],H=19;for(;H>4&&!k[bl[H-1]];--H);var A=u+5<<3,ee=Ft(s,Ve)+Ft(n,Zr)+o,te=Ft(s,p)+Ft(n,m)+o+14+3*H+Ft(x,k)+(2*x[16]+3*x[17]+7*x[18]);if(A<=ee&&A<=te)return Ps(e,c,r.subarray(a,a+u));var L,P,K,J;if(Re(e,c,1+(te<ee)),c+=2,te<ee){L=Ut(p,d,0),P=p,K=Ut(m,h,0),J=m;var Ge=Ut(k,Q,0);Re(e,c,y-257),Re(e,c+5,E-1),Re(e,c+10,H-4),c+=14;for(var S=0;S<H;++S)Re(e,c+3*S,k[bl[S]]);c+=3*H;var ae=[w,I];for(var Oe=0;Oe<2;++Oe){var me=ae[Oe];for(var S=0;S<me.length;++S){var ce=me[S]&31;if(Re(e,c,Ge[ce]),c+=k[ce],ce>15)Re(e,c,me[S]>>>5&127),c+=me[S]>>>12}}}else L=fp,P=Ve,K=dp,J=Zr;for(var S=0;S<l;++S)if(i[S]>255){var ce=i[S]>>>18&31;if($t(e,c,L[ce+257]),c+=P[ce+257],ce>7)Re(e,c,i[S]>>>23&31),c+=$s[ce];var re=i[S]&31;if($t(e,c,K[re]),c+=J[re],re>3)$t(e,c,i[S]>>>5&8191),c+=Fs[re]}else $t(e,c,L[i[S]]),c+=P[i[S]];return $t(e,c,L[256]),c+P[256]},pp=new Bt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),mp=function(r,e,t,i,s,n){var o=r.length,l=new pe(i+o+5*(1+Math.floor(o/7000))+s),a=l.subarray(i,l.length-s),u=0;if(!e||o<8)for(var c=0;c<=o;c+=65535){var f=c+65535;if(f<o)u=Ps(a,u,r.subarray(c,f));else a[c]=n,u=Ps(a,u,r.subarray(c,o))}else{var p=pp[e-1],d=p>>>13,g=p&8191,m=(1<<t)-1,h=new oe(32768),b=new oe(m+1),w=Math.ceil(t/3),y=2*w,C=function(W){return(r[W]^r[W+1]<<w^r[W+2]<<y)&m},I=new Bt(25000),E=new oe(288),x=new oe(32),S=0,_=0,c=0,k=0,Q=0,H=0;for(;c<o;++c){var A=C(c),ee=c&32767,te=b[A];if(h[ee]=te,b[A]=ee,Q<=c){var L=o-c;if((S>7000||k>24576)&&L>423){u=El(r,a,0,I,E,x,_,k,H,c-H,u),k=S=_=0,H=c;for(var P=0;P<286;++P)E[P]=0;for(var P=0;P<30;++P)x[P]=0}var K=2,J=0,Ge=g,ae=ee-te&32767;if(L>2&&A==C(c-ae)){var Oe=Math.min(d,L)-1,me=Math.min(32767,c),ce=Math.min(258,L);while(ae<=me&&--Ge&&ee!=te){if(r[c+K]==r[c+K-ae]){var re=0;for(;re<ce&&r[c+re]==r[c+re-ae];++re);if(re>K){if(K=re,J=ae,re>Oe)break;var Hs=Math.min(ae,re-2),be=0;for(var P=0;P<Hs;++P){var ge=c-ae+P+32768&32767,ct=h[ge],Pe=ge-ct+32768&32767;if(Pe>be)be=Pe,te=ge}}}ee=te,te=h[ee],ae+=ee-te+32768&32767}}if(J){I[k++]=268435456|_s[K]<<18|Sl[J];var O=_s[K]&31,le=Sl[J]&31;_+=$s[O]+Fs[le],++E[257+O],++x[le],Q=c+K,++S}else I[k++]=r[c],++E[r[c]]}}u=El(r,a,n,I,E,x,_,k,H,c-H,u)}return Tl(l,0,i+Ml(u)+s)},gp=function(){var r=1,e=0;return{p:function(t){var i=r,s=e,n=t.length;for(var o=0;o!=n;){var l=Math.min(o+5552,n);for(;o<l;++o)i+=t[o],s+=i;i%=65521,s%=65521}r=i,e=s},d:function(){return(r>>>8<<16|(e&255)<<8|e>>>8)+((r&255)<<23)*2}}},yp=function(r,e,t,i,s){return mp(r,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):12+e.mem,t,i,!s)},vp=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},wp=function(r,e){var t=e.level,i=t==0?0:t<6?1:t==9?3:2;r[0]=120,r[1]=i<<6|(i?32-2*i:1)};function Nl(r,e){if(e===void 0)e={};var t=gp();t.p(r);var i=yp(r,e,2,4);return wp(i,e),vp(i,i.length-4,t.d()),i}function Us(r,e){var t=r.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(r);var i=new pe(r.length+(r.length>>>1)),s=0,n=function(u){i[s++]=u};for(var o=0;o<t;++o){if(s+5>i.length){var l=new pe(s+8+(t-o<<1));l.set(i),i=l}var a=r.charCodeAt(o);if(a<128||e)n(a);else if(a<2048)n(192|a>>>6),n(128|a&63);else if(a>55295&&a<57344)a=65536+(a&1047552)|r.charCodeAt(++o)&1023,n(240|a>>>18),n(128|a>>>12&63),n(128|a>>>6&63),n(128|a&63);else n(224|a>>>12),n(128|a>>>6&63),n(128|a&63)}return Tl(i,0,s)}function Bs(r,e){var t="";if(!e&&typeof TextDecoder<"u")return new TextDecoder().decode(r);for(var i=0;i<r.length;){var s=r[i++];if(s<128||e)t+=String.fromCharCode(s);else if(s<224)t+=String.fromCharCode((s&31)<<6|r[i++]&63);else if(s<240)t+=String.fromCharCode((s&15)<<12|(r[i++]&63)<<6|r[i++]&63);else s=((s&15)<<18|(r[i++]&63)<<12|(r[i++]&63)<<6|r[i++]&63)-65536,t+=String.fromCharCode(55296|s>>10,56320|s&1023)}return t}var Ws="v1";var zs=(r)=>{let e={...r,v:Ws};return Bs(Nl(Us(JSON.stringify(e))),!0)};var Rl=["pointerdown","keydown","scroll","touchstart","wheel","mousemove"],bp=15000;function Vs(r){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();return`${r}_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function Sp(){return Vs("session")}function Cp(){return Vs("batch")}function Ol(r,e){return e.some((t)=>new RegExp(`^${t.replace(/\*/g,".*")}$`).test(r))}function Dl(r){try{if(typeof localStorage>"u")return;if(r===null)localStorage.removeItem("currentRecordingSessionId");else localStorage.setItem("currentRecordingSessionId",r)}catch{}}function Ep(){if(typeof window>"u")return{};let r=window.screen||{},e=window.navigator||{};return{visitorId:zt()??Vs("visitor"),userAgent:e.userAgent,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:r.width,screenHeight:r.height,colorDepth:r.colorDepth||24,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,url:window.location.href,timestamp:new Date().toISOString()}}class Xr{constructor(r={}){if(this.reportedFailures=new Set,this.stopFn=null,this.takeSnapshot=null,this.pending=[],this.inflight=null,this.sessionId="",this.sessionInitialized=!1,this.flushTimer=null,this.idleTimer=null,this.initRetryCount=0,this.initFailed=!1,this.maxInitRetries=3,this.sendRetryCount=0,this.maxSendRetries=5,this.lastSendAttempt=0,this.isSending=!1,this.starting=!1,this.stopGeneration=0,this.paused=!1,this.lastActivityAt=Date.now(),this.droppedEvents=0,this.sampleDecision=null,this.originalPushState=null,this.originalReplaceState=null,this.globalListenersAttached=!1,this.handleActivity=()=>{if(this.lastActivityAt=Date.now(),this.paused)this.resumeRecording()},this.handleVisibilityChange=()=>{if(!this.pauseOnHidden)return;if(document.visibilityState==="hidden")this.pauseRecording();else this.handleActivity()},this.handleUnload=()=>{if(this.sessionInitialized&&this.hasBufferedEvents())this.sendEvents(!0)},this.handlePopState=()=>{if(this.stopFn&&this.hasBufferedEvents())this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)},this.basePath=r.basePath||He,this.ingestKey=r.ingestKey,this.excludedPaths=r.useDefaultExcludedPaths===!1?r.excludedPaths||[]:[...Zs,...r.excludedPaths||[]],this.sessionSampleRate=r.sessionSampleRate??1,this.maskAllInputs=r.maskAllInputs??!0,this.maskTextSelector=r.maskTextSelector||"[data-mask]",this.blockClass=r.blockClass||"rr-block",this.ignoreClass=r.ignoreClass||"rr-ignore",this.maskTextClass=r.maskTextClass||"rr-mask",this.ignoreSelector=r.ignoreSelector||"[data-ignore]",this.blockSelector=r.blockSelector||"[data-private]",this.recordCanvas=r.recordCanvas??!1,this.collectFonts=r.collectFonts??!0,this.batchSize=r.batchSize??100,this.flushInterval=r.flushInterval??1e4,this.idleTimeout=r.idleTimeout??60000,this.pauseOnHidden=r.pauseOnHidden??!0,this.checkoutEveryNms=r.checkoutEveryNms??30000,this.checkoutEveryNth=r.checkoutEveryNth??200,this.maxBufferedEvents=r.maxBufferedEvents??5000,this.slimDOMOptions=r.slimDOMOptions||{script:!1,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},this.maskInputOptions=r.maskInputOptions||{password:!0,email:!0},this.samplingConfig={scroll:500,media:800,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!1,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},mousemove:!1,input:"last",...r.sampling||{}},this.debug=r.debug??!1,this.enabled=r.enabled??!1,this.enabled&&typeof window<"u")this.start()}passesSampling(){if(this.sampleDecision===null)this.sampleDecision=this.sessionSampleRate>=1||Math.random()<=this.sessionSampleRate;return this.sampleDecision}shouldRecord(){if(!this.enabled||typeof window>"u")return!1;if(Ol(window.location.pathname,this.excludedPaths))return this.debugLog(`not recording ${window.location.pathname}: excluded path`),!1;if(!this.passesSampling())return this.debugLog(`not recording: sampled out (sessionSampleRate ${this.sessionSampleRate})`),!1;return!0}reportFailure(r,e){if(!this.debug){if(this.reportedFailures.has(r))return;this.reportedFailures.add(r)}console.warn(`[SessionRecorder] session replay ${r} failed:`,e,...this.debug?[]:["(reported once; set sessionRecordingConfig.debug to log every failure)"])}debugLog(r,...e){if(!this.debug)return;console.debug(`[SessionRecorder] ${r}`,...e)}async initializeSession(){if(this.sessionInitialized)return!0;if(this.initFailed)return!1;if(this.initRetryCount>=this.maxInitRetries)return this.initFailed=!0,!1;this.initRetryCount++;let r=Sp();this.sessionId=r;try{let e={sessionId:r,...Ep()},t=`${this.basePath}/${Jr}/init`,i=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",...Vt(this.ingestKey)},body:JSON.stringify(e)});if(i.ok)return this.sessionInitialized=!0,this.initRetryCount=0,this.initFailed=!1,Dl(r),this.debugLog("session started",r),!0;if(this.reportFailure("init",`HTTP ${i.status} from ${t}`),this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}catch(e){if(this.reportFailure("init",e),this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}}claimBatch(){if(this.inflight)return this.inflight;if(this.pending.length===0)return null;return this.inflight={batchId:Cp(),events:this.pending.splice(0,this.pending.length)},this.inflight}async sendEvents(r=!1){if(!this.sessionInitialized)return;if(this.isSending&&!r)return;let e=Date.now();if(this.sendRetryCount>0&&!r){let i=Math.min(1000*Math.pow(2,this.sendRetryCount),30000);if(e-this.lastSendAttempt<i)return}let t=this.claimBatch();if(!t)return;this.isSending=!0,this.lastSendAttempt=e;try{let i=zs(t.events),s=btoa(i),n={sessionId:this.sessionId,batchId:t.batchId,events:s},o=`${this.basePath}/${Jr}/events`,l=qr(o,this.ingestKey);if(r){if(navigator.sendBeacon){let a=Qr(JSON.stringify(n),this.ingestKey);if(!navigator.sendBeacon(l,a))await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0})}else await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0});this.inflight=null,this.sendRetryCount=0}else{let a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",...Vt(this.ingestKey)},body:JSON.stringify(n)});if(a.status===404)this.debugLog("the server no longer knows this session; recording stopped"),this.clearSession(),this.stopRecording(),this.inflight=null,this.pending=[],this.sendRetryCount=0;else if(!a.ok){if(this.reportFailure("upload",`HTTP ${a.status} from ${o}`),this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.inflight=null,this.sendRetryCount=0}else this.inflight=null,this.sendRetryCount=0}}catch(i){if(this.reportFailure("upload",i),this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.inflight=null,this.sendRetryCount=0}finally{this.isSending=!1}}hasBufferedEvents(){return this.pending.length>0||this.inflight!==null}startFlushTimer(){if(this.flushTimer)return;this.flushTimer=setInterval(()=>{if(this.hasBufferedEvents())this.sendEvents(!1)},this.flushInterval)}stopFlushTimer(){if(!this.flushTimer)return;clearInterval(this.flushTimer),this.flushTimer=null}startIdleTimer(){if(this.idleTimer||this.idleTimeout<=0)return;let r=Math.min(this.idleTimeout,bp);this.idleTimer=setInterval(()=>{if(this.paused||!this.stopFn)return;if(Date.now()-this.lastActivityAt>=this.idleTimeout)this.pauseRecording()},r)}stopIdleTimer(){if(!this.idleTimer)return;clearInterval(this.idleTimer),this.idleTimer=null}async startRecording(){if(this.stopFn||this.initFailed||this.starting)return;if(!this.shouldRecord())return;this.starting=!0;let r=this.stopGeneration;try{if(!await this.initializeSession())return;if(this.stopGeneration!==r||this.stopFn||!this.enabled){this.clearSession();return}let t=Ne({emit:(i)=>{if(this.pending.push(i),this.pending.length>this.maxBufferedEvents){let s=this.pending.length-this.maxBufferedEvents;this.pending.splice(0,s),this.droppedEvents+=s}if(this.pending.length>=this.batchSize)this.sendEvents(!1)},sampling:this.samplingConfig,blockSelector:this.blockSelector,ignoreSelector:this.ignoreSelector,recordCanvas:this.recordCanvas,collectFonts:this.collectFonts,maskAllInputs:this.maskAllInputs,maskInputOptions:this.maskInputOptions,maskTextSelector:this.maskTextSelector,blockClass:this.blockClass,ignoreClass:this.ignoreClass,maskTextClass:this.maskTextClass,slimDOMOptions:this.slimDOMOptions,checkoutEveryNms:this.checkoutEveryNms,checkoutEveryNth:this.checkoutEveryNth});if(t){this.stopFn=t;let i=t;this.takeSnapshot=i.takeFullSnapshot||null}this.paused=!1,this.lastActivityAt=Date.now(),this.startFlushTimer(),this.startIdleTimer()}finally{this.starting=!1}}clearSession(){this.sessionInitialized=!1,this.sessionId="",Dl(null)}detachRecorder(){if(!this.stopFn)return;this.stopFn(),this.stopFn=null,this.takeSnapshot=null}pauseRecording(){if(this.paused||!this.stopFn)return;if(this.debugLog("paused (idle or hidden tab)"),this.detachRecorder(),this.paused=!0,this.stopFlushTimer(),this.hasBufferedEvents())this.sendEvents(!1)}resumeRecording(){if(!this.paused||!this.enabled||this.initFailed)return;this.debugLog("resumed"),this.paused=!1,this.startRecording()}stopRecording(){if(!this.stopFn&&!this.paused&&!this.starting&&!this.sessionInitialized)return;this.stopGeneration++,this.detachRecorder(),this.stopFlushTimer(),this.stopIdleTimer(),this.paused=!1,this.sendEvents(!0),this.clearSession(),this.initRetryCount=0,this.initFailed=!1}attachGlobalListeners(){if(this.globalListenersAttached)return;this.globalListenersAttached=!0,this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState;let r=()=>{if(this.stopFn&&this.hasBufferedEvents())this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)};window.history.pushState=(...e)=>{this.originalPushState?.apply(window.history,e),r()},window.history.replaceState=(...e)=>{this.originalReplaceState?.apply(window.history,e),r()},window.addEventListener("popstate",this.handlePopState),window.addEventListener("beforeunload",this.handleUnload),window.addEventListener("pagehide",this.handleUnload),document.addEventListener("visibilitychange",this.handleVisibilityChange);for(let e of Rl)window.addEventListener(e,this.handleActivity,{passive:!0,capture:!0})}detachGlobalListeners(){if(!this.globalListenersAttached)return;if(this.globalListenersAttached=!1,this.originalPushState)window.history.pushState=this.originalPushState,this.originalPushState=null;if(this.originalReplaceState)window.history.replaceState=this.originalReplaceState,this.originalReplaceState=null;window.removeEventListener("popstate",this.handlePopState),window.removeEventListener("beforeunload",this.handleUnload),window.removeEventListener("pagehide",this.handleUnload),document.removeEventListener("visibilitychange",this.handleVisibilityChange);for(let r of Rl)window.removeEventListener(r,this.handleActivity,{capture:!0})}checkPath(){if(!this.enabled||this.initFailed){if(!this.enabled)this.stopRecording();return}let r=Ol(window.location.pathname,this.excludedPaths),e=this.stopFn!==null;if(r)this.debugLog(`not recording ${window.location.pathname}: excluded path`);if(r&&e)this.stopRecording();else if(!r&&!e&&!this.paused)this.startRecording()}start(){if(this.enabled&&this.stopFn)return;if(this.enabled=!0,typeof window>"u")return;this.attachGlobalListeners(),this.startRecording()}stop(){this.enabled=!1,this.stopRecording()}destroy(){this.stop(),this.stopIdleTimer(),this.detachGlobalListeners()}getSessionId(){return this.sessionId||null}getDroppedEventCount(){return this.droppedEvents}isPaused(){return this.paused}}function Gs(r={}){let{basePath:e=He,disabled:t=!1,ignoreLocalhost:i=!0,domain:s,ingestKey:n,autoTrackPageviews:o=!0,autoTrackPageLeave:l=!0,pageLeaveEventName:a="page_leave",autoTrackSpeedAnalytics:u=!0,autoTrackEngagement:c=!0,heartbeatInterval:f=30000,inactivityTimeout:p=30000,engagementThreshold:d=1e4,enableSessionRecording:g=!1,sessionRecordingConfig:m={}}=r,h=[],b=Ip(t,i),w=()=>s||(typeof window<"u"?window.location.hostname:""),y=async(S,_={})=>{if(!b)return;await $e("event",{event_name:S,request_query:window.location.search,request_path:window.location.pathname,domain:w(),language:navigator.language,event_data:_},"POST",e,n)},C=()=>{if(!b)return;$e("event",{event_name:"page_view",request_query:window.location.search,request_path:window.location.pathname,domain:w(),language:navigator.language,event_data:{referrer:document.referrer,userAgent:navigator.userAgent,timestamp:new Date().toISOString()}},"POST",e,n)},I=async()=>{};if(b){if(o)h.push(xp(C));if(c){let S=new ei({basePath:e,ingestKey:n,domain:w(),heartbeatInterval:f,inactivityTimeout:p,engagementThreshold:d});h.push(()=>S.destroy())}else if(l)h.push(Mp(a,w,e,n));if(u){let S=new li({basePath:e,ingestKey:n});h.push(()=>S.destroy())}h.push(Ap(y))}let E=b&&g?new Xr({basePath:e,ingestKey:n,domain:w(),enabled:!0,...m}):null;if(E)h.push(()=>E.destroy());let x=E;return{get enabled(){return b},ingestKey:n,trackEvent:y,trackPageview:C,identify:I,enableSessionRecording(){if(!b)return;if(x){x.start();return}x=new Xr({basePath:e,ingestKey:n,domain:w(),enabled:!0,...m}),h.push(()=>x?.destroy())},disableSessionRecording(){x?.stop()},destroy(){while(h.length>0){let S=h.pop();try{S?.()}catch(_){console.error("Analytics cleanup error:",_)}}}}}function Ip(r,e){if(r)return!1;if(typeof window>"u")return!1;if(e&&(Js()||qs()))return!1;try{if(window.localStorage?.getItem("temps_ignore")==="true")return!1;if(window.localStorage?.temps_ignore==="true")return!1}catch{}return!0}function xp(r){let e=window.location.pathname,t=!0,i=window.history.pushState.bind(window.history),s=()=>{let l=window.location.pathname;if(e!==l)e=l,r()};window.history.pushState=(l,a,u)=>{i(l,a,u),s()};let n=()=>s();window.addEventListener("popstate",n);let o=()=>{if(document.visibilityState==="visible"&&t)t=!1,r(),document.removeEventListener("visibilitychange",o)};if(document.visibilityState==="prerender")document.addEventListener("visibilitychange",o);else if(t)t=!1,r();return()=>{window.removeEventListener("popstate",n),document.removeEventListener("visibilitychange",o),window.history.pushState=i}}function Ap(r){let e=(t)=>{let s=t.target?.closest?.("[temps-event-name]");if(!(s instanceof HTMLElement))return;let n=s.getAttribute("temps-event-name");if(!n)return;let o={};for(let l of s.getAttributeNames())if(l.startsWith("temps-data-")){let a=l.replace("temps-data-","");o[a]=s.getAttribute(l)}r(n,o)};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)}function Mp(r,e,t,i){let s=!1,n=Date.now(),o=()=>{if(s)return;s=!0;let l=Date.now()-n;je("event",{event_name:r,request_query:window.location.search,request_path:window.location.pathname,domain:e(),language:navigator.language,event_data:{time_on_page_ms:l,timestamp:new Date().toISOString(),url:window.location.href,referrer:document.referrer}},t,i)};return window.addEventListener("pagehide",o),window.addEventListener("beforeunload",o),()=>{window.removeEventListener("pagehide",o),window.removeEventListener("beforeunload",o)}}var Wt=null;function _l(r={}){if(Wt)Wt.destroy();if(Wt=Gs(r),typeof window<"u")window.temps=Wt;return Wt}function Tp(){if(typeof document>"u")return{};let r=document.currentScript??document.querySelector("script[data-temps]")??Array.from(document.scripts).reverse().find((s)=>!!s.dataset?.domain||!!s.dataset?.basePath||!!s.dataset?.ingestKey)??null;if(!r)return{};let e=r.dataset,t={},i={};if(e.basePath)t.basePath=e.basePath;if(e.ingestKey)t.ingestKey=e.ingestKey;if(e.domain)t.domain=e.domain;if(e.disabled)t.disabled=e.disabled==="true";if(e.ignoreLocalhost)t.ignoreLocalhost=e.ignoreLocalhost==="true";if(e.autoTrackPageviews)t.autoTrackPageviews=e.autoTrackPageviews==="true";if(e.autoTrackPageLeave)t.autoTrackPageLeave=e.autoTrackPageLeave==="true";if(e.pageLeaveEventName)t.pageLeaveEventName=e.pageLeaveEventName;if(e.autoTrackSpeedAnalytics)t.autoTrackSpeedAnalytics=e.autoTrackSpeedAnalytics==="true";if(e.autoTrackEngagement)t.autoTrackEngagement=e.autoTrackEngagement==="true";if(e.heartbeatInterval)t.heartbeatInterval=Number(e.heartbeatInterval);if(e.inactivityTimeout)t.inactivityTimeout=Number(e.inactivityTimeout);if(e.engagementThreshold)t.engagementThreshold=Number(e.engagementThreshold);if(e.sessionRecording)t.enableSessionRecording=e.sessionRecording==="true";if(e.sessionSampleRate)i.sessionSampleRate=Number(e.sessionSampleRate);if(e.maskAllInputs)i.maskAllInputs=e.maskAllInputs==="true";if(e.excludedPaths)i.excludedPaths=e.excludedPaths.split(",").map((s)=>s.trim());if(Object.keys(i).length>0)t.sessionRecordingConfig=i;return t}function kl(){if(typeof window>"u")return;_l(Tp())}if(typeof document<"u"&&document.readyState==="loading")document.addEventListener("DOMContentLoaded",kl,{once:!0});else kl();})();
72
+ ***************************************************************************** */var Ko;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Ko||(Ko={}));var{addCustomEvent:Km}=Le,{freezePage:Xm}=Le,{takeFullSnapshot:Jm}=Le;var Se=Uint8Array,pe=Uint16Array,Yt=Uint32Array,Xs=new Se([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Js=new Se([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Hl=new Se([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Xl=function(t,e){var r=new pe(31);for(var i=0;i<31;++i)r[i]=e+=1<<t[i-1];var s=new Yt(r[30]);for(var i=1;i<30;++i)for(var n=r[i];n<r[i+1];++n)s[n]=n-r[i]<<5|i;return[r,s]},Jl=Xl(Xs,2),Jp=Jl[0],Hs=Jl[1];Jp[28]=258,Hs[258]=28;var Zl=Xl(Js,0),qm=Zl[0],Yl=Zl[1],Ys=new pe(32768);for(R=0;R<32768;++R)Oe=(R&43690)>>>1|(R&21845)<<1,Oe=(Oe&52428)>>>2|(Oe&13107)<<2,Oe=(Oe&61680)>>>4|(Oe&3855)<<4,Ys[R]=((Oe&65280)>>>8|(Oe&255)<<8)>>>1;var Oe,R,Ht=function(t,e,r){var i=t.length,s=0,n=new pe(e);for(;s<i;++s)++n[t[s]-1];var o=new pe(e);for(s=0;s<e;++s)o[s]=o[s-1]+n[s-1]<<1;var l;if(r){l=new pe(1<<e);var a=15-e;for(s=0;s<i;++s)if(t[s]){var c=s<<4|t[s],u=e-t[s],h=o[t[s]-1]++<<u;for(var p=h|(1<<u)-1;h<=p;++h)l[Ys[h]>>>a]=c}}else{l=new pe(i);for(s=0;s<i;++s)l[s]=Ys[o[t[s]-1]++]>>>15-t[s]}return l},Xe=new Se(288);for(R=0;R<144;++R)Xe[R]=8;var R;for(R=144;R<256;++R)Xe[R]=9;var R;for(R=256;R<280;++R)Xe[R]=7;var R;for(R=280;R<288;++R)Xe[R]=8;var R,ei=new Se(32);for(R=0;R<32;++R)ei[R]=5;var R,Zp=Ht(Xe,9,0);var qp=Ht(ei,5,0);var ql=function(t){return(t/8>>0)+(t&7&&1)},Ql=function(t,e,r){if(r==null||r>t.length)r=t.length;var i=new(t instanceof pe?pe:t instanceof Yt?Yt:Se)(r-e);return i.set(t.subarray(e,r)),i};var Pe=function(t,e,r){r<<=e&7;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},zt=function(t,e,r){r<<=e&7;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Gs=function(t,e){var r=[];for(var i=0;i<t.length;++i)if(t[i])r.push({s:i,f:t[i]});var s=r.length,n=r.slice();if(!s)return[new Se(0),0];if(s==1){var o=new Se(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort(function(x,I){return x.f-I.f}),r.push({s:-1,f:25001});var l=r[0],a=r[1],c=0,u=1,h=2;r[0]={s:-1,f:l.f+a.f,l,r:a};while(u!=s-1)l=r[r[c].f<r[h].f?c++:h++],a=r[c!=u&&r[c].f<r[h].f?c++:h++],r[u++]={s:-1,f:l.f+a.f,l,r:a};var p=n[0].s;for(var i=1;i<s;++i)if(n[i].s>p)p=n[i].s;var d=new pe(p+1),g=js(r[u-1],d,0);if(g>e){var i=0,m=0,f=g-e,b=1<<f;n.sort(function(I,E){return d[E.s]-d[I.s]||I.f-E.f});for(;i<s;++i){var w=n[i].s;if(d[w]>e)m+=b-(1<<g-d[w]),d[w]=e;else break}m>>>=f;while(m>0){var y=n[i].s;if(d[y]<e)m-=1<<e-d[y]++-1;else++i}for(;i>=0&&m;--i){var C=n[i].s;if(d[C]==e)--d[C],++m}g=e}return[new Se(d),g]},js=function(t,e,r){return t.s==-1?Math.max(js(t.l,e,r+1),js(t.r,e,r+1)):e[t.s]=r},jl=function(t){var e=t.length;while(e&&!t[--e]);var r=new pe(++e),i=0,s=t[0],n=1,o=function(a){r[i++]=a};for(var l=1;l<=e;++l)if(t[l]==s&&l!=e)++n;else{if(!s&&n>2){for(;n>138;n-=138)o(32754);if(n>2)o(n>10?n-11<<5|28690:n-3<<5|12305),n=0}else if(n>3){o(s),--n;for(;n>6;n-=6)o(8304);if(n>2)o(n-3<<5|8208),n=0}while(n--)o(s);n=1,s=t[l]}return[r.subarray(0,i),e]},Gt=function(t,e){var r=0;for(var i=0;i<e.length;++i)r+=t[i]*e[i];return r},Ks=function(t,e,r){var i=r.length,s=ql(e+2);t[s]=i&255,t[s+1]=i>>>8,t[s+2]=t[s]^255,t[s+3]=t[s+1]^255;for(var n=0;n<i;++n)t[s+n+4]=r[n];return(s+4+i)*8},Kl=function(t,e,r,i,s,n,o,l,a,c,u){Pe(e,u++,r),++s[256];var h=Gs(s,15),p=h[0],d=h[1],g=Gs(n,15),m=g[0],f=g[1],b=jl(p),w=b[0],y=b[1],C=jl(m),x=C[0],I=C[1],E=new pe(19);for(var S=0;S<w.length;++S)E[w[S]&31]++;for(var S=0;S<x.length;++S)E[x[S]&31]++;var A=Gs(E,7),M=A[0],Q=A[1],V=19;for(;V>4&&!M[Hl[V-1]];--V);var T=c+5<<3,te=Gt(s,Xe)+Gt(n,ei)+o,re=Gt(s,p)+Gt(n,m)+o+14+3*V+Gt(E,M)+(2*E[16]+3*E[17]+7*E[18]);if(T<=te&&T<=re)return Ks(e,u,t.subarray(a,a+c));var F,L,ee,G;if(Pe(e,u,1+(re<te)),u+=2,re<te){F=Ht(p,d,0),L=p,ee=Ht(m,f,0),G=m;var ge=Ht(M,Q,0);Pe(e,u,y-257),Pe(e,u+5,I-1),Pe(e,u+10,V-4),u+=14;for(var S=0;S<V;++S)Pe(e,u+3*S,M[Hl[S]]);u+=3*V;var ne=[w,x];for(var ye=0;ye<2;++ye){var ue=ne[ye];for(var S=0;S<ue.length;++S){var he=ue[S]&31;if(Pe(e,u,ge[he]),u+=M[he],he>15)Pe(e,u,ue[S]>>>5&127),u+=ue[S]>>>12}}}else F=Zp,L=Xe,ee=qp,G=ei;for(var S=0;S<l;++S)if(i[S]>255){var he=i[S]>>>18&31;if(zt(e,u,F[he+257]),u+=L[he+257],he>7)Pe(e,u,i[S]>>>23&31),u+=Xs[he];var oe=i[S]&31;if(zt(e,u,ee[oe]),u+=G[oe],oe>3)zt(e,u,i[S]>>>5&8191),u+=Js[oe]}else zt(e,u,F[i[S]]),u+=L[i[S]];return zt(e,u,F[256]),u+L[256]},Qp=new Yt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),em=function(t,e,r,i,s,n){var o=t.length,l=new Se(i+o+5*(1+Math.floor(o/7000))+s),a=l.subarray(i,l.length-s),c=0;if(!e||o<8)for(var u=0;u<=o;u+=65535){var h=u+65535;if(h<o)c=Ks(a,c,t.subarray(u,h));else a[u]=n,c=Ks(a,c,t.subarray(u,o))}else{var p=Qp[e-1],d=p>>>13,g=p&8191,m=(1<<r)-1,f=new pe(32768),b=new pe(m+1),w=Math.ceil(r/3),y=2*w,C=function(U){return(t[U]^t[U+1]<<w^t[U+2]<<y)&m},x=new Yt(25000),I=new pe(288),E=new pe(32),S=0,A=0,u=0,M=0,Q=0,V=0;for(;u<o;++u){var T=C(u),te=u&32767,re=b[T];if(f[te]=re,b[T]=te,Q<=u){var F=o-u;if((S>7000||M>24576)&&F>423){c=Kl(t,a,0,x,I,E,A,M,V,u-V,c),M=S=A=0,V=u;for(var L=0;L<286;++L)I[L]=0;for(var L=0;L<30;++L)E[L]=0}var ee=2,G=0,ge=g,ne=te-re&32767;if(F>2&&T==C(u-ne)){var ye=Math.min(d,F)-1,ue=Math.min(32767,u),he=Math.min(258,F);while(ne<=ue&&--ge&&te!=re){if(t[u+ee]==t[u+ee-ne]){var oe=0;for(;oe<he&&t[u+oe]==t[u+oe-ne];++oe);if(oe>ee){if(ee=oe,G=ne,oe>ye)break;var Je=Math.min(ne,oe-2),ie=0;for(var L=0;L<Je;++L){var N=u-ne+L+32768&32767,Z=f[N],xe=N-Z+32768&32767;if(xe>ie)ie=xe,re=N}}}te=re,re=f[te],ne+=te-re+32768&32767}}if(G){x[M++]=268435456|Hs[ee]<<18|Yl[G];var _=Hs[ee]&31,le=Yl[G]&31;A+=Xs[_]+Js[le],++I[257+_],++E[le],Q=u+ee,++S}else x[M++]=t[u],++I[t[u]]}}c=Kl(t,a,n,x,I,E,A,M,V,u-V,c)}return Ql(l,0,i+ql(c)+s)},tm=function(){var t=1,e=0;return{p:function(r){var i=t,s=e,n=r.length;for(var o=0;o!=n;){var l=Math.min(o+5552,n);for(;o<l;++o)i+=r[o],s+=i;i%=65521,s%=65521}t=i,e=s},d:function(){return(t>>>8<<16|(e&255)<<8|e>>>8)+((t&255)<<23)*2}}},rm=function(t,e,r,i,s){return em(t,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):12+e.mem,r,i,!s)},im=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},sm=function(t,e){var r=e.level,i=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)};function ec(t,e){if(e===void 0)e={};var r=tm();r.p(t);var i=rm(t,e,2,4);return sm(i,e),im(i,i.length-4,r.d()),i}function Zs(t,e){var r=t.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(t);var i=new Se(t.length+(t.length>>>1)),s=0,n=function(c){i[s++]=c};for(var o=0;o<r;++o){if(s+5>i.length){var l=new Se(s+8+(r-o<<1));l.set(i),i=l}var a=t.charCodeAt(o);if(a<128||e)n(a);else if(a<2048)n(192|a>>>6),n(128|a&63);else if(a>55295&&a<57344)a=65536+(a&1047552)|t.charCodeAt(++o)&1023,n(240|a>>>18),n(128|a>>>12&63),n(128|a>>>6&63),n(128|a&63);else n(224|a>>>12),n(128|a>>>6&63),n(128|a&63)}return Ql(i,0,s)}function qs(t,e){var r="";if(!e&&typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var i=0;i<t.length;){var s=t[i++];if(s<128||e)r+=String.fromCharCode(s);else if(s<224)r+=String.fromCharCode((s&31)<<6|t[i++]&63);else if(s<240)r+=String.fromCharCode((s&15)<<12|(t[i++]&63)<<6|t[i++]&63);else s=((s&15)<<18|(t[i++]&63)<<12|(t[i++]&63)<<6|t[i++]&63)-65536,r+=String.fromCharCode(55296|s>>10,56320|s&1023)}return r}var Qs="v1";var en=(t)=>{let e={...t,v:Qs};return qs(ec(Zs(JSON.stringify(e))),!0)};var tc=["pointerdown","keydown","scroll","touchstart","wheel","mousemove"],nm=15000;function tn(t){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();return`${t}_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function om(){return tn("session")}function am(){return tn("batch")}function rc(t,e){return e.some((r)=>new RegExp(`^${r.replace(/\*/g,".*")}$`).test(t))}function ic(t){try{if(typeof localStorage>"u")return;if(t===null)localStorage.removeItem("currentRecordingSessionId");else localStorage.setItem("currentRecordingSessionId",t)}catch{}}function lm(){if(typeof window>"u")return{};let t=window.screen||{},e=window.navigator||{};return{visitorId:Qe()??tn("visitor"),userAgent:e.userAgent,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:t.width,screenHeight:t.height,colorDepth:t.colorDepth||24,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,url:window.location.href,timestamp:new Date().toISOString()}}class ti{constructor(t={}){if(this.reportedFailures=new Set,this.stopFn=null,this.takeSnapshot=null,this.pending=[],this.inflight=null,this.sessionId="",this.sessionInitialized=!1,this.flushTimer=null,this.idleTimer=null,this.initRetryCount=0,this.initFailed=!1,this.maxInitRetries=3,this.sendRetryCount=0,this.maxSendRetries=5,this.lastSendAttempt=0,this.isSending=!1,this.starting=!1,this.stopGeneration=0,this.paused=!1,this.lastActivityAt=Date.now(),this.droppedEvents=0,this.resumeAfterResetPending=!1,this.sampleDecision=null,this.originalPushState=null,this.originalReplaceState=null,this.globalListenersAttached=!1,this.handleActivity=()=>{if(this.lastActivityAt=Date.now(),this.paused)this.resumeRecording()},this.handleVisibilityChange=()=>{if(!this.pauseOnHidden)return;if(document.visibilityState==="hidden")this.pauseRecording();else this.handleActivity()},this.handleUnload=()=>{if(this.sessionInitialized&&this.hasBufferedEvents())this.sendEvents(!0)},this.handlePopState=()=>{if(this.stopFn&&this.hasBufferedEvents())this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)},this.basePath=t.basePath||Ze,this.ingestKey=t.ingestKey,this.excludedPaths=t.useDefaultExcludedPaths===!1?t.excludedPaths||[]:[...pn,...t.excludedPaths||[]],this.sessionSampleRate=t.sessionSampleRate??1,this.maskAllInputs=t.maskAllInputs??!0,this.maskTextSelector=t.maskTextSelector||"[data-mask]",this.blockClass=t.blockClass||"rr-block",this.ignoreClass=t.ignoreClass||"rr-ignore",this.maskTextClass=t.maskTextClass||"rr-mask",this.ignoreSelector=t.ignoreSelector||"[data-ignore]",this.blockSelector=t.blockSelector||"[data-private]",this.recordCanvas=t.recordCanvas??!1,this.collectFonts=t.collectFonts??!0,this.batchSize=t.batchSize??100,this.flushInterval=t.flushInterval??1e4,this.idleTimeout=t.idleTimeout??60000,this.pauseOnHidden=t.pauseOnHidden??!0,this.checkoutEveryNms=t.checkoutEveryNms??30000,this.checkoutEveryNth=t.checkoutEveryNth??200,this.maxBufferedEvents=t.maxBufferedEvents??5000,this.slimDOMOptions=t.slimDOMOptions||{script:!1,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},this.maskInputOptions=t.maskInputOptions||{password:!0,email:!0},this.samplingConfig={scroll:500,media:800,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!1,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},mousemove:!1,input:"last",...t.sampling||{}},this.debug=t.debug??!1,this.enabled=t.enabled??!1,this.enabled&&typeof window<"u")this.start()}passesSampling(){if(this.sampleDecision===null)this.sampleDecision=this.sessionSampleRate>=1||Math.random()<=this.sessionSampleRate;return this.sampleDecision}shouldRecord(){if(!this.enabled||typeof window>"u")return!1;if(rc(window.location.pathname,this.excludedPaths))return this.debugLog(`not recording ${window.location.pathname}: excluded path`),!1;if(!this.passesSampling())return this.debugLog(`not recording: sampled out (sessionSampleRate ${this.sessionSampleRate})`),!1;return!0}reportFailure(t,e){if(!this.debug){if(this.reportedFailures.has(t))return;this.reportedFailures.add(t)}console.warn(`[SessionRecorder] session replay ${t} failed:`,e,...this.debug?[]:["(reported once; set sessionRecordingConfig.debug to log every failure)"])}debugLog(t,...e){if(!this.debug)return;console.debug(`[SessionRecorder] ${t}`,...e)}async initializeSession(){if(this.sessionInitialized)return!0;if(this.initFailed)return!1;if(this.initRetryCount>=this.maxInitRetries)return this.initFailed=!0,!1;this.initRetryCount++;let t=om();this.sessionId=t;try{let e={sessionId:t,...lm()},r=`${this.basePath}/${oi}/init`,i=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...We(this.ingestKey)},body:JSON.stringify(e)});if(i.ok)return this.sessionInitialized=!0,this.initRetryCount=0,this.initFailed=!1,ic(t),this.debugLog("session started",t),!0;if(this.reportFailure("init",`HTTP ${i.status} from ${r}`),this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}catch(e){if(this.reportFailure("init",e),this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}}claimBatch(){if(this.inflight)return this.inflight;if(this.pending.length===0)return null;return this.inflight={batchId:am(),events:this.pending.splice(0,this.pending.length)},this.inflight}async sendEvents(t=!1){if(!this.sessionInitialized)return;if(this.isSending&&!t)return;let e=Date.now();if(this.sendRetryCount>0&&!t){let i=Math.min(1000*Math.pow(2,this.sendRetryCount),30000);if(e-this.lastSendAttempt<i)return}let r=this.claimBatch();if(!r)return;this.isSending=!0,this.lastSendAttempt=e;try{let i=en(r.events),s=btoa(i),n={sessionId:this.sessionId,batchId:r.batchId,events:s},o=`${this.basePath}/${oi}/events`,l=ui(o,this.ingestKey);if(t){if(navigator.sendBeacon){let a=hi(JSON.stringify(n),this.ingestKey);if(!navigator.sendBeacon(l,a))await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0})}else await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0});this.inflight=null,this.sendRetryCount=0}else{let a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",...We(this.ingestKey)},body:JSON.stringify(n)});if(a.status===404)this.debugLog("the server no longer knows this session; recording stopped"),this.clearSession(),this.stopRecording(),this.inflight=null,this.pending=[],this.sendRetryCount=0;else if(!a.ok){if(this.reportFailure("upload",`HTTP ${a.status} from ${o}`),this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.inflight=null,this.sendRetryCount=0}else this.inflight=null,this.sendRetryCount=0}}catch(i){if(this.reportFailure("upload",i),this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.inflight=null,this.sendRetryCount=0}finally{this.isSending=!1}}hasBufferedEvents(){return this.pending.length>0||this.inflight!==null}startFlushTimer(){if(this.flushTimer)return;this.flushTimer=setInterval(()=>{if(this.hasBufferedEvents())this.sendEvents(!1)},this.flushInterval)}stopFlushTimer(){if(!this.flushTimer)return;clearInterval(this.flushTimer),this.flushTimer=null}startIdleTimer(){if(this.idleTimer||this.idleTimeout<=0)return;let t=Math.min(this.idleTimeout,nm);this.idleTimer=setInterval(()=>{if(this.paused||!this.stopFn)return;if(Date.now()-this.lastActivityAt>=this.idleTimeout)this.pauseRecording()},t)}stopIdleTimer(){if(!this.idleTimer)return;clearInterval(this.idleTimer),this.idleTimer=null}async startRecording(){if(this.stopFn||this.initFailed||this.starting)return;if(!this.shouldRecord())return;this.starting=!0;let t=this.stopGeneration;try{if(!await this.initializeSession())return;if(this.stopGeneration!==t||this.stopFn||!this.enabled){this.clearSession();return}let r=Le({emit:(i)=>{if(this.pending.push(i),this.pending.length>this.maxBufferedEvents){let s=this.pending.length-this.maxBufferedEvents;this.pending.splice(0,s),this.droppedEvents+=s}if(this.pending.length>=this.batchSize)this.sendEvents(!1)},sampling:this.samplingConfig,blockSelector:this.blockSelector,ignoreSelector:this.ignoreSelector,recordCanvas:this.recordCanvas,collectFonts:this.collectFonts,maskAllInputs:this.maskAllInputs,maskInputOptions:this.maskInputOptions,maskTextSelector:this.maskTextSelector,blockClass:this.blockClass,ignoreClass:this.ignoreClass,maskTextClass:this.maskTextClass,slimDOMOptions:this.slimDOMOptions,checkoutEveryNms:this.checkoutEveryNms,checkoutEveryNth:this.checkoutEveryNth});if(r){this.stopFn=r;let i=r;this.takeSnapshot=i.takeFullSnapshot||null}this.paused=!1,this.lastActivityAt=Date.now(),this.startFlushTimer(),this.startIdleTimer()}finally{this.starting=!1}}clearSession(){this.sessionInitialized=!1,this.sessionId="",this.pending=[],this.inflight=null,this.sendRetryCount=0,ic(null)}detachRecorder(){if(!this.stopFn)return;this.stopFn(),this.stopFn=null,this.takeSnapshot=null}pauseRecording(){if(this.paused||!this.stopFn)return;if(this.debugLog("paused (idle or hidden tab)"),this.detachRecorder(),this.paused=!0,this.stopFlushTimer(),this.hasBufferedEvents())this.sendEvents(!1)}resumeRecording(){if(!this.paused||!this.enabled||this.initFailed)return;this.debugLog("resumed"),this.paused=!1,this.startRecording()}stopRecording(){if(!this.stopFn&&!this.paused&&!this.starting&&!this.sessionInitialized)return;this.stopGeneration++,this.detachRecorder(),this.stopFlushTimer(),this.stopIdleTimer(),this.paused=!1,this.sendEvents(!0),this.clearSession(),this.initRetryCount=0,this.initFailed=!1}attachGlobalListeners(){if(this.globalListenersAttached)return;this.globalListenersAttached=!0,this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState;let t=()=>{if(this.stopFn&&this.hasBufferedEvents())this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)};window.history.pushState=(...e)=>{this.originalPushState?.apply(window.history,e),t()},window.history.replaceState=(...e)=>{this.originalReplaceState?.apply(window.history,e),t()},window.addEventListener("popstate",this.handlePopState),window.addEventListener("beforeunload",this.handleUnload),window.addEventListener("pagehide",this.handleUnload),document.addEventListener("visibilitychange",this.handleVisibilityChange);for(let e of tc)window.addEventListener(e,this.handleActivity,{passive:!0,capture:!0})}detachGlobalListeners(){if(!this.globalListenersAttached)return;if(this.globalListenersAttached=!1,this.originalPushState)window.history.pushState=this.originalPushState,this.originalPushState=null;if(this.originalReplaceState)window.history.replaceState=this.originalReplaceState,this.originalReplaceState=null;window.removeEventListener("popstate",this.handlePopState),window.removeEventListener("beforeunload",this.handleUnload),window.removeEventListener("pagehide",this.handleUnload),document.removeEventListener("visibilitychange",this.handleVisibilityChange);for(let t of tc)window.removeEventListener(t,this.handleActivity,{capture:!0})}checkPath(){if(!this.enabled||this.initFailed){if(!this.enabled)this.stopRecording();return}let t=rc(window.location.pathname,this.excludedPaths),e=this.stopFn!==null;if(t)this.debugLog(`not recording ${window.location.pathname}: excluded path`);if(t&&e)this.stopRecording();else if(!t&&!e&&!this.paused)this.startRecording()}start(){if(this.enabled&&this.stopFn)return;if(wn()){this.enabled=!1,this.resumeAfterResetPending=!0;return}if(this.enabled=!0,typeof window>"u")return;this.attachGlobalListeners(),this.startRecording()}stop(){this.resumeAfterResetPending=!1,this.halt()}halt(){this.enabled=!1,this.stopRecording()}destroy(){this.stop(),this.stopIdleTimer(),this.detachGlobalListeners()}discard(){this.pending=[],this.inflight=null,this.destroy()}endForReset(){if(this.enabled)this.resumeAfterResetPending=!0;this.halt()}resumeAfterReset(){if(!this.resumeAfterResetPending)return;this.resumeAfterResetPending=!1,this.start()}getSessionId(){return this.sessionId||null}getDroppedEventCount(){return this.droppedEvents}isPaused(){return this.paused}}var nc="not_found";var cm=["pdf","doc","docx","odt","rtf","txt","md","epub","xls","xlsx","ods","csv","ppt","pptx","pps","odp","key","zip","7z","rar","tar","gz","tgz","bz2","xz","mp3","wav","wma","flac","midi","mp4","mov","avi","wmv","mpeg","webm","mkv","dmg","iso","exe","msi","pkg","deb","rpm","apk","appimage"];function sc(t){return`${t.origin}${t.pathname}`}function um(t){let e=t.slice(t.lastIndexOf("/")+1),r=e.lastIndexOf(".");if(r<=0||r===e.length-1)return null;return e.slice(r+1).toLowerCase()}function hm(t,e,r){let i;try{i=new URL(t.href)}catch{return null}if(i.protocol!=="http:"&&i.protocol!=="https:")return null;if(r.trackFileDownloads){let s=um(i.pathname);if(s!==null&&r.fileDownloadExtensions.some((o)=>o.toLowerCase()===s)||t.hasAttribute("download"))return{eventName:"file_download",data:{url:sc(i),extension:s??"",host:i.host}}}if(r.trackOutboundLinks&&i.host!==e)return{eventName:"outbound_click",data:{url:sc(i),host:i.host}};return null}function oc(t,e){let r={trackOutboundLinks:t.autoTrackOutboundLinks??!0,trackFileDownloads:t.autoTrackFileDownloads??!0,fileDownloadExtensions:t.fileDownloadExtensions??cm};if(!r.trackOutboundLinks&&!r.trackFileDownloads)return()=>{};let i=(s)=>{if(s.type==="auxclick"?s.button!==1:s.button!==0)return;let o=s.target?.closest?.("a[href]");if(!o||!("href"in o))return;let l=hm(o,window.location.host,r);if(l)e(l.eventName,l.data)};return document.addEventListener("click",i),document.addEventListener("auxclick",i),()=>{document.removeEventListener("click",i),document.removeEventListener("auxclick",i)}}function ac(t={}){if(typeof window>"u"||typeof document>"u")return{...t};return{path:window.location.pathname,referrer:document.referrer,...t}}class rn{constructor(t){this.report=t,this.timer=null,this.reported=!1,this.previousMarkers=new Set,this.observedMarkers=new Set,this.path=""}afterPageview(){if(this.cancel(),this.reported=!1,this.path=window.location.pathname,this.previousMarkers=this.observedMarkers,this.observedMarkers=new Set,this.check())return;this.timer=setTimeout(()=>{this.timer=null,this.check()},1000)}cancel(){if(this.timer!==null)clearTimeout(this.timer),this.timer=null}check(){if(this.reported)return!1;if(window.location.pathname!==this.path)return!1;let t=fm();for(let r of t)this.observedMarkers.add(r);if(!t.some((r)=>!this.previousMarkers.has(r)))return!1;return this.reported=!0,this.report(),!0}}function fm(){return Array.from(document.querySelectorAll("[data-temps-404]"))}var nn="temps_identified",dm="identify",sn="reset",pm=new Set(["updated","unchanged"]),ri=0;class on extends Error{constructor(t,e){super(t);this.cause=e,this.name="ResetFailedError"}}function mm(t,e){return JSON.stringify([t,e??null])}function gm(){try{return typeof localStorage>"u"?null:localStorage.getItem(nn)}catch{return null}}function lc(t){try{if(typeof localStorage>"u")return;if(t===null)localStorage.removeItem(nn);else localStorage.setItem(nn,t)}catch{}}async function cc(t){let{basePath:e,ingestKey:r,userId:i,traits:s,ready:n}=t;if(Ae())return{applied:!1,outcome:"cookieless_project",message:"Identify stores nothing in cookieless mode."};if(typeof i!=="string"||i.trim()==="")return{applied:!1,outcome:"invalid_user_id",message:"identify() needs a non-empty user id."};let o=mm(i,s);if(gm()===o)return{applied:!0,outcome:"already_sent",message:"This visitor already has this identity."};let l=ri;try{await n}catch{}if(l!==ri)return{applied:!1,outcome:"reset",message:"reset() ran while identify was waiting; nothing was sent."};if(Ae())return{applied:!1,outcome:"cookieless_project",message:"Identify stores nothing in cookieless mode."};try{let a=await fetch(`${e}/${dm}`,{method:"POST",headers:{"Content-Type":"application/json",...We(r)},body:JSON.stringify({user_id:i,traits:s,visitor_id:Qe()})}),c=await a.json().catch(()=>null),u={applied:Boolean(c?.applied),outcome:typeof c?.outcome==="string"?c.outcome:`http_${a.status}`,message:typeof c?.message==="string"?c.message:a.statusText},h=l===ri&&!Ae();if(a.ok&&pm.has(u.outcome)&&h)lc(o);return u}catch(a){return console.error("Failed to send identify:",a),{applied:!1,outcome:"network_error",message:String(a)}}}async function uc(t){if(ri+=1,lc(null),ci(),Xt("started"),Ae()){Xt("confirmed");return}let e;try{e=await fetch(`${t.basePath}/${sn}`,{method:"POST",headers:We(t.ingestKey)})}catch(r){throw new on(`Could not reach ${t.basePath}/${sn} to reset the visitor`,r)}if(!e.ok)throw new on(`${t.basePath}/${sn} answered ${e.status}; the visitor was not reset on the server`);Xt("confirmed")}var ii=1e4;async function si(t,e,r,i=1e4){let s=typeof AbortController==="function"?new AbortController:void 0,n,o=new Promise((a,c)=>{n=setTimeout(()=>{s?.abort(),c(Error(`${e} did not answer within ${Math.round(i/1000)}s`))},i)}),l=(async()=>{let a=await t(e,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:r,signal:s?.signal});if(!a.ok)throw Error(`${e} returned ${a.status}`);return await a.json()})();try{return await Promise.race([l,o])}finally{clearTimeout(n),l.catch(()=>{return})}}class an{constructor(t={}){this.results=new Map,this.inflight=null,this.exposed=new Set,this.listeners=new Set,this.currentStatus="idle",this.revision=0,this.generation=0,this.basePath=t.basePath??"/api/_temps",this.context={key:t.key,attributes:t.attributes},this.bootstrap=new Map(Object.entries(t.bootstrap??{})),this.onExposure=t.onExposure,this.onError=t.onError??((e)=>{console.warn("[temps-flags] serving fallbacks:",e.message)}),this.fetchImpl=t.fetch,this.timeoutMs=t.timeoutMs??ii,this.disabled=t.disabled??!1}get status(){return this.currentStatus}get version(){return this.revision}get(t,e){this.ensureLoaded();let r=this.results.get(t);if(r&&dc(r.value,e))this.recordExposure(r);return this.peek(t,e)}peek(t,e){let r=this.results.get(t);if(!r)return this.bootstrap.has(t)?hc(this.bootstrap.get(t),e):e;return hc(r.value,e)}peekVariant(t){return this.results.get(t)?.variant??null}getVariant(t){this.ensureLoaded();let e=this.results.get(t);if(!e)return null;return this.recordExposure(e),e.variant}setContext(t){if(this.replaceContext({key:t.key,attributes:t.attributes}),this.currentStatus!=="idle")this.load()}setDisabled(t){if(t===this.disabled)return;if(this.disabled=t,t){if(this.results=new Map,this.generation+=1,this.inflight=null,this.currentStatus==="loading")this.currentStatus="idle"}else if(this.currentStatus!=="idle"){this.load();return}this.notify()}getEvaluation(t){return this.ensureLoaded(),this.results.get(t)}all(){return this.ensureLoaded(),[...this.results.values()]}ready(){return this.ensureLoaded(),this.inflight??Promise.resolve()}reload(t={}){return this.replaceContext({key:t.key??this.context.key,attributes:{...this.context.attributes,...t.attributes}}),this.load()}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}replaceContext(t){let e=fc(t)!==fc(this.context);if(this.context=t,!e)return;this.results=new Map,this.bootstrap.clear(),this.exposed.clear(),this.notify()}ensureLoaded(){if(this.currentStatus==="idle")this.load()}load(){if(this.disabled)return Promise.resolve();let t=this.fetchImpl??(typeof fetch==="function"?fetch:void 0);if(!t)return this.currentStatus="error",Promise.resolve();let e=++this.generation;this.currentStatus="loading",Promise.resolve().then(()=>{if(e===this.generation&&this.currentStatus==="loading")this.notify()});let r=JSON.stringify({key:this.context.key,attributes:this.context.attributes??{}}),i=(async()=>{try{let s=await si(t,`${this.basePath}/flags`,r,this.timeoutMs);if(e!==this.generation)return;this.results=new Map((s.flags??[]).map((n)=>[n.key,n])),this.bootstrap.clear(),this.currentStatus="ready"}catch(s){if(e!==this.generation)return;this.currentStatus="error",this.onError(s instanceof Error?s:Error(String(s)))}this.notify()})();return this.inflight=i,i}notify(){this.revision+=1;for(let t of[...this.listeners])try{t()}catch{}}recordExposure(t){if(!t.record_exposure||!this.onExposure)return;let e=t.variant??"",r=`${t.key}\x00${e}`;if(this.exposed.has(r))return;this.exposed.add(r);try{this.onExposure({flag_key:t.key,variant:e,reason:t.reason.kind})}catch{}}}function hc(t,e){return dc(t,e)?t:e}function dc(t,e){if(e===null||e===void 0)return!0;if(t===null||t===void 0)return!1;if(typeof t!==typeof e)return!1;return Array.isArray(e)===Array.isArray(t)}function pc(t){return{flag_key:t.flag_key,variant:t.variant,reason:t.reason}}function fc(t){let e=Object.entries(t.attributes??{}).sort(([r],[i])=>r<i?-1:r>i?1:0);return JSON.stringify([t.key??null,e])}var ln=2000,mc="temps_surveys_seen",ym=200,vm=49152,wm=15000,bm=300000;class cn{constructor(t){this.generation=0,this.failures=0,this.retryAt=0,this.surveys=[],this.inflight=null,this.currentStatus="idle",this.listeners=new Set,this.revision=0,this.shownHere=new Set,this.basePath=t.basePath??"/api/_temps",this.onEvent=t.onEvent,this.onError=t.onError??((e)=>{console.warn("[temps-surveys] no surveys shown:",e.message)}),this.fetchImpl=t.fetch,this.storage=t.storage===void 0?Em():t.storage,this.disabled=t.disabled??!1,this.now=t.now??Date.now,this.timeoutMs=t.timeoutMs??ii,this.context={key:t.key,attributes:t.attributes}}get status(){return this.currentStatus}get version(){return this.revision}all(){return[...this.surveys]}load(){if(this.inflight)return this.inflight;if(this.disabled)return Promise.resolve();if(this.currentStatus==="error"&&this.now()<this.retryAt)return Promise.resolve();let t=this.fetchImpl??(typeof fetch==="function"?fetch:void 0);if(!t)return this.currentStatus="error",this.retryAt=Number.POSITIVE_INFINITY,Promise.resolve();let e=this.generation,r=this.context;this.currentStatus="loading";let i=(async()=>{let s=null,n=null;try{let o=await si(t,`${this.basePath}/surveys`,JSON.stringify({key:r.key,attributes:r.attributes??{}}),this.timeoutMs);s=Array.isArray(o.surveys)?o.surveys:[]}catch(o){n=o instanceof Error?o:Error(String(o))}if(e!==this.generation)return;if(s)this.surveys=s,this.currentStatus="ready",this.failures=0;else{this.currentStatus="error",this.failures+=1;let o=Math.min(wm*2**(this.failures-1),bm);if(this.retryAt=this.now()+o,this.inflight=null,n)this.onError(n)}this.notify()})();return this.inflight=i,i}setContext(t,e){this.generation+=1,this.context={key:t,attributes:e},this.surveys=[],this.inflight=null,this.failures=0,this.retryAt=0,this.currentStatus="idle",this.notify()}eligible(t,e){let r=this.seen();return this.surveys.filter((i)=>{let s=i.display.trigger_event;if(e===void 0?Boolean(s):s!==e)return!1;if(i.display.path_pattern&&!Im(i.display.path_pattern,t))return!1;if(this.shownHere.has(i.id))return!1;return!(i.display.once_per_visitor&&r.has(i.id))})}markShown(t){if(this.shownHere.add(t.id),t.display.once_per_visitor)this.remember(t.id);this.emit("survey_shown",t)}dismiss(t){this.emit("survey_dismissed",t)}submit(t,e){let r=xm(t,e);if(!r.ok)return r;let i={survey_id:t.id,survey_name:t.name,responses:r.responses};if(Sm(JSON.stringify(i))>vm)return{ok:!1,errors:Cm(t,r.responses)};return this.emit("survey_sent",t,{responses:r.responses}),{ok:!0}}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}emit(t,e,r={}){try{this.onEvent(t,{survey_id:e.id,survey_name:e.name,...r})}catch{}}seen(){if(Ae())return new Set;try{let t=this.storage?.getItem(mc),e=t?JSON.parse(t):[];return new Set(Array.isArray(e)?e.filter((r)=>typeof r==="number"):[])}catch{return new Set}}remember(t){if(Ae())return;try{let e=[...this.seen()].filter((r)=>r!==t);e.push(t),this.storage?.setItem(mc,JSON.stringify(e.slice(-ym)))}catch{}}notify(){this.revision+=1;for(let t of[...this.listeners])try{t()}catch{}}}function jt(){return Object.create(null)}function Sm(t){return new TextEncoder().encode(t).length}function Cm(t,e){let i=jt();for(let n of t.questions){let o=e[n.id];if(n.kind==="open_text"&&typeof o==="string"&&o.length>0)i[n.id]="These answers are too long to send together. Shorten this one and send again."}let s=t.questions[0];if(Object.keys(i).length===0&&s)i[s.id]="These answers are too long to send together. Shorten this one and send again.";return i}function Em(){try{return typeof window<"u"?window.localStorage:null}catch{return null}}function Im(t,e){let r=t.split("*");if(r.length===1)return t===e;let i=r[0]??"",s=r[r.length-1]??"";if(!e.startsWith(i))return!1;let n=i.length;for(let o of r.slice(1,-1)){let l=e.indexOf(o,n);if(l===-1)return!1;n=l+o.length}return e.length-n>=s.length&&e.endsWith(s)}function un(t){return t.kind==="nps"?[0,10]:[1,t.scale??5]}function xm(t,e){let r=jt(),i=jt();for(let s of t.questions){let n=Object.prototype.hasOwnProperty.call(e,s.id)?e[s.id]:void 0;if(n===void 0||n===null||typeof n==="string"&&n.trim()===""||Array.isArray(n)&&n.length===0){if(!s.optional)r[s.id]="This question needs an answer.";continue}switch(s.kind){case"open_text":if(typeof n!=="string")r[s.id]="Expected text.";else i[s.id]=n.slice(0,ln);break;case"single_choice":if(typeof n!=="string"||!(s.choices??[]).includes(n))r[s.id]="Pick one of the choices.";else i[s.id]=n;break;case"multiple_choice":{let l=s.choices??[];if(!Array.isArray(n)||n.some((a)=>!l.includes(a)))r[s.id]="Pick from the choices.";else i[s.id]=[...new Set(n)];break}case"rating":case"nps":{let[l,a]=un(s);if(typeof n!=="number"||!Number.isInteger(n)||n<l||n>a)r[s.id]=`Pick a number from ${l} to ${a}.`;else i[s.id]=n;break}}}return Object.keys(r).length>0?{ok:!1,errors:r}:{ok:!0,responses:i}}var Tm=`
73
+ :host { all: initial; }
74
+ .card { position: fixed; right: 16px; bottom: 16px; z-index: 2147483000; width: min(360px, calc(100vw - 32px));
75
+ max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; padding: 16px; border-radius: 10px;
76
+ background: #fff; color: #111; border: 1px solid #ddd; box-shadow: 0 8px 30px rgba(0,0,0,.15);
77
+ font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
78
+ @media (prefers-color-scheme: dark) { .card { background: #1c1c1e; color: #f2f2f2; border-color: #3a3a3c; } }
79
+ .head { display: flex; justify-content: space-between; align-items: start; gap: 8px; margin-bottom: 8px; }
80
+ h2 { font-size: 15px; margin: 0; }
81
+ fieldset { border: 0; padding: 0; margin: 0 0 12px; }
82
+ legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
83
+ .scale { display: flex; flex-wrap: wrap; gap: 4px; }
84
+ .scale label { flex: 1 0 28px; text-align: center; border: 1px solid #ccc; border-radius: 6px; padding: 4px 0; cursor: pointer; }
85
+ .scale input { position: absolute; opacity: 0; pointer-events: none; }
86
+ .scale label:has(input:checked) { background: #111; color: #fff; border-color: #111; }
87
+ .scale label:has(input:focus-visible) { outline: 2px solid #2563eb; outline-offset: 1px; }
88
+ .labels { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; margin-top: 2px; }
89
+ .choice { display: flex; gap: 6px; align-items: center; margin: 2px 0; }
90
+ textarea { width: 100%; box-sizing: border-box; min-height: 64px; font: inherit; padding: 6px; border-radius: 6px; border: 1px solid #ccc; }
91
+ .error { color: #b91c1c; font-size: 12px; margin-top: 4px; }
92
+ button { font: inherit; cursor: pointer; border-radius: 6px; }
93
+ .close { background: none; border: 0; font-size: 18px; line-height: 1; color: inherit; padding: 0 4px; }
94
+ .send { width: 100%; padding: 8px; background: #111; color: #fff; border: 0; }
95
+ .thanks { margin: 0; }
96
+ `;function gc(t,e){if(typeof document>"u")return()=>{return};let r=document.createElement("div");r.setAttribute("data-temps-survey",String(t.id));let i=r.attachShadow({mode:"open"}),s=document.createElement("style");s.textContent=Tm,i.appendChild(s);let n=`temps-survey-${t.id}-title`,o=ae("form",{class:"card",role:"dialog","aria-labelledby":n});o.noValidate=!0;let l=ae("div",{class:"head"}),a=ae("h2",{id:n});a.textContent=t.name;let c=ae("button",{type:"button",class:"close","aria-label":"Close survey"});c.textContent="×",l.append(a,c),o.appendChild(l);let u=new Map;for(let b of t.questions){let{fieldset:w,error:y}=Am(t.id,b);u.set(b.id,y),o.appendChild(w)}let h=ae("button",{type:"submit",class:"send"});h.textContent="Send",o.appendChild(h),i.appendChild(o),document.body.appendChild(r);let p=!1,d=!1,g=()=>{if(p)return;p=!0,document.removeEventListener("keydown",f),r.remove(),e.onClosed?.()},m=()=>{if(!d)e.onDismiss();g()},f=(b)=>{if(b.key==="Escape")m()};return document.addEventListener("keydown",f),c.addEventListener("click",m),o.addEventListener("submit",(b)=>{b.preventDefault();let w=e.onSubmit(Mm(o,t));for(let[C,x]of u)x.textContent=w?.[C]??"";if(w)return;d=!0,o.replaceChildren(l);let y=ae("p",{class:"thanks",role:"status"});y.textContent="Thanks for your answer.",o.appendChild(y),setTimeout(g,2500)}),g}function Am(t,e){let r=`q-${t}-${e.id}`,i=ae("fieldset",{}),s=ae("legend",{});switch(s.textContent=e.optional?`${e.prompt} (optional)`:e.prompt,i.appendChild(s),e.kind){case"open_text":{let o=ae("textarea",{name:r,maxlength:String(ln),"aria-label":e.prompt});i.appendChild(o);break}case"rating":case"nps":{let[o,l]=un(e),a=ae("div",{class:"scale"});for(let c=o;c<=l;c+=1){let u=ae("label",{}),h=ae("input",{type:"radio",name:r,value:String(c)});u.append(h,document.createTextNode(String(c))),a.appendChild(u)}if(i.appendChild(a),e.lower_label||e.upper_label){let c=ae("div",{class:"labels"}),u=ae("span",{});u.textContent=e.lower_label??"";let h=ae("span",{});h.textContent=e.upper_label??"",c.append(u,h),i.appendChild(c)}break}case"single_choice":case"multiple_choice":{let o=e.kind==="single_choice"?"radio":"checkbox";for(let l of e.choices??[]){let a=ae("label",{class:"choice"}),c=ae("input",{type:o,name:r,value:l});a.append(c,document.createTextNode(l)),i.appendChild(a)}break}}let n=ae("div",{class:"error",role:"alert"});return i.appendChild(n),{fieldset:i,error:n}}function Mm(t,e){let r=jt();for(let i of e.questions){let s=`q-${e.id}-${i.id}`,n=Array.from(t.querySelectorAll(`[name="${Nm(s)}"]`));switch(i.kind){case"open_text":r[i.id]=n[0]?.value??"";break;case"rating":case"nps":{let o=n.find((l)=>l.checked);if(o)r[i.id]=Number(o.value);break}case"single_choice":{let o=n.find((l)=>l.checked);if(o)r[i.id]=o.value;break}case"multiple_choice":r[i.id]=n.filter((o)=>o.checked).map((o)=>o.value);break}}return r}function Nm(t){return t.replace(/["\\]/g,"\\$&")}function ae(t,e){let r=document.createElement(t);for(let[i,s]of Object.entries(e))r.setAttribute(i,s);return r}function hn(t={}){let{basePath:e=Ze,disabled:r=!1,ignoreLocalhost:i=!0,domain:s,ingestKey:n,autoTrackPageviews:o=!0,autoTrackPageLeave:l=!0,pageLeaveEventName:a="page_leave",autoTrackSpeedAnalytics:c=!0,autoTrackEngagement:u=!0,heartbeatInterval:h=30000,inactivityTimeout:p=30000,engagementThreshold:d=1e4,enableSessionRecording:g=!1,sessionRecordingConfig:m={},autoTrackOutboundLinks:f=!0,autoTrackFileDownloads:b=!0,fileDownloadExtensions:w,autoTrackNotFound:y=!0,cookieless:C=!1,flags:x={},surveys:I={}}=t,E=[];if(C)mn();let S=()=>!Ae(),A=Rm(r,i),M=()=>s||(typeof window<"u"?window.location.hostname:""),Q=async(N,Z={})=>{if(!A)return;await Ve("event",{event_name:N,request_query:window.location.search,request_path:window.location.pathname,domain:M(),language:navigator.language,event_data:Z},"POST",e,n)},V=async(N={})=>{if(!A)return;await ue(nc,ac(N))},T=A&&y?new rn(()=>void V()):null;if(T)E.push(()=>T.cancel());let te=Promise.resolve(),re=()=>{if(!A)return;te=Ve("event",{event_name:"page_view",request_query:window.location.search,request_path:window.location.pathname,domain:M(),language:navigator.language,event_data:{referrer:document.referrer,userAgent:navigator.userAgent,timestamp:new Date().toISOString()}},"POST",e,n),T?.afterPageview()},F=new an({...x,basePath:e,disabled:r,onExposure:(N)=>{if(A)Q("flag_exposure",pc(N))}}),L=A&&I.enabled===!0,ee=L&&I.autoShow!==!1,G=new cn({basePath:e,key:I.key,attributes:I.attributes,onError:I.onError,disabled:!L,onEvent:(N,Z)=>{Q(N,Z)}}),ge=null,ne=!1,ye=async(N)=>{if(!ee||ge||ne)return;if(await G.load(),ge||ne)return;let Z=G.eligible(window.location.pathname,N)[0];if(!Z)return;G.markShown(Z);let xe=!1,_=gc(Z,{onSubmit:(K)=>{let U=G.submit(Z,K);return U.ok?null:U.errors},onDismiss:()=>G.dismiss(Z),onClosed:()=>{if(xe=!0,ge===le)ge=null}}),le=()=>_();if(!xe)ge=le};E.push(()=>{ne=!0,ge?.()});let ue=async(N,Z={})=>{if(!N.startsWith("survey_"))ye(N);await Q(N,Z)},he=async(N,Z)=>{if(!A)return{applied:!1,outcome:"disabled",message:"Analytics is disabled on this page."};return cc({basePath:e,ingestKey:n,userId:N,traits:Z,ready:te})},oe=async()=>{if(!A)return;await uc({basePath:e,ingestKey:n})};if(A){if(o)E.push(Om(()=>{re(),ye()}));if(u){let N=new fi({basePath:e,ingestKey:n,domain:M(),heartbeatInterval:h,inactivityTimeout:p,engagementThreshold:d});E.push(()=>N.destroy())}else if(l)E.push(Dm(a,M,e,n));if(c){let N=new bi({basePath:e,ingestKey:n});E.push(()=>N.destroy())}if(E.push(_m(ue)),E.push(oc({autoTrackOutboundLinks:f,autoTrackFileDownloads:b,fileDownloadExtensions:w},(N,Z)=>{ze("event",{event_name:N,request_query:window.location.search,request_path:window.location.pathname,domain:M(),language:navigator.language,event_data:Z},e,n)})),!o)ye()}if(!S()&&g)console.warn("[temps] Session recording is off in cookieless mode: a replay needs a visitor id stored on the device.");let Je=A&&g&&S()?new ti({basePath:e,ingestKey:n,domain:M(),enabled:!0,...m}):null;if(Je)E.push(()=>Je.destroy());let ie=Je;return E.push(yn(()=>{ie?.discard(),ie=null})),E.push(bn((N)=>{if(N==="started")ie?.endForReset();else ie?.resumeAfterReset()})),{get enabled(){return A},ingestKey:n,flags:F,surveys:G,trackEvent:ue,trackPageview:re,trackNotFound:V,identify:he,reset:oe,getVisitorId:gn,enableSessionRecording(){if(!A||!S())return;if(ie){ie.start();return}ie=new ti({basePath:e,ingestKey:n,domain:M(),enabled:!0,...m}),E.push(()=>ie?.destroy())},disableSessionRecording(){ie?.stop()},destroy(){while(E.length>0){let N=E.pop();try{N?.()}catch(Z){console.error("Analytics cleanup error:",Z)}}}}}function Rm(t,e){if(t)return!1;if(typeof window>"u")return!1;if(e&&(En()||In()))return!1;try{if(window.localStorage?.getItem("temps_ignore")==="true")return!1;if(window.localStorage?.temps_ignore==="true")return!1}catch{}return!0}function Om(t){let e=window.location.pathname,r=!0,i=window.history.pushState.bind(window.history),s=()=>{let l=window.location.pathname;if(e!==l)e=l,t()};window.history.pushState=(l,a,c)=>{i(l,a,c),s()};let n=()=>s();window.addEventListener("popstate",n);let o=()=>{if(document.visibilityState==="visible"&&r)r=!1,t(),document.removeEventListener("visibilitychange",o)};if(document.visibilityState==="prerender")document.addEventListener("visibilitychange",o);else if(r)r=!1,t();return()=>{window.removeEventListener("popstate",n),document.removeEventListener("visibilitychange",o),window.history.pushState=i}}function _m(t){let e=(r)=>{let s=r.target?.closest?.("[temps-event-name]");if(!(s instanceof HTMLElement))return;let n=s.getAttribute("temps-event-name");if(!n)return;let o={};for(let l of s.getAttributeNames())if(l.startsWith("temps-data-")){let a=l.replace("temps-data-","");o[a]=s.getAttribute(l)}t(n,o)};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)}function Dm(t,e,r,i){let s=!1,n=Date.now(),o=()=>{if(s)return;s=!0;let l=Date.now()-n;ze("event",{event_name:t,request_query:window.location.search,request_path:window.location.pathname,domain:e(),language:navigator.language,event_data:{time_on_page_ms:l,timestamp:new Date().toISOString(),url:window.location.href,referrer:document.referrer}},r,i)};return window.addEventListener("pagehide",o),window.addEventListener("beforeunload",o),()=>{window.removeEventListener("pagehide",o),window.removeEventListener("beforeunload",o)}}var Kt=null;function yc(t={}){if(Kt)Kt.destroy();if(Kt=hn(t),typeof window<"u")window.temps=Kt;return Kt}function km(){if(typeof document>"u")return{};let t=document.currentScript??document.querySelector("script[data-temps]")??Array.from(document.scripts).reverse().find((s)=>!!s.dataset?.domain||!!s.dataset?.basePath||!!s.dataset?.ingestKey)??null;if(!t)return{};let e=t.dataset,r={},i={};if(e.basePath)r.basePath=e.basePath;if(e.ingestKey)r.ingestKey=e.ingestKey;if(e.domain)r.domain=e.domain;if(e.cookieless)r.cookieless=e.cookieless==="true";if(e.disabled)r.disabled=e.disabled==="true";if(e.ignoreLocalhost)r.ignoreLocalhost=e.ignoreLocalhost==="true";if(e.autoTrackPageviews)r.autoTrackPageviews=e.autoTrackPageviews==="true";if(e.autoTrackPageLeave)r.autoTrackPageLeave=e.autoTrackPageLeave==="true";if(e.pageLeaveEventName)r.pageLeaveEventName=e.pageLeaveEventName;if(e.autoTrackSpeedAnalytics)r.autoTrackSpeedAnalytics=e.autoTrackSpeedAnalytics==="true";if(e.autoTrackEngagement)r.autoTrackEngagement=e.autoTrackEngagement==="true";if(e.heartbeatInterval)r.heartbeatInterval=Number(e.heartbeatInterval);if(e.inactivityTimeout)r.inactivityTimeout=Number(e.inactivityTimeout);if(e.engagementThreshold)r.engagementThreshold=Number(e.engagementThreshold);if(e.autoTrackOutboundLinks)r.autoTrackOutboundLinks=e.autoTrackOutboundLinks==="true";if(e.autoTrackFileDownloads)r.autoTrackFileDownloads=e.autoTrackFileDownloads==="true";if(e.fileDownloadExtensions)r.fileDownloadExtensions=e.fileDownloadExtensions.split(",").map((s)=>s.trim().replace(/^\./,"")).filter((s)=>s.length>0);if(e.autoTrackNotFound)r.autoTrackNotFound=e.autoTrackNotFound==="true";if(e.sessionRecording)r.enableSessionRecording=e.sessionRecording==="true";if(e.sessionSampleRate)i.sessionSampleRate=Number(e.sessionSampleRate);if(e.maskAllInputs)i.maskAllInputs=e.maskAllInputs==="true";if(e.excludedPaths)i.excludedPaths=e.excludedPaths.split(",").map((s)=>s.trim());if(Object.keys(i).length>0)r.sessionRecordingConfig=i;return r}function vc(){if(typeof window>"u")return;yc(km())}if(typeof document<"u"&&document.readyState==="loading")document.addEventListener("DOMContentLoaded",vc,{once:!0});else vc();})();