@posthog/rrweb-record 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,13 +11,13 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var An=Object.defineProperty,Pn=Object.defineProperties;var Nn=Object.getOwnPropertyDescriptors;var Ge=Object.getOwnPropertySymbols;var ts=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable;var es=(e,t,s)=>t in e?An(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,T=(e,t)=>{for(var s in t||(t={}))ts.call(t,s)&&es(e,s,t[s]);if(Ge)for(var s of Ge(t))rs.call(t,s)&&es(e,s,t[s]);return e},ae=(e,t)=>Pn(e,Nn(t));var Ie=(e,t)=>{var s={};for(var o in e)ts.call(e,o)&&t.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&Ge)for(var o of Ge(e))t.indexOf(o)<0&&rs.call(e,o)&&(s[o]=e[o]);return s};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var _n=Object.defineProperty,kn=(e,t,s)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,A=(e,t,s)=>kn(e,typeof t!="symbol"?t+"":t,s),ss,Ln=Object.defineProperty,Dn=(e,t,s)=>t in e?Ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,is=(e,t,s)=>Dn(e,typeof t!="symbol"?t+"":t,s),Y=(e=>(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))(Y||{});const ns={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},os={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Je={};function Tn(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Lr(e){if(Je[e])return Je[e];const t=Tn(e)||globalThis[e],s=t.prototype,o=e in ns?ns[e]:void 0,i=!!(o&&o.every(d=>{var m,f;return!!((f=(m=Object.getOwnPropertyDescriptor(s,d))==null?void 0:m.get)!=null&&f.toString().includes("[native code]"))})),l=e in os?os[e]:void 0,h=!!(l&&l.every(d=>{var m;return typeof s[d]=="function"&&((m=s[d])==null?void 0:m.toString().includes("[native code]"))}));if(i&&h)return Je[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");document.body.appendChild(d);const m=d.contentWindow;if(!m)return t.prototype;const f=m[e].prototype;return document.body.removeChild(d),f?Je[e]=f:s}catch(d){return s}}const vt={};function Se(e,t,s){var o;const i=`${e}.${String(s)}`;if(vt[i])return vt[i].call(t);const l=Lr(e),h=(o=Object.getOwnPropertyDescriptor(l,s))==null?void 0:o.get;return h?(vt[i]=h,h.call(t)):t[s]}const Ct={};function ki(e,t,s){const o=`${e}.${String(s)}`;if(Ct[o])return Ct[o].bind(t);const l=Lr(e)[s];return typeof l!="function"?t[s]:(Ct[o]=l,l.bind(t))}function Fn(e){return Se("Node",e,"childNodes")}function Un(e){return Se("Node",e,"parentNode")}function $n(e){return Se("Node",e,"parentElement")}function Bn(e){return Se("Node",e,"textContent")}function zn(e,t){return ki("Node",e,"contains")(t)}function Wn(e){return ki("Node",e,"getRootNode")()}function qn(e){return!e||!("host"in e)?null:Se("ShadowRoot",e,"host")}function jn(e){return e.styleSheets}function Hn(e){return!e||!("shadowRoot"in e)?null:Se("Element",e,"shadowRoot")}function Vn(e,t){return Se("Element",e,"querySelector")(t)}function Gn(e,t){return Se("Element",e,"querySelectorAll")(t)}function Jn(){return Lr("MutationObserver").constructor}function Yn(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const K={childNodes:Fn,parentNode:Un,parentElement:$n,textContent:Bn,contains:zn,getRootNode:Wn,host:qn,styleSheets:jn,shadowRoot:Hn,querySelector:Vn,querySelectorAll:Gn,mutationObserver:Jn,patch:Yn};function Li(e){return e.nodeType===e.ELEMENT_NODE}function Fe(e){const t=e&&"host"in e&&"mode"in e&&K.host(e)||null;return!!(t&&"shadowRoot"in t&&K.shadowRoot(t)===e)}function Ue(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Qn(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 Xn(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function nt(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);const o=Array.from(t,i=>Di(i,s)).join("");return Qn(o)}catch(t){return null}}function Di(e,t){var s;if(Zn(e)){let o;try{o=nt(e.styleSheet)||Xn(e)}catch(i){o=e.cssText}try{if(o&&((s=e.styleSheet)!=null&&s.href))return ot(o,e.styleSheet.href)}catch(i){}return o}else{let o=e.cssText;return eo(e)&&e.selectorText.includes(":")&&(o=Kn(o)),t?ot(o,t):o}}function Kn(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Zn(e){return"styleSheet"in e}function eo(e){return"selectorText"in e}class Ti{constructor(){is(this,"idNodeMap",new Map),is(this,"nodeMetaMap",new WeakMap)}getId(t){var s;if(!t)return-1;const o=(s=this.getMeta(t))==null?void 0:s.id;return o!=null?o:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const o=s.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,s)}replace(t,s){const o=this.getNode(t);if(o){const i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function to(){return new Ti}function Dr({element:e,maskInputOptions:t,tagName:s,type:o,value:i,maskInputFn:l}){let h=i||"";const d=o&&Re(o);return(t[s.toLowerCase()]||d&&t[d])&&(l?h=l(h,e):h="*".repeat(h.length)),h}function Re(e){return e.toLowerCase()}const as="__rrweb_original__";function ro(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let o=0;o<e.width;o+=s)for(let i=0;i<e.height;i+=s){const l=t.getImageData,h=as in l?l[as]:l;if(new Uint32Array(h.call(t,o,i,Math.min(s,e.width-o),Math.min(s,e.height-i)).data.buffer).some(m=>m!==0))return!1}return!0}function Tr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Re(t):null}function Fi(e,t){var l;let s;try{s=new URL(e,t!=null?t:window.location.href)}catch(h){return null}const o=/\.([0-9a-z]+)(?:$)/i,i=s.pathname.match(o);return(l=i==null?void 0:i[1])!=null?l:null}function so(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const io=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,no=/^(?:[a-z+]+:)?\/\//i,oo=/^www\..*/i,ao=/^(data:)([^,]*),(.*)/i;function ot(e,t){return(e||"").replace(io,(s,o,i,l,h,d)=>{const m=i||h||d,f=o||l||"";if(!m)return s;if(no.test(m)||oo.test(m))return`url(${f}${m}${f})`;if(ao.test(m))return`url(${f}${m}${f})`;if(m[0]==="/")return`url(${f}${so(t)+m}${f})`;const r=t.split("/"),u=m.split("/");r.pop();for(const a of u)a!=="."&&(a===".."?r.pop():r.push(a));return`url(${f}${r.join("/")}${f})`})}let lo=1;const uo=new RegExp("[^a-z0-9-_:]"),Be=-2;function Ui(){return lo++}function co(e){if(e instanceof HTMLFormElement)return"form";const t=Re(e.tagName);return uo.test(t)?"div":t}let Ae,ls;const ho=/^[^ \t\n\r\u000c]+/,fo=/^[, \t\n\r\u000c]+/;function po(e,t){if(t.trim()==="")return t;let s=0;function o(l){let h;const d=l.exec(t.substring(s));return d?(h=d[0],s+=h.length,h):""}const i=[];for(;o(fo),!(s>=t.length);){let l=o(ho);if(l.slice(-1)===",")l=_e(e,l.substring(0,l.length-1)),i.push(l);else{let h="";l=_e(e,l);let d=!1;for(;;){const m=t.charAt(s);if(m===""){i.push((l+h).trim());break}else if(d)m===")"&&(d=!1);else if(m===","){s+=1,i.push((l+h).trim());break}else m==="("&&(d=!0);h+=m,s+=1}}}return i.join(", ")}const us=new WeakMap;function _e(e,t){return!t||t.trim()===""?t:Fr(e,t)}function mo(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Fr(e,t){let s=us.get(e);if(s||(s=e.createElement("a"),us.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function $i(e,t,s,o){return o&&(s==="src"||s==="href"&&!(t==="use"&&o[0]==="#")||s==="xlink:href"&&o[0]!=="#"||s==="background"&&(t==="table"||t==="td"||t==="th")?_e(e,o):s==="srcset"?po(e,o):s==="style"?ot(o,Fr(e)):t==="object"&&s==="data"?_e(e,o):o)}function Bi(e,t,s){return(e==="video"||e==="audio")&&t==="autoplay"}function go(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}if(s)return e.matches(s)}catch(o){}return!1}function at(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?at(K.parentNode(e),t,s):!1;for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}return s?at(K.parentNode(e),t,s):!1}function zi(e,t,s,o){let i;if(Li(e)){if(i=e,!K.childNodes(i).length)return!1}else{if(K.parentElement(e)===null)return!1;i=K.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(at(i,t,o))return!0;if(s){if(o){if(i.closest(s))return!0}else if(i.matches(s))return!0}}catch(l){}return!1}function yo(e,t,s){const o=e.contentWindow;if(!o)return;let i=!1,l;try{l=o.document.readyState}catch(d){return}if(l!=="complete"){const d=setTimeout(()=>{i||(t(),i=!0)},s);e.addEventListener("load",()=>{clearTimeout(d),i=!0,t()});return}const h="about:blank";if(o.location.href!==h||e.src===h||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function wo(e,t,s){let o=!1,i;try{i=e.sheet}catch(h){return}if(i)return;const l=setTimeout(()=>{o||(t(),o=!0)},s);e.addEventListener("load",()=>{clearTimeout(l),o=!0,t()})}function bo(e,t){const{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:h,inlineStylesheet:d,maskInputOptions:m={},maskTextFn:f,maskInputFn:r,dataURLOptions:u={},inlineImages:a,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:c=!1}=t,g=So(s,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:e.compatMode}:{type:Y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return xo(e,{doc:s,blockClass:i,blockSelector:l,inlineStylesheet:d,maskInputOptions:m,maskInputFn:r,dataURLOptions:u,inlineImages:a,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:c,rootId:g});case e.TEXT_NODE:return vo(e,{doc:s,needsMask:h,maskTextFn:f,rootId:g});case e.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:Y.Comment,textContent:K.textContent(e)||"",rootId:g};default:return!1}}function So(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function vo(e,t){var s;const{needsMask:o,maskTextFn:i,rootId:l}=t,h=K.parentNode(e),d=h&&h.tagName;let m=K.textContent(e);const f=d==="STYLE"?!0:void 0,r=d==="SCRIPT"?!0:void 0;if(f&&m){try{e.nextSibling||e.previousSibling||(s=h.sheet)!=null&&s.cssRules&&(m=nt(h.sheet))}catch(u){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${u}`,e)}m=ot(m,Fr(t.doc))}return r&&(m="SCRIPT_PLACEHOLDER"),!f&&!r&&m&&o&&(m=i?i(m,K.parentElement(e)):m.replace(/[\S]/g,"*")),{type:Y.Text,textContent:m||"",isStyle:f,rootId:l}}function cs(e,t){return Array.from(e.styleSheets).find(s=>s.href===t)}function Co(e){return e.href}function xo(e,t){const{doc:s,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:h={},maskInputFn:d,dataURLOptions:m={},inlineImages:f,recordCanvas:r,keepIframeSrcFn:u,newlyAddedElement:a=!1,rootId:n}=t,p=go(e,o,i),c=co(e);let g={};const v=e.attributes.length;for(let S=0;S<v;S++){const x=e.attributes[S];Bi(c,x.name,x.value)||(g[x.name]=$i(s,c,Re(x.name),x.value))}if(c==="link"&&l){const S=Co(e);if(S){let x=cs(s,S);if(!x&&S.includes(".css")){const w=window.location.origin,C=S.replace(window.location.href,""),R=w+"/"+C;x=cs(s,R)}let y=null;x&&(y=nt(x)),y&&(delete g.rel,delete g.href,g._cssText=y)}}if(c==="style"&&e.sheet&&!(e.innerText||K.textContent(e)||"").trim().length){const S=nt(e.sheet);S&&(g._cssText=S)}if(c==="input"||c==="textarea"||c==="select"){const S=e.value,x=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=Dr({element:e,type:Tr(e),tagName:c,value:S,maskInputOptions:h,maskInputFn:d}):x&&(g.checked=x)}if(c==="option"&&(e.selected&&!h.select?g.selected=!0:delete g.selected),c==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(S){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(c==="canvas"&&r){if(e.__context==="2d")ro(e)||(g.rr_dataURL=e.toDataURL(m.type,m.quality));else if(!("__context"in e)){const S=e.toDataURL(m.type,m.quality),x=s.createElement("canvas");x.width=e.width,x.height=e.height;const y=x.toDataURL(m.type,m.quality);S!==y&&(g.rr_dataURL=S)}}if(c==="img"&&f){Ae||(Ae=s.createElement("canvas"),ls=Ae.getContext("2d"));const S=e,x=S.currentSrc||S.getAttribute("src")||"<unknown-src>",y=S.crossOrigin,w=()=>{S.removeEventListener("load",w);try{Ae.width=S.naturalWidth,Ae.height=S.naturalHeight,ls.drawImage(S,0,0),g.rr_dataURL=Ae.toDataURL(m.type,m.quality)}catch(C){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?w():S.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${x}! Error: ${C}`)}S.crossOrigin==="anonymous"&&(y?g.crossOrigin=y:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?w():S.addEventListener("load",w)}if(c==="audio"||c==="video"){const S=g;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(a||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),p){const{width:S,height:x}=e.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${x}px`}}c==="iframe"&&!u(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(c)&&(b=!0)}catch(S){}return{type:Y.Element,tagName:c,attributes:g,childNodes:[],isSVG:mo(e)||void 0,needBlock:p,rootId:n,isCustom:b}}function W(e){return e==null?"":e.toLowerCase()}function Ro(e,t){if(t.comment&&e.type===Y.Comment)return!0;if(e.type===Y.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"&&Fi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(W(e.attributes.name).match(/^msapplication-tile(image|color)$/)||W(e.attributes.name)==="application-name"||W(e.attributes.rel)==="icon"||W(e.attributes.rel)==="apple-touch-icon"||W(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&W(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(W(e.attributes.property).match(/^(og|twitter|fb):/)||W(e.attributes.name).match(/^(og|twitter):/)||W(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(W(e.attributes.name)==="robots"||W(e.attributes.name)==="googlebot"||W(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(W(e.attributes.name)==="author"||W(e.attributes.name)==="generator"||W(e.attributes.name)==="framework"||W(e.attributes.name)==="publisher"||W(e.attributes.name)==="progid"||W(e.attributes.property).match(/^article:/)||W(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(W(e.attributes.name)==="google-site-verification"||W(e.attributes.name)==="yandex-verification"||W(e.attributes.name)==="csrf-token"||W(e.attributes.name)==="p:domain_verify"||W(e.attributes.name)==="verify-v1"||W(e.attributes.name)==="verification"||W(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ke(e,t){const{doc:s,mirror:o,blockClass:i,blockSelector:l,maskTextClass:h,maskTextSelector:d,skipChild:m=!1,inlineStylesheet:f=!0,maskInputOptions:r={},maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p={},inlineImages:c=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=zi(e,h,d,R===void 0));const M=bo(e,{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:R,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,dataURLOptions:p,inlineImages:c,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C});if(!M)return console.warn(e,"not serialized"),null;let _;o.hasNode(e)?_=o.getId(e):Ro(M,n)||!I&&M.type===Y.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?_=Be:_=Ui();const P=Object.assign(M,{id:_});if(o.add(e,P),_===Be)return null;v&&v(e);let Z=!m;if(P.type===Y.Element){Z=Z&&!P.needBlock,delete P.needBlock;const O=K.shadowRoot(e);O&&Ue(O)&&(P.isShadowHost=!0)}if((P.type===Y.Document||P.type===Y.Element)&&Z){n.headWhitespace&&P.type===Y.Element&&P.tagName==="head"&&(I=!1);const O={doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:R,maskTextClass:h,maskTextSelector:d,skipChild:m,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w};if(!(P.type===Y.Element&&P.tagName==="textarea"&&P.attributes.value!==void 0))for(const L of Array.from(K.childNodes(e))){const $=ke(L,O);$&&P.childNodes.push($)}let Q=null;if(Li(e)&&(Q=K.shadowRoot(e)))for(const L of Array.from(K.childNodes(Q))){const $=ke(L,O);$&&(Ue(Q)&&($.isShadow=!0),P.childNodes.push($))}}const ee=K.parentNode(e);return ee&&Fe(ee)&&Ue(ee)&&(P.isShadow=!0),P.type===Y.Element&&P.tagName==="iframe"&&yo(e,()=>{const O=e.contentDocument;if(O&&b){const Q=ke(O,{doc:O,mirror:o,blockClass:i,blockSelector:l,needsMask:R,maskTextClass:h,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});Q&&b(e,Q)}},S),P.type===Y.Element&&P.tagName==="link"&&typeof P.attributes.rel=="string"&&(P.attributes.rel==="stylesheet"||P.attributes.rel==="preload"&&typeof P.attributes.href=="string"&&Fi(P.attributes.href)==="css")&&wo(e,()=>{if(x){const O=ke(e,{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:R,maskTextClass:h,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});O&&x(e,O)}},y),P}function Oo(e,t){const{mirror:s=new Ti,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:d=!0,inlineImages:m=!1,recordCanvas:f=!1,maskAllInputs:r=!1,maskTextFn:u,maskInputFn:a,slimDOM:n=!1,dataURLOptions:p,preserveWhiteSpace:c,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:y=()=>!1}=t||{};return ke(e,{doc:e,mirror:s,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:r===!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}:r===!1?{password:!0}:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:n==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:n===!1?{}:n,dataURLOptions:p,inlineImages:m,recordCanvas:f,preserveWhiteSpace:c,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:y,newlyAddedElement:!1})}function Mo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Eo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Ye={exports:{}},hs;function Io(){if(hs)return Ye.exports;hs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ye.exports=t(),Ye.exports.createColors=t,Ye.exports}const Ao={},Po=Object.freeze(Object.defineProperty({__proto__:null,default:Ao},Symbol.toStringTag,{value:"Module"})),ce=Eo(Po);var xt,fs;function Ur(){if(fs)return xt;fs=1;let e=Io(),t=ce;class s extends Error{constructor(i,l,h,d,m,f){super(i),this.name="CssSyntaxError",this.reason=i,m&&(this.file=m),d&&(this.source=d),f&&(this.plugin=f),typeof l!="undefined"&&typeof h!="undefined"&&(typeof l=="number"?(this.line=l,this.column=h):(this.line=l.line,this.column=l.column,this.endLine=h.line,this.endColumn=h.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(i){if(!this.source)return"";let l=this.source;i==null&&(i=e.isColorSupported);let h=n=>n,d=n=>n,m=n=>n;if(i){let{bold:n,gray:p,red:c}=e.createColors(!0);d=g=>n(c(g)),h=g=>p(g),t&&(m=g=>t(g))}let f=l.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),a=String(u).length;return f.slice(r,u).map((n,p)=>{let c=r+1+p,g=" "+(" "+c).slice(-a)+" | ";if(c===this.line){if(n.length>160){let b=20,S=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),y=n.slice(S,x),w=h(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return d(">")+h(g)+m(y)+`
14
+ "use strict";var Pn=Object.defineProperty,Nn=Object.defineProperties;var _n=Object.getOwnPropertyDescriptors;var Je=Object.getOwnPropertySymbols;var rs=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var ts=(e,t,s)=>t in e?Pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,T=(e,t)=>{for(var s in t||(t={}))rs.call(t,s)&&ts(e,s,t[s]);if(Je)for(var s of Je(t))ss.call(t,s)&&ts(e,s,t[s]);return e},ae=(e,t)=>Nn(e,_n(t));var Ae=(e,t)=>{var s={};for(var o in e)rs.call(e,o)&&t.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&Je)for(var o of Je(e))t.indexOf(o)<0&&ss.call(e,o)&&(s[o]=e[o]);return s};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var kn=Object.defineProperty,Ln=(e,t,s)=>t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,A=(e,t,s)=>Ln(e,typeof t!="symbol"?t+"":t,s),is,Dn=Object.defineProperty,Tn=(e,t,s)=>t in e?Dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ns=(e,t,s)=>Tn(e,typeof t!="symbol"?t+"":t,s),Y=(e=>(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))(Y||{});const os={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},as={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ye={};function Fn(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Dr(e){if(Ye[e])return Ye[e];const t=Fn(e)||globalThis[e],s=t.prototype,o=e in os?os[e]:void 0,i=!!(o&&o.every(d=>{var m,f;return!!((f=(m=Object.getOwnPropertyDescriptor(s,d))==null?void 0:m.get)!=null&&f.toString().includes("[native code]"))})),l=e in as?as[e]:void 0,h=!!(l&&l.every(d=>{var m;return typeof s[d]=="function"&&((m=s[d])==null?void 0:m.toString().includes("[native code]"))}));if(i&&h)return Ye[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");document.body.appendChild(d);const m=d.contentWindow;if(!m)return t.prototype;const f=m[e].prototype;return document.body.removeChild(d),f?Ye[e]=f:s}catch(d){return s}}const Ct={};function Se(e,t,s){var o;const i=`${e}.${String(s)}`;if(Ct[i])return Ct[i].call(t);const l=Dr(e),h=(o=Object.getOwnPropertyDescriptor(l,s))==null?void 0:o.get;return h?(Ct[i]=h,h.call(t)):t[s]}const xt={};function Li(e,t,s){const o=`${e}.${String(s)}`;if(xt[o])return xt[o].bind(t);const l=Dr(e)[s];return typeof l!="function"?t[s]:(xt[o]=l,l.bind(t))}function Un(e){return Se("Node",e,"childNodes")}function $n(e){return Se("Node",e,"parentNode")}function Bn(e){return Se("Node",e,"parentElement")}function zn(e){return Se("Node",e,"textContent")}function Wn(e,t){return Li("Node",e,"contains")(t)}function qn(e){return Li("Node",e,"getRootNode")()}function jn(e){return!e||!("host"in e)?null:Se("ShadowRoot",e,"host")}function Hn(e){return e.styleSheets}function Vn(e){return!e||!("shadowRoot"in e)?null:Se("Element",e,"shadowRoot")}function Gn(e,t){return Se("Element",e,"querySelector")(t)}function Jn(e,t){return Se("Element",e,"querySelectorAll")(t)}function Yn(){return Dr("MutationObserver").constructor}function Qn(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const K={childNodes:Un,parentNode:$n,parentElement:Bn,textContent:zn,contains:Wn,getRootNode:qn,host:jn,styleSheets:Hn,shadowRoot:Vn,querySelector:Gn,querySelectorAll:Jn,mutationObserver:Yn,patch:Qn};function Di(e){return e.nodeType===e.ELEMENT_NODE}function Ue(e){const t=e&&"host"in e&&"mode"in e&&K.host(e)||null;return!!(t&&"shadowRoot"in t&&K.shadowRoot(t)===e)}function $e(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Xn(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 Kn(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function ot(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);const o=Array.from(t,i=>Ti(i,s)).join("");return Xn(o)}catch(t){return null}}function Ti(e,t){var s;if(eo(e)){let o;try{o=ot(e.styleSheet)||Kn(e)}catch(i){o=e.cssText}try{if(o&&((s=e.styleSheet)!=null&&s.href))return at(o,e.styleSheet.href)}catch(i){}return o}else{let o=e.cssText;return to(e)&&e.selectorText.includes(":")&&(o=Zn(o)),t?at(o,t):o}}function Zn(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function eo(e){return"styleSheet"in e}function to(e){return"selectorText"in e}class Fi{constructor(){ns(this,"idNodeMap",new Map),ns(this,"nodeMetaMap",new WeakMap)}getId(t){var s;if(!t)return-1;const o=(s=this.getMeta(t))==null?void 0:s.id;return o!=null?o:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const o=s.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,s)}replace(t,s){const o=this.getNode(t);if(o){const i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ro(){return new Fi}function Tr({element:e,maskInputOptions:t,tagName:s,type:o,value:i,maskInputFn:l}){let h=i||"";const d=o&&Re(o);return(t[s.toLowerCase()]||d&&t[d])&&(l?h=l(h,e):h="*".repeat(h.length)),h}function Re(e){return e.toLowerCase()}const ls="__rrweb_original__";function so(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let o=0;o<e.width;o+=s)for(let i=0;i<e.height;i+=s){const l=t.getImageData,h=ls in l?l[ls]:l;if(new Uint32Array(h.call(t,o,i,Math.min(s,e.width-o),Math.min(s,e.height-i)).data.buffer).some(m=>m!==0))return!1}return!0}function Fr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Re(t):null}function Ui(e,t){var l;let s;try{s=new URL(e,t!=null?t:window.location.href)}catch(h){return null}const o=/\.([0-9a-z]+)(?:$)/i,i=s.pathname.match(o);return(l=i==null?void 0:i[1])!=null?l:null}function io(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const no=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,oo=/^(?:[a-z+]+:)?\/\//i,ao=/^www\..*/i,lo=/^(data:)([^,]*),(.*)/i;function at(e,t){return(e||"").replace(no,(s,o,i,l,h,d)=>{const m=i||h||d,f=o||l||"";if(!m)return s;if(oo.test(m)||ao.test(m))return`url(${f}${m}${f})`;if(lo.test(m))return`url(${f}${m}${f})`;if(m[0]==="/")return`url(${f}${io(t)+m}${f})`;const r=t.split("/"),u=m.split("/");r.pop();for(const a of u)a!=="."&&(a===".."?r.pop():r.push(a));return`url(${f}${r.join("/")}${f})`})}let uo=1;const co=new RegExp("[^a-z0-9-_:]"),ze=-2;function $i(){return uo++}function ho(e){if(e instanceof HTMLFormElement)return"form";const t=Re(e.tagName);return co.test(t)?"div":t}let Pe,us;const fo=/^[^ \t\n\r\u000c]+/,po=/^[, \t\n\r\u000c]+/;function mo(e,t){if(t.trim()==="")return t;let s=0;function o(l){let h;const d=l.exec(t.substring(s));return d?(h=d[0],s+=h.length,h):""}const i=[];for(;o(po),!(s>=t.length);){let l=o(fo);if(l.slice(-1)===",")l=ke(e,l.substring(0,l.length-1)),i.push(l);else{let h="";l=ke(e,l);let d=!1;for(;;){const m=t.charAt(s);if(m===""){i.push((l+h).trim());break}else if(d)m===")"&&(d=!1);else if(m===","){s+=1,i.push((l+h).trim());break}else m==="("&&(d=!0);h+=m,s+=1}}}return i.join(", ")}const cs=new WeakMap;function ke(e,t){return!t||t.trim()===""?t:Ur(e,t)}function go(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Ur(e,t){let s=cs.get(e);if(s||(s=e.createElement("a"),cs.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function Bi(e,t,s,o){return o&&(s==="src"||s==="href"&&!(t==="use"&&o[0]==="#")||s==="xlink:href"&&o[0]!=="#"||s==="background"&&(t==="table"||t==="td"||t==="th")?ke(e,o):s==="srcset"?mo(e,o):s==="style"?at(o,Ur(e)):t==="object"&&s==="data"?ke(e,o):o)}function zi(e,t,s){return(e==="video"||e==="audio")&&t==="autoplay"}function yo(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}if(s)return e.matches(s)}catch(o){}return!1}function lt(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?lt(K.parentNode(e),t,s):!1;for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}return s?lt(K.parentNode(e),t,s):!1}function Wi(e,t,s,o){let i;if(Di(e)){if(i=e,!K.childNodes(i).length)return!1}else{if(K.parentElement(e)===null)return!1;i=K.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(lt(i,t,o))return!0;if(s){if(o){if(i.closest(s))return!0}else if(i.matches(s))return!0}}catch(l){}return!1}function wo(e,t,s){const o=e.contentWindow;if(!o)return;let i=!1,l;try{l=o.document.readyState}catch(d){return}if(l!=="complete"){const d=setTimeout(()=>{i||(t(),i=!0)},s);e.addEventListener("load",()=>{clearTimeout(d),i=!0,t()});return}const h="about:blank";if(o.location.href!==h||e.src===h||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function bo(e,t,s){let o=!1,i;try{i=e.sheet}catch(h){return}if(i)return;const l=setTimeout(()=>{o||(t(),o=!0)},s);e.addEventListener("load",()=>{clearTimeout(l),o=!0,t()})}function So(e,t){const{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:h,inlineStylesheet:d,maskInputOptions:m={},maskTextFn:f,maskInputFn:r,dataURLOptions:u={},inlineImages:a,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:c=!1}=t,g=vo(s,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:e.compatMode}:{type:Y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return Ro(e,{doc:s,blockClass:i,blockSelector:l,inlineStylesheet:d,maskInputOptions:m,maskInputFn:r,dataURLOptions:u,inlineImages:a,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:c,rootId:g});case e.TEXT_NODE:return Co(e,{doc:s,needsMask:h,maskTextFn:f,rootId:g});case e.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:Y.Comment,textContent:K.textContent(e)||"",rootId:g};default:return!1}}function vo(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function Co(e,t){var s;const{needsMask:o,maskTextFn:i,rootId:l}=t,h=K.parentNode(e),d=h&&h.tagName;let m=K.textContent(e);const f=d==="STYLE"?!0:void 0,r=d==="SCRIPT"?!0:void 0;if(f&&m){try{e.nextSibling||e.previousSibling||(s=h.sheet)!=null&&s.cssRules&&(m=ot(h.sheet))}catch(u){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${u}`,e)}m=at(m,Ur(t.doc))}return r&&(m="SCRIPT_PLACEHOLDER"),!f&&!r&&m&&o&&(m=i?i(m,K.parentElement(e)):m.replace(/[\S]/g,"*")),{type:Y.Text,textContent:m||"",isStyle:f,rootId:l}}function hs(e,t){return Array.from(e.styleSheets).find(s=>s.href===t)}function xo(e){return e.href}function Ro(e,t){const{doc:s,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:h={},maskInputFn:d,dataURLOptions:m={},inlineImages:f,recordCanvas:r,keepIframeSrcFn:u,newlyAddedElement:a=!1,rootId:n}=t,p=yo(e,o,i),c=ho(e);let g={};const v=e.attributes.length;for(let S=0;S<v;S++){const x=e.attributes[S];zi(c,x.name,x.value)||(g[x.name]=Bi(s,c,Re(x.name),x.value))}if(c==="link"&&l){const S=xo(e);if(S){let x=hs(s,S);if(!x&&S.includes(".css")){const w=window.location.origin,C=S.replace(window.location.href,""),R=w+"/"+C;x=hs(s,R)}let y=null;x&&(y=ot(x)),y&&(delete g.rel,delete g.href,g._cssText=y)}}if(c==="style"&&e.sheet&&!(e.innerText||K.textContent(e)||"").trim().length){const S=ot(e.sheet);S&&(g._cssText=S)}if(c==="input"||c==="textarea"||c==="select"){const S=e.value,x=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=Tr({element:e,type:Fr(e),tagName:c,value:S,maskInputOptions:h,maskInputFn:d}):x&&(g.checked=x)}if(c==="option"&&(e.selected&&!h.select?g.selected=!0:delete g.selected),c==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(S){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(c==="canvas"&&r){if(e.__context==="2d")so(e)||(g.rr_dataURL=e.toDataURL(m.type,m.quality));else if(!("__context"in e)){const S=e.toDataURL(m.type,m.quality),x=s.createElement("canvas");x.width=e.width,x.height=e.height;const y=x.toDataURL(m.type,m.quality);S!==y&&(g.rr_dataURL=S)}}if(c==="img"&&f){Pe||(Pe=s.createElement("canvas"),us=Pe.getContext("2d"));const S=e,x=S.currentSrc||S.getAttribute("src")||"<unknown-src>",y=S.crossOrigin,w=()=>{S.removeEventListener("load",w);try{Pe.width=S.naturalWidth,Pe.height=S.naturalHeight,us.drawImage(S,0,0),g.rr_dataURL=Pe.toDataURL(m.type,m.quality)}catch(C){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?w():S.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${x}! Error: ${C}`)}S.crossOrigin==="anonymous"&&(y?g.crossOrigin=y:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?w():S.addEventListener("load",w)}if(c==="audio"||c==="video"){const S=g;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(a||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),p){const{width:S,height:x}=e.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${x}px`}}c==="iframe"&&!u(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(c)&&(b=!0)}catch(S){}return{type:Y.Element,tagName:c,attributes:g,childNodes:[],isSVG:go(e)||void 0,needBlock:p,rootId:n,isCustom:b}}function z(e){return e==null?"":e.toLowerCase()}function Oo(e,t){if(t.comment&&e.type===Y.Comment)return!0;if(e.type===Y.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"&&Ui(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(z(e.attributes.name).match(/^msapplication-tile(image|color)$/)||z(e.attributes.name)==="application-name"||z(e.attributes.rel)==="icon"||z(e.attributes.rel)==="apple-touch-icon"||z(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&z(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(z(e.attributes.property).match(/^(og|twitter|fb):/)||z(e.attributes.name).match(/^(og|twitter):/)||z(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(z(e.attributes.name)==="robots"||z(e.attributes.name)==="googlebot"||z(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(z(e.attributes.name)==="author"||z(e.attributes.name)==="generator"||z(e.attributes.name)==="framework"||z(e.attributes.name)==="publisher"||z(e.attributes.name)==="progid"||z(e.attributes.property).match(/^article:/)||z(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(z(e.attributes.name)==="google-site-verification"||z(e.attributes.name)==="yandex-verification"||z(e.attributes.name)==="csrf-token"||z(e.attributes.name)==="p:domain_verify"||z(e.attributes.name)==="verify-v1"||z(e.attributes.name)==="verification"||z(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Le(e,t){const{doc:s,mirror:o,blockClass:i,blockSelector:l,maskTextClass:h,maskTextSelector:d,skipChild:m=!1,inlineStylesheet:f=!0,maskInputOptions:r={},maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p={},inlineImages:c=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=Wi(e,h,d,R===void 0));const M=So(e,{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:R,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,dataURLOptions:p,inlineImages:c,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C});if(!M)return console.warn(e,"not serialized"),null;let _;o.hasNode(e)?_=o.getId(e):Oo(M,n)||!I&&M.type===Y.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?_=ze:_=$i();const P=Object.assign(M,{id:_});if(o.add(e,P),_===ze)return null;v&&v(e);let Z=!m;if(P.type===Y.Element){Z=Z&&!P.needBlock,delete P.needBlock;const O=K.shadowRoot(e);O&&$e(O)&&(P.isShadowHost=!0)}if((P.type===Y.Document||P.type===Y.Element)&&Z){n.headWhitespace&&P.type===Y.Element&&P.tagName==="head"&&(I=!1);const O={doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:R,maskTextClass:h,maskTextSelector:d,skipChild:m,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w};if(!(P.type===Y.Element&&P.tagName==="textarea"&&P.attributes.value!==void 0))for(const L of Array.from(K.childNodes(e))){const $=Le(L,O);$&&P.childNodes.push($)}let Q=null;if(Di(e)&&(Q=K.shadowRoot(e)))for(const L of Array.from(K.childNodes(Q))){const $=Le(L,O);$&&($e(Q)&&($.isShadow=!0),P.childNodes.push($))}}const ee=K.parentNode(e);return ee&&Ue(ee)&&$e(ee)&&(P.isShadow=!0),P.type===Y.Element&&P.tagName==="iframe"&&wo(e,()=>{const O=e.contentDocument;if(O&&b){const Q=Le(O,{doc:O,mirror:o,blockClass:i,blockSelector:l,needsMask:R,maskTextClass:h,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});Q&&b(e,Q)}},S),P.type===Y.Element&&P.tagName==="link"&&typeof P.attributes.rel=="string"&&(P.attributes.rel==="stylesheet"||P.attributes.rel==="preload"&&typeof P.attributes.href=="string"&&Ui(P.attributes.href)==="css")&&bo(e,()=>{if(x){const O=Le(e,{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:R,maskTextClass:h,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});O&&x(e,O)}},y),P}function Mo(e,t){const{mirror:s=new Fi,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:d=!0,inlineImages:m=!1,recordCanvas:f=!1,maskAllInputs:r=!1,maskTextFn:u,maskInputFn:a,slimDOM:n=!1,dataURLOptions:p,preserveWhiteSpace:c,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:y=()=>!1}=t||{};return Le(e,{doc:e,mirror:s,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:r===!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}:r===!1?{password:!0}:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:n==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:n===!1?{}:n,dataURLOptions:p,inlineImages:m,recordCanvas:f,preserveWhiteSpace:c,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:y,newlyAddedElement:!1})}function Eo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Io(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Qe={exports:{}},fs;function Ao(){if(fs)return Qe.exports;fs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Qe.exports=t(),Qe.exports.createColors=t,Qe.exports}const Po={},No=Object.freeze(Object.defineProperty({__proto__:null,default:Po},Symbol.toStringTag,{value:"Module"})),he=Io(No);var Rt,ps;function $r(){if(ps)return Rt;ps=1;let e=Ao(),t=he;class s extends Error{constructor(i,l,h,d,m,f){super(i),this.name="CssSyntaxError",this.reason=i,m&&(this.file=m),d&&(this.source=d),f&&(this.plugin=f),typeof l!="undefined"&&typeof h!="undefined"&&(typeof l=="number"?(this.line=l,this.column=h):(this.line=l.line,this.column=l.column,this.endLine=h.line,this.endColumn=h.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(i){if(!this.source)return"";let l=this.source;i==null&&(i=e.isColorSupported);let h=n=>n,d=n=>n,m=n=>n;if(i){let{bold:n,gray:p,red:c}=e.createColors(!0);d=g=>n(c(g)),h=g=>p(g),t&&(m=g=>t(g))}let f=l.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),a=String(u).length;return f.slice(r,u).map((n,p)=>{let c=r+1+p,g=" "+(" "+c).slice(-a)+" | ";if(c===this.line){if(n.length>160){let b=20,S=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),y=n.slice(S,x),w=h(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return d(">")+h(g)+m(y)+`
15
15
  `+w+d("^")}let v=h(g.replace(/\d/g," "))+n.slice(0,this.column-1).replace(/[^\t]/g," ");return d(">")+h(g)+m(n)+`
16
16
  `+v+d("^")}return" "+h(g)+m(n)}).join(`
17
17
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
18
18
 
19
19
  `+i+`
20
- `),this.name+": "+this.message+i}}return xt=s,s.default=s,xt}var Rt,ps;function Wi(){if(ps)return Rt;ps=1;const e={after:`
20
+ `),this.name+": "+this.message+i}}return Rt=s,s.default=s,Rt}var Ot,ds;function qi(){if(ds)return Ot;ds=1;const e={after:`
21
21
  `,beforeClose:`
22
22
  `,beforeComment:`
23
23
  `,beforeDecl:`
@@ -28,23 +28,23 @@ var module = { exports };
28
28
  `)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeDecl"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeDecl(i,l){let h;return i.walkDecls(d=>{if(typeof d.raws.before!="undefined")return h=d.raws.before,h.includes(`
29
29
  `)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeRule"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeOpen(i){let l;return i.walk(h=>{if(h.type!=="decl"&&(l=h.raws.between,typeof l!="undefined"))return!1}),l}rawBeforeRule(i){let l;return i.walk(h=>{if(h.nodes&&(h.parent!==i||i.first!==h)&&typeof h.raws.before!="undefined")return l=h.raws.before,l.includes(`
30
30
  `)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawColon(i){let l;return i.walkDecls(h=>{if(typeof h.raws.between!="undefined")return l=h.raws.between.replace(/[^\s:]/g,""),!1}),l}rawEmptyBody(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length===0&&(l=h.raws.after,typeof l!="undefined"))return!1}),l}rawIndent(i){if(i.raws.indent)return i.raws.indent;let l;return i.walk(h=>{let d=h.parent;if(d&&d!==i&&d.parent&&d.parent===i&&typeof h.raws.before!="undefined"){let m=h.raws.before.split(`
31
- `);return l=m[m.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length&&h.last.type==="decl"&&(l=h.raws.semicolon,typeof l!="undefined"))return!1}),l}rawValue(i,l){let h=i[l],d=i.raws[l];return d&&d.value===h?d.raw:h}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,l){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,l)}}return Rt=s,s.default=s,Rt}var Ot,ds;function ht(){if(ds)return Ot;ds=1;let e=Wi();function t(s,o){new e(o).stringify(s)}return Ot=t,t.default=t,Ot}var Qe={},ms;function $r(){return ms||(ms=1,Qe.isClean=Symbol("isClean"),Qe.my=Symbol("my")),Qe}var Mt,gs;function ft(){if(gs)return Mt;gs=1;let e=Ur(),t=Wi(),s=ht(),{isClean:o,my:i}=$r();function l(m,f){let r=new m.constructor;for(let u in m){if(!Object.prototype.hasOwnProperty.call(m,u)||u==="proxyCache")continue;let a=m[u],n=typeof a;u==="parent"&&n==="object"?f&&(r[u]=f):u==="source"?r[u]=a:Array.isArray(a)?r[u]=a.map(p=>l(p,r)):(n==="object"&&a!==null&&(a=l(a)),r[u]=a)}return r}function h(m,f){if(f&&typeof f.offset!="undefined")return f.offset;let r=1,u=1,a=0;for(let n=0;n<m.length;n++){if(u===f.line&&r===f.column){a=n;break}m[n]===`
31
+ `);return l=m[m.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length&&h.last.type==="decl"&&(l=h.raws.semicolon,typeof l!="undefined"))return!1}),l}rawValue(i,l){let h=i[l],d=i.raws[l];return d&&d.value===h?d.raw:h}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,l){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,l)}}return Ot=s,s.default=s,Ot}var Mt,ms;function ft(){if(ms)return Mt;ms=1;let e=qi();function t(s,o){new e(o).stringify(s)}return Mt=t,t.default=t,Mt}var Xe={},gs;function Br(){return gs||(gs=1,Xe.isClean=Symbol("isClean"),Xe.my=Symbol("my")),Xe}var Et,ys;function pt(){if(ys)return Et;ys=1;let e=$r(),t=qi(),s=ft(),{isClean:o,my:i}=Br();function l(m,f){let r=new m.constructor;for(let u in m){if(!Object.prototype.hasOwnProperty.call(m,u)||u==="proxyCache")continue;let a=m[u],n=typeof a;u==="parent"&&n==="object"?f&&(r[u]=f):u==="source"?r[u]=a:Array.isArray(a)?r[u]=a.map(p=>l(p,r)):(n==="object"&&a!==null&&(a=l(a)),r[u]=a)}return r}function h(m,f){if(f&&typeof f.offset!="undefined")return f.offset;let r=1,u=1,a=0;for(let n=0;n<m.length;n++){if(u===f.line&&r===f.column){a=n;break}m[n]===`
32
32
  `?(r=1,u+=1):r+=1}return a}class d{constructor(f={}){this.raws={},this[o]=!1,this[i]=!0;for(let r in f)if(r==="nodes"){this.nodes=[];for(let u of f[r])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[r]=f[r]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let r=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let r in f)this[r]=f[r];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let r=l(this);for(let u in f)r[u]=f[u];return r}cloneAfter(f={}){let r=this.clone(f);return this.parent.insertAfter(this,r),r}cloneBefore(f={}){let r=this.clone(f);return this.parent.insertBefore(this,r),r}error(f,r={}){if(this.source){let{end:u,start:a}=this.rangeBy(r);return this.source.input.error(f,{column:a.column,line:a.line},{column:u.column,line:u.line},r)}return new e(f)}getProxyProcessor(){return{get(f,r){return r==="proxyOf"?f:r==="root"?()=>f.root().toProxy():f[r]},set(f,r,u){return f[r]===u||(f[r]=u,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&f.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let f=this;for(;f=f.parent;)f[o]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let r=this.source.start;if(f.index)r=this.positionInside(f.index);else if(f.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,n=u.slice(h(u,this.source.start),h(u,this.source.end)).indexOf(f.word);n!==-1&&(r=this.positionInside(n))}return r}positionInside(f){let r=this.source.start.column,u=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,n=h(a,this.source.start),p=n+f;for(let c=n;c<p;c++)a[c]===`
33
- `?(r=1,u+=1):r+=1;return{column:r,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let r={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(f.word){let a="document"in this.source.input?this.source.input.document:this.source.input.css,p=a.slice(h(a,this.source.start),h(a,this.source.end)).indexOf(f.word);p!==-1&&(r=this.positionInside(p),u=this.positionInside(p+f.word.length))}else f.start?r={column:f.start.column,line:f.start.line}:f.index&&(r=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<r.line||u.line===r.line&&u.column<=r.column)&&(u={column:r.column+1,line:r.line}),{end:u,start:r}}raw(f,r){return new t().raw(this,f,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let r=this,u=!1;for(let a of f)a===this?u=!0:u?(this.parent.insertAfter(r,a),r=a):this.parent.insertBefore(r,a);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,r){let u={},a=r==null;r=r||new Map;let n=0;for(let p in this){if(!Object.prototype.hasOwnProperty.call(this,p)||p==="parent"||p==="proxyCache")continue;let c=this[p];if(Array.isArray(c))u[p]=c.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,r):g);else if(typeof c=="object"&&c.toJSON)u[p]=c.toJSON(null,r);else if(p==="source"){let g=r.get(c.input);g==null&&(g=n,r.set(c.input,n),n++),u[p]={end:c.end,inputId:g,start:c.start}}else u[p]=c}return a&&(u.inputs=[...r.keys()].map(p=>p.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let r="";return f(this,u=>{r+=u}),r}warn(f,r,u){let a={node:this};for(let n in u)a[n]=u[n];return f.warn(r,a)}get proxyOf(){return this}}return Mt=d,d.default=d,Mt}var Et,ys;function We(){if(ys)return Et;ys=1;let e=ft();class t extends e{constructor(o){super(o),this.type="comment"}}return Et=t,t.default=t,Et}var It,ws;function pt(){if(ws)return It;ws=1;let e=ft();class t extends e{constructor(o){o&&typeof o.value!="undefined"&&typeof o.value!="string"&&(o=ae(T({},o),{value:String(o.value)})),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return It=t,t.default=t,It}var At,bs;function Oe(){if(bs)return At;bs=1;let e=We(),t=pt(),s=ft(),{isClean:o,my:i}=$r(),l,h,d,m;function f(a){return a.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function r(a){if(a[o]=!1,a.proxyOf.nodes)for(let n of a.proxyOf.nodes)r(n)}class u extends s{append(...n){for(let p of n){let c=this.normalize(p,this.last);for(let g of c)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),c,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(c=this.indexes[p],g=n(this.proxyOf.nodes[c],c),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...c)=>n[p](...c.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):p==="every"||p==="some"?c=>n[p]((g,...v)=>c(g.toProxy(),...v)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(c=>c.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,c){return n[p]===c||(n[p]=c,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let c=this.index(n),g=this.normalize(p,this.proxyOf.nodes[c]).reverse();c=this.index(n);for(let b of g)this.proxyOf.nodes.splice(c+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],c<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(n,p){let c=this.index(n),g=c===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[c],g).reverse();c=this.index(n);for(let S of v)this.proxyOf.nodes.splice(c,0,S);let b;for(let S in this.indexes)b=this.indexes[S],c<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=f(h(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new m(n)];else if(n.name)n=[new l(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&r(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let c=this.normalize(p,this.first,"prepend").reverse();for(let g of c)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+c.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let c in this.indexes)p=this.indexes[c],p>=n&&(this.indexes[c]=p-1);return this.markDirty(),this}replaceValues(n,p,c){return c||(c=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,c))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,c)=>{let g;try{g=n(p,c)}catch(v){throw p.addToError(v)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="atrule"&&n.test(c.name))return p(c,g)}):this.walk((c,g)=>{if(c.type==="atrule"&&c.name===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="atrule")return p(c,g)}))}walkComments(n){return this.walk((p,c)=>{if(p.type==="comment")return n(p,c)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="decl"&&n.test(c.prop))return p(c,g)}):this.walk((c,g)=>{if(c.type==="decl"&&c.prop===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="decl")return p(c,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="rule"&&n.test(c.selector))return p(c,g)}):this.walk((c,g)=>{if(c.type==="rule"&&c.selector===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="rule")return p(c,g)}))}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]}}return u.registerParse=a=>{h=a},u.registerRule=a=>{m=a},u.registerAtRule=a=>{l=a},u.registerRoot=a=>{d=a},At=u,u.default=u,u.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,m.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[i]=!0,a.nodes&&a.nodes.forEach(n=>{u.rebuild(n)})},At}var Pt,Ss;function Br(){if(Ss)return Pt;Ss=1;let e=Oe();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return Pt=t,t.default=t,e.registerAtRule(t),Pt}var Nt,vs;function zr(){if(vs)return Nt;vs=1;let e=Oe(),t,s;class o extends e{constructor(l){super(T({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},Nt=o,o.default=o,Nt}var _t,Cs;function No(){if(Cs)return _t;Cs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return _t={nanoid:(o=21)=>{let i="",l=o|0;for(;l--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(l=i)=>{let h="",d=l|0;for(;d--;)h+=o[Math.random()*o.length|0];return h}},_t}var kt,xs;function qi(){if(xs)return kt;xs=1;let{existsSync:e,readFileSync:t}=ce,{dirname:s,join:o}=ce,{SourceMapConsumer:i,SourceMapGenerator:l}=ce;function h(m){return Buffer?Buffer.from(m,"base64").toString():window.atob(m)}class d{constructor(f,r){if(r.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=r.map?r.map.prev:void 0,a=this.loadMap(r.from,u);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let r=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,p=f.match(a)||f.match(n);if(p)return decodeURIComponent(f.substr(p[0].length));let c=f.match(r)||f.match(u);if(c)return h(f.substr(c[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let r=f.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let u=f.lastIndexOf(r.pop()),a=f.indexOf("*/",u);u>-1&&a>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,a)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let u=r(f);if(u){let a=this.loadFile(u);if(!a)throw new Error("Unable to load previous source map: "+u.toString());return a}}else{if(r instanceof i)return l.fromSourceMap(r).toString();if(r instanceof l)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(s(f),u)),this.loadFile(u)}}}startWith(f,r){return f?f.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return kt=d,d.default=d,kt}var Lt,Rs;function dt(){if(Rs)return Lt;Rs=1;let{nanoid:e}=No(),{isAbsolute:t,resolve:s}=ce,{SourceMapConsumer:o,SourceMapGenerator:i}=ce,{fileURLToPath:l,pathToFileURL:h}=ce,d=Ur(),m=qi(),f=ce,r=Symbol("fromOffsetCache"),u=!!(o&&i),a=!!(s&&t);class n{constructor(c,g={}){if(c===null||typeof c=="undefined"||typeof c=="object"&&!c.toString)throw new Error(`PostCSS received ${c} instead of CSS string`);if(this.css=c.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,g.document&&(this.document=g.document.toString()),g.from&&(!a||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=s(g.from)),a&&u){let v=new m(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(c,g,v,b={}){let S,x,y;if(g&&typeof g=="object"){let C=g,R=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);x=I.line,S=I.col}else x=R.line,S=R.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,S);return w?y=new d(c,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new d(c,x===void 0?g:{column:v,line:g},x===void 0?v:{column:S,line:x},this.css,this.file,b.plugin),y.input={column:v,endColumn:S,endLine:x,line:g,source:this.css},this.file&&(h&&(y.input.url=h(this.file).toString()),y.input.file=this.file),y}fromOffset(c){let g,v;if(this[r])v=this[r];else{let S=this.css.split(`
34
- `);v=new Array(S.length);let x=0;for(let y=0,w=S.length;y<w;y++)v[y]=x,x+=S[y].length+1;this[r]=v}g=v[v.length-1];let b=0;if(c>=g)b=v.length-1;else{let S=v.length-2,x;for(;b<S;)if(x=b+(S-b>>1),c<v[x])S=x-1;else if(c>=v[x+1])b=x+1;else{b=x;break}}return{col:c-v[b]+1,line:b+1}}mapResolve(c){return/^\w+:\/\//.test(c)?c:s(this.map.consumer().sourceRoot||this.map.root||".",c)}origin(c,g,v,b){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:c});if(!x.source)return!1;let y;typeof v=="number"&&(y=S.originalPositionFor({column:b,line:v}));let w;t(x.source)?w=h(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(l)C.file=l(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(C.source=R),C}toJSON(){let c={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(c[g]=this[g]);return this.map&&(c.map=T({},this.map),c.map.consumerCache&&(c.map.consumerCache=void 0)),c}get from(){return this.file||this.id}}return Lt=n,n.default=n,f&&f.registerInput&&f.registerInput(n),Lt}var Dt,Os;function qe(){if(Os)return Dt;Os=1;let e=Oe(),t,s;class o extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,h,d){let m=super.normalize(l);if(h){if(d==="prepend")this.nodes.length>1?h.raws.before=this.nodes[1].raws.before:delete h.raws.before;else if(this.first!==h)for(let f of m)f.raws.before=h.raws.before}return m}removeChild(l,h){let d=this.index(l);return!h&&d===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[d].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},Dt=o,o.default=o,e.registerRoot(o),Dt}var Tt,Ms;function ji(){if(Ms)return Tt;Ms=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
35
- `," "];return e.split(t,s)},split(t,s,o){let i=[],l="",h=!1,d=0,m=!1,f="",r=!1;for(let u of t)r?r=!1:u==="\\"?r=!0:m?u===f&&(m=!1):u==='"'||u==="'"?(m=!0,f=u):u==="("?d+=1:u===")"?d>0&&(d-=1):d===0&&s.includes(u)&&(h=!0),h?(l!==""&&i.push(l.trim()),l="",h=!1):l+=u;return(o||l!=="")&&i.push(l.trim()),i}};return Tt=e,e.default=e,Tt}var Ft,Es;function Wr(){if(Es)return Ft;Es=1;let e=Oe(),t=ji();class s extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let l=this.selector?this.selector.match(/,\s*/):null,h=l?l[0]:","+this.raw("between","beforeOpen");this.selector=i.join(h)}}return Ft=s,s.default=s,e.registerRule(s),Ft}var Ut,Is;function _o(){if(Is)return Ut;Is=1;let e=Br(),t=We(),s=pt(),o=dt(),i=qi(),l=qe(),h=Wr();function d(m,f){if(Array.isArray(m))return m.map(p=>d(p));let a=m,{inputs:r}=a,u=Ie(a,["inputs"]);if(r){f=[];for(let p of r){let c=ae(T({},p),{__proto__:o.prototype});c.map&&(c.map=ae(T({},c.map),{__proto__:i.prototype})),f.push(c)}}if(u.nodes&&(u.nodes=m.nodes.map(p=>d(p,f))),u.source){let n=u.source,{inputId:p}=n,c=Ie(n,["inputId"]);u.source=c,p!=null&&(u.source.input=f[p])}if(u.type==="root")return new l(u);if(u.type==="decl")return new s(u);if(u.type==="rule")return new h(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+m.type)}return Ut=d,d.default=d,Ut}var $t,As;function Hi(){if(As)return $t;As=1;let{dirname:e,relative:t,resolve:s,sep:o}=ce,{SourceMapConsumer:i,SourceMapGenerator:l}=ce,{pathToFileURL:h}=ce,d=dt(),m=!!(i&&l),f=!!(e&&s&&t&&o);class r{constructor(a,n,p,c){this.stringify=a,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=c,this.originalCSS=c,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let n=`
33
+ `?(r=1,u+=1):r+=1;return{column:r,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let r={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(f.word){let a="document"in this.source.input?this.source.input.document:this.source.input.css,p=a.slice(h(a,this.source.start),h(a,this.source.end)).indexOf(f.word);p!==-1&&(r=this.positionInside(p),u=this.positionInside(p+f.word.length))}else f.start?r={column:f.start.column,line:f.start.line}:f.index&&(r=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<r.line||u.line===r.line&&u.column<=r.column)&&(u={column:r.column+1,line:r.line}),{end:u,start:r}}raw(f,r){return new t().raw(this,f,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let r=this,u=!1;for(let a of f)a===this?u=!0:u?(this.parent.insertAfter(r,a),r=a):this.parent.insertBefore(r,a);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,r){let u={},a=r==null;r=r||new Map;let n=0;for(let p in this){if(!Object.prototype.hasOwnProperty.call(this,p)||p==="parent"||p==="proxyCache")continue;let c=this[p];if(Array.isArray(c))u[p]=c.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,r):g);else if(typeof c=="object"&&c.toJSON)u[p]=c.toJSON(null,r);else if(p==="source"){let g=r.get(c.input);g==null&&(g=n,r.set(c.input,n),n++),u[p]={end:c.end,inputId:g,start:c.start}}else u[p]=c}return a&&(u.inputs=[...r.keys()].map(p=>p.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let r="";return f(this,u=>{r+=u}),r}warn(f,r,u){let a={node:this};for(let n in u)a[n]=u[n];return f.warn(r,a)}get proxyOf(){return this}}return Et=d,d.default=d,Et}var It,ws;function qe(){if(ws)return It;ws=1;let e=pt();class t extends e{constructor(o){super(o),this.type="comment"}}return It=t,t.default=t,It}var At,bs;function dt(){if(bs)return At;bs=1;let e=pt();class t extends e{constructor(o){o&&typeof o.value!="undefined"&&typeof o.value!="string"&&(o=ae(T({},o),{value:String(o.value)})),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return At=t,t.default=t,At}var Pt,Ss;function Oe(){if(Ss)return Pt;Ss=1;let e=qe(),t=dt(),s=pt(),{isClean:o,my:i}=Br(),l,h,d,m;function f(a){return a.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function r(a){if(a[o]=!1,a.proxyOf.nodes)for(let n of a.proxyOf.nodes)r(n)}class u extends s{append(...n){for(let p of n){let c=this.normalize(p,this.last);for(let g of c)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),c,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(c=this.indexes[p],g=n(this.proxyOf.nodes[c],c),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...c)=>n[p](...c.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):p==="every"||p==="some"?c=>n[p]((g,...v)=>c(g.toProxy(),...v)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(c=>c.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,c){return n[p]===c||(n[p]=c,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let c=this.index(n),g=this.normalize(p,this.proxyOf.nodes[c]).reverse();c=this.index(n);for(let b of g)this.proxyOf.nodes.splice(c+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],c<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(n,p){let c=this.index(n),g=c===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[c],g).reverse();c=this.index(n);for(let S of v)this.proxyOf.nodes.splice(c,0,S);let b;for(let S in this.indexes)b=this.indexes[S],c<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=f(h(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new m(n)];else if(n.name)n=[new l(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&r(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let c=this.normalize(p,this.first,"prepend").reverse();for(let g of c)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+c.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let c in this.indexes)p=this.indexes[c],p>=n&&(this.indexes[c]=p-1);return this.markDirty(),this}replaceValues(n,p,c){return c||(c=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,c))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,c)=>{let g;try{g=n(p,c)}catch(v){throw p.addToError(v)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="atrule"&&n.test(c.name))return p(c,g)}):this.walk((c,g)=>{if(c.type==="atrule"&&c.name===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="atrule")return p(c,g)}))}walkComments(n){return this.walk((p,c)=>{if(p.type==="comment")return n(p,c)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="decl"&&n.test(c.prop))return p(c,g)}):this.walk((c,g)=>{if(c.type==="decl"&&c.prop===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="decl")return p(c,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="rule"&&n.test(c.selector))return p(c,g)}):this.walk((c,g)=>{if(c.type==="rule"&&c.selector===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="rule")return p(c,g)}))}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]}}return u.registerParse=a=>{h=a},u.registerRule=a=>{m=a},u.registerAtRule=a=>{l=a},u.registerRoot=a=>{d=a},Pt=u,u.default=u,u.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,m.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[i]=!0,a.nodes&&a.nodes.forEach(n=>{u.rebuild(n)})},Pt}var Nt,vs;function zr(){if(vs)return Nt;vs=1;let e=Oe();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return Nt=t,t.default=t,e.registerAtRule(t),Nt}var _t,Cs;function Wr(){if(Cs)return _t;Cs=1;let e=Oe(),t,s;class o extends e{constructor(l){super(T({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},_t=o,o.default=o,_t}var kt,xs;function _o(){if(xs)return kt;xs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return kt={nanoid:(o=21)=>{let i="",l=o|0;for(;l--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(l=i)=>{let h="",d=l|0;for(;d--;)h+=o[Math.random()*o.length|0];return h}},kt}var Lt,Rs;function ji(){if(Rs)return Lt;Rs=1;let{existsSync:e,readFileSync:t}=he,{dirname:s,join:o}=he,{SourceMapConsumer:i,SourceMapGenerator:l}=he;function h(m){return Buffer?Buffer.from(m,"base64").toString():window.atob(m)}class d{constructor(f,r){if(r.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=r.map?r.map.prev:void 0,a=this.loadMap(r.from,u);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let r=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,p=f.match(a)||f.match(n);if(p)return decodeURIComponent(f.substr(p[0].length));let c=f.match(r)||f.match(u);if(c)return h(f.substr(c[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let r=f.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let u=f.lastIndexOf(r.pop()),a=f.indexOf("*/",u);u>-1&&a>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,a)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let u=r(f);if(u){let a=this.loadFile(u);if(!a)throw new Error("Unable to load previous source map: "+u.toString());return a}}else{if(r instanceof i)return l.fromSourceMap(r).toString();if(r instanceof l)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(s(f),u)),this.loadFile(u)}}}startWith(f,r){return f?f.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Lt=d,d.default=d,Lt}var Dt,Os;function mt(){if(Os)return Dt;Os=1;let{nanoid:e}=_o(),{isAbsolute:t,resolve:s}=he,{SourceMapConsumer:o,SourceMapGenerator:i}=he,{fileURLToPath:l,pathToFileURL:h}=he,d=$r(),m=ji(),f=he,r=Symbol("fromOffsetCache"),u=!!(o&&i),a=!!(s&&t);class n{constructor(c,g={}){if(c===null||typeof c=="undefined"||typeof c=="object"&&!c.toString)throw new Error(`PostCSS received ${c} instead of CSS string`);if(this.css=c.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,g.document&&(this.document=g.document.toString()),g.from&&(!a||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=s(g.from)),a&&u){let v=new m(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(c,g,v,b={}){let S,x,y;if(g&&typeof g=="object"){let C=g,R=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);x=I.line,S=I.col}else x=R.line,S=R.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,S);return w?y=new d(c,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new d(c,x===void 0?g:{column:v,line:g},x===void 0?v:{column:S,line:x},this.css,this.file,b.plugin),y.input={column:v,endColumn:S,endLine:x,line:g,source:this.css},this.file&&(h&&(y.input.url=h(this.file).toString()),y.input.file=this.file),y}fromOffset(c){let g,v;if(this[r])v=this[r];else{let S=this.css.split(`
34
+ `);v=new Array(S.length);let x=0;for(let y=0,w=S.length;y<w;y++)v[y]=x,x+=S[y].length+1;this[r]=v}g=v[v.length-1];let b=0;if(c>=g)b=v.length-1;else{let S=v.length-2,x;for(;b<S;)if(x=b+(S-b>>1),c<v[x])S=x-1;else if(c>=v[x+1])b=x+1;else{b=x;break}}return{col:c-v[b]+1,line:b+1}}mapResolve(c){return/^\w+:\/\//.test(c)?c:s(this.map.consumer().sourceRoot||this.map.root||".",c)}origin(c,g,v,b){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:c});if(!x.source)return!1;let y;typeof v=="number"&&(y=S.originalPositionFor({column:b,line:v}));let w;t(x.source)?w=h(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(l)C.file=l(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(C.source=R),C}toJSON(){let c={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(c[g]=this[g]);return this.map&&(c.map=T({},this.map),c.map.consumerCache&&(c.map.consumerCache=void 0)),c}get from(){return this.file||this.id}}return Dt=n,n.default=n,f&&f.registerInput&&f.registerInput(n),Dt}var Tt,Ms;function je(){if(Ms)return Tt;Ms=1;let e=Oe(),t,s;class o extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,h,d){let m=super.normalize(l);if(h){if(d==="prepend")this.nodes.length>1?h.raws.before=this.nodes[1].raws.before:delete h.raws.before;else if(this.first!==h)for(let f of m)f.raws.before=h.raws.before}return m}removeChild(l,h){let d=this.index(l);return!h&&d===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[d].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},Tt=o,o.default=o,e.registerRoot(o),Tt}var Ft,Es;function Hi(){if(Es)return Ft;Es=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
35
+ `," "];return e.split(t,s)},split(t,s,o){let i=[],l="",h=!1,d=0,m=!1,f="",r=!1;for(let u of t)r?r=!1:u==="\\"?r=!0:m?u===f&&(m=!1):u==='"'||u==="'"?(m=!0,f=u):u==="("?d+=1:u===")"?d>0&&(d-=1):d===0&&s.includes(u)&&(h=!0),h?(l!==""&&i.push(l.trim()),l="",h=!1):l+=u;return(o||l!=="")&&i.push(l.trim()),i}};return Ft=e,e.default=e,Ft}var Ut,Is;function qr(){if(Is)return Ut;Is=1;let e=Oe(),t=Hi();class s extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let l=this.selector?this.selector.match(/,\s*/):null,h=l?l[0]:","+this.raw("between","beforeOpen");this.selector=i.join(h)}}return Ut=s,s.default=s,e.registerRule(s),Ut}var $t,As;function ko(){if(As)return $t;As=1;let e=zr(),t=qe(),s=dt(),o=mt(),i=ji(),l=je(),h=qr();function d(m,f){if(Array.isArray(m))return m.map(p=>d(p));let a=m,{inputs:r}=a,u=Ae(a,["inputs"]);if(r){f=[];for(let p of r){let c=ae(T({},p),{__proto__:o.prototype});c.map&&(c.map=ae(T({},c.map),{__proto__:i.prototype})),f.push(c)}}if(u.nodes&&(u.nodes=m.nodes.map(p=>d(p,f))),u.source){let n=u.source,{inputId:p}=n,c=Ae(n,["inputId"]);u.source=c,p!=null&&(u.source.input=f[p])}if(u.type==="root")return new l(u);if(u.type==="decl")return new s(u);if(u.type==="rule")return new h(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+m.type)}return $t=d,d.default=d,$t}var Bt,Ps;function Vi(){if(Ps)return Bt;Ps=1;let{dirname:e,relative:t,resolve:s,sep:o}=he,{SourceMapConsumer:i,SourceMapGenerator:l}=he,{pathToFileURL:h}=he,d=mt(),m=!!(i&&l),f=!!(e&&s&&t&&o);class r{constructor(a,n,p,c){this.stringify=a,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=c,this.originalCSS=c,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let n=`
36
36
  `;this.css.includes(`\r
37
37
  `)&&(n=`\r
38
38
  `),this.css+=n+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let n=this.toUrl(this.path(a.file)),p=a.root||e(a.file),c;this.mapOpts.sourcesContent===!1?(c=new i(a.text),c.sourcesContent&&(c.sourcesContent=null)):c=a.consumer(),this.map.applySourceMap(c,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let a;for(let n=this.root.nodes.length-1;n>=0;n--)a=this.root.nodes[n],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&m&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,n=>{a+=n}),[a]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let a=this.previous()[0].consumer();a.file=this.outputFile(),this.map=l.fromSourceMap(a,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let a=1,n=1,p="<no source>",c={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(b,S,x)=>{if(this.css+=b,S&&x!=="end"&&(c.generated.line=a,c.generated.column=n-1,S.source&&S.source.start?(c.source=this.sourcePath(S),c.original.line=S.source.start.line,c.original.column=S.source.start.column-1,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,this.map.addMapping(c))),v=b.match(/\n/g),v?(a+=v.length,g=b.lastIndexOf(`
39
- `),n=b.length-g):n+=b.length,S&&x!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(c.source=this.sourcePath(S),c.original.line=S.source.end.line,c.original.column=S.source.end.column-1,c.generated.line=a,c.generated.column=n-2,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,c.generated.line=a,c.generated.column=n-1,this.map.addMapping(c)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a!="undefined"&&a!==!0?!1:this.previous().length?this.previous().some(n=>n.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let n=this.memoizedPaths.get(a);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let c=t(p,a);return this.memoizedPaths.set(a,c),c}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let n=a.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!a[p]){a[p]=!0;let c=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(c,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let n=this.memoizedFileURLs.get(a);if(n)return n;if(h){let p=h(a).toString();return this.memoizedFileURLs.set(a,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let n=this.memoizedURLs.get(a);if(n)return n;o==="\\"&&(a=a.replace(/\\/g,"/"));let p=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,p),p}}return $t=r,$t}var Bt,Ps;function Vi(){if(Ps)return Bt;Ps=1;const e=39,t=34,s=92,o=47,i=10,l=32,h=12,d=9,m=13,f=91,r=93,u=40,a=41,n=123,p=125,c=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return Bt=function(R,I={}){let M=R.css.valueOf(),_=I.ignoreErrors,P,Z,ee,O,Q,L,$,X,G,de,ge=M.length,E=0,fe=[],ne=[];function Te(){return E}function te(N){throw R.error("Unclosed "+N,E)}function oe(){return ne.length===0&&E>=ge}function xe(N){if(ne.length)return ne.pop();if(E>=ge)return;let J=N?N.ignoreUnclosed:!1;switch(P=M.charCodeAt(E),P){case i:case l:case d:case m:case h:{O=E;do O+=1,P=M.charCodeAt(O);while(P===l||P===i||P===d||P===m||P===h);L=["space",M.slice(E,O)],E=O-1;break}case f:case r:case n:case p:case v:case c:case a:{let B=String.fromCharCode(P);L=[B,B,E];break}case u:{if(de=fe.length?fe.pop()[1]:"",G=M.charCodeAt(E+1),de==="url"&&G!==e&&G!==t&&G!==l&&G!==i&&G!==d&&G!==h&&G!==m){O=E;do{if($=!1,O=M.indexOf(")",O+1),O===-1)if(_||J){O=E;break}else te("bracket");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["brackets",M.slice(E,O+1),E,O],E=O}else O=M.indexOf(")",E+1),Z=M.slice(E,O+1),O===-1||y.test(Z)?L=["(","(",E]:(L=["brackets",Z,E,O],E=O);break}case e:case t:{Q=P===e?"'":'"',O=E;do{if($=!1,O=M.indexOf(Q,O+1),O===-1)if(_||J){O=E+1;break}else te("string");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["string",M.slice(E,O+1),E,O],E=O;break}case b:{S.lastIndex=E+1,S.test(M),S.lastIndex===0?O=M.length-1:O=S.lastIndex-2,L=["at-word",M.slice(E,O+1),E,O],E=O;break}case s:{for(O=E,ee=!0;M.charCodeAt(O+1)===s;)O+=1,ee=!ee;if(P=M.charCodeAt(O+1),ee&&P!==o&&P!==l&&P!==i&&P!==d&&P!==m&&P!==h&&(O+=1,w.test(M.charAt(O)))){for(;w.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===l&&(O+=1)}L=["word",M.slice(E,O+1),E,O],E=O;break}default:{P===o&&M.charCodeAt(E+1)===g?(O=M.indexOf("*/",E+2)+1,O===0&&(_||J?O=M.length:te("comment")),L=["comment",M.slice(E,O+1),E,O],E=O):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?O=M.length-1:O=x.lastIndex-2,L=["word",M.slice(E,O+1),E,O],fe.push(L),E=O);break}}return E++,L}function ye(N){ne.push(N)}return{back:ye,endOfFile:oe,nextToken:xe,position:Te}},Bt}var zt,Ns;function Gi(){if(Ns)return zt;Ns=1;let e=Br(),t=We(),s=pt(),o=qe(),i=Wr(),l=Vi();const h={empty:!0,space:!0};function d(f){for(let r=f.length-1;r>=0;r--){let u=f[r],a=u[3]||u[2];if(a)return a}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let a,n,p,c=!1,g=!1,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),a=r[0],a==="("||a==="["?b.push(a==="("?")":"]"):a==="{"&&b.length>0?b.push("}"):a===b[b.length-1]&&b.pop(),b.length===0)if(a===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){g=!0;break}else if(a==="}"){if(v.length>0){for(p=v.length-1,n=v[p];n&&n[0]==="space";)n=v[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else v.push(r);else v.push(r);if(this.tokenizer.endOfFile()){c=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(u.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(u,"params",v),c&&(r=v[v.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let a=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(a+=1,a===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,a,n,p;for(let[c,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return c}a=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let a=r[1].slice(2,-2);if(/^\s*$/.test(a))u.text="",u.raws.left=a,u.raws.right="";else{let n=a.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(r,u){let a=new s;this.init(a,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),a.source.end=this.getPosition(n[3]||n[2]||d(r)),a.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),a.raws.before+=r.shift()[1];for(a.source.start=this.getPosition(r[0][2]),a.prop="";r.length;){let b=r[0][0];if(b===":"||b==="space"||b==="comment")break;a.prop+=r.shift()[1]}a.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){a.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),a.raws.between+=p[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let c=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)c.push(r.shift());this.precheckMissedSemicolon(r);for(let b=r.length-1;b>=0;b--){if(p=r[b],p[1].toLowerCase()==="!important"){a.important=!0;let S=this.stringFrom(r,b);S=this.spacesFromEnd(r)+S,S!==" !important"&&(a.raws.important=S);break}else if(p[1].toLowerCase()==="important"){let S=r.slice(0),x="";for(let y=b;y>0;y--){let w=S[y][0];if(x.trim().startsWith("!")&&w!=="space")break;x=S.pop()[1]+x}x.trim().startsWith("!")&&(a.important=!0,a.raws.important=x,r=S)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(a.raws.between+=c.map(b=>b[1]).join(""),c=[]),this.raw(a,"value",c.concat(r),u),a.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){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(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}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(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,a=null,n=!1,p=null,c=[],g=r[1].startsWith("--"),v=[],b=r;for(;b;){if(a=b[0],v.push(b),a==="("||a==="[")p||(p=b),c.push(a==="("?")":"]");else if(g&&n&&a==="{")p||(p=b),c.push("}");else if(c.length===0)if(a===";")if(n){this.decl(v,g);return}else break;else if(a==="{"){this.rule(v);return}else if(a==="}"){this.tokenizer.back(v.pop()),u=!0;break}else a===":"&&(n=!0);else a===c[c.length-1]&&(c.pop(),c.length===0&&(p=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),c.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,a,n){let p,c,g=a.length,v="",b=!0,S,x;for(let y=0;y<g;y+=1)p=a[y],c=p[0],c==="space"&&y===g-1&&!n?b=!1:c==="comment"?(x=a[y-1]?a[y-1][0]:"empty",S=a[y+1]?a[y+1][0]:"empty",!h[x]&&!h[S]?v.slice(-1)===","?b=!1:v+=p[1]:b=!1):v+=p[1];if(!b){let y=a.reduce((w,C)=>w+C[1],"");r.raws[u]={raw:y,value:v}}r[u]=v}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)a=r.pop()[1]+a;return a}spacesAndCommentsFromStart(r){let u,a="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)a+=r.shift()[1];return a}spacesFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],u==="space");)a=r.pop()[1]+a;return a}stringFrom(r,u){let a="";for(let n=u;n<r.length;n++)a+=r[n][1];return r.splice(u,r.length-u),a}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word",{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return zt=m,zt}var Wt,_s;function qr(){if(_s)return Wt;_s=1;let e=Oe(),t=dt(),s=Gi();function o(i,l){let h=new t(i,l),d=new s(h);try{d.parse()}catch(m){throw m}return d.root}return Wt=o,o.default=o,e.registerParse(o),Wt}var qt,ks;function Ji(){if(ks)return qt;ks=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return qt=e,e.default=e,qt}var jt,Ls;function jr(){if(Ls)return jt;Ls=1;let e=Ji();class t{constructor(o,i,l){this.processor=o,this.messages=[],this.root=i,this.opts=l,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let l=new e(o,i);return this.messages.push(l),l}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return jt=t,t.default=t,jt}var Ht,Ds;function Yi(){if(Ds)return Ht;Ds=1;let e={};return Ht=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Ht}var Vt,Ts;function Qi(){if(Ts)return Vt;Ts=1;let e=Oe(),t=zr(),s=Hi(),o=qr(),i=jr(),l=qe(),h=ht(),{isClean:d,my:m}=$r(),f=Yi();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},a={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function c(x){let y=!1,w=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=c(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let b={};class S{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=v(w);else if(w instanceof S||w instanceof i)R=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=ae(T({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?T(T({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let I=w[w.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(I=>C(I,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=h;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 y of this.plugins){let w=this.runOnRoot(y);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let I;try{I=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,_]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(P){throw this.handleError(P,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[d]){_[d]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[d]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[d]=!0;let w=c(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=x=>{b=x},Vt=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),Vt}var Gt,Fs;function ko(){if(Fs)return Gt;Fs=1;let e=Hi(),t=qr();const s=jr();let o=ht(),i=Yi();class l{constructor(d,m,f){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=f,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,c]=n.generate();p&&(this.result.css=p),c&&(this.result.map=c)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}}return Gt=l,l.default=l,Gt}var Jt,Us;function Lo(){if(Us)return Jt;Us=1;let e=zr(),t=Qi(),s=ko(),o=qe();class i{constructor(h=[]){this.version="8.5.1",this.plugins=this.normalize(h)}normalize(h){let d=[];for(let m of h)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(h,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,h,d):new t(this,h,d)}use(h){return this.plugins=this.plugins.concat(this.normalize([h])),this}}return Jt=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Jt}var Yt,$s;function Xi(){if($s)return Yt;$s=1;let e=Br(),t=We(),s=Oe(),o=Ur(),i=pt(),l=zr(),h=_o(),d=dt(),m=Qi(),f=ji(),r=ft(),u=qr(),a=Lo(),n=jr(),p=qe(),c=Wr(),g=ht(),v=Ji();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return b.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
39
+ `),n=b.length-g):n+=b.length,S&&x!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(c.source=this.sourcePath(S),c.original.line=S.source.end.line,c.original.column=S.source.end.column-1,c.generated.line=a,c.generated.column=n-2,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,c.generated.line=a,c.generated.column=n-1,this.map.addMapping(c)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a!="undefined"&&a!==!0?!1:this.previous().length?this.previous().some(n=>n.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let n=this.memoizedPaths.get(a);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let c=t(p,a);return this.memoizedPaths.set(a,c),c}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let n=a.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!a[p]){a[p]=!0;let c=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(c,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let n=this.memoizedFileURLs.get(a);if(n)return n;if(h){let p=h(a).toString();return this.memoizedFileURLs.set(a,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let n=this.memoizedURLs.get(a);if(n)return n;o==="\\"&&(a=a.replace(/\\/g,"/"));let p=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,p),p}}return Bt=r,Bt}var zt,Ns;function Gi(){if(Ns)return zt;Ns=1;const e=39,t=34,s=92,o=47,i=10,l=32,h=12,d=9,m=13,f=91,r=93,u=40,a=41,n=123,p=125,c=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return zt=function(R,I={}){let M=R.css.valueOf(),_=I.ignoreErrors,P,Z,ee,O,Q,L,$,X,V,de,ge=M.length,E=0,pe=[],oe=[];function Fe(){return E}function te(N){throw R.error("Unclosed "+N,E)}function ne(){return oe.length===0&&E>=ge}function xe(N){if(oe.length)return oe.pop();if(E>=ge)return;let J=N?N.ignoreUnclosed:!1;switch(P=M.charCodeAt(E),P){case i:case l:case d:case m:case h:{O=E;do O+=1,P=M.charCodeAt(O);while(P===l||P===i||P===d||P===m||P===h);L=["space",M.slice(E,O)],E=O-1;break}case f:case r:case n:case p:case v:case c:case a:{let B=String.fromCharCode(P);L=[B,B,E];break}case u:{if(de=pe.length?pe.pop()[1]:"",V=M.charCodeAt(E+1),de==="url"&&V!==e&&V!==t&&V!==l&&V!==i&&V!==d&&V!==h&&V!==m){O=E;do{if($=!1,O=M.indexOf(")",O+1),O===-1)if(_||J){O=E;break}else te("bracket");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["brackets",M.slice(E,O+1),E,O],E=O}else O=M.indexOf(")",E+1),Z=M.slice(E,O+1),O===-1||y.test(Z)?L=["(","(",E]:(L=["brackets",Z,E,O],E=O);break}case e:case t:{Q=P===e?"'":'"',O=E;do{if($=!1,O=M.indexOf(Q,O+1),O===-1)if(_||J){O=E+1;break}else te("string");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["string",M.slice(E,O+1),E,O],E=O;break}case b:{S.lastIndex=E+1,S.test(M),S.lastIndex===0?O=M.length-1:O=S.lastIndex-2,L=["at-word",M.slice(E,O+1),E,O],E=O;break}case s:{for(O=E,ee=!0;M.charCodeAt(O+1)===s;)O+=1,ee=!ee;if(P=M.charCodeAt(O+1),ee&&P!==o&&P!==l&&P!==i&&P!==d&&P!==m&&P!==h&&(O+=1,w.test(M.charAt(O)))){for(;w.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===l&&(O+=1)}L=["word",M.slice(E,O+1),E,O],E=O;break}default:{P===o&&M.charCodeAt(E+1)===g?(O=M.indexOf("*/",E+2)+1,O===0&&(_||J?O=M.length:te("comment")),L=["comment",M.slice(E,O+1),E,O],E=O):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?O=M.length-1:O=x.lastIndex-2,L=["word",M.slice(E,O+1),E,O],pe.push(L),E=O);break}}return E++,L}function ye(N){oe.push(N)}return{back:ye,endOfFile:ne,nextToken:xe,position:Fe}},zt}var Wt,_s;function Ji(){if(_s)return Wt;_s=1;let e=zr(),t=qe(),s=dt(),o=je(),i=qr(),l=Gi();const h={empty:!0,space:!0};function d(f){for(let r=f.length-1;r>=0;r--){let u=f[r],a=u[3]||u[2];if(a)return a}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let a,n,p,c=!1,g=!1,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),a=r[0],a==="("||a==="["?b.push(a==="("?")":"]"):a==="{"&&b.length>0?b.push("}"):a===b[b.length-1]&&b.pop(),b.length===0)if(a===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){g=!0;break}else if(a==="}"){if(v.length>0){for(p=v.length-1,n=v[p];n&&n[0]==="space";)n=v[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else v.push(r);else v.push(r);if(this.tokenizer.endOfFile()){c=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(u.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(u,"params",v),c&&(r=v[v.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let a=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(a+=1,a===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,a,n,p;for(let[c,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return c}a=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let a=r[1].slice(2,-2);if(/^\s*$/.test(a))u.text="",u.raws.left=a,u.raws.right="";else{let n=a.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(r,u){let a=new s;this.init(a,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),a.source.end=this.getPosition(n[3]||n[2]||d(r)),a.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),a.raws.before+=r.shift()[1];for(a.source.start=this.getPosition(r[0][2]),a.prop="";r.length;){let b=r[0][0];if(b===":"||b==="space"||b==="comment")break;a.prop+=r.shift()[1]}a.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){a.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),a.raws.between+=p[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let c=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)c.push(r.shift());this.precheckMissedSemicolon(r);for(let b=r.length-1;b>=0;b--){if(p=r[b],p[1].toLowerCase()==="!important"){a.important=!0;let S=this.stringFrom(r,b);S=this.spacesFromEnd(r)+S,S!==" !important"&&(a.raws.important=S);break}else if(p[1].toLowerCase()==="important"){let S=r.slice(0),x="";for(let y=b;y>0;y--){let w=S[y][0];if(x.trim().startsWith("!")&&w!=="space")break;x=S.pop()[1]+x}x.trim().startsWith("!")&&(a.important=!0,a.raws.important=x,r=S)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(a.raws.between+=c.map(b=>b[1]).join(""),c=[]),this.raw(a,"value",c.concat(r),u),a.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){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(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}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(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,a=null,n=!1,p=null,c=[],g=r[1].startsWith("--"),v=[],b=r;for(;b;){if(a=b[0],v.push(b),a==="("||a==="[")p||(p=b),c.push(a==="("?")":"]");else if(g&&n&&a==="{")p||(p=b),c.push("}");else if(c.length===0)if(a===";")if(n){this.decl(v,g);return}else break;else if(a==="{"){this.rule(v);return}else if(a==="}"){this.tokenizer.back(v.pop()),u=!0;break}else a===":"&&(n=!0);else a===c[c.length-1]&&(c.pop(),c.length===0&&(p=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),c.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,a,n){let p,c,g=a.length,v="",b=!0,S,x;for(let y=0;y<g;y+=1)p=a[y],c=p[0],c==="space"&&y===g-1&&!n?b=!1:c==="comment"?(x=a[y-1]?a[y-1][0]:"empty",S=a[y+1]?a[y+1][0]:"empty",!h[x]&&!h[S]?v.slice(-1)===","?b=!1:v+=p[1]:b=!1):v+=p[1];if(!b){let y=a.reduce((w,C)=>w+C[1],"");r.raws[u]={raw:y,value:v}}r[u]=v}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)a=r.pop()[1]+a;return a}spacesAndCommentsFromStart(r){let u,a="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)a+=r.shift()[1];return a}spacesFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],u==="space");)a=r.pop()[1]+a;return a}stringFrom(r,u){let a="";for(let n=u;n<r.length;n++)a+=r[n][1];return r.splice(u,r.length-u),a}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word",{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return Wt=m,Wt}var qt,ks;function jr(){if(ks)return qt;ks=1;let e=Oe(),t=mt(),s=Ji();function o(i,l){let h=new t(i,l),d=new s(h);try{d.parse()}catch(m){throw m}return d.root}return qt=o,o.default=o,e.registerParse(o),qt}var jt,Ls;function Yi(){if(Ls)return jt;Ls=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return jt=e,e.default=e,jt}var Ht,Ds;function Hr(){if(Ds)return Ht;Ds=1;let e=Yi();class t{constructor(o,i,l){this.processor=o,this.messages=[],this.root=i,this.opts=l,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let l=new e(o,i);return this.messages.push(l),l}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Ht=t,t.default=t,Ht}var Vt,Ts;function Qi(){if(Ts)return Vt;Ts=1;let e={};return Vt=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Vt}var Gt,Fs;function Xi(){if(Fs)return Gt;Fs=1;let e=Oe(),t=Wr(),s=Vi(),o=jr(),i=Hr(),l=je(),h=ft(),{isClean:d,my:m}=Br(),f=Qi();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},a={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function c(x){let y=!1,w=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=c(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let b={};class S{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=v(w);else if(w instanceof S||w instanceof i)R=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=ae(T({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?T(T({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let I=w[w.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(I=>C(I,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=h;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 y of this.plugins){let w=this.runOnRoot(y);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let I;try{I=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,_]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(P){throw this.handleError(P,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[d]){_[d]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[d]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[d]=!0;let w=c(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=x=>{b=x},Gt=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),Gt}var Jt,Us;function Lo(){if(Us)return Jt;Us=1;let e=Vi(),t=jr();const s=Hr();let o=ft(),i=Qi();class l{constructor(d,m,f){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=f,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,c]=n.generate();p&&(this.result.css=p),c&&(this.result.map=c)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}}return Jt=l,l.default=l,Jt}var Yt,$s;function Do(){if($s)return Yt;$s=1;let e=Wr(),t=Xi(),s=Lo(),o=je();class i{constructor(h=[]){this.version="8.5.1",this.plugins=this.normalize(h)}normalize(h){let d=[];for(let m of h)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(h,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,h,d):new t(this,h,d)}use(h){return this.plugins=this.plugins.concat(this.normalize([h])),this}}return Yt=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Yt}var Qt,Bs;function Ki(){if(Bs)return Qt;Bs=1;let e=zr(),t=qe(),s=Oe(),o=$r(),i=dt(),l=Wr(),h=ko(),d=mt(),m=Xi(),f=Hi(),r=pt(),u=jr(),a=Do(),n=Hr(),p=je(),c=qr(),g=ft(),v=Yi();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return b.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
40
40
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
41
- https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new a().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,_){return b([C(_)]).process(I,M)},C},b.stringify=g,b.parse=u,b.fromJSON=h,b.list=f,b.comment=S=>new t(S),b.atRule=S=>new e(S),b.decl=S=>new i(S),b.rule=S=>new c(S),b.root=S=>new p(S),b.document=S=>new l(S),b.CssSyntaxError=o,b.Declaration=i,b.Container=s,b.Processor=a,b.Document=l,b.Comment=t,b.Warning=v,b.AtRule=e,b.Result=n,b.Input=d,b.Rule=c,b.Root=p,b.Node=r,m.registerPostcss(b),Yt=b,b.default=b,Yt}var Qt,Bs;function Do(){if(Bs)return Qt;Bs=1;let e=We(),t=Gi(),s=Vi();class o extends t{checkMissedSemicolon(){}comment(l){let h=new e;this.init(h,l[2]);let d=this.input.fromOffset(l[3])||this.input.fromOffset(this.input.css.length-1);h.source.end={column:d.col,line:d.line,offset:l[3]+1};let m=l[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))h.text="",h.raws.left=m,h.raws.right="";else{let f=m.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(l){l.length>1&&l.some(h=>h[0]==="word")&&super.decl(l)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(l){let h=this.colon(l);if(h===!1)return;let d,m;for(d=h-1;d>=0&&l[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(l[m][0]!=="space"){m+=1;break}let f=l.slice(d),r=l.slice(m,d);l.splice(m,l.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(l){this.spaces+=l.map(h=>h[1]).join("")}unnamedAtrule(l){l.name=""}}return Qt=o,Qt}var Xt,zs;function To(){if(zs)return Xt;zs=1;let{Input:e}=Xi(),t=Do();return Xt=function(o,i){let l=new e(o,i),h=new t(l);return h.parse(),h.root},Xt}To();var Fo=Xi();const q=Mo(Fo);q.stringify;q.fromJSON;q.plugin;q.parse;q.list;q.document;q.comment;q.atRule;q.rule;q.decl;q.root;q.CssSyntaxError;q.Declaration;q.Container;q.Processor;q.Document;q.Comment;q.Warning;q.AtRule;q.Result;q.Input;q.Rule;q.Root;q.Node;var Uo=Object.defineProperty,$o=(e,t,s)=>t in e?Uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,le=(e,t,s)=>$o(e,typeof t!="symbol"?t+"":t,s);function Bo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Xe={exports:{}},Ws;function Wo(){if(Ws)return Xe.exports;Ws=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Xe.exports=t(),Xe.exports.createColors=t,Xe.exports}const qo={},jo=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"})),he=zo(jo);var Kt,qs;function Hr(){if(qs)return Kt;qs=1;let e=Wo(),t=he;class s extends Error{constructor(i,l,h,d,m,f){super(i),this.name="CssSyntaxError",this.reason=i,m&&(this.file=m),d&&(this.source=d),f&&(this.plugin=f),typeof l!="undefined"&&typeof h!="undefined"&&(typeof l=="number"?(this.line=l,this.column=h):(this.line=l.line,this.column=l.column,this.endLine=h.line,this.endColumn=h.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(i){if(!this.source)return"";let l=this.source;i==null&&(i=e.isColorSupported);let h=n=>n,d=n=>n,m=n=>n;if(i){let{bold:n,gray:p,red:c}=e.createColors(!0);d=g=>n(c(g)),h=g=>p(g),t&&(m=g=>t(g))}let f=l.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),a=String(u).length;return f.slice(r,u).map((n,p)=>{let c=r+1+p,g=" "+(" "+c).slice(-a)+" | ";if(c===this.line){if(n.length>160){let b=20,S=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),y=n.slice(S,x),w=h(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return d(">")+h(g)+m(y)+`
41
+ https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new a().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,_){return b([C(_)]).process(I,M)},C},b.stringify=g,b.parse=u,b.fromJSON=h,b.list=f,b.comment=S=>new t(S),b.atRule=S=>new e(S),b.decl=S=>new i(S),b.rule=S=>new c(S),b.root=S=>new p(S),b.document=S=>new l(S),b.CssSyntaxError=o,b.Declaration=i,b.Container=s,b.Processor=a,b.Document=l,b.Comment=t,b.Warning=v,b.AtRule=e,b.Result=n,b.Input=d,b.Rule=c,b.Root=p,b.Node=r,m.registerPostcss(b),Qt=b,b.default=b,Qt}var Xt,zs;function To(){if(zs)return Xt;zs=1;let e=qe(),t=Ji(),s=Gi();class o extends t{checkMissedSemicolon(){}comment(l){let h=new e;this.init(h,l[2]);let d=this.input.fromOffset(l[3])||this.input.fromOffset(this.input.css.length-1);h.source.end={column:d.col,line:d.line,offset:l[3]+1};let m=l[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))h.text="",h.raws.left=m,h.raws.right="";else{let f=m.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(l){l.length>1&&l.some(h=>h[0]==="word")&&super.decl(l)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(l){let h=this.colon(l);if(h===!1)return;let d,m;for(d=h-1;d>=0&&l[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(l[m][0]!=="space"){m+=1;break}let f=l.slice(d),r=l.slice(m,d);l.splice(m,l.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(l){this.spaces+=l.map(h=>h[1]).join("")}unnamedAtrule(l){l.name=""}}return Xt=o,Xt}var Kt,Ws;function Fo(){if(Ws)return Kt;Ws=1;let{Input:e}=Ki(),t=To();return Kt=function(o,i){let l=new e(o,i),h=new t(l);return h.parse(),h.root},Kt}Fo();var Uo=Ki();const q=Eo(Uo);q.stringify;q.fromJSON;q.plugin;q.parse;q.list;q.document;q.comment;q.atRule;q.rule;q.decl;q.root;q.CssSyntaxError;q.Declaration;q.Container;q.Processor;q.Document;q.Comment;q.Warning;q.AtRule;q.Result;q.Input;q.Rule;q.Root;q.Node;var $o=Object.defineProperty,Bo=(e,t,s)=>t in e?$o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,le=(e,t,s)=>Bo(e,typeof t!="symbol"?t+"":t,s);function zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Ke={exports:{}},qs;function qo(){if(qs)return Ke.exports;qs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ke.exports=t(),Ke.exports.createColors=t,Ke.exports}const jo={},Ho=Object.freeze(Object.defineProperty({__proto__:null,default:jo},Symbol.toStringTag,{value:"Module"})),fe=Wo(Ho);var Zt,js;function Vr(){if(js)return Zt;js=1;let e=qo(),t=fe;class s extends Error{constructor(i,l,h,d,m,f){super(i),this.name="CssSyntaxError",this.reason=i,m&&(this.file=m),d&&(this.source=d),f&&(this.plugin=f),typeof l!="undefined"&&typeof h!="undefined"&&(typeof l=="number"?(this.line=l,this.column=h):(this.line=l.line,this.column=l.column,this.endLine=h.line,this.endColumn=h.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(i){if(!this.source)return"";let l=this.source;i==null&&(i=e.isColorSupported);let h=n=>n,d=n=>n,m=n=>n;if(i){let{bold:n,gray:p,red:c}=e.createColors(!0);d=g=>n(c(g)),h=g=>p(g),t&&(m=g=>t(g))}let f=l.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),a=String(u).length;return f.slice(r,u).map((n,p)=>{let c=r+1+p,g=" "+(" "+c).slice(-a)+" | ";if(c===this.line){if(n.length>160){let b=20,S=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),y=n.slice(S,x),w=h(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return d(">")+h(g)+m(y)+`
42
42
  `+w+d("^")}let v=h(g.replace(/\d/g," "))+n.slice(0,this.column-1).replace(/[^\t]/g," ");return d(">")+h(g)+m(n)+`
43
43
  `+v+d("^")}return" "+h(g)+m(n)}).join(`
44
44
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
45
45
 
46
46
  `+i+`
47
- `),this.name+": "+this.message+i}}return Kt=s,s.default=s,Kt}var Zt,js;function Ki(){if(js)return Zt;js=1;const e={after:`
47
+ `),this.name+": "+this.message+i}}return Zt=s,s.default=s,Zt}var er,Hs;function Zi(){if(Hs)return er;Hs=1;const e={after:`
48
48
  `,beforeClose:`
49
49
  `,beforeComment:`
50
50
  `,beforeDecl:`
@@ -55,19 +55,19 @@ https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.p
55
55
  `)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeDecl"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeDecl(i,l){let h;return i.walkDecls(d=>{if(typeof d.raws.before!="undefined")return h=d.raws.before,h.includes(`
56
56
  `)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeRule"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeOpen(i){let l;return i.walk(h=>{if(h.type!=="decl"&&(l=h.raws.between,typeof l!="undefined"))return!1}),l}rawBeforeRule(i){let l;return i.walk(h=>{if(h.nodes&&(h.parent!==i||i.first!==h)&&typeof h.raws.before!="undefined")return l=h.raws.before,l.includes(`
57
57
  `)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawColon(i){let l;return i.walkDecls(h=>{if(typeof h.raws.between!="undefined")return l=h.raws.between.replace(/[^\s:]/g,""),!1}),l}rawEmptyBody(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length===0&&(l=h.raws.after,typeof l!="undefined"))return!1}),l}rawIndent(i){if(i.raws.indent)return i.raws.indent;let l;return i.walk(h=>{let d=h.parent;if(d&&d!==i&&d.parent&&d.parent===i&&typeof h.raws.before!="undefined"){let m=h.raws.before.split(`
58
- `);return l=m[m.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length&&h.last.type==="decl"&&(l=h.raws.semicolon,typeof l!="undefined"))return!1}),l}rawValue(i,l){let h=i[l],d=i.raws[l];return d&&d.value===h?d.raw:h}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,l){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,l)}}return Zt=s,s.default=s,Zt}var er,Hs;function mt(){if(Hs)return er;Hs=1;let e=Ki();function t(s,o){new e(o).stringify(s)}return er=t,t.default=t,er}var Ke={},Vs;function Vr(){return Vs||(Vs=1,Ke.isClean=Symbol("isClean"),Ke.my=Symbol("my")),Ke}var tr,Gs;function gt(){if(Gs)return tr;Gs=1;let e=Hr(),t=Ki(),s=mt(),{isClean:o,my:i}=Vr();function l(m,f){let r=new m.constructor;for(let u in m){if(!Object.prototype.hasOwnProperty.call(m,u)||u==="proxyCache")continue;let a=m[u],n=typeof a;u==="parent"&&n==="object"?f&&(r[u]=f):u==="source"?r[u]=a:Array.isArray(a)?r[u]=a.map(p=>l(p,r)):(n==="object"&&a!==null&&(a=l(a)),r[u]=a)}return r}function h(m,f){if(f&&typeof f.offset!="undefined")return f.offset;let r=1,u=1,a=0;for(let n=0;n<m.length;n++){if(u===f.line&&r===f.column){a=n;break}m[n]===`
58
+ `);return l=m[m.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length&&h.last.type==="decl"&&(l=h.raws.semicolon,typeof l!="undefined"))return!1}),l}rawValue(i,l){let h=i[l],d=i.raws[l];return d&&d.value===h?d.raw:h}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,l){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,l)}}return er=s,s.default=s,er}var tr,Vs;function gt(){if(Vs)return tr;Vs=1;let e=Zi();function t(s,o){new e(o).stringify(s)}return tr=t,t.default=t,tr}var Ze={},Gs;function Gr(){return Gs||(Gs=1,Ze.isClean=Symbol("isClean"),Ze.my=Symbol("my")),Ze}var rr,Js;function yt(){if(Js)return rr;Js=1;let e=Vr(),t=Zi(),s=gt(),{isClean:o,my:i}=Gr();function l(m,f){let r=new m.constructor;for(let u in m){if(!Object.prototype.hasOwnProperty.call(m,u)||u==="proxyCache")continue;let a=m[u],n=typeof a;u==="parent"&&n==="object"?f&&(r[u]=f):u==="source"?r[u]=a:Array.isArray(a)?r[u]=a.map(p=>l(p,r)):(n==="object"&&a!==null&&(a=l(a)),r[u]=a)}return r}function h(m,f){if(f&&typeof f.offset!="undefined")return f.offset;let r=1,u=1,a=0;for(let n=0;n<m.length;n++){if(u===f.line&&r===f.column){a=n;break}m[n]===`
59
59
  `?(r=1,u+=1):r+=1}return a}class d{constructor(f={}){this.raws={},this[o]=!1,this[i]=!0;for(let r in f)if(r==="nodes"){this.nodes=[];for(let u of f[r])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[r]=f[r]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let r=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let r in f)this[r]=f[r];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let r=l(this);for(let u in f)r[u]=f[u];return r}cloneAfter(f={}){let r=this.clone(f);return this.parent.insertAfter(this,r),r}cloneBefore(f={}){let r=this.clone(f);return this.parent.insertBefore(this,r),r}error(f,r={}){if(this.source){let{end:u,start:a}=this.rangeBy(r);return this.source.input.error(f,{column:a.column,line:a.line},{column:u.column,line:u.line},r)}return new e(f)}getProxyProcessor(){return{get(f,r){return r==="proxyOf"?f:r==="root"?()=>f.root().toProxy():f[r]},set(f,r,u){return f[r]===u||(f[r]=u,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&f.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let f=this;for(;f=f.parent;)f[o]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let r=this.source.start;if(f.index)r=this.positionInside(f.index);else if(f.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,n=u.slice(h(u,this.source.start),h(u,this.source.end)).indexOf(f.word);n!==-1&&(r=this.positionInside(n))}return r}positionInside(f){let r=this.source.start.column,u=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,n=h(a,this.source.start),p=n+f;for(let c=n;c<p;c++)a[c]===`
60
- `?(r=1,u+=1):r+=1;return{column:r,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let r={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(f.word){let a="document"in this.source.input?this.source.input.document:this.source.input.css,p=a.slice(h(a,this.source.start),h(a,this.source.end)).indexOf(f.word);p!==-1&&(r=this.positionInside(p),u=this.positionInside(p+f.word.length))}else f.start?r={column:f.start.column,line:f.start.line}:f.index&&(r=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<r.line||u.line===r.line&&u.column<=r.column)&&(u={column:r.column+1,line:r.line}),{end:u,start:r}}raw(f,r){return new t().raw(this,f,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let r=this,u=!1;for(let a of f)a===this?u=!0:u?(this.parent.insertAfter(r,a),r=a):this.parent.insertBefore(r,a);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,r){let u={},a=r==null;r=r||new Map;let n=0;for(let p in this){if(!Object.prototype.hasOwnProperty.call(this,p)||p==="parent"||p==="proxyCache")continue;let c=this[p];if(Array.isArray(c))u[p]=c.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,r):g);else if(typeof c=="object"&&c.toJSON)u[p]=c.toJSON(null,r);else if(p==="source"){let g=r.get(c.input);g==null&&(g=n,r.set(c.input,n),n++),u[p]={end:c.end,inputId:g,start:c.start}}else u[p]=c}return a&&(u.inputs=[...r.keys()].map(p=>p.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let r="";return f(this,u=>{r+=u}),r}warn(f,r,u){let a={node:this};for(let n in u)a[n]=u[n];return f.warn(r,a)}get proxyOf(){return this}}return tr=d,d.default=d,tr}var rr,Js;function je(){if(Js)return rr;Js=1;let e=gt();class t extends e{constructor(o){super(o),this.type="comment"}}return rr=t,t.default=t,rr}var sr,Ys;function yt(){if(Ys)return sr;Ys=1;let e=gt();class t extends e{constructor(o){o&&typeof o.value!="undefined"&&typeof o.value!="string"&&(o=ae(T({},o),{value:String(o.value)})),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return sr=t,t.default=t,sr}var ir,Qs;function Me(){if(Qs)return ir;Qs=1;let e=je(),t=yt(),s=gt(),{isClean:o,my:i}=Vr(),l,h,d,m;function f(a){return a.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function r(a){if(a[o]=!1,a.proxyOf.nodes)for(let n of a.proxyOf.nodes)r(n)}class u extends s{append(...n){for(let p of n){let c=this.normalize(p,this.last);for(let g of c)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),c,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(c=this.indexes[p],g=n(this.proxyOf.nodes[c],c),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...c)=>n[p](...c.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):p==="every"||p==="some"?c=>n[p]((g,...v)=>c(g.toProxy(),...v)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(c=>c.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,c){return n[p]===c||(n[p]=c,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let c=this.index(n),g=this.normalize(p,this.proxyOf.nodes[c]).reverse();c=this.index(n);for(let b of g)this.proxyOf.nodes.splice(c+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],c<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(n,p){let c=this.index(n),g=c===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[c],g).reverse();c=this.index(n);for(let S of v)this.proxyOf.nodes.splice(c,0,S);let b;for(let S in this.indexes)b=this.indexes[S],c<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=f(h(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new m(n)];else if(n.name)n=[new l(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&r(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let c=this.normalize(p,this.first,"prepend").reverse();for(let g of c)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+c.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let c in this.indexes)p=this.indexes[c],p>=n&&(this.indexes[c]=p-1);return this.markDirty(),this}replaceValues(n,p,c){return c||(c=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,c))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,c)=>{let g;try{g=n(p,c)}catch(v){throw p.addToError(v)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="atrule"&&n.test(c.name))return p(c,g)}):this.walk((c,g)=>{if(c.type==="atrule"&&c.name===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="atrule")return p(c,g)}))}walkComments(n){return this.walk((p,c)=>{if(p.type==="comment")return n(p,c)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="decl"&&n.test(c.prop))return p(c,g)}):this.walk((c,g)=>{if(c.type==="decl"&&c.prop===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="decl")return p(c,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="rule"&&n.test(c.selector))return p(c,g)}):this.walk((c,g)=>{if(c.type==="rule"&&c.selector===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="rule")return p(c,g)}))}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]}}return u.registerParse=a=>{h=a},u.registerRule=a=>{m=a},u.registerAtRule=a=>{l=a},u.registerRoot=a=>{d=a},ir=u,u.default=u,u.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,m.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[i]=!0,a.nodes&&a.nodes.forEach(n=>{u.rebuild(n)})},ir}var nr,Xs;function Gr(){if(Xs)return nr;Xs=1;let e=Me();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return nr=t,t.default=t,e.registerAtRule(t),nr}var or,Ks;function Jr(){if(Ks)return or;Ks=1;let e=Me(),t,s;class o extends e{constructor(l){super(T({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},or=o,o.default=o,or}var ar,Zs;function Ho(){if(Zs)return ar;Zs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ar={nanoid:(o=21)=>{let i="",l=o|0;for(;l--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(l=i)=>{let h="",d=l|0;for(;d--;)h+=o[Math.random()*o.length|0];return h}},ar}var lr,ei;function Zi(){if(ei)return lr;ei=1;let{existsSync:e,readFileSync:t}=he,{dirname:s,join:o}=he,{SourceMapConsumer:i,SourceMapGenerator:l}=he;function h(m){return Buffer?Buffer.from(m,"base64").toString():window.atob(m)}class d{constructor(f,r){if(r.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=r.map?r.map.prev:void 0,a=this.loadMap(r.from,u);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let r=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,p=f.match(a)||f.match(n);if(p)return decodeURIComponent(f.substr(p[0].length));let c=f.match(r)||f.match(u);if(c)return h(f.substr(c[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let r=f.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let u=f.lastIndexOf(r.pop()),a=f.indexOf("*/",u);u>-1&&a>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,a)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let u=r(f);if(u){let a=this.loadFile(u);if(!a)throw new Error("Unable to load previous source map: "+u.toString());return a}}else{if(r instanceof i)return l.fromSourceMap(r).toString();if(r instanceof l)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(s(f),u)),this.loadFile(u)}}}startWith(f,r){return f?f.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return lr=d,d.default=d,lr}var ur,ti;function wt(){if(ti)return ur;ti=1;let{nanoid:e}=Ho(),{isAbsolute:t,resolve:s}=he,{SourceMapConsumer:o,SourceMapGenerator:i}=he,{fileURLToPath:l,pathToFileURL:h}=he,d=Hr(),m=Zi(),f=he,r=Symbol("fromOffsetCache"),u=!!(o&&i),a=!!(s&&t);class n{constructor(c,g={}){if(c===null||typeof c=="undefined"||typeof c=="object"&&!c.toString)throw new Error(`PostCSS received ${c} instead of CSS string`);if(this.css=c.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,g.document&&(this.document=g.document.toString()),g.from&&(!a||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=s(g.from)),a&&u){let v=new m(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(c,g,v,b={}){let S,x,y;if(g&&typeof g=="object"){let C=g,R=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);x=I.line,S=I.col}else x=R.line,S=R.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,S);return w?y=new d(c,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new d(c,x===void 0?g:{column:v,line:g},x===void 0?v:{column:S,line:x},this.css,this.file,b.plugin),y.input={column:v,endColumn:S,endLine:x,line:g,source:this.css},this.file&&(h&&(y.input.url=h(this.file).toString()),y.input.file=this.file),y}fromOffset(c){let g,v;if(this[r])v=this[r];else{let S=this.css.split(`
61
- `);v=new Array(S.length);let x=0;for(let y=0,w=S.length;y<w;y++)v[y]=x,x+=S[y].length+1;this[r]=v}g=v[v.length-1];let b=0;if(c>=g)b=v.length-1;else{let S=v.length-2,x;for(;b<S;)if(x=b+(S-b>>1),c<v[x])S=x-1;else if(c>=v[x+1])b=x+1;else{b=x;break}}return{col:c-v[b]+1,line:b+1}}mapResolve(c){return/^\w+:\/\//.test(c)?c:s(this.map.consumer().sourceRoot||this.map.root||".",c)}origin(c,g,v,b){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:c});if(!x.source)return!1;let y;typeof v=="number"&&(y=S.originalPositionFor({column:b,line:v}));let w;t(x.source)?w=h(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(l)C.file=l(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(C.source=R),C}toJSON(){let c={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(c[g]=this[g]);return this.map&&(c.map=T({},this.map),c.map.consumerCache&&(c.map.consumerCache=void 0)),c}get from(){return this.file||this.id}}return ur=n,n.default=n,f&&f.registerInput&&f.registerInput(n),ur}var cr,ri;function He(){if(ri)return cr;ri=1;let e=Me(),t,s;class o extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,h,d){let m=super.normalize(l);if(h){if(d==="prepend")this.nodes.length>1?h.raws.before=this.nodes[1].raws.before:delete h.raws.before;else if(this.first!==h)for(let f of m)f.raws.before=h.raws.before}return m}removeChild(l,h){let d=this.index(l);return!h&&d===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[d].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},cr=o,o.default=o,e.registerRoot(o),cr}var hr,si;function en(){if(si)return hr;si=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
62
- `," "];return e.split(t,s)},split(t,s,o){let i=[],l="",h=!1,d=0,m=!1,f="",r=!1;for(let u of t)r?r=!1:u==="\\"?r=!0:m?u===f&&(m=!1):u==='"'||u==="'"?(m=!0,f=u):u==="("?d+=1:u===")"?d>0&&(d-=1):d===0&&s.includes(u)&&(h=!0),h?(l!==""&&i.push(l.trim()),l="",h=!1):l+=u;return(o||l!=="")&&i.push(l.trim()),i}};return hr=e,e.default=e,hr}var fr,ii;function Yr(){if(ii)return fr;ii=1;let e=Me(),t=en();class s extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let l=this.selector?this.selector.match(/,\s*/):null,h=l?l[0]:","+this.raw("between","beforeOpen");this.selector=i.join(h)}}return fr=s,s.default=s,e.registerRule(s),fr}var pr,ni;function Vo(){if(ni)return pr;ni=1;let e=Gr(),t=je(),s=yt(),o=wt(),i=Zi(),l=He(),h=Yr();function d(m,f){if(Array.isArray(m))return m.map(p=>d(p));let a=m,{inputs:r}=a,u=Ie(a,["inputs"]);if(r){f=[];for(let p of r){let c=ae(T({},p),{__proto__:o.prototype});c.map&&(c.map=ae(T({},c.map),{__proto__:i.prototype})),f.push(c)}}if(u.nodes&&(u.nodes=m.nodes.map(p=>d(p,f))),u.source){let n=u.source,{inputId:p}=n,c=Ie(n,["inputId"]);u.source=c,p!=null&&(u.source.input=f[p])}if(u.type==="root")return new l(u);if(u.type==="decl")return new s(u);if(u.type==="rule")return new h(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+m.type)}return pr=d,d.default=d,pr}var dr,oi;function tn(){if(oi)return dr;oi=1;let{dirname:e,relative:t,resolve:s,sep:o}=he,{SourceMapConsumer:i,SourceMapGenerator:l}=he,{pathToFileURL:h}=he,d=wt(),m=!!(i&&l),f=!!(e&&s&&t&&o);class r{constructor(a,n,p,c){this.stringify=a,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=c,this.originalCSS=c,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let n=`
60
+ `?(r=1,u+=1):r+=1;return{column:r,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let r={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(f.word){let a="document"in this.source.input?this.source.input.document:this.source.input.css,p=a.slice(h(a,this.source.start),h(a,this.source.end)).indexOf(f.word);p!==-1&&(r=this.positionInside(p),u=this.positionInside(p+f.word.length))}else f.start?r={column:f.start.column,line:f.start.line}:f.index&&(r=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<r.line||u.line===r.line&&u.column<=r.column)&&(u={column:r.column+1,line:r.line}),{end:u,start:r}}raw(f,r){return new t().raw(this,f,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let r=this,u=!1;for(let a of f)a===this?u=!0:u?(this.parent.insertAfter(r,a),r=a):this.parent.insertBefore(r,a);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,r){let u={},a=r==null;r=r||new Map;let n=0;for(let p in this){if(!Object.prototype.hasOwnProperty.call(this,p)||p==="parent"||p==="proxyCache")continue;let c=this[p];if(Array.isArray(c))u[p]=c.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,r):g);else if(typeof c=="object"&&c.toJSON)u[p]=c.toJSON(null,r);else if(p==="source"){let g=r.get(c.input);g==null&&(g=n,r.set(c.input,n),n++),u[p]={end:c.end,inputId:g,start:c.start}}else u[p]=c}return a&&(u.inputs=[...r.keys()].map(p=>p.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let r="";return f(this,u=>{r+=u}),r}warn(f,r,u){let a={node:this};for(let n in u)a[n]=u[n];return f.warn(r,a)}get proxyOf(){return this}}return rr=d,d.default=d,rr}var sr,Ys;function He(){if(Ys)return sr;Ys=1;let e=yt();class t extends e{constructor(o){super(o),this.type="comment"}}return sr=t,t.default=t,sr}var ir,Qs;function wt(){if(Qs)return ir;Qs=1;let e=yt();class t extends e{constructor(o){o&&typeof o.value!="undefined"&&typeof o.value!="string"&&(o=ae(T({},o),{value:String(o.value)})),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return ir=t,t.default=t,ir}var nr,Xs;function Me(){if(Xs)return nr;Xs=1;let e=He(),t=wt(),s=yt(),{isClean:o,my:i}=Gr(),l,h,d,m;function f(a){return a.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function r(a){if(a[o]=!1,a.proxyOf.nodes)for(let n of a.proxyOf.nodes)r(n)}class u extends s{append(...n){for(let p of n){let c=this.normalize(p,this.last);for(let g of c)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),c,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(c=this.indexes[p],g=n(this.proxyOf.nodes[c],c),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...c)=>n[p](...c.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):p==="every"||p==="some"?c=>n[p]((g,...v)=>c(g.toProxy(),...v)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(c=>c.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,c){return n[p]===c||(n[p]=c,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let c=this.index(n),g=this.normalize(p,this.proxyOf.nodes[c]).reverse();c=this.index(n);for(let b of g)this.proxyOf.nodes.splice(c+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],c<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(n,p){let c=this.index(n),g=c===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[c],g).reverse();c=this.index(n);for(let S of v)this.proxyOf.nodes.splice(c,0,S);let b;for(let S in this.indexes)b=this.indexes[S],c<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=f(h(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new m(n)];else if(n.name)n=[new l(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&r(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let c=this.normalize(p,this.first,"prepend").reverse();for(let g of c)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+c.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let c in this.indexes)p=this.indexes[c],p>=n&&(this.indexes[c]=p-1);return this.markDirty(),this}replaceValues(n,p,c){return c||(c=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,c))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,c)=>{let g;try{g=n(p,c)}catch(v){throw p.addToError(v)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="atrule"&&n.test(c.name))return p(c,g)}):this.walk((c,g)=>{if(c.type==="atrule"&&c.name===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="atrule")return p(c,g)}))}walkComments(n){return this.walk((p,c)=>{if(p.type==="comment")return n(p,c)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="decl"&&n.test(c.prop))return p(c,g)}):this.walk((c,g)=>{if(c.type==="decl"&&c.prop===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="decl")return p(c,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="rule"&&n.test(c.selector))return p(c,g)}):this.walk((c,g)=>{if(c.type==="rule"&&c.selector===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="rule")return p(c,g)}))}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]}}return u.registerParse=a=>{h=a},u.registerRule=a=>{m=a},u.registerAtRule=a=>{l=a},u.registerRoot=a=>{d=a},nr=u,u.default=u,u.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,m.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[i]=!0,a.nodes&&a.nodes.forEach(n=>{u.rebuild(n)})},nr}var or,Ks;function Jr(){if(Ks)return or;Ks=1;let e=Me();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return or=t,t.default=t,e.registerAtRule(t),or}var ar,Zs;function Yr(){if(Zs)return ar;Zs=1;let e=Me(),t,s;class o extends e{constructor(l){super(T({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},ar=o,o.default=o,ar}var lr,ei;function Vo(){if(ei)return lr;ei=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return lr={nanoid:(o=21)=>{let i="",l=o|0;for(;l--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(l=i)=>{let h="",d=l|0;for(;d--;)h+=o[Math.random()*o.length|0];return h}},lr}var ur,ti;function en(){if(ti)return ur;ti=1;let{existsSync:e,readFileSync:t}=fe,{dirname:s,join:o}=fe,{SourceMapConsumer:i,SourceMapGenerator:l}=fe;function h(m){return Buffer?Buffer.from(m,"base64").toString():window.atob(m)}class d{constructor(f,r){if(r.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=r.map?r.map.prev:void 0,a=this.loadMap(r.from,u);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let r=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,p=f.match(a)||f.match(n);if(p)return decodeURIComponent(f.substr(p[0].length));let c=f.match(r)||f.match(u);if(c)return h(f.substr(c[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let r=f.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let u=f.lastIndexOf(r.pop()),a=f.indexOf("*/",u);u>-1&&a>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,a)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let u=r(f);if(u){let a=this.loadFile(u);if(!a)throw new Error("Unable to load previous source map: "+u.toString());return a}}else{if(r instanceof i)return l.fromSourceMap(r).toString();if(r instanceof l)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(s(f),u)),this.loadFile(u)}}}startWith(f,r){return f?f.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ur=d,d.default=d,ur}var cr,ri;function bt(){if(ri)return cr;ri=1;let{nanoid:e}=Vo(),{isAbsolute:t,resolve:s}=fe,{SourceMapConsumer:o,SourceMapGenerator:i}=fe,{fileURLToPath:l,pathToFileURL:h}=fe,d=Vr(),m=en(),f=fe,r=Symbol("fromOffsetCache"),u=!!(o&&i),a=!!(s&&t);class n{constructor(c,g={}){if(c===null||typeof c=="undefined"||typeof c=="object"&&!c.toString)throw new Error(`PostCSS received ${c} instead of CSS string`);if(this.css=c.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,g.document&&(this.document=g.document.toString()),g.from&&(!a||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=s(g.from)),a&&u){let v=new m(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(c,g,v,b={}){let S,x,y;if(g&&typeof g=="object"){let C=g,R=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);x=I.line,S=I.col}else x=R.line,S=R.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,S);return w?y=new d(c,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new d(c,x===void 0?g:{column:v,line:g},x===void 0?v:{column:S,line:x},this.css,this.file,b.plugin),y.input={column:v,endColumn:S,endLine:x,line:g,source:this.css},this.file&&(h&&(y.input.url=h(this.file).toString()),y.input.file=this.file),y}fromOffset(c){let g,v;if(this[r])v=this[r];else{let S=this.css.split(`
61
+ `);v=new Array(S.length);let x=0;for(let y=0,w=S.length;y<w;y++)v[y]=x,x+=S[y].length+1;this[r]=v}g=v[v.length-1];let b=0;if(c>=g)b=v.length-1;else{let S=v.length-2,x;for(;b<S;)if(x=b+(S-b>>1),c<v[x])S=x-1;else if(c>=v[x+1])b=x+1;else{b=x;break}}return{col:c-v[b]+1,line:b+1}}mapResolve(c){return/^\w+:\/\//.test(c)?c:s(this.map.consumer().sourceRoot||this.map.root||".",c)}origin(c,g,v,b){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:c});if(!x.source)return!1;let y;typeof v=="number"&&(y=S.originalPositionFor({column:b,line:v}));let w;t(x.source)?w=h(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(l)C.file=l(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(C.source=R),C}toJSON(){let c={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(c[g]=this[g]);return this.map&&(c.map=T({},this.map),c.map.consumerCache&&(c.map.consumerCache=void 0)),c}get from(){return this.file||this.id}}return cr=n,n.default=n,f&&f.registerInput&&f.registerInput(n),cr}var hr,si;function Ve(){if(si)return hr;si=1;let e=Me(),t,s;class o extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,h,d){let m=super.normalize(l);if(h){if(d==="prepend")this.nodes.length>1?h.raws.before=this.nodes[1].raws.before:delete h.raws.before;else if(this.first!==h)for(let f of m)f.raws.before=h.raws.before}return m}removeChild(l,h){let d=this.index(l);return!h&&d===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[d].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},hr=o,o.default=o,e.registerRoot(o),hr}var fr,ii;function tn(){if(ii)return fr;ii=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
62
+ `," "];return e.split(t,s)},split(t,s,o){let i=[],l="",h=!1,d=0,m=!1,f="",r=!1;for(let u of t)r?r=!1:u==="\\"?r=!0:m?u===f&&(m=!1):u==='"'||u==="'"?(m=!0,f=u):u==="("?d+=1:u===")"?d>0&&(d-=1):d===0&&s.includes(u)&&(h=!0),h?(l!==""&&i.push(l.trim()),l="",h=!1):l+=u;return(o||l!=="")&&i.push(l.trim()),i}};return fr=e,e.default=e,fr}var pr,ni;function Qr(){if(ni)return pr;ni=1;let e=Me(),t=tn();class s extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let l=this.selector?this.selector.match(/,\s*/):null,h=l?l[0]:","+this.raw("between","beforeOpen");this.selector=i.join(h)}}return pr=s,s.default=s,e.registerRule(s),pr}var dr,oi;function Go(){if(oi)return dr;oi=1;let e=Jr(),t=He(),s=wt(),o=bt(),i=en(),l=Ve(),h=Qr();function d(m,f){if(Array.isArray(m))return m.map(p=>d(p));let a=m,{inputs:r}=a,u=Ae(a,["inputs"]);if(r){f=[];for(let p of r){let c=ae(T({},p),{__proto__:o.prototype});c.map&&(c.map=ae(T({},c.map),{__proto__:i.prototype})),f.push(c)}}if(u.nodes&&(u.nodes=m.nodes.map(p=>d(p,f))),u.source){let n=u.source,{inputId:p}=n,c=Ae(n,["inputId"]);u.source=c,p!=null&&(u.source.input=f[p])}if(u.type==="root")return new l(u);if(u.type==="decl")return new s(u);if(u.type==="rule")return new h(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+m.type)}return dr=d,d.default=d,dr}var mr,ai;function rn(){if(ai)return mr;ai=1;let{dirname:e,relative:t,resolve:s,sep:o}=fe,{SourceMapConsumer:i,SourceMapGenerator:l}=fe,{pathToFileURL:h}=fe,d=bt(),m=!!(i&&l),f=!!(e&&s&&t&&o);class r{constructor(a,n,p,c){this.stringify=a,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=c,this.originalCSS=c,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let n=`
63
63
  `;this.css.includes(`\r
64
64
  `)&&(n=`\r
65
65
  `),this.css+=n+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let n=this.toUrl(this.path(a.file)),p=a.root||e(a.file),c;this.mapOpts.sourcesContent===!1?(c=new i(a.text),c.sourcesContent&&(c.sourcesContent=null)):c=a.consumer(),this.map.applySourceMap(c,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let a;for(let n=this.root.nodes.length-1;n>=0;n--)a=this.root.nodes[n],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&m&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,n=>{a+=n}),[a]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let a=this.previous()[0].consumer();a.file=this.outputFile(),this.map=l.fromSourceMap(a,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let a=1,n=1,p="<no source>",c={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(b,S,x)=>{if(this.css+=b,S&&x!=="end"&&(c.generated.line=a,c.generated.column=n-1,S.source&&S.source.start?(c.source=this.sourcePath(S),c.original.line=S.source.start.line,c.original.column=S.source.start.column-1,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,this.map.addMapping(c))),v=b.match(/\n/g),v?(a+=v.length,g=b.lastIndexOf(`
66
- `),n=b.length-g):n+=b.length,S&&x!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(c.source=this.sourcePath(S),c.original.line=S.source.end.line,c.original.column=S.source.end.column-1,c.generated.line=a,c.generated.column=n-2,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,c.generated.line=a,c.generated.column=n-1,this.map.addMapping(c)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a!="undefined"&&a!==!0?!1:this.previous().length?this.previous().some(n=>n.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let n=this.memoizedPaths.get(a);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let c=t(p,a);return this.memoizedPaths.set(a,c),c}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let n=a.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!a[p]){a[p]=!0;let c=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(c,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let n=this.memoizedFileURLs.get(a);if(n)return n;if(h){let p=h(a).toString();return this.memoizedFileURLs.set(a,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let n=this.memoizedURLs.get(a);if(n)return n;o==="\\"&&(a=a.replace(/\\/g,"/"));let p=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,p),p}}return dr=r,dr}var mr,ai;function rn(){if(ai)return mr;ai=1;const e=39,t=34,s=92,o=47,i=10,l=32,h=12,d=9,m=13,f=91,r=93,u=40,a=41,n=123,p=125,c=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return mr=function(R,I={}){let M=R.css.valueOf(),_=I.ignoreErrors,P,Z,ee,O,Q,L,$,X,G,de,ge=M.length,E=0,fe=[],ne=[];function Te(){return E}function te(N){throw R.error("Unclosed "+N,E)}function oe(){return ne.length===0&&E>=ge}function xe(N){if(ne.length)return ne.pop();if(E>=ge)return;let J=N?N.ignoreUnclosed:!1;switch(P=M.charCodeAt(E),P){case i:case l:case d:case m:case h:{O=E;do O+=1,P=M.charCodeAt(O);while(P===l||P===i||P===d||P===m||P===h);L=["space",M.slice(E,O)],E=O-1;break}case f:case r:case n:case p:case v:case c:case a:{let B=String.fromCharCode(P);L=[B,B,E];break}case u:{if(de=fe.length?fe.pop()[1]:"",G=M.charCodeAt(E+1),de==="url"&&G!==e&&G!==t&&G!==l&&G!==i&&G!==d&&G!==h&&G!==m){O=E;do{if($=!1,O=M.indexOf(")",O+1),O===-1)if(_||J){O=E;break}else te("bracket");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["brackets",M.slice(E,O+1),E,O],E=O}else O=M.indexOf(")",E+1),Z=M.slice(E,O+1),O===-1||y.test(Z)?L=["(","(",E]:(L=["brackets",Z,E,O],E=O);break}case e:case t:{Q=P===e?"'":'"',O=E;do{if($=!1,O=M.indexOf(Q,O+1),O===-1)if(_||J){O=E+1;break}else te("string");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["string",M.slice(E,O+1),E,O],E=O;break}case b:{S.lastIndex=E+1,S.test(M),S.lastIndex===0?O=M.length-1:O=S.lastIndex-2,L=["at-word",M.slice(E,O+1),E,O],E=O;break}case s:{for(O=E,ee=!0;M.charCodeAt(O+1)===s;)O+=1,ee=!ee;if(P=M.charCodeAt(O+1),ee&&P!==o&&P!==l&&P!==i&&P!==d&&P!==m&&P!==h&&(O+=1,w.test(M.charAt(O)))){for(;w.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===l&&(O+=1)}L=["word",M.slice(E,O+1),E,O],E=O;break}default:{P===o&&M.charCodeAt(E+1)===g?(O=M.indexOf("*/",E+2)+1,O===0&&(_||J?O=M.length:te("comment")),L=["comment",M.slice(E,O+1),E,O],E=O):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?O=M.length-1:O=x.lastIndex-2,L=["word",M.slice(E,O+1),E,O],fe.push(L),E=O);break}}return E++,L}function ye(N){ne.push(N)}return{back:ye,endOfFile:oe,nextToken:xe,position:Te}},mr}var gr,li;function sn(){if(li)return gr;li=1;let e=Gr(),t=je(),s=yt(),o=He(),i=Yr(),l=rn();const h={empty:!0,space:!0};function d(f){for(let r=f.length-1;r>=0;r--){let u=f[r],a=u[3]||u[2];if(a)return a}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let a,n,p,c=!1,g=!1,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),a=r[0],a==="("||a==="["?b.push(a==="("?")":"]"):a==="{"&&b.length>0?b.push("}"):a===b[b.length-1]&&b.pop(),b.length===0)if(a===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){g=!0;break}else if(a==="}"){if(v.length>0){for(p=v.length-1,n=v[p];n&&n[0]==="space";)n=v[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else v.push(r);else v.push(r);if(this.tokenizer.endOfFile()){c=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(u.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(u,"params",v),c&&(r=v[v.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let a=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(a+=1,a===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,a,n,p;for(let[c,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return c}a=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let a=r[1].slice(2,-2);if(/^\s*$/.test(a))u.text="",u.raws.left=a,u.raws.right="";else{let n=a.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(r,u){let a=new s;this.init(a,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),a.source.end=this.getPosition(n[3]||n[2]||d(r)),a.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),a.raws.before+=r.shift()[1];for(a.source.start=this.getPosition(r[0][2]),a.prop="";r.length;){let b=r[0][0];if(b===":"||b==="space"||b==="comment")break;a.prop+=r.shift()[1]}a.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){a.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),a.raws.between+=p[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let c=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)c.push(r.shift());this.precheckMissedSemicolon(r);for(let b=r.length-1;b>=0;b--){if(p=r[b],p[1].toLowerCase()==="!important"){a.important=!0;let S=this.stringFrom(r,b);S=this.spacesFromEnd(r)+S,S!==" !important"&&(a.raws.important=S);break}else if(p[1].toLowerCase()==="important"){let S=r.slice(0),x="";for(let y=b;y>0;y--){let w=S[y][0];if(x.trim().startsWith("!")&&w!=="space")break;x=S.pop()[1]+x}x.trim().startsWith("!")&&(a.important=!0,a.raws.important=x,r=S)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(a.raws.between+=c.map(b=>b[1]).join(""),c=[]),this.raw(a,"value",c.concat(r),u),a.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){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(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}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(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,a=null,n=!1,p=null,c=[],g=r[1].startsWith("--"),v=[],b=r;for(;b;){if(a=b[0],v.push(b),a==="("||a==="[")p||(p=b),c.push(a==="("?")":"]");else if(g&&n&&a==="{")p||(p=b),c.push("}");else if(c.length===0)if(a===";")if(n){this.decl(v,g);return}else break;else if(a==="{"){this.rule(v);return}else if(a==="}"){this.tokenizer.back(v.pop()),u=!0;break}else a===":"&&(n=!0);else a===c[c.length-1]&&(c.pop(),c.length===0&&(p=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),c.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,a,n){let p,c,g=a.length,v="",b=!0,S,x;for(let y=0;y<g;y+=1)p=a[y],c=p[0],c==="space"&&y===g-1&&!n?b=!1:c==="comment"?(x=a[y-1]?a[y-1][0]:"empty",S=a[y+1]?a[y+1][0]:"empty",!h[x]&&!h[S]?v.slice(-1)===","?b=!1:v+=p[1]:b=!1):v+=p[1];if(!b){let y=a.reduce((w,C)=>w+C[1],"");r.raws[u]={raw:y,value:v}}r[u]=v}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)a=r.pop()[1]+a;return a}spacesAndCommentsFromStart(r){let u,a="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)a+=r.shift()[1];return a}spacesFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],u==="space");)a=r.pop()[1]+a;return a}stringFrom(r,u){let a="";for(let n=u;n<r.length;n++)a+=r[n][1];return r.splice(u,r.length-u),a}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word",{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return gr=m,gr}var yr,ui;function Qr(){if(ui)return yr;ui=1;let e=Me(),t=wt(),s=sn();function o(i,l){let h=new t(i,l),d=new s(h);try{d.parse()}catch(m){throw m}return d.root}return yr=o,o.default=o,e.registerParse(o),yr}var wr,ci;function nn(){if(ci)return wr;ci=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return wr=e,e.default=e,wr}var br,hi;function Xr(){if(hi)return br;hi=1;let e=nn();class t{constructor(o,i,l){this.processor=o,this.messages=[],this.root=i,this.opts=l,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let l=new e(o,i);return this.messages.push(l),l}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return br=t,t.default=t,br}var Sr,fi;function on(){if(fi)return Sr;fi=1;let e={};return Sr=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Sr}var vr,pi;function an(){if(pi)return vr;pi=1;let e=Me(),t=Jr(),s=tn(),o=Qr(),i=Xr(),l=He(),h=mt(),{isClean:d,my:m}=Vr(),f=on();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},a={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function c(x){let y=!1,w=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=c(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let b={};class S{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=v(w);else if(w instanceof S||w instanceof i)R=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=ae(T({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?T(T({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let I=w[w.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(I=>C(I,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=h;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 y of this.plugins){let w=this.runOnRoot(y);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let I;try{I=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,_]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(P){throw this.handleError(P,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[d]){_[d]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[d]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[d]=!0;let w=c(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=x=>{b=x},vr=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),vr}var Cr,di;function Go(){if(di)return Cr;di=1;let e=tn(),t=Qr();const s=Xr();let o=mt(),i=on();class l{constructor(d,m,f){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=f,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,c]=n.generate();p&&(this.result.css=p),c&&(this.result.map=c)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}}return Cr=l,l.default=l,Cr}var xr,mi;function Jo(){if(mi)return xr;mi=1;let e=Jr(),t=an(),s=Go(),o=He();class i{constructor(h=[]){this.version="8.5.1",this.plugins=this.normalize(h)}normalize(h){let d=[];for(let m of h)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(h,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,h,d):new t(this,h,d)}use(h){return this.plugins=this.plugins.concat(this.normalize([h])),this}}return xr=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),xr}var Rr,gi;function ln(){if(gi)return Rr;gi=1;let e=Gr(),t=je(),s=Me(),o=Hr(),i=yt(),l=Jr(),h=Vo(),d=wt(),m=an(),f=en(),r=gt(),u=Qr(),a=Jo(),n=Xr(),p=He(),c=Yr(),g=mt(),v=nn();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return b.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
66
+ `),n=b.length-g):n+=b.length,S&&x!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(c.source=this.sourcePath(S),c.original.line=S.source.end.line,c.original.column=S.source.end.column-1,c.generated.line=a,c.generated.column=n-2,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,c.generated.line=a,c.generated.column=n-1,this.map.addMapping(c)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a!="undefined"&&a!==!0?!1:this.previous().length?this.previous().some(n=>n.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let n=this.memoizedPaths.get(a);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let c=t(p,a);return this.memoizedPaths.set(a,c),c}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let n=a.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!a[p]){a[p]=!0;let c=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(c,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let n=this.memoizedFileURLs.get(a);if(n)return n;if(h){let p=h(a).toString();return this.memoizedFileURLs.set(a,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let n=this.memoizedURLs.get(a);if(n)return n;o==="\\"&&(a=a.replace(/\\/g,"/"));let p=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,p),p}}return mr=r,mr}var gr,li;function sn(){if(li)return gr;li=1;const e=39,t=34,s=92,o=47,i=10,l=32,h=12,d=9,m=13,f=91,r=93,u=40,a=41,n=123,p=125,c=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return gr=function(R,I={}){let M=R.css.valueOf(),_=I.ignoreErrors,P,Z,ee,O,Q,L,$,X,V,de,ge=M.length,E=0,pe=[],oe=[];function Fe(){return E}function te(N){throw R.error("Unclosed "+N,E)}function ne(){return oe.length===0&&E>=ge}function xe(N){if(oe.length)return oe.pop();if(E>=ge)return;let J=N?N.ignoreUnclosed:!1;switch(P=M.charCodeAt(E),P){case i:case l:case d:case m:case h:{O=E;do O+=1,P=M.charCodeAt(O);while(P===l||P===i||P===d||P===m||P===h);L=["space",M.slice(E,O)],E=O-1;break}case f:case r:case n:case p:case v:case c:case a:{let B=String.fromCharCode(P);L=[B,B,E];break}case u:{if(de=pe.length?pe.pop()[1]:"",V=M.charCodeAt(E+1),de==="url"&&V!==e&&V!==t&&V!==l&&V!==i&&V!==d&&V!==h&&V!==m){O=E;do{if($=!1,O=M.indexOf(")",O+1),O===-1)if(_||J){O=E;break}else te("bracket");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["brackets",M.slice(E,O+1),E,O],E=O}else O=M.indexOf(")",E+1),Z=M.slice(E,O+1),O===-1||y.test(Z)?L=["(","(",E]:(L=["brackets",Z,E,O],E=O);break}case e:case t:{Q=P===e?"'":'"',O=E;do{if($=!1,O=M.indexOf(Q,O+1),O===-1)if(_||J){O=E+1;break}else te("string");for(X=O;M.charCodeAt(X-1)===s;)X-=1,$=!$}while($);L=["string",M.slice(E,O+1),E,O],E=O;break}case b:{S.lastIndex=E+1,S.test(M),S.lastIndex===0?O=M.length-1:O=S.lastIndex-2,L=["at-word",M.slice(E,O+1),E,O],E=O;break}case s:{for(O=E,ee=!0;M.charCodeAt(O+1)===s;)O+=1,ee=!ee;if(P=M.charCodeAt(O+1),ee&&P!==o&&P!==l&&P!==i&&P!==d&&P!==m&&P!==h&&(O+=1,w.test(M.charAt(O)))){for(;w.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===l&&(O+=1)}L=["word",M.slice(E,O+1),E,O],E=O;break}default:{P===o&&M.charCodeAt(E+1)===g?(O=M.indexOf("*/",E+2)+1,O===0&&(_||J?O=M.length:te("comment")),L=["comment",M.slice(E,O+1),E,O],E=O):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?O=M.length-1:O=x.lastIndex-2,L=["word",M.slice(E,O+1),E,O],pe.push(L),E=O);break}}return E++,L}function ye(N){oe.push(N)}return{back:ye,endOfFile:ne,nextToken:xe,position:Fe}},gr}var yr,ui;function nn(){if(ui)return yr;ui=1;let e=Jr(),t=He(),s=wt(),o=Ve(),i=Qr(),l=sn();const h={empty:!0,space:!0};function d(f){for(let r=f.length-1;r>=0;r--){let u=f[r],a=u[3]||u[2];if(a)return a}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let a,n,p,c=!1,g=!1,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),a=r[0],a==="("||a==="["?b.push(a==="("?")":"]"):a==="{"&&b.length>0?b.push("}"):a===b[b.length-1]&&b.pop(),b.length===0)if(a===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){g=!0;break}else if(a==="}"){if(v.length>0){for(p=v.length-1,n=v[p];n&&n[0]==="space";)n=v[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else v.push(r);else v.push(r);if(this.tokenizer.endOfFile()){c=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(u.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(u,"params",v),c&&(r=v[v.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let a=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(a+=1,a===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,a,n,p;for(let[c,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return c}a=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let a=r[1].slice(2,-2);if(/^\s*$/.test(a))u.text="",u.raws.left=a,u.raws.right="";else{let n=a.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(r,u){let a=new s;this.init(a,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),a.source.end=this.getPosition(n[3]||n[2]||d(r)),a.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),a.raws.before+=r.shift()[1];for(a.source.start=this.getPosition(r[0][2]),a.prop="";r.length;){let b=r[0][0];if(b===":"||b==="space"||b==="comment")break;a.prop+=r.shift()[1]}a.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){a.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),a.raws.between+=p[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let c=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)c.push(r.shift());this.precheckMissedSemicolon(r);for(let b=r.length-1;b>=0;b--){if(p=r[b],p[1].toLowerCase()==="!important"){a.important=!0;let S=this.stringFrom(r,b);S=this.spacesFromEnd(r)+S,S!==" !important"&&(a.raws.important=S);break}else if(p[1].toLowerCase()==="important"){let S=r.slice(0),x="";for(let y=b;y>0;y--){let w=S[y][0];if(x.trim().startsWith("!")&&w!=="space")break;x=S.pop()[1]+x}x.trim().startsWith("!")&&(a.important=!0,a.raws.important=x,r=S)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(a.raws.between+=c.map(b=>b[1]).join(""),c=[]),this.raw(a,"value",c.concat(r),u),a.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){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(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}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(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,a=null,n=!1,p=null,c=[],g=r[1].startsWith("--"),v=[],b=r;for(;b;){if(a=b[0],v.push(b),a==="("||a==="[")p||(p=b),c.push(a==="("?")":"]");else if(g&&n&&a==="{")p||(p=b),c.push("}");else if(c.length===0)if(a===";")if(n){this.decl(v,g);return}else break;else if(a==="{"){this.rule(v);return}else if(a==="}"){this.tokenizer.back(v.pop()),u=!0;break}else a===":"&&(n=!0);else a===c[c.length-1]&&(c.pop(),c.length===0&&(p=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),c.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,a,n){let p,c,g=a.length,v="",b=!0,S,x;for(let y=0;y<g;y+=1)p=a[y],c=p[0],c==="space"&&y===g-1&&!n?b=!1:c==="comment"?(x=a[y-1]?a[y-1][0]:"empty",S=a[y+1]?a[y+1][0]:"empty",!h[x]&&!h[S]?v.slice(-1)===","?b=!1:v+=p[1]:b=!1):v+=p[1];if(!b){let y=a.reduce((w,C)=>w+C[1],"");r.raws[u]={raw:y,value:v}}r[u]=v}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)a=r.pop()[1]+a;return a}spacesAndCommentsFromStart(r){let u,a="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)a+=r.shift()[1];return a}spacesFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],u==="space");)a=r.pop()[1]+a;return a}stringFrom(r,u){let a="";for(let n=u;n<r.length;n++)a+=r[n][1];return r.splice(u,r.length-u),a}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word",{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return yr=m,yr}var wr,ci;function Xr(){if(ci)return wr;ci=1;let e=Me(),t=bt(),s=nn();function o(i,l){let h=new t(i,l),d=new s(h);try{d.parse()}catch(m){throw m}return d.root}return wr=o,o.default=o,e.registerParse(o),wr}var br,hi;function on(){if(hi)return br;hi=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return br=e,e.default=e,br}var Sr,fi;function Kr(){if(fi)return Sr;fi=1;let e=on();class t{constructor(o,i,l){this.processor=o,this.messages=[],this.root=i,this.opts=l,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let l=new e(o,i);return this.messages.push(l),l}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Sr=t,t.default=t,Sr}var vr,pi;function an(){if(pi)return vr;pi=1;let e={};return vr=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},vr}var Cr,di;function ln(){if(di)return Cr;di=1;let e=Me(),t=Yr(),s=rn(),o=Xr(),i=Kr(),l=Ve(),h=gt(),{isClean:d,my:m}=Gr(),f=an();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},a={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function c(x){let y=!1,w=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=c(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let b={};class S{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=v(w);else if(w instanceof S||w instanceof i)R=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=ae(T({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?T(T({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let I=w[w.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(I=>C(I,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=h;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 y of this.plugins){let w=this.runOnRoot(y);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let I;try{I=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,_]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(P){throw this.handleError(P,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[d]){_[d]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[d]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[d]=!0;let w=c(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=x=>{b=x},Cr=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),Cr}var xr,mi;function Jo(){if(mi)return xr;mi=1;let e=rn(),t=Xr();const s=Kr();let o=gt(),i=an();class l{constructor(d,m,f){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=f,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,c]=n.generate();p&&(this.result.css=p),c&&(this.result.map=c)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}}return xr=l,l.default=l,xr}var Rr,gi;function Yo(){if(gi)return Rr;gi=1;let e=Yr(),t=ln(),s=Jo(),o=Ve();class i{constructor(h=[]){this.version="8.5.1",this.plugins=this.normalize(h)}normalize(h){let d=[];for(let m of h)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(h,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,h,d):new t(this,h,d)}use(h){return this.plugins=this.plugins.concat(this.normalize([h])),this}}return Rr=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Rr}var Or,yi;function un(){if(yi)return Or;yi=1;let e=Jr(),t=He(),s=Me(),o=Vr(),i=wt(),l=Yr(),h=Go(),d=bt(),m=ln(),f=tn(),r=yt(),u=Xr(),a=Yo(),n=Kr(),p=Ve(),c=Qr(),g=gt(),v=on();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return b.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
67
67
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
68
- https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new a().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,_){return b([C(_)]).process(I,M)},C},b.stringify=g,b.parse=u,b.fromJSON=h,b.list=f,b.comment=S=>new t(S),b.atRule=S=>new e(S),b.decl=S=>new i(S),b.rule=S=>new c(S),b.root=S=>new p(S),b.document=S=>new l(S),b.CssSyntaxError=o,b.Declaration=i,b.Container=s,b.Processor=a,b.Document=l,b.Comment=t,b.Warning=v,b.AtRule=e,b.Result=n,b.Input=d,b.Rule=c,b.Root=p,b.Node=r,m.registerPostcss(b),Rr=b,b.default=b,Rr}var Or,yi;function Yo(){if(yi)return Or;yi=1;let e=je(),t=sn(),s=rn();class o extends t{checkMissedSemicolon(){}comment(l){let h=new e;this.init(h,l[2]);let d=this.input.fromOffset(l[3])||this.input.fromOffset(this.input.css.length-1);h.source.end={column:d.col,line:d.line,offset:l[3]+1};let m=l[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))h.text="",h.raws.left=m,h.raws.right="";else{let f=m.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(l){l.length>1&&l.some(h=>h[0]==="word")&&super.decl(l)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(l){let h=this.colon(l);if(h===!1)return;let d,m;for(d=h-1;d>=0&&l[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(l[m][0]!=="space"){m+=1;break}let f=l.slice(d),r=l.slice(m,d);l.splice(m,l.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(l){this.spaces+=l.map(h=>h[1]).join("")}unnamedAtrule(l){l.name=""}}return Or=o,Or}var Mr,wi;function Qo(){if(wi)return Mr;wi=1;let{Input:e}=ln(),t=Yo();return Mr=function(o,i){let l=new e(o,i),h=new t(l);return h.parse(),h.root},Mr}Qo();var Xo=ln();const j=Bo(Xo);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;class Kr{constructor(...t){le(this,"parentElement",null),le(this,"parentNode",null),le(this,"ownerDocument"),le(this,"firstChild",null),le(this,"lastChild",null),le(this,"previousSibling",null),le(this,"nextSibling",null),le(this,"ELEMENT_NODE",1),le(this,"TEXT_NODE",3),le(this,"nodeType"),le(this,"nodeName"),le(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof Kr){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,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const bi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Si={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ze={};function Ko(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Zr(e){if(Ze[e])return Ze[e];const t=Ko(e)||globalThis[e],s=t.prototype,o=e in bi?bi[e]:void 0,i=!!(o&&o.every(d=>{var m,f;return!!((f=(m=Object.getOwnPropertyDescriptor(s,d))==null?void 0:m.get)!=null&&f.toString().includes("[native code]"))})),l=e in Si?Si[e]:void 0,h=!!(l&&l.every(d=>{var m;return typeof s[d]=="function"&&((m=s[d])==null?void 0:m.toString().includes("[native code]"))}));if(i&&h)return Ze[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");document.body.appendChild(d);const m=d.contentWindow;if(!m)return t.prototype;const f=m[e].prototype;return document.body.removeChild(d),f?Ze[e]=f:s}catch(d){return s}}const Er={};function ve(e,t,s){var o;const i=`${e}.${String(s)}`;if(Er[i])return Er[i].call(t);const l=Zr(e),h=(o=Object.getOwnPropertyDescriptor(l,s))==null?void 0:o.get;return h?(Er[i]=h,h.call(t)):t[s]}const Ir={};function un(e,t,s){const o=`${e}.${String(s)}`;if(Ir[o])return Ir[o].bind(t);const l=Zr(e)[s];return typeof l!="function"?t[s]:(Ir[o]=l,l.bind(t))}function Zo(e){return ve("Node",e,"childNodes")}function ea(e){return ve("Node",e,"parentNode")}function ta(e){return ve("Node",e,"parentElement")}function ra(e){return ve("Node",e,"textContent")}function sa(e,t){return un("Node",e,"contains")(t)}function ia(e){return un("Node",e,"getRootNode")()}function na(e){return!e||!("host"in e)?null:ve("ShadowRoot",e,"host")}function oa(e){return e.styleSheets}function aa(e){return!e||!("shadowRoot"in e)?null:ve("Element",e,"shadowRoot")}function la(e,t){return ve("Element",e,"querySelector")(t)}function ua(e,t){return ve("Element",e,"querySelectorAll")(t)}function cn(){return Zr("MutationObserver").constructor}function Ee(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const k={childNodes:Zo,parentNode:ea,parentElement:ta,textContent:ra,contains:sa,getRootNode:ia,host:na,styleSheets:oa,shadowRoot:aa,querySelector:la,querySelectorAll:ua,mutationObserver:cn,patch:Ee};function re(e,t,s=document){const o={capture:!0,passive:!0};return s.addEventListener(e,t,o),()=>s.removeEventListener(e,t,o)}const Pe=`Please stop import mirror directly. Instead of that,\r
68
+ https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new a().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,_){return b([C(_)]).process(I,M)},C},b.stringify=g,b.parse=u,b.fromJSON=h,b.list=f,b.comment=S=>new t(S),b.atRule=S=>new e(S),b.decl=S=>new i(S),b.rule=S=>new c(S),b.root=S=>new p(S),b.document=S=>new l(S),b.CssSyntaxError=o,b.Declaration=i,b.Container=s,b.Processor=a,b.Document=l,b.Comment=t,b.Warning=v,b.AtRule=e,b.Result=n,b.Input=d,b.Rule=c,b.Root=p,b.Node=r,m.registerPostcss(b),Or=b,b.default=b,Or}var Mr,wi;function Qo(){if(wi)return Mr;wi=1;let e=He(),t=nn(),s=sn();class o extends t{checkMissedSemicolon(){}comment(l){let h=new e;this.init(h,l[2]);let d=this.input.fromOffset(l[3])||this.input.fromOffset(this.input.css.length-1);h.source.end={column:d.col,line:d.line,offset:l[3]+1};let m=l[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))h.text="",h.raws.left=m,h.raws.right="";else{let f=m.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(l){l.length>1&&l.some(h=>h[0]==="word")&&super.decl(l)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(l){let h=this.colon(l);if(h===!1)return;let d,m;for(d=h-1;d>=0&&l[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(l[m][0]!=="space"){m+=1;break}let f=l.slice(d),r=l.slice(m,d);l.splice(m,l.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(l){this.spaces+=l.map(h=>h[1]).join("")}unnamedAtrule(l){l.name=""}}return Mr=o,Mr}var Er,bi;function Xo(){if(bi)return Er;bi=1;let{Input:e}=un(),t=Qo();return Er=function(o,i){let l=new e(o,i),h=new t(l);return h.parse(),h.root},Er}Xo();var Ko=un();const j=zo(Ko);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;class Zr{constructor(...t){le(this,"parentElement",null),le(this,"parentNode",null),le(this,"ownerDocument"),le(this,"firstChild",null),le(this,"lastChild",null),le(this,"previousSibling",null),le(this,"nextSibling",null),le(this,"ELEMENT_NODE",1),le(this,"TEXT_NODE",3),le(this,"nodeType"),le(this,"nodeName"),le(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof Zr){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,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Si={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},et={};function Zo(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function es(e){if(et[e])return et[e];const t=Zo(e)||globalThis[e],s=t.prototype,o=e in Si?Si[e]:void 0,i=!!(o&&o.every(d=>{var m,f;return!!((f=(m=Object.getOwnPropertyDescriptor(s,d))==null?void 0:m.get)!=null&&f.toString().includes("[native code]"))})),l=e in vi?vi[e]:void 0,h=!!(l&&l.every(d=>{var m;return typeof s[d]=="function"&&((m=s[d])==null?void 0:m.toString().includes("[native code]"))}));if(i&&h)return et[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");document.body.appendChild(d);const m=d.contentWindow;if(!m)return t.prototype;const f=m[e].prototype;return document.body.removeChild(d),f?et[e]=f:s}catch(d){return s}}const Ir={};function ve(e,t,s){var o;const i=`${e}.${String(s)}`;if(Ir[i])return Ir[i].call(t);const l=es(e),h=(o=Object.getOwnPropertyDescriptor(l,s))==null?void 0:o.get;return h?(Ir[i]=h,h.call(t)):t[s]}const Ar={};function cn(e,t,s){const o=`${e}.${String(s)}`;if(Ar[o])return Ar[o].bind(t);const l=es(e)[s];return typeof l!="function"?t[s]:(Ar[o]=l,l.bind(t))}function ea(e){return ve("Node",e,"childNodes")}function ta(e){return ve("Node",e,"parentNode")}function ra(e){return ve("Node",e,"parentElement")}function sa(e){return ve("Node",e,"textContent")}function ia(e,t){return cn("Node",e,"contains")(t)}function na(e){return cn("Node",e,"getRootNode")()}function oa(e){return!e||!("host"in e)?null:ve("ShadowRoot",e,"host")}function aa(e){return e.styleSheets}function la(e){return!e||!("shadowRoot"in e)?null:ve("Element",e,"shadowRoot")}function ua(e,t){return ve("Element",e,"querySelector")(t)}function ca(e,t){return ve("Element",e,"querySelectorAll")(t)}function hn(){return es("MutationObserver").constructor}function Ee(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const k={childNodes:ea,parentNode:ta,parentElement:ra,textContent:sa,contains:ia,getRootNode:na,host:oa,styleSheets:aa,shadowRoot:la,querySelector:ua,querySelectorAll:ca,mutationObserver:hn,patch:Ee};function re(e,t,s=document){const o={capture:!0,passive:!0};return s.addEventListener(e,t,o),()=>s.removeEventListener(e,t,o)}const Ne=`Please stop import mirror directly. Instead of that,\r
69
69
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
70
- or you can use record.mirror to access the mirror instance during recording.`;let vi={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(vi=new Proxy(vi,{get(e,t,s){return t==="map"&&console.error(Pe),Reflect.get(e,t,s)}}));function ze(e,t,s={}){let o=null,i=0;return function(...l){const h=Date.now();!i&&s.leading===!1&&(i=h);const d=t-(h-i),m=this;d<=0||d>t?(o&&(clearTimeout(o),o=null),i=h,e.apply(m,l)):!o&&s.trailing!==!1&&(o=setTimeout(()=>{i=s.leading===!1?0:Date.now(),o=null,e.apply(m,l)},d))}}function bt(e,t,s,o,i=window){const l=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?s:{set(h){setTimeout(()=>{s.set.call(this,h)},0),l&&l.set&&l.set.call(this,h)}}),()=>bt(e,t,l||{},!0)}let lt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(lt=()=>new Date().getTime());function hn(e){var t,s,o,i;const l=e.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:l.documentElement.scrollLeft||(l==null?void 0:l.body)&&((t=k.parentElement(l.body))==null?void 0:t.scrollLeft)||((s=l==null?void 0:l.body)==null?void 0:s.scrollLeft)||0,top:l.scrollingElement?l.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(l==null?void 0:l.documentElement.scrollTop)||(l==null?void 0:l.body)&&((o=k.parentElement(l.body))==null?void 0:o.scrollTop)||((i=l==null?void 0:l.body)==null?void 0:i.scrollTop)||0}}function fn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function dn(e){return e?e.nodeType===e.ELEMENT_NODE?e:k.parentElement(e):null}function se(e,t,s,o){if(!e)return!1;const i=dn(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(at(i,t,o))return!0}catch(l){}return!!(s&&(i.matches(s)||o&&i.closest(s)!==null))}function ca(e,t){return t.getId(e)!==-1}function Ar(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===Be}function mn(e,t){if(Fe(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const o=k.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?mn(o,t):!0}function Nr(e){return!!e.changedTouches}function ha(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 gn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function yn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function _r(e){return e?e instanceof Kr&&"shadowRoot"in e?!!e.shadowRoot:!!k.shadowRoot(e):!1}class fa{constructor(){A(this,"id",1),A(this,"styleIDMap",new WeakMap),A(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let o;return s===void 0?o=this.id++:o=s,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function wn(e){var t;let s=null;return"getRootNode"in e&&((t=k.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(e))&&(s=k.host(k.getRootNode(e))),s}function pa(e){let t=e,s;for(;s=wn(t);)t=s;return t}function da(e){const t=e.ownerDocument;if(!t)return!1;const s=pa(e);return k.contains(t,s)}function bn(e){const t=e.ownerDocument;return t?k.contains(t,e)||da(e):!1}var U=(e=>(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))(U||{}),D=(e=>(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))(D||{}),ie=(e=>(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||{}),me=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(me||{}),De=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(De||{}),Ne=(e=>(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))(Ne||{}),Sn=(e=>(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))(Sn||{});function Ci(e){return"__ln"in e}class ma{constructor(){A(this,"length",0),A(this,"head",null),A(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let o=0;o<t;o++)s=(s==null?void 0:s.next)||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&Ci(t.previousSibling)){const o=t.previousSibling.__ln.next;s.next=o,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,o&&(o.previous=s)}else if(t.nextSibling&&Ci(t.nextSibling)&&t.nextSibling.__ln.previous){const o=t.nextSibling.__ln.previous;s.previous=o,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,o&&(o.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const xi=(e,t)=>`${e}@${t}`;class ga{constructor(){A(this,"frozen",!1),A(this,"locked",!1),A(this,"texts",[]),A(this,"attributes",[]),A(this,"attributeMap",new WeakMap),A(this,"removes",[]),A(this,"mapRemoves",[]),A(this,"movedMap",{}),A(this,"addedSet",new Set),A(this,"movedSet",new Set),A(this,"droppedSet",new Set),A(this,"removesSubTreeCache",new Set),A(this,"mutationCb"),A(this,"blockClass"),A(this,"blockSelector"),A(this,"maskTextClass"),A(this,"maskTextSelector"),A(this,"inlineStylesheet"),A(this,"maskInputOptions"),A(this,"maskTextFn"),A(this,"maskInputFn"),A(this,"keepIframeSrcFn"),A(this,"recordCanvas"),A(this,"inlineImages"),A(this,"slimDOMOptions"),A(this,"dataURLOptions"),A(this,"doc"),A(this,"mirror"),A(this,"iframeManager"),A(this,"stylesheetManager"),A(this,"shadowDomManager"),A(this,"canvasManager"),A(this,"processedNodeManager"),A(this,"unattachedDoc"),A(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),A(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,o=new ma,i=m=>{let f=m,r=Be;for(;r===Be;)f=f&&f.nextSibling,r=f&&this.mirror.getId(f);return r},l=m=>{const f=k.parentNode(m);if(!f||!bn(m)||f.tagName==="TEXTAREA")return;const r=Fe(f)?this.mirror.getId(wn(m)):this.mirror.getId(f),u=i(m);if(r===-1||u===-1)return o.addNode(m);const a=ke(m,{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:n=>{gn(n,this.mirror)&&this.iframeManager.addIframe(n),yn(n,this.mirror)&&this.stylesheetManager.trackLinkElement(n),_r(m)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(m),this.doc)},onIframeLoad:(n,p)=>{this.iframeManager.attachIframe(n,p),this.shadowDomManager.observeAttachShadow(n)},onStylesheetLoad:(n,p)=>{this.stylesheetManager.attachLinkElement(n,p)}});a&&(t.push({parentId:r,nextId:u,node:a}),s.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)Ri(this.removesSubTreeCache,m,this.mirror)&&!this.movedSet.has(k.parentNode(m))||l(m);for(const m of this.addedSet)!Oi(this.droppedSet,m)&&!Ri(this.removesSubTreeCache,m,this.mirror)||Oi(this.movedSet,m)?l(m):this.droppedSet.add(m);let h=null;for(;o.length;){let m=null;if(h){const f=this.mirror.getId(k.parentNode(h.value)),r=i(h.value);f!==-1&&r!==-1&&(m=h)}if(!m){let f=o.tail;for(;f;){const r=f;if(f=f.previous,r){const u=this.mirror.getId(k.parentNode(r.value));if(i(r.value)===-1)continue;if(u!==-1){m=r;break}else{const n=r.value,p=k.parentNode(n);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const c=k.host(p);if(this.mirror.getId(c)!==-1){m=r;break}}}}}}if(!m){for(;o.head;)o.removeNode(o.head.value);break}h=m.previous,o.removeNode(m.value),l(m.value)}const d={texts:this.texts.map(m=>{const f=m.node,r=k.parentNode(f);return r&&r.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(f),value:m.value}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:f}=m;if(typeof f.style=="string"){const r=JSON.stringify(m.styleDiff),u=JSON.stringify(m._unchangedStyles);r.length<f.style.length&&(r+u).split("var(").length===f.style.split("var(").length&&(f.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:f}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.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(d))}),A(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s)),s.attributes.value=Array.from(k.childNodes(t),o=>k.textContent(o)||"").join("")}),A(this,"processMutation",t=>{if(!Ar(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=k.textContent(t.target);!se(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:zi(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,dn(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){const h=Tr(s);i=Dr({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:h,value:i,maskInputFn:this.maskInputFn})}if(se(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let l=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!s.contentDocument)o="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(t.target,l)),o==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!Bi(s.tagName,o))if(l.attributes[o]=$i(this.doc,Re(s.tagName),Re(o),i),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(d){this.unattachedDoc=this.doc}const h=this.unattachedDoc.createElement("span");t.oldValue&&h.setAttribute("style",t.oldValue);for(const d of Array.from(s.style)){const m=s.style.getPropertyValue(d),f=s.style.getPropertyPriority(d);m!==h.style.getPropertyValue(d)||f!==h.style.getPropertyPriority(d)?f===""?l.styleDiff[d]=m:l.styleDiff[d]=[m,f]:l._unchangedStyles[d]=[m,f]}for(const d of Array.from(h.style))s.style.getPropertyValue(d)===""&&(l.styleDiff[d]=!1)}else o==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?l.attributes.rr_open_mode="modal":l.attributes.rr_open_mode="non-modal");break}case"childList":{if(se(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const o=this.mirror.getId(s),i=Fe(t.target)?this.mirror.getId(k.host(t.target)):this.mirror.getId(t.target);se(t.target,this.blockClass,this.blockSelector,!1)||Ar(s,this.mirror,this.slimDOMOptions)||!ca(s,this.mirror)||(this.addedSet.has(s)?(kr(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&o===-1||mn(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[xi(o,i)]?kr(this.movedSet,s):(this.removes.push({parentId:i,id:o,isShadow:Fe(t.target)&&Ue(t.target)?!0:void 0}),ya(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),A(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ar(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;s&&this.mirror.hasNode(s)&&(o=this.mirror.getId(s)),o&&o!==-1&&(this.movedMap[xi(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);se(t,this.blockClass,this.blockSelector,!1)||(k.childNodes(t).forEach(o=>this.genAdds(o)),_r(t)&&k.childNodes(k.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function kr(e,t){e.delete(t),k.childNodes(t).forEach(s=>kr(e,s))}function ya(e,t){const s=[e];for(;s.length;){const o=s.pop();t.has(o)||(t.add(o),k.childNodes(o).forEach(i=>s.push(i)))}}function Ri(e,t,s){return e.size===0?!1:wa(e,t)}function wa(e,t,s){const o=k.parentNode(t);return o?e.has(o):!1}function Oi(e,t){return e.size===0?!1:vn(e,t)}function vn(e,t){const s=k.parentNode(t);return s?e.has(s)?!0:vn(e,s):!1}let $e;function ba(e){$e=e}function Sa(){$e=void 0}const F=e=>$e?(...s)=>{try{return e(...s)}catch(o){if($e&&$e(o)===!0)return;throw o}}:e,be=[];function Ve(e){try{if("composedPath"in e){const 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 Cn(e,t){const s=new ga;be.push(s),s.init(e);const o=new(cn())(F(s.processMutations.bind(s)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function va({mousemoveCb:e,sampling:t,doc:s,mirror:o}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,l=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let h=[],d;const m=ze(F(u=>{const a=Date.now()-d;e(h.map(n=>(n.timeOffset-=a,n)),u),h=[],d=null}),l),f=F(ze(F(u=>{const a=Ve(u),{clientX:n,clientY:p}=Nr(u)?u.changedTouches[0]:u;d||(d=lt()),h.push({x:n,y:p,id:o.getId(a),timeOffset:lt()-d}),m(typeof DragEvent!="undefined"&&u instanceof DragEvent?D.Drag:u instanceof MouseEvent?D.MouseMove:D.TouchMove)}),i,{trailing:!1})),r=[re("mousemove",f,s),re("touchmove",f,s),re("drag",f,s)];return F(()=>{r.forEach(u=>u())})}function Ca({mouseInteractionCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:l}){if(l.mouseInteraction===!1)return()=>{};const h=l.mouseInteraction===!0||l.mouseInteraction===void 0?{}:l.mouseInteraction,d=[];let m=null;const f=r=>u=>{const a=Ve(u);if(se(a,o,i,!0))return;let n=null,p=r;if("pointerType"in u){switch(u.pointerType){case"mouse":n=me.Mouse;break;case"touch":n=me.Touch;break;case"pen":n=me.Pen;break}n===me.Touch?ie[r]===ie.MouseDown?p="TouchStart":ie[r]===ie.MouseUp&&(p="TouchEnd"):me.Pen}else Nr(u)&&(n=me.Touch);n!==null?(m=n,(p.startsWith("Touch")&&n===me.Touch||p.startsWith("Mouse")&&n===me.Mouse)&&(n=null)):ie[r]===ie.Click&&(n=m,m=null);const c=Nr(u)?u.changedTouches[0]:u;if(!c)return;const g=s.getId(a),{clientX:v,clientY:b}=c;F(e)(T({type:ie[p],id:g,x:v,y:b},n!==null&&{pointerType:n}))};return Object.keys(ie).filter(r=>Number.isNaN(Number(r))&&!r.endsWith("_Departed")&&h[r]!==!1).forEach(r=>{let u=Re(r);const a=f(r);if(window.PointerEvent)switch(ie[r]){case ie.MouseDown:case ie.MouseUp:u=u.replace("mouse","pointer");break;case ie.TouchStart:case ie.TouchEnd:return}d.push(re(u,a,t))}),F(()=>{d.forEach(r=>r())})}function xn({scrollCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:l}){const h=F(ze(F(d=>{const m=Ve(d);if(!m||se(m,o,i,!0))return;const f=s.getId(m);if(m===t&&t.defaultView){const r=hn(t.defaultView);e({id:f,x:r.left,y:r.top})}else e({id:f,x:m.scrollLeft,y:m.scrollTop})}),l.scroll||100));return re("scroll",h,t)}function xa({viewportResizeCb:e},{win:t}){let s=-1,o=-1;const i=F(ze(F(()=>{const l=fn(),h=pn();(s!==l||o!==h)&&(e({width:Number(h),height:Number(l)}),s=l,o=h)}),200));return re("resize",i,t)}const Ra=["INPUT","TEXTAREA","SELECT"],Mi=new WeakMap;function Oa({inputCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,ignoreClass:l,ignoreSelector:h,maskInputOptions:d,maskInputFn:m,sampling:f,userTriggeredOnInput:r}){function u(b){let S=Ve(b);const x=b.isTrusted,y=S&&S.tagName;if(S&&y==="OPTION"&&(S=k.parentElement(S)),!S||!y||Ra.indexOf(y)<0||se(S,o,i,!0)||S.classList.contains(l)||h&&S.matches(h))return;let w=S.value,C=!1;const R=Tr(S)||"";R==="radio"||R==="checkbox"?C=S.checked:(d[y.toLowerCase()]||d[R])&&(w=Dr({element:S,maskInputOptions:d,tagName:y,type:R,value:w,maskInputFn:m})),a(S,r?{text:w,isChecked:C,userTriggered:x}:{text:w,isChecked:C});const I=S.name;R==="radio"&&I&&C&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==S){const _=M.value;a(M,r?{text:_,isChecked:!C,userTriggered:!1}:{text:_,isChecked:!C})}})}function a(b,S){const x=Mi.get(b);if(!x||x.text!==S.text||x.isChecked!==S.isChecked){Mi.set(b,S);const y=s.getId(b);F(e)(ae(T({},S),{id:y}))}}const p=(f.input==="last"?["change"]:["input","change"]).map(b=>re(b,F(u),t)),c=t.defaultView;if(!c)return()=>{p.forEach(b=>b())};const g=c.Object.getOwnPropertyDescriptor(c.HTMLInputElement.prototype,"value"),v=[[c.HTMLInputElement.prototype,"value"],[c.HTMLInputElement.prototype,"checked"],[c.HTMLSelectElement.prototype,"value"],[c.HTMLTextAreaElement.prototype,"value"],[c.HTMLSelectElement.prototype,"selectedIndex"],[c.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(b=>bt(b[0],b[1],{set(){F(u)({target:this,isTrusted:!1})}},!1,c))),F(()=>{p.forEach(b=>b())})}function ut(e){const t=[];function s(o,i){if(et("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||et("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||et("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||et("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){const h=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(h)}else if(o.parentStyleSheet){const h=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(h)}return i}return s(e,t)}function we(e,t,s){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=s.getId(e),{styleId:i,id:o}):{}}function Ma({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};const i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((r,u,a)=>{const[n,p]=a,{id:c,styleId:g}=we(u,t,s.styleMirror);return(c&&c!==-1||g&&g!==-1)&&e({id:c,styleId:g,adds:[{rule:n,index:p}]}),r.apply(u,a)})}),o.CSSStyleSheet.prototype.addRule=function(r,u,a=this.cssRules.length){const n=`${r} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,a])};const l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:F((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,removes:[{index:n}]}),r.apply(u,a)})}),o.CSSStyleSheet.prototype.removeRule=function(r){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[r])};let h;o.CSSStyleSheet.prototype.replace&&(h=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:F((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,replace:n}),r.apply(u,a)})}));let d;o.CSSStyleSheet.prototype.replaceSync&&(d=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:F((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,replaceSync:n}),r.apply(u,a)})}));const m={};tt("CSSGroupingRule")?m.CSSGroupingRule=o.CSSGroupingRule:(tt("CSSMediaRule")&&(m.CSSMediaRule=o.CSSMediaRule),tt("CSSConditionRule")&&(m.CSSConditionRule=o.CSSConditionRule),tt("CSSSupportsRule")&&(m.CSSSupportsRule=o.CSSSupportsRule));const f={};return Object.entries(m).forEach(([r,u])=>{f[r]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(f[r].insertRule,{apply:F((a,n,p)=>{const[c,g]=p,{id:v,styleId:b}=we(n.parentStyleSheet,t,s.styleMirror);return(v&&v!==-1||b&&b!==-1)&&e({id:v,styleId:b,adds:[{rule:c,index:[...ut(n),g||0]}]}),a.apply(n,p)})}),u.prototype.deleteRule=new Proxy(f[r].deleteRule,{apply:F((a,n,p)=>{const[c]=p,{id:g,styleId:v}=we(n.parentStyleSheet,t,s.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...ut(n),c]}]}),a.apply(n,p)})})}),F(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=l,h&&(o.CSSStyleSheet.prototype.replace=h),d&&(o.CSSStyleSheet.prototype.replaceSync=d),Object.entries(m).forEach(([r,u])=>{u.prototype.insertRule=f[r].insertRule,u.prototype.deleteRule=f[r].deleteRule})})}function Rn({mirror:e,stylesheetManager:t},s){var o,i,l;let h=null;s.nodeName==="#document"?h=e.getId(s):h=e.getId(k.host(s));const d=s.nodeName==="#document"?(o=s.defaultView)==null?void 0:o.Document:(l=(i=s.ownerDocument)==null?void 0:i.defaultView)==null?void 0:l.ShadowRoot,m=d!=null&&d.prototype?Object.getOwnPropertyDescriptor(d==null?void 0:d.prototype,"adoptedStyleSheets"):void 0;return h===null||h===-1||!d||!m?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get(){var f;return(f=m.get)==null?void 0:f.call(this)},set(f){var r;const u=(r=m.set)==null?void 0:r.call(this,f);if(h!==null&&h!==-1)try{t.adoptStyleSheets(f,h)}catch(a){}return u}}),F(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get:m.get,set:m.set})}))}function Ea({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:o},{win:i}){const l=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:F((d,m,f)=>{var r;const[u,a,n]=f;if(s.has(u))return l.apply(m,[u,a,n]);const{id:p,styleId:c}=we((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,set:{property:u,value:a,priority:n},index:ut(m.parentRule)}),d.apply(m,f)})});const h=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:F((d,m,f)=>{var r;const[u]=f;if(s.has(u))return h.apply(m,[u]);const{id:a,styleId:n}=we((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(a&&a!==-1||n&&n!==-1)&&e({id:a,styleId:n,remove:{property:u},index:ut(m.parentRule)}),d.apply(m,f)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=l,i.CSSStyleDeclaration.prototype.removeProperty=h})}function Ia({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:o,sampling:i,doc:l}){const h=F(m=>ze(F(f=>{const r=Ve(f);if(!r||se(r,t,s,!0))return;const{currentTime:u,volume:a,muted:n,playbackRate:p,loop:c}=r;e({type:m,id:o.getId(r),currentTime:u,volume:a,muted:n,playbackRate:p,loop:c})}),i.media||500)),d=[re("play",h(Ne.Play),l),re("pause",h(Ne.Pause),l),re("seeked",h(Ne.Seeked),l),re("volumechange",h(Ne.VolumeChange),l),re("ratechange",h(Ne.RateChange),l)];return F(()=>{d.forEach(m=>m())})}function Aa({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const o=[],i=new WeakMap,l=s.FontFace;s.FontFace=function(m,f,r){const u=new l(m,f,r);return i.set(u,{family:m,buffer:typeof f!="string",descriptors:r,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),u};const h=Ee(t.fonts,"add",function(d){return function(m){return setTimeout(F(()=>{const f=i.get(m);f&&(e(f),i.delete(m))}),0),d.apply(this,[m])}});return o.push(()=>{s.FontFace=l}),o.push(h),F(()=>{o.forEach(d=>d())})}function Pa(e){const{doc:t,mirror:s,blockClass:o,blockSelector:i,selectionCb:l}=e;let h=!0;const d=F(()=>{const m=t.getSelection();if(!m||h&&(m!=null&&m.isCollapsed))return;h=m.isCollapsed||!1;const f=[],r=m.rangeCount||0;for(let u=0;u<r;u++){const a=m.getRangeAt(u),{startContainer:n,startOffset:p,endContainer:c,endOffset:g}=a;se(n,o,i,!0)||se(c,o,i,!0)||f.push({start:s.getId(n),startOffset:p,end:s.getId(c),endOffset:g})}l({ranges:f})});return d(),re("selectionchange",d)}function Na({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:Ee(s.customElements,"define",function(i){return function(l,h,d){try{t({define:{name:l}})}catch(m){console.warn(`Custom element callback failed for ${l}`)}return i.apply(this,[l,h,d])}})}function _a(e,t){const{mutationCb:s,mousemoveCb:o,mouseInteractionCb:i,scrollCb:l,viewportResizeCb:h,inputCb:d,mediaInteractionCb:m,styleSheetRuleCb:f,styleDeclarationCb:r,canvasMutationCb:u,fontCb:a,selectionCb:n,customElementCb:p}=e;e.mutationCb=(...c)=>{t.mutation&&t.mutation(...c),s(...c)},e.mousemoveCb=(...c)=>{t.mousemove&&t.mousemove(...c),o(...c)},e.mouseInteractionCb=(...c)=>{t.mouseInteraction&&t.mouseInteraction(...c),i(...c)},e.scrollCb=(...c)=>{t.scroll&&t.scroll(...c),l(...c)},e.viewportResizeCb=(...c)=>{t.viewportResize&&t.viewportResize(...c),h(...c)},e.inputCb=(...c)=>{t.input&&t.input(...c),d(...c)},e.mediaInteractionCb=(...c)=>{t.mediaInteaction&&t.mediaInteaction(...c),m(...c)},e.styleSheetRuleCb=(...c)=>{t.styleSheetRule&&t.styleSheetRule(...c),f(...c)},e.styleDeclarationCb=(...c)=>{t.styleDeclaration&&t.styleDeclaration(...c),r(...c)},e.canvasMutationCb=(...c)=>{t.canvasMutation&&t.canvasMutation(...c),u(...c)},e.fontCb=(...c)=>{t.font&&t.font(...c),a(...c)},e.selectionCb=(...c)=>{t.selection&&t.selection(...c),n(...c)},e.customElementCb=(...c)=>{t.customElement&&t.customElement(...c),p(...c)}}function ka(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};_a(e,t);let o;e.recordDOM&&(o=Cn(e,e.doc));const i=va(e),l=Ca(e),h=xn(e),d=xa(e,{win:s}),m=Oa(e),f=Ia(e);let r=()=>{},u=()=>{},a=()=>{},n=()=>{};e.recordDOM&&(r=Ma(e,{win:s}),u=Rn(e,e.doc),a=Ea(e,{win:s}),e.collectFonts&&(n=Aa(e)));const p=Pa(e),c=Na(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,s,v.options));return F(()=>{be.forEach(v=>v.reset()),o==null||o.disconnect(),i(),l(),h(),d(),m(),f(),r(),u(),a(),n(),p(),c(),g.forEach(v=>v()),be.length=0})}function et(e){return typeof window[e]!="undefined"}function tt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ei{constructor(t){A(this,"iframeIdToRemoteIdMap",new WeakMap),A(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,o,i){const l=o||this.getIdToRemoteIdMap(t),h=i||this.getRemoteIdToIdMap(t);let d=l.get(s);return d||(d=this.generateIdFn(),l.set(s,d),h.set(d,s)),d}getIds(t,s){const o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return s.map(l=>this.getId(t,l,o,i))}getRemoteId(t,s,o){const i=o||this.getRemoteIdToIdMap(t);if(typeof s!="number")return s;const l=i.get(s);return l||-1}getRemoteIds(t,s){const o=this.getRemoteIdToIdMap(t);return s.map(i=>this.getRemoteId(t,i,o))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class La{constructor(t){A(this,"iframes",new WeakMap),A(this,"crossOriginIframeMap",new WeakMap),A(this,"crossOriginIframeMirror",new Ei(Ui)),A(this,"crossOriginIframeStyleMirror"),A(this,"crossOriginIframeRootIdMap",new WeakMap),A(this,"mirror"),A(this,"mutationCb"),A(this,"wrappedEmit"),A(this,"loadListener"),A(this,"stylesheetManager"),A(this,"recordCrossOriginIframes"),A(this,"messageHandler"),A(this,"nestedIframeListeners",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ei(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,s){var o;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){const l=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,l),i.addEventListener("message",l)}(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const l=this.transformCrossOriginEvent(i,s.data.event);l&&this.wrappedEmit(l,s.data.isCheckout)}transformCrossOriginEvent(t,s){var o;switch(s.type){case U.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const i=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(s.data.node,i),{timestamp:s.timestamp,type:U.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case U.Meta:case U.Load:case U.DomContentLoaded:return!1;case U.Plugin:return s;case U.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case U.IncrementalSnapshot:switch(s.data.source){case D.Mutation:return s.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const l=this.crossOriginIframeRootIdMap.get(t);l&&this.patchRootIdOnNode(i.node,l)}),s.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),s.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),s.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.Drag:case D.TouchMove:case D.MouseMove:return s.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(s.data,t,["id"]),s;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case D.Font:return s;case D.Selection:return s.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),s;case D.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(o=s.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),s}}return!1}replace(t,s,o,i){for(const l of i)!Array.isArray(s[l])&&typeof s[l]!="number"||(Array.isArray(s[l])?s[l]=t.getIds(o,s[l]):s[l]=t.getId(o,s[l]));return s}replaceIds(t,s,o){return this.replace(this.crossOriginIframeMirror,t,s,o)}replaceStyleIds(t,s,o){return this.replace(this.crossOriginIframeStyleMirror,t,s,o)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,s)})}patchRootIdOnNode(t,s){t.type!==Sn.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,s)})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,s)=>{s.removeEventListener("message",t)}),this.nestedIframeListeners.clear()}}class Da{constructor(t){A(this,"shadowDoms",new WeakSet),A(this,"mutationCb"),A(this,"scrollCb"),A(this,"bypassOptions"),A(this,"mirror"),A(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!Ue(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const o=Cn(ae(T({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(xn(ae(T({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(k.host(t))),this.restoreHandlers.push(Rn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const o=this;this.restoreHandlers.push(Ee(t.prototype,"attachShadow",function(i){return function(l){const h=i.call(this,l),d=k.shadowRoot(this);return d&&bn(this)&&o.addShadowRoot(d,s),h}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(s){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ta=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var rt=0;rt<Le.length;rt++)Ta[Le.charCodeAt(rt)]=rt;var Fa=function(e){var t=new Uint8Array(e),s,o=t.length,i="";for(s=0;s<o;s+=3)i+=Le[t[s]>>2],i+=Le[(t[s]&3)<<4|t[s+1]>>4],i+=Le[(t[s+1]&15)<<2|t[s+2]>>6],i+=Le[t[s+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Ii=new Map;function Ua(e,t){let s=Ii.get(e);return s||(s=new Map,Ii.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const On=(e,t,s)=>{if(!e||!(En(e,t)||typeof e=="object"))return;const o=e.constructor.name,i=Ua(s,o);let l=i.indexOf(e);return l===-1&&(l=i.length,i.push(e)),l};function st(e,t,s){if(e instanceof Array)return e.map(o=>st(o,t,s));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){const o=e.constructor.name,i=Fa(e);return{rr_type:o,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[st(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const o=e.constructor.name,{src:i}=e;return{rr_type:o,src:i}}else if(e instanceof HTMLCanvasElement){const o="HTMLImageElement",i=e.toDataURL();return{rr_type:o,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[st(e.data,t,s),e.width,e.height]};if(En(e,t)||typeof e=="object"){const o=e.constructor.name,i=On(e,t,s);return{rr_type:o,index:i}}}}return e}const Mn=(e,t,s)=>e.map(o=>st(o,t,s)),En=(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 $a(e,t,s,o){const i=[],l=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const h of l)try{if(typeof t.CanvasRenderingContext2D.prototype[h]!="function")continue;const d=Ee(t.CanvasRenderingContext2D.prototype,h,function(m){return function(...f){return se(this.canvas,s,o,!0)||setTimeout(()=>{const r=Mn(f,t,this);e(this.canvas,{type:De["2D"],property:h,args:r})},0),m.apply(this,f)}});i.push(d)}catch(d){const m=bt(t.CanvasRenderingContext2D.prototype,h,{set(f){e(this.canvas,{type:De["2D"],property:h,args:[f],setter:!0})}});i.push(m)}return()=>{i.forEach(h=>h())}}function Ba(e){return e==="experimental-webgl"?"webgl":e}function Ai(e,t,s,o){const i=[];try{const l=Ee(e.HTMLCanvasElement.prototype,"getContext",function(h){return function(d,...m){if(!se(this,t,s,!0)){const f=Ba(d);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))if(m[0]&&typeof m[0]=="object"){const r=m[0];r.preserveDrawingBuffer||(r.preserveDrawingBuffer=!0)}else m.splice(0,1,{preserveDrawingBuffer:!0})}return h.apply(this,[d,...m])}});i.push(l)}catch(l){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(l=>l())}}function Pi(e,t,s,o,i,l){const h=[],d=Object.getOwnPropertyNames(e);for(const m of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(m))try{if(typeof e[m]!="function")continue;const f=Ee(e,m,function(r){return function(...u){const a=r.apply(this,u);if(On(a,l,this),"tagName"in this.canvas&&!se(this.canvas,o,i,!0)){const n=Mn(u,l,this),p={type:t,property:m,args:n};s(this.canvas,p)}return a}});h.push(f)}catch(f){const r=bt(e,m,{set(u){s(this.canvas,{type:t,property:m,args:[u],setter:!0})}});h.push(r)}return h}function za(e,t,s,o){const i=[];return i.push(...Pi(t.WebGLRenderingContext.prototype,De.WebGL,e,s,o,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...Pi(t.WebGL2RenderingContext.prototype,De.WebGL2,e,s,o,t)),()=>{i.forEach(l=>l())}}const In=`(function() {
70
+ or you can use record.mirror to access the mirror instance during recording.`;let Ci={map:{},getId(){return console.error(Ne),-1},getNode(){return console.error(Ne),null},removeNodeFromMap(){console.error(Ne)},has(){return console.error(Ne),!1},reset(){console.error(Ne)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Ci=new Proxy(Ci,{get(e,t,s){return t==="map"&&console.error(Ne),Reflect.get(e,t,s)}}));function We(e,t,s={}){let o=null,i=0;return function(...l){const h=Date.now();!i&&s.leading===!1&&(i=h);const d=t-(h-i),m=this;d<=0||d>t?(o&&(clearTimeout(o),o=null),i=h,e.apply(m,l)):!o&&s.trailing!==!1&&(o=setTimeout(()=>{i=s.leading===!1?0:Date.now(),o=null,e.apply(m,l)},d))}}function St(e,t,s,o,i=window){const l=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?s:{set(h){setTimeout(()=>{s.set.call(this,h)},0),l&&l.set&&l.set.call(this,h)}}),()=>St(e,t,l||{},!0)}let ut=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ut=()=>new Date().getTime());function fn(e){var t,s,o,i;const l=e.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:l.documentElement.scrollLeft||(l==null?void 0:l.body)&&((t=k.parentElement(l.body))==null?void 0:t.scrollLeft)||((s=l==null?void 0:l.body)==null?void 0:s.scrollLeft)||0,top:l.scrollingElement?l.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(l==null?void 0:l.documentElement.scrollTop)||(l==null?void 0:l.body)&&((o=k.parentElement(l.body))==null?void 0:o.scrollTop)||((i=l==null?void 0:l.body)==null?void 0:i.scrollTop)||0}}function pn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function dn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function mn(e){return e?e.nodeType===e.ELEMENT_NODE?e:k.parentElement(e):null}function se(e,t,s,o){if(!e)return!1;const i=mn(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(lt(i,t,o))return!0}catch(l){}return!!(s&&(i.matches(s)||o&&i.closest(s)!==null))}function ha(e,t){return t.getId(e)!==-1}function Pr(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===ze}function gn(e,t){if(Ue(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const o=k.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?gn(o,t):!0}function _r(e){return!!e.changedTouches}function fa(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 yn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function wn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function kr(e){return e?e instanceof Zr&&"shadowRoot"in e?!!e.shadowRoot:!!k.shadowRoot(e):!1}class pa{constructor(){A(this,"id",1),A(this,"styleIDMap",new WeakMap),A(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let o;return s===void 0?o=this.id++:o=s,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function bn(e){var t;let s=null;return"getRootNode"in e&&((t=k.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(e))&&(s=k.host(k.getRootNode(e))),s}function da(e){let t=e,s;for(;s=bn(t);)t=s;return t}function ma(e){const t=e.ownerDocument;if(!t)return!1;const s=da(e);return k.contains(t,s)}function Sn(e){const t=e.ownerDocument;return t?k.contains(t,e)||ma(e):!1}var U=(e=>(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))(U||{}),D=(e=>(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))(D||{}),ie=(e=>(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||{}),me=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(me||{}),Te=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Te||{}),_e=(e=>(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))(_e||{}),vn=(e=>(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))(vn||{});function xi(e){return"__ln"in e}class ga{constructor(){A(this,"length",0),A(this,"head",null),A(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let o=0;o<t;o++)s=(s==null?void 0:s.next)||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&xi(t.previousSibling)){const o=t.previousSibling.__ln.next;s.next=o,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,o&&(o.previous=s)}else if(t.nextSibling&&xi(t.nextSibling)&&t.nextSibling.__ln.previous){const o=t.nextSibling.__ln.previous;s.previous=o,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,o&&(o.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Ri=(e,t)=>`${e}@${t}`;class ya{constructor(){A(this,"frozen",!1),A(this,"locked",!1),A(this,"texts",[]),A(this,"attributes",[]),A(this,"attributeMap",new WeakMap),A(this,"removes",[]),A(this,"mapRemoves",[]),A(this,"movedMap",{}),A(this,"addedSet",new Set),A(this,"movedSet",new Set),A(this,"droppedSet",new Set),A(this,"removesSubTreeCache",new Set),A(this,"mutationCb"),A(this,"blockClass"),A(this,"blockSelector"),A(this,"maskTextClass"),A(this,"maskTextSelector"),A(this,"inlineStylesheet"),A(this,"maskInputOptions"),A(this,"maskTextFn"),A(this,"maskInputFn"),A(this,"keepIframeSrcFn"),A(this,"recordCanvas"),A(this,"inlineImages"),A(this,"slimDOMOptions"),A(this,"dataURLOptions"),A(this,"doc"),A(this,"mirror"),A(this,"iframeManager"),A(this,"stylesheetManager"),A(this,"shadowDomManager"),A(this,"canvasManager"),A(this,"processedNodeManager"),A(this,"unattachedDoc"),A(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),A(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,o=new ga,i=m=>{let f=m,r=ze;for(;r===ze;)f=f&&f.nextSibling,r=f&&this.mirror.getId(f);return r},l=m=>{const f=k.parentNode(m);if(!f||!Sn(m)||f.tagName==="TEXTAREA")return;const r=Ue(f)?this.mirror.getId(bn(m)):this.mirror.getId(f),u=i(m);if(r===-1||u===-1)return o.addNode(m);const a=Le(m,{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:n=>{yn(n,this.mirror)&&this.iframeManager.addIframe(n),wn(n,this.mirror)&&this.stylesheetManager.trackLinkElement(n),kr(m)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(m),this.doc)},onIframeLoad:(n,p)=>{this.iframeManager.attachIframe(n,p),this.shadowDomManager.observeAttachShadow(n)},onStylesheetLoad:(n,p)=>{this.stylesheetManager.attachLinkElement(n,p)}});a&&(t.push({parentId:r,nextId:u,node:a}),s.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)Oi(this.removesSubTreeCache,m,this.mirror)&&!this.movedSet.has(k.parentNode(m))||l(m);for(const m of this.addedSet)!Mi(this.droppedSet,m)&&!Oi(this.removesSubTreeCache,m,this.mirror)||Mi(this.movedSet,m)?l(m):this.droppedSet.add(m);let h=null;for(;o.length;){let m=null;if(h){const f=this.mirror.getId(k.parentNode(h.value)),r=i(h.value);f!==-1&&r!==-1&&(m=h)}if(!m){let f=o.tail;for(;f;){const r=f;if(f=f.previous,r){const u=this.mirror.getId(k.parentNode(r.value));if(i(r.value)===-1)continue;if(u!==-1){m=r;break}else{const n=r.value,p=k.parentNode(n);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const c=k.host(p);if(this.mirror.getId(c)!==-1){m=r;break}}}}}}if(!m){for(;o.head;)o.removeNode(o.head.value);break}h=m.previous,o.removeNode(m.value),l(m.value)}const d={texts:this.texts.map(m=>{const f=m.node,r=k.parentNode(f);return r&&r.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(f),value:m.value}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:f}=m;if(typeof f.style=="string"){const r=JSON.stringify(m.styleDiff),u=JSON.stringify(m._unchangedStyles);r.length<f.style.length&&(r+u).split("var(").length===f.style.split("var(").length&&(f.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:f}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.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(d))}),A(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s)),s.attributes.value=Array.from(k.childNodes(t),o=>k.textContent(o)||"").join("")}),A(this,"processMutation",t=>{if(!Pr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=k.textContent(t.target);!se(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:Wi(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,mn(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){const h=Fr(s);i=Tr({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:h,value:i,maskInputFn:this.maskInputFn})}if(se(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let l=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!s.contentDocument)o="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(t.target,l)),o==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!zi(s.tagName,o))if(l.attributes[o]=Bi(this.doc,Re(s.tagName),Re(o),i),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(d){this.unattachedDoc=this.doc}const h=this.unattachedDoc.createElement("span");t.oldValue&&h.setAttribute("style",t.oldValue);for(const d of Array.from(s.style)){const m=s.style.getPropertyValue(d),f=s.style.getPropertyPriority(d);m!==h.style.getPropertyValue(d)||f!==h.style.getPropertyPriority(d)?f===""?l.styleDiff[d]=m:l.styleDiff[d]=[m,f]:l._unchangedStyles[d]=[m,f]}for(const d of Array.from(h.style))s.style.getPropertyValue(d)===""&&(l.styleDiff[d]=!1)}else o==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?l.attributes.rr_open_mode="modal":l.attributes.rr_open_mode="non-modal");break}case"childList":{if(se(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const o=this.mirror.getId(s),i=Ue(t.target)?this.mirror.getId(k.host(t.target)):this.mirror.getId(t.target);se(t.target,this.blockClass,this.blockSelector,!1)||Pr(s,this.mirror,this.slimDOMOptions)||!ha(s,this.mirror)||(this.addedSet.has(s)?(Lr(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&o===-1||gn(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[Ri(o,i)]?Lr(this.movedSet,s):(this.removes.push({parentId:i,id:o,isShadow:Ue(t.target)&&$e(t.target)?!0:void 0}),wa(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),A(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Pr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;s&&this.mirror.hasNode(s)&&(o=this.mirror.getId(s)),o&&o!==-1&&(this.movedMap[Ri(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);se(t,this.blockClass,this.blockSelector,!1)||(k.childNodes(t).forEach(o=>this.genAdds(o)),kr(t)&&k.childNodes(k.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Lr(e,t){e.delete(t),k.childNodes(t).forEach(s=>Lr(e,s))}function wa(e,t){const s=[e];for(;s.length;){const o=s.pop();t.has(o)||(t.add(o),k.childNodes(o).forEach(i=>s.push(i)))}}function Oi(e,t,s){return e.size===0?!1:ba(e,t)}function ba(e,t,s){const o=k.parentNode(t);return o?e.has(o):!1}function Mi(e,t){return e.size===0?!1:Cn(e,t)}function Cn(e,t){const s=k.parentNode(t);return s?e.has(s)?!0:Cn(e,s):!1}let Be;function Sa(e){Be=e}function va(){Be=void 0}const F=e=>Be?(...s)=>{try{return e(...s)}catch(o){if(Be&&Be(o)===!0)return;throw o}}:e,be=[];function Ge(e){try{if("composedPath"in e){const 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 xn(e,t){const s=new ya;be.push(s),s.init(e);const o=new(hn())(F(s.processMutations.bind(s)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ca({mousemoveCb:e,sampling:t,doc:s,mirror:o}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,l=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let h=[],d;const m=We(F(u=>{const a=Date.now()-d;e(h.map(n=>(n.timeOffset-=a,n)),u),h=[],d=null}),l),f=F(We(F(u=>{const a=Ge(u),{clientX:n,clientY:p}=_r(u)?u.changedTouches[0]:u;d||(d=ut()),h.push({x:n,y:p,id:o.getId(a),timeOffset:ut()-d}),m(typeof DragEvent!="undefined"&&u instanceof DragEvent?D.Drag:u instanceof MouseEvent?D.MouseMove:D.TouchMove)}),i,{trailing:!1})),r=[re("mousemove",f,s),re("touchmove",f,s),re("drag",f,s)];return F(()=>{r.forEach(u=>u())})}function xa({mouseInteractionCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:l}){if(l.mouseInteraction===!1)return()=>{};const h=l.mouseInteraction===!0||l.mouseInteraction===void 0?{}:l.mouseInteraction,d=[];let m=null;const f=r=>u=>{const a=Ge(u);if(se(a,o,i,!0))return;let n=null,p=r;if("pointerType"in u){switch(u.pointerType){case"mouse":n=me.Mouse;break;case"touch":n=me.Touch;break;case"pen":n=me.Pen;break}n===me.Touch?ie[r]===ie.MouseDown?p="TouchStart":ie[r]===ie.MouseUp&&(p="TouchEnd"):me.Pen}else _r(u)&&(n=me.Touch);n!==null?(m=n,(p.startsWith("Touch")&&n===me.Touch||p.startsWith("Mouse")&&n===me.Mouse)&&(n=null)):ie[r]===ie.Click&&(n=m,m=null);const c=_r(u)?u.changedTouches[0]:u;if(!c)return;const g=s.getId(a),{clientX:v,clientY:b}=c;F(e)(T({type:ie[p],id:g,x:v,y:b},n!==null&&{pointerType:n}))};return Object.keys(ie).filter(r=>Number.isNaN(Number(r))&&!r.endsWith("_Departed")&&h[r]!==!1).forEach(r=>{let u=Re(r);const a=f(r);if(window.PointerEvent)switch(ie[r]){case ie.MouseDown:case ie.MouseUp:u=u.replace("mouse","pointer");break;case ie.TouchStart:case ie.TouchEnd:return}d.push(re(u,a,t))}),F(()=>{d.forEach(r=>r())})}function Rn({scrollCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:l}){const h=F(We(F(d=>{const m=Ge(d);if(!m||se(m,o,i,!0))return;const f=s.getId(m);if(m===t&&t.defaultView){const r=fn(t.defaultView);e({id:f,x:r.left,y:r.top})}else e({id:f,x:m.scrollLeft,y:m.scrollTop})}),l.scroll||100));return re("scroll",h,t)}function Ra({viewportResizeCb:e},{win:t}){let s=-1,o=-1;const i=F(We(F(()=>{const l=pn(),h=dn();(s!==l||o!==h)&&(e({width:Number(h),height:Number(l)}),s=l,o=h)}),200));return re("resize",i,t)}const Oa=["INPUT","TEXTAREA","SELECT"],Ei=new WeakMap;function Ma({inputCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,ignoreClass:l,ignoreSelector:h,maskInputOptions:d,maskInputFn:m,sampling:f,userTriggeredOnInput:r}){function u(b){let S=Ge(b);const x=b.isTrusted,y=S&&S.tagName;if(S&&y==="OPTION"&&(S=k.parentElement(S)),!S||!y||Oa.indexOf(y)<0||se(S,o,i,!0)||S.classList.contains(l)||h&&S.matches(h))return;let w=S.value,C=!1;const R=Fr(S)||"";R==="radio"||R==="checkbox"?C=S.checked:(d[y.toLowerCase()]||d[R])&&(w=Tr({element:S,maskInputOptions:d,tagName:y,type:R,value:w,maskInputFn:m})),a(S,r?{text:w,isChecked:C,userTriggered:x}:{text:w,isChecked:C});const I=S.name;R==="radio"&&I&&C&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==S){const _=M.value;a(M,r?{text:_,isChecked:!C,userTriggered:!1}:{text:_,isChecked:!C})}})}function a(b,S){const x=Ei.get(b);if(!x||x.text!==S.text||x.isChecked!==S.isChecked){Ei.set(b,S);const y=s.getId(b);F(e)(ae(T({},S),{id:y}))}}const p=(f.input==="last"?["change"]:["input","change"]).map(b=>re(b,F(u),t)),c=t.defaultView;if(!c)return()=>{p.forEach(b=>b())};const g=c.Object.getOwnPropertyDescriptor(c.HTMLInputElement.prototype,"value"),v=[[c.HTMLInputElement.prototype,"value"],[c.HTMLInputElement.prototype,"checked"],[c.HTMLSelectElement.prototype,"value"],[c.HTMLTextAreaElement.prototype,"value"],[c.HTMLSelectElement.prototype,"selectedIndex"],[c.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(b=>St(b[0],b[1],{set(){F(u)({target:this,isTrusted:!1})}},!1,c))),F(()=>{p.forEach(b=>b())})}function ct(e){const t=[];function s(o,i){if(tt("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||tt("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||tt("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||tt("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){const h=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(h)}else if(o.parentStyleSheet){const h=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(h)}return i}return s(e,t)}function we(e,t,s){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=s.getId(e),{styleId:i,id:o}):{}}function Ea({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};const i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((r,u,a)=>{const[n,p]=a,{id:c,styleId:g}=we(u,t,s.styleMirror);return(c&&c!==-1||g&&g!==-1)&&e({id:c,styleId:g,adds:[{rule:n,index:p}]}),r.apply(u,a)})}),o.CSSStyleSheet.prototype.addRule=function(r,u,a=this.cssRules.length){const n=`${r} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,a])};const l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:F((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,removes:[{index:n}]}),r.apply(u,a)})}),o.CSSStyleSheet.prototype.removeRule=function(r){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[r])};let h;o.CSSStyleSheet.prototype.replace&&(h=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:F((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,replace:n}),r.apply(u,a)})}));let d;o.CSSStyleSheet.prototype.replaceSync&&(d=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:F((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,replaceSync:n}),r.apply(u,a)})}));const m={};rt("CSSGroupingRule")?m.CSSGroupingRule=o.CSSGroupingRule:(rt("CSSMediaRule")&&(m.CSSMediaRule=o.CSSMediaRule),rt("CSSConditionRule")&&(m.CSSConditionRule=o.CSSConditionRule),rt("CSSSupportsRule")&&(m.CSSSupportsRule=o.CSSSupportsRule));const f={};return Object.entries(m).forEach(([r,u])=>{f[r]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(f[r].insertRule,{apply:F((a,n,p)=>{const[c,g]=p,{id:v,styleId:b}=we(n.parentStyleSheet,t,s.styleMirror);return(v&&v!==-1||b&&b!==-1)&&e({id:v,styleId:b,adds:[{rule:c,index:[...ct(n),g||0]}]}),a.apply(n,p)})}),u.prototype.deleteRule=new Proxy(f[r].deleteRule,{apply:F((a,n,p)=>{const[c]=p,{id:g,styleId:v}=we(n.parentStyleSheet,t,s.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...ct(n),c]}]}),a.apply(n,p)})})}),F(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=l,h&&(o.CSSStyleSheet.prototype.replace=h),d&&(o.CSSStyleSheet.prototype.replaceSync=d),Object.entries(m).forEach(([r,u])=>{u.prototype.insertRule=f[r].insertRule,u.prototype.deleteRule=f[r].deleteRule})})}function On({mirror:e,stylesheetManager:t},s){var o,i,l;let h=null;s.nodeName==="#document"?h=e.getId(s):h=e.getId(k.host(s));const d=s.nodeName==="#document"?(o=s.defaultView)==null?void 0:o.Document:(l=(i=s.ownerDocument)==null?void 0:i.defaultView)==null?void 0:l.ShadowRoot,m=d!=null&&d.prototype?Object.getOwnPropertyDescriptor(d==null?void 0:d.prototype,"adoptedStyleSheets"):void 0;return h===null||h===-1||!d||!m?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get(){var f;return(f=m.get)==null?void 0:f.call(this)},set(f){var r;const u=(r=m.set)==null?void 0:r.call(this,f);if(h!==null&&h!==-1)try{t.adoptStyleSheets(f,h)}catch(a){}return u}}),F(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get:m.get,set:m.set})}))}function Ia({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:o},{win:i}){const l=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:F((d,m,f)=>{var r;const[u,a,n]=f;if(s.has(u))return l.apply(m,[u,a,n]);const{id:p,styleId:c}=we((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,set:{property:u,value:a,priority:n},index:ct(m.parentRule)}),d.apply(m,f)})});const h=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:F((d,m,f)=>{var r;const[u]=f;if(s.has(u))return h.apply(m,[u]);const{id:a,styleId:n}=we((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(a&&a!==-1||n&&n!==-1)&&e({id:a,styleId:n,remove:{property:u},index:ct(m.parentRule)}),d.apply(m,f)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=l,i.CSSStyleDeclaration.prototype.removeProperty=h})}function Aa({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:o,sampling:i,doc:l}){const h=F(m=>We(F(f=>{const r=Ge(f);if(!r||se(r,t,s,!0))return;const{currentTime:u,volume:a,muted:n,playbackRate:p,loop:c}=r;e({type:m,id:o.getId(r),currentTime:u,volume:a,muted:n,playbackRate:p,loop:c})}),i.media||500)),d=[re("play",h(_e.Play),l),re("pause",h(_e.Pause),l),re("seeked",h(_e.Seeked),l),re("volumechange",h(_e.VolumeChange),l),re("ratechange",h(_e.RateChange),l)];return F(()=>{d.forEach(m=>m())})}function Pa({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const o=[],i=new WeakMap,l=s.FontFace;s.FontFace=function(m,f,r){const u=new l(m,f,r);return i.set(u,{family:m,buffer:typeof f!="string",descriptors:r,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),u};const h=Ee(t.fonts,"add",function(d){return function(m){return setTimeout(F(()=>{const f=i.get(m);f&&(e(f),i.delete(m))}),0),d.apply(this,[m])}});return o.push(()=>{s.FontFace=l}),o.push(h),F(()=>{o.forEach(d=>d())})}function Na(e){const{doc:t,mirror:s,blockClass:o,blockSelector:i,selectionCb:l}=e;let h=!0;const d=F(()=>{const m=t.getSelection();if(!m||h&&(m!=null&&m.isCollapsed))return;h=m.isCollapsed||!1;const f=[],r=m.rangeCount||0;for(let u=0;u<r;u++){const a=m.getRangeAt(u),{startContainer:n,startOffset:p,endContainer:c,endOffset:g}=a;se(n,o,i,!0)||se(c,o,i,!0)||f.push({start:s.getId(n),startOffset:p,end:s.getId(c),endOffset:g})}l({ranges:f})});return d(),re("selectionchange",d)}function _a({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:Ee(s.customElements,"define",function(i){return function(l,h,d){try{t({define:{name:l}})}catch(m){console.warn(`Custom element callback failed for ${l}`)}return i.apply(this,[l,h,d])}})}function ka(e,t){const{mutationCb:s,mousemoveCb:o,mouseInteractionCb:i,scrollCb:l,viewportResizeCb:h,inputCb:d,mediaInteractionCb:m,styleSheetRuleCb:f,styleDeclarationCb:r,canvasMutationCb:u,fontCb:a,selectionCb:n,customElementCb:p}=e;e.mutationCb=(...c)=>{t.mutation&&t.mutation(...c),s(...c)},e.mousemoveCb=(...c)=>{t.mousemove&&t.mousemove(...c),o(...c)},e.mouseInteractionCb=(...c)=>{t.mouseInteraction&&t.mouseInteraction(...c),i(...c)},e.scrollCb=(...c)=>{t.scroll&&t.scroll(...c),l(...c)},e.viewportResizeCb=(...c)=>{t.viewportResize&&t.viewportResize(...c),h(...c)},e.inputCb=(...c)=>{t.input&&t.input(...c),d(...c)},e.mediaInteractionCb=(...c)=>{t.mediaInteaction&&t.mediaInteaction(...c),m(...c)},e.styleSheetRuleCb=(...c)=>{t.styleSheetRule&&t.styleSheetRule(...c),f(...c)},e.styleDeclarationCb=(...c)=>{t.styleDeclaration&&t.styleDeclaration(...c),r(...c)},e.canvasMutationCb=(...c)=>{t.canvasMutation&&t.canvasMutation(...c),u(...c)},e.fontCb=(...c)=>{t.font&&t.font(...c),a(...c)},e.selectionCb=(...c)=>{t.selection&&t.selection(...c),n(...c)},e.customElementCb=(...c)=>{t.customElement&&t.customElement(...c),p(...c)}}function La(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};ka(e,t);let o;e.recordDOM&&(o=xn(e,e.doc));const i=Ca(e),l=xa(e),h=Rn(e),d=Ra(e,{win:s}),m=Ma(e),f=Aa(e);let r=()=>{},u=()=>{},a=()=>{},n=()=>{};e.recordDOM&&(r=Ea(e,{win:s}),u=On(e,e.doc),a=Ia(e,{win:s}),e.collectFonts&&(n=Pa(e)));const p=Na(e),c=_a(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,s,v.options));return F(()=>{be.forEach(v=>v.reset()),o==null||o.disconnect(),i(),l(),h(),d(),m(),f(),r(),u(),a(),n(),p(),c(),g.forEach(v=>v()),be.length=0})}function tt(e){return typeof window[e]!="undefined"}function rt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ii{constructor(t){A(this,"iframeIdToRemoteIdMap",new WeakMap),A(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,o,i){const l=o||this.getIdToRemoteIdMap(t),h=i||this.getRemoteIdToIdMap(t);let d=l.get(s);return d||(d=this.generateIdFn(),l.set(s,d),h.set(d,s)),d}getIds(t,s){const o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return s.map(l=>this.getId(t,l,o,i))}getRemoteId(t,s,o){const i=o||this.getRemoteIdToIdMap(t);if(typeof s!="number")return s;const l=i.get(s);return l||-1}getRemoteIds(t,s){const o=this.getRemoteIdToIdMap(t);return s.map(i=>this.getRemoteId(t,i,o))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class Da{constructor(t){A(this,"iframes",new WeakMap),A(this,"crossOriginIframeMap",new WeakMap),A(this,"crossOriginIframeMirror",new Ii($i)),A(this,"crossOriginIframeStyleMirror"),A(this,"crossOriginIframeRootIdMap",new WeakMap),A(this,"mirror"),A(this,"mutationCb"),A(this,"wrappedEmit"),A(this,"loadListener"),A(this,"stylesheetManager"),A(this,"recordCrossOriginIframes"),A(this,"messageHandler"),A(this,"nestedIframeListeners",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ii(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,s){var o;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){const l=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,l),i.addEventListener("message",l)}(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const l=this.transformCrossOriginEvent(i,s.data.event);l&&this.wrappedEmit(l,s.data.isCheckout)}transformCrossOriginEvent(t,s){var o;switch(s.type){case U.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const i=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(s.data.node,i),{timestamp:s.timestamp,type:U.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case U.Meta:case U.Load:case U.DomContentLoaded:return!1;case U.Plugin:return s;case U.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case U.IncrementalSnapshot:switch(s.data.source){case D.Mutation:return s.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const l=this.crossOriginIframeRootIdMap.get(t);l&&this.patchRootIdOnNode(i.node,l)}),s.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),s.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),s.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.Drag:case D.TouchMove:case D.MouseMove:return s.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(s.data,t,["id"]),s;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case D.Font:return s;case D.Selection:return s.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),s;case D.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(o=s.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),s}}return!1}replace(t,s,o,i){for(const l of i)!Array.isArray(s[l])&&typeof s[l]!="number"||(Array.isArray(s[l])?s[l]=t.getIds(o,s[l]):s[l]=t.getId(o,s[l]));return s}replaceIds(t,s,o){return this.replace(this.crossOriginIframeMirror,t,s,o)}replaceStyleIds(t,s,o){return this.replace(this.crossOriginIframeStyleMirror,t,s,o)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,s)})}patchRootIdOnNode(t,s){t.type!==vn.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,s)})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,s)=>{s.removeEventListener("message",t)}),this.nestedIframeListeners.clear()}}class Ta{constructor(t){A(this,"shadowDoms",new WeakSet),A(this,"mutationCb"),A(this,"scrollCb"),A(this,"bypassOptions"),A(this,"mirror"),A(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!$e(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const o=xn(ae(T({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(Rn(ae(T({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(k.host(t))),this.restoreHandlers.push(On({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const o=this;this.restoreHandlers.push(Ee(t.prototype,"attachShadow",function(i){return function(l){const h=i.call(this,l),d=k.shadowRoot(this);return d&&Sn(this)&&o.addShadowRoot(d,s),h}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(s){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var st=0;st<De.length;st++)Fa[De.charCodeAt(st)]=st;var Ua=function(e){var t=new Uint8Array(e),s,o=t.length,i="";for(s=0;s<o;s+=3)i+=De[t[s]>>2],i+=De[(t[s]&3)<<4|t[s+1]>>4],i+=De[(t[s+1]&15)<<2|t[s+2]>>6],i+=De[t[s+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Ai=new Map;function $a(e,t){let s=Ai.get(e);return s||(s=new Map,Ai.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const Mn=(e,t,s)=>{if(!e||!(In(e,t)||typeof e=="object"))return;const o=e.constructor.name,i=$a(s,o);let l=i.indexOf(e);return l===-1&&(l=i.length,i.push(e)),l};function it(e,t,s){if(e instanceof Array)return e.map(o=>it(o,t,s));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){const o=e.constructor.name,i=Ua(e);return{rr_type:o,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[it(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const o=e.constructor.name,{src:i}=e;return{rr_type:o,src:i}}else if(e instanceof HTMLCanvasElement){const o="HTMLImageElement",i=e.toDataURL();return{rr_type:o,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[it(e.data,t,s),e.width,e.height]};if(In(e,t)||typeof e=="object"){const o=e.constructor.name,i=Mn(e,t,s);return{rr_type:o,index:i}}}}return e}const En=(e,t,s)=>e.map(o=>it(o,t,s)),In=(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 Ba(e,t,s,o){const i=[],l=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const h of l)try{if(typeof t.CanvasRenderingContext2D.prototype[h]!="function")continue;const d=Ee(t.CanvasRenderingContext2D.prototype,h,function(m){return function(...f){return se(this.canvas,s,o,!0)||setTimeout(()=>{const r=En(f,t,this);e(this.canvas,{type:Te["2D"],property:h,args:r})},0),m.apply(this,f)}});i.push(d)}catch(d){const m=St(t.CanvasRenderingContext2D.prototype,h,{set(f){e(this.canvas,{type:Te["2D"],property:h,args:[f],setter:!0})}});i.push(m)}return()=>{i.forEach(h=>h())}}function za(e){return e==="experimental-webgl"?"webgl":e}function Pi(e,t,s,o){const i=[];try{const l=Ee(e.HTMLCanvasElement.prototype,"getContext",function(h){return function(d,...m){if(!se(this,t,s,!0)){const f=za(d);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))if(m[0]&&typeof m[0]=="object"){const r=m[0];r.preserveDrawingBuffer||(r.preserveDrawingBuffer=!0)}else m.splice(0,1,{preserveDrawingBuffer:!0})}return h.apply(this,[d,...m])}});i.push(l)}catch(l){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(l=>l())}}function Ni(e,t,s,o,i,l){const h=[],d=Object.getOwnPropertyNames(e);for(const m of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(m))try{if(typeof e[m]!="function")continue;const f=Ee(e,m,function(r){return function(...u){const a=r.apply(this,u);if(Mn(a,l,this),"tagName"in this.canvas&&!se(this.canvas,o,i,!0)){const n=En(u,l,this),p={type:t,property:m,args:n};s(this.canvas,p)}return a}});h.push(f)}catch(f){const r=St(e,m,{set(u){s(this.canvas,{type:t,property:m,args:[u],setter:!0})}});h.push(r)}return h}function Wa(e,t,s,o){const i=[];return i.push(...Ni(t.WebGLRenderingContext.prototype,Te.WebGL,e,s,o,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...Ni(t.WebGL2RenderingContext.prototype,Te.WebGL2,e,s,o,t)),()=>{i.forEach(l=>l())}}const An=`(function() {
71
71
  "use strict";
72
72
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
73
73
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -142,7 +142,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
142
142
  };
143
143
  })();
144
144
  //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
145
- `,Ni=typeof self!="undefined"&&self.Blob&&new Blob([In],{type:"text/javascript;charset=utf-8"});function Wa(e){let t;try{if(t=Ni&&(self.URL||self.webkitURL).createObjectURL(Ni),!t)throw"";const s=new Worker(t,{name:e==null?void 0:e.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(In),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class qa{constructor(t){A(this,"pendingCanvasMutations",new Map),A(this,"rafStamps",{latestId:0,invokeId:null}),A(this,"mirror"),A(this,"mutationCb"),A(this,"resetObservers"),A(this,"frozen",!1),A(this,"locked",!1),A(this,"processMutation",(m,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(m)||this.pendingCanvasMutations.set(m,[]),this.pendingCanvasMutations.get(m).push(f)});const{sampling:s="all",win:o,blockClass:i,blockSelector:l,recordCanvas:h,dataURLOptions:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,h&&s==="all"&&this.initCanvasMutationObserver(o,i,l),h&&typeof s=="number"&&this.initCanvasFPSObserver(s,o,i,l,{dataURLOptions:d})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,s,o,i,l){const h=Ai(s,o,i,!0),d=new Map,m=new Wa;m.onmessage=p=>{const{id:c}=p.data;if(d.set(c,!1),!("base64"in p.data))return;const{base64:g,type:v,width:b,height:S}=p.data;this.mutationCb({id:c,type:De["2D"],commands:[{property:"clearRect",args:[0,0,b,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const f=1e3/t;let r=0,u;const a=()=>{const p=[],c=g=>{g.querySelectorAll("canvas").forEach(v=>{se(v,o,i,!0)||p.push(v)}),g.querySelectorAll("*").forEach(v=>{v.shadowRoot&&c(v.shadowRoot)})};return c(s.document),p},n=p=>{if(r&&p-r<f){u=requestAnimationFrame(n);return}r=p,a().forEach(async c=>{var g;const v=this.mirror.getId(c);if(d.get(v)||c.width===0||c.height===0)return;if(d.set(v,!0),["webgl","webgl2"].includes(c.__context)){const y=c.getContext(c.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=c.clientWidth||c.width,S=c.clientHeight||c.height,x=await createImageBitmap(c,{resizeWidth:b,resizeHeight:S});m.postMessage({id:v,bitmap:x,width:b,height:S,dataURLOptions:l.dataURLOptions},[x])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{h(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,s,o){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Ai(t,s,o,!1),l=$a(this.processMutation.bind(this),t,s,o),h=za(this.processMutation.bind(this),t,s,o);this.resetObservers=()=>{i(),l(),h()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const o=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,o)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const o=this.pendingCanvasMutations.get(t);if(!o||s===-1)return;const i=o.map(h=>{const f=h,{type:d}=f;return Ie(f,["type"])}),{type:l}=o[0];this.mutationCb({id:s,type:l,commands:i}),this.pendingCanvasMutations.delete(t)}}class ja{constructor(t){A(this,"trackedLinkElements",new WeakSet),A(this,"mutationCb"),A(this,"adoptedStyleSheetCb"),A(this,"styleMirror",new fa),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const o={id:s,styleIds:[]},i=[];for(const l of t){let h;this.styleMirror.has(l)?h=this.styleMirror.getId(l):(h=this.styleMirror.add(l),i.push({styleId:h,rules:Array.from(l.rules||CSSRule,(d,m)=>({rule:Di(d,l.href),index:m}))})),o.styleIds.push(h)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Ha{constructor(){A(this,"nodeMap",new WeakMap),A(this,"active",!1)}inOtherBuffer(t,s){const o=this.nodeMap.get(t);return o&&Array.from(o).some(i=>i!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let V,it,Pr,ct=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ss=e.contentWindow)==null?void 0:ss.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ue=to();function Ce(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:l=null,ignoreClass:h="rr-ignore",ignoreSelector:d=null,maskTextClass:m="rr-mask",maskTextSelector:f=null,inlineStylesheet:r=!0,maskAllInputs:u,maskInputOptions:a,slimDOMOptions:n,maskInputFn:p,maskTextFn:c,hooks:g,packFn:v,sampling:b={},dataURLOptions:S={},mousemoveWait:x,recordDOM:y=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:M=!1,inlineImages:_=!1,plugins:P,keepIframeSrcFn:Z=()=>!1,ignoreCSSAttributes:ee=new Set([]),errorHandler:O}=e;ba(O);const Q=C?window.parent===window:!0;let L=!1;if(!Q)try{window.parent.document&&(L=!1)}catch(N){L=!0}if(Q&&!t)throw new Error("emit function is required");if(!Q&&!L)return()=>{};x!==void 0&&b.mousemove===void 0&&(b.mousemove=x),ue.reset();const $=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:a!==void 0?a:{password:!0},X=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};ha();let G,de=0;const ge=N=>{for(const J of P||[])J.eventProcessor&&(N=J.eventProcessor(N));return v&&!L&&(N=v(N)),N};V=(N,J)=>{var B;const H=N;if(H.timestamp=lt(),(B=be[0])!=null&&B.isFrozen()&&H.type!==U.FullSnapshot&&!(H.type===U.IncrementalSnapshot&&H.data.source===D.Mutation)&&be.forEach(pe=>pe.unfreeze()),Q)t==null||t(ge(H),J);else if(L){const pe={type:"rrweb",event:ge(H),origin:window.location.origin,isCheckout:J};window.parent.postMessage(pe,"*")}if(H.type===U.FullSnapshot)G=H,de=0;else if(H.type===U.IncrementalSnapshot){if(H.data.source===D.Mutation&&H.data.isAttachIframe)return;de++;const pe=o&&de>=o,z=s&&H.timestamp-G.timestamp>s;(pe||z)&&it(!0)}};const E=N=>{V({type:U.IncrementalSnapshot,data:T({source:D.Mutation},N)})},fe=N=>V({type:U.IncrementalSnapshot,data:T({source:D.Scroll},N)}),ne=N=>V({type:U.IncrementalSnapshot,data:T({source:D.CanvasMutation},N)}),Te=N=>V({type:U.IncrementalSnapshot,data:T({source:D.AdoptedStyleSheet},N)}),te=new ja({mutationCb:E,adoptedStyleSheetCb:Te}),oe=new La({mirror:ue,mutationCb:E,stylesheetManager:te,recordCrossOriginIframes:C,wrappedEmit:V});for(const N of P||[])N.getMirror&&N.getMirror({nodeMirror:ue,crossOriginIframeMirror:oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:oe.crossOriginIframeStyleMirror});const xe=new Ha;Pr=new qa({recordCanvas:w,mutationCb:ne,win:window,blockClass:i,blockSelector:l,mirror:ue,sampling:b.canvas,dataURLOptions:S});const ye=new Da({mutationCb:E,scrollCb:fe,bypassOptions:{blockClass:i,blockSelector:l,maskTextClass:m,maskTextSelector:f,inlineStylesheet:r,maskInputOptions:$,dataURLOptions:S,maskTextFn:c,maskInputFn:p,recordCanvas:w,inlineImages:_,sampling:b,slimDOMOptions:X,iframeManager:oe,stylesheetManager:te,canvasManager:Pr,keepIframeSrcFn:Z,processedNodeManager:xe},mirror:ue});it=(N=!1)=>{if(!y)return;V({type:U.Meta,data:{href:window.location.href,width:pn(),height:fn()}},N),te.reset(),ye.init(),be.forEach(B=>B.lock());const J=Oo(document,{mirror:ue,blockClass:i,blockSelector:l,maskTextClass:m,maskTextSelector:f,inlineStylesheet:r,maskAllInputs:$,maskTextFn:c,maskInputFn:p,slimDOM:X,dataURLOptions:S,recordCanvas:w,inlineImages:_,onSerialize:B=>{gn(B,ue)&&oe.addIframe(B),yn(B,ue)&&te.trackLinkElement(B),_r(B)&&ye.addShadowRoot(k.shadowRoot(B),document)},onIframeLoad:(B,H)=>{oe.attachIframe(B,H),ye.observeAttachShadow(B)},onStylesheetLoad:(B,H)=>{te.attachLinkElement(B,H)},keepIframeSrcFn:Z});if(!J)return console.warn("Failed to snapshot the document");V({type:U.FullSnapshot,data:{node:J,initialOffset:hn(window)}},N),be.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&te.adoptStyleSheets(document.adoptedStyleSheets,ue.getId(document))};try{const N=[],J=H=>{var pe;return F(ka)({mutationCb:E,mousemoveCb:(z,St)=>V({type:U.IncrementalSnapshot,data:{source:St,positions:z}}),mouseInteractionCb:z=>V({type:U.IncrementalSnapshot,data:T({source:D.MouseInteraction},z)}),scrollCb:fe,viewportResizeCb:z=>V({type:U.IncrementalSnapshot,data:T({source:D.ViewportResize},z)}),inputCb:z=>V({type:U.IncrementalSnapshot,data:T({source:D.Input},z)}),mediaInteractionCb:z=>V({type:U.IncrementalSnapshot,data:T({source:D.MediaInteraction},z)}),styleSheetRuleCb:z=>V({type:U.IncrementalSnapshot,data:T({source:D.StyleSheetRule},z)}),styleDeclarationCb:z=>V({type:U.IncrementalSnapshot,data:T({source:D.StyleDeclaration},z)}),canvasMutationCb:ne,fontCb:z=>V({type:U.IncrementalSnapshot,data:T({source:D.Font},z)}),selectionCb:z=>{V({type:U.IncrementalSnapshot,data:T({source:D.Selection},z)})},customElementCb:z=>{V({type:U.IncrementalSnapshot,data:T({source:D.CustomElement},z)})},blockClass:i,ignoreClass:h,ignoreSelector:d,maskTextClass:m,maskTextSelector:f,maskInputOptions:$,inlineStylesheet:r,sampling:b,recordDOM:y,recordCanvas:w,inlineImages:_,userTriggeredOnInput:I,collectFonts:M,doc:H,maskInputFn:p,maskTextFn:c,keepIframeSrcFn:Z,blockSelector:l,slimDOMOptions:X,dataURLOptions:S,mirror:ue,iframeManager:oe,stylesheetManager:te,shadowDomManager:ye,processedNodeManager:xe,canvasManager:Pr,ignoreCSSAttributes:ee,plugins:((pe=P==null?void 0:P.filter(z=>z.observer))==null?void 0:pe.map(z=>({observer:z.observer,options:z.options,callback:St=>V({type:U.Plugin,data:{plugin:z.name,payload:St}})})))||[]},g)};oe.addLoadListener(H=>{try{N.push(J(H.contentDocument))}catch(pe){console.warn(pe)}});const B=()=>{it(),N.push(J(document)),ct=!0};return document.readyState==="interactive"||document.readyState==="complete"?B():(N.push(re("DOMContentLoaded",()=>{V({type:U.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&B()})),N.push(re("load",()=>{V({type:U.Load,data:{}}),R==="load"&&B()},window))),()=>{N.forEach(H=>H()),xe.destroy(),oe.destroy(),ct=!1,Sa()}}catch(N){console.warn(N)}}Ce.addCustomEvent=(e,t)=>{if(!ct)throw new Error("please add custom event after start recording");V({type:U.Custom,data:{tag:e,payload:t}})};Ce.freezePage=()=>{be.forEach(e=>e.freeze())};Ce.takeFullSnapshot=e=>{if(!ct)throw new Error("please take full snapshot after start recording");it(e)};Ce.mirror=ue;var _i;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(_i||(_i={}));const{addCustomEvent:Ga}=Ce,{freezePage:Ja}=Ce,{takeFullSnapshot:Ya}=Ce;exports.record=Ce;
145
+ `,_i=typeof self!="undefined"&&self.Blob&&new Blob([An],{type:"text/javascript;charset=utf-8"});function qa(e){let t;try{if(t=_i&&(self.URL||self.webkitURL).createObjectURL(_i),!t)throw"";const s=new Worker(t,{name:e==null?void 0:e.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(An),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class ja{constructor(t){A(this,"pendingCanvasMutations",new Map),A(this,"rafStamps",{latestId:0,invokeId:null}),A(this,"mirror"),A(this,"mutationCb"),A(this,"resetObservers"),A(this,"frozen",!1),A(this,"locked",!1),A(this,"processMutation",(m,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(m)||this.pendingCanvasMutations.set(m,[]),this.pendingCanvasMutations.get(m).push(f)});const{sampling:s="all",win:o,blockClass:i,blockSelector:l,recordCanvas:h,dataURLOptions:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,h&&s==="all"&&this.initCanvasMutationObserver(o,i,l),h&&typeof s=="number"&&this.initCanvasFPSObserver(s,o,i,l,{dataURLOptions:d})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,s,o,i,l){const h=Pi(s,o,i,!0),d=new Map,m=new qa;m.onmessage=p=>{const{id:c}=p.data;if(d.set(c,!1),!("base64"in p.data))return;const{base64:g,type:v,width:b,height:S}=p.data;this.mutationCb({id:c,type:Te["2D"],commands:[{property:"clearRect",args:[0,0,b,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const f=1e3/t;let r=0,u;const a=()=>{const p=[],c=g=>{g.querySelectorAll("canvas").forEach(v=>{se(v,o,i,!0)||p.push(v)}),g.querySelectorAll("*").forEach(v=>{v.shadowRoot&&c(v.shadowRoot)})};return c(s.document),p},n=p=>{if(r&&p-r<f){u=requestAnimationFrame(n);return}r=p,a().forEach(async c=>{var g;const v=this.mirror.getId(c);if(d.get(v)||c.width===0||c.height===0)return;if(d.set(v,!0),["webgl","webgl2"].includes(c.__context)){const y=c.getContext(c.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=c.clientWidth||c.width,S=c.clientHeight||c.height,x=await createImageBitmap(c,{resizeWidth:b,resizeHeight:S});m.postMessage({id:v,bitmap:x,width:b,height:S,dataURLOptions:l.dataURLOptions},[x])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{h(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,s,o){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Pi(t,s,o,!1),l=Ba(this.processMutation.bind(this),t,s,o),h=Wa(this.processMutation.bind(this),t,s,o);this.resetObservers=()=>{i(),l(),h()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const o=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,o)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const o=this.pendingCanvasMutations.get(t);if(!o||s===-1)return;const i=o.map(h=>{const f=h,{type:d}=f;return Ae(f,["type"])}),{type:l}=o[0];this.mutationCb({id:s,type:l,commands:i}),this.pendingCanvasMutations.delete(t)}}class Ha{constructor(t){A(this,"trackedLinkElements",new WeakSet),A(this,"mutationCb"),A(this,"adoptedStyleSheetCb"),A(this,"styleMirror",new pa),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const o={id:s,styleIds:[]},i=[];for(const l of t){let h;this.styleMirror.has(l)?h=this.styleMirror.getId(l):(h=this.styleMirror.add(l),i.push({styleId:h,rules:Array.from(l.rules||CSSRule,(d,m)=>({rule:Ti(d,l.href),index:m}))})),o.styleIds.push(h)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Va{constructor(){A(this,"nodeMap",new WeakMap),A(this,"active",!1)}inOtherBuffer(t,s){const o=this.nodeMap.get(t);return o&&Array.from(o).some(i=>i!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let H,nt,Nr,ht=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((is=e.contentWindow)==null?void 0:is.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ce=ro();function Ce(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:l=null,ignoreClass:h="rr-ignore",ignoreSelector:d=null,maskTextClass:m="rr-mask",maskTextSelector:f=null,inlineStylesheet:r=!0,maskAllInputs:u,maskInputOptions:a,slimDOMOptions:n,maskInputFn:p,maskTextFn:c,hooks:g,packFn:v,sampling:b={},dataURLOptions:S={},mousemoveWait:x,recordDOM:y=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:M=!1,inlineImages:_=!1,plugins:P,keepIframeSrcFn:Z=()=>!1,ignoreCSSAttributes:ee=new Set([]),errorHandler:O}=e;Sa(O);const Q=C?window.parent===window:!0;let L=!1;if(!Q)try{window.parent.document&&(L=!1)}catch(N){L=!0}if(Q&&!t)throw new Error("emit function is required");if(!Q&&!L)return()=>{};x!==void 0&&b.mousemove===void 0&&(b.mousemove=x),ce.reset();const $=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:a!==void 0?a:{password:!0},X=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};fa();let V,de=0;const ge=N=>{for(const J of P||[])J.eventProcessor&&(N=J.eventProcessor(N));return v&&!L&&(N=v(N)),N};H=(N,J)=>{var B;const G=N;if(G.timestamp=ut(),(B=be[0])!=null&&B.isFrozen()&&G.type!==U.FullSnapshot&&!(G.type===U.IncrementalSnapshot&&G.data.source===D.Mutation)&&be.forEach(ue=>ue.unfreeze()),Q)t==null||t(ge(G),J);else if(L){const ue={type:"rrweb",event:ge(G),origin:window.location.origin,isCheckout:J};window.parent.postMessage(ue,"*")}if(G.type===U.FullSnapshot)V=G,de=0;else if(G.type===U.IncrementalSnapshot){if(G.data.source===D.Mutation&&G.data.isAttachIframe)return;de++;const ue=o&&de>=o,Ie=s&&G.timestamp-V.timestamp>s;(ue||Ie)&&nt(!0)}};const E=N=>{H({type:U.IncrementalSnapshot,data:T({source:D.Mutation},N)})},pe=N=>H({type:U.IncrementalSnapshot,data:T({source:D.Scroll},N)}),oe=N=>H({type:U.IncrementalSnapshot,data:T({source:D.CanvasMutation},N)}),Fe=N=>H({type:U.IncrementalSnapshot,data:T({source:D.AdoptedStyleSheet},N)}),te=new Ha({mutationCb:E,adoptedStyleSheetCb:Fe}),ne=new Da({mirror:ce,mutationCb:E,stylesheetManager:te,recordCrossOriginIframes:C,wrappedEmit:H});for(const N of P||[])N.getMirror&&N.getMirror({nodeMirror:ce,crossOriginIframeMirror:ne.crossOriginIframeMirror,crossOriginIframeStyleMirror:ne.crossOriginIframeStyleMirror});const xe=new Va;Nr=new ja({recordCanvas:w,mutationCb:oe,win:window,blockClass:i,blockSelector:l,mirror:ce,sampling:b.canvas,dataURLOptions:S});const ye=new Ta({mutationCb:E,scrollCb:pe,bypassOptions:{blockClass:i,blockSelector:l,maskTextClass:m,maskTextSelector:f,inlineStylesheet:r,maskInputOptions:$,dataURLOptions:S,maskTextFn:c,maskInputFn:p,recordCanvas:w,inlineImages:_,sampling:b,slimDOMOptions:X,iframeManager:ne,stylesheetManager:te,canvasManager:Nr,keepIframeSrcFn:Z,processedNodeManager:xe},mirror:ce});nt=(N=!1)=>{if(!y)return;H({type:U.Meta,data:{href:window.location.href,width:dn(),height:pn()}},N),te.reset(),ye.init(),be.forEach(B=>B.lock());const J=Mo(document,{mirror:ce,blockClass:i,blockSelector:l,maskTextClass:m,maskTextSelector:f,inlineStylesheet:r,maskAllInputs:$,maskTextFn:c,maskInputFn:p,slimDOM:X,dataURLOptions:S,recordCanvas:w,inlineImages:_,onSerialize:B=>{yn(B,ce)&&ne.addIframe(B),wn(B,ce)&&te.trackLinkElement(B),kr(B)&&ye.addShadowRoot(k.shadowRoot(B),document)},onIframeLoad:(B,G)=>{ne.attachIframe(B,G),ye.observeAttachShadow(B)},onStylesheetLoad:(B,G)=>{te.attachLinkElement(B,G)},keepIframeSrcFn:Z});if(!J)return console.warn("Failed to snapshot the document");H({type:U.FullSnapshot,data:{node:J,initialOffset:fn(window)}},N),be.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&te.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const N=[],J=ue=>{var Ie;return F(La)({mutationCb:E,mousemoveCb:(W,vt)=>H({type:U.IncrementalSnapshot,data:{source:vt,positions:W}}),mouseInteractionCb:W=>H({type:U.IncrementalSnapshot,data:T({source:D.MouseInteraction},W)}),scrollCb:pe,viewportResizeCb:W=>H({type:U.IncrementalSnapshot,data:T({source:D.ViewportResize},W)}),inputCb:W=>H({type:U.IncrementalSnapshot,data:T({source:D.Input},W)}),mediaInteractionCb:W=>H({type:U.IncrementalSnapshot,data:T({source:D.MediaInteraction},W)}),styleSheetRuleCb:W=>H({type:U.IncrementalSnapshot,data:T({source:D.StyleSheetRule},W)}),styleDeclarationCb:W=>H({type:U.IncrementalSnapshot,data:T({source:D.StyleDeclaration},W)}),canvasMutationCb:oe,fontCb:W=>H({type:U.IncrementalSnapshot,data:T({source:D.Font},W)}),selectionCb:W=>{H({type:U.IncrementalSnapshot,data:T({source:D.Selection},W)})},customElementCb:W=>{H({type:U.IncrementalSnapshot,data:T({source:D.CustomElement},W)})},blockClass:i,ignoreClass:h,ignoreSelector:d,maskTextClass:m,maskTextSelector:f,maskInputOptions:$,inlineStylesheet:r,sampling:b,recordDOM:y,recordCanvas:w,inlineImages:_,userTriggeredOnInput:I,collectFonts:M,doc:ue,maskInputFn:p,maskTextFn:c,keepIframeSrcFn:Z,blockSelector:l,slimDOMOptions:X,dataURLOptions:S,mirror:ce,iframeManager:ne,stylesheetManager:te,shadowDomManager:ye,processedNodeManager:xe,canvasManager:Nr,ignoreCSSAttributes:ee,plugins:((Ie=P==null?void 0:P.filter(W=>W.observer))==null?void 0:Ie.map(W=>({observer:W.observer,options:W.options,callback:vt=>H({type:U.Plugin,data:{plugin:W.name,payload:vt}})})))||[]},g)},B=ue=>{try{N.push(J(ue.contentDocument))}catch(Ie){console.warn(Ie)}};ne.addLoadListener(B);const G=()=>{nt(),N.push(J(document)),ht=!0};return document.readyState==="interactive"||document.readyState==="complete"?G():(N.push(re("DOMContentLoaded",()=>{H({type:U.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&G()})),N.push(re("load",()=>{H({type:U.Load,data:{}}),R==="load"&&G()},window))),()=>{N.forEach(ue=>ue()),xe.destroy(),ne.removeLoadListener(),ne.destroy(),ht=!1,va()}}catch(N){console.warn(N)}}Ce.addCustomEvent=(e,t)=>{if(!ht)throw new Error("please add custom event after start recording");H({type:U.Custom,data:{tag:e,payload:t}})};Ce.freezePage=()=>{be.forEach(e=>e.freeze())};Ce.takeFullSnapshot=e=>{if(!ht)throw new Error("please take full snapshot after start recording");nt(e)};Ce.mirror=ce;var ki;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ki||(ki={}));const{addCustomEvent:Ja}=Ce,{freezePage:Ya}=Ce,{takeFullSnapshot:Qa}=Ce;exports.record=Ce;
146
146
  if (typeof module.exports == "object" && typeof exports == "object") {
147
147
  var __cp = (to, from, except, desc) => {
148
148
  if ((from && typeof from === "object") || typeof from === "function") {