(function (g, f) {
    if ("object" == typeof exports && "object" == typeof module) {
      module.exports = f();
    } else if ("function" == typeof define && define.amd) {
      define("rrwebReplay", [], f);
    } else if ("object" == typeof exports) {
      exports["rrwebReplay"] = f();
    } else {
      g["rrwebReplay"] = f();
    }
  }(this, () => {
var exports = {};
var module = { exports };
"use strict";var Xi=Object.defineProperty,Qi=Object.defineProperties;var Zi=Object.getOwnPropertyDescriptors;var pt=Object.getOwnPropertySymbols;var Br=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable;var Qt=(e,t,r)=>t in e?Xi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))Br.call(t,r)&&Qt(e,r,t[r]);if(pt)for(var r of pt(t))Wr.call(t,r)&&Qt(e,r,t[r]);return e},ne=(e,t)=>Qi(e,Zi(t));var mt=(e,t)=>{var r={};for(var i in e)Br.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&pt)for(var i of pt(e))t.indexOf(i)<0&&Wr.call(e,i)&&(r[i]=e[i]);return r};var R=(e,t,r)=>Qt(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var $r=Object.defineProperty,Ki=(e,t)=>{let r={};for(var i in e)$r(r,i,{get:e[i],enumerable:!0});return t||$r(r,Symbol.toStringTag,{value:"Module"}),r},en=Object.create,Rs=Object.defineProperty,tn=Object.getOwnPropertyDescriptor,rn=Object.getOwnPropertyNames,sn=Object.getPrototypeOf,Os=Object.prototype.hasOwnProperty,q=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),nn=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var c=rn(t),d=0,f=c.length,p;d<f;d++)p=c[d],!Os.call(e,p)&&p!==r&&Rs(e,p,{get:(m=>t[m]).bind(null,p),enumerable:!(i=tn(t,p))||i.enumerable});return e},on=(e,t,r)=>(r=e!=null?en(sn(e)):{},nn(t||!e||!e.__esModule||!Os.call(e,"default")?Rs(r,"default",{value:e,enumerable:!0}):r,e)),W=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}({}),zr={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ze={},nr={},Vr=0;function an(e){var r,i;let t=(i=(r=globalThis==null?void 0:globalThis.Zone)==null?void 0:r.__symbol__)==null?void 0:i.call(r,e);if(t&&globalThis[t])return globalThis[t]}function vr(e){if(Ze[e])return Ze[e];let t=an(e)||globalThis[e],r=t.prototype,i=e in zr?zr[e]:void 0,c=!!(i&&i.every(p=>{var m,g;return!!((g=(m=Object.getOwnPropertyDescriptor(r,p))==null?void 0:m.get)!=null&&g.toString().includes("[native code]"))})),d=e in jr?jr[e]:void 0,f=!!(d&&d.every(p=>{var m;return typeof r[p]=="function"&&((m=r[p])==null?void 0:m.toString().includes("[native code]"))}));if(c&&f)return Ze[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let m=p.contentWindow;if(!m)return t.prototype;let g=m[e].prototype;if(!g)return p.remove(),r;let v=navigator.userAgent;return v.includes("Safari")&&!v.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),nr[e]=()=>p.remove()):p.remove(),Ze[e]=g}catch(p){return r}}var gt={};function ye(e,t,r){var f,p;let i=(f=gt[e])==null?void 0:f[r];if(i)return i.call(t);let c=vr(e),d=(p=Object.getOwnPropertyDescriptor(c,r))==null?void 0:p.get;return d?((gt[e]||(gt[e]={}))[r]=d,d.call(t)):t[r]}var Zt={};function Ns(e,t,r){let i=`${e}.${String(r)}`;if(Zt[i])return Zt[i].bind(t);let c=vr(e)[r];return typeof c!="function"?t[r]:(Zt[i]=c,c.bind(t))}function ln(e){return ye("Node",e,"ownerDocument")}function un(e){return ye("Node",e,"childNodes")}function cn(e){return ye("Node",e,"parentNode")}function fn(e){return ye("Node",e,"parentElement")}function hn(e){return ye("Node",e,"textContent")}function dn(e){return ye("Node",e,"firstChild")}function pn(e){return ye("Node",e,"lastChild")}function mn(e){return ye("Node",e,"nextSibling")}function gn(e){return ye("Node",e,"previousSibling")}function yn(e,t){return Ns("Node",e,"contains")(t)}function vn(e){return Ns("Node",e,"getRootNode")()}function wn(e){return!e||!("host"in e)?null:ye("ShadowRoot",e,"host")}function bn(e){return e.styleSheets}function Sn(e){return!e||!("shadowRoot"in e)?null:ye("Element",e,"shadowRoot")}function Cn(e,t){return ye("Element",e,"querySelector")(t)}function xn(e,t){return ye("Element",e,"querySelectorAll")(t)}function En(){let e=vr("MutationObserver");Vr++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--Vr!==0))return;let r=nr.MutationObserver;if(r)try{r()}finally{delete Ze.MutationObserver,delete nr.MutationObserver}}]}var Is=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Is=()=>new Date().getTime());function Mn(e,t,r){try{if(!(t in e))return()=>{};let i=e[t],c=r(i);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=c,()=>{e[t]=i}}catch(i){return()=>{}}}var ue={ownerDocument:ln,childNodes:un,parentNode:cn,parentElement:fn,textContent:hn,firstChild:dn,lastChild:pn,nextSibling:mn,previousSibling:gn,contains:yn,getRootNode:vn,host:wn,styleSheets:bn,shadowRoot:Sn,querySelector:Cn,querySelectorAll:xn,nowTimestamp:Is,mutationObserverCtor:En,patch:Mn};function wr(e){return e.nodeType===e.ELEMENT_NODE}function st(e){let t=e&&"host"in e&&"mode"in e&&ue.host(e)||null;return!!(t&&"shadowRoot"in t&&ue.shadowRoot(t)===e)}function it(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Rn(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function On(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function or(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;return!r&&e.ownerNode&&(r=e.ownerNode.baseURI),Rn(Array.from(t,i=>Ds(i,r)).join(""))}catch(t){return null}}function Ds(e,t){if(In(e)){let r;try{r=or(e.styleSheet)||On(e)}catch(i){r=e.cssText}return e.styleSheet.href?Ot(r,e.styleSheet.href):r}else{let r=e.cssText;return Dn(e)&&e.selectorText.includes(":")&&(r=Nn(r)),t?Ot(r,t):r}}function Nn(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function In(e){return"styleSheet"in e}function Dn(e){return"selectorText"in e}var br=class{constructor(){R(this,"idNodeMap",new Map);R(this,"nodeMetaMap",new WeakMap)}getId(e){var t,r;return e&&(r=(t=this.getMeta(e))==null?void 0:t.id)!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i));let r=ue.shadowRoot(e);r&&this.removeNodeFromMap(r)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function As(){return new br}function Mt({element:e,maskInputOptions:t,tagName:r,type:i,value:c,maskInputFn:d}){let f=c||"",p=i&&Oe(i);return(t[r.toLowerCase()]||p&&t[p])&&(d?f=d(f,e):f="*".repeat(f.length)),f}function Oe(e){return e.toLowerCase()}var Gr="__rrweb_original__";function An(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let i=0;i<e.width;i+=r)for(let c=0;c<e.height;c+=r){let d=t.getImageData,f=Gr in d?d[Gr]:d;if(new Uint32Array(f.call(t,i,c,Math.min(r,e.width-i),Math.min(r,e.height-c)).data.buffer).some(p=>p!==0))return!1}return!0}function Tn(e,t){return!e||!t||e.type!==t.type?!1:e.type===W.Document?e.compatMode===t.compatMode:e.type===W.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===W.Comment||e.type===W.Text||e.type===W.CDATA?e.textContent===t.textContent:e.type===W.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Rt(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Oe(t):null}function Sr(e,t){var i,c;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(d){return null}return(c=(i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i))==null?void 0:i[1])!=null?c:null}function _n(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ln=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,kn=/^(?:[a-z+]+:)?\/\//i,Pn=/^www\..*/i,Fn=/^(data:)([^,]*),(.*)/i,Un=/^blob:/i;function Ot(e,t){return(e||"").replace(Ln,(r,i,c,d,f,p)=>{let m=c||f||p,g=i||d||"";if(!m)return r;if(kn.test(m)||Pn.test(m))return`url(${g}${m}${g})`;if(Fn.test(m)||Un.test(m))return`url(${g}${m}${g})`;if(m[0]==="#")return`url(${g}${m}${g})`;if(m[0]==="/")return`url(${g}${_n(t)+m}${g})`;let v=m.split("#")[0],l=m.substring(v.length),o=t.split("#")[0].split("/"),n=v.split("/");o.pop();for(let u of n)u!=="."&&(u===".."?o.pop():o.push(u));return`url(${g}${o.join("/")}${l}${g})`})}var Ts="(?:/\\*[^*]*\\*/)|[\\s;]",Bn=new RegExp(`${Ts}|\\b(0)px?`,"g"),Wn=new RegExp(Ts,"g");function yt(e,t=!1){return t?e.replace(Wn,""):e.replace(Bn,"$1")}function $n(e,t,r=!1){let i=Array.from(t.childNodes),c=[],d=0;if(i.length>1&&e&&typeof e=="string"){let f=yt(e,r),p=f.length/e.length;for(let m=1;m<i.length;m++)if(i[m].textContent&&typeof i[m].textContent=="string"){let g=yt(i[m].textContent,r),v=100,l=3;for(;l<g.length&&(g[l].match(/[a-zA-Z0-9]/)||g.indexOf(g.substring(0,l),1)!==-1);l++);for(;l<g.length;l++){let o=g.substring(0,l),n=f.split(o),u=-1;if(n.length===2)u=n[0].length;else if(n.length>2&&n[0]===""&&i[m-1].textContent!=="")u=f.indexOf(o,1);else if(n.length===1){if(o=o.substring(0,o.length-1),n=f.split(o),n.length<=1)return c.push(e),c;l=101}else l===g.length-1&&(u=f.indexOf(o));if(n.length>=2&&l>v){let s=i[m-1].textContent;if(s&&typeof s=="string"){let a=yt(s).length;u=f.indexOf(o,a)}u===-1&&(u=n[0].length)}if(u!==-1){let s=Math.floor(u/p);for(;s>0&&s<e.length;){if(d+=1,d>50*i.length)return c.push(e),c;let a=yt(e.substring(0,s),r);if(a.length===u){c.push(e.substring(0,s)),e=e.substring(s),f=f.substring(u);break}else a.length<u?s+=Math.max(1,Math.floor((u-a.length)/p)):s-=Math.max(1,Math.floor((a.length-u)*p))}break}}}}return c.push(e),c}function zn(e,t){return $n(e,t).join("/* rr_split */")}var jn=1,Vn=new RegExp("[^a-z0-9-_:]");function _s(){return jn++}function Gn(e){if(e instanceof HTMLFormElement)return"form";let t=Oe(e.tagName);return Vn.test(t)?"div":t}var ze,Hr,Hn=/^[^ \t\n\r\u000c]+/,qn=/^[, \t\n\r\u000c]+/;function Yn(e,t){if(t.trim()==="")return t;let r=0;function i(d){let f,p=d.exec(t.substring(r));return p?(f=p[0],r+=f.length,f):""}let c=[];for(;i(qn),!(r>=t.length);){let d=i(Hn);if(d.slice(-1)===",")d=He(e,d.substring(0,d.length-1)),c.push(d);else{let f="";d=He(e,d);let p=!1;for(;;){let m=t.charAt(r);if(m===""){c.push((d+f).trim());break}else if(p)m===")"&&(p=!1);else if(m===","){r+=1,c.push((d+f).trim());break}else m==="("&&(p=!0);f+=m,r+=1}}}return c.join(", ")}var qr=new WeakMap;function He(e,t){return!t||t.trim()===""?t:Cr(e,t)}function Jn(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Cr(e,t){let r=qr.get(e);if(r||(r=e.createElement("a"),qr.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Ls(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?He(e,i):r==="srcset"?Yn(e,i):r==="style"?Ot(i,Cr(e)):t==="object"&&r==="data"?He(e,i):i)}function ks(e,t,r){return["video","audio"].includes(e)&&Oe(t)==="autoplay"}function Ps(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){let c=e.classList[i];if(t.test(c))return!0}if(r)return e.matches(r)}catch(i){}return!1}function Nt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Nt(ue.parentNode(e),t,r):!1;for(let i=e.classList.length;i--;){let c=e.classList[i];if(t.test(c))return!0}return r?Nt(ue.parentNode(e),t,r):!1}function Fs(e,t,r,i){let c;if(wr(e)){if(c=e,!ue.childNodes(c).length)return!1}else{if(ue.parentElement(e)===null)return!1;c=ue.parentElement(e)}try{if(typeof t=="string"){if(i){if(c.closest(`.${t}`))return!0}else if(c.classList.contains(t))return!0}else if(Nt(c,t,i))return!0;if(r){if(i){if(c.closest(r))return!0}else if(c.matches(r))return!0}}catch(d){}return!1}function Xn(e,t,r){let i=e.contentWindow;if(!i)return;let c=!1,d;try{d=i.document.readyState}catch(p){return}if(d!=="complete"){let p=setTimeout(()=>{c||(t(),c=!0)},r);e.addEventListener("load",()=>{clearTimeout(p),c=!0,t()});return}let f="about:blank";if(i.location.href!==f||e.src===f||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Qn(e,t,r){let i=!1,c;try{c=e.sheet}catch(f){return}if(c)return;let d=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(d),i=!0,t()})}function Zn(e,t){let{doc:r,mirror:i,blockClass:c,blockSelector:d,needsMask:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:g,maskInputFn:v,dataURLOptions:l={},inlineImages:o,recordCanvas:n,keepIframeSrcFn:u,newlyAddedElement:s=!1,cssCaptured:a=!1}=t,h=Kn(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:W.Document,childNodes:[],compatMode:e.compatMode}:{type:W.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:W.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:h};case e.ELEMENT_NODE:return to(e,{doc:r,blockClass:c,blockSelector:d,inlineStylesheet:p,maskInputOptions:m,maskInputFn:v,dataURLOptions:l,inlineImages:o,recordCanvas:n,keepIframeSrcFn:u,newlyAddedElement:s,rootId:h});case e.TEXT_NODE:return eo(e,{doc:r,needsMask:f,maskTextFn:g,rootId:h,cssCaptured:a});case e.CDATA_SECTION_NODE:return{type:W.CDATA,textContent:"",rootId:h};case e.COMMENT_NODE:return{type:W.Comment,textContent:ue.textContent(e)||"",rootId:h};default:return!1}}function Kn(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function eo(e,t){let{needsMask:r,maskTextFn:i,rootId:c,cssCaptured:d}=t,f=ue.parentNode(e),p=f&&f.tagName,m="",g=p==="STYLE"?!0:void 0,v=p==="SCRIPT"?!0:void 0;return v?m="SCRIPT_PLACEHOLDER":d||(m=ue.textContent(e),g&&m&&(m=Ot(m,Cr(t.doc)))),!g&&!v&&m&&r&&(m=i?i(m,ue.parentElement(e)):m.replace(/[\S]/g,"*")),{type:W.Text,textContent:m||"",rootId:c}}function to(e,t){let{doc:r,blockClass:i,blockSelector:c,inlineStylesheet:d,maskInputOptions:f={},maskInputFn:p,dataURLOptions:m={},inlineImages:g,recordCanvas:v,keepIframeSrcFn:l,newlyAddedElement:o=!1,rootId:n}=t,u=Ps(e,i,c),s=Gn(e),a={},h=e.attributes.length;for(let w=0;w<h;w++){let b=e.attributes[w];ks(s,b.name,b.value)||(a[b.name]=Ls(r,s,Oe(b.name),b.value))}if(s==="link"&&d){let w=Array.from(r.styleSheets).find(M=>M.href===e.href),b=null;w&&(b=or(w)),b&&(delete a.rel,delete a.href,a._cssText=b)}if(s==="style"&&e.sheet){let w=or(e.sheet);w&&(e.childNodes.length>1&&(w=zn(w,e)),a._cssText=w)}if(["input","textarea","select"].includes(s)){let w=e.value,b=e.checked;a.type!=="radio"&&a.type!=="checkbox"&&a.type!=="submit"&&a.type!=="button"&&w?a.value=Mt({element:e,type:Rt(e),tagName:s,value:w,maskInputOptions:f,maskInputFn:p}):b&&(a.checked=b)}if(s==="option"&&(e.selected&&!f.select?a.selected=!0:delete a.selected),s==="dialog"&&e.open&&(a.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),s==="canvas"&&v){if(e.__context==="2d")An(e)||(a.rr_dataURL=e.toDataURL(m.type,m.quality));else if(!("__context"in e)){let w=e.toDataURL(m.type,m.quality),b=r.createElement("canvas");b.width=e.width,b.height=e.height,w!==b.toDataURL(m.type,m.quality)&&(a.rr_dataURL=w)}}if(s==="img"&&g){ze||(ze=r.createElement("canvas"),Hr=ze.getContext("2d"));let w=e,b=w.currentSrc||w.getAttribute("src")||"<unknown-src>",M=w.crossOrigin,x=()=>{w.removeEventListener("load",x);try{ze.width=w.naturalWidth,ze.height=w.naturalHeight,Hr.drawImage(w,0,0),a.rr_dataURL=ze.toDataURL(m.type,m.quality)}catch(C){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${b}! Error: ${C}`)}w.crossOrigin==="anonymous"&&(M?a.crossOrigin=M:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x)}if(["audio","video"].includes(s)){let w=a;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(o||(e.scrollLeft&&(a.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(a.rr_scrollTop=e.scrollTop)),u){let{width:w,height:b}=e.getBoundingClientRect();a={class:a.class,rr_width:`${w}px`,rr_height:`${b}px`}}s==="iframe"&&!l(a.src)&&(e.contentDocument||(a.rr_src=a.src),delete a.src);let y;try{customElements.get(s)&&(y=!0)}catch(w){}return{type:W.Element,tagName:s,attributes:a,childNodes:[],isSVG:Jn(e)||void 0,needBlock:u,rootId:n,isCustom:y}}function X(e){return e==null?"":e.toLowerCase()}function Us(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function ro(e,t){if(t.comment&&e.type===W.Comment)return!0;if(e.type===W.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Sr(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(X(e.attributes.name).match(/^msapplication-tile(image|color)$/)||X(e.attributes.name)==="application-name"||X(e.attributes.rel)==="icon"||X(e.attributes.rel)==="apple-touch-icon"||X(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&X(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(X(e.attributes.property).match(/^(og|twitter|fb):/)||X(e.attributes.name).match(/^(og|twitter):/)||X(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(X(e.attributes.name)==="robots"||X(e.attributes.name)==="googlebot"||X(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(X(e.attributes.name)==="author"||X(e.attributes.name)==="generator"||X(e.attributes.name)==="framework"||X(e.attributes.name)==="publisher"||X(e.attributes.name)==="progid"||X(e.attributes.property).match(/^article:/)||X(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(X(e.attributes.name)==="google-site-verification"||X(e.attributes.name)==="yandex-verification"||X(e.attributes.name)==="csrf-token"||X(e.attributes.name)==="p:domain_verify"||X(e.attributes.name)==="verify-v1"||X(e.attributes.name)==="verification"||X(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function qe(e,t){let{doc:r,mirror:i,blockClass:c,blockSelector:d,maskTextClass:f,maskTextSelector:p,skipChild:m=!1,inlineStylesheet:g=!0,maskInputOptions:v={},maskTextFn:l,maskInputFn:o,slimDOMOptions:n,dataURLOptions:u={},inlineImages:s=!1,recordCanvas:a=!1,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:C=!1,cssCaptured:S=!1}=t,{needsMask:E}=t,{preserveWhiteSpace:O=!0}=t;E||(E=Fs(e,f,p,E===void 0));let D=Zn(e,{doc:r,mirror:i,blockClass:c,blockSelector:d,needsMask:E,inlineStylesheet:g,maskInputOptions:v,maskTextFn:l,maskInputFn:o,dataURLOptions:u,inlineImages:s,recordCanvas:a,keepIframeSrcFn:x,newlyAddedElement:C,cssCaptured:S});if(!D)return console.warn(e,"not serialized"),null;let N;i.hasNode(e)?N=i.getId(e):ro(D,n)||!O&&D.type===W.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?N=-2:N=_s();let T=Object.assign(D,{id:N});if(i.add(e,T),N===-2)return null;h&&h(e);let k=!m;if(T.type===W.Element){k=k&&!T.needBlock,delete T.needBlock;let G=ue.shadowRoot(e);G&&it(G)&&(T.isShadowHost=!0)}if((T.type===W.Document||T.type===W.Element)&&k){n.headWhitespace&&T.type===W.Element&&T.tagName==="head"&&(O=!1);let G={doc:r,mirror:i,blockClass:c,blockSelector:d,needsMask:E,maskTextClass:f,maskTextSelector:p,skipChild:m,inlineStylesheet:g,maskInputOptions:v,maskTextFn:l,maskInputFn:o,slimDOMOptions:n,dataURLOptions:u,inlineImages:s,recordCanvas:a,preserveWhiteSpace:O,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:M,keepIframeSrcFn:x,cssCaptured:!1};if(!(T.type===W.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===W.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(G.cssCaptured=!0);for(let oe of Array.from(ue.childNodes(e))){let U=qe(oe,G);U&&T.childNodes.push(U)}}let I=null;if(wr(e)&&(I=ue.shadowRoot(e)))for(let oe of Array.from(ue.childNodes(I))){let U=qe(oe,G);U&&(it(I)&&(U.isShadow=!0),T.childNodes.push(U))}}let fe=ue.parentNode(e);return fe&&st(fe)&&it(fe)&&(T.isShadow=!0),T.type===W.Element&&T.tagName==="iframe"&&!Ps(e,c,d)&&Xn(e,()=>{let G=e.contentDocument;if(G&&y){let I=qe(G,{doc:G,mirror:i,blockClass:c,blockSelector:d,needsMask:E,maskTextClass:f,maskTextSelector:p,skipChild:!1,inlineStylesheet:g,maskInputOptions:v,maskTextFn:l,maskInputFn:o,slimDOMOptions:n,dataURLOptions:u,inlineImages:s,recordCanvas:a,preserveWhiteSpace:O,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:M,keepIframeSrcFn:x});I&&y(e,I)}},w),T.type===W.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&Sr(T.attributes.href)==="css")&&Qn(e,()=>{if(b){let G=qe(e,{doc:r,mirror:i,blockClass:c,blockSelector:d,needsMask:E,maskTextClass:f,maskTextSelector:p,skipChild:!1,inlineStylesheet:g,maskInputOptions:v,maskTextFn:l,maskInputFn:o,slimDOMOptions:n,dataURLOptions:u,inlineImages:s,recordCanvas:a,preserveWhiteSpace:O,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:M,keepIframeSrcFn:x});G&&b(e,G)}},M),T}function so(e,t){let{mirror:r=new br,blockClass:i="rr-block",blockSelector:c=null,maskTextClass:d="rr-mask",maskTextSelector:f=null,inlineStylesheet:p=!0,inlineImages:m=!1,recordCanvas:g=!1,maskAllInputs:v=!1,maskTextFn:l,maskInputFn:o,slimDOM:n=!1,dataURLOptions:u,preserveWhiteSpace:s,onSerialize:a,onIframeLoad:h,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:M=()=>!1}=t||{};return qe(e,{doc:e,mirror:r,blockClass:i,blockSelector:c,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:v===!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}:v===!1?{password:!0}:v,maskTextFn:l,maskInputFn:o,slimDOMOptions:Us(n),dataURLOptions:u,inlineImages:m,recordCanvas:g,preserveWhiteSpace:s,onSerialize:a,onIframeLoad:h,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:b,keepIframeSrcFn:M,newlyAddedElement:!1})}var Yr=new RegExp(/(max|min)-device-(width|height)/.source,"g"),io={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Yr)&&(e.params=e.params.replace(Yr,"$1-$2"))}}}},no={postcssPlugin:"postcss-hover-classes",prepare:function(){let e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
`+r.replace(/:hover/g,".\\:hover"))}))}}}},oo=q((e,t)=>{var r=String,i=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};t.exports=i(),t.exports.createColors=i}),Ce=q((e,t)=>{t.exports={}}),xr=q((e,t)=>{var r=oo(),i=Ce(),c=class Bs extends Error{constructor(f,p,m,g,v,l){super(f),this.name="CssSyntaxError",this.reason=f,v&&(this.file=v),g&&(this.source=g),l&&(this.plugin=l),typeof p!="undefined"&&typeof m!="undefined"&&(typeof p=="number"?(this.line=p,this.column=m):(this.line=p.line,this.column=p.column,this.endLine=m.line,this.endColumn=m.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Bs)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(f){if(!this.source)return"";let p=this.source;f==null&&(f=r.isColorSupported);let m=s=>s,g=s=>s,v=s=>s;if(f){let{bold:s,gray:a,red:h}=r.createColors(!0);g=y=>s(h(y)),m=y=>a(y),i&&(v=y=>i(y))}let l=p.split(/\r?\n/),o=Math.max(this.line-3,0),n=Math.min(this.line+2,l.length),u=String(n).length;return l.slice(o,n).map((s,a)=>{let h=o+1+a,y=" "+(" "+h).slice(-u)+" | ";if(h===this.line){if(s.length>160){let b=20,M=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),C=s.slice(M,x),S=m(y.replace(/\d/g," "))+s.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return g(">")+m(y)+v(C)+`
 `+S+g("^")}let w=m(y.replace(/\d/g," "))+s.slice(0,this.column-1).replace(/[^\t]/g," ");return g(">")+m(y)+v(s)+`
 `+w+g("^")}return" "+m(y)+v(s)}).join(`
`)}toString(){let f=this.showSourceCode();return f&&(f=`

`+f+`
`),this.name+": "+this.message+f}};t.exports=c,c.default=c}),Ws=q((e,t)=>{var r=/[\t\n\f\r "#'()/;[\\\]{}]/,i={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function c(v){return v[0].toUpperCase()+v.slice(1)}function d(v,l){let o="@"+l.name,n=l.params?v.rawValue(l,"params"):"",u=l.raws.afterName;return typeof u=="undefined"?u=n?" ":"":u===""&&n&&!r.test(n[0])&&(u=" "),o+u+n}function f(v){if(!v.prop.startsWith("--"))return!1;let l=v.raws.before;return typeof l=="undefined"||!/[^\s;]$/.test(l)}function p(v,l,o){let n=o.nodes,u=n.length-1;for(;u>0&&n[u].type==="comment";)u-=1;let s=v.raw(o,"semicolon"),a=o.type==="document";for(let h=n.length-1;h>=0;h--){let y=n[h],w=u!==h||s;!w&&h<n.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&f(y))&&(w=!0),l.push({document:a,node:y,semicolon:w})}}function m(v,l,o,n){let u=v.raw(o,"between","beforeOpen");v.builder(n+u+"{",o,"start");let s=o.nodes&&o.nodes.length,a=()=>{let h=s?v.raw(o,"after"):v.raw(o,"after","emptyBody");h&&v.builder(h),v.builder("}",o,"end"),o.type==="rule"&&o.raws.ownSemicolon&&v.builder(o.raws.ownSemicolon,o,"end")};s?(l.push(a),p(v,l,o)):a()}var g=class $s{constructor(l){this.builder=l}atrule(l,o){let n=d(this,l);if(l.nodes)this.block(l,n);else{let u=(l.raws.between||"")+(o?";":"");this.builder(n+u,l)}}beforeAfter(l,o){let n;l.type==="decl"?n=this.raw(l,null,"beforeDecl"):l.type==="comment"?n=this.raw(l,null,"beforeComment"):o==="before"?n=this.raw(l,null,"beforeRule"):n=this.raw(l,null,"beforeClose");let u=l.parent,s=0;for(;u&&u.type!=="root";)s+=1,u=u.parent;if(n.includes(`
`)){let a=this.raw(l,null,"indent");if(a.length)for(let h=0;h<s;h++)n+=a}return n}block(l,o){let n=this.raw(l,"between","beforeOpen");this.builder(o+n+"{",l,"start");let u;l.nodes&&l.nodes.length?(this.body(l),u=this.raw(l,"after")):u=this.raw(l,"after","emptyBody"),u&&this.builder(u),this.builder("}",l,"end")}body(l){let o=$s.prototype,n=["atrule","block","body","rule","stringify"].every(s=>this[s]===o[s]),u=[];for(p(this,u,l);u.length>0;){let s=u.pop();if(typeof s=="function"){s();continue}let a=s.node,h=this.raw(a,"before");h&&this.builder(h),n&&a.type==="rule"?m(this,u,a,this.rawValue(a,"selector")):n&&a.type==="atrule"&&a.nodes?m(this,u,a,d(this,a)):this.stringify(a,s.semicolon)}}comment(l){let o=this.raw(l,"left","commentLeft"),n=this.raw(l,"right","commentRight");this.builder("/*"+o+l.text+n+"*/",l)}decl(l,o){let n=l.raws,u=this.raw(l,"between","colon"),s=l.prop+u+this.rawValue(l,"value");l.important&&(s+=n.important||" !important"),o&&(s+=";"),this.builder(s,l)}document(l){this.body(l)}raw(l,o,n){let u;if(n||(n=o),o&&(u=l.raws[o],typeof u!="undefined"))return u;let s=l.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===l||s&&s.type==="document"))return"";if(!s)return i[n];let a=l.root(),h=a.rawCache||(a.rawCache={});if(typeof h[n]!="undefined")return h[n];if(n==="before"||n==="after")return this.beforeAfter(l,n);{let y="raw"+c(n);this[y]?u=this[y](a,l):a.walk(w=>{if(u=w.raws[o],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=i[n]),h[n]=u,u}rawBeforeClose(l){let o;return l.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return o=n.raws.after,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(l,o){let n;return l.walkComments(u=>{if(typeof u.raws.before!="undefined")return n=u.raws.before,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n=="undefined"?n=this.raw(o,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(l,o){let n;return l.walkDecls(u=>{if(typeof u.raws.before!="undefined")return n=u.raws.before,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n=="undefined"?n=this.raw(o,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(l){let o;return l.walk(n=>{if(n.type!=="decl"&&(o=n.raws.between,typeof o!="undefined"))return!1}),o}rawBeforeRule(l){let o;return l.walk(n=>{if(n.nodes&&(n.parent!==l||l.first!==n)&&typeof n.raws.before!="undefined")return o=n.raws.before,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(l){let o;return l.walkDecls(n=>{if(typeof n.raws.between!="undefined")return o=n.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(l){let o;return l.walk(n=>{if(n.nodes&&n.nodes.length===0&&(o=n.raws.after,typeof o!="undefined"))return!1}),o}rawIndent(l){if(l.raws.indent)return l.raws.indent;let o;return l.walk(n=>{let u=n.parent;if(u&&u!==l&&u.parent&&u.parent===l&&typeof n.raws.before!="undefined"){let s=n.raws.before.split(`
`);return o=s[s.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(l){let o;return l.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(o=n.raws.semicolon,typeof o!="undefined"))return!1}),o}rawValue(l,o){let n=l[o],u=l.raws[o];return u&&u.value===n?u.raw:n}root(l){!(l.parent&&l.parent.type==="document")&&l.source&&l.source.input.hasBOM&&this.builder("\uFEFF",l,"start"),this.body(l),l.raws.after&&this.builder(l.raws.after)}rule(l){this.block(l,this.rawValue(l,"selector")),l.raws.ownSemicolon&&this.builder(l.raws.ownSemicolon,l,"end")}stringify(l,o){if(!this[l.type])throw new Error("Unknown AST node type "+l.type+". Maybe you need to change PostCSS stringifier.");this[l.type](l,o)}};t.exports=g,g.default=g}),_t=q((e,t)=>{var r=Ws(),i=/(<)(\/?style\b)/gi,c=/(<)(!--)/g;function d(g){return g.includes("<")?g.replace(i,"\\3c $2").replace(c,"\\3c $2"):g}function f(g,v,l){let o=[],n=0,u=0;for(let s=0;s<g.length;s+=3){let a=u,h=n+g[s].length;for(;n<h;)v[n]===l[u]?(n+=1,u+=1):(n+=1,u+=4);o.push(l.slice(a,u))}return o}var p=class extends r{escapeHTML(g){let v=this.builder,l,o;if(this.builder=(u,s,a)=>{l?(o+=u,l.push(u,s,a)):u.includes("<")?(o=u,l=[u,s,a]):v(u,s,a)},g(),this.builder=v,!l)return;let n=d(o);if(n===o)for(let u=0;u<l.length;u+=3)v(l[u],l[u+1],l[u+2]);else{let u=f(l,o,n);for(let s=0;s<l.length;s+=3)v(u[s/3],l[s+1],l[s+2])}}root(g){g.parent&&g.parent.type==="document"?(this.escapeHTML(()=>this.body(g)),g.raws.after&&this.builder(g.raws.after)):this.escapeHTML(()=>super.root(g))}};function m(g,v){let l=new p(v);g.type==="root"||g.type==="document"?l.stringify(g):l.escapeHTML(()=>l.stringify(g))}t.exports=m,m.default=m}),Lt=q((e,t)=>{t.exports.isClean=Symbol("isClean"),t.exports.my=Symbol("my")}),kt=q((e,t)=>{var r=xr(),i=Ws(),c=_t(),{isClean:d,my:f}=Lt();function p(v,l){let o=new v.constructor,n=[[v,o,l]];for(;n.length>0;){let[u,s,a]=n.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||h==="proxyCache")continue;let y=u[h],w=typeof y;if(h==="parent"&&w==="object")a&&(s[h]=a);else if(h==="source")s[h]=y;else if(Array.isArray(y)){let b=[];s[h]=b;for(let M of y){let x=new M.constructor;b.push(x),n.push([M,x,s])}}else{if(w==="object"&&y!==null){let b=new y.constructor;n.push([y,b,void 0]),y=b}s[h]=y}}}return o}function m(v,l){if(l&&typeof l.offset!="undefined")return l.offset;let o=1,n=1,u=0;for(let s=0;s<v.length;s++){if(n===l.line&&o===l.column){u=s;break}v[s]===`
`?(o=1,n+=1):o+=1}return u}var g=class ar{get proxyOf(){return this}constructor(l={}){this.raws={},this[d]=!1,this[f]=!0;for(let o of Object.keys(l))if(o!=="__proto__")if(o==="nodes"){this.nodes=[];for(let n of l[o])typeof n.clone=="function"&&n.parent?this.append(n.clone()):this.append(n)}else this[o]=l[o]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let o=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let o in l)this[o]=l[o];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let o=p(this);for(let n in l)o[n]=l[n];return o}cloneAfter(l={}){let o=this.clone(l);return this.parent.insertAfter(this,o),o}cloneBefore(l={}){let o=this.clone(l);return this.parent.insertBefore(this,o),o}error(l,o={}){if(this.source){let{end:n,start:u}=this.rangeBy(o);return this.source.input.error(l,{column:u.column,line:u.line},{column:n.column,line:n.line},o)}return new r(l)}getProxyProcessor(){return{get(l,o){return o==="proxyOf"?l:o==="root"?()=>l.root().toProxy():l[o]},set(l,o,n){return l[o]===n||(l[o]=n,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&l.markDirty()),!0}}}markClean(){this[d]=!0}markDirty(){if(this[d]){this[d]=!1;let l=this;for(;l=l.parent;)l[d]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:m(o,this.source.start)};if(l.index)n=this.positionInside(l.index);else if(l.word){let u=o.slice(m(o,this.source.start),this.rangeBy().end.offset).indexOf(l.word);u!==-1&&(n=this.positionInside(u))}return n}positionInside(l){let o=this.source.start.column,n=this.source.start.line,u="document"in this.source.input?this.source.input.document:this.source.input.css,s=m(u,this.source.start),a=s+l;for(let h=s;h<a;h++)u[h]===`
`?(o=1,n+=1):o+=1;return{column:o,line:n,offset:a}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:m(o,this.source.start)},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:m(o,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(l.word){let s=o.slice(m(o,this.source.start),u.offset).indexOf(l.word);s!==-1&&(n=this.positionInside(s),u=this.positionInside(s+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line,offset:m(o,l.start)}:typeof l.index=="number"&&(n=this.positionInside(l.index)),l.end?u={column:l.end.column,line:l.end.line,offset:m(o,l.end)}:typeof l.endIndex=="number"?u=this.positionInside(l.endIndex):typeof l.index=="number"&&(u=this.positionInside(l.index+1));return(u.line<n.line||u.line===n.line&&u.column<=n.column)&&(u={column:n.column+1,line:n.line,offset:n.offset+1}),{end:u,start:n}}raw(l,o){return new i().raw(this,l,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let o=this,n=!1;for(let u of l)u===this?n=!0:n?(this.parent.insertAfter(o,u),o=u):this.parent.insertBefore(o,u);n||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,o){let n=o==null;o=o||new Map;let u=[],s=[[this,u,0]];for(let h=0;h<s.length;h++){let[y,w,b]=s[h],M={};w[b]=M;for(let x in y){if(!Object.prototype.hasOwnProperty.call(y,x)||x==="parent"||x==="proxyCache")continue;let C=y[x];if(Array.isArray(C)){let S=[];M[x]=S;for(let E=0;E<C.length;E++){let O=C[E];typeof O=="object"&&O.toJSON?O.toJSON===ar.prototype.toJSON?s.push([O,S,E]):S[E]=O.toJSON(null,o):S[E]=O}}else if(typeof C=="object"&&C.toJSON)C.toJSON===ar.prototype.toJSON?s.push([C,M,x]):M[x]=C.toJSON(null,o);else if(x==="source"){if(C==null)continue;let S=o.get(C.input);S==null&&(S=o.size,o.set(C.input,S)),M[x]={end:C.end,inputId:S,start:C.start}}else M[x]=C}}let a=u[0];return n&&(a.inputs=[...o.keys()].map(h=>h.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=c){l.stringify&&(l=l.stringify);let o="";return l(this,n=>{o+=n}),o}warn(l,o,n={}){let u={node:this};for(let s in n)u[s]=n[s];return l.warn(o,u)}};t.exports=g,g.default=g}),Pt=q((e,t)=>{var r=kt(),i=class extends r{constructor(c){super(c),this.type="comment"}};t.exports=i,i.default=i}),Ft=q((e,t)=>{var r=kt(),i=class extends r{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(c){c&&typeof c.value!="undefined"&&typeof c.value!="string"&&(c=ne(P({},c),{value:String(c.value)})),super(c),this.type="decl"}};t.exports=i,i.default=i}),ke=q((e,t)=>{var r=Pt(),i=Ft(),c=kt(),{isClean:d,my:f}=Lt(),p,m,g,v;function l(u){let s=u.slice();for(;s.length>0;){let a=s.pop();if(delete a.source,a.nodes){a.nodes=a.nodes.slice();for(let h of a.nodes)s.push(h)}}return u.slice()}function o(u){let s=[u];for(;s.length>0;){let a=s.pop();if(a[d]=!1,a.proxyOf.nodes)for(let h of a.proxyOf.nodes)s.push(h)}}var n=class lr extends c{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...s){for(let a of s){let h=this.normalize(a,this.last);for(let y of h)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(s){let a=[this];for(;a.length>0;){let h=a.pop();if(h!==this&&h.cleanRaws!==lr.prototype.cleanRaws){h.cleanRaws(s);continue}if(c.prototype.cleanRaws.call(h,s),h.nodes)for(let y of h.nodes)a.push(y)}}each(s){if(!this.proxyOf.nodes)return;let a=this.getIterator(),h,y;for(;this.indexes[a]<this.proxyOf.nodes.length&&(h=this.indexes[a],y=s(this.proxyOf.nodes[h],h),y!==!1);)this.indexes[a]+=1;return delete this.indexes[a],y}every(s){return this.nodes.every(s)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach;return this.indexes[s]=0,s}getProxyProcessor(){return{get(s,a){return a==="proxyOf"?s:s[a]?a==="each"||typeof a=="string"&&a.startsWith("walk")?(...h)=>s[a](...h.map(y=>typeof y=="function"?(w,b)=>y(w.toProxy(),b):y)):a==="every"||a==="some"?h=>s[a]((y,...w)=>h(y.toProxy(),...w)):a==="root"?()=>s.root().toProxy():a==="nodes"?s.nodes.map(h=>h.toProxy()):a==="first"||a==="last"?s[a].toProxy():s[a]:s[a]},set(s,a,h){return s[a]===h||(s[a]=h,(a==="name"||a==="params"||a==="selector")&&s.markDirty()),!0}}}index(s){return typeof s=="number"?s:(s.proxyOf&&(s=s.proxyOf),this.proxyOf.nodes.indexOf(s))}insertAfter(s,a){let h=this.index(s),y=this.normalize(a,this.proxyOf.nodes[h]).reverse();h=this.index(s);for(let b of y)this.proxyOf.nodes.splice(h+1,0,b);let w;for(let b in this.indexes)w=this.indexes[b],h<w&&(this.indexes[b]=w+y.length);return this.markDirty(),this}insertBefore(s,a){let h=this.index(s),y=h===0?"prepend":!1,w=this.normalize(a,this.proxyOf.nodes[h],y).reverse();h=this.index(s);for(let M of w)this.proxyOf.nodes.splice(h,0,M);let b;for(let M in this.indexes)b=this.indexes[M],h<=b&&(this.indexes[M]=b+w.length);return this.markDirty(),this}normalize(s,a){if(typeof s=="string")s=l(m(s).nodes);else if(typeof s=="undefined")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let h of s)h.parent&&h.parent.removeChild(h,"ignore")}else if(s.type==="root"&&this.type!=="document"){s=s.nodes.slice(0);for(let h of s)h.parent&&h.parent.removeChild(h,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value=="undefined")throw new Error("Value field is missed in node creation");typeof s.value!="string"&&(s.value=String(s.value)),s=[new i(s)]}else if(s.selector||s.selectors)s=[new v(s)];else if(s.name)s=[new p(s)];else if(s.text)s=[new r(s)];else throw new Error("Unknown node type in node creation");return s.map(h=>(h[f]||lr.rebuild(h),h=h.proxyOf,h.parent&&h.parent.removeChild(h),h[d]&&o(h),h.raws||(h.raws={}),typeof h.raws.before=="undefined"&&a&&typeof a.raws.before!="undefined"&&(h.raws.before=a.raws.before.replace(/\S/g,"")),h.parent=this.proxyOf,h))}prepend(...s){s=s.reverse();for(let a of s){let h=this.normalize(a,this.first,"prepend").reverse();for(let y of h)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+h.length}return this.markDirty(),this}push(s){return s.parent=this,this.proxyOf.nodes.push(s),this}removeAll(){for(let s of this.proxyOf.nodes)s.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(s){s=this.index(s),this.proxyOf.nodes[s].parent=void 0,this.proxyOf.nodes.splice(s,1);let a;for(let h in this.indexes)a=this.indexes[h],a>=s&&(this.indexes[h]=a-1);return this.markDirty(),this}replaceValues(s,a,h){return h||(h=a,a={}),this.walkDecls(y=>{a.props&&!a.props.includes(y.prop)||a.fast&&!y.value.includes(a.fast)||(y.value=y.value.replace(s,h))}),this.markDirty(),this}some(s){return this.nodes.some(s)}walk(s){if(!this.proxyOf.nodes)return;let a=[{iterator:this.getIterator(),node:this.proxyOf}];for(;a.length>0;){let{iterator:h,node:y}=a[a.length-1],w=y.indexes[h];if(w>=y.proxyOf.nodes.length){delete y.indexes[h],a.pop();let x=a[a.length-1];x&&(x.node.indexes[x.iterator]+=1);continue}let b=y.proxyOf.nodes[w],M;try{M=s(b,w)}catch(x){throw b.addToError(x)}if(M===!1){for(let x of a)delete x.node.indexes[x.iterator];return!1}b.walk&&b.proxyOf.nodes?a.push({iterator:b.getIterator(),node:b}):y.indexes[h]+=1}}walkAtRules(s,a){return a?s instanceof RegExp?this.walk((h,y)=>{if(h.type==="atrule"&&s.test(h.name))return a(h,y)}):this.walk((h,y)=>{if(h.type==="atrule"&&h.name===s)return a(h,y)}):(a=s,this.walk((h,y)=>{if(h.type==="atrule")return a(h,y)}))}walkComments(s){return this.walk((a,h)=>{if(a.type==="comment")return s(a,h)})}walkDecls(s,a){return a?s instanceof RegExp?this.walk((h,y)=>{if(h.type==="decl"&&s.test(h.prop))return a(h,y)}):this.walk((h,y)=>{if(h.type==="decl"&&h.prop===s)return a(h,y)}):(a=s,this.walk((h,y)=>{if(h.type==="decl")return a(h,y)}))}walkRules(s,a){return a?s instanceof RegExp?this.walk((h,y)=>{if(h.type==="rule"&&s.test(h.selector))return a(h,y)}):this.walk((h,y)=>{if(h.type==="rule"&&h.selector===s)return a(h,y)}):(a=s,this.walk((h,y)=>{if(h.type==="rule")return a(h,y)}))}};n.registerParse=u=>{m=u},n.registerRule=u=>{v=u},n.registerAtRule=u=>{p=u},n.registerRoot=u=>{g=u},t.exports=n,n.default=n,n.rebuild=u=>{let s=[u];for(;s.length>0;){let a=s.pop();if(a.type==="atrule"?Object.setPrototypeOf(a,p.prototype):a.type==="rule"?Object.setPrototypeOf(a,v.prototype):a.type==="decl"?Object.setPrototypeOf(a,i.prototype):a.type==="comment"?Object.setPrototypeOf(a,r.prototype):a.type==="root"&&Object.setPrototypeOf(a,g.prototype),a[f]=!0,a.nodes)for(let h of a.nodes)s.push(h)}}}),Er=q((e,t)=>{var r=ke(),i=class extends r{constructor(c){super(c),this.type="atrule"}append(...c){return this.proxyOf.nodes||(this.nodes=[]),super.append(...c)}prepend(...c){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...c)}};t.exports=i,i.default=i,r.registerAtRule(i)}),Mr=q((e,t)=>{var r=ke(),i,c,d=class extends r{constructor(f){super(P({type:"document"},f)),this.nodes||(this.nodes=[])}toResult(f={}){return new i(new c,this,f).stringify()}};d.registerLazyResult=f=>{i=f},d.registerProcessor=f=>{c=f},t.exports=d,d.default=d}),ao=q((e,t)=>{var r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",i=(d,f=21)=>(p=f)=>{let m="",g=p|0;for(;g-- >0;)m+=d[Math.random()*d.length|0];return m},c=(d=21)=>{let f="",p=d|0;for(;p-- >0;)f+=r[Math.random()*64|0];return f};t.exports={nanoid:c,customAlphabet:i}}),zs=q((e,t)=>{var{existsSync:r,readFileSync:i,realpathSync:c}=Ce(),{dirname:d,isAbsolute:f,join:p,relative:m,sep:g}=Ce(),{SourceMapConsumer:v,SourceMapGenerator:l}=Ce();function o(s){try{return c(s)}catch(a){return s}}function n(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var u=class{constructor(s,a){if(a.map===!1)return;a.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(s),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,y=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=d(this.mapFile)),y&&(this.text=y)}consumer(){return this.consumerCache||(this.consumerCache=new v(this.json||this.text)),this.consumerCache}decodeInline(s){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,y=s.match(/^data:application\/json;charset=utf-?8,/)||s.match(/^data:application\/json,/);if(y)return decodeURIComponent(s.substr(y[0].length));let w=s.match(a)||s.match(h);if(w)return n(s.substr(w[0].length));let b=s.slice(22);throw b=b.slice(0,b.indexOf(",")),new Error("Unsupported source map encoding "+b)}getAnnotationURL(s){return s.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(s){return typeof s!="object"?!1:typeof s.mappings=="string"||typeof s._mappings=="string"||Array.isArray(s.sections)}loadAnnotation(s){let a=s.match(/\/\*\s*# sourceMappingURL=/g);if(!a)return;let h=s.lastIndexOf(a.pop()),y=s.indexOf("*/",h);h>-1&&y>-1&&(this.annotation=this.getAnnotationURL(s.substring(h,y)))}loadFile(s,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(s)||!a)return;let y=m(o(d(a)),o(s));if(y===".."||y.startsWith(".."+g)||f(y))return}if(this.root=d(s),r(s))return this.mapFile=s,i(s,"utf-8").toString().trim()}loadMap(s,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(s);if(h){let y=this.loadFile(h,s,!0);if(!y)throw new Error("Unable to load previous source map: "+h.toString());return y}}else{if(a instanceof v)return l.fromSourceMap(a).toString();if(a instanceof l)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;s&&(h=p(d(s),h));let y=this.loadFile(h,s,!1);if(y)try{this.json=JSON.parse(y.replace(/^\)]}'[^\n]*\n/,""))}catch(w){return}return y}}}startWith(s,a){return s?s.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};t.exports=u,u.default=u}),Ut=q((e,t)=>{var{nanoid:r}=ao(),{isAbsolute:i,resolve:c}=Ce(),{SourceMapConsumer:d,SourceMapGenerator:f}=Ce(),{fileURLToPath:p,pathToFileURL:m}=Ce(),g=xr(),v=zs(),l=Ce(),o=Symbol("lineToIndexCache"),n=!!(d&&f),u=!!(c&&i);function s(h){if(h[o])return h[o];let y=h.css.split(`
`),w=new Array(y.length),b=0;for(let M=0,x=y.length;M<x;M++)w[M]=b,b+=y[M].length+1;return h[o]=w,w}var a=class{get from(){return this.file||this.id}constructor(h,y={}){if(h===null||typeof h=="undefined"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,y.document&&(this.document=y.document.toString()),y.from&&(!u||/^\w+:\/\//.test(y.from)||i(y.from)?this.file=y.from:this.file=c(y.from)),u&&n){let w=new v(this.css,y);if(w.text){this.map=w;let b=w.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(h,y,w,b={}){let M,x,C,S,E;if(y&&typeof y=="object"){let D=y,N=w;if(typeof D.offset=="number"){S=D.offset;let T=this.fromOffset(S);y=T.line,w=T.col}else y=D.line,w=D.column,S=this.fromLineAndColumn(y,w);if(typeof N.offset=="number"){C=N.offset;let T=this.fromOffset(C);x=T.line,M=T.col}else x=N.line,M=N.column,C=this.fromLineAndColumn(N.line,N.column)}else if(w)S=this.fromLineAndColumn(y,w);else{S=y;let D=this.fromOffset(S);y=D.line,w=D.col}let O=this.origin(y,w,x,M);return O?E=new g(h,O.endLine===void 0?O.line:{column:O.column,line:O.line},O.endLine===void 0?O.column:{column:O.endColumn,line:O.endLine},O.source,O.file,b.plugin):E=new g(h,x===void 0?y:{column:w,line:y},x===void 0?w:{column:M,line:x},this.css,this.file,b.plugin),E.input={column:w,endColumn:M,endLine:x,endOffset:C,line:y,offset:S,source:this.css},this.file&&(m&&(E.input.url=m(this.file).toString()),E.input.file=this.file),E}fromLineAndColumn(h,y){return s(this)[h-1]+y-1}fromOffset(h){let y=s(this),w=y[y.length-1],b=0;if(h>=w)b=y.length-1;else{let M=y.length-2,x;for(;b<M;)if(x=b+(M-b>>1),h<y[x])M=x-1;else if(h>=y[x+1])b=x+1;else{b=x;break}}return{col:h-y[b]+1,line:b+1}}mapResolve(h){return/^\w+:\/\//.test(h)?h:c(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,y,w,b){if(!this.map)return!1;let M=this.map.consumer(),x=M.originalPositionFor({column:y-1,line:h});if(!x.source)return!1;let C;if(typeof w=="number"){let D=M.originalPositionFor({column:b-1,line:w});D.source&&(C=D)}let S;i(x.source)?S=m(x.source):S=new URL(x.source,m(this.map.mapFile||c(".")+"/"));let E={column:x.column+1,endColumn:C&&C.column+1,endLine:C&&C.line,line:x.line,url:S.toString()};if(S.protocol==="file:")if(p)E.file=p(S);else throw new Error("file: protocol is not available in this PostCSS build");let O=M.sourceContentFor(x.source);return O&&(E.source=O),E}toJSON(){let h={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(h[y]=this[y]);return this.map&&(h.map=P({},this.map),h.map.consumerCache&&(h.map.consumerCache=void 0)),h}};t.exports=a,a.default=a,l&&l.registerInput&&l.registerInput(a)}),ft=q((e,t)=>{var r=ke(),i,c,d=class extends r{constructor(f){super(f),this.type="root",this.nodes||(this.nodes=[])}normalize(f,p,m){let g=new Set;for(let l of Array.isArray(f)?f:[f])l&&typeof l=="object"&&!l.parent&&l.raws&&typeof l.raws.before!="undefined"&&g.add(l.raws);let v=super.normalize(f);if(p){if(m==="prepend")this.nodes.length>1?p.raws.before=this.nodes[1].raws.before:delete p.raws.before;else if(this.first!==p)for(let l of v)g.has(l.raws)||(l.raws.before=p.raws.before)}return v}removeChild(f,p){let m=this.index(f);return!p&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(f)}toResult(f={}){return new i(new c,this,f).stringify()}};d.registerLazyResult=f=>{i=f},d.registerProcessor=f=>{c=f},t.exports=d,d.default=d,r.registerRoot(d)}),js=q((e,t)=>{var r={comma(i){return r.split(i,[","],!0)},space(i){return r.split(i,[" ",`
`,"	"])},split(i,c,d){if(typeof i!="string")return[];let f=[],p="",m=!1,g=0,v=!1,l="",o=!1,n=!1;for(let s=0;s<i.length;s++){let a=i[s];if(n){p+=a,a==="*"&&i[s+1]==="/"&&(p+="/",s+=1,n=!1);continue}if(o)o=!1;else if(a==="\\")o=!0;else if(v)a===l&&(v=!1);else if(a==='"'||a==="'")v=!0,l=a;else if(a==="/"&&i[s+1]==="*"){p+="/*",s+=1,n=!0;continue}else a==="("?g+=1:a===")"?g>0&&(g-=1):g===0&&c.includes(a)&&(m=!0);if(m){let h=p.trim();(d||h!=="")&&f.push(h),p="",m=!1}else p+=a}let u=p.trim();return(d||u!=="")&&f.push(u),f}};t.exports=r,r.default=r}),Rr=q((e,t)=>{var r=ke(),i=js(),c=class extends r{get selectors(){return i.comma(this.selector)}set selectors(d){let f=this.selector?this.selector.match(/,\s*/):null,p=f?f[0]:","+this.raw("between","beforeOpen");this.selector=d.join(p)}constructor(d){super(d),this.type="rule",this.nodes||(this.nodes=[])}};t.exports=c,c.default=c,r.registerRule(c)}),lo=q((e,t)=>{var r=Er(),i=Pt(),c=Ft(),d=Ut(),f=zs(),p=ft(),m=Rr();function g(o,n){return o.inputs?o.inputs.map(u=>{let s=ne(P({},u),{__proto__:d.prototype});return s.map&&(s.map=ne(P({},s.map),{__proto__:f.prototype})),s}):n}function v(o,n,u){let s=P({},o);if(delete s.inputs,delete s.nodes,s.source){let h=s.source,{inputId:y}=h,w=mt(h,["inputId"]);s.source=w,y!=null&&(s.source.input=n[y])}let a;if(s.type==="root")a=new p(s);else if(s.type==="decl")a=new c(s);else if(s.type==="rule")a=new m(s);else if(s.type==="comment")a=new i(s);else if(s.type==="atrule")a=new r(s);else throw new Error("Unknown node type: "+o.type);if(u){a.nodes=u;for(let y of u)y.parent=a}return a}function l(o,n){if(Array.isArray(o))return o.map(a=>l(a));let u,s=[{childIndex:0,children:[],inputs:g(o,n),json:o}];for(;s.length>0;){let a=s[s.length-1],h=a.json.nodes;if(h&&a.childIndex<h.length){let w=h[a.childIndex];a.childIndex+=1,s.push({childIndex:0,children:[],inputs:g(w,a.inputs),json:w});continue}s.pop();let y=v(a.json,a.inputs,h?a.children:void 0);s.length>0?s[s.length-1].children.push(y):u=y}return u}t.exports=l,l.default=l}),Vs=q((e,t)=>{var{dirname:r,relative:i,resolve:c,sep:d}=Ce(),{SourceMapConsumer:f,SourceMapGenerator:p}=Ce(),{pathToFileURL:m}=Ce(),g=Ut(),v=!!(f&&p),l=!!(r&&c&&i&&d),o=class{constructor(n,u,s,a){this.stringify=n,this.mapOpts=s.map||{},this.root=u,this.opts=s,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let n;this.isInline()?n="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?n=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?n=this.mapOpts.annotation(this.opts.to,this.root):n=this.outputFile()+".map";let u=`
`;this.css.includes(`\r
`)&&(u=`\r
`),this.css+=u+"/*# sourceMappingURL="+n+" */"}applyPrevMaps(){for(let n of this.previous()){let u=this.toUrl(this.path(n.file)),s=n.root||r(n.file),a;this.mapOpts.sourcesContent===!1?(a=new f(n.text),a.sourcesContent&&(a.sourcesContent=null)):a=n.consumer(),this.map.applySourceMap(a,u,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let n;for(let u=this.root.nodes.length-1;u>=0;u--)n=this.root.nodes[u],n.type==="comment"&&n.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(u)}else if(this.css){let n="/*# sourceMappingURL=",u="",s=0,a;for(;(a=this.css.indexOf(n,s))!==-1;){let h=this.css.indexOf("*/",a+21);if(h===-1)break;for(;a>s&&this.css[a-1]===`
`;)a--;u+=this.css.slice(s,a),s=h+2}s>0&&(this.css=u+this.css.slice(s))}}}generate(){if(this.clearAnnotation(),l&&v&&this.isMap())return this.generateMap();{let n="";return this.stringify(this.root,u=>{n+=u}),[n]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let n=this.previous()[0].consumer();n.file=this.outputFile(),this.map=p.fromSourceMap(n,{ignoreInvalidMapping:!0})}else this.map=new p({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new p({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,u=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},h,y;this.stringify(this.root,(w,b,M)=>{if(this.css+=w,b&&M!=="end"&&(a.generated.line=n,a.generated.column=u-1,b.source&&b.source.start?(a.source=this.sourcePath(b),a.original.line=b.source.start.line,a.original.column=b.source.start.column-1,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,this.map.addMapping(a))),y=w.match(/\n/g),y?(n+=y.length,h=w.lastIndexOf(`
`),u=w.length-h):u+=w.length,b&&M!=="start"){let x=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==x.last||x.raws.semicolon)&&(b.source&&b.source.end?(a.source=this.sourcePath(b),a.original.line=b.source.end.line,a.original.column=b.source.end.column-1,a.generated.line=n,a.generated.column=u-2,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=u-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(n=>n.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let n=this.mapOpts.annotation;return typeof n!="undefined"&&n!==!0?!1:this.previous().length?this.previous().some(u=>u.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(n=>n.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;let u=this.memoizedPaths.get(n);if(u)return u;let s=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=r(c(s,this.mapOpts.annotation)));let a=i(s,n);return this.memoizedPaths.set(n,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(n=>{if(n.source&&n.source.input.map){let u=n.source.input.map;this.previousMaps.includes(u)||this.previousMaps.push(u)}});else{let n=new g(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps}setSourcesContent(){let n={};if(this.root)this.root.walk(u=>{if(u.source){let s=u.source.input.from;if(s&&!n[s]){n[s]=!0;let a=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(a,u.source.input.css)}}});else if(this.css){let u=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(u,this.css)}}sourcePath(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))}toBase64(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))}toFileUrl(n){let u=this.memoizedFileURLs.get(n);if(u)return u;if(m){let s=m(n).toString();return this.memoizedFileURLs.set(n,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(n){let u=this.memoizedURLs.get(n);if(u)return u;d==="\\"&&(n=n.replace(/\\/g,"/"));let s=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,s),s}};t.exports=o}),uo=q((e,t)=>{var r=39,i=34,c=92,d=47,f=10,p=32,m=12,g=9,v=13,l=91,o=93,n=40,u=41,s=123,a=125,h=59,y=42,w=58,b=64,M=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,S=/[\da-f]/i;t.exports=function(O,D={}){let N=O.css.valueOf(),T=D.ignoreErrors,k,fe,G,I,oe,U,ee,ae,re,Ee,Me=N.length,A=0,Re=[],le=[],he=-1;function Ue(){return A}function me(J){throw O.error("Unclosed "+J,A)}function j(){return le.length===0&&A>=Me}function de(J){if(le.length)return le.pop();if(A>=Me)return;let se=J?J.ignoreUnclosed:!1;switch(k=N.charCodeAt(A),k){case f:case p:case g:case v:case m:I=A;do I+=1,k=N.charCodeAt(I);while(k===p||k===f||k===g||k===v||k===m);U=["space",N.slice(A,I)],A=I-1;break;case l:case o:case s:case a:case w:case h:case u:{let ie=String.fromCharCode(k);U=[ie,ie,A];break}case n:if(Ee=Re.length?Re.pop()[1]:"",re=N.charCodeAt(A+1),Ee==="url"&&re!==r&&re!==i&&re!==p&&re!==f&&re!==g&&re!==m&&re!==v){I=A;do{if(ee=!1,I=N.indexOf(")",I+1),I===-1)if(T||se){I=A;break}else me("bracket");for(ae=I;N.charCodeAt(ae-1)===c;)ae-=1,ee=!ee}while(ee);U=["brackets",N.slice(A,I+1),A,I],A=I}else A<=he?U=["(","(",A]:(I=N.indexOf(")",A+1),fe=N.slice(A,I+1),I===-1||C.test(fe)?(he=I===-1?Me:I,U=["(","(",A]):(U=["brackets",fe,A,I],A=I));break;case r:case i:oe=k===r?"'":'"',I=A;do{if(ee=!1,I=N.indexOf(oe,I+1),I===-1)if(T||se){I=A+1;break}else me("string");for(ae=I;N.charCodeAt(ae-1)===c;)ae-=1,ee=!ee}while(ee);U=["string",N.slice(A,I+1),A,I],A=I;break;case b:M.lastIndex=A+1,M.test(N),M.lastIndex===0?I=N.length-1:I=M.lastIndex-2,U=["at-word",N.slice(A,I+1),A,I],A=I;break;case c:for(I=A,G=!0;N.charCodeAt(I+1)===c;)I+=1,G=!G;if(k=N.charCodeAt(I+1),G&&k!==d&&k!==p&&k!==f&&k!==g&&k!==v&&k!==m&&(I+=1,S.test(N.charAt(I)))){for(;S.test(N.charAt(I+1));)I+=1;N.charCodeAt(I+1)===p&&(I+=1)}U=["word",N.slice(A,I+1),A,I],A=I;break;default:k===d&&N.charCodeAt(A+1)===y?(I=N.indexOf("*/",A+2)+1,I===0&&(T||se?I=N.length:me("comment")),U=["comment",N.slice(A,I+1),A,I],A=I):(x.lastIndex=A+1,x.test(N),x.lastIndex===0?I=N.length-1:I=x.lastIndex-2,U=["word",N.slice(A,I+1),A,I],Re.push(U),A=I)}return A++,U}function B(J){le.push(J)}return{back:B,endOfFile:j,nextToken:de,position:Ue}}}),co=q((e,t)=>{var r=Er(),i=Pt(),c=Ft(),d=ft(),f=Rr(),p=uo(),m={empty:!0,space:!0};function g(o){for(let n=o.length-1;n>=0;n--){let u=o[n],s=u[3]||u[2];if(s)return s}}function v(o,n,u){let s="";for(let a=n;a<u;a++)s+=o[a][1];return s}var l=class{constructor(o){this.input=o,this.root=new d,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let n=new r;n.name=o[1].slice(1),n.name===""&&this.unnamedAtrule(n,o),this.init(n,o[2]);let u,s,a,h=!1,y=!1,w=[],b=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),u=o[0],u==="("||u==="["?b.push(u==="("?")":"]"):u==="{"&&b.length>0?b.push("}"):u===b[b.length-1]&&b.pop(),b.length===0)if(u===";"){n.source.end=this.getPosition(o[2]),n.source.end.offset++,this.semicolon=!0;break}else if(u==="{"){y=!0;break}else if(u==="}"){if(w.length>0){for(a=w.length-1,s=w[a];s&&s[0]==="space";)s=w[--a];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(o);break}else w.push(o);else w.push(o);if(this.tokenizer.endOfFile()){h=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(n.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(n,"params",w),h&&(o=w[w.length-1],n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),y&&(n.nodes=[],this.current=n)}checkMissedSemicolon(o){let n=this.colon(o);if(n===!1)return;let u=0,s;for(let a=n-1;a>=0&&(s=o[a],!(s[0]!=="space"&&(u+=1,u===2)));a--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(o){let n=0,u,s,a;for(let[h,y]of o.entries()){if(s=y,a=s[0],a==="("&&(n+=1),a===")"&&(n-=1),n===0&&a===":")if(!u)this.doubleColon(s);else{if(u[0]==="word"&&u[1]==="progid")continue;return h}u=s}return!1}comment(o){let n=new i;this.init(n,o[2]),n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++;let u=o[1].slice(2,-2);if(!u.trim())n.text="",n.raws.left=u,n.raws.right="";else{let s=u.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=p(this.input)}decl(o,n){let u=new c;this.init(u,o[0][2]);let s=o[o.length-1];s[0]===";"&&(this.semicolon=!0,o.pop()),u.source.end=this.getPosition(s[3]||s[2]||g(o)),u.source.end.offset++;let a=0;for(;o[a][0]!=="word";)a===o.length-1&&this.unknownWord([o[a]]),a++;u.raws.before+=v(o,0,a),u.source.start=this.getPosition(o[a][2]);let h=a;for(;a<o.length;){let x=o[a][0];if(x===":"||x==="space"||x==="comment")break;a++}u.prop=v(o,h,a);let y=a,w;for(;a<o.length&&(w=o[a],a++,w[0]!==":");)w[0]==="word"&&/\w/.test(w[1])&&this.unknownWord([w]);u.raws.between=v(o,y,a),(u.prop[0]==="_"||u.prop[0]==="*")&&(u.raws.before+=u.prop[0],u.prop=u.prop.slice(1));let b=a;for(;a<o.length;){let x=o[a][0];if(x!=="space"&&x!=="comment")break;a++}let M=o.slice(b,a);o=o.slice(a),this.precheckMissedSemicolon(o);for(let x=o.length-1;x>=0;x--){if(w=o[x],w[1].toLowerCase()==="!important"){u.important=!0;let C=this.stringFrom(o,x);C=this.spacesFromEnd(o)+C,C!==" !important"&&(u.raws.important=C);break}else if(w[1].toLowerCase()==="important"){let C=o.slice(0),S="";for(let E=x;E>0;E--){let O=C[E][0];if(S.trim().startsWith("!")&&O!=="space")break;S=C.pop()[1]+S}S.trim().startsWith("!")&&(u.important=!0,u.raws.important=S,o=C)}if(w[0]!=="space"&&w[0]!=="comment")break}o.some(x=>x[0]!=="space"&&x[0]!=="comment")&&(u.raws.between+=M.map(x=>x[1]).join(""),M=[]),this.raw(u,"value",M.concat(o),n),u.value.includes(":")&&!n&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let n=new f;this.init(n,o[2]),n.selector="",n.raws.between="",this.current=n}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(o[2]),n.source.end.offset++)}}getPosition(o){let n=this.input.fromOffset(o);return{column:n.col,line:n.line,offset:o}}init(o,n){this.current.push(o),o.source={input:this.input,start:this.getPosition(n)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let n=!1,u=null,s=!1,a=null,h=[],y=o[1].startsWith("--"),w=[],b=o;for(;b;){if(u=b[0],w.push(b),u==="("||u==="[")a||(a=b),h.push(u==="("?")":"]");else if(y&&s&&u==="{")a||(a=b),h.push("}");else if(h.length===0)if(u===";")if(s){this.decl(w,y);return}else break;else if(u==="{"){this.rule(w);return}else if(u==="}"){this.tokenizer.back(w.pop()),n=!0;break}else u===":"&&(s=!0);else u===h[h.length-1]&&(h.pop(),h.length===0&&(a=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),h.length>0&&this.unclosedBracket(a),n&&s){if(!y)for(;w.length&&(b=w[w.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,y)}else this.unknownWord(w)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o)}this.endFile()}precheckMissedSemicolon(){}raw(o,n,u,s){let a,h,y=u.length,w="",b="",M=!0,x,C;for(let S=0;S<y;S+=1)a=u[S],h=a[0],h==="space"&&S===y-1&&!s?M=!1:h==="comment"?(C=u[S-1]?u[S-1][0]:"empty",x=u[S+1]?u[S+1][0]:"empty",!m[C]&&!m[x]?b===","?M=!1:(w+=a[1],b=a[1].slice(-1)):M=!1):(w+=a[1],b=a[1].slice(-1));if(!M){let S=u.reduce((E,O)=>E+O[1],"");o.raws[n]={raw:S,value:w}}o[n]=w}rule(o){o.pop();let n=new f;this.init(n,o[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(n,"selector",o),this.current=n}spacesAndCommentsFromEnd(o){let n,u="";for(;o.length&&(n=o[o.length-1][0],!(n!=="space"&&n!=="comment"));)u=o.pop()[1]+u;return u}spacesAndCommentsFromStart(o){let n,u="";for(;o.length&&(n=o[0][0],!(n!=="space"&&n!=="comment"));)u+=o.shift()[1];return u}spacesFromEnd(o){let n,u="";for(;o.length&&(n=o[o.length-1][0],n==="space");)u=o.pop()[1]+u;return u}stringFrom(o,n){let u="";for(let s=n;s<o.length;s++)u+=o[s][1];return o.splice(n,o.length-n),u}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};t.exports=l}),Or=q((e,t)=>{var r=ke(),i=Ut(),c=co();function d(f,p){let m=new c(new i(f,p));try{m.parse()}catch(g){throw g}return m.root}t.exports=d,d.default=d,r.registerParse(d)}),Gs=q((e,t)=>{var r=ke(),{my:i}=Lt(),c=class{constructor(d,f={}){if(this.type="warning",this.text=d,f.node&&f.node.source){f.node[i]||r.rebuild(f.node);let p=f.node.rangeBy(f);this.line=p.start.line,this.column=p.start.column,this.endLine=p.end.line,this.endColumn=p.end.column}for(let p in f)this[p]=f[p]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,start:this.start,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};t.exports=c,c.default=c}),Nr=q((e,t)=>{var r=Gs(),i=class{get content(){return this.css}constructor(c,d,f){this.processor=c,this.messages=[],this.root=d,this.opts=f,this.css="",this.map=void 0}toString(){return this.css}warn(c,d={}){d.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(d.plugin=this.lastPlugin.postcssPlugin);let f=new r(c,d);return this.messages.push(f),f}warnings(){return this.messages.filter(c=>c.type==="warning")}};t.exports=i,i.default=i}),Hs=q((e,t)=>{var r={};t.exports=function(c){r[c]||(r[c]=!0,typeof console!="undefined"&&console.warn&&console.warn(c))}}),qs=q((e,t)=>{var r=ke(),i=Mr(),c=Vs(),d=Or(),f=Nr(),p=ft(),m=_t(),{isClean:g,my:v}=Lt(),l=Hs(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},n={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},u={Once:!0,postcssPlugin:!0,prepare:!0},s=0;function a(x){return typeof x=="object"&&typeof x.then=="function"}function h(x){let C=!1,S=o[x.type];return x.type==="decl"?C=x.prop.toLowerCase():x.type==="atrule"&&(C=x.name.toLowerCase()),C&&x.append?[S,S+"-"+C,s,S+"Exit",S+"Exit-"+C]:C?[S,S+"-"+C,S+"Exit",S+"Exit-"+C]:x.append?[S,s,S+"Exit"]:[S,S+"Exit"]}function y(x){let C;return x.type==="document"?C=["Document",s,"DocumentExit"]:x.type==="root"?C=["Root",s,"RootExit"]:C=h(x),{eventIndex:0,events:C,iterator:0,node:x,visitorIndex:0,visitors:[]}}function w(x){let C=[x];for(;C.length>0;){let S=C.pop();if(S[g]=!1,S.nodes)for(let E of S.nodes)C.push(E)}return x}var b={},M=class Ys{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"}constructor(C,S,E){this.stringified=!1,this.processed=!1;let O;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))O=w(S);else if(S instanceof Ys||S instanceof f)O=w(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let D=d;E.syntax&&(D=E.syntax.parse),E.parser&&(D=E.parser),D.parse&&(D=D.parse);try{O=D(S,E)}catch(N){this.processed=!0,this.error=N}O&&!O[v]&&r.rebuild(O)}this.result=new f(C,O,E),this.helpers=ne(P({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(D=>typeof D=="object"&&D.prepare?P(P({},D),D.prepare(this.result)):D)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(C){return this.async().catch(C)}finally(C){return this.async().finally(C)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(C,S){let E=this.result.lastPlugin;try{S&&S.addToError(C),this.error=C,C.name==="CssSyntaxError"&&!C.plugin?(C.plugin=E.postcssPlugin,C.setMessage()):E.postcssVersion}catch(O){console&&console.error&&console.error(O)}return C}prepareVisitors(){this.listeners={};let C=(S,E,O)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,O])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!n[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u[E])if(typeof S[E]=="object")for(let O in S[E])O==="*"?C(S,E,S[E][O]):C(S,E+"-"+O.toLowerCase(),S[E][O]);else typeof S[E]=="function"&&C(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let C=0;C<this.plugins.length;C++){let S=this.plugins[C],E=this.runOnRoot(S);if(a(E))try{await E}catch(O){throw this.handleError(O)}}if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[g];){C[g]=!0;let S=[y(C)];for(;S.length>0;){let E=this.visitTick(S);if(a(E))try{await E}catch(O){let D=S[S.length-1].node;throw this.handleError(O,D)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(C.type==="document"){let O=C.nodes.map(D=>E(D,this.helpers));await Promise.all(O)}else await E(C,this.helpers)}catch(O){throw this.handleError(O)}}}return this.processed=!0,this.stringify()}runOnRoot(C){this.result.lastPlugin=C;try{if(typeof C=="object"&&C.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>C.Once(E,this.helpers));return a(S[0])?Promise.all(S):S}return C.Once(this.result.root,this.helpers)}else if(typeof C=="function")return C(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let C=this.result.opts,S=m;C.syntax&&(S=C.syntax.stringify),C.stringifier&&(S=C.stringifier),S.stringify&&(S=S.stringify);let E=this.result.root.source;if(C.map===void 0&&!(E&&E.input&&E.input.map)){let D="";return S(this.result.root,N=>{D+=N}),this.result.css=D,this.result}let O=new c(S,this.result.root,this.result.opts).generate();return this.result.css=O[0],this.result.map=O[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let C of this.plugins)if(a(this.runOnRoot(C)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[g];)C[g]=!0,this.walkSync(C);if(this.listeners.OnceExit)if(C.type==="document")for(let S of C.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,C)}return this.result}then(C,S){return this.async().then(C,S)}toString(){return this.css}visitSync(C,S){for(let[E,O]of C){this.result.lastPlugin=E;let D;try{D=O(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(a(D))throw this.getAsyncError()}}visitTick(C){let S=C[C.length-1],{node:E,visitors:O}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){C.pop();return}if(O.length>0&&S.visitorIndex<O.length){let[N,T]=O[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===O.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return T(E.toProxy(),this.helpers)}catch(k){throw this.handleError(k,E)}}if(S.iterator!==0){let N=S.iterator;S.descending&&(S.descending=!1,E.indexes[N]+=1);let T;for(;T=E.nodes[E.indexes[N]];){if(!T[g]){T[g]=!0,S.descending=!0,C.push(y(T));return}E.indexes[N]+=1}S.iterator=0,delete E.indexes[N]}let D=S.events;for(;S.eventIndex<D.length;){let N=D[S.eventIndex];if(S.eventIndex+=1,N===s){E.nodes&&E.nodes.length&&(E[g]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}C.pop()}walkSync(C){C[g]=!0;let S=[{eventIndex:0,events:h(C),iterator:0,node:C}];for(;S.length>0;){let E=S[S.length-1],O=E.node;if(E.iterator!==0){let D=E.iterator;E.descending&&(E.descending=!1,O.indexes[D]+=1);let N,T=!1;for(;N=O.nodes[O.indexes[D]];){if(!N[g]){N[g]=!0,E.descending=!0,S.push({eventIndex:0,events:h(N),iterator:0,node:N}),T=!0;break}O.indexes[D]+=1}if(T)continue;E.iterator=0,delete O.indexes[D]}if(E.eventIndex<E.events.length){let D=E.events[E.eventIndex];if(E.eventIndex+=1,D===s)O.nodes&&O.nodes.length&&(E.iterator=O.getIterator());else{let N=this.listeners[D];N&&this.visitSync(N,O.toProxy())&&S.pop()}continue}S.pop()}}warnings(){return this.sync().warnings()}};M.registerPostcss=x=>{b=x},t.exports=M,M.default=M,p.registerLazyResult(M),i.registerLazyResult(M)}),fo=q((e,t)=>{var r=Vs(),i=Or(),c=Nr(),d=_t(),f=Hs(),p=class{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 m,g=i;try{m=g(this._css,this._opts)}catch(v){this.error=v}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(m,g,v){g=g.toString(),this.stringified=!1,this._processor=m,this._css=g,this._opts=v,this._map=void 0;let l=d;this.result=new c(this._processor,void 0,this._opts),this.result.css=g;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new r(l,void 0,this._opts,g);if(n.isMap()){let[u,s]=n.generate();u&&(this.result.css=u),s&&(this.result.map=s)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().finally(m)}sync(){if(this.error)throw this.error;return this.result}then(m,g){return this.async().then(m,g)}toString(){return this._css}warnings(){return[]}};t.exports=p,p.default=p}),ho=q((e,t)=>{var r=Mr(),i=qs(),c=fo(),d=ft(),f=class{constructor(p=[]){this.version="8.5.32",this.plugins=this.normalize(p)}normalize(p){let m=[];for(let g of p)if(g.postcss===!0?g=g():g.postcss&&(g=g.postcss),typeof g=="object"&&Array.isArray(g.plugins))m=m.concat(g.plugins);else if(typeof g=="object"&&g.postcssPlugin)m.push(g);else if(typeof g=="function")m.push(g);else if(!(typeof g=="object"&&(g.parse||g.stringify)))throw new Error(g+" is not a PostCSS plugin");return m}process(p,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new c(this,p,m):new i(this,p,m)}use(p){return this.plugins=this.plugins.concat(this.normalize([p])),this}};t.exports=f,f.default=f,d.registerProcessor(f),r.registerProcessor(f)}),Z=on(q((e,t)=>{var r=Er(),i=Pt(),c=ke(),d=xr(),f=Ft(),p=Mr(),m=lo(),g=Ut(),v=qs(),l=js(),o=kt(),n=Or(),u=ho(),s=Nr(),a=ft(),h=Rr(),y=_t(),w=Gs();function b(...M){return M.length===1&&Array.isArray(M[0])&&(M=M[0]),new u(M)}b.plugin=function(x,C){let S=!1;function E(...D){console&&console.warn&&!S&&(S=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("zh")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
https://www.w3ctech.com/topic/2226`));let N=C(...D);return N.postcssPlugin=x,N.postcssVersion=new u().version,N}let O;return Object.defineProperty(E,"postcss",{get(){return O||(O=E()),O}}),E.process=function(D,N,T){return b([E(T)]).process(D,N)},E},b.stringify=y,b.parse=n,b.fromJSON=m,b.list=l,b.comment=M=>new i(M),b.atRule=M=>new r(M),b.decl=M=>new f(M),b.rule=M=>new h(M),b.root=M=>new a(M),b.document=M=>new p(M),b.CssSyntaxError=d,b.Declaration=f,b.Container=c,b.Processor=u,b.Document=p,b.Comment=i,b.Warning=w,b.AtRule=r,b.Result=s,b.Input=g,b.Rule=h,b.Root=a,b.Node=o,v.registerPostcss(b),t.exports=b,b.default=b})(),1),po=Z.default;Z.default.stringify;Z.default.fromJSON;Z.default.plugin;Z.default.parse;Z.default.list;Z.default.document;Z.default.comment;Z.default.atRule;Z.default.rule;Z.default.decl;Z.default.root;Z.default.CssSyntaxError;Z.default.Declaration;Z.default.Container;Z.default.Processor;Z.default.Document;Z.default.Comment;Z.default.Warning;Z.default.AtRule;Z.default.Result;Z.default.Input;Z.default.Rule;Z.default.Root;Z.default.Node;var Jr={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function mo(e){let t=Jr[e.tagName]?Jr[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Bt(e,t){let r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let i=e;try{i=po([io,no]).process(e).css}catch(c){console.warn("Failed to adapt css for replay",c)}return t==null||t.stylesWithHoverClass.set(e,i),i}function Xr(){return{stylesWithHoverClass:new Map}}var go="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",Qr="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",Js=new WeakSet;function yo(e){if(!e||e.tagName!=="IFRAME"||!("sandbox"in e))return!1;let t=Array.from(e.sandbox);return t.length===1&&t[0]==="allow-same-origin"}function vo(e){if(e.UNSAFE_allowUnprotectedRebuild)return;let t=e.doc.defaultView;if(t&&!(Js.has(e.doc)&&yo(t.frameElement)))throw new Error(go)}function wo(e,t,r,i){let c=[];for(let g of e.childNodes)g.type===W.Text&&c.push(g);let d=t.split("/* rr_split */");for(;d.length>1&&d.length>c.length;)d.splice(-2,2,d.slice(-2).join(""));let f="";r&&(f=Bt(d.join(""),i));let p=0,m=-1;for(let g=0;g<c.length&&g!==d.length;g++){let v=c[g],l=d[g],o=g<d.length-1?d[g+1]:null;if(r&&o){let n=p,u=o.length;u=Math.min(u,30);let s=!1;for(;u>2;u--){let a=o.substring(0,u),h=f.substring(p).indexOf(a);if(s=h!==-1,s){n+=h;break}}s||(n+=l.length),l=f.substring(p,n),p=n}else r&&(l=f.substring(p));m!==-1&&(l=l.substring(m)),o&&(m!==-1||l.endsWith("0p")&&o.startsWith("x"))&&(m=o.indexOf("}"),m!==-1&&(m+=1,l+=o.substring(0,m))),v.textContent=l}}function bo(e,t,r,i){let{doc:c,hackCss:d,cache:f}=i;e.childNodes.length?wo(e,r,d,f):(d&&(r=Bt(r,f)),t.appendChild(c.createTextNode(r)))}function So(e,t){var d;let{doc:r,hackCss:i,cache:c}=t;switch(e.type){case W.Document:return r.implementation.createDocument(null,"",null);case W.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case W.Element:{let f=mo(e),p;e.isSVG?p=r.createElementNS("http://www.w3.org/2000/svg",f):(e.isCustom&&((d=r.defaultView)!=null&&d.customElements)&&!r.defaultView.customElements.get(e.tagName)&&r.defaultView.customElements.define(e.tagName,class extends r.defaultView.HTMLElement{}),p=r.createElement(f));let m={};for(let g in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,g))continue;let v=e.attributes[g];if(!(f==="option"&&g==="selected"&&v===!1)&&v!==null){if(v===!0&&(v=""),g.startsWith("rr_")){m[g]=v;continue}if(typeof v=="string"){if(f==="style"&&g==="_cssText"){bo(e,p,v,t);continue}else if(f==="textarea"&&g==="value"){p.appendChild(r.createTextNode(v)),e.childNodes=[];continue}}try{if(e.isSVG&&g==="xlink:href")p.setAttributeNS("http://www.w3.org/1999/xlink",g,v.toString());else if(g==="onload"||g==="onclick"||g.substring(0,7)==="onmouse")p.setAttribute("_"+g,v.toString());else if(f==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&g==="content"){p.setAttribute("csp-content",v.toString());continue}else f==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||f==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Sr(e.attributes.href)==="js"||(f==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?p.setAttribute("rrweb-original-srcset",e.attributes.srcset):p.setAttribute(g,v.toString()))}catch(l){}}}for(let g in m){let v=m[g];if(f==="canvas"&&g==="rr_dataURL"){let l=r.createElement("img");l.onload=()=>{let o=p.getContext("2d");o&&o.drawImage(l,0,0,l.width,l.height)},l.src=v.toString(),p.RRNodeType&&(p.rr_dataURL=v.toString())}else if(f==="img"&&g==="rr_dataURL"){let l=p;l.currentSrc.startsWith("data:")||(l.setAttribute("rrweb-original-src",e.attributes.src),l.src=v.toString())}if(g==="rr_width")p.style.setProperty("width",v.toString());else if(g==="rr_height")p.style.setProperty("height",v.toString());else if(g==="rr_mediaCurrentTime"&&typeof v=="number")p.currentTime=v;else if(g==="rr_mediaState")switch(v){case"played":p.play().catch(l=>console.warn("media playback error",l));break;case"paused":p.pause()}else g==="rr_mediaPlaybackRate"&&typeof v=="number"?p.playbackRate=v:g==="rr_mediaMuted"&&typeof v=="boolean"?p.muted=v:g==="rr_mediaLoop"&&typeof v=="boolean"?p.loop=v:g==="rr_mediaVolume"&&typeof v=="number"?p.volume=v:g==="rr_open_mode"&&p.setAttribute("rr_open_mode",v)}if(e.isShadowHost)if(!p.shadowRoot)p.attachShadow({mode:"open"});else for(;p.shadowRoot.firstChild;)p.shadowRoot.removeChild(p.shadowRoot.firstChild);return(f==="input"||f==="textarea")&&p.setAttribute("autocomplete","off"),p}case W.Text:return e.isStyle&&i?r.createTextNode(Bt(e.textContent,c)):r.createTextNode(e.textContent);case W.CDATA:return r.createCDATASection(e.textContent);case W.Comment:return r.createComment(e.textContent);default:return null}}function nt(e,t){let{doc:r,mirror:i,skipChild:c=!1,hackCss:d=!0,afterAppend:f,cache:p}=t;if(i.has(e.id)){let g=i.getNode(e.id);if(Tn(i.getMeta(g),e))return i.getNode(e.id)}let m=So(e,{doc:r,hackCss:d,cache:p});if(!m)return null;if(e.rootId&&i.getNode(e.rootId)!==r&&i.replace(e.rootId,r),e.type===W.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==W.DocumentType&&(e.childNodes[0].type===W.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=r),i.add(m,e),(e.type===W.Document||e.type===W.Element)&&!c)for(let g of e.childNodes){let v=nt(g,{doc:r,mirror:i,skipChild:!1,hackCss:d,afterAppend:f,cache:p});if(!v){console.warn("Failed to rebuild",g);continue}if(g.isShadow&&wr(m)&&m.shadowRoot)m.shadowRoot.appendChild(v);else if(e.type===W.Document&&g.type==W.Element){let l=v,o=null;l.childNodes.forEach(n=>{n.nodeName==="BODY"&&(o=n)}),o?(l.removeChild(o),m.appendChild(v),l.appendChild(o)):m.appendChild(v)}else m.appendChild(v);f&&f(v,g.id)}return m}function Co(e,t){function r(i){t(i)}for(let i of e.getIds())e.has(i)&&r(e.getNode(i))}function xo(e,t){let r=t.getMeta(e);if((r==null?void 0:r.type)!==W.Element)return;let i=e;for(let c in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,c)&&c.startsWith("rr_")))continue;let d=r.attributes[c];c==="rr_scrollLeft"&&(i.scrollLeft=d),c==="rr_scrollTop"&&(i.scrollTop=d)}}function Eo(e,t){vo(t);let{doc:r,onVisit:i,hackCss:c=!0,afterAppend:d,cache:f,mirror:p=new br}=t,m=nt(e,{doc:r,mirror:p,skipChild:!1,hackCss:c,afterAppend:d,cache:f});return Co(p,g=>{i&&i(g),xo(g,p)}),m}function Mo(e){var i;if(!e.root.isConnected)throw new Error(Qr);let t=e.root.ownerDocument.createElement("iframe");for(let[c,d]of Object.entries(e.iframeAttributes||{}))c!=="sandbox"&&t.setAttribute(c,d);t.setAttribute("sandbox","allow-same-origin"),e.root.appendChild(t);let r=t.contentDocument;if(!r||!t.contentWindow)throw(i=t.parentNode)==null||i.removeChild(t),new Error(Qr);return Js.add(r),t}var Ro=Object.create,Xs=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,No=Object.getOwnPropertyNames,Io=Object.getPrototypeOf,Qs=Object.prototype.hasOwnProperty,Y=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),Do=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var c=No(t),d=0,f=c.length,p;d<f;d++)p=c[d],!Qs.call(e,p)&&p!==r&&Xs(e,p,{get:(m=>t[m]).bind(null,p),enumerable:!(i=Oo(t,p))||i.enumerable});return e},Ao=(e,t,r)=>(r=e!=null?Ro(Io(e)):{},Do(t||!e||!e.__esModule||!Qs.call(e,"default")?Xs(r,"default",{value:e,enumerable:!0}):r,e)),Zr={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ke={},ur={},es=0;function To(e){var r,i;let t=(i=(r=globalThis==null?void 0:globalThis.Zone)==null?void 0:r.__symbol__)==null?void 0:i.call(r,e);if(t&&globalThis[t])return globalThis[t]}function Ir(e){if(Ke[e])return Ke[e];let t=To(e)||globalThis[e],r=t.prototype,i=e in Zr?Zr[e]:void 0,c=!!(i&&i.every(p=>{var m,g;return!!((g=(m=Object.getOwnPropertyDescriptor(r,p))==null?void 0:m.get)!=null&&g.toString().includes("[native code]"))})),d=e in Kr?Kr[e]:void 0,f=!!(d&&d.every(p=>{var m;return typeof r[p]=="function"&&((m=r[p])==null?void 0:m.toString().includes("[native code]"))}));if(c&&f)return Ke[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let m=p.contentWindow;if(!m)return t.prototype;let g=m[e].prototype;if(!g)return p.remove(),r;let v=navigator.userAgent;return v.includes("Safari")&&!v.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),ur[e]=()=>p.remove()):p.remove(),Ke[e]=g}catch(p){return r}}var vt={};function ve(e,t,r){var f,p;let i=(f=vt[e])==null?void 0:f[r];if(i)return i.call(t);let c=Ir(e),d=(p=Object.getOwnPropertyDescriptor(c,r))==null?void 0:p.get;return d?((vt[e]||(vt[e]={}))[r]=d,d.call(t)):t[r]}var Kt={};function Zs(e,t,r){let i=`${e}.${String(r)}`;if(Kt[i])return Kt[i].bind(t);let c=Ir(e)[r];return typeof c!="function"?t[r]:(Kt[i]=c,c.bind(t))}function _o(e){return ve("Node",e,"ownerDocument")}function Lo(e){return ve("Node",e,"childNodes")}function ko(e){return ve("Node",e,"parentNode")}function Po(e){return ve("Node",e,"parentElement")}function Fo(e){return ve("Node",e,"textContent")}function Uo(e){return ve("Node",e,"firstChild")}function Bo(e){return ve("Node",e,"lastChild")}function Wo(e){return ve("Node",e,"nextSibling")}function $o(e){return ve("Node",e,"previousSibling")}function zo(e,t){return Zs("Node",e,"contains")(t)}function jo(e){return Zs("Node",e,"getRootNode")()}function Vo(e){return!e||!("host"in e)?null:ve("ShadowRoot",e,"host")}function Go(e){return e.styleSheets}function Ho(e){return!e||!("shadowRoot"in e)?null:ve("Element",e,"shadowRoot")}function qo(e,t){return ve("Element",e,"querySelector")(t)}function Yo(e,t){return ve("Element",e,"querySelectorAll")(t)}function Jo(){let e=Ir("MutationObserver");es++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--es!==0))return;let r=ur.MutationObserver;if(r)try{r()}finally{delete Ke.MutationObserver,delete ur.MutationObserver}}]}var Ks=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ks=()=>new Date().getTime());function Xo(e,t,r){try{if(!(t in e))return()=>{};let i=e[t],c=r(i);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=c,()=>{e[t]=i}}catch(i){return()=>{}}}var Qo={ownerDocument:_o,childNodes:Lo,parentNode:ko,parentElement:Po,textContent:Fo,firstChild:Uo,lastChild:Bo,nextSibling:Wo,previousSibling:$o,contains:zo,getRootNode:jo,host:Vo,styleSheets:Go,shadowRoot:Ho,querySelector:qo,querySelectorAll:Yo,nowTimestamp:Ks,mutationObserverCtor:Jo,patch:Xo},Zo=class{constructor(){R(this,"idNodeMap",new Map);R(this,"nodeMetaMap",new WeakMap)}getId(e){var t,r;return e&&(r=(t=this.getMeta(e))==null?void 0:t.id)!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i));let r=Qo.shadowRoot(e);r&&this.removeNodeFromMap(r)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ko(){return new Zo}var ei="(?:/\\*[^*]*\\*/)|[\\s;]";new RegExp(`${ei}|\\b(0)px?`,"g");new RegExp(ei,"g");new RegExp(/(max|min)-device-(width|height)/.source,"g");var ea=Y((e,t)=>{var r=String,i=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};t.exports=i(),t.exports.createColors=i}),xe=Y((e,t)=>{t.exports={}}),Dr=Y((e,t)=>{var r=ea(),i=xe(),c=class ti extends Error{constructor(f,p,m,g,v,l){super(f),this.name="CssSyntaxError",this.reason=f,v&&(this.file=v),g&&(this.source=g),l&&(this.plugin=l),typeof p!="undefined"&&typeof m!="undefined"&&(typeof p=="number"?(this.line=p,this.column=m):(this.line=p.line,this.column=p.column,this.endLine=m.line,this.endColumn=m.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ti)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(f){if(!this.source)return"";let p=this.source;f==null&&(f=r.isColorSupported);let m=s=>s,g=s=>s,v=s=>s;if(f){let{bold:s,gray:a,red:h}=r.createColors(!0);g=y=>s(h(y)),m=y=>a(y),i&&(v=y=>i(y))}let l=p.split(/\r?\n/),o=Math.max(this.line-3,0),n=Math.min(this.line+2,l.length),u=String(n).length;return l.slice(o,n).map((s,a)=>{let h=o+1+a,y=" "+(" "+h).slice(-u)+" | ";if(h===this.line){if(s.length>160){let b=20,M=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),C=s.slice(M,x),S=m(y.replace(/\d/g," "))+s.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return g(">")+m(y)+v(C)+`
 `+S+g("^")}let w=m(y.replace(/\d/g," "))+s.slice(0,this.column-1).replace(/[^\t]/g," ");return g(">")+m(y)+v(s)+`
 `+w+g("^")}return" "+m(y)+v(s)}).join(`
`)}toString(){let f=this.showSourceCode();return f&&(f=`

`+f+`
`),this.name+": "+this.message+f}};t.exports=c,c.default=c}),ri=Y((e,t)=>{var r=/[\t\n\f\r "#'()/;[\\\]{}]/,i={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function c(v){return v[0].toUpperCase()+v.slice(1)}function d(v,l){let o="@"+l.name,n=l.params?v.rawValue(l,"params"):"",u=l.raws.afterName;return typeof u=="undefined"?u=n?" ":"":u===""&&n&&!r.test(n[0])&&(u=" "),o+u+n}function f(v){if(!v.prop.startsWith("--"))return!1;let l=v.raws.before;return typeof l=="undefined"||!/[^\s;]$/.test(l)}function p(v,l,o){let n=o.nodes,u=n.length-1;for(;u>0&&n[u].type==="comment";)u-=1;let s=v.raw(o,"semicolon"),a=o.type==="document";for(let h=n.length-1;h>=0;h--){let y=n[h],w=u!==h||s;!w&&h<n.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&f(y))&&(w=!0),l.push({document:a,node:y,semicolon:w})}}function m(v,l,o,n){let u=v.raw(o,"between","beforeOpen");v.builder(n+u+"{",o,"start");let s=o.nodes&&o.nodes.length,a=()=>{let h=s?v.raw(o,"after"):v.raw(o,"after","emptyBody");h&&v.builder(h),v.builder("}",o,"end"),o.type==="rule"&&o.raws.ownSemicolon&&v.builder(o.raws.ownSemicolon,o,"end")};s?(l.push(a),p(v,l,o)):a()}var g=class si{constructor(l){this.builder=l}atrule(l,o){let n=d(this,l);if(l.nodes)this.block(l,n);else{let u=(l.raws.between||"")+(o?";":"");this.builder(n+u,l)}}beforeAfter(l,o){let n;l.type==="decl"?n=this.raw(l,null,"beforeDecl"):l.type==="comment"?n=this.raw(l,null,"beforeComment"):o==="before"?n=this.raw(l,null,"beforeRule"):n=this.raw(l,null,"beforeClose");let u=l.parent,s=0;for(;u&&u.type!=="root";)s+=1,u=u.parent;if(n.includes(`
`)){let a=this.raw(l,null,"indent");if(a.length)for(let h=0;h<s;h++)n+=a}return n}block(l,o){let n=this.raw(l,"between","beforeOpen");this.builder(o+n+"{",l,"start");let u;l.nodes&&l.nodes.length?(this.body(l),u=this.raw(l,"after")):u=this.raw(l,"after","emptyBody"),u&&this.builder(u),this.builder("}",l,"end")}body(l){let o=si.prototype,n=["atrule","block","body","rule","stringify"].every(s=>this[s]===o[s]),u=[];for(p(this,u,l);u.length>0;){let s=u.pop();if(typeof s=="function"){s();continue}let a=s.node,h=this.raw(a,"before");h&&this.builder(h),n&&a.type==="rule"?m(this,u,a,this.rawValue(a,"selector")):n&&a.type==="atrule"&&a.nodes?m(this,u,a,d(this,a)):this.stringify(a,s.semicolon)}}comment(l){let o=this.raw(l,"left","commentLeft"),n=this.raw(l,"right","commentRight");this.builder("/*"+o+l.text+n+"*/",l)}decl(l,o){let n=l.raws,u=this.raw(l,"between","colon"),s=l.prop+u+this.rawValue(l,"value");l.important&&(s+=n.important||" !important"),o&&(s+=";"),this.builder(s,l)}document(l){this.body(l)}raw(l,o,n){let u;if(n||(n=o),o&&(u=l.raws[o],typeof u!="undefined"))return u;let s=l.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===l||s&&s.type==="document"))return"";if(!s)return i[n];let a=l.root(),h=a.rawCache||(a.rawCache={});if(typeof h[n]!="undefined")return h[n];if(n==="before"||n==="after")return this.beforeAfter(l,n);{let y="raw"+c(n);this[y]?u=this[y](a,l):a.walk(w=>{if(u=w.raws[o],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=i[n]),h[n]=u,u}rawBeforeClose(l){let o;return l.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return o=n.raws.after,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(l,o){let n;return l.walkComments(u=>{if(typeof u.raws.before!="undefined")return n=u.raws.before,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n=="undefined"?n=this.raw(o,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(l,o){let n;return l.walkDecls(u=>{if(typeof u.raws.before!="undefined")return n=u.raws.before,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n=="undefined"?n=this.raw(o,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(l){let o;return l.walk(n=>{if(n.type!=="decl"&&(o=n.raws.between,typeof o!="undefined"))return!1}),o}rawBeforeRule(l){let o;return l.walk(n=>{if(n.nodes&&(n.parent!==l||l.first!==n)&&typeof n.raws.before!="undefined")return o=n.raws.before,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(l){let o;return l.walkDecls(n=>{if(typeof n.raws.between!="undefined")return o=n.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(l){let o;return l.walk(n=>{if(n.nodes&&n.nodes.length===0&&(o=n.raws.after,typeof o!="undefined"))return!1}),o}rawIndent(l){if(l.raws.indent)return l.raws.indent;let o;return l.walk(n=>{let u=n.parent;if(u&&u!==l&&u.parent&&u.parent===l&&typeof n.raws.before!="undefined"){let s=n.raws.before.split(`
`);return o=s[s.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(l){let o;return l.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(o=n.raws.semicolon,typeof o!="undefined"))return!1}),o}rawValue(l,o){let n=l[o],u=l.raws[o];return u&&u.value===n?u.raw:n}root(l){!(l.parent&&l.parent.type==="document")&&l.source&&l.source.input.hasBOM&&this.builder("\uFEFF",l,"start"),this.body(l),l.raws.after&&this.builder(l.raws.after)}rule(l){this.block(l,this.rawValue(l,"selector")),l.raws.ownSemicolon&&this.builder(l.raws.ownSemicolon,l,"end")}stringify(l,o){if(!this[l.type])throw new Error("Unknown AST node type "+l.type+". Maybe you need to change PostCSS stringifier.");this[l.type](l,o)}};t.exports=g,g.default=g}),Wt=Y((e,t)=>{var r=ri(),i=/(<)(\/?style\b)/gi,c=/(<)(!--)/g;function d(g){return g.includes("<")?g.replace(i,"\\3c $2").replace(c,"\\3c $2"):g}function f(g,v,l){let o=[],n=0,u=0;for(let s=0;s<g.length;s+=3){let a=u,h=n+g[s].length;for(;n<h;)v[n]===l[u]?(n+=1,u+=1):(n+=1,u+=4);o.push(l.slice(a,u))}return o}var p=class extends r{escapeHTML(g){let v=this.builder,l,o;if(this.builder=(u,s,a)=>{l?(o+=u,l.push(u,s,a)):u.includes("<")?(o=u,l=[u,s,a]):v(u,s,a)},g(),this.builder=v,!l)return;let n=d(o);if(n===o)for(let u=0;u<l.length;u+=3)v(l[u],l[u+1],l[u+2]);else{let u=f(l,o,n);for(let s=0;s<l.length;s+=3)v(u[s/3],l[s+1],l[s+2])}}root(g){g.parent&&g.parent.type==="document"?(this.escapeHTML(()=>this.body(g)),g.raws.after&&this.builder(g.raws.after)):this.escapeHTML(()=>super.root(g))}};function m(g,v){let l=new p(v);g.type==="root"||g.type==="document"?l.stringify(g):l.escapeHTML(()=>l.stringify(g))}t.exports=m,m.default=m}),$t=Y((e,t)=>{t.exports.isClean=Symbol("isClean"),t.exports.my=Symbol("my")}),zt=Y((e,t)=>{var r=Dr(),i=ri(),c=Wt(),{isClean:d,my:f}=$t();function p(v,l){let o=new v.constructor,n=[[v,o,l]];for(;n.length>0;){let[u,s,a]=n.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||h==="proxyCache")continue;let y=u[h],w=typeof y;if(h==="parent"&&w==="object")a&&(s[h]=a);else if(h==="source")s[h]=y;else if(Array.isArray(y)){let b=[];s[h]=b;for(let M of y){let x=new M.constructor;b.push(x),n.push([M,x,s])}}else{if(w==="object"&&y!==null){let b=new y.constructor;n.push([y,b,void 0]),y=b}s[h]=y}}}return o}function m(v,l){if(l&&typeof l.offset!="undefined")return l.offset;let o=1,n=1,u=0;for(let s=0;s<v.length;s++){if(n===l.line&&o===l.column){u=s;break}v[s]===`
`?(o=1,n+=1):o+=1}return u}var g=class cr{get proxyOf(){return this}constructor(l={}){this.raws={},this[d]=!1,this[f]=!0;for(let o of Object.keys(l))if(o!=="__proto__")if(o==="nodes"){this.nodes=[];for(let n of l[o])typeof n.clone=="function"&&n.parent?this.append(n.clone()):this.append(n)}else this[o]=l[o]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let o=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let o in l)this[o]=l[o];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let o=p(this);for(let n in l)o[n]=l[n];return o}cloneAfter(l={}){let o=this.clone(l);return this.parent.insertAfter(this,o),o}cloneBefore(l={}){let o=this.clone(l);return this.parent.insertBefore(this,o),o}error(l,o={}){if(this.source){let{end:n,start:u}=this.rangeBy(o);return this.source.input.error(l,{column:u.column,line:u.line},{column:n.column,line:n.line},o)}return new r(l)}getProxyProcessor(){return{get(l,o){return o==="proxyOf"?l:o==="root"?()=>l.root().toProxy():l[o]},set(l,o,n){return l[o]===n||(l[o]=n,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&l.markDirty()),!0}}}markClean(){this[d]=!0}markDirty(){if(this[d]){this[d]=!1;let l=this;for(;l=l.parent;)l[d]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:m(o,this.source.start)};if(l.index)n=this.positionInside(l.index);else if(l.word){let u=o.slice(m(o,this.source.start),this.rangeBy().end.offset).indexOf(l.word);u!==-1&&(n=this.positionInside(u))}return n}positionInside(l){let o=this.source.start.column,n=this.source.start.line,u="document"in this.source.input?this.source.input.document:this.source.input.css,s=m(u,this.source.start),a=s+l;for(let h=s;h<a;h++)u[h]===`
`?(o=1,n+=1):o+=1;return{column:o,line:n,offset:a}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:m(o,this.source.start)},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:m(o,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(l.word){let s=o.slice(m(o,this.source.start),u.offset).indexOf(l.word);s!==-1&&(n=this.positionInside(s),u=this.positionInside(s+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line,offset:m(o,l.start)}:typeof l.index=="number"&&(n=this.positionInside(l.index)),l.end?u={column:l.end.column,line:l.end.line,offset:m(o,l.end)}:typeof l.endIndex=="number"?u=this.positionInside(l.endIndex):typeof l.index=="number"&&(u=this.positionInside(l.index+1));return(u.line<n.line||u.line===n.line&&u.column<=n.column)&&(u={column:n.column+1,line:n.line,offset:n.offset+1}),{end:u,start:n}}raw(l,o){return new i().raw(this,l,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let o=this,n=!1;for(let u of l)u===this?n=!0:n?(this.parent.insertAfter(o,u),o=u):this.parent.insertBefore(o,u);n||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,o){let n=o==null;o=o||new Map;let u=[],s=[[this,u,0]];for(let h=0;h<s.length;h++){let[y,w,b]=s[h],M={};w[b]=M;for(let x in y){if(!Object.prototype.hasOwnProperty.call(y,x)||x==="parent"||x==="proxyCache")continue;let C=y[x];if(Array.isArray(C)){let S=[];M[x]=S;for(let E=0;E<C.length;E++){let O=C[E];typeof O=="object"&&O.toJSON?O.toJSON===cr.prototype.toJSON?s.push([O,S,E]):S[E]=O.toJSON(null,o):S[E]=O}}else if(typeof C=="object"&&C.toJSON)C.toJSON===cr.prototype.toJSON?s.push([C,M,x]):M[x]=C.toJSON(null,o);else if(x==="source"){if(C==null)continue;let S=o.get(C.input);S==null&&(S=o.size,o.set(C.input,S)),M[x]={end:C.end,inputId:S,start:C.start}}else M[x]=C}}let a=u[0];return n&&(a.inputs=[...o.keys()].map(h=>h.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=c){l.stringify&&(l=l.stringify);let o="";return l(this,n=>{o+=n}),o}warn(l,o,n={}){let u={node:this};for(let s in n)u[s]=n[s];return l.warn(o,u)}};t.exports=g,g.default=g}),jt=Y((e,t)=>{var r=zt(),i=class extends r{constructor(c){super(c),this.type="comment"}};t.exports=i,i.default=i}),Vt=Y((e,t)=>{var r=zt(),i=class extends r{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(c){c&&typeof c.value!="undefined"&&typeof c.value!="string"&&(c=ne(P({},c),{value:String(c.value)})),super(c),this.type="decl"}};t.exports=i,i.default=i}),Pe=Y((e,t)=>{var r=jt(),i=Vt(),c=zt(),{isClean:d,my:f}=$t(),p,m,g,v;function l(u){let s=u.slice();for(;s.length>0;){let a=s.pop();if(delete a.source,a.nodes){a.nodes=a.nodes.slice();for(let h of a.nodes)s.push(h)}}return u.slice()}function o(u){let s=[u];for(;s.length>0;){let a=s.pop();if(a[d]=!1,a.proxyOf.nodes)for(let h of a.proxyOf.nodes)s.push(h)}}var n=class fr extends c{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...s){for(let a of s){let h=this.normalize(a,this.last);for(let y of h)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(s){let a=[this];for(;a.length>0;){let h=a.pop();if(h!==this&&h.cleanRaws!==fr.prototype.cleanRaws){h.cleanRaws(s);continue}if(c.prototype.cleanRaws.call(h,s),h.nodes)for(let y of h.nodes)a.push(y)}}each(s){if(!this.proxyOf.nodes)return;let a=this.getIterator(),h,y;for(;this.indexes[a]<this.proxyOf.nodes.length&&(h=this.indexes[a],y=s(this.proxyOf.nodes[h],h),y!==!1);)this.indexes[a]+=1;return delete this.indexes[a],y}every(s){return this.nodes.every(s)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach;return this.indexes[s]=0,s}getProxyProcessor(){return{get(s,a){return a==="proxyOf"?s:s[a]?a==="each"||typeof a=="string"&&a.startsWith("walk")?(...h)=>s[a](...h.map(y=>typeof y=="function"?(w,b)=>y(w.toProxy(),b):y)):a==="every"||a==="some"?h=>s[a]((y,...w)=>h(y.toProxy(),...w)):a==="root"?()=>s.root().toProxy():a==="nodes"?s.nodes.map(h=>h.toProxy()):a==="first"||a==="last"?s[a].toProxy():s[a]:s[a]},set(s,a,h){return s[a]===h||(s[a]=h,(a==="name"||a==="params"||a==="selector")&&s.markDirty()),!0}}}index(s){return typeof s=="number"?s:(s.proxyOf&&(s=s.proxyOf),this.proxyOf.nodes.indexOf(s))}insertAfter(s,a){let h=this.index(s),y=this.normalize(a,this.proxyOf.nodes[h]).reverse();h=this.index(s);for(let b of y)this.proxyOf.nodes.splice(h+1,0,b);let w;for(let b in this.indexes)w=this.indexes[b],h<w&&(this.indexes[b]=w+y.length);return this.markDirty(),this}insertBefore(s,a){let h=this.index(s),y=h===0?"prepend":!1,w=this.normalize(a,this.proxyOf.nodes[h],y).reverse();h=this.index(s);for(let M of w)this.proxyOf.nodes.splice(h,0,M);let b;for(let M in this.indexes)b=this.indexes[M],h<=b&&(this.indexes[M]=b+w.length);return this.markDirty(),this}normalize(s,a){if(typeof s=="string")s=l(m(s).nodes);else if(typeof s=="undefined")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let h of s)h.parent&&h.parent.removeChild(h,"ignore")}else if(s.type==="root"&&this.type!=="document"){s=s.nodes.slice(0);for(let h of s)h.parent&&h.parent.removeChild(h,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value=="undefined")throw new Error("Value field is missed in node creation");typeof s.value!="string"&&(s.value=String(s.value)),s=[new i(s)]}else if(s.selector||s.selectors)s=[new v(s)];else if(s.name)s=[new p(s)];else if(s.text)s=[new r(s)];else throw new Error("Unknown node type in node creation");return s.map(h=>(h[f]||fr.rebuild(h),h=h.proxyOf,h.parent&&h.parent.removeChild(h),h[d]&&o(h),h.raws||(h.raws={}),typeof h.raws.before=="undefined"&&a&&typeof a.raws.before!="undefined"&&(h.raws.before=a.raws.before.replace(/\S/g,"")),h.parent=this.proxyOf,h))}prepend(...s){s=s.reverse();for(let a of s){let h=this.normalize(a,this.first,"prepend").reverse();for(let y of h)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+h.length}return this.markDirty(),this}push(s){return s.parent=this,this.proxyOf.nodes.push(s),this}removeAll(){for(let s of this.proxyOf.nodes)s.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(s){s=this.index(s),this.proxyOf.nodes[s].parent=void 0,this.proxyOf.nodes.splice(s,1);let a;for(let h in this.indexes)a=this.indexes[h],a>=s&&(this.indexes[h]=a-1);return this.markDirty(),this}replaceValues(s,a,h){return h||(h=a,a={}),this.walkDecls(y=>{a.props&&!a.props.includes(y.prop)||a.fast&&!y.value.includes(a.fast)||(y.value=y.value.replace(s,h))}),this.markDirty(),this}some(s){return this.nodes.some(s)}walk(s){if(!this.proxyOf.nodes)return;let a=[{iterator:this.getIterator(),node:this.proxyOf}];for(;a.length>0;){let{iterator:h,node:y}=a[a.length-1],w=y.indexes[h];if(w>=y.proxyOf.nodes.length){delete y.indexes[h],a.pop();let x=a[a.length-1];x&&(x.node.indexes[x.iterator]+=1);continue}let b=y.proxyOf.nodes[w],M;try{M=s(b,w)}catch(x){throw b.addToError(x)}if(M===!1){for(let x of a)delete x.node.indexes[x.iterator];return!1}b.walk&&b.proxyOf.nodes?a.push({iterator:b.getIterator(),node:b}):y.indexes[h]+=1}}walkAtRules(s,a){return a?s instanceof RegExp?this.walk((h,y)=>{if(h.type==="atrule"&&s.test(h.name))return a(h,y)}):this.walk((h,y)=>{if(h.type==="atrule"&&h.name===s)return a(h,y)}):(a=s,this.walk((h,y)=>{if(h.type==="atrule")return a(h,y)}))}walkComments(s){return this.walk((a,h)=>{if(a.type==="comment")return s(a,h)})}walkDecls(s,a){return a?s instanceof RegExp?this.walk((h,y)=>{if(h.type==="decl"&&s.test(h.prop))return a(h,y)}):this.walk((h,y)=>{if(h.type==="decl"&&h.prop===s)return a(h,y)}):(a=s,this.walk((h,y)=>{if(h.type==="decl")return a(h,y)}))}walkRules(s,a){return a?s instanceof RegExp?this.walk((h,y)=>{if(h.type==="rule"&&s.test(h.selector))return a(h,y)}):this.walk((h,y)=>{if(h.type==="rule"&&h.selector===s)return a(h,y)}):(a=s,this.walk((h,y)=>{if(h.type==="rule")return a(h,y)}))}};n.registerParse=u=>{m=u},n.registerRule=u=>{v=u},n.registerAtRule=u=>{p=u},n.registerRoot=u=>{g=u},t.exports=n,n.default=n,n.rebuild=u=>{let s=[u];for(;s.length>0;){let a=s.pop();if(a.type==="atrule"?Object.setPrototypeOf(a,p.prototype):a.type==="rule"?Object.setPrototypeOf(a,v.prototype):a.type==="decl"?Object.setPrototypeOf(a,i.prototype):a.type==="comment"?Object.setPrototypeOf(a,r.prototype):a.type==="root"&&Object.setPrototypeOf(a,g.prototype),a[f]=!0,a.nodes)for(let h of a.nodes)s.push(h)}}}),Ar=Y((e,t)=>{var r=Pe(),i=class extends r{constructor(c){super(c),this.type="atrule"}append(...c){return this.proxyOf.nodes||(this.nodes=[]),super.append(...c)}prepend(...c){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...c)}};t.exports=i,i.default=i,r.registerAtRule(i)}),Tr=Y((e,t)=>{var r=Pe(),i,c,d=class extends r{constructor(f){super(P({type:"document"},f)),this.nodes||(this.nodes=[])}toResult(f={}){return new i(new c,this,f).stringify()}};d.registerLazyResult=f=>{i=f},d.registerProcessor=f=>{c=f},t.exports=d,d.default=d}),ta=Y((e,t)=>{var r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",i=(d,f=21)=>(p=f)=>{let m="",g=p|0;for(;g-- >0;)m+=d[Math.random()*d.length|0];return m},c=(d=21)=>{let f="",p=d|0;for(;p-- >0;)f+=r[Math.random()*64|0];return f};t.exports={nanoid:c,customAlphabet:i}}),ii=Y((e,t)=>{var{existsSync:r,readFileSync:i,realpathSync:c}=xe(),{dirname:d,isAbsolute:f,join:p,relative:m,sep:g}=xe(),{SourceMapConsumer:v,SourceMapGenerator:l}=xe();function o(s){try{return c(s)}catch(a){return s}}function n(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var u=class{constructor(s,a){if(a.map===!1)return;a.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(s),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,y=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=d(this.mapFile)),y&&(this.text=y)}consumer(){return this.consumerCache||(this.consumerCache=new v(this.json||this.text)),this.consumerCache}decodeInline(s){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,y=s.match(/^data:application\/json;charset=utf-?8,/)||s.match(/^data:application\/json,/);if(y)return decodeURIComponent(s.substr(y[0].length));let w=s.match(a)||s.match(h);if(w)return n(s.substr(w[0].length));let b=s.slice(22);throw b=b.slice(0,b.indexOf(",")),new Error("Unsupported source map encoding "+b)}getAnnotationURL(s){return s.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(s){return typeof s!="object"?!1:typeof s.mappings=="string"||typeof s._mappings=="string"||Array.isArray(s.sections)}loadAnnotation(s){let a=s.match(/\/\*\s*# sourceMappingURL=/g);if(!a)return;let h=s.lastIndexOf(a.pop()),y=s.indexOf("*/",h);h>-1&&y>-1&&(this.annotation=this.getAnnotationURL(s.substring(h,y)))}loadFile(s,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(s)||!a)return;let y=m(o(d(a)),o(s));if(y===".."||y.startsWith(".."+g)||f(y))return}if(this.root=d(s),r(s))return this.mapFile=s,i(s,"utf-8").toString().trim()}loadMap(s,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(s);if(h){let y=this.loadFile(h,s,!0);if(!y)throw new Error("Unable to load previous source map: "+h.toString());return y}}else{if(a instanceof v)return l.fromSourceMap(a).toString();if(a instanceof l)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;s&&(h=p(d(s),h));let y=this.loadFile(h,s,!1);if(y)try{this.json=JSON.parse(y.replace(/^\)]}'[^\n]*\n/,""))}catch(w){return}return y}}}startWith(s,a){return s?s.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};t.exports=u,u.default=u}),Gt=Y((e,t)=>{var{nanoid:r}=ta(),{isAbsolute:i,resolve:c}=xe(),{SourceMapConsumer:d,SourceMapGenerator:f}=xe(),{fileURLToPath:p,pathToFileURL:m}=xe(),g=Dr(),v=ii(),l=xe(),o=Symbol("lineToIndexCache"),n=!!(d&&f),u=!!(c&&i);function s(h){if(h[o])return h[o];let y=h.css.split(`
`),w=new Array(y.length),b=0;for(let M=0,x=y.length;M<x;M++)w[M]=b,b+=y[M].length+1;return h[o]=w,w}var a=class{get from(){return this.file||this.id}constructor(h,y={}){if(h===null||typeof h=="undefined"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,y.document&&(this.document=y.document.toString()),y.from&&(!u||/^\w+:\/\//.test(y.from)||i(y.from)?this.file=y.from:this.file=c(y.from)),u&&n){let w=new v(this.css,y);if(w.text){this.map=w;let b=w.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(h,y,w,b={}){let M,x,C,S,E;if(y&&typeof y=="object"){let D=y,N=w;if(typeof D.offset=="number"){S=D.offset;let T=this.fromOffset(S);y=T.line,w=T.col}else y=D.line,w=D.column,S=this.fromLineAndColumn(y,w);if(typeof N.offset=="number"){C=N.offset;let T=this.fromOffset(C);x=T.line,M=T.col}else x=N.line,M=N.column,C=this.fromLineAndColumn(N.line,N.column)}else if(w)S=this.fromLineAndColumn(y,w);else{S=y;let D=this.fromOffset(S);y=D.line,w=D.col}let O=this.origin(y,w,x,M);return O?E=new g(h,O.endLine===void 0?O.line:{column:O.column,line:O.line},O.endLine===void 0?O.column:{column:O.endColumn,line:O.endLine},O.source,O.file,b.plugin):E=new g(h,x===void 0?y:{column:w,line:y},x===void 0?w:{column:M,line:x},this.css,this.file,b.plugin),E.input={column:w,endColumn:M,endLine:x,endOffset:C,line:y,offset:S,source:this.css},this.file&&(m&&(E.input.url=m(this.file).toString()),E.input.file=this.file),E}fromLineAndColumn(h,y){return s(this)[h-1]+y-1}fromOffset(h){let y=s(this),w=y[y.length-1],b=0;if(h>=w)b=y.length-1;else{let M=y.length-2,x;for(;b<M;)if(x=b+(M-b>>1),h<y[x])M=x-1;else if(h>=y[x+1])b=x+1;else{b=x;break}}return{col:h-y[b]+1,line:b+1}}mapResolve(h){return/^\w+:\/\//.test(h)?h:c(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,y,w,b){if(!this.map)return!1;let M=this.map.consumer(),x=M.originalPositionFor({column:y-1,line:h});if(!x.source)return!1;let C;if(typeof w=="number"){let D=M.originalPositionFor({column:b-1,line:w});D.source&&(C=D)}let S;i(x.source)?S=m(x.source):S=new URL(x.source,m(this.map.mapFile||c(".")+"/"));let E={column:x.column+1,endColumn:C&&C.column+1,endLine:C&&C.line,line:x.line,url:S.toString()};if(S.protocol==="file:")if(p)E.file=p(S);else throw new Error("file: protocol is not available in this PostCSS build");let O=M.sourceContentFor(x.source);return O&&(E.source=O),E}toJSON(){let h={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(h[y]=this[y]);return this.map&&(h.map=P({},this.map),h.map.consumerCache&&(h.map.consumerCache=void 0)),h}};t.exports=a,a.default=a,l&&l.registerInput&&l.registerInput(a)}),ht=Y((e,t)=>{var r=Pe(),i,c,d=class extends r{constructor(f){super(f),this.type="root",this.nodes||(this.nodes=[])}normalize(f,p,m){let g=new Set;for(let l of Array.isArray(f)?f:[f])l&&typeof l=="object"&&!l.parent&&l.raws&&typeof l.raws.before!="undefined"&&g.add(l.raws);let v=super.normalize(f);if(p){if(m==="prepend")this.nodes.length>1?p.raws.before=this.nodes[1].raws.before:delete p.raws.before;else if(this.first!==p)for(let l of v)g.has(l.raws)||(l.raws.before=p.raws.before)}return v}removeChild(f,p){let m=this.index(f);return!p&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(f)}toResult(f={}){return new i(new c,this,f).stringify()}};d.registerLazyResult=f=>{i=f},d.registerProcessor=f=>{c=f},t.exports=d,d.default=d,r.registerRoot(d)}),ni=Y((e,t)=>{var r={comma(i){return r.split(i,[","],!0)},space(i){return r.split(i,[" ",`
`,"	"])},split(i,c,d){if(typeof i!="string")return[];let f=[],p="",m=!1,g=0,v=!1,l="",o=!1,n=!1;for(let s=0;s<i.length;s++){let a=i[s];if(n){p+=a,a==="*"&&i[s+1]==="/"&&(p+="/",s+=1,n=!1);continue}if(o)o=!1;else if(a==="\\")o=!0;else if(v)a===l&&(v=!1);else if(a==='"'||a==="'")v=!0,l=a;else if(a==="/"&&i[s+1]==="*"){p+="/*",s+=1,n=!0;continue}else a==="("?g+=1:a===")"?g>0&&(g-=1):g===0&&c.includes(a)&&(m=!0);if(m){let h=p.trim();(d||h!=="")&&f.push(h),p="",m=!1}else p+=a}let u=p.trim();return(d||u!=="")&&f.push(u),f}};t.exports=r,r.default=r}),_r=Y((e,t)=>{var r=Pe(),i=ni(),c=class extends r{get selectors(){return i.comma(this.selector)}set selectors(d){let f=this.selector?this.selector.match(/,\s*/):null,p=f?f[0]:","+this.raw("between","beforeOpen");this.selector=d.join(p)}constructor(d){super(d),this.type="rule",this.nodes||(this.nodes=[])}};t.exports=c,c.default=c,r.registerRule(c)}),ra=Y((e,t)=>{var r=Ar(),i=jt(),c=Vt(),d=Gt(),f=ii(),p=ht(),m=_r();function g(o,n){return o.inputs?o.inputs.map(u=>{let s=ne(P({},u),{__proto__:d.prototype});return s.map&&(s.map=ne(P({},s.map),{__proto__:f.prototype})),s}):n}function v(o,n,u){let s=P({},o);if(delete s.inputs,delete s.nodes,s.source){let h=s.source,{inputId:y}=h,w=mt(h,["inputId"]);s.source=w,y!=null&&(s.source.input=n[y])}let a;if(s.type==="root")a=new p(s);else if(s.type==="decl")a=new c(s);else if(s.type==="rule")a=new m(s);else if(s.type==="comment")a=new i(s);else if(s.type==="atrule")a=new r(s);else throw new Error("Unknown node type: "+o.type);if(u){a.nodes=u;for(let y of u)y.parent=a}return a}function l(o,n){if(Array.isArray(o))return o.map(a=>l(a));let u,s=[{childIndex:0,children:[],inputs:g(o,n),json:o}];for(;s.length>0;){let a=s[s.length-1],h=a.json.nodes;if(h&&a.childIndex<h.length){let w=h[a.childIndex];a.childIndex+=1,s.push({childIndex:0,children:[],inputs:g(w,a.inputs),json:w});continue}s.pop();let y=v(a.json,a.inputs,h?a.children:void 0);s.length>0?s[s.length-1].children.push(y):u=y}return u}t.exports=l,l.default=l}),oi=Y((e,t)=>{var{dirname:r,relative:i,resolve:c,sep:d}=xe(),{SourceMapConsumer:f,SourceMapGenerator:p}=xe(),{pathToFileURL:m}=xe(),g=Gt(),v=!!(f&&p),l=!!(r&&c&&i&&d),o=class{constructor(n,u,s,a){this.stringify=n,this.mapOpts=s.map||{},this.root=u,this.opts=s,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let n;this.isInline()?n="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?n=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?n=this.mapOpts.annotation(this.opts.to,this.root):n=this.outputFile()+".map";let u=`
`;this.css.includes(`\r
`)&&(u=`\r
`),this.css+=u+"/*# sourceMappingURL="+n+" */"}applyPrevMaps(){for(let n of this.previous()){let u=this.toUrl(this.path(n.file)),s=n.root||r(n.file),a;this.mapOpts.sourcesContent===!1?(a=new f(n.text),a.sourcesContent&&(a.sourcesContent=null)):a=n.consumer(),this.map.applySourceMap(a,u,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let n;for(let u=this.root.nodes.length-1;u>=0;u--)n=this.root.nodes[u],n.type==="comment"&&n.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(u)}else if(this.css){let n="/*# sourceMappingURL=",u="",s=0,a;for(;(a=this.css.indexOf(n,s))!==-1;){let h=this.css.indexOf("*/",a+21);if(h===-1)break;for(;a>s&&this.css[a-1]===`
`;)a--;u+=this.css.slice(s,a),s=h+2}s>0&&(this.css=u+this.css.slice(s))}}}generate(){if(this.clearAnnotation(),l&&v&&this.isMap())return this.generateMap();{let n="";return this.stringify(this.root,u=>{n+=u}),[n]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let n=this.previous()[0].consumer();n.file=this.outputFile(),this.map=p.fromSourceMap(n,{ignoreInvalidMapping:!0})}else this.map=new p({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new p({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,u=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},h,y;this.stringify(this.root,(w,b,M)=>{if(this.css+=w,b&&M!=="end"&&(a.generated.line=n,a.generated.column=u-1,b.source&&b.source.start?(a.source=this.sourcePath(b),a.original.line=b.source.start.line,a.original.column=b.source.start.column-1,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,this.map.addMapping(a))),y=w.match(/\n/g),y?(n+=y.length,h=w.lastIndexOf(`
`),u=w.length-h):u+=w.length,b&&M!=="start"){let x=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==x.last||x.raws.semicolon)&&(b.source&&b.source.end?(a.source=this.sourcePath(b),a.original.line=b.source.end.line,a.original.column=b.source.end.column-1,a.generated.line=n,a.generated.column=u-2,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=u-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(n=>n.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let n=this.mapOpts.annotation;return typeof n!="undefined"&&n!==!0?!1:this.previous().length?this.previous().some(u=>u.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(n=>n.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;let u=this.memoizedPaths.get(n);if(u)return u;let s=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=r(c(s,this.mapOpts.annotation)));let a=i(s,n);return this.memoizedPaths.set(n,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(n=>{if(n.source&&n.source.input.map){let u=n.source.input.map;this.previousMaps.includes(u)||this.previousMaps.push(u)}});else{let n=new g(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps}setSourcesContent(){let n={};if(this.root)this.root.walk(u=>{if(u.source){let s=u.source.input.from;if(s&&!n[s]){n[s]=!0;let a=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(a,u.source.input.css)}}});else if(this.css){let u=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(u,this.css)}}sourcePath(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))}toBase64(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))}toFileUrl(n){let u=this.memoizedFileURLs.get(n);if(u)return u;if(m){let s=m(n).toString();return this.memoizedFileURLs.set(n,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(n){let u=this.memoizedURLs.get(n);if(u)return u;d==="\\"&&(n=n.replace(/\\/g,"/"));let s=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,s),s}};t.exports=o}),sa=Y((e,t)=>{var r=39,i=34,c=92,d=47,f=10,p=32,m=12,g=9,v=13,l=91,o=93,n=40,u=41,s=123,a=125,h=59,y=42,w=58,b=64,M=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,S=/[\da-f]/i;t.exports=function(O,D={}){let N=O.css.valueOf(),T=D.ignoreErrors,k,fe,G,I,oe,U,ee,ae,re,Ee,Me=N.length,A=0,Re=[],le=[],he=-1;function Ue(){return A}function me(J){throw O.error("Unclosed "+J,A)}function j(){return le.length===0&&A>=Me}function de(J){if(le.length)return le.pop();if(A>=Me)return;let se=J?J.ignoreUnclosed:!1;switch(k=N.charCodeAt(A),k){case f:case p:case g:case v:case m:I=A;do I+=1,k=N.charCodeAt(I);while(k===p||k===f||k===g||k===v||k===m);U=["space",N.slice(A,I)],A=I-1;break;case l:case o:case s:case a:case w:case h:case u:{let ie=String.fromCharCode(k);U=[ie,ie,A];break}case n:if(Ee=Re.length?Re.pop()[1]:"",re=N.charCodeAt(A+1),Ee==="url"&&re!==r&&re!==i&&re!==p&&re!==f&&re!==g&&re!==m&&re!==v){I=A;do{if(ee=!1,I=N.indexOf(")",I+1),I===-1)if(T||se){I=A;break}else me("bracket");for(ae=I;N.charCodeAt(ae-1)===c;)ae-=1,ee=!ee}while(ee);U=["brackets",N.slice(A,I+1),A,I],A=I}else A<=he?U=["(","(",A]:(I=N.indexOf(")",A+1),fe=N.slice(A,I+1),I===-1||C.test(fe)?(he=I===-1?Me:I,U=["(","(",A]):(U=["brackets",fe,A,I],A=I));break;case r:case i:oe=k===r?"'":'"',I=A;do{if(ee=!1,I=N.indexOf(oe,I+1),I===-1)if(T||se){I=A+1;break}else me("string");for(ae=I;N.charCodeAt(ae-1)===c;)ae-=1,ee=!ee}while(ee);U=["string",N.slice(A,I+1),A,I],A=I;break;case b:M.lastIndex=A+1,M.test(N),M.lastIndex===0?I=N.length-1:I=M.lastIndex-2,U=["at-word",N.slice(A,I+1),A,I],A=I;break;case c:for(I=A,G=!0;N.charCodeAt(I+1)===c;)I+=1,G=!G;if(k=N.charCodeAt(I+1),G&&k!==d&&k!==p&&k!==f&&k!==g&&k!==v&&k!==m&&(I+=1,S.test(N.charAt(I)))){for(;S.test(N.charAt(I+1));)I+=1;N.charCodeAt(I+1)===p&&(I+=1)}U=["word",N.slice(A,I+1),A,I],A=I;break;default:k===d&&N.charCodeAt(A+1)===y?(I=N.indexOf("*/",A+2)+1,I===0&&(T||se?I=N.length:me("comment")),U=["comment",N.slice(A,I+1),A,I],A=I):(x.lastIndex=A+1,x.test(N),x.lastIndex===0?I=N.length-1:I=x.lastIndex-2,U=["word",N.slice(A,I+1),A,I],Re.push(U),A=I)}return A++,U}function B(J){le.push(J)}return{back:B,endOfFile:j,nextToken:de,position:Ue}}}),ia=Y((e,t)=>{var r=Ar(),i=jt(),c=Vt(),d=ht(),f=_r(),p=sa(),m={empty:!0,space:!0};function g(o){for(let n=o.length-1;n>=0;n--){let u=o[n],s=u[3]||u[2];if(s)return s}}function v(o,n,u){let s="";for(let a=n;a<u;a++)s+=o[a][1];return s}var l=class{constructor(o){this.input=o,this.root=new d,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let n=new r;n.name=o[1].slice(1),n.name===""&&this.unnamedAtrule(n,o),this.init(n,o[2]);let u,s,a,h=!1,y=!1,w=[],b=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),u=o[0],u==="("||u==="["?b.push(u==="("?")":"]"):u==="{"&&b.length>0?b.push("}"):u===b[b.length-1]&&b.pop(),b.length===0)if(u===";"){n.source.end=this.getPosition(o[2]),n.source.end.offset++,this.semicolon=!0;break}else if(u==="{"){y=!0;break}else if(u==="}"){if(w.length>0){for(a=w.length-1,s=w[a];s&&s[0]==="space";)s=w[--a];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(o);break}else w.push(o);else w.push(o);if(this.tokenizer.endOfFile()){h=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(n.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(n,"params",w),h&&(o=w[w.length-1],n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),y&&(n.nodes=[],this.current=n)}checkMissedSemicolon(o){let n=this.colon(o);if(n===!1)return;let u=0,s;for(let a=n-1;a>=0&&(s=o[a],!(s[0]!=="space"&&(u+=1,u===2)));a--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(o){let n=0,u,s,a;for(let[h,y]of o.entries()){if(s=y,a=s[0],a==="("&&(n+=1),a===")"&&(n-=1),n===0&&a===":")if(!u)this.doubleColon(s);else{if(u[0]==="word"&&u[1]==="progid")continue;return h}u=s}return!1}comment(o){let n=new i;this.init(n,o[2]),n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++;let u=o[1].slice(2,-2);if(!u.trim())n.text="",n.raws.left=u,n.raws.right="";else{let s=u.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=p(this.input)}decl(o,n){let u=new c;this.init(u,o[0][2]);let s=o[o.length-1];s[0]===";"&&(this.semicolon=!0,o.pop()),u.source.end=this.getPosition(s[3]||s[2]||g(o)),u.source.end.offset++;let a=0;for(;o[a][0]!=="word";)a===o.length-1&&this.unknownWord([o[a]]),a++;u.raws.before+=v(o,0,a),u.source.start=this.getPosition(o[a][2]);let h=a;for(;a<o.length;){let x=o[a][0];if(x===":"||x==="space"||x==="comment")break;a++}u.prop=v(o,h,a);let y=a,w;for(;a<o.length&&(w=o[a],a++,w[0]!==":");)w[0]==="word"&&/\w/.test(w[1])&&this.unknownWord([w]);u.raws.between=v(o,y,a),(u.prop[0]==="_"||u.prop[0]==="*")&&(u.raws.before+=u.prop[0],u.prop=u.prop.slice(1));let b=a;for(;a<o.length;){let x=o[a][0];if(x!=="space"&&x!=="comment")break;a++}let M=o.slice(b,a);o=o.slice(a),this.precheckMissedSemicolon(o);for(let x=o.length-1;x>=0;x--){if(w=o[x],w[1].toLowerCase()==="!important"){u.important=!0;let C=this.stringFrom(o,x);C=this.spacesFromEnd(o)+C,C!==" !important"&&(u.raws.important=C);break}else if(w[1].toLowerCase()==="important"){let C=o.slice(0),S="";for(let E=x;E>0;E--){let O=C[E][0];if(S.trim().startsWith("!")&&O!=="space")break;S=C.pop()[1]+S}S.trim().startsWith("!")&&(u.important=!0,u.raws.important=S,o=C)}if(w[0]!=="space"&&w[0]!=="comment")break}o.some(x=>x[0]!=="space"&&x[0]!=="comment")&&(u.raws.between+=M.map(x=>x[1]).join(""),M=[]),this.raw(u,"value",M.concat(o),n),u.value.includes(":")&&!n&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let n=new f;this.init(n,o[2]),n.selector="",n.raws.between="",this.current=n}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(o[2]),n.source.end.offset++)}}getPosition(o){let n=this.input.fromOffset(o);return{column:n.col,line:n.line,offset:o}}init(o,n){this.current.push(o),o.source={input:this.input,start:this.getPosition(n)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let n=!1,u=null,s=!1,a=null,h=[],y=o[1].startsWith("--"),w=[],b=o;for(;b;){if(u=b[0],w.push(b),u==="("||u==="[")a||(a=b),h.push(u==="("?")":"]");else if(y&&s&&u==="{")a||(a=b),h.push("}");else if(h.length===0)if(u===";")if(s){this.decl(w,y);return}else break;else if(u==="{"){this.rule(w);return}else if(u==="}"){this.tokenizer.back(w.pop()),n=!0;break}else u===":"&&(s=!0);else u===h[h.length-1]&&(h.pop(),h.length===0&&(a=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),h.length>0&&this.unclosedBracket(a),n&&s){if(!y)for(;w.length&&(b=w[w.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,y)}else this.unknownWord(w)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o)}this.endFile()}precheckMissedSemicolon(){}raw(o,n,u,s){let a,h,y=u.length,w="",b="",M=!0,x,C;for(let S=0;S<y;S+=1)a=u[S],h=a[0],h==="space"&&S===y-1&&!s?M=!1:h==="comment"?(C=u[S-1]?u[S-1][0]:"empty",x=u[S+1]?u[S+1][0]:"empty",!m[C]&&!m[x]?b===","?M=!1:(w+=a[1],b=a[1].slice(-1)):M=!1):(w+=a[1],b=a[1].slice(-1));if(!M){let S=u.reduce((E,O)=>E+O[1],"");o.raws[n]={raw:S,value:w}}o[n]=w}rule(o){o.pop();let n=new f;this.init(n,o[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(n,"selector",o),this.current=n}spacesAndCommentsFromEnd(o){let n,u="";for(;o.length&&(n=o[o.length-1][0],!(n!=="space"&&n!=="comment"));)u=o.pop()[1]+u;return u}spacesAndCommentsFromStart(o){let n,u="";for(;o.length&&(n=o[0][0],!(n!=="space"&&n!=="comment"));)u+=o.shift()[1];return u}spacesFromEnd(o){let n,u="";for(;o.length&&(n=o[o.length-1][0],n==="space");)u=o.pop()[1]+u;return u}stringFrom(o,n){let u="";for(let s=n;s<o.length;s++)u+=o[s][1];return o.splice(n,o.length-n),u}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};t.exports=l}),Lr=Y((e,t)=>{var r=Pe(),i=Gt(),c=ia();function d(f,p){let m=new c(new i(f,p));try{m.parse()}catch(g){throw g}return m.root}t.exports=d,d.default=d,r.registerParse(d)}),ai=Y((e,t)=>{var r=Pe(),{my:i}=$t(),c=class{constructor(d,f={}){if(this.type="warning",this.text=d,f.node&&f.node.source){f.node[i]||r.rebuild(f.node);let p=f.node.rangeBy(f);this.line=p.start.line,this.column=p.start.column,this.endLine=p.end.line,this.endColumn=p.end.column}for(let p in f)this[p]=f[p]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,start:this.start,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};t.exports=c,c.default=c}),kr=Y((e,t)=>{var r=ai(),i=class{get content(){return this.css}constructor(c,d,f){this.processor=c,this.messages=[],this.root=d,this.opts=f,this.css="",this.map=void 0}toString(){return this.css}warn(c,d={}){d.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(d.plugin=this.lastPlugin.postcssPlugin);let f=new r(c,d);return this.messages.push(f),f}warnings(){return this.messages.filter(c=>c.type==="warning")}};t.exports=i,i.default=i}),li=Y((e,t)=>{var r={};t.exports=function(c){r[c]||(r[c]=!0,typeof console!="undefined"&&console.warn&&console.warn(c))}}),ui=Y((e,t)=>{var r=Pe(),i=Tr(),c=oi(),d=Lr(),f=kr(),p=ht(),m=Wt(),{isClean:g,my:v}=$t(),l=li(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},n={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},u={Once:!0,postcssPlugin:!0,prepare:!0},s=0;function a(x){return typeof x=="object"&&typeof x.then=="function"}function h(x){let C=!1,S=o[x.type];return x.type==="decl"?C=x.prop.toLowerCase():x.type==="atrule"&&(C=x.name.toLowerCase()),C&&x.append?[S,S+"-"+C,s,S+"Exit",S+"Exit-"+C]:C?[S,S+"-"+C,S+"Exit",S+"Exit-"+C]:x.append?[S,s,S+"Exit"]:[S,S+"Exit"]}function y(x){let C;return x.type==="document"?C=["Document",s,"DocumentExit"]:x.type==="root"?C=["Root",s,"RootExit"]:C=h(x),{eventIndex:0,events:C,iterator:0,node:x,visitorIndex:0,visitors:[]}}function w(x){let C=[x];for(;C.length>0;){let S=C.pop();if(S[g]=!1,S.nodes)for(let E of S.nodes)C.push(E)}return x}var b={},M=class ci{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"}constructor(C,S,E){this.stringified=!1,this.processed=!1;let O;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))O=w(S);else if(S instanceof ci||S instanceof f)O=w(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let D=d;E.syntax&&(D=E.syntax.parse),E.parser&&(D=E.parser),D.parse&&(D=D.parse);try{O=D(S,E)}catch(N){this.processed=!0,this.error=N}O&&!O[v]&&r.rebuild(O)}this.result=new f(C,O,E),this.helpers=ne(P({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(D=>typeof D=="object"&&D.prepare?P(P({},D),D.prepare(this.result)):D)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(C){return this.async().catch(C)}finally(C){return this.async().finally(C)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(C,S){let E=this.result.lastPlugin;try{S&&S.addToError(C),this.error=C,C.name==="CssSyntaxError"&&!C.plugin?(C.plugin=E.postcssPlugin,C.setMessage()):E.postcssVersion}catch(O){console&&console.error&&console.error(O)}return C}prepareVisitors(){this.listeners={};let C=(S,E,O)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,O])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!n[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u[E])if(typeof S[E]=="object")for(let O in S[E])O==="*"?C(S,E,S[E][O]):C(S,E+"-"+O.toLowerCase(),S[E][O]);else typeof S[E]=="function"&&C(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let C=0;C<this.plugins.length;C++){let S=this.plugins[C],E=this.runOnRoot(S);if(a(E))try{await E}catch(O){throw this.handleError(O)}}if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[g];){C[g]=!0;let S=[y(C)];for(;S.length>0;){let E=this.visitTick(S);if(a(E))try{await E}catch(O){let D=S[S.length-1].node;throw this.handleError(O,D)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(C.type==="document"){let O=C.nodes.map(D=>E(D,this.helpers));await Promise.all(O)}else await E(C,this.helpers)}catch(O){throw this.handleError(O)}}}return this.processed=!0,this.stringify()}runOnRoot(C){this.result.lastPlugin=C;try{if(typeof C=="object"&&C.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>C.Once(E,this.helpers));return a(S[0])?Promise.all(S):S}return C.Once(this.result.root,this.helpers)}else if(typeof C=="function")return C(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let C=this.result.opts,S=m;C.syntax&&(S=C.syntax.stringify),C.stringifier&&(S=C.stringifier),S.stringify&&(S=S.stringify);let E=this.result.root.source;if(C.map===void 0&&!(E&&E.input&&E.input.map)){let D="";return S(this.result.root,N=>{D+=N}),this.result.css=D,this.result}let O=new c(S,this.result.root,this.result.opts).generate();return this.result.css=O[0],this.result.map=O[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let C of this.plugins)if(a(this.runOnRoot(C)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[g];)C[g]=!0,this.walkSync(C);if(this.listeners.OnceExit)if(C.type==="document")for(let S of C.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,C)}return this.result}then(C,S){return this.async().then(C,S)}toString(){return this.css}visitSync(C,S){for(let[E,O]of C){this.result.lastPlugin=E;let D;try{D=O(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(a(D))throw this.getAsyncError()}}visitTick(C){let S=C[C.length-1],{node:E,visitors:O}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){C.pop();return}if(O.length>0&&S.visitorIndex<O.length){let[N,T]=O[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===O.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return T(E.toProxy(),this.helpers)}catch(k){throw this.handleError(k,E)}}if(S.iterator!==0){let N=S.iterator;S.descending&&(S.descending=!1,E.indexes[N]+=1);let T;for(;T=E.nodes[E.indexes[N]];){if(!T[g]){T[g]=!0,S.descending=!0,C.push(y(T));return}E.indexes[N]+=1}S.iterator=0,delete E.indexes[N]}let D=S.events;for(;S.eventIndex<D.length;){let N=D[S.eventIndex];if(S.eventIndex+=1,N===s){E.nodes&&E.nodes.length&&(E[g]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}C.pop()}walkSync(C){C[g]=!0;let S=[{eventIndex:0,events:h(C),iterator:0,node:C}];for(;S.length>0;){let E=S[S.length-1],O=E.node;if(E.iterator!==0){let D=E.iterator;E.descending&&(E.descending=!1,O.indexes[D]+=1);let N,T=!1;for(;N=O.nodes[O.indexes[D]];){if(!N[g]){N[g]=!0,E.descending=!0,S.push({eventIndex:0,events:h(N),iterator:0,node:N}),T=!0;break}O.indexes[D]+=1}if(T)continue;E.iterator=0,delete O.indexes[D]}if(E.eventIndex<E.events.length){let D=E.events[E.eventIndex];if(E.eventIndex+=1,D===s)O.nodes&&O.nodes.length&&(E.iterator=O.getIterator());else{let N=this.listeners[D];N&&this.visitSync(N,O.toProxy())&&S.pop()}continue}S.pop()}}warnings(){return this.sync().warnings()}};M.registerPostcss=x=>{b=x},t.exports=M,M.default=M,p.registerLazyResult(M),i.registerLazyResult(M)}),na=Y((e,t)=>{var r=oi(),i=Lr(),c=kr(),d=Wt(),f=li(),p=class{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 m,g=i;try{m=g(this._css,this._opts)}catch(v){this.error=v}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(m,g,v){g=g.toString(),this.stringified=!1,this._processor=m,this._css=g,this._opts=v,this._map=void 0;let l=d;this.result=new c(this._processor,void 0,this._opts),this.result.css=g;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new r(l,void 0,this._opts,g);if(n.isMap()){let[u,s]=n.generate();u&&(this.result.css=u),s&&(this.result.map=s)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().finally(m)}sync(){if(this.error)throw this.error;return this.result}then(m,g){return this.async().then(m,g)}toString(){return this._css}warnings(){return[]}};t.exports=p,p.default=p}),oa=Y((e,t)=>{var r=Tr(),i=ui(),c=na(),d=ht(),f=class{constructor(p=[]){this.version="8.5.32",this.plugins=this.normalize(p)}normalize(p){let m=[];for(let g of p)if(g.postcss===!0?g=g():g.postcss&&(g=g.postcss),typeof g=="object"&&Array.isArray(g.plugins))m=m.concat(g.plugins);else if(typeof g=="object"&&g.postcssPlugin)m.push(g);else if(typeof g=="function")m.push(g);else if(!(typeof g=="object"&&(g.parse||g.stringify)))throw new Error(g+" is not a PostCSS plugin");return m}process(p,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new c(this,p,m):new i(this,p,m)}use(p){return this.plugins=this.plugins.concat(this.normalize([p])),this}};t.exports=f,f.default=f,d.registerProcessor(f),r.registerProcessor(f)}),K=Ao(Y((e,t)=>{var r=Ar(),i=jt(),c=Pe(),d=Dr(),f=Vt(),p=Tr(),m=ra(),g=Gt(),v=ui(),l=ni(),o=zt(),n=Lr(),u=oa(),s=kr(),a=ht(),h=_r(),y=Wt(),w=ai();function b(...M){return M.length===1&&Array.isArray(M[0])&&(M=M[0]),new u(M)}b.plugin=function(x,C){let S=!1;function E(...D){console&&console.warn&&!S&&(S=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("zh")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
https://www.w3ctech.com/topic/2226`));let N=C(...D);return N.postcssPlugin=x,N.postcssVersion=new u().version,N}let O;return Object.defineProperty(E,"postcss",{get(){return O||(O=E()),O}}),E.process=function(D,N,T){return b([E(T)]).process(D,N)},E},b.stringify=y,b.parse=n,b.fromJSON=m,b.list=l,b.comment=M=>new i(M),b.atRule=M=>new r(M),b.decl=M=>new f(M),b.rule=M=>new h(M),b.root=M=>new a(M),b.document=M=>new p(M),b.CssSyntaxError=d,b.Declaration=f,b.Container=c,b.Processor=u,b.Document=p,b.Comment=i,b.Warning=w,b.AtRule=r,b.Result=s,b.Input=g,b.Rule=h,b.Root=a,b.Node=o,v.registerPostcss(b),t.exports=b,b.default=b})(),1);K.default;K.default.stringify;K.default.fromJSON;K.default.plugin;K.default.parse;K.default.list;K.default.document;K.default.comment;K.default.atRule;K.default.rule;K.default.decl;K.default.root;K.default.CssSyntaxError;K.default.Declaration;K.default.Container;K.default.Processor;K.default.Document;K.default.Comment;K.default.Warning;K.default.AtRule;K.default.Result;K.default.Input;K.default.Rule;K.default.Root;K.default.Node;var $=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}({});function aa(e){let t={},r=/;(?![^(]*\))/g,i=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(r).forEach(function(c){if(c){let d=c.split(i);d.length>1&&(t[hr(d[0].trim())]=d[1].trim())}}),t}function ts(e){let t=[];for(let r in e){let i=e[r];if(typeof i!="string")continue;let c=fa(r);t.push(`${c}: ${i};`)}return t.join(" ")}var la=/-([a-z])/g,ua=/^--[a-zA-Z0-9-]+$/,hr=e=>ua.test(e)?e:e.replace(la,(t,r)=>r?r.toUpperCase():""),ca=/\B([A-Z])/g,fa=e=>e.replace(ca,"-$1").toLowerCase(),Ne=class fi{constructor(...t){R(this,"parentElement",null);R(this,"parentNode",null);R(this,"ownerDocument");R(this,"firstChild",null);R(this,"lastChild",null);R(this,"previousSibling",null);R(this,"nextSibling",null);R(this,"ELEMENT_NODE",1);R(this,"TEXT_NODE",3);R(this,"nodeType");R(this,"nodeName");R(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof fi){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ha=class hi extends Ne{constructor(...r){super(r);R(this,"nodeType",9);R(this,"nodeName","#document");R(this,"compatMode","CSS1Compat");R(this,"RRNodeType",$.Document);R(this,"textContent",null);this.ownerDocument=this}get documentElement(){return this.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HTML")||null}get body(){var r;return((r=this.documentElement)==null?void 0:r.childNodes.find(i=>i.RRNodeType===$.Element&&i.tagName==="BODY"))||null}get head(){var r;return((r=this.documentElement)==null?void 0:r.childNodes.find(i=>i.RRNodeType===$.Element&&i.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(r){let i=r.RRNodeType;if((i===$.Element||i===$.DocumentType)&&this.childNodes.some(d=>d.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${i===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let c=Pr(this,r);return c.parentElement=null,c}insertBefore(r,i){let c=r.RRNodeType;if((c===$.Element||c===$.DocumentType)&&this.childNodes.some(f=>f.RRNodeType===c))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${c===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let d=yi(this,r,i);return d.parentElement=null,d}removeChild(r){return vi(this,r)}open(){this.firstChild=null,this.lastChild=null}close(){}write(r){let i;if(r==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?i="-//W3C//DTD XHTML 1.0 Transitional//EN":r==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(i="-//W3C//DTD HTML 4.0 Transitional//EN"),i){let c=this.createDocumentType("html",i,"");this.open(),this.appendChild(c)}}createDocument(r,i,c){return new hi}createDocumentType(r,i,c){let d=new di(r,i,c);return d.ownerDocument=this,d}createElement(r){let i=new Ht(r);return i.ownerDocument=this,i}createElementNS(r,i){return this.createElement(i)}createTextNode(r){let i=new pi(r);return i.ownerDocument=this,i}createComment(r){let i=new mi(r);return i.ownerDocument=this,i}createCDATASection(r){let i=new gi(r);return i.ownerDocument=this,i}toString(){return"RRDocument"}},di=class extends Ne{constructor(t,r,i){super();R(this,"nodeType",10);R(this,"RRNodeType",$.DocumentType);R(this,"name");R(this,"publicId");R(this,"systemId");R(this,"textContent",null);this.name=t,this.publicId=r,this.systemId=i,this.nodeName=t}toString(){return"RRDocumentType"}},Ht=class extends Ne{constructor(t){super();R(this,"nodeType",1);R(this,"RRNodeType",$.Element);R(this,"tagName");R(this,"attributes",{});R(this,"shadowRoot",null);R(this,"scrollLeft");R(this,"scrollTop");this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new ma(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let t=this.attributes.style?aa(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(i,c,d)=>{if(r.test(i))return;let f=hr(i);c?t[f]=c:delete t[f],d==="important"&&(t[f]+=" !important"),this.attributes.style=ts(t)},t.removeProperty=i=>{if(r.test(i))return"";let c=hr(i),d=t[c]||"";return delete t[c],this.attributes.style=ts(t),d},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,i){this.setAttribute(r,i)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Pr(this,t)}insertBefore(t,r){return yi(this,t,r)}removeChild(t){return vi(this,t)}attachShadow(t){let r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(let r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}},da=class extends Ht{constructor(){super(...arguments);R(this,"currentTime");R(this,"volume");R(this,"paused");R(this,"muted");R(this,"playbackRate");R(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},pa=class extends Ht{constructor(){super(...arguments);R(this,"tagName","DIALOG");R(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},pi=class extends Ne{constructor(t){super();R(this,"nodeType",3);R(this,"nodeName","#text");R(this,"RRNodeType",$.Text);R(this,"data");this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}},mi=class extends Ne{constructor(t){super();R(this,"nodeType",8);R(this,"nodeName","#comment");R(this,"RRNodeType",$.Comment);R(this,"data");this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},gi=class extends Ne{constructor(t){super();R(this,"nodeName","#cdata-section");R(this,"nodeType",4);R(this,"RRNodeType",$.CDATA);R(this,"data");this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},ma=class{constructor(e,t){R(this,"onChange");R(this,"classes",[]);R(this,"add",(...e)=>{for(let t of e){let r=String(t);this.classes.indexOf(r)>=0||this.classes.push(r)}this.onChange&&this.onChange(this.classes.join(" "))});R(this,"remove",(...e)=>{this.classes=this.classes.filter(t=>e.indexOf(t)===-1),this.onChange&&this.onChange(this.classes.join(" "))});if(e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};function Pr(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function yi(e,t,r){if(!r)return Pr(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function vi(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var Se=function(e){return e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e}({}),dr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},ga={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},ge=null;function It(e,t,r,i=t.mirror||t.ownerDocument.mirror){e=ya(e,t,r,i),wi(e,t,r,i),va(e,t,r)}function ya(e,t,r,i){var c;if(r.afterAppend&&!ge&&(ge=new WeakSet,setTimeout(()=>{ge=null},0)),!Fr(e,t)){let d=Dt(t,r.mirror,i);(c=e.parentNode)==null||c.replaceChild(d,e),e=d}switch(t.RRNodeType){case $.Document:if(!je(e,t,r.mirror,i)){let d=i.getMeta(t);d&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,d),ge==null||ge.add(e))}break;case $.Element:{let d=e,f=t;switch(f.tagName){case"IFRAME":{let p=e.contentDocument;if(!p)break;It(p,t.contentDocument,r,i);break}}f.shadowRoot&&(d.shadowRoot||d.attachShadow({mode:"open"}),wi(d.shadowRoot,f.shadowRoot,r,i)),wa(d,f,i);break}}return e}function va(e,t,r){var i;switch(t.RRNodeType){case $.Document:{let c=t.scrollData;c&&r.applyScroll(c,!0);break}case $.Element:{let c=e,d=t;switch(d.scrollData&&r.applyScroll(d.scrollData,!0),d.inputData&&r.applyInput(d.inputData),d.tagName){case"AUDIO":case"VIDEO":{let f=e,p=d;p.paused!==void 0&&(p.paused?f.pause():f.play()),p.muted!==void 0&&(f.muted=p.muted),p.volume!==void 0&&(f.volume=p.volume),p.currentTime!==void 0&&(f.currentTime=p.currentTime),p.playbackRate!==void 0&&(f.playbackRate=p.playbackRate),p.loop!==void 0&&(f.loop=p.loop);break}case"CANVAS":{let f=t;if(f.rr_dataURL!==null){let p=document.createElement("img");p.onload=()=>{let m=c.getContext("2d");m&&m.drawImage(p,0,0,p.width,p.height)},p.src=f.rr_dataURL}f.canvasMutations.forEach(p=>r.applyCanvas(p.event,p.mutation,e));break}case"STYLE":{let f=c.sheet;f&&t.rules.forEach(p=>r.applyStyleSheetMutation(p,f));break}case"DIALOG":{let f=c,p=d,m=f.open,g=f.matches("dialog:modal"),v=p.open,l=p.isModal,o=g!==l,n=m!==v;if((o||m&&n)&&f.close(),v&&(n||o))try{l?f.showModal():f.show()}catch(u){console.warn(u)}break}}break}case $.Text:case $.Comment:case $.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}ge!=null&&ge.has(e)&&(ge.delete(e),(i=r.afterAppend)==null||i.call(r,e,r.mirror.getId(e)))}function wa(e,t,r){var d;let i=e.attributes,c=t.attributes;for(let f in c){let p=c[f];if((d=r.getMeta(t))!=null&&d.isSVG&&dr[f])e.setAttributeNS(dr[f],f,p);else if(t.tagName==="CANVAS"&&f==="rr_dataURL"){let m=document.createElement("img");m.src=p,m.onload=()=>{let g=e.getContext("2d");g&&g.drawImage(m,0,0,m.width,m.height)}}else{if(t.tagName==="IFRAME"&&f==="srcdoc")continue;try{e.setAttribute(f,p)}catch(m){console.warn(m)}}}for(let{name:f}of Array.from(i))f in c||e.removeAttribute(f);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function wi(e,t,r,i){let c=Array.from(e.childNodes),d=t.childNodes;if(c.length===0&&d.length===0)return;let f=0,p=c.length-1,m=0,g=d.length-1,v=c[f],l=c[p],o=d[m],n=d[g],u,s;for(;f<=p&&m<=g;)if(v===void 0)v=c[++f];else if(l===void 0)l=c[--p];else if(je(v,o,r.mirror,i))v=c[++f],o=d[++m];else if(je(l,n,r.mirror,i))l=c[--p],n=d[--g];else if(je(v,n,r.mirror,i)){try{e.insertBefore(v,l.nextSibling)}catch(y){console.warn(y)}v=c[++f],n=d[--g]}else if(je(l,o,r.mirror,i)){try{e.insertBefore(l,v)}catch(y){console.warn(y)}l=c[--p],o=d[++m]}else{if(!u){u={};for(let w=f;w<=p;w++){let b=c[w];b&&r.mirror.hasNode(b)&&(u[r.mirror.getId(b)]=w)}}s=u[i.getId(o)];let y=c[s];if(s!==void 0&&y&&je(y,o,r.mirror,i)){try{e.insertBefore(y,v)}catch(w){console.warn(w)}c[s]=void 0}else{let w=Dt(o,r.mirror,i);e.nodeName==="#document"&&v&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&v.nodeType===v.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&v.nodeType===v.ELEMENT_NODE)&&(e.removeChild(v),r.mirror.removeNodeFromMap(v),v=c[++f]);try{e.insertBefore(w,v||null)}catch(b){console.warn(b)}}o=d[++m]}if(f>p){let y=d[g+1],w=null;for(y&&(w=r.mirror.getNode(i.getId(y)));m<=g;++m){let b=Dt(d[m],r.mirror,i);try{e.insertBefore(b,w)}catch(M){console.warn(M)}}}else if(m>g)for(;f<=p;f++){let y=c[f];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(w){console.warn(w)}}let a=e.firstChild,h=t.firstChild;for(;a!==null&&h!==null;)It(a,h,r,i),a=a.nextSibling,h=h.nextSibling}function Dt(e,t,r){let i=r.getId(e),c=r.getMeta(e),d=null;if(i>-1&&(d=t.getNode(i)),d!==null&&Fr(d,e))return d;switch(e.RRNodeType){case $.Document:d=new Document;break;case $.DocumentType:d=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let f=e.tagName.toLowerCase();f=ga[f]||f,c&&"isSVG"in c&&(c!=null&&c.isSVG)?d=document.createElementNS(dr.svg,f):d=document.createElement(e.tagName);break}case $.Text:d=document.createTextNode(e.data);break;case $.Comment:d=document.createComment(e.data);break;case $.CDATA:d=document.createCDATASection(e.data)}c&&t.add(d,P({},c));try{ge==null||ge.add(d)}catch(f){}return d}function Fr(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function je(e,t,r,i){let c=r.getId(e),d=i.getId(t);return c===-1||c!==d?!1:Fr(e,t)}var qt=class bi extends ha{constructor(r){super();R(this,"UNSERIALIZED_STARTING_ID",-2);R(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID);R(this,"mirror",Aa());R(this,"scrollData",null);r&&(this.mirror=r)}get unserializedId(){return this._unserializedId--}createDocument(r,i,c){return new bi}createDocumentType(r,i,c){let d=new ba(r,i,c);return d.ownerDocument=this,d}createElement(r){let i=r.toUpperCase(),c;switch(i){case"AUDIO":case"VIDEO":c=new Sa(i);break;case"IFRAME":c=new Ma(i,this.mirror);break;case"CANVAS":c=new xa(i);break;case"STYLE":c=new Ea(i);break;case"DIALOG":c=new Ca(i);break;default:c=new Yt(i)}return c.ownerDocument=this,c}createComment(r){let i=new Oa(r);return i.ownerDocument=this,i}createCDATASection(r){let i=new Na(r);return i.ownerDocument=this,i}createTextNode(r){let i=new Ra(r);return i.ownerDocument=this,i}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},ba=di,Yt=class extends Ht{constructor(){super(...arguments);R(this,"inputData",null);R(this,"scrollData",null)}},Sa=class extends da{},Ca=class extends pa{},xa=class extends Yt{constructor(){super(...arguments);R(this,"rr_dataURL",null);R(this,"canvasMutations",[])}getContext(){return null}},Ea=class extends Yt{constructor(){super(...arguments);R(this,"rules",[])}},Ma=class extends Yt{constructor(t,r){super(t);R(this,"contentDocument",new qt);this.contentDocument.mirror=r}},Ra=pi,Oa=mi,Na=gi;function Ia(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Si(e,t,r,i){let c;switch(e.nodeType){case Se.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?c=i.contentDocument:(c=t,c.compatMode=e.compatMode);break;case Se.DOCUMENT_TYPE_NODE:{let f=e;c=t.createDocumentType(f.name,f.publicId,f.systemId);break}case Se.ELEMENT_NODE:{let f=e,p=Ia(f);c=t.createElement(p);let m=c;for(let{name:g,value:v}of Array.from(f.attributes))m.attributes[g]=v;f.scrollLeft&&(m.scrollLeft=f.scrollLeft),f.scrollTop&&(m.scrollTop=f.scrollTop);break}case Se.TEXT_NODE:c=t.createTextNode(e.textContent||"");break;case Se.CDATA_SECTION_NODE:c=t.createCDATASection(e.data);break;case Se.COMMENT_NODE:c=t.createComment(e.textContent||"");break;case Se.DOCUMENT_FRAGMENT_NODE:c=i.attachShadow({mode:"open"});break;default:return null}let d=r.getMeta(e);return t instanceof qt&&(d||(d=Ci(c,t.unserializedId),r.add(e,d)),t.mirror.add(c,P({},d))),c}function Da(e,t=Ko(),r=new qt){function i(c,d){let f=Si(c,r,t,d);if(f!==null)if((d==null?void 0:d.nodeName)!=="IFRAME"&&c.nodeType!==Se.DOCUMENT_FRAGMENT_NODE&&(d==null||d.appendChild(f),f.parentNode=d,f.parentElement=d),c.nodeName==="IFRAME"){let p=c.contentDocument;p&&i(p,f)}else(c.nodeType===Se.DOCUMENT_NODE||c.nodeType===Se.ELEMENT_NODE||c.nodeType===Se.DOCUMENT_FRAGMENT_NODE)&&(c.nodeType===Se.ELEMENT_NODE&&c.shadowRoot&&i(c.shadowRoot,f),c.childNodes.forEach(p=>i(p,f)))}return i(e,null),r}function Aa(){return new Ta}var Ta=class{constructor(){R(this,"idNodeMap",new Map);R(this,"nodeMetaMap",new WeakMap)}getId(e){var t,r;return e&&(r=(t=this.getMeta(e))==null?void 0:t.id)!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ci(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{let r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}var rs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ss={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},et={},pr={},is=0;function _a(e){var r,i;let t=(i=(r=globalThis==null?void 0:globalThis.Zone)==null?void 0:r.__symbol__)==null?void 0:i.call(r,e);if(t&&globalThis[t])return globalThis[t]}function Ur(e){if(et[e])return et[e];let t=_a(e)||globalThis[e],r=t.prototype,i=e in rs?rs[e]:void 0,c=!!(i&&i.every(p=>{var m,g;return!!((g=(m=Object.getOwnPropertyDescriptor(r,p))==null?void 0:m.get)!=null&&g.toString().includes("[native code]"))})),d=e in ss?ss[e]:void 0,f=!!(d&&d.every(p=>{var m;return typeof r[p]=="function"&&((m=r[p])==null?void 0:m.toString().includes("[native code]"))}));if(c&&f)return et[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let m=p.contentWindow;if(!m)return t.prototype;let g=m[e].prototype;if(!g)return p.remove(),r;let v=navigator.userAgent;return v.includes("Safari")&&!v.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),pr[e]=()=>p.remove()):p.remove(),et[e]=g}catch(p){return r}}var wt={};function we(e,t,r){var f,p;let i=(f=wt[e])==null?void 0:f[r];if(i)return i.call(t);let c=Ur(e),d=(p=Object.getOwnPropertyDescriptor(c,r))==null?void 0:p.get;return d?((wt[e]||(wt[e]={}))[r]=d,d.call(t)):t[r]}var er={};function xi(e,t,r){let i=`${e}.${String(r)}`;if(er[i])return er[i].bind(t);let c=Ur(e)[r];return typeof c!="function"?t[r]:(er[i]=c,c.bind(t))}function La(e){return we("Node",e,"ownerDocument")}function ka(e){return we("Node",e,"childNodes")}function Pa(e){return we("Node",e,"parentNode")}function Fa(e){return we("Node",e,"parentElement")}function Ua(e){return we("Node",e,"textContent")}function Ba(e){return we("Node",e,"firstChild")}function Wa(e){return we("Node",e,"lastChild")}function $a(e){return we("Node",e,"nextSibling")}function za(e){return we("Node",e,"previousSibling")}function ja(e,t){return xi("Node",e,"contains")(t)}function Va(e){return xi("Node",e,"getRootNode")()}function Ga(e){return!e||!("host"in e)?null:we("ShadowRoot",e,"host")}function Ha(e){return e.styleSheets}function qa(e){return!e||!("shadowRoot"in e)?null:we("Element",e,"shadowRoot")}function Ya(e,t){return we("Element",e,"querySelector")(t)}function Ja(e,t){return we("Element",e,"querySelectorAll")(t)}function Ei(){let e=Ur("MutationObserver");is++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--is!==0))return;let r=pr.MutationObserver;if(r)try{r()}finally{delete et.MutationObserver,delete pr.MutationObserver}}]}var lt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(lt=()=>new Date().getTime());function $e(e,t,r){try{if(!(t in e))return()=>{};let i=e[t],c=r(i);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=c,()=>{e[t]=i}}catch(i){return()=>{}}}var F={ownerDocument:La,childNodes:ka,parentNode:Pa,parentElement:Fa,textContent:Ua,firstChild:Ba,lastChild:Wa,nextSibling:$a,previousSibling:za,contains:ja,getRootNode:Va,host:Ga,styleSheets:Ha,shadowRoot:qa,querySelector:Ya,querySelectorAll:Ja,nowTimestamp:lt,mutationObserverCtor:Ei,patch:$e};function ce(e,t,r=document){let i={capture:!0,passive:!0};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}var Ve=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`,ns={map:{},getId(){return console.error(Ve),-1},getNode(){return console.error(Ve),null},removeNodeFromMap(){console.error(Ve)},has(){return console.error(Ve),!1},reset(){console.error(Ve)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(ns=new Proxy(ns,{get(e,t,r){return t==="map"&&console.error(Ve),Reflect.get(e,t,r)}}));function ut(e,t,r={}){let i=null,c=0;return function(...d){let f=Date.now();!c&&r.leading===!1&&(c=f);let p=t-(f-c),m=this;p<=0||p>t?(i&&(clearTimeout(i),i=null),c=f,e.apply(m,d)):!i&&r.trailing!==!1&&(i=setTimeout(()=>{c=r.leading===!1?0:Date.now(),i=null,e.apply(m,d)},p))}}function Jt(e,t,r,i,c=window){let d=c.Object.getOwnPropertyDescriptor(e,t);return c.Object.defineProperty(e,t,i?r:{set(f){setTimeout(()=>{r.set.call(this,f)},0),d&&d.set&&d.set.call(this,f)}}),()=>Jt(e,t,d||{},!0)}function Mi(e){var r,i,c,d;let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t.documentElement.scrollLeft||(t==null?void 0:t.body)&&((r=F.parentElement(t.body))==null?void 0:r.scrollLeft)||((i=t==null?void 0:t.body)==null?void 0:i.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||(t==null?void 0:t.body)&&((c=F.parentElement(t.body))==null?void 0:c.scrollTop)||((d=t==null?void 0:t.body)==null?void 0:d.scrollTop)||0}}function Ri(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Oi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ni(e){return e?e.nodeType===e.ELEMENT_NODE?e:F.parentElement(e):null}function pe(e,t,r,i){if(!e)return!1;let c=Ni(e);if(!c)return!1;try{if(typeof t=="string"){if(c.classList.contains(t)||i&&c.closest("."+t)!==null)return!0}else if(Nt(c,t,i))return!0}catch(d){}return!!(r&&(c.matches(r)||i&&c.closest(r)!==null))}function Xa(e,t){return t.getId(e)!==-1}function tr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===-2}function Ii(e,t){if(st(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let i=F.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?!1:i?Ii(i,t):!0}function mr(e){return!!e.changedTouches}function Di(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Qa(e){let t={},r=(c,d)=>{let f={value:c,parent:d,children:[]};return t[c.node.id]=f,f},i=[];for(let c of e){let{nextId:d,parentId:f}=c;if(d&&d in t){let p=t[d];if(p.parent){let m=p.parent.children.indexOf(p);p.parent.children.splice(m,0,r(c,p.parent))}else{let m=i.indexOf(p);i.splice(m,0,r(c,null))}continue}if(f in t){let p=t[f];p.children.push(r(c,p));continue}i.push(r(c,null))}return i}function Ai(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Ai(e.children[r],t)}function ot(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Ti(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function _i(e,t){var f,p;let r=(p=(f=e.ownerDocument)==null?void 0:f.defaultView)==null?void 0:p.frameElement;if(!r||r===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let i=r.getBoundingClientRect(),c=_i(r,t),d=i.height/r.clientHeight;return{x:i.x*c.relativeScale+c.x,y:i.y*c.relativeScale+c.y,relativeScale:d,absoluteScale:c.absoluteScale*d}}function We(e){return e?e instanceof Ne&&"shadowRoot"in e?!!e.shadowRoot:!!F.shadowRoot(e):!1}function tt(e,t){let r=e==null?void 0:e[t[0]];return r?t.length===1?r:tt(r.cssRules,t.slice(1)):null}function os(e){let t=[...e];return{positions:t,index:t.pop()}}function Za(e){let t=new Set,r=[];for(let i=e.length;i--;){let c=e[i];t.has(c.id)||(r.push(c),t.add(c.id))}return r}var Li=class{constructor(){R(this,"id",1);R(this,"styleIDMap",new WeakMap);R(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function ki(e){var r;let t=null;return"getRootNode"in e&&((r=F.getRootNode(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&F.host(F.getRootNode(e))&&(t=F.host(F.getRootNode(e))),t}function Ka(e){let t=e,r;for(;r=ki(t);)t=r;return t}function el(e){let t=F.ownerDocument(e);if(!t)return!1;let r=Ka(e);return F.contains(t,r)}function gr(e){let t=F.ownerDocument(e);return t?F.contains(t,e)||el(e):!1}var L=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e[e.Annotation=8]="Annotation",e}({}),_=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}({}),H=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}({}),Ie=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}({}),Le=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}({}),Be=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}({}),V=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Annotation="annotation",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}({}),De=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}({}),as=(e,t)=>`${e}@${t}`,tl=class{constructor(){R(this,"frozen",!1);R(this,"locked",!1);R(this,"texts",[]);R(this,"attributes",[]);R(this,"attributeMap",new WeakMap);R(this,"removes",[]);R(this,"mapRemoves",[]);R(this,"movedMap",{});R(this,"addedSet",new Set);R(this,"movedSet",new Set);R(this,"droppedSet",new Set);R(this,"removesSubTreeCache",new Set);R(this,"mutationCb");R(this,"blockClass");R(this,"blockSelector");R(this,"maskTextClass");R(this,"maskTextSelector");R(this,"inlineStylesheet");R(this,"maskInputOptions");R(this,"maskTextFn");R(this,"maskInputFn");R(this,"keepIframeSrcFn");R(this,"recordCanvas");R(this,"inlineImages");R(this,"slimDOMOptions");R(this,"dataURLOptions");R(this,"doc");R(this,"mirror");R(this,"iframeManager");R(this,"stylesheetManager");R(this,"shadowDomManager");R(this,"processedNodeManager");R(this,"unattachedDoc");R(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()});R(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet){let o=F.parentNode(l);this.removesSubTreeCache.has(o)&&!this.movedSet.has(o)||this.addedSet.add(l)}let r=null,i=null,c=-1,d=null,f=!1,p=new Set,m=this.addedSet.values(),g=m.next();for(;this.addedSet.size;){if(r!==null&&this.addedSet.has(F.previousSibling(r)))d=r,r=F.previousSibling(r);else{for(this.addedSet.has(g.value)||(g=m.next()),r=g.value;;){if(i=F.parentNode(r),this.addedSet.has(i)){r=i;continue}break}if(p.has(i))i=null;else if(i){if(gr(i)?(f=ls(this.droppedSet,i)||this.removesSubTreeCache.has(i),f&&ls(this.movedSet,r)&&(f=!1)):f=!0,this.addedSet.has(F.lastChild(i)))r=F.lastChild(i),d=null;else for(;;){if(d=F.nextSibling(r),this.addedSet.has(d)){r=d;continue}break}if(c=st(i)?this.mirror.getId(ki(r)):this.mirror.getId(i),c===-1&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let u=F.host(i);c=this.mirror.getId(u)}}}if(this.addedSet.delete(r),!i||c===-1){p.add(r);continue}else if(f){this.droppedSet.add(r);continue}let l=!1;if(r.nodeType===Node.TEXT_NODE){let u=i.tagName;if(u==="TEXTAREA")continue;u==="STYLE"&&t.has(c)&&(l=!0)}let o=d?this.mirror.getId(d):null;for(;o===-2;)d=d&&F.nextSibling(d),o=d&&this.mirror.getId(d);if(o===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",d),r=null;continue}let n=qe(r,{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:u=>{ot(u,this.mirror)&&this.iframeManager.addIframe(u),Ti(u,this.mirror)&&this.stylesheetManager.trackLinkElement(u),We(r)&&this.shadowDomManager.addShadowRoot(F.shadowRoot(r),this.doc)},onIframeLoad:(u,s)=>{this.iframeManager.attachIframe(u,s),this.shadowDomManager.observeAttachShadow(u)},onStylesheetLoad:(u,s)=>{this.stylesheetManager.attachLinkElement(u,s)},cssCaptured:l});n&&(e.push({parentId:c,nextId:o,node:n}),t.add(n.id))}let v={texts:this.texts.map(l=>{let o=l.node,n=F.parentNode(o);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(o),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:o}=l;if(typeof o.style=="string"){let n=JSON.stringify(l.styleDiff),u=JSON.stringify(l._unchangedStyles);n.length<o.style.length&&(n+u).split("var(").length===o.style.split("var(").length&&(o.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:o}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!v.texts.length&&!v.attributes.length&&!v.removes.length&&!v.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(v))});R(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(F.childNodes(e),i=>F.textContent(i)||"").join("");t.attributes.value=Mt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Rt(e),value:r,maskInputFn:this.maskInputFn})});R(this,"processMutation",e=>{if(!tr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=F.textContent(e.target);!pe(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Fs(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ni(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=Oe(t.tagName),i=e.attributeName,c=e.target.getAttribute(i);if(i==="value"){let f=Rt(t);c=Mt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:f,value:c,maskInputFn:this.maskInputFn})}if(pe(e.target,this.blockClass,this.blockSelector,!1)||c===e.oldValue)return;let d=this.attributeMap.get(e.target);if(r==="iframe"&&i==="src"&&!this.keepIframeSrcFn(c))if(!t.contentDocument)i="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),i==="type"&&r==="input"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!ks(r,i,c))if(d.attributes[i]=Ls(this.doc,r,Oe(i),c),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(p){this.unattachedDoc=this.doc}let f=this.unattachedDoc.createElement("span");e.oldValue&&f.setAttribute("style",e.oldValue);for(let p of Array.from(t.style)){let m=t.style.getPropertyValue(p),g=t.style.getPropertyPriority(p);m!==f.style.getPropertyValue(p)||g!==f.style.getPropertyPriority(p)?g===""?d.styleDiff[p]=m:d.styleDiff[p]=[m,g]:d._unchangedStyles[p]=[m,g]}for(let p of Array.from(f.style))t.style.getPropertyValue(p)===""&&(d.styleDiff[p]=!1)}else i==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":if(pe(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{gr(t)||this.shadowDomManager.removeShadowRootsIn(t);let r=this.mirror.getId(t),i=st(e.target)?this.mirror.getId(F.host(e.target)):this.mirror.getId(e.target);pe(e.target,this.blockClass,this.blockSelector,!1)||tr(t,this.mirror,this.slimDOMOptions)||!Xa(t,this.mirror)||(this.addedSet.has(t)?(yr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ii(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[as(r,i)]?yr(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:st(e.target)&&it(e.target)?!0:void 0}),rl(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}});R(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(tr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[as(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);pe(e,this.blockClass,this.blockSelector,!1)||(F.childNodes(e).forEach(r=>this.genAdds(r)),We(e)&&F.childNodes(F.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}};function yr(e,t){e.delete(t),F.childNodes(t).forEach(r=>yr(e,r))}function rl(e,t){let r=[e];for(;r.length;){let i=r.pop();t.has(i)||(t.add(i),F.childNodes(i).forEach(c=>r.push(c)))}}function ls(e,t){return e.size===0?!1:Pi(e,t)}function Pi(e,t){if(e.has(t))return!0;let r=F.parentNode(t);return r?Pi(e,r):!1}var at;function sl(e){at=e}function il(){at=void 0}var z=e=>at?(...r)=>{try{return e(...r)}catch(i){if(at&&at(i)===!0)return;throw i}}:e,Xe=new Set;function dt(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Fi(e,t){let r=new tl;Xe.add(r),r.init(e);let[i,c]=Ei(),d=new i(z(r.processMutations.bind(r)));return d.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{d.disconnect(),Xe.delete(r),c()}}function nl({mousemoveCb:e,sampling:t,doc:r,mirror:i}){if(t.mousemove===!1)return()=>{};let c=typeof t.mousemove=="number"?t.mousemove:50,d=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,f=[],p,m=ut(z(l=>{let o=Date.now()-p;e(f.map(n=>(n.timeOffset-=o,n)),l),f=[],p=null}),d),g=z(ut(z(l=>{let o=dt(l),{clientX:n,clientY:u}=mr(l)?l.changedTouches[0]:l;p||(p=lt()),f.push({x:n,y:u,id:i.getId(o),timeOffset:lt()-p}),m(typeof DragEvent!="undefined"&&l instanceof DragEvent?_.Drag:l instanceof MouseEvent?_.MouseMove:_.TouchMove)}),c,{trailing:!1})),v=[ce("mousemove",g,r),ce("touchmove",g,r),ce("drag",g,r)];return z(()=>{v.forEach(l=>l())})}function ol({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:c,sampling:d}){if(d.mouseInteraction===!1)return()=>{};let f=d.mouseInteraction===!0||d.mouseInteraction===void 0?{}:d.mouseInteraction,p=[],m=null,g=v=>l=>{let o=dt(l);if(pe(o,i,c,!0))return;let n=null,u=v;if("pointerType"in l){switch(l.pointerType){case"mouse":n=Ie.Mouse;break;case"touch":n=Ie.Touch;break;case"pen":n=Ie.Pen}n===Ie.Touch?H[v]===H.MouseDown?u="TouchStart":H[v]===H.MouseUp&&(u="TouchEnd"):Ie.Pen}else mr(l)&&(n=Ie.Touch);n!==null?(m=n,(u.startsWith("Touch")&&n===Ie.Touch||u.startsWith("Mouse")&&n===Ie.Mouse)&&(n=null)):H[v]===H.Click&&(n=m,m=null);let s=mr(l)?l.changedTouches[0]:l;if(!s)return;let a=r.getId(o),{clientX:h,clientY:y}=s;z(e)(P({type:H[u],id:a,x:h,y},n!==null&&{pointerType:n}))};return Object.keys(H).filter(v=>Number.isNaN(Number(v))&&!v.endsWith("_Departed")&&f[v]!==!1).forEach(v=>{let l=Oe(v),o=g(v);if(window.PointerEvent)switch(H[v]){case H.MouseDown:case H.MouseUp:l=l.replace("mouse","pointer");break;case H.TouchStart:case H.TouchEnd:return}p.push(ce(l,o,t))}),z(()=>{p.forEach(v=>v())})}function Ui({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:c,sampling:d}){return ce("scroll",z(ut(z(f=>{let p=dt(f);if(!p||pe(p,i,c,!0))return;let m=r.getId(p);if(p===t&&t.defaultView){let g=Mi(t.defaultView);e({id:m,x:g.left,y:g.top})}else e({id:m,x:p.scrollLeft,y:p.scrollTop})}),d.scroll||100)),t)}function al({viewportResizeCb:e},{win:t}){let r=-1,i=-1;return ce("resize",z(ut(z(()=>{let c=Ri(),d=Oi();(r!==c||i!==d)&&(e({width:Number(d),height:Number(c)}),r=c,i=d)}),200)),t)}var ll=["INPUT","TEXTAREA","SELECT"],us=new WeakMap;function ul({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:c,ignoreClass:d,ignoreSelector:f,maskInputOptions:p,maskInputFn:m,sampling:g,userTriggeredOnInput:v}){function l(h){let y=dt(h),w=h.isTrusted,b=y&&y.tagName;if(y&&b==="OPTION"&&(y=F.parentElement(y)),!y||!b||ll.indexOf(b)<0||pe(y,i,c,!0)||y.classList.contains(d)||f&&y.matches(f))return;let M=y.value,x=!1,C=Rt(y)||"";C==="radio"||C==="checkbox"?x=y.checked:(p[b.toLowerCase()]||p[C])&&(M=Mt({element:y,maskInputOptions:p,tagName:b,type:C,value:M,maskInputFn:m})),o(y,v?{text:M,isChecked:x,userTriggered:w}:{text:M,isChecked:x});let S=y.name;C==="radio"&&S&&x&&t.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach(E=>{if(E!==y){let O=E.value;o(E,v?{text:O,isChecked:!x,userTriggered:!1}:{text:O,isChecked:!x})}})}function o(h,y){let w=us.get(h);if(!w||w.text!==y.text||w.isChecked!==y.isChecked){us.set(h,y);let b=r.getId(h);z(e)(ne(P({},y),{id:b}))}}let n=(g.input==="last"?["change"]:["input","change"]).map(h=>ce(h,z(l),t)),u=t.defaultView;if(!u)return()=>{n.forEach(h=>h())};let s=u.Object.getOwnPropertyDescriptor(u.HTMLInputElement.prototype,"value"),a=[[u.HTMLInputElement.prototype,"value"],[u.HTMLInputElement.prototype,"checked"],[u.HTMLSelectElement.prototype,"value"],[u.HTMLTextAreaElement.prototype,"value"],[u.HTMLSelectElement.prototype,"selectedIndex"],[u.HTMLOptionElement.prototype,"selected"]];return s&&s.set&&n.push(...a.map(h=>Jt(h[0],h[1],{set(){z(l)({target:this,isTrusted:!1})}},!1,u))),z(()=>{n.forEach(h=>h())})}function At(e){let t=[];function r(i,c){if(bt("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||bt("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||bt("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||bt("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){let d=Array.from(i.parentRule.cssRules).indexOf(i);return c.unshift(d),r(i.parentRule,c)}else if(i.parentStyleSheet){let d=Array.from(i.parentStyleSheet.cssRules).indexOf(i);c.unshift(d)}return c}return r(e,t)}function Te(e,t,r){let i,c;return e?(e.ownerNode?i=t.getId(e.ownerNode):c=r.getId(e),{styleId:c,id:i}):{}}function cl({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};let c=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(c,{apply:z((v,l,o)=>{let[n,u]=o,{id:s,styleId:a}=Te(l,t,r.styleMirror);return(s&&s!==-1||a&&a!==-1)&&e({id:s,styleId:a,adds:[{rule:n,index:u}]}),v.apply(l,o)})}),i.CSSStyleSheet.prototype.addRule=function(v,l,o=this.cssRules.length){let n=`${v} { ${l} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[n,o])};let d=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(d,{apply:z((v,l,o)=>{let[n]=o,{id:u,styleId:s}=Te(l,t,r.styleMirror);return(u&&u!==-1||s&&s!==-1)&&e({id:u,styleId:s,removes:[{index:n}]}),v.apply(l,o)})}),i.CSSStyleSheet.prototype.removeRule=function(v){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[v])};let f;i.CSSStyleSheet.prototype.replace&&(f=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(f,{apply:z((v,l,o)=>{let[n]=o,{id:u,styleId:s}=Te(l,t,r.styleMirror);return(u&&u!==-1||s&&s!==-1)&&e({id:u,styleId:s,replace:n}),v.apply(l,o)})}));let p;i.CSSStyleSheet.prototype.replaceSync&&(p=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:z((v,l,o)=>{let[n]=o,{id:u,styleId:s}=Te(l,t,r.styleMirror);return(u&&u!==-1||s&&s!==-1)&&e({id:u,styleId:s,replaceSync:n}),v.apply(l,o)})}));let m={};St("CSSGroupingRule")?m.CSSGroupingRule=i.CSSGroupingRule:(St("CSSMediaRule")&&(m.CSSMediaRule=i.CSSMediaRule),St("CSSConditionRule")&&(m.CSSConditionRule=i.CSSConditionRule),St("CSSSupportsRule")&&(m.CSSSupportsRule=i.CSSSupportsRule));let g={};return Object.entries(m).forEach(([v,l])=>{g[v]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(g[v].insertRule,{apply:z((o,n,u)=>{let[s,a]=u,{id:h,styleId:y}=Te(n.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,adds:[{rule:s,index:[...At(n),a||0]}]}),o.apply(n,u)})}),l.prototype.deleteRule=new Proxy(g[v].deleteRule,{apply:z((o,n,u)=>{let[s]=u,{id:a,styleId:h}=Te(n.parentStyleSheet,t,r.styleMirror);return(a&&a!==-1||h&&h!==-1)&&e({id:a,styleId:h,removes:[{index:[...At(n),s]}]}),o.apply(n,u)})})}),z(()=>{i.CSSStyleSheet.prototype.insertRule=c,i.CSSStyleSheet.prototype.deleteRule=d,f&&(i.CSSStyleSheet.prototype.replace=f),p&&(i.CSSStyleSheet.prototype.replaceSync=p),Object.entries(m).forEach(([v,l])=>{l.prototype.insertRule=g[v].insertRule,l.prototype.deleteRule=g[v].deleteRule})})}function Bi({mirror:e,stylesheetManager:t},r){var f,p,m;let i=null;r.nodeName==="#document"?i=e.getId(r):i=e.getId(F.host(r));let c=r.nodeName==="#document"?(f=r.defaultView)==null?void 0:f.Document:(m=(p=r.ownerDocument)==null?void 0:p.defaultView)==null?void 0:m.ShadowRoot,d=c!=null&&c.prototype?Object.getOwnPropertyDescriptor(c==null?void 0:c.prototype,"adoptedStyleSheets"):void 0;return i===null||i===-1||!c||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var g;return(g=d.get)==null?void 0:g.call(this)},set(g){var l;let v=(l=d.set)==null?void 0:l.call(this,g);if(i!==null&&i!==-1)try{t.adoptStyleSheets(g,i)}catch(o){}return v}}),z(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function fl({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:c}){let d=c.CSSStyleDeclaration.prototype.setProperty;c.CSSStyleDeclaration.prototype.setProperty=new Proxy(d,{apply:z((p,m,g)=>{var s;let[v,l,o]=g;if(r.has(v))return d.apply(m,[v,l,o]);let{id:n,styleId:u}=Te((s=m.parentRule)==null?void 0:s.parentStyleSheet,t,i.styleMirror);return(n&&n!==-1||u&&u!==-1)&&e({id:n,styleId:u,set:{property:v,value:l,priority:o},index:At(m.parentRule)}),p.apply(m,g)})});let f=c.CSSStyleDeclaration.prototype.removeProperty;return c.CSSStyleDeclaration.prototype.removeProperty=new Proxy(f,{apply:z((p,m,g)=>{var n;let[v]=g;if(r.has(v))return f.apply(m,[v]);let{id:l,styleId:o}=Te((n=m.parentRule)==null?void 0:n.parentStyleSheet,t,i.styleMirror);return(l&&l!==-1||o&&o!==-1)&&e({id:l,styleId:o,remove:{property:v},index:At(m.parentRule)}),p.apply(m,g)})}),z(()=>{c.CSSStyleDeclaration.prototype.setProperty=d,c.CSSStyleDeclaration.prototype.removeProperty=f})}function hl({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:c,doc:d}){let f=z(m=>ut(z(g=>{let v=dt(g);if(!v||!(v instanceof HTMLMediaElement)||pe(v,t,r,!0))return;let{currentTime:l,volume:o,muted:n,playbackRate:u,loop:s}=v;e({type:m,id:i.getId(v),currentTime:l,volume:o,muted:n,playbackRate:u,loop:s})}),c.media||500)),p=[ce("play",f(Be.Play),d),ce("pause",f(Be.Pause),d),ce("seeked",f(Be.Seeked),d),ce("volumechange",f(Be.VolumeChange),d),ce("ratechange",f(Be.RateChange),d)];return z(()=>{p.forEach(m=>m())})}function dl({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let i=[],c=new WeakMap,d=r.FontFace;r.FontFace=function(m,g,v){let l=new d(m,g,v);return c.set(l,{family:m,buffer:typeof g!="string",descriptors:v,fontSource:typeof g=="string"?g:JSON.stringify(Array.from(new Uint8Array(g)))}),l};let f=$e(t.fonts,"add",function(p){return function(m){return setTimeout(z(()=>{let g=c.get(m);g&&(e(g),c.delete(m))}),0),p.apply(this,[m])}});return i.push(()=>{r.FontFace=d}),i.push(f),z(()=>{i.forEach(p=>p())})}function pl(e){let{doc:t,mirror:r,blockClass:i,blockSelector:c,selectionCb:d}=e,f=!0,p=z(()=>{let m=t.getSelection();if(!m||f&&(m!=null&&m.isCollapsed))return;f=m.isCollapsed||!1;let g=[],v=m.rangeCount||0;for(let l=0;l<v;l++){let{startContainer:o,startOffset:n,endContainer:u,endOffset:s}=m.getRangeAt(l);pe(o,i,c,!0)||pe(u,i,c,!0)||g.push({start:r.getId(o),startOffset:n,end:r.getId(u),endOffset:s})}d({ranges:g})});return p(),ce("selectionchange",p)}function ml({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:$e(r.customElements,"define",function(i){return function(c,d,f){try{t({define:{name:c}})}catch(p){console.warn(`Custom element callback failed for ${c}`)}return i.apply(this,[c,d,f])}})}function gl(e,t){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:c,scrollCb:d,viewportResizeCb:f,inputCb:p,mediaInteractionCb:m,styleSheetRuleCb:g,styleDeclarationCb:v,canvasMutationCb:l,fontCb:o,selectionCb:n,customElementCb:u}=e;e.mutationCb=(...s)=>{t.mutation&&t.mutation(...s),r(...s)},e.mousemoveCb=(...s)=>{t.mousemove&&t.mousemove(...s),i(...s)},e.mouseInteractionCb=(...s)=>{t.mouseInteraction&&t.mouseInteraction(...s),c(...s)},e.scrollCb=(...s)=>{t.scroll&&t.scroll(...s),d(...s)},e.viewportResizeCb=(...s)=>{t.viewportResize&&t.viewportResize(...s),f(...s)},e.inputCb=(...s)=>{t.input&&t.input(...s),p(...s)},e.mediaInteractionCb=(...s)=>{t.mediaInteaction&&t.mediaInteaction(...s),m(...s)},e.styleSheetRuleCb=(...s)=>{t.styleSheetRule&&t.styleSheetRule(...s),g(...s)},e.styleDeclarationCb=(...s)=>{t.styleDeclaration&&t.styleDeclaration(...s),v(...s)},e.canvasMutationCb=(...s)=>{t.canvasMutation&&t.canvasMutation(...s),l(...s)},e.fontCb=(...s)=>{t.font&&t.font(...s),o(...s)},e.selectionCb=(...s)=>{t.selection&&t.selection(...s),n(...s)},e.customElementCb=(...s)=>{t.customElement&&t.customElement(...s),u(...s)}}function yl(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};gl(e,t);let i;e.recordDOM&&(i=Fi(e,e.doc));let c=nl(e),d=ol(e),f=Ui(e),p=al(e,{win:r}),m=ul(e),g=hl(e),v=()=>{},l=()=>{},o=()=>{},n=()=>{};e.recordDOM&&(v=cl(e,{win:r}),l=Bi(e,e.doc),o=fl(e,{win:r}),e.collectFonts&&(n=dl(e)));let u=pl(e),s=ml(e),a=[];for(let h of e.plugins)a.push(h.observer(h.callback,r,h.options));return z(()=>{i==null||i(),c(),d(),f(),p(),m(),g(),v(),l(),o(),n(),u(),s(),a.forEach(h=>h())})}function bt(e){return typeof window[e]!="undefined"}function St(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var cs=class{constructor(e){R(this,"generateIdFn");R(this,"iframeIdToRemoteIdMap",new WeakMap);R(this,"iframeRemoteIdToIdMap",new WeakMap);this.generateIdFn=e}getId(e,t,r,i){let c=r||this.getIdToRemoteIdMap(e),d=i||this.getRemoteIdToIdMap(e),f=c.get(t);return f||(f=this.generateIdFn(),c.set(t,f),d.set(f,t)),f}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(c=>this.getId(e,c,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let c=i.get(t);return c||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},vl=class{constructor(e){R(this,"iframes",new WeakMap);R(this,"crossOriginIframeMap",new WeakMap);R(this,"crossOriginIframeMirror",new cs(_s));R(this,"crossOriginIframeStyleMirror");R(this,"crossOriginIframeRootIdMap",new WeakMap);R(this,"mirror");R(this,"mutationCb");R(this,"wrappedEmit");R(this,"loadListener");R(this,"unloadListener");R(this,"attachedWindows",new Map);R(this,"messageHandler",e=>this.handleMessage(e));R(this,"stylesheetManager");R(this,"recordCrossOriginIframes");this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new cs(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addUnloadListener(e){this.unloadListener=e}attachIframe(e,t){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(e),(r=this.loadListener)==null||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach(e=>e())}watchIframeWindow(e){let t=e.contentWindow;if(!t||this.attachedWindows.has(t))return;let r=[],i=()=>{this.attachedWindows.delete(t),r.forEach(c=>{try{c()}catch(d){}})};this.attachedWindows.set(t,i),this.recordCrossOriginIframes&&r.push(ce("message",this.messageHandler,t)),r.push(ce("pagehide",c=>{var f;if(c.persisted)return;let d=t.document;i(),(f=this.unloadListener)==null||f.call(this,d)},t))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let r=this.crossOriginIframeMap.get(e.source);if(!r)return;let i=this.transformCrossOriginEvent(r,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:L.IncrementalSnapshot,data:{source:_.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Annotation:case L.Plugin:return t;case L.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case L.IncrementalSnapshot:switch(t.data.source){case _.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let c=this.crossOriginIframeRootIdMap.get(e);c&&this.patchRootIdOnNode(i.node,c)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case _.Drag:case _.TouchMove:case _.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case _.ViewportResize:return!1;case _.MediaInteraction:case _.MouseInteraction:case _.Scroll:case _.CanvasMutation:case _.Input:return this.replaceIds(t.data,e,["id"]),t;case _.StyleSheetRule:case _.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case _.Font:return t;case _.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case _.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let c of i)!Array.isArray(t[c])&&typeof t[c]!="number"||(Array.isArray(t[c])?t[c]=e.getIds(r,t[c]):t[c]=e.getId(r,t[c]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==De.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},wl=class{constructor(e){R(this,"shadowDoms",new Map);R(this,"mutationCb");R(this,"scrollCb");R(this,"bypassOptions");R(this,"mirror");R(this,"restoreHandlers",[]);this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!it(e)||this.shadowDoms.has(e))return;let r=[];this.shadowDoms.set(e,r);let i=Fi(ne(P({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);r.push(i),r.push(Ui(ne(P({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{this.shadowDoms.get(e)===r&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(F.host(e))),r.push(Bi({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRootsIn(e){if(this.shadowDoms.size===0)return;let t=F.shadowRoot(e);t&&(this.shadowDoms.has(t)&&this.removeShadowRoot(t),this.removeShadowRootsIn(t)),F.childNodes(e).forEach(r=>this.removeShadowRootsIn(r))}removeShadowRoot(e){let t=this.shadowDoms.get(e);this.shadowDoms.delete(e),t==null||t.forEach(rr)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push($e(e.prototype,"attachShadow",function(i){return function(c){let d=i.call(this,c),f=F.shadowRoot(this);return f&&gr(this)&&r.addShadowRoot(f,t),d}}))}reset(){this.restoreHandlers.forEach(rr),this.restoreHandlers=[];let e=this.shadowDoms;this.shadowDoms=new Map,e.forEach(t=>t.forEach(rr))}};function rr(e){try{e()}catch(t){}}var Ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(Qe=0;Qe<Ye.length;Qe++)rt[Ye.charCodeAt(Qe)]=Qe;var Qe,bl=function(e){var t=new Uint8Array(e),r,i=t.length,c="";for(r=0;r<i;r+=3)c+=Ye[t[r]>>2],c+=Ye[(t[r]&3)<<4|t[r+1]>>4],c+=Ye[(t[r+1]&15)<<2|t[r+2]>>6],c+=Ye[t[r+2]&63];return i%3===2?c=c.substring(0,c.length-1)+"=":i%3===1&&(c=c.substring(0,c.length-2)+"=="),c},Sl=function(e){var t=e.length*.75,r=e.length,i,c=0,d,f,p,m;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var g=new ArrayBuffer(t),v=new Uint8Array(g);for(i=0;i<r;i+=4)d=rt[e.charCodeAt(i)],f=rt[e.charCodeAt(i+1)],p=rt[e.charCodeAt(i+2)],m=rt[e.charCodeAt(i+3)],v[c++]=d<<2|f>>4,v[c++]=(f&15)<<4|p>>2,v[c++]=(p&3)<<6|m&63;return g},fs=new Map;function Cl(e,t){let r=fs.get(e);return r||(r=new Map,fs.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Wi=(e,t,r)=>{if(!e||!(zi(e,t)||typeof e=="object"))return;let i=e.constructor.name,c=Cl(r,i),d=c.indexOf(e);return d===-1&&(d=c.length,c.push(e)),d};function xt(e,t,r){if(e instanceof Array)return e.map(i=>xt(i,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:bl(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[xt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let i=e.constructor.name,{src:c}=e;return{rr_type:i,src:c}}else{if(e instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:e.toDataURL()};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[xt(e.data,t,r),e.width,e.height]};if(zi(e,t)||typeof e=="object")return{rr_type:e.constructor.name,index:Wi(e,t,r)}}return e}var $i=(e,t,r)=>e.map(i=>xt(i,t,r)),zi=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function xl(e,t,r,i){let c=[],d=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let f of d)try{if(typeof t.CanvasRenderingContext2D.prototype[f]!="function")continue;let p=$e(t.CanvasRenderingContext2D.prototype,f,function(m){return function(...g){return pe(this.canvas,r,i,!0)||setTimeout(()=>{let v=$i(g,t,this);e(this.canvas,{type:Le["2D"],property:f,args:v})},0),m.apply(this,g)}});c.push(p)}catch(p){let m=Jt(t.CanvasRenderingContext2D.prototype,f,{set(g){e(this.canvas,{type:Le["2D"],property:f,args:[g],setter:!0})}});c.push(m)}return()=>{c.forEach(f=>f())}}function El(e){return e==="experimental-webgl"?"webgl":e}function hs(e,t,r,i){let c=[];try{let d=$e(e.HTMLCanvasElement.prototype,"getContext",function(f){return function(p,...m){if(!pe(this,t,r,!0)){let g=El(p);if("__context"in this||(this.__context=g),i&&["webgl","webgl2"].includes(g))if(m[0]&&typeof m[0]=="object"){let v=m[0];v.preserveDrawingBuffer||(v.preserveDrawingBuffer=!0)}else m.splice(0,1,{preserveDrawingBuffer:!0})}return f.apply(this,[p,...m])}});c.push(d)}catch(d){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{c.forEach(d=>d())}}function ds(e,t,r,i,c,d){let f=[],p=Object.getOwnPropertyNames(e);for(let m of p)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(m))try{if(typeof e[m]!="function")continue;let g=$e(e,m,function(v){return function(...l){let o=v.apply(this,l);if(Wi(o,d,this),"tagName"in this.canvas&&!pe(this.canvas,i,c,!0)){let n=$i(l,d,this),u={type:t,property:m,args:n};r(this.canvas,u)}return o}});f.push(g)}catch(g){let v=Jt(e,m,{set(l){r(this.canvas,{type:t,property:m,args:[l],setter:!0})}});f.push(v)}return f}function Ml(e,t,r,i){let c=[];return typeof t.WebGLRenderingContext!="undefined"&&c.push(...ds(t.WebGLRenderingContext.prototype,Le.WebGL,e,r,i,t)),typeof t.WebGL2RenderingContext!="undefined"&&c.push(...ds(t.WebGL2RenderingContext.prototype,Le.WebGL2,e,r,i,t)),()=>{c.forEach(d=>d())}}var ji=`(function() {
	// ../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
	var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
	var lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
	for (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;
	var encode = function(arraybuffer) {
		var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";
		for (i = 0; i < len; i += 3) {
			base64 += chars[bytes[i] >> 2];
			base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];
			base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];
			base64 += chars[bytes[i + 2] & 63];
		}
		if (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "=";
		else if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "==";
		return base64;
	};
	// src/record/workers/image-bitmap-data-url-worker.ts
	const lastBlobMap = /* @__PURE__ */ new Map();
	const transparentBlobMap = /* @__PURE__ */ new Map();
	async function getTransparentBlobFor(width, height, dataURLOptions) {
		const id = \`\${width}-\${height}\`;
		if ("OffscreenCanvas" in globalThis) {
			if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
			const offscreen = new OffscreenCanvas(width, height);
			offscreen.getContext("2d");
			const base64 = encode(await (await offscreen.convertToBlob(dataURLOptions)).arrayBuffer());
			transparentBlobMap.set(id, base64);
			return base64;
		} else return "";
	}
	const worker = self;
	worker.onmessage = async function(e) {
		if ("OffscreenCanvas" in globalThis) {
			const { id, bitmap, width, height, dataURLOptions } = e.data;
			const transparentBase64 = getTransparentBlobFor(width, height, dataURLOptions);
			const offscreen = new OffscreenCanvas(width, height);
			offscreen.getContext("2d").drawImage(bitmap, 0, 0);
			bitmap.close();
			const blob = await offscreen.convertToBlob(dataURLOptions);
			const type = blob.type;
			const base64 = encode(await blob.arrayBuffer());
			if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
				lastBlobMap.set(id, base64);
				return worker.postMessage({ id });
			}
			if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
			worker.postMessage({
				id,
				type,
				base64,
				width,
				height
			});
			lastBlobMap.set(id, base64);
		} else return worker.postMessage({ id: e.data.id });
	};
})();

//# sourceMappingURL=image-bitmap-data-url-worker-NVDCVKXO.js.map`,ps=typeof self!="undefined"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",ji],{type:"text/javascript;charset=utf-8"});function Rl(e){let t;try{if(t=ps&&(self.URL||self.webkitURL).createObjectURL(ps),!t)throw"";let r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ji),{name:e==null?void 0:e.name})}}var Ol=class{constructor(e){R(this,"pendingCanvasMutations",new Map);R(this,"rafStamps",{latestId:0,invokeId:null});R(this,"mirror");R(this,"mutationCb");R(this,"resetObservers");R(this,"frozen",!1);R(this,"locked",!1);R(this,"processMutation",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t="all",win:r,blockClass:i,blockSelector:c,recordCanvas:d,dataURLOptions:f}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,d&&t==="all"&&this.initCanvasMutationObserver(r,i,c),d&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,c,{dataURLOptions:f})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,c){let d=hs(t,r,i,!0),f=new Map,p=new Rl;p.onmessage=n=>{let{id:u}=n.data;if(f.set(u,!1),!("base64"in n.data))return;let{base64:s,type:a,width:h,height:y}=n.data;this.mutationCb({id:u,type:Le["2D"],commands:[{property:"clearRect",args:[0,0,h,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:a}]},0,0]}]})};let m=1e3/e,g=0,v,l=()=>{let n=[];return t.document.querySelectorAll("canvas").forEach(u=>{pe(u,r,i,!0)||n.push(u)}),n},o=n=>{if(g&&n-g<m){v=requestAnimationFrame(o);return}g=n,l().forEach(async u=>{var h;let s=this.mirror.getId(u);if(f.get(s)||u.width===0||u.height===0)return;if(f.set(s,!0),["webgl","webgl2"].includes(u.__context)){let y=u.getContext(u.__context);((h=y==null?void 0:y.getContextAttributes())==null?void 0:h.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let a=await createImageBitmap(u);p.postMessage({id:s,bitmap:a,width:u.width,height:u.height,dataURLOptions:c.dataURLOptions},[a])}),v=requestAnimationFrame(o)};v=requestAnimationFrame(o),this.resetObservers=()=>{d(),cancelAnimationFrame(v)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=hs(e,t,r,!1),c=xl(this.processMutation.bind(this),e,t,r),d=Ml(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),c(),d()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(d=>{let m=d,{type:f}=m;return mt(m,["type"])}),{type:c}=r[0];this.mutationCb({id:t,type:c,commands:i}),this.pendingCanvasMutations.delete(e)}},Nl=class{constructor(e){R(this,"trackedLinkElements",new WeakSet);R(this,"mutationCb");R(this,"adoptedStyleSheetCb");R(this,"styleMirror",new Li);this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},i=[];for(let c of e){let d;this.styleMirror.has(c)?d=this.styleMirror.getId(c):(d=this.styleMirror.add(c),i.push({styleId:d,rules:Array.from(c.rules||CSSRule,(f,p)=>({rule:Ds(f,c.href),index:p}))})),r.styleIds.push(d)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Il=class{constructor(){R(this,"nodeMap",new WeakMap);R(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},te,Et,Ae,ct=!1,Ms;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Ms=e.contentWindow)==null?void 0:Ms.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var be=As();function Fe(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:c="rr-block",blockSelector:d=null,ignoreClass:f="rr-ignore",ignoreSelector:p=null,maskTextClass:m="rr-mask",maskTextSelector:g=null,inlineStylesheet:v=!0,maskAllInputs:l,maskInputOptions:o,slimDOMOptions:n,maskInputFn:u,maskTextFn:s,hooks:a,packFn:h,sampling:y={},dataURLOptions:w={},mousemoveWait:b,recordDOM:M=!0,recordCanvas:x=!1,recordCrossOriginIframes:C=!1,recordAfter:S=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:E=!1,collectFonts:O=!1,inlineImages:D=!1,plugins:N,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:k=new Set([]),errorHandler:fe}=e;sl(fe);let G=C?window.parent===window:!0,I=!1;if(!G)try{window.parent.document&&(I=!1)}catch(j){I=!0}if(G&&!t)throw new Error("emit function is required");if(!G&&!I)return()=>{};b!==void 0&&y.mousemove===void 0&&(y.mousemove=b),be.reset();let oe=l===!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}:o!==void 0?o:{password:!0},U=Us(n);Di();let ee,ae=0,re=j=>{for(let de of N||[])de.eventProcessor&&(j=de.eventProcessor(j));return h&&!I&&(j=h(j)),j};te=(j,de)=>{let B=j;if(B.timestamp=lt(),B.type!==L.FullSnapshot&&!(B.type===L.IncrementalSnapshot&&B.data.source===_.Mutation)){Ae.unfreeze();for(let J of Xe)if(J.isFrozen())J.unfreeze();else break}if(G)t==null||t(re(B),de);else if(I){let J={type:"rrweb",event:re(B),origin:window.location.origin,isCheckout:de};window.parent.postMessage(J,"*")}if(B.type===L.FullSnapshot)ee=B,ae=0;else if(B.type===L.IncrementalSnapshot){if(B.data.source===_.Mutation&&B.data.isAttachIframe)return;ae++;let J=i&&ae>=i,se=r&&B.timestamp-ee.timestamp>r;(J||se)&&Et(!0)}};let Ee=j=>{te({type:L.IncrementalSnapshot,data:P({source:_.Mutation},j)})},Me=j=>te({type:L.IncrementalSnapshot,data:P({source:_.Scroll},j)}),A=j=>te({type:L.IncrementalSnapshot,data:P({source:_.CanvasMutation},j)}),Re=j=>te({type:L.IncrementalSnapshot,data:P({source:_.AdoptedStyleSheet},j)}),le=new Nl({mutationCb:Ee,adoptedStyleSheetCb:Re}),he=new vl({mirror:be,mutationCb:Ee,stylesheetManager:le,recordCrossOriginIframes:C,wrappedEmit:te});for(let j of N||[])j.getMirror&&j.getMirror({nodeMirror:be,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});let Ue=new Il;Ae=new Ol({recordCanvas:x,mutationCb:A,win:window,blockClass:c,blockSelector:d,mirror:be,sampling:y.canvas,dataURLOptions:w});let me=new wl({mutationCb:Ee,scrollCb:Me,bypassOptions:{blockClass:c,blockSelector:d,maskTextClass:m,maskTextSelector:g,inlineStylesheet:v,maskInputOptions:oe,dataURLOptions:w,maskTextFn:s,maskInputFn:u,recordCanvas:x,inlineImages:D,sampling:y,slimDOMOptions:U,iframeManager:he,stylesheetManager:le,canvasManager:Ae,keepIframeSrcFn:T,processedNodeManager:Ue},mirror:be});Et=(j=!1)=>{if(!M)return;te({type:L.Meta,data:{href:window.location.href,width:Oi(),height:Ri()}},j),le.reset(),me.init(),Ae.lock(),Xe.forEach(B=>B.lock());let de=so(document,{mirror:be,blockClass:c,blockSelector:d,maskTextClass:m,maskTextSelector:g,inlineStylesheet:v,maskAllInputs:oe,maskTextFn:s,maskInputFn:u,slimDOM:U,dataURLOptions:w,recordCanvas:x,inlineImages:D,onSerialize:B=>{ot(B,be)&&he.addIframe(B),Ti(B,be)&&le.trackLinkElement(B),We(B)&&me.addShadowRoot(F.shadowRoot(B),document)},onIframeLoad:(B,J)=>{he.attachIframe(B,J),me.observeAttachShadow(B)},onStylesheetLoad:(B,J)=>{le.attachLinkElement(B,J)},keepIframeSrcFn:T});if(!de)return console.warn("Failed to snapshot the document");te({type:L.FullSnapshot,data:{node:de,initialOffset:Mi(window)}},j),Ae.unlock(),Xe.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,be.getId(document))};try{let j=[],de=se=>{var ie;return z(yl)({mutationCb:Ee,mousemoveCb:(Q,Xt)=>te({type:L.IncrementalSnapshot,data:{source:Xt,positions:Q}}),mouseInteractionCb:Q=>te({type:L.IncrementalSnapshot,data:P({source:_.MouseInteraction},Q)}),scrollCb:Me,viewportResizeCb:Q=>te({type:L.IncrementalSnapshot,data:P({source:_.ViewportResize},Q)}),inputCb:Q=>te({type:L.IncrementalSnapshot,data:P({source:_.Input},Q)}),mediaInteractionCb:Q=>te({type:L.IncrementalSnapshot,data:P({source:_.MediaInteraction},Q)}),styleSheetRuleCb:Q=>te({type:L.IncrementalSnapshot,data:P({source:_.StyleSheetRule},Q)}),styleDeclarationCb:Q=>te({type:L.IncrementalSnapshot,data:P({source:_.StyleDeclaration},Q)}),canvasMutationCb:A,fontCb:Q=>te({type:L.IncrementalSnapshot,data:P({source:_.Font},Q)}),selectionCb:Q=>{te({type:L.IncrementalSnapshot,data:P({source:_.Selection},Q)})},customElementCb:Q=>{te({type:L.IncrementalSnapshot,data:P({source:_.CustomElement},Q)})},blockClass:c,ignoreClass:f,ignoreSelector:p,maskTextClass:m,maskTextSelector:g,maskInputOptions:oe,inlineStylesheet:v,sampling:y,recordDOM:M,recordCanvas:x,inlineImages:D,userTriggeredOnInput:E,collectFonts:O,doc:se,maskInputFn:u,maskTextFn:s,keepIframeSrcFn:T,blockSelector:d,slimDOMOptions:U,dataURLOptions:w,mirror:be,iframeManager:he,stylesheetManager:le,shadowDomManager:me,processedNodeManager:Ue,canvasManager:Ae,ignoreCSSAttributes:k,plugins:((ie=N==null?void 0:N.filter(Q=>Q.observer))==null?void 0:ie.map(Q=>({observer:Q.observer,options:Q.options,callback:Xt=>te({type:L.Plugin,data:{plugin:Q.name,payload:Xt}})})))||[]},a)},B=new Map;he.addLoadListener(se=>{try{let ie=se.contentDocument;if(B.has(ie))return;B.set(ie,de(ie))}catch(ie){console.warn(ie)}}),he.addUnloadListener(se=>{let ie=B.get(se);ie&&(B.delete(se),ie(),me.removeShadowRootsIn(se),be.removeNodeFromMap(se))});let J=()=>{Et(),j.push(de(document)),ct=!0};return["interactive","complete"].includes(document.readyState)?J():(j.push(ce("DOMContentLoaded",()=>{te({type:L.DomContentLoaded,data:{}}),S==="DOMContentLoaded"&&J()})),j.push(ce("load",()=>{te({type:L.Load,data:{}}),S==="load"&&J()},window))),()=>{[...j,...B.values()].forEach(se=>{try{se()}catch(ie){String(ie).toLowerCase().includes("cross-origin")||console.warn(ie)}}),B.clear(),he.destroy(),Ue.destroy(),me.reset(),Ae.reset(),ct=!1,il()}}catch(j){console.warn(j)}}Fe.addCustomEvent=(e,t)=>{if(!ct)throw new Error("please add custom event after start recording");te({type:L.Custom,data:{tag:e,payload:t}})};Fe.addAnnotation=e=>{if(!ct)throw new Error("please add annotation after recording started");te({type:L.Annotation,data:e})};Fe.freezePage=()=>{Ae.freeze(),Xe.forEach(e=>e.freeze())};Fe.takeFullSnapshot=e=>{if(!ct)throw new Error("please take full snapshot after start recording");Et(e)};Fe.mirror=be;var Dl=Ki({default:()=>Vi});function Vi(e){return{all:e=e||new Map,on:function(t,r){var i=e.get(t);i?i.push(r):e.set(t,[r])},off:function(t,r){var i=e.get(t);i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var i=e.get(t);i&&i.slice().map(function(c){c(r)}),(i=e.get("*"))&&i.slice().map(function(c){c(t,r)})}}}function Al(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let r=e.HTMLElement||e.Element,i=468,c={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||m,scrollIntoView:r.prototype.scrollIntoView},d=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function f(h){return new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(h)}let p=f(e.navigator.userAgent)?1:0;function m(h,y){this.scrollLeft=h,this.scrollTop=y}function g(h){return .5*(1-Math.cos(Math.PI*h))}function v(h){if(h===null||typeof h!="object"||h.behavior===void 0||h.behavior==="auto"||h.behavior==="instant")return!0;if(typeof h=="object"&&h.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+h.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(h,y){if(y==="Y")return h.clientHeight+p<h.scrollHeight;if(y==="X")return h.clientWidth+p<h.scrollWidth}function o(h,y){let w=e.getComputedStyle(h,null)["overflow"+y];return w==="auto"||w==="scroll"}function n(h){let y=l(h,"Y")&&o(h,"Y"),w=l(h,"X")&&o(h,"X");return y||w}function u(h){for(;h!==t.body&&n(h)===!1;)h=h.parentNode||h.host;return h}function s(h){let y=d(),w,b,M,x=(y-h.startTime)/i;x=x>1?1:x,w=g(x),b=h.startX+(h.x-h.startX)*w,M=h.startY+(h.y-h.startY)*w,h.method.call(h.scrollable,b,M),(b!==h.x||M!==h.y)&&e.requestAnimationFrame(s.bind(e,h))}function a(h,y,w){let b,M,x,C,S=d();h===t.body?(b=e,M=e.scrollX||e.pageXOffset,x=e.scrollY||e.pageYOffset,C=c.scroll):(b=h,M=h.scrollLeft,x=h.scrollTop,C=m),s({scrollable:b,method:C,startTime:S,startX:M,startY:x,x:y,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(v(arguments[0])===!0){c.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}a.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(v(arguments[0])){c.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}a.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(v(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");c.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let h=arguments[0].left,y=arguments[0].top;a.call(this,this,typeof h=="undefined"?this.scrollLeft:~~h,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(v(arguments[0])===!0){c.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(v(arguments[0])===!0){c.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let h=u(this),y=h.getBoundingClientRect(),w=this.getBoundingClientRect();h!==t.body?(a.call(this,h,h.scrollLeft+w.left-y.left,h.scrollTop+w.top-y.top),e.getComputedStyle(h).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}var Tl=class{constructor(e=[],t){R(this,"timeOffset",0);R(this,"speed");R(this,"actions");R(this,"raf",null);R(this,"lastTimestamp");this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){let i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};function ms(e,t){if(e.type===L.IncrementalSnapshot&&e.data.source===_.MouseMove&&e.data.positions&&e.data.positions.length){let r=e.data.positions[0].timeOffset,i=e.timestamp+r;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.delay}function gs(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i,c,d=r.call(e),f=[];try{for(;(t===void 0||t-- >0)&&!(i=d.next()).done;)f.push(i.value)}catch(p){c={error:p}}finally{try{i&&!i.done&&(r=d.return)&&r.call(d)}finally{if(c)throw c.error}}return f}var Je;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Je||(Je={}));var Gi={type:"xstate.init"};function sr(e){return e===void 0?[]:[].concat(e)}function Ge(e){return{type:"xstate.assign",assignment:e}}function ys(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Tt(e){return function(t){return e===t}}function Hi(e){return typeof e=="string"?{type:e}:e}function vs(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Tt(e)}}function ws(e,t,r){var i=t,c=!1;return[e.filter(function(d){if(d.type==="xstate.assign"){c=!0;var f=Object.assign({},i);return typeof d.assignment=="function"?f=d.assignment(i,r):Object.keys(d.assignment).forEach(function(p){f[p]=typeof d.assignment[p]=="function"?d.assignment[p](i,r):d.assignment[p]}),i=f,!1}return!0}),i,c]}function qi(e,t){t===void 0&&(t={});var r=gs(ws(sr(e.states[e.initial].entry).map(function(f){return ys(f,t.actions)}),e.context,Gi),2),i=r[0],c=r[1],d={config:e,_options:t,initialState:{value:e.initial,actions:i,context:c,matches:Tt(e.initial)},transition:function(f,p){var m,g,v=typeof f=="string"?{value:f,context:e.context}:f,l=v.value,o=v.context,n=Hi(p),u=e.states[l];if(u.on){var s=sr(u.on[n.type]);try{for(var a=function(I){var oe=typeof Symbol=="function"&&Symbol.iterator,U=oe&&I[oe],ee=0;if(U)return U.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&ee>=I.length&&(I=void 0),{value:I&&I[ee++],done:!I}}};throw new TypeError(oe?"Object is not iterable.":"Symbol.iterator is not defined.")}(s),h=a.next();!h.done;h=a.next()){var y=h.value;if(y===void 0)return vs(l,o);var w=typeof y=="string"?{target:y}:y,b=w.target,M=w.actions,x=M===void 0?[]:M,C=w.cond,S=C===void 0?function(){return!0}:C,E=b===void 0,O=b!=null?b:l,D=e.states[O];if(S(o,n)){var N=gs(ws((E?sr(x):[].concat(u.exit,x,D.entry).filter(function(I){return I})).map(function(I){return ys(I,d._options.actions)}),o,n),3),T=N[0],k=N[1],fe=N[2],G=b!=null?b:l;return{value:G,context:k,actions:T,changed:b!==l||T.length>0||fe,matches:Tt(G)}}}}catch(I){m={error:I}}finally{try{h&&!h.done&&(g=a.return)&&g.call(a)}finally{if(m)throw m.error}}}return vs(l,o)}};return d}var bs=function(e,t){return e.actions.forEach(function(r){var i=r.exec;return i&&i(e.context,t)})};function Yi(e){var t=e.initialState,r=Je.NotStarted,i=new Set,c={_machine:e,send:function(d){r===Je.Running&&(t=e.transition(t,d),bs(t,Hi(d)),i.forEach(function(f){return f(t)}))},subscribe:function(d){return i.add(d),d(t),{unsubscribe:function(){return i.delete(d)}}},start:function(d){if(d){var f=typeof d=="object"?d:{context:e.config.context,value:d};t={value:f.value,actions:[],context:f.context,matches:Tt(f.value)}}return r=Je.Running,bs(t,Gi),c},stop:function(){return r=Je.Stopped,i.clear(),c},get state(){return t},get status(){return r}};return c}function _l(e,t){for(let r=e.length-1;r>=0;r--){let i=e[r];if(i.type===L.Meta&&i.timestamp<=t)return e.slice(r)}return e}function Ll(e,{getCastFn:t,applyEventsSynchronously:r,emitter:i}){return Yi(qi({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ge({lastPlayedEvent:(c,d)=>d.type==="CAST_EVENT"?d.payload.event:c.lastPlayedEvent}),recordTimeOffset:Ge((c,d)=>{let f=c.timeOffset;return"payload"in d&&"timeOffset"in d.payload&&(f=d.payload.timeOffset),ne(P({},c),{timeOffset:f,baselineTime:c.events[0].timestamp+f})}),play(c){var o;let{timer:d,events:f,baselineTime:p,lastPlayedEvent:m}=c;d.clear();for(let n of f)ms(n,p);let g=_l(f,p),v=m==null?void 0:m.timestamp;(m==null?void 0:m.type)===L.IncrementalSnapshot&&m.data.source===_.MouseMove&&(v=m.timestamp+((o=m.data.positions[0])==null?void 0:o.timeOffset)),p<(v||0)&&i.emit(V.PlayBack);let l=new Array;for(let n of g)if(!(v&&v<p&&(n.timestamp<=v||n===m)))if(n.timestamp<p)l.push(n);else{let u=t(n,!1);d.addAction({doAction:()=>{u()},delay:n.delay})}r(l),i.emit(V.Flush),d.start()},pause(c){c.timer.clear()},resetLastPlayedEvent:Ge(c=>ne(P({},c),{lastPlayedEvent:null})),startLive:Ge({baselineTime:(c,d)=>(c.timer.start(),d.type==="TO_LIVE"&&d.payload.baselineTime?d.payload.baselineTime:Date.now())}),addEvent:Ge((c,d)=>{let{baselineTime:f,timer:p,events:m}=c;if(d.type==="ADD_EVENT"){let{event:g}=d.payload;ms(g,f);let v=m.length-1;if(!m[v]||m[v].timestamp<=g.timestamp)m.push(g);else{let n=-1,u=0;for(;u<=v;){let s=Math.floor((u+v)/2);m[s].timestamp<=g.timestamp?u=s+1:v=s-1}n===-1&&(n=u),m.splice(n,0,g)}let l=g.timestamp<f,o=t(g,l);l?o():p.isActive()&&p.addAction({doAction:()=>{o()},delay:g.delay})}return ne(P({},c),{events:m})})}}))}function kl(e){return Yi(qi({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:Ge({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}}))}var Pl=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Ss=new Map;function Ji(e,t){let r=Ss.get(e);return r||(r=new Map,Ss.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function _e(e,t,r){return async i=>{if(i&&typeof i=="object"&&"rr_type"in i)if(r&&(r.isUnchanged=!1),i.rr_type==="ImageBitmap"&&"args"in i){let c=await _e(e,t,r)(i.args);return await createImageBitmap.apply(null,c)}else if("index"in i){if(r||t===null)return i;let{rr_type:c,index:d}=i;return Ji(t,c)[d]}else if("args"in i){let{rr_type:c,args:d}=i,f=window[c];return new f(...await Promise.all(d.map(_e(e,t,r))))}else{if("base64"in i)return Sl(i.base64);if("src"in i){let c=e.get(i.src);if(c)return c;{let d=new Image;return d.src=i.src,e.set(i.src,d),d}}else if("data"in i&&i.rr_type==="Blob"){let c=await Promise.all(i.data.map(_e(e,t,r)));return new Blob(c,{type:i.type})}}else if(Array.isArray(i))return await Promise.all(i.map(_e(e,t,r)));return i}}function Fl(e,t){try{return t===Le.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}var Ul=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Bl(e,t){if(!(t!=null&&t.constructor))return;let{name:r}=t.constructor;if(!Ul.includes(r))return;let i=Ji(e,r);i.includes(t)||i.push(t)}async function Wl({mutation:e,target:t,type:r,imageMap:i,errorHandler:c}){try{let d=Fl(t,r);if(!d)return;if(e.setter){d[e.property]=e.args[0];return}let f=d[e.property],p=await Promise.all(e.args.map(_e(i,d)));Bl(d,f.apply(d,p))}catch(d){c(e,d)}}async function $l({event:e,mutations:t,target:r,imageMap:i,errorHandler:c}){let d=r.getContext("2d");if(!d){c(t[0],new Error("Canvas context is null"));return}let f=t.map(async p=>Promise.all(p.args.map(_e(i,d))));(await Promise.all(f)).forEach((p,m)=>{let g=t[m];try{if(g.setter){d[g.property]=g.args[0];return}let v=d[g.property];g.property==="drawImage"&&typeof g.args[0]=="string"?(i.get(e),v.apply(d,g.args)):v.apply(d,p)}catch(v){c(g,v)}})}async function Cs({event:e,mutation:t,target:r,imageMap:i,canvasEventMap:c,errorHandler:d}){try{let f=c.get(e)||t,p="commands"in f?f.commands:[f];if([Le.WebGL,Le.WebGL2].includes(t.type)){for(let m=0;m<p.length;m++){let g=p[m];await Wl({mutation:g,type:t.type,target:r,imageMap:i,errorHandler:d})}return}await $l({event:e,mutations:p,target:r,imageMap:i,errorHandler:d})}catch(f){d(t,f)}}var zl=class{constructor(e){R(this,"mediaMap",new Map);R(this,"warn");R(this,"service");R(this,"speedService");R(this,"emitter");R(this,"getCurrentTime");R(this,"metadataCallbackMap",new Map);this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(V.Start,this.start.bind(this)),this.emitter.on(V.SkipStart,this.start.bind(this)),this.emitter.on(V.Pause,this.pause.bind(this)),this.emitter.on(V.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{if(this.syncTargetWithState(r),e.pause)try{r.pause()}catch(i){this.warn(`Failed to sync media element: ${i.message||i}`)}})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let i=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,c="duration"in t&&t.duration;if(Number.isNaN(c)){this.waitForMetadata(t);return}let d=r.currentTimeAtLastInteraction+i;t.loop&&c!==!1&&(d=d%c),t.currentTime=d}else{try{t.pause()}catch(i){this.warn(`Failed to pause during seek: ${i.message||i}`)}t.currentTime=r.currentTimeAtLastInteraction}}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=()=>{this.metadataCallbackMap.delete(e);let r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var v,l,o,n,u;let i=this.mediaMap.get(e),{type:c,playbackRate:d,currentTime:f,muted:p,volume:m,loop:g}=r;return{isPlaying:c===Be.Play||c!==Be.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(v=f!=null?f:i==null?void 0:i.currentTimeAtLastInteraction)!=null?v:0,lastInteractionTimeOffset:t,playbackRate:(l=d!=null?d:i==null?void 0:i.playbackRate)!=null?l:1,volume:(o=m!=null?m:i==null?void 0:i.volume)!=null?o:1,muted:(n=p!=null?p:i==null?void 0:i.muted)!=null?n:e.getAttribute("muted")===null,loop:(u=g!=null?g:i==null?void 0:i.loop)!=null?u:e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:c,isPlaying:d}=t,f=this.service.state.matches("paused"),p=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==c&&(e.volume=c),e.muted=r,e.loop=i,e.playbackRate!==p&&(e.playbackRate=p),d&&!f?e.play():e.pause()}catch(m){this.warn(`Failed to replay media interactions: ${m.message||m}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,c=r.getMeta(i);if(!c||!("attributes"in c))return;let d=this.service.state.matches("paused"),f=c.attributes,p=!1;f.rr_mediaState?p=f.rr_mediaState==="played":p=i.getAttribute("autoplay")!==null,p&&d&&i.pause();let m=1;typeof f.rr_mediaPlaybackRate=="number"&&(m=f.rr_mediaPlaybackRate);let g=!1;typeof f.rr_mediaMuted=="boolean"?g=f.rr_mediaMuted:g=i.getAttribute("muted")!==null;let v=!1;typeof f.rr_mediaLoop=="boolean"?v=f.rr_mediaLoop:v=i.getAttribute("loop")!==null;let l=1;typeof f.rr_mediaVolume=="number"&&(l=f.rr_mediaVolume);let o=0;typeof f.rr_mediaCurrentTime=="number"&&(o=f.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:p,currentTimeAtLastInteraction:o,lastInteractionTimeOffset:t,playbackRate:m,volume:l,muted:g,loop:v}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function Ct(e,t){if(e.nodeName!=="DIALOG"||e instanceof Ne)return;let r=e,i=r.open,c=i&&r.matches("dialog:modal"),d=r.getAttribute("rr_open_mode"),f=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",p=d==="modal";if(!(i&&!(c&&d==="non-modal"||!c&&p))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}i&&r.close(),f&&(p?r.showModal():r.show())}}function jl(e,t){if(e.nodeName!=="DIALOG"||e instanceof Ne)return;let r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}var Vl=5e3,Gl=Vi||Dl,xs="[replayer]",ir={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Es(e){return e.type==L.IncrementalSnapshot&&(e.data.source==_.TouchMove||e.data.source==_.MouseInteraction&&e.data.type==H.TouchStart)}var Hl=class{constructor(e,t){R(this,"wrapper");R(this,"iframe");R(this,"UNSAFE_replayCanvas",!1);R(this,"service");R(this,"speedService");R(this,"config");R(this,"usingVirtualDom",!1);R(this,"virtualDom",new qt);R(this,"mouse");R(this,"mouseTail",null);R(this,"tailPositions",[]);R(this,"emitter",Gl());R(this,"nextUserInteractionEvent");R(this,"legacy_missingNodeRetryMap",{});R(this,"cache",Xr());R(this,"imageMap",new Map);R(this,"canvasEventMap",new Map);R(this,"mirror",As());R(this,"styleMirror",new Li);R(this,"mediaManager");R(this,"firstFullSnapshot",null);R(this,"newDocumentQueue",[]);R(this,"mousePos",null);R(this,"touchActive",null);R(this,"lastMouseDownEvent",null);R(this,"lastHoveredRootNode");R(this,"lastSelectionData",null);R(this,"constructedStyleMutations",[]);R(this,"adoptedStyleSheets",[]);R(this,"handleResize",e=>{this.iframe.style.display="inherit";for(let t of[this.mouseTail,this.iframe])t&&(t.setAttribute("width",String(e.width)),t.setAttribute("height",String(e.height)))});R(this,"applyEventsSynchronously",e=>{for(let t of e){switch(t.type){case L.DomContentLoaded:case L.Load:continue;case L.FullSnapshot:case L.Meta:case L.Plugin:case L.IncrementalSnapshot:}this.getCastFn(t,!0)()}});R(this,"getCastFn",(e,t=!1)=>{let r;switch(e.type){case L.DomContentLoaded:case L.Load:break;case L.Annotation:r=()=>this.emitter.emit(V.Annotation,e);break;case L.Custom:r=()=>{this.emitter.emit(V.CustomEvent,e)};break;case L.Meta:r=()=>this.emitter.emit(V.Resize,{width:e.data.width,height:e.data.height});break;case L.FullSnapshot:r=()=>{var c;if(this.firstFullSnapshot){if(this.firstFullSnapshot===e){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(e,t),(c=this.iframe.contentWindow)==null||c.scrollTo(e.data.initialOffset)};break;case L.IncrementalSnapshot:r=()=>{if(this.applyIncremental(e,t),!t&&(e===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let c of this.service.state.context.events)if(!(c.timestamp<=e.timestamp)&&this.isUserInteraction(c)){c.delay-e.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=c);break}if(this.nextUserInteractionEvent){let c=this.nextUserInteractionEvent.delay-e.delay,d={speed:Math.min(Math.round(c/Vl),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(V.SkipStart,d)}}}}return()=>{r&&r();for(let d of this.config.plugins||[])d.handler&&d.handler(e,t,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:e}});let c=this.service.state.context.events.length-1;if(!this.config.liveMode&&e===this.service.state.context.events[c]){let d=()=>{c<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(V.Finish))},f=50;e.type===L.IncrementalSnapshot&&e.data.source===_.MouseMove&&e.data.positions.length&&(f+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(V.EventCast,e)}});if(!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ir,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(V.Resize,this.handleResize),this.setupDom();for(let f of this.config.plugins||[])f.getMirror&&f.getMirror({nodeMirror:this.mirror});this.emitter.on(V.Flush,()=>{if(this.usingVirtualDom){let f={mirror:this.mirror,applyCanvas:(p,m,g)=>{Cs({event:p,mutation:m,target:g,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(p,m)=>{p.source===_.StyleSheetRule?this.applyStyleSheetRule(p,m):p.source===_.StyleDeclaration&&this.applyStyleDeclaration(p,m)},afterAppend:(p,m)=>{for(let g of this.config.plugins||[])g.onBuild&&g.onBuild(p,{id:m,replayer:this})}};if(this.iframe.contentDocument)try{It(this.iframe.contentDocument,this.virtualDom,f,this.virtualDom.mirror)}catch(p){this.warn(p)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let p in this.legacy_missingNodeRetryMap)try{let m=this.legacy_missingNodeRetryMap[p],g=Dt(m.node,this.mirror,this.virtualDom.mirror);It(g,m.node,f,this.virtualDom.mirror),m.node=g}catch(m){this.warn(m)}this.constructedStyleMutations.forEach(p=>{this.applyStyleSheetMutation(p)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(p=>{this.applyAdoptedStyleSheet(p)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){let[f,p]=this.lastMouseDownEvent;f.dispatchEvent(p)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(V.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Tl([],{speed:this.config.speed});this.service=Ll({events:e.map(f=>t&&t.unpackFn?t.unpackFn(f):f).sort((f,p)=>f.timestamp-p.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(f=>{this.emitter.emit(V.StateChange,{player:f})}),this.speedService=kl({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(f=>{this.emitter.emit(V.StateChange,{speed:f})}),this.mediaManager=new zl({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let c=this.service.state.context.events.find(f=>f.type===L.Meta),d=this.service.state.context.events.find(f=>f.type===L.FullSnapshot);if(c){let{width:f,height:p}=c.data;setTimeout(()=>{this.emitter.emit(V.Resize,{width:f,height:p})},0)}d&&setTimeout(()=>{var f;this.firstFullSnapshot||(this.firstFullSnapshot=d,this.rebuildFullSnapshot(d),(f=this.iframe.contentWindow)==null||f.scrollTo(d.data.initialOffset))},1),this.service.state.context.events.find(Es)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(V.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(V.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(V.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(V.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;Es(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Xr()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=Mo({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(Al(this.iframe.contentWindow,this.iframe.contentDocument),Di(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let r=[],i=new Set,c=(p,m)=>{if(p.nodeName==="DIALOG"&&i.add(p),this.collectIframeAndAttachDocument(r,p),this.mediaManager.isSupportedMediaElement(p)){let{events:g}=this.service.state.context;this.mediaManager.addMediaElements(p,e.timestamp-g[0].timestamp,this.mirror)}for(let g of this.config.plugins||[])g.onBuild&&g.onBuild(p,{id:m,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Eo(e.data.node,{doc:this.iframe.contentDocument,afterAppend:c,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),c(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:p,builtNode:m}of r)this.attachDocumentToIframe(p,m),this.newDocumentQueue=this.newDocumentQueue.filter(g=>g!==p);let{documentElement:d,head:f}=this.iframe.contentDocument;this.insertStyleRules(d,f),i.forEach(p=>Ct(p)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(V.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var i;let r=Pl(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!r.length)if(this.usingVirtualDom){let c=this.virtualDom.createElement("style");this.virtualDom.mirror.add(c,Ci(c,this.virtualDom.unserializedId)),e.insertBefore(c,t),c.rules.push({source:_.StyleSheetRule,adds:r.map((d,f)=>({rule:d,index:f}))})}else{let c=document.createElement("style");e.insertBefore(c,t);for(let d=0;d<r.length;d++)(i=c.sheet)==null||i.insertRule(r[d],d)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],c=new Set,d=(f,p)=>{f.nodeName==="DIALOG"&&c.add(f),this.collectIframeAndAttachDocument(i,f);let m=r.getMeta(f);if((m==null?void 0:m.type)===De.Element&&(m==null?void 0:m.tagName.toUpperCase())==="HTML"){let{documentElement:g,head:v}=t.contentDocument;this.insertStyleRules(g,v)}if(!this.usingVirtualDom)for(let g of this.config.plugins||[])g.onBuild&&g.onBuild(f,{id:p,replayer:this})};nt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:d,cache:this.cache}),d(t.contentDocument,e.node.id);for(let{mutationInQueue:f,builtNode:p}of i)this.attachDocumentToIframe(f,p),this.newDocumentQueue=this.newDocumentQueue.filter(m=>m!==f);c.forEach(f=>Ct(f))}collectIframeAndAttachDocument(e,t){if(ot(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var t;let e=(t=this.iframe.contentDocument)==null?void 0:t.head;if(e){let r=new Set,i,c=this.service.state,d=()=>{c=this.service.state};this.emitter.on(V.Start,d),this.emitter.on(V.Pause,d);let f=()=>{this.emitter.off(V.Start,d),this.emitter.off(V.Pause,d)};e.querySelectorAll('link[rel="stylesheet"]').forEach(p=>{p.sheet||(r.add(p),p.addEventListener("load",()=>{r.delete(p),r.size===0&&i!==-1&&(c.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(V.LoadStylesheetEnd),i&&clearTimeout(i),f())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(V.LoadStylesheetStart),i=setTimeout(()=>{c.matches("playing")&&this.play(this.getCurrentTime()),i=-1,f()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===L.IncrementalSnapshot&&t.data.source===_.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(r=>{this.preloadImages(r,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let r=document.createElement("canvas"),i=r.getContext("2d"),c=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(c,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async c=>{let d=await Promise.all(c.args.map(_e(this.imageMap,null,r)));return ne(P({},c),{args:d})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ne(P({},e),{commands:i}))}else{let i=await Promise.all(e.args.map(_e(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ne(P({},e),{args:i}))}}}applyIncremental(e,t){var i,c,d;let{data:r}=e;switch(r.source){case _.Mutation:try{this.applyMutation(r,t)}catch(f){this.warn(`Exception in mutation ${f.message||f}`,r)}break;case _.Drag:case _.TouchMove:case _.MouseMove:if(t){let f=r.positions[r.positions.length-1];this.mousePos={x:f.x,y:f.y,id:f.id,debugData:r}}else r.positions.forEach(f=>{let p={doAction:()=>{this.moveAndHover(f.x,f.y,f.id,t,r)},delay:f.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(p)}),this.timer.addAction({doAction(){},delay:e.delay-((i=r.positions[0])==null?void 0:i.timeOffset)});break;case _.MouseInteraction:{if(r.id===-1)break;let f=new Event(Oe(H[r.type])),p=this.mirror.getNode(r.id);if(!p)return this.debugNodeNotFound(r,r.id);this.emitter.emit(V.MouseInteraction,{type:r.type,target:p});let{triggerFocus:m}=this.config;switch(r.type){case H.Blur:"blur"in p&&p.blur();break;case H.Focus:m&&p.focus&&p.focus({preventScroll:!0});break;case H.Click:case H.TouchStart:case H.TouchEnd:case H.MouseDown:case H.MouseUp:t?(r.type===H.TouchStart?this.touchActive=!0:r.type===H.TouchEnd&&(this.touchActive=!1),r.type===H.MouseDown?this.lastMouseDownEvent=[p,f]:r.type===H.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:r.x||0,y:r.y||0,id:r.id,debugData:r}):(r.type===H.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(r.x||0,r.y||0,r.id,t,r),r.type===H.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):r.type===H.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):r.type===H.TouchEnd?this.mouse.classList.remove("touch-active"):p.dispatchEvent(f));break;case H.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:p.dispatchEvent(f)}break}case _.Scroll:if(r.id===-1)break;if(this.usingVirtualDom){let f=this.virtualDom.mirror.getNode(r.id);if(!f)return this.debugNodeNotFound(r,r.id);f.scrollData=r;break}this.applyScroll(r,t);break;case _.ViewportResize:this.emitter.emit(V.Resize,{width:r.width,height:r.height});break;case _.Input:if(r.id===-1)break;if(this.usingVirtualDom){let f=this.virtualDom.mirror.getNode(r.id);if(!f)return this.debugNodeNotFound(r,r.id);f.inputData=r;break}this.applyInput(r);break;case _.MediaInteraction:{let f=this.usingVirtualDom?this.virtualDom.mirror.getNode(r.id):this.mirror.getNode(r.id);if(!f)return this.debugNodeNotFound(r,r.id);let p=f,{events:m}=this.service.state.context;this.mediaManager.mediaMutation({target:p,timeOffset:e.timestamp-m[0].timestamp,mutation:r});break}case _.StyleSheetRule:case _.StyleDeclaration:this.usingVirtualDom?r.styleId?this.constructedStyleMutations.push(r):r.id&&((c=this.virtualDom.mirror.getNode(r.id))==null||c.rules.push(r)):this.applyStyleSheetMutation(r);break;case _.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let f=this.virtualDom.mirror.getNode(r.id);if(!f)return this.debugNodeNotFound(r,r.id);f.canvasMutations.push({event:e,mutation:r})}else{let f=this.mirror.getNode(r.id);if(!f)return this.debugNodeNotFound(r,r.id);Cs({event:e,mutation:r,target:f,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case _.Font:try{let f=new FontFace(r.family,r.buffer?new Uint8Array(JSON.parse(r.fontSource)):r.fontSource,r.descriptors);(d=this.iframe.contentDocument)==null||d.fonts.add(f)}catch(f){this.warn(f)}break;case _.Selection:if(t){this.lastSelectionData=r;break}this.applySelection(r);break;case _.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(r):this.applyAdoptedStyleSheet(r)}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Da(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let m in this.legacy_missingNodeRetryMap)try{let g=this.legacy_missingNodeRetryMap[m],v=Si(g.node,this.virtualDom,this.mirror);v&&(g.node=v)}catch(g){this.warn(g)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(m=>r.getNode(m.id)?!0:(this.warnNodeNotFound(e,m.id),!1)),e.removes.forEach(m=>{var l;let g=r.getNode(m.id);if(!g)return;let v=r.getNode(m.parentId);if(!v)return this.warnNodeNotFound(e,m.parentId);if(m.isShadow&&We(v)&&(v=v.shadowRoot),r.removeNodeFromMap(g),v)try{v.removeChild(g),this.usingVirtualDom&&g.nodeName==="#text"&&v.nodeName==="STYLE"&&((l=v.rules)==null?void 0:l.length)>0&&(v.rules=[])}catch(o){if(o instanceof DOMException)this.warn("parent could not remove child in mutation",v,g,e);else throw o}});let i=P({},this.legacy_missingNodeRetryMap),c=[],d=m=>{let g=null;return m.nextId&&(g=r.getNode(m.nextId)),m.nextId!==null&&m.nextId!==void 0&&m.nextId!==-1&&!g},f=m=>{var a,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let g=r.getNode(m.parentId);if(!g)return m.node.type===De.Document?this.newDocumentQueue.push(m):c.push(m);m.node.isShadow&&(We(g)||g.attachShadow({mode:"open"}),g=g.shadowRoot);let v=null,l=null;if(m.previousId&&(v=r.getNode(m.previousId)),m.nextId&&(l=r.getNode(m.nextId)),d(m))return c.push(m);if(m.node.rootId&&!r.getNode(m.node.rootId))return;let o=m.node.rootId?r.getNode(m.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ot(g,r)){this.attachDocumentToIframe(m,g);return}let n=(y,w)=>{if(!this.usingVirtualDom){Ct(y);for(let b of this.config.plugins||[])b.onBuild&&b.onBuild(y,{id:w,replayer:this})}},u=nt(m.node,{doc:o,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:n});if(m.previousId===-1||m.nextId===-1){i[m.node.id]={node:u,mutation:m};return}let s=r.getMeta(g);if(s&&s.type===De.Element&&m.node.type===De.Text){let y=Array.isArray(g.childNodes)?g.childNodes:Array.from(g.childNodes);if(s.tagName==="textarea")for(let w of y)w.nodeType===g.TEXT_NODE&&g.removeChild(w);else if(s.tagName==="style"&&y.length===1)for(let w of y)w.nodeType===g.TEXT_NODE&&!r.hasNode(w)&&(u.textContent=w.textContent,g.removeChild(w))}else if((s==null?void 0:s.type)===De.Document){let y=g;m.node.type===De.DocumentType&&((a=y.childNodes[0])==null?void 0:a.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),u.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(v&&v.nextSibling&&v.nextSibling.parentNode?g.insertBefore(u,v.nextSibling):l&&l.parentNode?g.contains(l)?g.insertBefore(u,l):g.insertBefore(u,null):g.appendChild(u),n(u,m.node.id),this.usingVirtualDom&&u.nodeName==="#text"&&g.nodeName==="STYLE"&&((h=g.rules)==null?void 0:h.length)>0&&(g.rules=[]),ot(u,this.mirror)){let y=this.mirror.getId(u),w=this.newDocumentQueue.find(b=>b.parentId===y);w&&(this.attachDocumentToIframe(w,u),this.newDocumentQueue=this.newDocumentQueue.filter(b=>b!==w))}(m.previousId||m.nextId)&&this.legacy_resolveMissingNode(i,g,u,m)};e.adds.forEach(m=>{f(m)});let p=Date.now();for(;c.length;){let m=Qa(c);if(c.length=0,Date.now()-p>500){this.warn("Timeout in the loop, please check the resolve tree data:",m);break}for(let g of m)r.getNode(g.value.parentId)?Ai(g,v=>{f(v)}):this.debug("Drop resolve tree since there is no parent for the root node.",g)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Za(e.texts).forEach(m=>{var l;let g=r.getNode(m.id);if(!g)return e.removes.find(o=>o.id===m.id)?void 0:this.warnNodeNotFound(e,m.id);let v=g.parentElement;if(m.value&&v&&v.tagName==="STYLE"?g.textContent=Bt(m.value,this.cache):g.textContent=m.value,this.usingVirtualDom){let o=g.parentNode;((l=o==null?void 0:o.rules)==null?void 0:l.length)>0&&(o.rules=[])}}),e.attributes.forEach(m=>{var v;let g=r.getNode(m.id);if(!g)return e.removes.find(l=>l.id===m.id)?void 0:this.warnNodeNotFound(e,m.id);for(let l in m.attributes)if(typeof l=="string"){let o=m.attributes[l];if(o===null)g.removeAttribute(l),l==="open"&&jl(g,m);else if(typeof o=="string")try{if(l==="_cssText"&&(g.nodeName==="LINK"||g.nodeName==="STYLE"))try{let n=r.getMeta(g),u=nt(ne(P({},n),{attributes:P(P({},n.attributes),m.attributes)}),{doc:g.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(n.attributes,m.attributes);let s=g.nextSibling,a=g.parentNode;if(u&&a){a.removeChild(g),a.insertBefore(u,s),r.replace(m.id,u);break}}catch(n){}if(l==="value"&&g.nodeName==="TEXTAREA"){let n=g;n.childNodes.forEach(s=>n.removeChild(s));let u=(v=g.ownerDocument)==null?void 0:v.createTextNode(o);u&&n.appendChild(u)}else g.setAttribute(l,o);l==="rr_open_mode"&&g.nodeName==="DIALOG"&&Ct(g,m)}catch(n){this.warn("An error occurred may due to the checkout feature.",n)}else if(l==="style"){let n=o,u=g;for(let s in n)if(n[s]===!1)u.style.removeProperty(s);else if(n[s]instanceof Array){let a=n[s];u.style.setProperty(s,a[0],a[1])}else{let a=n[s];u.style.setProperty(s,a)}}}})}applyScroll(e,t){var c,d;let r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);let i=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)(c=this.iframe.contentWindow)==null||c.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((i==null?void 0:i.type)===De.Document)(d=r.defaultView)==null||d.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(f){}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{let t=new Set,r=e.ranges.map(({start:i,startOffset:c,end:d,endOffset:f})=>{var l;let p=this.mirror.getNode(i),m=this.mirror.getNode(d);if(!p||!m)return;let g=new Range;g.setStart(p,c),g.setEnd(m,f);let v=(l=p.ownerDocument)==null?void 0:l.getSelection();return v&&t.add(v),{range:g,selection:v}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var c;return i&&((c=i.selection)==null?void 0:c.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var r;let t=null;e.styleId?t=this.styleMirror.getStyle(e.styleId):e.id&&(t=((r=this.mirror.getNode(e.id))==null?void 0:r.sheet)||null),t&&(e.source===_.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===_.StyleDeclaration&&this.applyStyleDeclaration(e,t))}applyStyleSheetRule(e,t){var r,i,c,d;if((r=e.adds)==null||r.forEach(({rule:f,index:p})=>{var m;try{if(Array.isArray(p)){let{positions:g,index:v}=os(p);(m=tt(t.cssRules,g))==null||m.insertRule(f,v)}else{let g=p===void 0?void 0:Math.min(p,t.cssRules.length);t==null||t.insertRule(f,g)}}catch(g){}}),(i=e.removes)==null||i.forEach(({index:f})=>{var p;try{if(Array.isArray(f)){let{positions:m,index:g}=os(f);(p=tt(t.cssRules,m))==null||p.deleteRule(g||0)}else t==null||t.deleteRule(f)}catch(m){}}),typeof e.replace=="string")try{(c=t.replace)==null||c.call(t,e.replace)}catch(f){}if(typeof e.replaceSync=="string")try{(d=t.replaceSync)==null||d.call(t,e.replaceSync)}catch(f){}}applyStyleDeclaration(e,t){if(e.set){let r=tt(t.rules,e.index);r!=null&&r.style&&r.style.setProperty(e.set.property,e.set.value,e.set.priority)}if(e.remove){let r=tt(t.rules,e.index);r!=null&&r.style&&r.style.removeProperty(e.remove.property)}}applyAdoptedStyleSheet(e){var d;let t=this.mirror.getNode(e.id);if(!t)return;(d=e.styles)==null||d.forEach(f=>{var g;let p=null,m=null;if(We(t)?m=((g=t.ownerDocument)==null?void 0:g.defaultView)||null:t.nodeName==="#document"&&(m=t.defaultView),!!m)try{p=new m.CSSStyleSheet,this.styleMirror.add(p,f.styleId),this.applyStyleSheetRule({source:_.StyleSheetRule,adds:f.rules},p)}catch(v){}});let r=10,i=0,c=(f,p)=>{let m=p.map(g=>this.styleMirror.getStyle(g)).filter(g=>g!==null);We(f)?f.shadowRoot.adoptedStyleSheets=m:f.nodeName==="#document"&&(f.adoptedStyleSheets=m),m.length!==p.length&&i<r&&(setTimeout(()=>c(f,p),0+100*i),i++)};c(t,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:c,nextId:d}=i,f=c&&e[c],p=d&&e[d];if(f){let{node:m,mutation:g}=f;t.insertBefore(m,r),delete e[g.node.id],delete this.legacy_missingNodeRetryMap[g.node.id],(g.previousId||g.nextId)&&this.legacy_resolveMissingNode(e,t,m,g)}if(p){let{node:m,mutation:g}=p;t.insertBefore(m,r.nextSibling),delete e[g.node.id],delete this.legacy_missingNodeRetryMap[g.node.id],(g.previousId||g.nextId)&&this.legacy_resolveMissingNode(e,t,m,g)}}moveAndHover(e,t,r,i,c){let d=this.mirror.getNode(r);if(!d)return this.debugNodeNotFound(c,r);let f=_i(d,this.iframe),p=e*f.absoluteScale+f.x,m=t*f.absoluteScale+f.y;this.mouse.style.left=`${p}px`,this.mouse.style.top=`${m}px`,i||this.drawMouseTail({x:p,y:m}),this.hoverElements(d)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:c}=this.config.mouseTail===!0?ir:Object.assign({},ir,this.config.mouseTail),d=()=>{if(!this.mouseTail)return;let f=this.mouseTail.getContext("2d");!f||!this.tailPositions.length||(f.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),f.beginPath(),f.lineWidth=r,f.lineCap=t,f.strokeStyle=i,f.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(p=>f.lineTo(p.x,p.y)),f.stroke())};this.tailPositions.push(e),d(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(f=>f!==e),d()},c/this.speedService.state.context.timer.speed)}hoverElements(e){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let t=e;for(;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement}isUserInteraction(e){return e.type!==L.IncrementalSnapshot?!1:e.data.source>_.Mutation&&e.data.source<=_.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(V.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(xs,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(xs,...e)}},{addCustomEvent:Yl,addAnnotation:Jl}=Fe,{freezePage:Xl}=Fe,{takeFullSnapshot:Ql}=Fe;exports.Replayer=Hl;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
if (typeof module.exports == "object" && typeof exports == "object") {
  var __cp = (to, from, except, desc) => {
    if ((from && typeof from === "object") || typeof from === "function") {
      for (let key of Object.getOwnPropertyNames(from)) {
        if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
        Object.defineProperty(to, key, {
          get: () => from[key],
          enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
        });
      }
    }
    return to;
  };
  module.exports = __cp(module.exports, exports);
}
return module.exports;
}))
//# sourceMappingURL=replay.umd.min.cjs.map
