@glimt/record 0.0.21 → 0.0.22

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.
@@ -1,11 +1,11 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
- "use strict";var zo=Object.defineProperty,Go=Object.defineProperties;var Vo=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var Gs=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var zs=(s,e,t)=>e in s?zo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,O=(s,e)=>{for(var t in e||(e={}))Gs.call(e,t)&&zs(s,t,e[t]);if(gt)for(var t of gt(e))Vs.call(e,t)&&zs(s,t,e[t]);return s},ee=(s,e)=>Go(s,Vo(e));var Me=(s,e)=>{var t={};for(var r in s)Gs.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&gt)for(var r of gt(s))e.indexOf(r)<0&&Vs.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var jo=Object.defineProperty,Ho=(s,e,t)=>e in s?jo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>Ho(s,typeof e!="symbol"?e+"":e,t),js,Yo=Object.defineProperty,Zo=(s,e,t)=>e in s?Yo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Hs=(s,e,t)=>Zo(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const Ys={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={},Jo=()=>!!globalThis.Zone;function ds(s){if(yt[s])return yt[s];const e=globalThis[s],t=e.prototype,r=s in Ys?Ys[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in Zs?Zs[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!Jo())return yt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?yt[s]=c:t}catch(l){return t}}const Sr={};function ye(s,e,t){var r;const i=`${s}.${String(t)}`;if(Sr[i])return Sr[i].call(e);const n=ds(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Sr[i]=a,a.call(e)):e[t]}const Cr={};function Hi(s,e,t){const r=`${s}.${String(t)}`;if(Cr[r])return Cr[r].bind(e);const n=ds(s)[t];return typeof n!="function"?e[t]:(Cr[r]=n,n.bind(e))}function Xo(s){return ye("Node",s,"childNodes")}function Ko(s){return ye("Node",s,"parentNode")}function Qo(s){return ye("Node",s,"parentElement")}function qo(s){return ye("Node",s,"textContent")}function ea(s,e){return Hi("Node",s,"contains")(e)}function ta(s){return Hi("Node",s,"getRootNode")()}function ra(s){return!s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function sa(s){return s.styleSheets}function ia(s){return!s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function na(s,e){return ye("Element",s,"querySelector")(e)}function oa(s,e){return ye("Element",s,"querySelectorAll")(e)}function aa(){return ds("MutationObserver").constructor}function la(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const Z={childNodes:Xo,parentNode:Ko,parentElement:Qo,textContent:qo,contains:ea,getRootNode:ta,host:ra,styleSheets:sa,shadowRoot:ia,querySelector:na,querySelectorAll:oa,mutationObserver:aa,patch:la};function Yi(s){return s.nodeType===s.ELEMENT_NODE}function Xe(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Ke(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ua(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ca(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Lr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Zi(i,t)).join("");return ua(r)}catch(e){return null}}function Zi(s,e){if(fa(s)){let t;try{t=Lr(s.styleSheet)||ca(s)}catch(r){t=s.cssText}return s.styleSheet.href?Yt(t,s.styleSheet.href):t}else{let t=s.cssText;return pa(s)&&s.selectorText.includes(":")&&(t=ha(t)),e?Yt(t,e):t}}function ha(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function fa(s){return"styleSheet"in s}function pa(s){return"selectorText"in s}class Ji{constructor(){Hs(this,"idNodeMap",new Map),Hs(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function da(){return new Ji}function jt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&xe(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function xe(s){return s.toLowerCase()}const Js="__rrweb_original__",ma=25e4;function ga(s){if(s.width*s.height<ma)return s.getContext("2d");const e=document.createElement("canvas");e.width=s.width,e.height=s.height;const t=e.getContext("2d");return t&&t.drawImage(s,0,0),e.getContext("2d",{willReadFrequently:!0})}function ya(s){if(s.width===0||s.height===0)return!0;const e=ga(s);if(!e)return!0;const t=s.width>512||s.height>512?100:50,r=e.getImageData,i=Js in r?r[Js]:r;for(let n=0;n<s.width;n+=t){const a=Math.min(t,s.width-n);for(let l=0;l<s.height;l+=t){const o=Math.min(t,s.height-l),c=new Uint32Array(i.call(e,n,l,a,o).data.buffer);for(let u=0;u<c.length;u++)if(c[u]!==0)return!1}}return!0}function Ht(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?xe(e):null}function Xi(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function wa(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const ba=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Sa=/^(?:[a-z+]+:)?\/\//i,Ca=/^www\..*/i,va=/^(data:)([^,]*),(.*)/i;function Yt(s,e){return(s||"").replace(ba,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(Sa.test(o)||Ca.test(o))return`url(${c}${o}${c})`;if(va.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${wa(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}function wt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ia(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=wt(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const c=wt(r[o].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let p=c.substring(0,h),d=a.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[o-1].textContent!=="")g=a.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=a.split(p),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=a.indexOf(p));if(d.length>=2&&h>u){const m=r[o-1].textContent;if(m&&typeof m=="string"){const f=wt(m).length;g=a.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=wt(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),a=a.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/l)):m-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function xa(s,e){return Ia(s,e).join("/* rr_split */")}let Ra=1;const Oa=new RegExp("[^a-z0-9-_:]"),qe=-2;function Ki(){return Ra++}function Aa(s){if(s instanceof HTMLFormElement)return"form";const e=xe(s.tagName);return Oa.test(e)?"div":e}let Ee,Xs;const Ma=/^[^ \t\n\r\u000c]+/,Ea=/^[, \t\n\r\u000c]+/;function $a(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(Ea),!(t>=e.length);){let n=r(Ma);if(n.slice(-1)===",")n=ke(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=ke(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const Ks=new WeakMap;function ke(s,e){return!e||e.trim()===""?e:ms(s,e)}function Na(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function ms(s,e){let t=Ks.get(s);if(t||(t=s.createElement("a"),Ks.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Qi(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?ke(s,r):t==="srcset"?$a(s,r):t==="style"?Yt(r,ms(s)):e==="object"&&t==="data"?ke(s,r):r)}function qi(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ka(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function Zt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Zt(Z.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Zt(Z.parentNode(s),e,t):!1}function en(s,e,t,r){let i;if(Yi(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Zt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Pa(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function La(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Da(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:a,inlineStylesheet:l,maskInputOptions:o={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,b=Ta(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:b};case s.ELEMENT_NODE:return Fa(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:o,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:b});case s.TEXT_NODE:return _a(s,{doc:t,needsMask:a,maskTextFn:c,rootId:b,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:b};case s.COMMENT_NODE:return{type:H.Comment,textContent:Z.textContent(s)||"",rootId:b};default:return!1}}function Ta(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function _a(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Z.parentNode(s),l=a&&a.tagName;let o="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?o="SCRIPT_PLACEHOLDER":n||(o=Z.textContent(s),c&&o&&(o=Yt(o,ms(e.doc)))),!c&&!u&&o&&t&&(o=r?r(o,Z.parentElement(s)):o.replace(/[\S]/g,"*")),{type:H.Text,textContent:o||"",rootId:i}}function Fa(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:o={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=e,g=ka(s,r,i),m=Aa(s);let f={};const b=s.attributes.length;for(let y=0;y<b;y++){const C=s.attributes[y];qi(m,C.name,C.value)||(f[C.name]=Qi(t,m,xe(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets).find(P=>P.href===s.href);let C=null;y&&(C=Lr(y)),C&&(delete f.rel,delete f.href,f._cssText=C)}if(m==="style"&&s.sheet){let y=Lr(s.sheet);y&&(s.childNodes.length>1&&(y=xa(y,s)),f._cssText=y)}if(m==="input"||m==="textarea"||m==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=jt({element:s,type:Ht(s),tagName:m,value:y,maskInputOptions:a,maskInputFn:l}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!a.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&u){if(s.__context==="2d")ya(s)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(!("__context"in s)){const y=s.toDataURL(o.type,o.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const P=C.toDataURL(o.type,o.quality);y!==P&&(f.rr_dataURL=y)}}if(m==="img"&&c){Ee||(Ee=t.createElement("canvas"),Xs=Ee.getContext("2d"));let y=s.cloneNode(!0);const C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",P=()=>{y=null},D=()=>{y.removeEventListener("load",D),y.removeEventListener("error",G);try{Ee.width=y.naturalWidth,Ee.height=y.naturalHeight,Xs.drawImage(y,0,0),f.rr_dataURL=Ee.toDataURL(o.type,o.quality)}catch(T){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?D():(y.addEventListener("load",D),y.addEventListener("error",G));return}else console.warn(`Cannot inline img src=${C}! Error: ${T}`)}P()},G=()=>{y.removeEventListener("load",D),y.removeEventListener("error",G),P()};y.complete&&y.naturalWidth!==0?D():(y.addEventListener("load",D),y.addEventListener("error",G))}if(m==="audio"||m==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let S;try{customElements.get(m)&&(S=!0)}catch(y){}return{type:H.Element,tagName:m,attributes:f,childNodes:[],isSVG:Na(s)||void 0,needBlock:g,rootId:d,isCustom:S}}function _(s){return s==null?"":s.toLowerCase()}function Ba(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Xi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(_(s.attributes.name).match(/^msapplication-tile(image|color)$/)||_(s.attributes.name)==="application-name"||_(s.attributes.rel)==="icon"||_(s.attributes.rel)==="apple-touch-icon"||_(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&_(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(_(s.attributes.property).match(/^(og|twitter|fb):/)||_(s.attributes.name).match(/^(og|twitter):/)||_(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(_(s.attributes.name)==="robots"||_(s.attributes.name)==="googlebot"||_(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(_(s.attributes.name)==="author"||_(s.attributes.name)==="generator"||_(s.attributes.name)==="framework"||_(s.attributes.name)==="publisher"||_(s.attributes.name)==="progid"||_(s.attributes.property).match(/^article:/)||_(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(_(s.attributes.name)==="google-site-verification"||_(s.attributes.name)==="yandex-verification"||_(s.attributes.name)==="csrf-token"||_(s.attributes.name)==="p:domain_verify"||_(s.attributes.name)==="verify-v1"||_(s.attributes.name)==="verification"||_(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pe(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:G=!1,cssCaptured:T=!1}=e;let{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=en(s,a,l,V===void 0));const Q=Da(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:D,newlyAddedElement:G,cssCaptured:T});if(!Q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):Ba(Q,d)||!Y&&Q.type===H.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=qe:oe=Ki();const E=Object.assign(Q,{id:oe});if(r.add(s,E),oe===qe)return null;b&&b(s);let ze=!o;if(E.type===H.Element){ze=ze&&!E.needBlock,delete E.needBlock;const j=Z.shadowRoot(s);j&&Ke(j)&&(E.isShadowHost=!0)}if((E.type===H.Document||E.type===H.Element)&&ze){d.headWhitespace&&E.type===H.Element&&E.tagName==="head"&&(Y=!1);const j={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:a,maskTextSelector:l,skipChild:o,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:P,keepIframeSrcFn:D,cssCaptured:!1};if(!(E.type===H.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===H.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(j.cssCaptured=!0);for(const Se of Array.from(Z.childNodes(s))){const ae=Pe(Se,j);ae&&E.childNodes.push(ae)}}let q=null;if(Yi(s)&&(q=Z.shadowRoot(s)))for(const Se of Array.from(Z.childNodes(q))){const ae=Pe(Se,j);ae&&(Ke(q)&&(ae.isShadow=!0),E.childNodes.push(ae))}}const Ge=Z.parentNode(s);return Ge&&Xe(Ge)&&Ke(Ge)&&(E.isShadow=!0),E.type===H.Element&&E.tagName==="iframe"&&Pa(s,()=>{const j=s.contentDocument;if(j&&S){const q=Pe(j,{doc:j,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:P,keepIframeSrcFn:D});q&&S(s,q)}},y),E.type===H.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&Xi(E.attributes.href)==="css")&&La(s,()=>{if(C){const j=Pe(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:P,keepIframeSrcFn:D});j&&C(s,j)}},P),E}function Ua(s,e){const{mirror:t=new Ji,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:P=()=>!1}=e||{};return Pe(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:o,recordCanvas:c,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:P,newlyAddedElement:!1})}function Wa(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function za(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var gs={exports:{}},v=String,tn=function(){return{isColorSupported:!1,reset:v,bold:v,dim:v,italic:v,underline:v,inverse:v,hidden:v,strikethrough:v,black:v,red:v,green:v,yellow:v,blue:v,magenta:v,cyan:v,white:v,gray:v,bgBlack:v,bgRed:v,bgGreen:v,bgYellow:v,bgBlue:v,bgMagenta:v,bgCyan:v,bgWhite:v,blackBright:v,redBright:v,greenBright:v,yellowBright:v,blueBright:v,magentaBright:v,cyanBright:v,whiteBright:v,bgBlackBright:v,bgRedBright:v,bgGreenBright:v,bgYellowBright:v,bgBlueBright:v,bgMagentaBright:v,bgCyanBright:v,bgWhiteBright:v}};gs.exports=tn();gs.exports.createColors=tn;var Ga=gs.exports;const Va={},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),ie=za(ja);let Qs=Ga,qs=ie,Dr=class rn extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,rn)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=Qs.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=Qs.createColors(!0);i=d=>u(p(d)),r=d=>h(d),qs&&(n=d=>qs(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),b=Math.max(this.column+m,this.endColumn+m),S=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
3
- `+y+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
2
+ "use strict";var Wo=Object.defineProperty,Go=Object.defineProperties;var Vo=Object.getOwnPropertyDescriptors;var wt=Object.getOwnPropertySymbols;var Gs=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var Ws=(s,e,t)=>e in s?Wo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))Gs.call(e,t)&&Ws(s,t,e[t]);if(wt)for(var t of wt(e))Vs.call(e,t)&&Ws(s,t,e[t]);return s},ee=(s,e)=>Go(s,Vo(e));var Ee=(s,e)=>{var t={};for(var r in s)Gs.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&wt)for(var r of wt(s))e.indexOf(r)<0&&Vs.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var jo=Object.defineProperty,Ho=(s,e,t)=>e in s?jo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>Ho(s,typeof e!="symbol"?e+"":e,t),js,Yo=Object.defineProperty,Zo=(s,e,t)=>e in s?Yo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Hs=(s,e,t)=>Zo(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const Ys={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bt={},Jo=()=>!!globalThis.Zone;function ms(s){if(bt[s])return bt[s];const e=globalThis[s],t=e.prototype,r=s in Ys?Ys[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in Zs?Zs[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!Jo())return bt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?bt[s]=c:t}catch(l){return t}}const Cr={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(Cr[i])return Cr[i].call(e);const n=ms(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Cr[i]=a,a.call(e)):e[t]}const vr={};function Hi(s,e,t){const r=`${s}.${String(t)}`;if(vr[r])return vr[r].bind(e);const n=ms(s)[t];return typeof n!="function"?e[t]:(vr[r]=n,n.bind(e))}function Xo(s){return we("Node",s,"childNodes")}function Ko(s){return we("Node",s,"parentNode")}function Qo(s){return we("Node",s,"parentElement")}function qo(s){return we("Node",s,"textContent")}function ea(s,e){return Hi("Node",s,"contains")(e)}function ta(s){return Hi("Node",s,"getRootNode")()}function ra(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function sa(s){return s.styleSheets}function ia(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function na(s,e){return we("Element",s,"querySelector")(e)}function oa(s,e){return we("Element",s,"querySelectorAll")(e)}function aa(){return ms("MutationObserver").constructor}function la(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const Y={childNodes:Xo,parentNode:Ko,parentElement:Qo,textContent:qo,contains:ea,getRootNode:ta,host:ra,styleSheets:sa,shadowRoot:ia,querySelector:na,querySelectorAll:oa,mutationObserver:aa,patch:la};function Yi(s){return s.nodeType===s.ELEMENT_NODE}function Ke(s){const e=s&&"host"in s&&"mode"in s&&Y.host(s)||null;return!!(e&&"shadowRoot"in e&&Y.shadowRoot(e)===s)}function Qe(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ua(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ca(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function _r(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Zi(i,t)).join("");return ua(r)}catch(e){return null}}function Zi(s,e){if(fa(s)){let t;try{t=_r(s.styleSheet)||ca(s)}catch(r){t=s.cssText}return s.styleSheet.href?Jt(t,s.styleSheet.href):t}else{let t=s.cssText;return pa(s)&&s.selectorText.includes(":")&&(t=ha(t)),e?Jt(t,e):t}}function ha(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function fa(s){return"styleSheet"in s}function pa(s){return"selectorText"in s}class Ji{constructor(){Hs(this,"idNodeMap",new Map),Hs(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function da(){return new Ji}function Yt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&Re(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function Re(s){return s.toLowerCase()}const Js="__rrweb_original__",ma=25e4;function ga(s){if(s.width*s.height<ma)return s.getContext("2d");const e=document.createElement("canvas");e.width=s.width,e.height=s.height;const t=e.getContext("2d");return t&&t.drawImage(s,0,0),e.getContext("2d",{willReadFrequently:!0})}function ya(s){if(s.width===0||s.height===0)return!0;const e=ga(s);if(!e)return!0;const t=s.width>512||s.height>512?100:50,r=e.getImageData,i=Js in r?r[Js]:r;for(let n=0;n<s.width;n+=t){const a=Math.min(t,s.width-n);for(let l=0;l<s.height;l+=t){const o=Math.min(t,s.height-l),c=new Uint32Array(i.call(e,n,l,a,o).data.buffer);for(let u=0;u<c.length;u++)if(c[u]!==0)return!1}}return!0}function Zt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function Xi(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function wa(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const ba=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Sa=/^(?:[a-z+]+:)?\/\//i,Ca=/^www\..*/i,va=/^(data:)([^,]*),(.*)/i;function Jt(s,e){return(s||"").replace(ba,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(Sa.test(o)||Ca.test(o))return`url(${c}${o}${c})`;if(va.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${wa(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}function St(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ia(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=St(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const c=St(r[o].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let p=c.substring(0,h),d=a.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[o-1].textContent!=="")g=a.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=a.split(p),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=a.indexOf(p));if(d.length>=2&&h>u){const m=r[o-1].textContent;if(m&&typeof m=="string"){const f=St(m).length;g=a.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=St(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),a=a.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/l)):m-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function xa(s,e){return Ia(s,e).join("/* rr_split */")}let Ra=1;const Oa=new RegExp("[^a-z0-9-_:]"),et=-2;function Ki(){return Ra++}function Aa(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return Oa.test(e)?"div":e}let $e,Xs;const Ma=/^[^ \t\n\r\u000c]+/,Ea=/^[, \t\n\r\u000c]+/;function $a(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(Ea),!(t>=e.length);){let n=r(Ma);if(n.slice(-1)===",")n=Pe(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=Pe(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const Ks=new WeakMap;function Pe(s,e){return!e||e.trim()===""?e:gs(s,e)}function Na(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function gs(s,e){let t=Ks.get(s);if(t||(t=s.createElement("a"),Ks.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Qi(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Pe(s,r):t==="srcset"?$a(s,r):t==="style"?Jt(r,gs(s)):e==="object"&&t==="data"?Pe(s,r):r)}function qi(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ka(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function Xt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Xt(Y.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Xt(Y.parentNode(s),e,t):!1}function en(s,e,t,r){let i;if(Yi(s)){if(i=s,!Y.childNodes(i).length)return!1}else{if(Y.parentElement(s)===null)return!1;i=Y.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Xt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Pa(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function La(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function _a(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:a,inlineStylesheet:l,maskInputOptions:o={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,y=Da(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Fa(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:o,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:y});case s.TEXT_NODE:return Ta(s,{doc:t,needsMask:a,maskTextFn:c,rootId:y,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:H.Comment,textContent:Y.textContent(s)||"",rootId:y};default:return!1}}function Da(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Ta(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Y.parentNode(s),l=a&&a.tagName;let o="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?o="SCRIPT_PLACEHOLDER":n||(o=Y.textContent(s),c&&o&&(o=Jt(o,gs(e.doc)))),!c&&!u&&o&&t&&(o=r?r(o,Y.parentElement(s)):o.replace(/[\S]/g,"*")),{type:H.Text,textContent:o||"",rootId:i}}function Fa(s,e){const t=performance.now(),{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:o,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:d=!1,rootId:g}=e,m=ka(s,i,n),f=Aa(s);let y={};const S=s.attributes.length;for(let b=0;b<S;b++){const v=s.attributes[b];qi(f,v.name,v.value)||(y[v.name]=Qi(r,f,Re(v.name),v.value))}if(f==="link"&&a){const b=Array.from(r.styleSheets).find(W=>W.href===s.href);let v=null;b&&(v=_r(b)),v&&(delete y.rel,delete y.href,y._cssText=v)}if(f==="style"&&s.sheet){let b=_r(s.sheet);b&&(s.childNodes.length>1&&(b=xa(b,s)),y._cssText=b)}if(f==="input"||f==="textarea"||f==="select"){const b=s.value,v=s.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&b?y.value=Yt({element:s,type:Zt(s),tagName:f,value:b,maskInputOptions:l,maskInputFn:o}):v&&(y.checked=v)}if(f==="option"&&(s.selected&&!l.select?y.selected=!0:delete y.selected),f==="dialog"&&s.open&&(y.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(s.__context==="2d")ya(s)||(y.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const b=s.toDataURL(c.type,c.quality),v=r.createElement("canvas");v.width=s.width,v.height=s.height;const W=v.toDataURL(c.type,c.quality);b!==W&&(y.rr_dataURL=b)}}if(f==="img"&&u){$e||($e=r.createElement("canvas"),Xs=$e.getContext("2d"));let b=s.cloneNode(!0);const v=b.currentSrc||b.getAttribute("src")||"<unknown-src>",W=()=>{b=null},k=()=>{b.removeEventListener("load",k),b.removeEventListener("error",B);try{$e.width=b.naturalWidth,$e.height=b.naturalHeight,Xs.drawImage(b,0,0),y.rr_dataURL=$e.toDataURL(c.type,c.quality)}catch(V){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?k():(b.addEventListener("load",k),b.addEventListener("error",B));return}else console.warn(`Cannot inline img src=${v}! Error: ${V}`)}W()},B=()=>{b.removeEventListener("load",k),b.removeEventListener("error",B),W()};b.complete&&b.naturalWidth!==0?k():(b.addEventListener("load",k),b.addEventListener("error",B))}if(f==="audio"||f==="video"){const b=y;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume}if(d||(s.scrollLeft&&(y.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(y.rr_scrollTop=s.scrollTop)),m){const{width:b,height:v}=s.getBoundingClientRect();y={class:y.class,rr_width:`${b}px`,rr_height:`${v}px`}}f==="iframe"&&!p(y.src)&&(s.contentDocument||(y.rr_src=y.src),delete y.src);let C;try{customElements.get(f)&&(C=!0)}catch(b){}const T=performance.now()-t;return f in window.serialization_perf_map||(window.serialization_perf_map[f]={avg:0,times:[]}),window.serialization_perf_map[f].times.push(T),window.serialization_perf_map[f].times.length>1e3&&window.serialization_perf_map[f].times.shift(),window.serialization_perf_map[f].avg=window.serialization_perf_map[f].times.reduce((b,v)=>b+v,0)/window.serialization_perf_map[f].times.length,{type:H.Element,tagName:f,attributes:y,childNodes:[],isSVG:Na(s)||void 0,needBlock:m,rootId:g,isCustom:C}}function F(s){return s==null?"":s.toLowerCase()}function Ba(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Xi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(F(s.attributes.name).match(/^msapplication-tile(image|color)$/)||F(s.attributes.name)==="application-name"||F(s.attributes.rel)==="icon"||F(s.attributes.rel)==="apple-touch-icon"||F(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&F(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(F(s.attributes.property).match(/^(og|twitter|fb):/)||F(s.attributes.name).match(/^(og|twitter):/)||F(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(F(s.attributes.name)==="robots"||F(s.attributes.name)==="googlebot"||F(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(F(s.attributes.name)==="author"||F(s.attributes.name)==="generator"||F(s.attributes.name)==="framework"||F(s.attributes.name)==="publisher"||F(s.attributes.name)==="progid"||F(s.attributes.property).match(/^article:/)||F(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(F(s.attributes.name)==="google-site-verification"||F(s.attributes.name)==="yandex-verification"||F(s.attributes.name)==="csrf-token"||F(s.attributes.name)==="p:domain_verify"||F(s.attributes.name)==="verify-v1"||F(s.attributes.name)==="verification"||F(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Le(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:C=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:v=()=>!1,newlyAddedElement:W=!1,cssCaptured:k=!1}=e;let{needsMask:B}=e,{preserveWhiteSpace:V=!0}=e;B||(B=en(s,a,l,B===void 0));const Q=_a(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:B,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:v,newlyAddedElement:W,cssCaptured:k});if(!Q)return console.warn(s,"not serialized"),null;let ne;r.hasNode(s)?ne=r.getId(s):Ba(Q,d)||!V&&Q.type===H.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?ne=et:ne=Ki();const N=Object.assign(Q,{id:ne});if(r.add(s,N),ne===et)return null;y&&y(s);let Ge=!o;if(N.type===H.Element){Ge=Ge&&!N.needBlock,delete N.needBlock;const j=Y.shadowRoot(s);j&&Qe(j)&&(N.isShadowHost=!0)}if((N.type===H.Document||N.type===H.Element)&&Ge){d.headWhitespace&&N.type===H.Element&&N.tagName==="head"&&(V=!1);const j={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:B,maskTextClass:a,maskTextSelector:l,skipChild:o,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:T,stylesheetLoadTimeout:b,keepIframeSrcFn:v,cssCaptured:!1};if(!(N.type===H.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===H.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(j.cssCaptured=!0);for(const ge of Array.from(Y.childNodes(s))){const oe=Le(ge,j);oe&&N.childNodes.push(oe)}}let q=null;if(Yi(s)&&(q=Y.shadowRoot(s))){const ge=Y.childNodes(q);for(let oe=0;oe<ge.length;oe++){const mt=ge[oe],Ce=Le(mt,j);Ce&&(Qe(q)&&(Ce.isShadow=!0),N.childNodes.push(Ce))}}}const Ve=Y.parentNode(s);return Ve&&Ke(Ve)&&Qe(Ve)&&(N.isShadow=!0),N.type===H.Element&&N.tagName==="iframe"&&Pa(s,()=>{const j=s.contentDocument;if(j&&S){const q=Le(j,{doc:j,mirror:r,blockClass:i,blockSelector:n,needsMask:B,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:T,stylesheetLoadTimeout:b,keepIframeSrcFn:v});q&&S(s,q)}},C),N.type===H.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Xi(N.attributes.href)==="css")&&La(s,()=>{if(T){const j=Le(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:B,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:V,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:T,stylesheetLoadTimeout:b,keepIframeSrcFn:v});j&&T(s,j)}},b),N}function Ua(s,e){const{mirror:t=new Ji,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:b=()=>!1}=e||{};return Le(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:o,recordCanvas:c,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:T,keepIframeSrcFn:b,newlyAddedElement:!1})}function za(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Wa(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ys={exports:{}},I=String,tn=function(){return{isColorSupported:!1,reset:I,bold:I,dim:I,italic:I,underline:I,inverse:I,hidden:I,strikethrough:I,black:I,red:I,green:I,yellow:I,blue:I,magenta:I,cyan:I,white:I,gray:I,bgBlack:I,bgRed:I,bgGreen:I,bgYellow:I,bgBlue:I,bgMagenta:I,bgCyan:I,bgWhite:I,blackBright:I,redBright:I,greenBright:I,yellowBright:I,blueBright:I,magentaBright:I,cyanBright:I,whiteBright:I,bgBlackBright:I,bgRedBright:I,bgGreenBright:I,bgYellowBright:I,bgBlueBright:I,bgMagentaBright:I,bgCyanBright:I,bgWhiteBright:I}};ys.exports=tn();ys.exports.createColors=tn;var Ga=ys.exports;const Va={},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),se=Wa(ja);let Qs=Ga,qs=se,Dr=class rn extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,rn)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=Qs.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=Qs.createColors(!0);i=d=>u(p(d)),r=d=>h(d),qs&&(n=d=>qs(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),y=Math.max(this.column+m,this.endColumn+m),S=u.slice(f,y),C=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
3
+ `+C+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
4
4
  `+g+i("^")}return" "+r(d)+n(u)}).join(`
5
5
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
6
6
 
7
7
  `+e+`
8
- `),this.name+": "+this.message+e}};var ys=Dr;Dr.default=Dr;const ei={after:`
8
+ `),this.name+": "+this.message+e}};var ws=Dr;Dr.default=Dr;const ei={after:`
9
9
  `,beforeClose:`
10
10
  `,beforeComment:`
11
11
  `,beforeDecl:`
@@ -16,46 +16,46 @@
16
16
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
17
17
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
18
18
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
19
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var sn=Tr;Tr.default=Tr;let Ya=sn;function _r(s,e){new Ya(e).stringify(s)}var or=_r;_r.default=_r;var ut={};ut.isClean=Symbol("isClean");ut.my=Symbol("my");let Za=ys,Ja=sn,Xa=or,{isClean:Ve,my:Ka}=ut;function Fr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>Fr(a,t)):(n==="object"&&i!==null&&(i=Fr(i)),t[r]=i)}return t}function he(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
20
- `?(t=1,r+=1):t+=1}return i}let Br=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ve]=!1,this[Ka]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Fr(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Za(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Ve]=!0}markDirty(){if(this[Ve]){this[Ve]=!1;let e=this;for(;e=e.parent;)e[Ve]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(he(r,this.source.start),he(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=he(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
21
- `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:he(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:he(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:he(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new Ja().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Xa){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var ar=Br;Br.default=Br;let Qa=ar,Ur=class extends Qa{constructor(e){super(e),this.type="comment"}};var lr=Ur;Ur.default=Ur;let qa=ar,Wr=class extends qa{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(O({},e),{value:String(e.value)})),super(e),this.type="decl"}};var ur=Wr;Wr.default=Wr;let nn=lr,on=ur,el=ar,{isClean:an,my:ln}=ut,ws,un,cn,bs;function hn(s){return s.map(e=>(e.nodes&&(e.nodes=hn(e.nodes)),delete e.source,e))}function fn(s){if(s[an]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)fn(e)}let de=class pn extends el{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=hn(un(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new on(e)]}else if(e.selector||e.selectors)e=[new bs(e)];else if(e.name)e=[new ws(e)];else if(e.text)e=[new nn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ln]||pn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[an]&&fn(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};de.registerParse=s=>{un=s};de.registerRule=s=>{bs=s};de.registerAtRule=s=>{ws=s};de.registerRoot=s=>{cn=s};var Re=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ws.prototype):s.type==="rule"?Object.setPrototypeOf(s,bs.prototype):s.type==="decl"?Object.setPrototypeOf(s,on.prototype):s.type==="comment"?Object.setPrototypeOf(s,nn.prototype):s.type==="root"&&Object.setPrototypeOf(s,cn.prototype),s[ln]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};let dn=Re,Jt=class extends dn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ss=Jt;Jt.default=Jt;dn.registerAtRule(Jt);let tl=Re,mn,gn,et=class extends tl{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new mn(new gn,this,e).stringify()}};et.registerLazyResult=s=>{mn=s};et.registerProcessor=s=>{gn=s};var Cs=et;et.default=et;let rl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",sl=(s=21)=>{let e="",t=s|0;for(;t--;)e+=rl[Math.random()*64|0];return e};var il={nanoid:sl};let{existsSync:nl,readFileSync:ol}=ie,{dirname:vr,join:al}=ie,{SourceMapConsumer:ti,SourceMapGenerator:ri}=ie;function ll(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let zr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=vr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ti(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return ll(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=vr(e),nl(e))return this.mapFile=e,ol(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof ti)return ri.fromSourceMap(t).toString();if(t instanceof ri)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=al(vr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var yn=zr;zr.default=zr;let{nanoid:ul}=il,{isAbsolute:Gr,resolve:Vr}=ie,{SourceMapConsumer:cl,SourceMapGenerator:hl}=ie,{fileURLToPath:si,pathToFileURL:bt}=ie,ii=ys,fl=yn,Ir=ie,xr=Symbol("lineToIndexCache"),pl=!!(cl&&hl),ni=!!(Vr&&Gr);function oi(s){if(s[xr])return s[xr];let e=s.css.split(`
22
- `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[xr]=t,t}let Xt=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.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,t.document&&(this.document=t.document.toString()),t.from&&(!ni||/^\w+:\/\//.test(t.from)||Gr(t.from)?this.file=t.from:this.file=Vr(t.from)),ni&&pl){let r=new fl(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ul(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,c;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){o=h.offset;let d=this.fromOffset(o);t=d.line,r=d.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){l=p.offset;let d=this.fromOffset(l);a=d.line,n=d.col}else a=p.line,n=p.column,l=this.fromLineAndColumn(p.line,p.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let u=this.origin(t,r,a,n);return u?c=new ii(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new ii(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),c.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(bt&&(c.input.url=bt(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return oi(this)[e-1]+t-1}fromOffset(e){let t=oi(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Vr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;Gr(a.source)?o=bt(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||bt(this.map.mapFile));let c={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(si)c.file=si(o);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(a.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var cr=Xt;Xt.default=Xt;Ir&&Ir.registerInput&&Ir.registerInput(Xt);let wn=Re,bn,Sn,De=class extends wn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new bn(new Sn,this,e).stringify()}};De.registerLazyResult=s=>{bn=s};De.registerProcessor=s=>{Sn=s};var ct=De;De.default=De;wn.registerRoot(De);let tt={comma(s){return tt.split(s,[","],!0)},space(s){let e=[" ",`
23
- `," "];return tt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:l?u===o&&(l=!1):u==='"'||u==="'"?(l=!0,o=u):u==="("?a+=1:u===")"?a>0&&(a-=1):a===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var Cn=tt;tt.default=tt;let vn=Re,dl=Cn,Kt=class extends vn{get selectors(){return dl.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var vs=Kt;Kt.default=Kt;vn.registerRule(Kt);let ml=Ss,gl=lr,yl=ur,wl=cr,bl=yn,Sl=ct,Cl=vs;function rt(s,e){if(Array.isArray(s))return s.map(a=>rt(a));let i=s,{inputs:t}=i,r=Me(i,["inputs"]);if(t){e=[];for(let a of t){let l=ee(O({},a),{__proto__:wl.prototype});l.map&&(l.map=ee(O({},l.map),{__proto__:bl.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>rt(a,e))),r.source){let n=r.source,{inputId:a}=n,l=Me(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Sl(r);if(r.type==="decl")return new yl(r);if(r.type==="rule")return new Cl(r);if(r.type==="comment")return new gl(r);if(r.type==="atrule")return new ml(r);throw new Error("Unknown node type: "+s.type)}var vl=rt;rt.default=rt;let{dirname:Bt,relative:In,resolve:xn,sep:Rn}=ie,{SourceMapConsumer:On,SourceMapGenerator:Ut}=ie,{pathToFileURL:ai}=ie,Il=cr,xl=!!(On&&Ut),Rl=!!(Bt&&xn&&In&&Rn),Ol=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
19
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var sn=Tr;Tr.default=Tr;let Ya=sn;function Fr(s,e){new Ya(e).stringify(s)}var lr=Fr;Fr.default=Fr;var ct={};ct.isClean=Symbol("isClean");ct.my=Symbol("my");let Za=ws,Ja=sn,Xa=lr,{isClean:je,my:Ka}=ct;function Br(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>Br(a,t)):(n==="object"&&i!==null&&(i=Br(i)),t[r]=i)}return t}function he(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
20
+ `?(t=1,r+=1):t+=1}return i}let Ur=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[je]=!1,this[Ka]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Br(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Za(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[je]=!0}markDirty(){if(this[je]){this[je]=!1;let e=this;for(;e=e.parent;)e[je]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(he(r,this.source.start),he(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=he(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
21
+ `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:he(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:he(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:he(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new Ja().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Xa){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var ur=Ur;Ur.default=Ur;let Qa=ur,zr=class extends Qa{constructor(e){super(e),this.type="comment"}};var cr=zr;zr.default=zr;let qa=ur,Wr=class extends qa{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var hr=Wr;Wr.default=Wr;let nn=cr,on=hr,el=ur,{isClean:an,my:ln}=ct,bs,un,cn,Ss;function hn(s){return s.map(e=>(e.nodes&&(e.nodes=hn(e.nodes)),delete e.source,e))}function fn(s){if(s[an]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)fn(e)}let de=class pn extends el{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=hn(un(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new on(e)]}else if(e.selector||e.selectors)e=[new Ss(e)];else if(e.name)e=[new bs(e)];else if(e.text)e=[new nn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ln]||pn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[an]&&fn(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};de.registerParse=s=>{un=s};de.registerRule=s=>{Ss=s};de.registerAtRule=s=>{bs=s};de.registerRoot=s=>{cn=s};var Oe=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,bs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ss.prototype):s.type==="decl"?Object.setPrototypeOf(s,on.prototype):s.type==="comment"?Object.setPrototypeOf(s,nn.prototype):s.type==="root"&&Object.setPrototypeOf(s,cn.prototype),s[ln]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};let dn=Oe,Kt=class extends dn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Cs=Kt;Kt.default=Kt;dn.registerAtRule(Kt);let tl=Oe,mn,gn,tt=class extends tl{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new mn(new gn,this,e).stringify()}};tt.registerLazyResult=s=>{mn=s};tt.registerProcessor=s=>{gn=s};var vs=tt;tt.default=tt;let rl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",sl=(s=21)=>{let e="",t=s|0;for(;t--;)e+=rl[Math.random()*64|0];return e};var il={nanoid:sl};let{existsSync:nl,readFileSync:ol}=se,{dirname:Ir,join:al}=se,{SourceMapConsumer:ti,SourceMapGenerator:ri}=se;function ll(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Gr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ir(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ti(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return ll(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ir(e),nl(e))return this.mapFile=e,ol(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof ti)return ri.fromSourceMap(t).toString();if(t instanceof ri)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=al(Ir(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var yn=Gr;Gr.default=Gr;let{nanoid:ul}=il,{isAbsolute:Vr,resolve:jr}=se,{SourceMapConsumer:cl,SourceMapGenerator:hl}=se,{fileURLToPath:si,pathToFileURL:Ct}=se,ii=ws,fl=yn,xr=se,Rr=Symbol("lineToIndexCache"),pl=!!(cl&&hl),ni=!!(jr&&Vr);function oi(s){if(s[Rr])return s[Rr];let e=s.css.split(`
22
+ `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[Rr]=t,t}let Qt=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.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,t.document&&(this.document=t.document.toString()),t.from&&(!ni||/^\w+:\/\//.test(t.from)||Vr(t.from)?this.file=t.from:this.file=jr(t.from)),ni&&pl){let r=new fl(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ul(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,c;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){o=h.offset;let d=this.fromOffset(o);t=d.line,r=d.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){l=p.offset;let d=this.fromOffset(l);a=d.line,n=d.col}else a=p.line,n=p.column,l=this.fromLineAndColumn(p.line,p.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let u=this.origin(t,r,a,n);return u?c=new ii(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new ii(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),c.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Ct&&(c.input.url=Ct(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return oi(this)[e-1]+t-1}fromOffset(e){let t=oi(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:jr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;Vr(a.source)?o=Ct(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Ct(this.map.mapFile));let c={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(si)c.file=si(o);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(a.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var fr=Qt;Qt.default=Qt;xr&&xr.registerInput&&xr.registerInput(Qt);let wn=Oe,bn,Sn,De=class extends wn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new bn(new Sn,this,e).stringify()}};De.registerLazyResult=s=>{bn=s};De.registerProcessor=s=>{Sn=s};var ht=De;De.default=De;wn.registerRoot(De);let rt={comma(s){return rt.split(s,[","],!0)},space(s){let e=[" ",`
23
+ `," "];return rt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:l?u===o&&(l=!1):u==='"'||u==="'"?(l=!0,o=u):u==="("?a+=1:u===")"?a>0&&(a-=1):a===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var Cn=rt;rt.default=rt;let vn=Oe,dl=Cn,qt=class extends vn{get selectors(){return dl.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Is=qt;qt.default=qt;vn.registerRule(qt);let ml=Cs,gl=cr,yl=hr,wl=fr,bl=yn,Sl=ht,Cl=Is;function st(s,e){if(Array.isArray(s))return s.map(a=>st(a));let i=s,{inputs:t}=i,r=Ee(i,["inputs"]);if(t){e=[];for(let a of t){let l=ee(M({},a),{__proto__:wl.prototype});l.map&&(l.map=ee(M({},l.map),{__proto__:bl.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>st(a,e))),r.source){let n=r.source,{inputId:a}=n,l=Ee(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Sl(r);if(r.type==="decl")return new yl(r);if(r.type==="rule")return new Cl(r);if(r.type==="comment")return new gl(r);if(r.type==="atrule")return new ml(r);throw new Error("Unknown node type: "+s.type)}var vl=st;st.default=st;let{dirname:zt,relative:In,resolve:xn,sep:Rn}=se,{SourceMapConsumer:On,SourceMapGenerator:Wt}=se,{pathToFileURL:ai}=se,Il=fr,xl=!!(On&&Wt),Rl=!!(zt&&xn&&In&&Rn),Ol=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
24
24
  `;this.css.includes(`\r
25
25
  `)&&(t=`\r
26
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Bt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new On(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Rl&&xl&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ut.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ut({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 Ut({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,c)=>{if(this.css+=l,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
27
- `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Bt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Bt(xn(r,this.mapOpts.annotation)));let i=In(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Il(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ai){let r=ai(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Rn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var An=Ol;const Rr=39,li=34,St=92,ui=47,Ct=10,je=32,vt=12,It=9,xt=13,Al=91,Ml=93,El=40,$l=41,Nl=123,kl=125,Pl=59,Ll=42,Dl=58,Tl=64,Rt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ot=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_l=/.[\r\n"'(/\\]/,ci=/[\da-f]/i;var Fl=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,b=[],S=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function P(){return S.length===0&&f>=m}function D(T){if(S.length)return S.pop();if(f>=m)return;let V=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ct:case je:case It:case xt:case vt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===je||n===Ct||n===It||n===xt||n===vt);u=["space",r.slice(f,o)],f=o-1;break}case Al:case Ml:case Nl:case kl:case Dl:case Pl:case $l:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case El:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Rr&&d!==li&&d!==je&&d!==Ct&&d!==It&&d!==vt&&d!==xt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===St;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||_l.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Rr:case li:{c=n===Rr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||V){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===St;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Tl:{Rt.lastIndex=f+1,Rt.test(r),Rt.lastIndex===0?o=r.length-1:o=Rt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case St:{for(o=f,l=!0;r.charCodeAt(o+1)===St;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==ui&&n!==je&&n!==Ct&&n!==It&&n!==xt&&n!==vt&&(o+=1,ci.test(r.charAt(o)))){for(;ci.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===je&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===ui&&r.charCodeAt(f+1)===Ll?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Ot.lastIndex=f+1,Ot.test(r),Ot.lastIndex===0?o=r.length-1:o=Ot.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function G(T){S.push(T)}return{back:G,endOfFile:P,nextToken:D,position:y}};let Bl=Ss,Ul=lr,Wl=ur,zl=ct,hi=vs,Gl=Fl;const fi={empty:!0,space:!0};function Vl(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let jl=class{constructor(e){this.input=e,this.root=new zl,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Bl;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new Ul;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Gl(this.input)}decl(e,t){let r=new Wl;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Vl(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new hi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!fi[h]&&!fi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new hi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Hl=jl;let Yl=Re,Zl=cr,Jl=Hl;function Qt(s,e){let t=new Zl(s,e),r=new Jl(t);try{r.parse()}catch(i){throw i}return r.root}var Is=Qt;Qt.default=Qt;Yl.registerParse(Qt);let jr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Mn=jr;jr.default=jr;let Xl=Mn,Hr=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Xl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var xs=Hr;Hr.default=Hr;let Kl=Re,Ql=Cs,ql=An,eu=Is,pi=xs,tu=ct,ru=or,{isClean:ue,my:su}=ut;const iu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},nu={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},ou={Once:!0,postcssPlugin:!0,prepare:!0},Te=0;function He(s){return typeof s=="object"&&typeof s.then=="function"}function En(s){let e=!1,t=iu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Te,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Te,t+"Exit"]:[t,t+"Exit"]}function di(s){let e;return s.type==="document"?e=["Document",Te,"DocumentExit"]:s.type==="root"?e=["Root",Te,"RootExit"]:e=En(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Yr(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>Yr(e)),s}let Zr={},_e=class $n{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Yr(t);else if(t instanceof $n||t instanceof pi)i=Yr(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=eu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[su]&&Kl.rebuild(i)}this.result=new pi(e,i,r),this.helpers=ee(O({},Zr),{postcss:Zr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!nu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ou[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(He(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[di(e)];for(;t.length>0;){let r=this.visitTick(t);if(He(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return He(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ru;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new ql(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(He(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(He(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ue]){l[ue]=!0,e.push(di(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Te){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ue]=!0;let t=En(e);for(let r of t)if(r===Te)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};_e.registerPostcss=s=>{Zr=s};var Nn=_e;_e.default=_e;tu.registerLazyResult(_e);Ql.registerLazyResult(_e);let au=An,lu=Is;const uu=xs;let cu=or;let Jr=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=lu;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=cu;this.result=new uu(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new au(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var hu=Jr;Jr.default=Jr;let fu=Cs,pu=Nn,du=hu,mu=ct,st=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new du(this,e,t):new pu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var gu=st;st.default=st;mu.registerProcessor(st);fu.registerProcessor(st);let kn=Ss,Pn=lr,yu=Re,wu=ys,Ln=ur,Dn=Cs,bu=vl,Su=cr,Cu=Nn,vu=Cn,Iu=ar,xu=Is,Rs=gu,Ru=xs,Tn=ct,_n=vs,Ou=or,Au=Mn;function N(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Rs(s)}N.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
26
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||zt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new On(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Rl&&xl&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Wt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Wt({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 Wt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,c)=>{if(this.css+=l,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
27
+ `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?zt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=zt(xn(r,this.mapOpts.annotation)));let i=In(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Il(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ai){let r=ai(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Rn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var An=Ol;const Or=39,li=34,vt=92,ui=47,It=10,He=32,xt=12,Rt=9,Ot=13,Al=91,Ml=93,El=40,$l=41,Nl=123,kl=125,Pl=59,Ll=42,_l=58,Dl=64,At=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Tl=/.[\r\n"'(/\\]/,ci=/[\da-f]/i;var Fl=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,y=[],S=[];function C(){return f}function T(k){throw e.error("Unclosed "+k,f)}function b(){return S.length===0&&f>=m}function v(k){if(S.length)return S.pop();if(f>=m)return;let B=k?k.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case It:case He:case Rt:case Ot:case xt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===He||n===It||n===Rt||n===Ot||n===xt);u=["space",r.slice(f,o)],f=o-1;break}case Al:case Ml:case Nl:case kl:case _l:case Pl:case $l:{let V=String.fromCharCode(n);u=[V,V,f];break}case El:{if(g=y.length?y.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Or&&d!==li&&d!==He&&d!==It&&d!==Rt&&d!==xt&&d!==Ot){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||B){o=f;break}else T("bracket");for(p=o;r.charCodeAt(p-1)===vt;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Tl.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Or:case li:{c=n===Or?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||B){o=f+1;break}else T("string");for(p=o;r.charCodeAt(p-1)===vt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Dl:{At.lastIndex=f+1,At.test(r),At.lastIndex===0?o=r.length-1:o=At.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case vt:{for(o=f,l=!0;r.charCodeAt(o+1)===vt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==ui&&n!==He&&n!==It&&n!==Rt&&n!==Ot&&n!==xt&&(o+=1,ci.test(r.charAt(o)))){for(;ci.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===He&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===ui&&r.charCodeAt(f+1)===Ll?(o=r.indexOf("*/",f+2)+1,o===0&&(i||B?o=r.length:T("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Mt.lastIndex=f+1,Mt.test(r),Mt.lastIndex===0?o=r.length-1:o=Mt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],y.push(u),f=o);break}}return f++,u}function W(k){S.push(k)}return{back:W,endOfFile:b,nextToken:v,position:C}};let Bl=Cs,Ul=cr,zl=hr,Wl=ht,hi=Is,Gl=Fl;const fi={empty:!0,space:!0};function Vl(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let jl=class{constructor(e){this.input=e,this.root=new Wl,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Bl;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new Ul;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Gl(this.input)}decl(e,t){let r=new zl;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Vl(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new hi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!fi[h]&&!fi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new hi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Hl=jl;let Yl=Oe,Zl=fr,Jl=Hl;function er(s,e){let t=new Zl(s,e),r=new Jl(t);try{r.parse()}catch(i){throw i}return r.root}var xs=er;er.default=er;Yl.registerParse(er);let Hr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Mn=Hr;Hr.default=Hr;let Xl=Mn,Yr=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Xl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Rs=Yr;Yr.default=Yr;let Kl=Oe,Ql=vs,ql=An,eu=xs,pi=Rs,tu=ht,ru=lr,{isClean:le,my:su}=ct;const iu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},nu={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},ou={Once:!0,postcssPlugin:!0,prepare:!0},Te=0;function Ye(s){return typeof s=="object"&&typeof s.then=="function"}function En(s){let e=!1,t=iu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Te,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Te,t+"Exit"]:[t,t+"Exit"]}function di(s){let e;return s.type==="document"?e=["Document",Te,"DocumentExit"]:s.type==="root"?e=["Root",Te,"RootExit"]:e=En(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Zr(s){return s[le]=!1,s.nodes&&s.nodes.forEach(e=>Zr(e)),s}let Jr={},Fe=class $n{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Zr(t);else if(t instanceof $n||t instanceof pi)i=Zr(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=eu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[su]&&Kl.rebuild(i)}this.result=new pi(e,i,r),this.helpers=ee(M({},Jr),{postcss:Jr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!nu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ou[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ye(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];){e[le]=!0;let t=[di(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ye(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ye(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ru;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new ql(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ye(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];)e[le]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ye(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[le]){l[le]=!0,e.push(di(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Te){r.nodes&&r.nodes.length&&(r[le]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[le]=!0;let t=En(e);for(let r of t)if(r===Te)e.nodes&&e.each(i=>{i[le]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Fe.registerPostcss=s=>{Jr=s};var Nn=Fe;Fe.default=Fe;tu.registerLazyResult(Fe);Ql.registerLazyResult(Fe);let au=An,lu=xs;const uu=Rs;let cu=lr;let Xr=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=lu;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=cu;this.result=new uu(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new au(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var hu=Xr;Xr.default=Xr;let fu=vs,pu=Nn,du=hu,mu=ht,it=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new du(this,e,t):new pu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var gu=it;it.default=it;mu.registerProcessor(it);fu.registerProcessor(it);let kn=Cs,Pn=cr,yu=Oe,wu=ws,Ln=hr,_n=vs,bu=vl,Su=fr,Cu=Nn,vu=Cn,Iu=ur,xu=xs,Os=gu,Ru=Rs,Dn=ht,Tn=Is,Ou=lr,Au=Mn;function L(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Os(s)}L.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
28
28
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
29
- https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Rs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return N([i(o)]).process(a,l)},i};N.stringify=Ou;N.parse=xu;N.fromJSON=bu;N.list=vu;N.comment=s=>new Pn(s);N.atRule=s=>new kn(s);N.decl=s=>new Ln(s);N.rule=s=>new _n(s);N.root=s=>new Tn(s);N.document=s=>new Dn(s);N.CssSyntaxError=wu;N.Declaration=Ln;N.Container=yu;N.Processor=Rs;N.Document=Dn;N.Comment=Pn;N.Warning=Au;N.AtRule=kn;N.Result=Ru;N.Input=Su;N.Rule=_n;N.Root=Tn;N.Node=Iu;Cu.registerPostcss(N);var Mu=N;N.default=N;const F=Wa(Mu);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var Eu=Object.defineProperty,$u=(s,e,t)=>e in s?Eu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>$u(s,typeof e!="symbol"?e+"":e,t);function Nu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ku(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Os={exports:{}},I=String,Fn=function(){return{isColorSupported:!1,reset:I,bold:I,dim:I,italic:I,underline:I,inverse:I,hidden:I,strikethrough:I,black:I,red:I,green:I,yellow:I,blue:I,magenta:I,cyan:I,white:I,gray:I,bgBlack:I,bgRed:I,bgGreen:I,bgYellow:I,bgBlue:I,bgMagenta:I,bgCyan:I,bgWhite:I,blackBright:I,redBright:I,greenBright:I,yellowBright:I,blueBright:I,magentaBright:I,cyanBright:I,whiteBright:I,bgBlackBright:I,bgRedBright:I,bgGreenBright:I,bgYellowBright:I,bgBlueBright:I,bgMagentaBright:I,bgCyanBright:I,bgWhiteBright:I}};Os.exports=Fn();Os.exports.createColors=Fn;var Pu=Os.exports;const Lu={},Du=Object.freeze(Object.defineProperty({__proto__:null,default:Lu},Symbol.toStringTag,{value:"Module"})),ne=ku(Du);let mi=Pu,gi=ne,Xr=class Bn extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Bn)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=mi.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=mi.createColors(!0);i=d=>u(p(d)),r=d=>h(d),gi&&(n=d=>gi(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),b=Math.max(this.column+m,this.endColumn+m),S=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
30
- `+y+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
29
+ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Os().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return L([i(o)]).process(a,l)},i};L.stringify=Ou;L.parse=xu;L.fromJSON=bu;L.list=vu;L.comment=s=>new Pn(s);L.atRule=s=>new kn(s);L.decl=s=>new Ln(s);L.rule=s=>new Tn(s);L.root=s=>new Dn(s);L.document=s=>new _n(s);L.CssSyntaxError=wu;L.Declaration=Ln;L.Container=yu;L.Processor=Os;L.Document=_n;L.Comment=Pn;L.Warning=Au;L.AtRule=kn;L.Result=Ru;L.Input=Su;L.Rule=Tn;L.Root=Dn;L.Node=Iu;Cu.registerPostcss(L);var Mu=L;L.default=L;const U=za(Mu);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;var Eu=Object.defineProperty,$u=(s,e,t)=>e in s?Eu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>$u(s,typeof e!="symbol"?e+"":e,t);function Nu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ku(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var As={exports:{}},x=String,Fn=function(){return{isColorSupported:!1,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};As.exports=Fn();As.exports.createColors=Fn;var Pu=As.exports;const Lu={},_u=Object.freeze(Object.defineProperty({__proto__:null,default:Lu},Symbol.toStringTag,{value:"Module"})),ie=ku(_u);let mi=Pu,gi=ie,Kr=class Bn extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Bn)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=mi.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=mi.createColors(!0);i=d=>u(p(d)),r=d=>h(d),gi&&(n=d=>gi(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),y=Math.max(this.column+m,this.endColumn+m),S=u.slice(f,y),C=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
30
+ `+C+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
31
31
  `+g+i("^")}return" "+r(d)+n(u)}).join(`
32
32
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
33
33
 
34
34
  `+e+`
35
- `),this.name+": "+this.message+e}};var As=Xr;Xr.default=Xr;const yi={after:`
35
+ `),this.name+": "+this.message+e}};var Ms=Kr;Kr.default=Kr;const yi={after:`
36
36
  `,beforeClose:`
37
37
  `,beforeComment:`
38
38
  `,beforeDecl:`
39
39
  `,beforeOpen:" ",beforeRule:`
40
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Tu(s){return s[0].toUpperCase()+s.slice(1)}let Kr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
41
- `)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],a=this.raw(n,"before");a&&this.builder(a),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return yi[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Tu(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=yi[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
40
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Du(s){return s[0].toUpperCase()+s.slice(1)}let Qr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
41
+ `)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],a=this.raw(n,"before");a&&this.builder(a),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return yi[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Du(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=yi[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
42
42
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
43
43
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
44
44
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
45
45
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
46
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Un=Kr;Kr.default=Kr;let _u=Un;function Qr(s,e){new _u(e).stringify(s)}var hr=Qr;Qr.default=Qr;var ht={};ht.isClean=Symbol("isClean");ht.my=Symbol("my");let Fu=As,Bu=Un,Uu=hr,{isClean:Ye,my:Wu}=ht;function qr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>qr(a,t)):(n==="object"&&i!==null&&(i=qr(i)),t[r]=i)}return t}function fe(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
47
- `?(t=1,r+=1):t+=1}return i}let es=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ye]=!1,this[Wu]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=qr(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Fu(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Ye]=!0}markDirty(){if(this[Ye]){this[Ye]=!1;let e=this;for(;e=e.parent;)e[Ye]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(fe(r,this.source.start),fe(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=fe(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
48
- `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:fe(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:fe(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(fe(t,this.source.start),fe(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:fe(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:fe(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new Bu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Uu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var fr=es;es.default=es;let zu=fr,ts=class extends zu{constructor(e){super(e),this.type="comment"}};var pr=ts;ts.default=ts;let Gu=fr,rs=class extends Gu{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(O({},e),{value:String(e.value)})),super(e),this.type="decl"}};var dr=rs;rs.default=rs;let Wn=pr,zn=dr,Vu=fr,{isClean:Gn,my:Vn}=ht,Ms,jn,Hn,Es;function Yn(s){return s.map(e=>(e.nodes&&(e.nodes=Yn(e.nodes)),delete e.source,e))}function Zn(s){if(s[Gn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Zn(e)}let me=class Jn extends Vu{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Yn(jn(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new zn(e)]}else if(e.selector||e.selectors)e=[new Es(e)];else if(e.name)e=[new Ms(e)];else if(e.text)e=[new Wn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Vn]||Jn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Gn]&&Zn(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};me.registerParse=s=>{jn=s};me.registerRule=s=>{Es=s};me.registerAtRule=s=>{Ms=s};me.registerRoot=s=>{Hn=s};var Oe=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ms.prototype):s.type==="rule"?Object.setPrototypeOf(s,Es.prototype):s.type==="decl"?Object.setPrototypeOf(s,zn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Wn.prototype):s.type==="root"&&Object.setPrototypeOf(s,Hn.prototype),s[Vn]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let Xn=Oe,qt=class extends Xn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var $s=qt;qt.default=qt;Xn.registerAtRule(qt);let ju=Oe,Kn,Qn,it=class extends ju{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Kn(new Qn,this,e).stringify()}};it.registerLazyResult=s=>{Kn=s};it.registerProcessor=s=>{Qn=s};var Ns=it;it.default=it;let Hu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Yu=(s=21)=>{let e="",t=s|0;for(;t--;)e+=Hu[Math.random()*64|0];return e};var Zu={nanoid:Yu};let{existsSync:Ju,readFileSync:Xu}=ne,{dirname:Or,join:Ku}=ne,{SourceMapConsumer:wi,SourceMapGenerator:bi}=ne;function Qu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ss=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Or(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new wi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return Qu(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Or(e),Ju(e))return this.mapFile=e,Xu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof wi)return bi.fromSourceMap(t).toString();if(t instanceof bi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Ku(Or(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var qn=ss;ss.default=ss;let{nanoid:qu}=Zu,{isAbsolute:is,resolve:ns}=ne,{SourceMapConsumer:ec,SourceMapGenerator:tc}=ne,{fileURLToPath:Si,pathToFileURL:At}=ne,Ci=As,rc=qn,Ar=ne,Mr=Symbol("lineToIndexCache"),sc=!!(ec&&tc),vi=!!(ns&&is);function Ii(s){if(s[Mr])return s[Mr];let e=s.css.split(`
49
- `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[Mr]=t,t}let er=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.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,t.document&&(this.document=t.document.toString()),t.from&&(!vi||/^\w+:\/\//.test(t.from)||is(t.from)?this.file=t.from:this.file=ns(t.from)),vi&&sc){let r=new rc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+qu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,c;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){o=h.offset;let d=this.fromOffset(o);t=d.line,r=d.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){l=p.offset;let d=this.fromOffset(l);a=d.line,n=d.col}else a=p.line,n=p.column,l=this.fromLineAndColumn(p.line,p.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let u=this.origin(t,r,a,n);return u?c=new Ci(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new Ci(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),c.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(At&&(c.input.url=At(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Ii(this)[e-1]+t-1}fromOffset(e){let t=Ii(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ns(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;is(a.source)?o=At(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||At(this.map.mapFile));let c={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(Si)c.file=Si(o);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(a.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var mr=er;er.default=er;Ar&&Ar.registerInput&&Ar.registerInput(er);let eo=Oe,to,ro,Fe=class extends eo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new to(new ro,this,e).stringify()}};Fe.registerLazyResult=s=>{to=s};Fe.registerProcessor=s=>{ro=s};var ft=Fe;Fe.default=Fe;eo.registerRoot(Fe);let nt={comma(s){return nt.split(s,[","],!0)},space(s){let e=[" ",`
50
- `," "];return nt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:l?u===o&&(l=!1):u==='"'||u==="'"?(l=!0,o=u):u==="("?a+=1:u===")"?a>0&&(a-=1):a===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var so=nt;nt.default=nt;let io=Oe,ic=so,tr=class extends io{get selectors(){return ic.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var ks=tr;tr.default=tr;io.registerRule(tr);let nc=$s,oc=pr,ac=dr,lc=mr,uc=qn,cc=ft,hc=ks;function ot(s,e){if(Array.isArray(s))return s.map(a=>ot(a));let i=s,{inputs:t}=i,r=Me(i,["inputs"]);if(t){e=[];for(let a of t){let l=ee(O({},a),{__proto__:lc.prototype});l.map&&(l.map=ee(O({},l.map),{__proto__:uc.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>ot(a,e))),r.source){let n=r.source,{inputId:a}=n,l=Me(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new cc(r);if(r.type==="decl")return new ac(r);if(r.type==="rule")return new hc(r);if(r.type==="comment")return new oc(r);if(r.type==="atrule")return new nc(r);throw new Error("Unknown node type: "+s.type)}var fc=ot;ot.default=ot;let{dirname:Wt,relative:no,resolve:oo,sep:ao}=ne,{SourceMapConsumer:lo,SourceMapGenerator:zt}=ne,{pathToFileURL:xi}=ne,pc=mr,dc=!!(lo&&zt),mc=!!(Wt&&oo&&no&&ao),gc=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
46
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Un=Qr;Qr.default=Qr;let Tu=Un;function qr(s,e){new Tu(e).stringify(s)}var pr=qr;qr.default=qr;var ft={};ft.isClean=Symbol("isClean");ft.my=Symbol("my");let Fu=Ms,Bu=Un,Uu=pr,{isClean:Ze,my:zu}=ft;function es(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>es(a,t)):(n==="object"&&i!==null&&(i=es(i)),t[r]=i)}return t}function fe(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
47
+ `?(t=1,r+=1):t+=1}return i}let ts=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ze]=!1,this[zu]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=es(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Fu(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Ze]=!0}markDirty(){if(this[Ze]){this[Ze]=!1;let e=this;for(;e=e.parent;)e[Ze]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(fe(r,this.source.start),fe(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=fe(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
48
+ `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:fe(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:fe(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(fe(t,this.source.start),fe(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:fe(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:fe(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new Bu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Uu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var dr=ts;ts.default=ts;let Wu=dr,rs=class extends Wu{constructor(e){super(e),this.type="comment"}};var mr=rs;rs.default=rs;let Gu=dr,ss=class extends Gu{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var gr=ss;ss.default=ss;let zn=mr,Wn=gr,Vu=dr,{isClean:Gn,my:Vn}=ft,Es,jn,Hn,$s;function Yn(s){return s.map(e=>(e.nodes&&(e.nodes=Yn(e.nodes)),delete e.source,e))}function Zn(s){if(s[Gn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Zn(e)}let me=class Jn extends Vu{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Yn(jn(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Wn(e)]}else if(e.selector||e.selectors)e=[new $s(e)];else if(e.name)e=[new Es(e)];else if(e.text)e=[new zn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Vn]||Jn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Gn]&&Zn(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};me.registerParse=s=>{jn=s};me.registerRule=s=>{$s=s};me.registerAtRule=s=>{Es=s};me.registerRoot=s=>{Hn=s};var Ae=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Es.prototype):s.type==="rule"?Object.setPrototypeOf(s,$s.prototype):s.type==="decl"?Object.setPrototypeOf(s,Wn.prototype):s.type==="comment"?Object.setPrototypeOf(s,zn.prototype):s.type==="root"&&Object.setPrototypeOf(s,Hn.prototype),s[Vn]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let Xn=Ae,tr=class extends Xn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ns=tr;tr.default=tr;Xn.registerAtRule(tr);let ju=Ae,Kn,Qn,nt=class extends ju{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Kn(new Qn,this,e).stringify()}};nt.registerLazyResult=s=>{Kn=s};nt.registerProcessor=s=>{Qn=s};var ks=nt;nt.default=nt;let Hu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Yu=(s=21)=>{let e="",t=s|0;for(;t--;)e+=Hu[Math.random()*64|0];return e};var Zu={nanoid:Yu};let{existsSync:Ju,readFileSync:Xu}=ie,{dirname:Ar,join:Ku}=ie,{SourceMapConsumer:wi,SourceMapGenerator:bi}=ie;function Qu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let is=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ar(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new wi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return Qu(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ar(e),Ju(e))return this.mapFile=e,Xu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof wi)return bi.fromSourceMap(t).toString();if(t instanceof bi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Ku(Ar(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var qn=is;is.default=is;let{nanoid:qu}=Zu,{isAbsolute:ns,resolve:os}=ie,{SourceMapConsumer:ec,SourceMapGenerator:tc}=ie,{fileURLToPath:Si,pathToFileURL:Et}=ie,Ci=Ms,rc=qn,Mr=ie,Er=Symbol("lineToIndexCache"),sc=!!(ec&&tc),vi=!!(os&&ns);function Ii(s){if(s[Er])return s[Er];let e=s.css.split(`
49
+ `),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[Er]=t,t}let rr=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.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,t.document&&(this.document=t.document.toString()),t.from&&(!vi||/^\w+:\/\//.test(t.from)||ns(t.from)?this.file=t.from:this.file=os(t.from)),vi&&sc){let r=new rc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+qu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,c;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){o=h.offset;let d=this.fromOffset(o);t=d.line,r=d.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){l=p.offset;let d=this.fromOffset(l);a=d.line,n=d.col}else a=p.line,n=p.column,l=this.fromLineAndColumn(p.line,p.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let u=this.origin(t,r,a,n);return u?c=new Ci(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new Ci(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),c.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Et&&(c.input.url=Et(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Ii(this)[e-1]+t-1}fromOffset(e){let t=Ii(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:os(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;ns(a.source)?o=Et(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Et(this.map.mapFile));let c={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(Si)c.file=Si(o);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(a.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var yr=rr;rr.default=rr;Mr&&Mr.registerInput&&Mr.registerInput(rr);let eo=Ae,to,ro,Be=class extends eo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new to(new ro,this,e).stringify()}};Be.registerLazyResult=s=>{to=s};Be.registerProcessor=s=>{ro=s};var pt=Be;Be.default=Be;eo.registerRoot(Be);let ot={comma(s){return ot.split(s,[","],!0)},space(s){let e=[" ",`
50
+ `," "];return ot.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:l?u===o&&(l=!1):u==='"'||u==="'"?(l=!0,o=u):u==="("?a+=1:u===")"?a>0&&(a-=1):a===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var so=ot;ot.default=ot;let io=Ae,ic=so,sr=class extends io{get selectors(){return ic.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Ps=sr;sr.default=sr;io.registerRule(sr);let nc=Ns,oc=mr,ac=gr,lc=yr,uc=qn,cc=pt,hc=Ps;function at(s,e){if(Array.isArray(s))return s.map(a=>at(a));let i=s,{inputs:t}=i,r=Ee(i,["inputs"]);if(t){e=[];for(let a of t){let l=ee(M({},a),{__proto__:lc.prototype});l.map&&(l.map=ee(M({},l.map),{__proto__:uc.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>at(a,e))),r.source){let n=r.source,{inputId:a}=n,l=Ee(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new cc(r);if(r.type==="decl")return new ac(r);if(r.type==="rule")return new hc(r);if(r.type==="comment")return new oc(r);if(r.type==="atrule")return new nc(r);throw new Error("Unknown node type: "+s.type)}var fc=at;at.default=at;let{dirname:Gt,relative:no,resolve:oo,sep:ao}=ie,{SourceMapConsumer:lo,SourceMapGenerator:Vt}=ie,{pathToFileURL:xi}=ie,pc=yr,dc=!!(lo&&Vt),mc=!!(Gt&&oo&&no&&ao),gc=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
51
51
  `;this.css.includes(`\r
52
52
  `)&&(t=`\r
53
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Wt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new lo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),mc&&dc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=zt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new zt({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 zt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,c)=>{if(this.css+=l,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
54
- `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Wt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Wt(oo(r,this.mapOpts.annotation)));let i=no(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new pc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(xi){let r=xi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ao==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var uo=gc;const Er=39,Ri=34,Mt=92,Oi=47,Et=10,Ze=32,$t=12,Nt=9,kt=13,yc=91,wc=93,bc=40,Sc=41,Cc=123,vc=125,Ic=59,xc=42,Rc=58,Oc=64,Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Lt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ac=/.[\r\n"'(/\\]/,Ai=/[\da-f]/i;var Mc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,b=[],S=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function P(){return S.length===0&&f>=m}function D(T){if(S.length)return S.pop();if(f>=m)return;let V=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Et:case Ze:case Nt:case kt:case $t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===Et||n===Nt||n===kt||n===$t);u=["space",r.slice(f,o)],f=o-1;break}case yc:case wc:case Cc:case vc:case Rc:case Ic:case Sc:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case bc:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Er&&d!==Ri&&d!==Ze&&d!==Et&&d!==Nt&&d!==$t&&d!==kt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Mt;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Ac.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Er:case Ri:{c=n===Er?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||V){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Mt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Oc:{Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Mt:{for(o=f,l=!0;r.charCodeAt(o+1)===Mt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Oi&&n!==Ze&&n!==Et&&n!==Nt&&n!==kt&&n!==$t&&(o+=1,Ai.test(r.charAt(o)))){for(;Ai.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Oi&&r.charCodeAt(f+1)===xc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Lt.lastIndex=f+1,Lt.test(r),Lt.lastIndex===0?o=r.length-1:o=Lt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function G(T){S.push(T)}return{back:G,endOfFile:P,nextToken:D,position:y}};let Ec=$s,$c=pr,Nc=dr,kc=ft,Mi=ks,Pc=Mc;const Ei={empty:!0,space:!0};function Lc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Dc=class{constructor(e){this.input=e,this.root=new kc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Ec;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new $c;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Pc(this.input)}decl(e,t){let r=new Nc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Lc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Mi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!Ei[h]&&!Ei[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Mi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Tc=Dc;let _c=Oe,Fc=mr,Bc=Tc;function rr(s,e){let t=new Fc(s,e),r=new Bc(t);try{r.parse()}catch(i){throw i}return r.root}var Ps=rr;rr.default=rr;_c.registerParse(rr);let os=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var co=os;os.default=os;let Uc=co,as=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Uc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ls=as;as.default=as;let Wc=Oe,zc=Ns,Gc=uo,Vc=Ps,$i=Ls,jc=ft,Hc=hr,{isClean:ce,my:Yc}=ht;const Zc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jc={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Xc={Once:!0,postcssPlugin:!0,prepare:!0},Be=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function ho(s){let e=!1,t=Zc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Be,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Be,t+"Exit"]:[t,t+"Exit"]}function Ni(s){let e;return s.type==="document"?e=["Document",Be,"DocumentExit"]:s.type==="root"?e=["Root",Be,"RootExit"]:e=ho(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ls(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>ls(e)),s}let us={},Ue=class fo{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ls(t);else if(t instanceof fo||t instanceof $i)i=ls(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Vc;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Yc]&&Wc.rebuild(i)}this.result=new $i(e,i,r),this.helpers=ee(O({},us),{postcss:us,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Jc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Xc[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];){e[ce]=!0;let t=[Ni(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Hc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Gc(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];)e[ce]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ce]){l[ce]=!0,e.push(Ni(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Be){r.nodes&&r.nodes.length&&(r[ce]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ce]=!0;let t=ho(e);for(let r of t)if(r===Be)e.nodes&&e.each(i=>{i[ce]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Ue.registerPostcss=s=>{us=s};var po=Ue;Ue.default=Ue;jc.registerLazyResult(Ue);zc.registerLazyResult(Ue);let Kc=uo,Qc=Ps;const qc=Ls;let eh=hr;let cs=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Qc;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=eh;this.result=new qc(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Kc(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var th=cs;cs.default=cs;let rh=Ns,sh=po,ih=th,nh=ft,at=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ih(this,e,t):new sh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var oh=at;at.default=at;nh.registerProcessor(at);rh.registerProcessor(at);let mo=$s,go=pr,ah=Oe,lh=As,yo=dr,wo=Ns,uh=fc,ch=mr,hh=po,fh=so,ph=fr,dh=Ps,Ds=oh,mh=Ls,bo=ft,So=ks,gh=hr,yh=co;function k(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ds(s)}k.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
53
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Gt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new lo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),mc&&dc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Vt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Vt({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 Vt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,c)=>{if(this.css+=l,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
54
+ `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Gt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Gt(oo(r,this.mapOpts.annotation)));let i=no(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new pc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(xi){let r=xi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ao==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var uo=gc;const $r=39,Ri=34,$t=92,Oi=47,Nt=10,Je=32,kt=12,Pt=9,Lt=13,yc=91,wc=93,bc=40,Sc=41,Cc=123,vc=125,Ic=59,xc=42,Rc=58,Oc=64,_t=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ac=/.[\r\n"'(/\\]/,Ai=/[\da-f]/i;var Mc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,y=[],S=[];function C(){return f}function T(k){throw e.error("Unclosed "+k,f)}function b(){return S.length===0&&f>=m}function v(k){if(S.length)return S.pop();if(f>=m)return;let B=k?k.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Nt:case Je:case Pt:case Lt:case kt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Je||n===Nt||n===Pt||n===Lt||n===kt);u=["space",r.slice(f,o)],f=o-1;break}case yc:case wc:case Cc:case vc:case Rc:case Ic:case Sc:{let V=String.fromCharCode(n);u=[V,V,f];break}case bc:{if(g=y.length?y.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==$r&&d!==Ri&&d!==Je&&d!==Nt&&d!==Pt&&d!==kt&&d!==Lt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||B){o=f;break}else T("bracket");for(p=o;r.charCodeAt(p-1)===$t;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Ac.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case $r:case Ri:{c=n===$r?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||B){o=f+1;break}else T("string");for(p=o;r.charCodeAt(p-1)===$t;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Oc:{_t.lastIndex=f+1,_t.test(r),_t.lastIndex===0?o=r.length-1:o=_t.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case $t:{for(o=f,l=!0;r.charCodeAt(o+1)===$t;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Oi&&n!==Je&&n!==Nt&&n!==Pt&&n!==Lt&&n!==kt&&(o+=1,Ai.test(r.charAt(o)))){for(;Ai.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Je&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Oi&&r.charCodeAt(f+1)===xc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||B?o=r.length:T("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],y.push(u),f=o);break}}return f++,u}function W(k){S.push(k)}return{back:W,endOfFile:b,nextToken:v,position:C}};let Ec=Ns,$c=mr,Nc=gr,kc=pt,Mi=Ps,Pc=Mc;const Ei={empty:!0,space:!0};function Lc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let _c=class{constructor(e){this.input=e,this.root=new kc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Ec;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new $c;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Pc(this.input)}decl(e,t){let r=new Nc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Lc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Mi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!Ei[h]&&!Ei[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Mi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Dc=_c;let Tc=Ae,Fc=yr,Bc=Dc;function ir(s,e){let t=new Fc(s,e),r=new Bc(t);try{r.parse()}catch(i){throw i}return r.root}var Ls=ir;ir.default=ir;Tc.registerParse(ir);let as=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var co=as;as.default=as;let Uc=co,ls=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Uc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var _s=ls;ls.default=ls;let zc=Ae,Wc=ks,Gc=uo,Vc=Ls,$i=_s,jc=pt,Hc=pr,{isClean:ue,my:Yc}=ft;const Zc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jc={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Xc={Once:!0,postcssPlugin:!0,prepare:!0},Ue=0;function Xe(s){return typeof s=="object"&&typeof s.then=="function"}function ho(s){let e=!1,t=Zc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function Ni(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=ho(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function us(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>us(e)),s}let cs={},ze=class fo{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=us(t);else if(t instanceof fo||t instanceof $i)i=us(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Vc;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Yc]&&zc.rebuild(i)}this.result=new $i(e,i,r),this.helpers=ee(M({},cs),{postcss:cs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Jc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Xc[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Xe(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[Ni(e)];for(;t.length>0;){let r=this.visitTick(t);if(Xe(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Xe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Hc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Gc(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Xe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Xe(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ue]){l[ue]=!0,e.push(Ni(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Ue){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ue]=!0;let t=ho(e);for(let r of t)if(r===Ue)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};ze.registerPostcss=s=>{cs=s};var po=ze;ze.default=ze;jc.registerLazyResult(ze);Wc.registerLazyResult(ze);let Kc=uo,Qc=Ls;const qc=_s;let eh=pr;let hs=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Qc;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=eh;this.result=new qc(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Kc(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var th=hs;hs.default=hs;let rh=ks,sh=po,ih=th,nh=pt,lt=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ih(this,e,t):new sh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var oh=lt;lt.default=lt;nh.registerProcessor(lt);rh.registerProcessor(lt);let mo=Ns,go=mr,ah=Ae,lh=Ms,yo=gr,wo=ks,uh=fc,ch=yr,hh=po,fh=so,ph=dr,dh=Ls,Ds=oh,mh=_s,bo=pt,So=Ps,gh=pr,yh=co;function _(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ds(s)}_.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
55
55
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
56
- https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Ds().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return k([i(o)]).process(a,l)},i};k.stringify=gh;k.parse=dh;k.fromJSON=uh;k.list=fh;k.comment=s=>new go(s);k.atRule=s=>new mo(s);k.decl=s=>new yo(s);k.rule=s=>new So(s);k.root=s=>new bo(s);k.document=s=>new wo(s);k.CssSyntaxError=lh;k.Declaration=yo;k.Container=ah;k.Processor=Ds;k.Document=wo;k.Comment=go;k.Warning=yh;k.AtRule=mo;k.Result=mh;k.Input=ch;k.Rule=So;k.Root=bo;k.Node=ph;hh.registerPostcss(k);var wh=k;k.default=k;const B=Nu(wh);B.stringify;B.fromJSON;B.plugin;B.parse;B.list;B.document;B.comment;B.atRule;B.rule;B.decl;B.root;B.CssSyntaxError;B.Declaration;B.Container;B.Processor;B.Document;B.Comment;B.Warning;B.AtRule;B.Result;B.Input;B.Rule;B.Root;B.Node;class Ts{constructor(...e){te(this,"parentElement",null),te(this,"parentNode",null),te(this,"ownerDocument"),te(this,"firstChild",null),te(this,"lastChild",null),te(this,"previousSibling",null),te(this,"nextSibling",null),te(this,"ELEMENT_NODE",1),te(this,"TEXT_NODE",3),te(this,"nodeType"),te(this,"nodeName"),te(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ts){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const ki={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Pi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Dt={},bh=()=>!!globalThis.Zone;function _s(s){if(Dt[s])return Dt[s];const e=globalThis[s],t=e.prototype,r=s in ki?ki[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in Pi?Pi[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!bh())return Dt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?Dt[s]=c:t}catch(l){return t}}const $r={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if($r[i])return $r[i].call(e);const n=_s(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?($r[i]=a,a.call(e)):e[t]}const Nr={};function Co(s,e,t){const r=`${s}.${String(t)}`;if(Nr[r])return Nr[r].bind(e);const n=_s(s)[t];return typeof n!="function"?e[t]:(Nr[r]=n,n.bind(e))}function Sh(s){return we("Node",s,"childNodes")}function Ch(s){return we("Node",s,"parentNode")}function vh(s){return we("Node",s,"parentElement")}function Ih(s){return we("Node",s,"textContent")}function xh(s,e){return Co("Node",s,"contains")(e)}function Rh(s){return Co("Node",s,"getRootNode")()}function Oh(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function Ah(s){return s.styleSheets}function Mh(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function Eh(s,e){return we("Element",s,"querySelector")(e)}function $h(s,e){return we("Element",s,"querySelectorAll")(e)}function vo(){return _s("MutationObserver").constructor}function Ae(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const x={childNodes:Sh,parentNode:Ch,parentElement:vh,textContent:Ih,contains:xh,getRootNode:Rh,host:Oh,styleSheets:Ah,shadowRoot:Mh,querySelector:Eh,querySelectorAll:$h,mutationObserver:vo,patch:Ae};function J(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const $e=`Please stop import mirror directly. Instead of that,\r
56
+ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Ds().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return _([i(o)]).process(a,l)},i};_.stringify=gh;_.parse=dh;_.fromJSON=uh;_.list=fh;_.comment=s=>new go(s);_.atRule=s=>new mo(s);_.decl=s=>new yo(s);_.rule=s=>new So(s);_.root=s=>new bo(s);_.document=s=>new wo(s);_.CssSyntaxError=lh;_.Declaration=yo;_.Container=ah;_.Processor=Ds;_.Document=wo;_.Comment=go;_.Warning=yh;_.AtRule=mo;_.Result=mh;_.Input=ch;_.Rule=So;_.Root=bo;_.Node=ph;hh.registerPostcss(_);var wh=_;_.default=_;const z=Nu(wh);z.stringify;z.fromJSON;z.plugin;z.parse;z.list;z.document;z.comment;z.atRule;z.rule;z.decl;z.root;z.CssSyntaxError;z.Declaration;z.Container;z.Processor;z.Document;z.Comment;z.Warning;z.AtRule;z.Result;z.Input;z.Rule;z.Root;z.Node;class Ts{constructor(...e){te(this,"parentElement",null),te(this,"parentNode",null),te(this,"ownerDocument"),te(this,"firstChild",null),te(this,"lastChild",null),te(this,"previousSibling",null),te(this,"nextSibling",null),te(this,"ELEMENT_NODE",1),te(this,"TEXT_NODE",3),te(this,"nodeType"),te(this,"nodeName"),te(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ts){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const ki={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Pi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Tt={},bh=()=>!!globalThis.Zone;function Fs(s){if(Tt[s])return Tt[s];const e=globalThis[s],t=e.prototype,r=s in ki?ki[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in Pi?Pi[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!bh())return Tt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?Tt[s]=c:t}catch(l){return t}}const Nr={};function be(s,e,t){var r;const i=`${s}.${String(t)}`;if(Nr[i])return Nr[i].call(e);const n=Fs(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Nr[i]=a,a.call(e)):e[t]}const kr={};function Co(s,e,t){const r=`${s}.${String(t)}`;if(kr[r])return kr[r].bind(e);const n=Fs(s)[t];return typeof n!="function"?e[t]:(kr[r]=n,n.bind(e))}function Sh(s){return be("Node",s,"childNodes")}function Ch(s){return be("Node",s,"parentNode")}function vh(s){return be("Node",s,"parentElement")}function Ih(s){return be("Node",s,"textContent")}function xh(s,e){return Co("Node",s,"contains")(e)}function Rh(s){return Co("Node",s,"getRootNode")()}function Oh(s){return!s||!("host"in s)?null:be("ShadowRoot",s,"host")}function Ah(s){return s.styleSheets}function Mh(s){return!s||!("shadowRoot"in s)?null:be("Element",s,"shadowRoot")}function Eh(s,e){return be("Element",s,"querySelector")(e)}function $h(s,e){return be("Element",s,"querySelectorAll")(e)}function vo(){return Fs("MutationObserver").constructor}function Me(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const R={childNodes:Sh,parentNode:Ch,parentElement:vh,textContent:Ih,contains:xh,getRootNode:Rh,host:Oh,styleSheets:Ah,shadowRoot:Mh,querySelector:Eh,querySelectorAll:$h,mutationObserver:vo,patch:Me};function Z(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Ne=`Please stop import mirror directly. Instead of that,\r
57
57
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
58
- or you can use record.mirror to access the mirror instance during recording.`;let Li={map:{},getId(){return console.error($e),-1},getNode(){return console.error($e),null},removeNodeFromMap(){console.error($e)},has(){return console.error($e),!1},reset(){console.error($e)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Li=new Proxy(Li,{get(s,e,t){return e==="map"&&console.error($e),Reflect.get(s,e,t)}}));function lt(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function gr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>gr(s,e,n||{},!0)}let sr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(sr=()=>new Date().getTime());function Io(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=x.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=x.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function xo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ro(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Oo(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=Oo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Zt(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Nh(s,e){return e.getId(s)!==-1}function kr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===qe}function Ao(s,e){if(Xe(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ao(r,e):!0}function hs(s){return!!s.changedTouches}function kh(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Mo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Eo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function fs(s){return s?s instanceof Ts&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class Ph{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function $o(s){var e;let t=null;return"getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function Lh(s){let e=s,t;for(;t=$o(e);)e=t;return e}function Dh(s){const e=s.ownerDocument;if(!e)return!1;const t=Lh(s);return x.contains(e,t)}function No(s){const e=s.ownerDocument;return e?x.contains(e,s)||Dh(s):!1}var M=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(M||{}),R=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(R||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),We=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(We||{}),Ne=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Ne||{}),ko=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(ko||{});function Di(s){return"__ln"in s}class Th{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Di(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Di(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Ti=(s,e)=>`${s}@${e}`;class _h{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"tempPerfStore",{}),w(this,"processMutations",e=>{const t=performance.now();for(const r of e){const i=performance.now();this.processMutation(r);const n=performance.now()-i;r.type in this.tempPerfStore||(this.tempPerfStore[r.type]={avg:0,times:[]}),this.tempPerfStore[r.type].times.push(n),this.tempPerfStore[r.type].times.length>1e3&&this.tempPerfStore[r.type].times.shift(),this.tempPerfStore[r.type].avg=this.tempPerfStore[r.type].times.reduce((a,l)=>a+l,0)/this.tempPerfStore[r.type].times.length}console.log(e.length,"mutations processed in",performance.now()-t,"ms"),window.temp_perf_store=this.tempPerfStore,this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Th,i=u=>{let h=u,p=qe;for(;p===qe;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},n=u=>{const h=x.parentNode(u);if(!h||!No(u))return;let p=!1;if(u.nodeType===Node.TEXT_NODE){const f=h.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(h)&&(p=!0)}const d=Xe(h)?this.mirror.getId($o(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=Pe(u,{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:f=>{Mo(f,this.mirror)&&this.iframeManager.addIframe(f),Eo(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),fs(u)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(u),this.doc)},onIframeLoad:(f,b)=>{this.iframeManager.attachIframe(f,b),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,b)=>{this.stylesheetManager.attachLinkElement(f,b)},cssCaptured:p});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)_i(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(x.parentNode(u))||n(u);for(const u of this.addedSet)!Fi(this.droppedSet,u)&&!_i(this.removesSubTreeCache,u,this.mirror)||Fi(this.movedSet,u)?n(u):this.droppedSet.add(u);let a=null;for(;r.length;){let u=null;if(a){const h=this.mirror.getId(x.parentNode(a.value)),p=i(a.value);h!==-1&&p!==-1&&(u=a)}if(!u){let h=r.tail;for(;h;){const p=h;if(h=h.previous,p){const d=this.mirror.getId(x.parentNode(p.value));if(i(p.value)===-1)continue;if(d!==-1){u=p;break}else{const m=p.value,f=x.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=x.host(f);if(this.mirror.getId(b)!==-1){u=p;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}a=u.previous,r.removeNode(u.value),n(u.value)}const l=[];for(const u of this.texts){const h=u.node,p=x.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&l.push({id:d,value:u.value})}const o=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const p=this.mirror.getId(u.node);!t.has(p)&&this.mirror.has(p)&&o.push({id:p,attributes:h})}const c={texts:l,attributes:o,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=jt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ht(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!kr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=x.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:en(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Oo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const a=Ht(t);i=jt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!qi(t.tagName,r))if(n.attributes[r]=Qi(this.doc,xe(t.tagName),xe(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const o=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);o!==a.style.getPropertyValue(l)||c!==a.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=o:n.styleDiff[l]=[o,c]:n._unchangedStyles[l]=[o,c]}for(const l of Array.from(a.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let t=0;t<e.addedNodes.length;t++)this.genAdds(e.addedNodes[t],e.target);for(let t=0;t<e.removedNodes.length;t++){const r=e.removedNodes[t],i=this.mirror.getId(r),n=Xe(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);if(X(e.target,this.blockClass,this.blockSelector,!1)||kr(r,this.mirror,this.slimDOMOptions)||!Nh(r,this.mirror))return;this.addedSet.has(r)?(ps(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&i===-1||Ao(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ti(i,n)]?ps(this.movedSet,r):(this.removes.push({parentId:n,id:i,isShadow:Xe(e.target)&&Ke(e.target)?!0:void 0}),Fh(r,this.removesSubTreeCache))),this.mapRemoves.push(r)}break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(kr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Ti(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!X(e,this.blockClass,this.blockSelector,!1)){const r=x.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(fs(e)){const i=x.childNodes(x.shadowRoot(e));for(let n=0;n<i.length;n++){const a=i[n];this.processedNodeManager.add(a,this),this.genAdds(a,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}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 ps(s,e){s.delete(e);const t=x.childNodes(e);for(let r=0;r<t.length;r++)ps(s,t[r])}function Fh(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=x.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function _i(s,e,t){return s.size===0?!1:Bh(s,e)}function Bh(s,e,t){const r=x.parentNode(e);return r?s.has(r):!1}function Fi(s,e){return s.size===0?!1:Po(s,e)}function Po(s,e){const t=x.parentNode(e);return t?s.has(t)?!0:Po(s,t):!1}let Qe;function Uh(s){Qe=s}function Wh(){Qe=void 0}const A=s=>Qe?(...t)=>{try{return s(...t)}catch(r){if(Qe&&Qe(r)===!0)return;throw r}}:s,Ie=[];function pt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Lo(s,e){const t=new _h;Ie.push(t),t.init(s);const r=new(vo())(A(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function zh({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=lt(A(h=>{const p=Date.now()-l;s(a.map(d=>(d.timeOffset-=p,d)),h),a=[],l=null}),n),c=A(lt(A(h=>{const p=pt(h),{clientX:d,clientY:g}=hs(h)?h.changedTouches[0]:h;l||(l=sr()),a.push({x:d,y:g,id:r.getId(p),timeOffset:sr()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?R.Drag:h instanceof MouseEvent?R.MouseMove:R.TouchMove)}),i,{trailing:!1})),u=[J("mousemove",c,t),J("touchmove",c,t),J("drag",c,t)];return A(()=>{u.forEach(h=>h())})}function Gh({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const c=u=>h=>{const p=pt(h);if(X(p,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):pe.Pen}else hs(h)&&(d=pe.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):K[u]===K.Click&&(d=o,o=null);const m=hs(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:b,clientY:S}=m;A(s)(O({type:K[g],id:f,x:b,y:S},d!==null&&{pointerType:d}))};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let h=xe(u);const p=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(J(h,p,e))}),A(()=>{l.forEach(u=>u())})}function Do({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=A(lt(A(l=>{const o=pt(l);if(!o||X(o,r,i,!0))return;const c=t.getId(o);if(o===e&&e.defaultView){const u=Io(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return J("scroll",a,e)}function Vh({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=A(lt(A(()=>{const n=xo(),a=Ro();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return J("resize",i,e)}const jh=["INPUT","TEXTAREA","SELECT"],Bi=new WeakMap;function Hh({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:c,userTriggeredOnInput:u}){function h(S){let y=pt(S);const C=S.isTrusted,P=y&&y.tagName;if(y&&P==="OPTION"&&(y=x.parentElement(y)),!y||!P||jh.indexOf(P)<0||X(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let D=y.value,G=!1;const T=Ht(y)||"";T==="radio"||T==="checkbox"?G=y.checked:(l[P.toLowerCase()]||l[T])&&(D=jt({element:y,maskInputOptions:l,tagName:P,type:T,value:D,maskInputFn:o})),p(y,u?{text:D,isChecked:G,userTriggered:C}:{text:D,isChecked:G});const V=y.name;T==="radio"&&V&&G&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==y){const Q=Y.value;p(Y,u?{text:Q,isChecked:!G,userTriggered:!1}:{text:Q,isChecked:!G})}})}function p(S,y){const C=Bi.get(S);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Bi.set(S,y);const P=t.getId(S);A(s)(ee(O({},y),{id:P}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(S=>J(S,A(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(S=>S())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(S=>gr(S[0],S[1],{set(){A(h)({target:this,isTrusted:!1})}},!1,m))),A(()=>{g.forEach(S=>S())})}function ir(s){const e=[];function t(r,i){if(Tt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Tt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Tt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Tt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function ge(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Yh({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:A((u,h,p)=>{const[d,g]=p,{id:m,styleId:f}=ge(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:A((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ge(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:A((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ge(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:A((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ge(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,p)})}));const o={};_t("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(_t("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),_t("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),_t("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(o).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:A((p,d,g)=>{const[m,f]=g,{id:b,styleId:S}=ge(d.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:m,index:[...ir(d),f||0]}]}),p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:A((p,d,g)=>{const[m]=g,{id:f,styleId:b}=ge(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...ir(d),m]}]}),p.apply(d,g)})})}),A(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function To({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(x.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var c;return(c=o.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=o.set)==null?void 0:u.call(this,c);if(a!==null&&a!==-1)try{e.adoptStyleSheets(c,a)}catch(p){}return h}}),A(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Zh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:A((l,o,c)=>{var u;const[h,p,d]=c;if(t.has(h))return n.apply(o,[h,p,d]);const{id:g,styleId:m}=ge((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:p,priority:d},index:ir(o.parentRule)}),l.apply(o,c)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:A((l,o,c)=>{var u;const[h]=c;if(t.has(h))return a.apply(o,[h]);const{id:p,styleId:d}=ge((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:h},index:ir(o.parentRule)}),l.apply(o,c)})}),A(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Jh({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=A(o=>lt(A(c=>{const u=pt(c);if(!u||X(u,e,t,!0))return;const{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=u;s({type:o,id:r.getId(u),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[J("play",a(Ne.Play),n),J("pause",a(Ne.Pause),n),J("seeked",a(Ne.Seeked),n),J("volumechange",a(Ne.VolumeChange),n),J("ratechange",a(Ne.RateChange),n)];return A(()=>{l.forEach(o=>o())})}function Xh({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,c,u){const h=new n(o,c,u);return i.set(h,{family:o,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const a=Ae(e.fonts,"add",function(l){return function(o){return setTimeout(A(()=>{const c=i.get(o);c&&(s(c),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),A(()=>{r.forEach(l=>l())})}function Kh(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=A(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const c=[],u=o.rangeCount||0;for(let h=0;h<u;h++){const p=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;X(d,r,i,!0)||X(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:c})});return l(),J("selectionchange",l)}function Qh({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Ae(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function qh(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),a(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),o(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function ef(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};qh(s,e);let r;s.recordDOM&&(r=Lo(s,s.doc));const i=zh(s),n=Gh(s),a=Do(s),l=Vh(s,{win:t}),o=Hh(s),c=Jh(s);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(u=Yh(s,{win:t}),h=To(s,s.doc),p=Zh(s,{win:t}),s.collectFonts&&(d=Xh(s)));const g=Kh(s),m=Qh(s),f=[];for(const b of s.plugins)f.push(b.observer(b.callback,t,b.options));return A(()=>{Ie.forEach(b=>b.reset()),r==null||r.disconnect(),i(),n(),a(),l(),o(),c(),u(),h(),p(),d(),g(),m(),f.forEach(b=>b())})}function Tt(s){return typeof window[s]!="undefined"}function _t(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Ui{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class tf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Ui(Ki)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ui(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case M.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:M.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return t;case M.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case M.IncrementalSnapshot:switch(t.data.source){case R.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.ViewportResize:return!1;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case R.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==ko.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class rf{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ke(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Lo(ee(O({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Do(ee(O({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(To({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Ae(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=x.shadowRoot(this);return l&&No(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ft=0;Ft<Le.length;Ft++)sf[Le.charCodeAt(Ft)]=Ft;var nf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Le[e[t]>>2],i+=Le[(e[t]&3)<<4|e[t+1]>>4],i+=Le[(e[t+1]&15)<<2|e[t+2]>>6],i+=Le[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Wi=new Map;function of(s,e){let t=Wi.get(s);return t||(t=new Map,Wi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const _o=(s,e,t)=>{if(!s||!(Bo(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=of(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Gt(s,e,t){if(s instanceof Array)return s.map(r=>Gt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=nf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Gt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Gt(s.data,e,t),s.width,s.height]};if(Bo(s,e)||typeof s=="object"){const r=s.constructor.name,i=_o(s,e,t);return{rr_type:r,index:i}}}}return s}const Fo=(s,e,t)=>s.map(r=>Gt(r,e,t)),Bo=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function af(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Ae(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...c){return X(this.canvas,t,r,!0)||setTimeout(()=>{const u=Fo(c,e,this);s(this.canvas,{type:We["2D"],property:a,args:u})},0),o.apply(this,c)}});i.push(l)}catch(l){const o=gr(e.CanvasRenderingContext2D.prototype,a,{set(c){s(this.canvas,{type:We["2D"],property:a,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function lf(s){return s==="experimental-webgl"?"webgl":s}function zi(s,e,t,r){const i=[];try{const n=Ae(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!X(this,e,t,!0)){const c=lf(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(o[0]&&typeof o[0]=="object"){const u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Gi(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const c=Ae(s,o,function(u){return function(...h){const p=u.apply(this,h);if(_o(p,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=Fo(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return p}});a.push(c)}catch(c){const u=gr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(u)}return a}function uf(s,e,t,r){const i=[];return i.push(...Gi(e.WebGLRenderingContext.prototype,We.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Gi(e.WebGL2RenderingContext.prototype,We.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Uo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",cf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Vi=typeof self!="undefined"&&self.Blob&&new Blob([cf(Uo)],{type:"text/javascript;charset=utf-8"});function hf(s){let e;try{if(e=Vi&&(self.URL||self.webkitURL).createObjectURL(Vi),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Uo,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ff{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=zi(t,r,i,!0),l=new Map,o=new hf;o.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:b,width:S,height:y}=g.data;this.mutationCb({id:m,type:We["2D"],commands:[{property:"clearRect",args:[0,0,S,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};const c=1e3/e;let u=0,h;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{X(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,p().forEach(async m=>{var f;const b=this.mirror.getId(m);if(l.get(b)||m.width===0||m.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const S=await createImageBitmap(m);o.postMessage({id:b,bitmap:S,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=zi(e,t,r,!1),n=af(this.processMutation.bind(this),e,t,r),a=uf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const c=a,{type:l}=c;return Me(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class pf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Ph),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:Zi(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class df{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let z,Vt,Pr,nr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((js=s.contentWindow)==null?void 0:js.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=da();function be(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:b,sampling:S={},dataURLOptions:y={},mousemoveWait:C,recordDOM:P=!0,recordCanvas:D=!1,recordCrossOriginIframes:G=!1,recordAfter:T=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Y=!1,inlineImages:Q=!1,plugins:oe,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:ze=new Set([]),errorHandler:Ge}=s;Uh(Ge);const j=G?window.parent===window:!0;let q=!1;if(!j)try{window.parent.document&&(q=!1)}catch($){q=!0}if(j&&!e)throw new Error("emit function is required");if(!j&&!q)return()=>{};C!==void 0&&S.mousemove===void 0&&(S.mousemove=C),se.reset();const Se=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},ae=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};kh();let Fs,yr=0;const Bs=$=>{for(const re of oe||[])re.eventProcessor&&($=re.eventProcessor($));return b&&!q&&($=b($)),$};z=($,re)=>{var U;const W=$;if(W.timestamp=sr(),(U=Ie[0])!=null&&U.isFrozen()&&W.type!==M.FullSnapshot&&!(W.type===M.IncrementalSnapshot&&W.data.source===R.Mutation)&&Ie.forEach(le=>le.unfreeze()),j)e==null||e(Bs(W),re);else if(q){const le={type:"rrweb",event:Bs(W),origin:window.location.origin,isCheckout:re};window.parent.postMessage(le,"*")}if(W.type===M.FullSnapshot)Fs=W,yr=0;else if(W.type===M.IncrementalSnapshot){if(W.data.source===R.Mutation&&W.data.isAttachIframe)return;yr++;const le=r&&yr>=r,L=t&&W.timestamp-Fs.timestamp>t;(le||L)&&Vt(!0)}};const dt=$=>{z({type:M.IncrementalSnapshot,data:O({source:R.Mutation},$)})},Us=$=>z({type:M.IncrementalSnapshot,data:O({source:R.Scroll},$)}),Ws=$=>z({type:M.IncrementalSnapshot,data:O({source:R.CanvasMutation},$)}),Wo=$=>z({type:M.IncrementalSnapshot,data:O({source:R.AdoptedStyleSheet},$)}),Ce=new pf({mutationCb:dt,adoptedStyleSheetCb:Wo}),ve=new tf({mirror:se,mutationCb:dt,stylesheetManager:Ce,recordCrossOriginIframes:G,wrappedEmit:z});for(const $ of oe||[])$.getMirror&&$.getMirror({nodeMirror:se,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const wr=new df;Pr=new ff({recordCanvas:D,mutationCb:Ws,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:S.canvas,dataURLOptions:y});const mt=new rf({mutationCb:dt,scrollCb:Us,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:Se,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:D,inlineImages:Q,sampling:S,slimDOMOptions:ae,iframeManager:ve,stylesheetManager:Ce,canvasManager:Pr,keepIframeSrcFn:E,processedNodeManager:wr},mirror:se});Vt=($=!1)=>{if(!P)return;z({type:M.Meta,data:{href:window.location.href,width:Ro(),height:xo()}},$),Ce.reset(),mt.init(),Ie.forEach(U=>U.lock());const re=Ua(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:Se,maskTextFn:m,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:D,inlineImages:Q,onSerialize:U=>{Mo(U,se)&&ve.addIframe(U),Eo(U,se)&&Ce.trackLinkElement(U),fs(U)&&mt.addShadowRoot(x.shadowRoot(U),document)},onIframeLoad:(U,W)=>{ve.attachIframe(U,W),mt.observeAttachShadow(U)},onStylesheetLoad:(U,W)=>{Ce.attachLinkElement(U,W)},keepIframeSrcFn:E});if(!re)return console.warn("Failed to snapshot the document");z({type:M.FullSnapshot,data:{node:re,initialOffset:Io(window)}},$),Ie.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const $=[],re=W=>{var le;return A(ef)({mutationCb:dt,mousemoveCb:(L,br)=>z({type:M.IncrementalSnapshot,data:{source:br,positions:L}}),mouseInteractionCb:L=>z({type:M.IncrementalSnapshot,data:O({source:R.MouseInteraction},L)}),scrollCb:Us,viewportResizeCb:L=>z({type:M.IncrementalSnapshot,data:O({source:R.ViewportResize},L)}),inputCb:L=>z({type:M.IncrementalSnapshot,data:O({source:R.Input},L)}),mediaInteractionCb:L=>z({type:M.IncrementalSnapshot,data:O({source:R.MediaInteraction},L)}),styleSheetRuleCb:L=>z({type:M.IncrementalSnapshot,data:O({source:R.StyleSheetRule},L)}),styleDeclarationCb:L=>z({type:M.IncrementalSnapshot,data:O({source:R.StyleDeclaration},L)}),canvasMutationCb:Ws,fontCb:L=>z({type:M.IncrementalSnapshot,data:O({source:R.Font},L)}),selectionCb:L=>{z({type:M.IncrementalSnapshot,data:O({source:R.Selection},L)})},customElementCb:L=>{z({type:M.IncrementalSnapshot,data:O({source:R.CustomElement},L)})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskTextClass:o,maskTextSelector:c,maskInputOptions:Se,inlineStylesheet:u,sampling:S,recordDOM:P,recordCanvas:D,inlineImages:Q,userTriggeredOnInput:V,collectFonts:Y,doc:W,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:ve,stylesheetManager:Ce,shadowDomManager:mt,processedNodeManager:wr,canvasManager:Pr,ignoreCSSAttributes:ze,plugins:((le=oe==null?void 0:oe.filter(L=>L.observer))==null?void 0:le.map(L=>({observer:L.observer,options:L.options,callback:br=>z({type:M.Plugin,data:{plugin:L.name,payload:br}})})))||[]},f)};ve.addLoadListener(W=>{try{$.push(re(W.contentDocument))}catch(le){console.warn(le)}});const U=()=>{Vt(),$.push(re(document)),nr=!0};return document.readyState==="interactive"||document.readyState==="complete"?U():($.push(J("DOMContentLoaded",()=>{z({type:M.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&U()})),$.push(J("load",()=>{z({type:M.Load,data:{}}),T==="load"&&U()},window))),()=>{$.forEach(W=>W()),wr.destroy(),nr=!1,Wh()}}catch($){console.warn($)}}be.addCustomEvent=(s,e)=>{if(!nr)throw new Error("please add custom event after start recording");z({type:M.Custom,data:{tag:s,payload:e}})};be.freezePage=()=>{Ie.forEach(s=>s.freeze())};be.takeFullSnapshot=s=>{if(!nr)throw new Error("please take full snapshot after start recording");Vt(s)};be.mirror=se;var ji;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(ji||(ji={}));const{addCustomEvent:Zf}=be,{freezePage:Jf}=be,{takeFullSnapshot:Xf}=be;exports.record=be;
58
+ or you can use record.mirror to access the mirror instance during recording.`;let Li={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&&(Li=new Proxy(Li,{get(s,e,t){return e==="map"&&console.error(Ne),Reflect.get(s,e,t)}}));function ut(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function wr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>wr(s,e,n||{},!0)}let nr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(nr=()=>new Date().getTime());function Io(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=R.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=R.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function xo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ro(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Oo(s){return s?s.nodeType===s.ELEMENT_NODE?s:R.parentElement(s):null}function J(s,e,t,r){if(!s)return!1;const i=Oo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Xt(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Nh(s,e){return e.getId(s)!==-1}function Pr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===et}function Ao(s,e){if(Ke(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=R.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ao(r,e):!0}function fs(s){return!!s.changedTouches}function kh(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Mo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Eo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function ps(s){return s?s instanceof Ts&&"shadowRoot"in s?!!s.shadowRoot:!!R.shadowRoot(s):!1}class Ph{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function $o(s){var e;let t=null;return"getRootNode"in s&&((e=R.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&R.host(R.getRootNode(s))&&(t=R.host(R.getRootNode(s))),t}function Lh(s){let e=s,t;for(;t=$o(e);)e=t;return e}function _h(s){const e=s.ownerDocument;if(!e)return!1;const t=Lh(s);return R.contains(e,t)}function No(s){const e=s.ownerDocument;return e?R.contains(e,s)||_h(s):!1}var $=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))($||{}),O=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(O||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),We=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(We||{}),ke=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(ke||{}),ko=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(ko||{});function _i(s){return"__ln"in s}class Dh{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&_i(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&_i(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Di=(s,e)=>`${s}@${e}`;class Th{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"tempPerfStore",{}),w(this,"processMutations",e=>{const t=performance.now();let r=[];for(const i of e){const n=performance.now();this.processMutation(i);const a=performance.now()-n;r.includes(i.type)||r.push(i.type),i.type in this.tempPerfStore||(this.tempPerfStore[i.type]={avg:0,times:[]}),this.tempPerfStore[i.type].times.push(a),this.tempPerfStore[i.type].times.length>1e3&&this.tempPerfStore[i.type].times.shift(),this.tempPerfStore[i.type].avg=this.tempPerfStore[i.type].times.reduce((l,o)=>l+o,0)/this.tempPerfStore[i.type].times.length}console.log(e.length,"mutations processed in",performance.now()-t,"ms","types:",r),window.temp_perf_store=this.tempPerfStore,this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Dh,i=u=>{let h=u,p=et;for(;p===et;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},n=u=>{const h=R.parentNode(u);if(!h||!No(u))return;let p=!1;if(u.nodeType===Node.TEXT_NODE){const f=h.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(h)&&(p=!0)}const d=Ke(h)?this.mirror.getId($o(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=Le(u,{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:f=>{Mo(f,this.mirror)&&this.iframeManager.addIframe(f),Eo(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ps(u)&&this.shadowDomManager.addShadowRoot(R.shadowRoot(u),this.doc)},onIframeLoad:(f,y)=>{this.iframeManager.attachIframe(f,y),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,y)=>{this.stylesheetManager.attachLinkElement(f,y)},cssCaptured:p});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)Ti(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(R.parentNode(u))||n(u);for(const u of this.addedSet)!Fi(this.droppedSet,u)&&!Ti(this.removesSubTreeCache,u,this.mirror)||Fi(this.movedSet,u)?n(u):this.droppedSet.add(u);let a=null;for(;r.length;){let u=null;if(a){const h=this.mirror.getId(R.parentNode(a.value)),p=i(a.value);h!==-1&&p!==-1&&(u=a)}if(!u){let h=r.tail;for(;h;){const p=h;if(h=h.previous,p){const d=this.mirror.getId(R.parentNode(p.value));if(i(p.value)===-1)continue;if(d!==-1){u=p;break}else{const m=p.value,f=R.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=R.host(f);if(this.mirror.getId(y)!==-1){u=p;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}a=u.previous,r.removeNode(u.value),n(u.value)}const l=[];for(const u of this.texts){const h=u.node,p=R.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&l.push({id:d,value:u.value})}const o=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const p=this.mirror.getId(u.node);!t.has(p)&&this.mirror.has(p)&&o.push({id:p,attributes:h})}const c={texts:l,attributes:o,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(R.childNodes(e),i=>R.textContent(i)||"").join("");t.attributes.value=Yt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Zt(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Pr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=R.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:en(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Oo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const a=Zt(t);i=Yt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(J(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!qi(t.tagName,r))if(n.attributes[r]=Qi(this.doc,Re(t.tagName),Re(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const o=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);o!==a.style.getPropertyValue(l)||c!==a.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=o:n.styleDiff[l]=[o,c]:n._unchangedStyles[l]=[o,c]}for(const l of Array.from(a.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(J(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let t=0;t<e.addedNodes.length;t++)this.genAdds(e.addedNodes[t],e.target);for(let t=0;t<e.removedNodes.length;t++){const r=e.removedNodes[t],i=this.mirror.getId(r),n=Ke(e.target)?this.mirror.getId(R.host(e.target)):this.mirror.getId(e.target);if(J(e.target,this.blockClass,this.blockSelector,!1)||Pr(r,this.mirror,this.slimDOMOptions)||!Nh(r,this.mirror))return;this.addedSet.has(r)?(ds(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&i===-1||Ao(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Di(i,n)]?ds(this.movedSet,r):(this.removes.push({parentId:n,id:i,isShadow:Ke(e.target)&&Qe(e.target)?!0:void 0}),Fh(r,this.removesSubTreeCache))),this.mapRemoves.push(r)}break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Pr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Di(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!J(e,this.blockClass,this.blockSelector,!1)){const r=R.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(ps(e)){const i=R.childNodes(R.shadowRoot(e));for(let n=0;n<i.length;n++){const a=i[n];this.processedNodeManager.add(a,this),this.genAdds(a,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}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 ds(s,e){s.delete(e);const t=R.childNodes(e);for(let r=0;r<t.length;r++)ds(s,t[r])}function Fh(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=R.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Ti(s,e,t){return s.size===0?!1:Bh(s,e)}function Bh(s,e,t){const r=R.parentNode(e);return r?s.has(r):!1}function Fi(s,e){return s.size===0?!1:Po(s,e)}function Po(s,e){const t=R.parentNode(e);return t?s.has(t)?!0:Po(s,t):!1}let qe;function Uh(s){qe=s}function zh(){qe=void 0}const E=s=>qe?(...t)=>{try{return s(...t)}catch(r){if(qe&&qe(r)===!0)return;throw r}}:s,xe=[];function dt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Lo(s,e){const t=new Th;xe.push(t),t.init(s);const r=new(vo())(E(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Wh({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=ut(E(h=>{const p=Date.now()-l;s(a.map(d=>(d.timeOffset-=p,d)),h),a=[],l=null}),n),c=E(ut(E(h=>{const p=dt(h),{clientX:d,clientY:g}=fs(h)?h.changedTouches[0]:h;l||(l=nr()),a.push({x:d,y:g,id:r.getId(p),timeOffset:nr()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?O.Drag:h instanceof MouseEvent?O.MouseMove:O.TouchMove)}),i,{trailing:!1})),u=[Z("mousemove",c,t),Z("touchmove",c,t),Z("drag",c,t)];return E(()=>{u.forEach(h=>h())})}function Gh({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const c=u=>h=>{const p=dt(h);if(J(p,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):pe.Pen}else fs(h)&&(d=pe.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):K[u]===K.Click&&(d=o,o=null);const m=fs(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:y,clientY:S}=m;E(s)(M({type:K[g],id:f,x:y,y:S},d!==null&&{pointerType:d}))};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let h=Re(u);const p=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(Z(h,p,e))}),E(()=>{l.forEach(u=>u())})}function _o({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=E(ut(E(l=>{const o=dt(l);if(!o||J(o,r,i,!0))return;const c=t.getId(o);if(o===e&&e.defaultView){const u=Io(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return Z("scroll",a,e)}function Vh({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=E(ut(E(()=>{const n=xo(),a=Ro();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return Z("resize",i,e)}const jh=["INPUT","TEXTAREA","SELECT"],Bi=new WeakMap;function Hh({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:c,userTriggeredOnInput:u}){function h(S){let C=dt(S);const T=S.isTrusted,b=C&&C.tagName;if(C&&b==="OPTION"&&(C=R.parentElement(C)),!C||!b||jh.indexOf(b)<0||J(C,r,i,!0)||C.classList.contains(n)||a&&C.matches(a))return;let v=C.value,W=!1;const k=Zt(C)||"";k==="radio"||k==="checkbox"?W=C.checked:(l[b.toLowerCase()]||l[k])&&(v=Yt({element:C,maskInputOptions:l,tagName:b,type:k,value:v,maskInputFn:o})),p(C,u?{text:v,isChecked:W,userTriggered:T}:{text:v,isChecked:W});const B=C.name;k==="radio"&&B&&W&&e.querySelectorAll(`input[type="radio"][name="${B}"]`).forEach(V=>{if(V!==C){const Q=V.value;p(V,u?{text:Q,isChecked:!W,userTriggered:!1}:{text:Q,isChecked:!W})}})}function p(S,C){const T=Bi.get(S);if(!T||T.text!==C.text||T.isChecked!==C.isChecked){Bi.set(S,C);const b=t.getId(S);E(s)(ee(M({},C),{id:b}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(S=>Z(S,E(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(S=>S())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...y.map(S=>wr(S[0],S[1],{set(){E(h)({target:this,isTrusted:!1})}},!1,m))),E(()=>{g.forEach(S=>S())})}function or(s){const e=[];function t(r,i){if(Ft("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ft("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ft("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ft("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function ye(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Yh({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:E((u,h,p)=>{const[d,g]=p,{id:m,styleId:f}=ye(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:E((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:E((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:E((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,p)})}));const o={};Bt("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(Bt("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),Bt("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),Bt("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(o).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:E((p,d,g)=>{const[m,f]=g,{id:y,styleId:S}=ye(d.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||S&&S!==-1)&&s({id:y,styleId:S,adds:[{rule:m,index:[...or(d),f||0]}]}),p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:E((p,d,g)=>{const[m]=g,{id:f,styleId:y}=ye(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||y&&y!==-1)&&s({id:f,styleId:y,removes:[{index:[...or(d),m]}]}),p.apply(d,g)})})}),E(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function Do({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(R.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var c;return(c=o.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=o.set)==null?void 0:u.call(this,c);if(a!==null&&a!==-1)try{e.adoptStyleSheets(c,a)}catch(p){}return h}}),E(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Zh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:E((l,o,c)=>{var u;const[h,p,d]=c;if(t.has(h))return n.apply(o,[h,p,d]);const{id:g,styleId:m}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:p,priority:d},index:or(o.parentRule)}),l.apply(o,c)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:E((l,o,c)=>{var u;const[h]=c;if(t.has(h))return a.apply(o,[h]);const{id:p,styleId:d}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:h},index:or(o.parentRule)}),l.apply(o,c)})}),E(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Jh({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=E(o=>ut(E(c=>{const u=dt(c);if(!u||J(u,e,t,!0))return;const{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=u;s({type:o,id:r.getId(u),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[Z("play",a(ke.Play),n),Z("pause",a(ke.Pause),n),Z("seeked",a(ke.Seeked),n),Z("volumechange",a(ke.VolumeChange),n),Z("ratechange",a(ke.RateChange),n)];return E(()=>{l.forEach(o=>o())})}function Xh({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,c,u){const h=new n(o,c,u);return i.set(h,{family:o,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const a=Me(e.fonts,"add",function(l){return function(o){return setTimeout(E(()=>{const c=i.get(o);c&&(s(c),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),E(()=>{r.forEach(l=>l())})}function Kh(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=E(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const c=[],u=o.rangeCount||0;for(let h=0;h<u;h++){const p=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;J(d,r,i,!0)||J(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:c})});return l(),Z("selectionchange",l)}function Qh({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Me(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function qh(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),a(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),o(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function ef(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};qh(s,e);let r;s.recordDOM&&(r=Lo(s,s.doc));const i=Wh(s),n=Gh(s),a=_o(s),l=Vh(s,{win:t}),o=Hh(s),c=Jh(s);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(u=Yh(s,{win:t}),h=Do(s,s.doc),p=Zh(s,{win:t}),s.collectFonts&&(d=Xh(s)));const g=Kh(s),m=Qh(s),f=[];for(const y of s.plugins)f.push(y.observer(y.callback,t,y.options));return E(()=>{xe.forEach(y=>y.reset()),r==null||r.disconnect(),i(),n(),a(),l(),o(),c(),u(),h(),p(),d(),g(),m(),f.forEach(y=>y())})}function Ft(s){return typeof window[s]!="undefined"}function Bt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Ui{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class tf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Ui(Ki)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ui(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case $.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:$.IncrementalSnapshot,data:{source:O.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return t;case $.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case $.IncrementalSnapshot:switch(t.data.source){case O.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case O.Drag:case O.TouchMove:case O.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case O.ViewportResize:return!1;case O.MediaInteraction:case O.MouseInteraction:case O.Scroll:case O.CanvasMutation:case O.Input:return this.replaceIds(t.data,e,["id"]),t;case O.StyleSheetRule:case O.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case O.Font:return t;case O.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case O.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==ko.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class rf{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Qe(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Lo(ee(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(_o(ee(M({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(R.host(e))),this.restoreHandlers.push(Do({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Me(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=R.shadowRoot(this);return l&&No(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var _e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ut=0;Ut<_e.length;Ut++)sf[_e.charCodeAt(Ut)]=Ut;var nf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=_e[e[t]>>2],i+=_e[(e[t]&3)<<4|e[t+1]>>4],i+=_e[(e[t+1]&15)<<2|e[t+2]>>6],i+=_e[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const zi=new Map;function of(s,e){let t=zi.get(s);return t||(t=new Map,zi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const To=(s,e,t)=>{if(!s||!(Bo(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=of(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function jt(s,e,t){if(s instanceof Array)return s.map(r=>jt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=nf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[jt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[jt(s.data,e,t),s.width,s.height]};if(Bo(s,e)||typeof s=="object"){const r=s.constructor.name,i=To(s,e,t);return{rr_type:r,index:i}}}}return s}const Fo=(s,e,t)=>s.map(r=>jt(r,e,t)),Bo=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function af(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Me(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...c){return J(this.canvas,t,r,!0)||setTimeout(()=>{const u=Fo(c,e,this);s(this.canvas,{type:We["2D"],property:a,args:u})},0),o.apply(this,c)}});i.push(l)}catch(l){const o=wr(e.CanvasRenderingContext2D.prototype,a,{set(c){s(this.canvas,{type:We["2D"],property:a,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function lf(s){return s==="experimental-webgl"?"webgl":s}function Wi(s,e,t,r){const i=[];try{const n=Me(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!J(this,e,t,!0)){const c=lf(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(o[0]&&typeof o[0]=="object"){const u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Gi(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const c=Me(s,o,function(u){return function(...h){const p=u.apply(this,h);if(To(p,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){const d=Fo(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return p}});a.push(c)}catch(c){const u=wr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(u)}return a}function uf(s,e,t,r){const i=[];return i.push(...Gi(e.WebGLRenderingContext.prototype,We.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Gi(e.WebGL2RenderingContext.prototype,We.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Uo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",cf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Vi=typeof self!="undefined"&&self.Blob&&new Blob([cf(Uo)],{type:"text/javascript;charset=utf-8"});function hf(s){let e;try{if(e=Vi&&(self.URL||self.webkitURL).createObjectURL(Vi),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Uo,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ff{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=Wi(t,r,i,!0),l=new Map,o=new hf;o.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:y,width:S,height:C}=g.data;this.mutationCb({id:m,type:We["2D"],commands:[{property:"clearRect",args:[0,0,S,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:y}]},0,0]}]})};const c=1e3/e;let u=0,h;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{J(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,p().forEach(async m=>{var f;const y=this.mirror.getId(m);if(l.get(y)||m.width===0||m.height===0)return;if(l.set(y,!0),["webgl","webgl2"].includes(m.__context)){const C=m.getContext(m.__context);((f=C==null?void 0:C.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const S=await createImageBitmap(m);o.postMessage({id:y,bitmap:S,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Wi(e,t,r,!1),n=af(this.processMutation.bind(this),e,t,r),a=uf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const c=a,{type:l}=c;return Ee(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class pf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Ph),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:Zi(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class df{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let G,Ht,Lr,ar=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((js=s.contentWindow)==null?void 0:js.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const re=da();function Se(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:y,sampling:S={},dataURLOptions:C={},mousemoveWait:T,recordDOM:b=!0,recordCanvas:v=!1,recordCrossOriginIframes:W=!1,recordAfter:k=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:B=!1,collectFonts:V=!1,inlineImages:Q=!1,plugins:ne,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:Ge=new Set([]),errorHandler:Ve}=s;Uh(Ve);const j=W?window.parent===window:!0;let q=!1;if(!j)try{window.parent.document&&(q=!1)}catch(P){q=!0}if(j&&!e)throw new Error("emit function is required");if(!j&&!q)return()=>{};T!==void 0&&S.mousemove===void 0&&(S.mousemove=T),re.reset();const ge=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},oe=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};kh();let mt,Ce=0;const Bs=P=>{for(const ae of ne||[])ae.eventProcessor&&(P=ae.eventProcessor(P));return y&&!q&&(P=y(P)),P};G=(P,ae)=>{var ce;const A=P;if(A.timestamp=nr(),(ce=xe[0])!=null&&ce.isFrozen()&&A.type!==$.FullSnapshot&&!(A.type===$.IncrementalSnapshot&&A.data.source===O.Mutation)&&xe.forEach(X=>X.unfreeze()),j)e==null||e(Bs(A),ae);else if(q){const X={type:"rrweb",event:Bs(A),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(X,"*")}if(A.type===$.FullSnapshot)mt=A,Ce=0;else if(A.type===$.IncrementalSnapshot){if(A.data.source===O.Mutation&&A.data.isAttachIframe)return;Ce++;const X=r&&Ce>=r,D=t&&A.timestamp-mt.timestamp>t;(X||D)&&Ht(!0)}};const gt=P=>{G({type:$.IncrementalSnapshot,data:M({source:O.Mutation},P)})},Us=P=>G({type:$.IncrementalSnapshot,data:M({source:O.Scroll},P)}),zs=P=>G({type:$.IncrementalSnapshot,data:M({source:O.CanvasMutation},P)}),zo=P=>G({type:$.IncrementalSnapshot,data:M({source:O.AdoptedStyleSheet},P)}),ve=new pf({mutationCb:gt,adoptedStyleSheetCb:zo}),Ie=new tf({mirror:re,mutationCb:gt,stylesheetManager:ve,recordCrossOriginIframes:W,wrappedEmit:G});for(const P of ne||[])P.getMirror&&P.getMirror({nodeMirror:re,crossOriginIframeMirror:Ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ie.crossOriginIframeStyleMirror});const br=new df;Lr=new ff({recordCanvas:v,mutationCb:zs,win:window,blockClass:i,blockSelector:n,mirror:re,sampling:S.canvas,dataURLOptions:C});const yt=new rf({mutationCb:gt,scrollCb:Us,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:ge,dataURLOptions:C,maskTextFn:m,maskInputFn:g,recordCanvas:v,inlineImages:Q,sampling:S,slimDOMOptions:oe,iframeManager:Ie,stylesheetManager:ve,canvasManager:Lr,keepIframeSrcFn:N,processedNodeManager:br},mirror:re});Ht=(P=!1)=>{if(!b)return;const ae=performance.now();G({type:$.Meta,data:{href:window.location.href,width:Ro(),height:xo()}},P),ve.reset(),yt.init(),xe.forEach(A=>A.lock());const ce=Ua(document,{mirror:re,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:ge,maskTextFn:m,maskInputFn:g,slimDOM:oe,dataURLOptions:C,recordCanvas:v,inlineImages:Q,onSerialize:A=>{Mo(A,re)&&Ie.addIframe(A),Eo(A,re)&&ve.trackLinkElement(A),ps(A)&&yt.addShadowRoot(R.shadowRoot(A),document)},onIframeLoad:(A,X)=>{Ie.attachIframe(A,X),yt.observeAttachShadow(A)},onStylesheetLoad:(A,X)=>{ve.attachLinkElement(A,X)},keepIframeSrcFn:N});if(!ce)return console.warn("Failed to snapshot the document");G({type:$.FullSnapshot,data:{node:ce,initialOffset:Io(window)}},P),xe.forEach(A=>A.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,re.getId(document)),console.log("full snapshot took",performance.now()-ae,"ms")};try{const P=[],ae=A=>{var X;return E(ef)({mutationCb:gt,mousemoveCb:(D,Sr)=>G({type:$.IncrementalSnapshot,data:{source:Sr,positions:D}}),mouseInteractionCb:D=>G({type:$.IncrementalSnapshot,data:M({source:O.MouseInteraction},D)}),scrollCb:Us,viewportResizeCb:D=>G({type:$.IncrementalSnapshot,data:M({source:O.ViewportResize},D)}),inputCb:D=>G({type:$.IncrementalSnapshot,data:M({source:O.Input},D)}),mediaInteractionCb:D=>G({type:$.IncrementalSnapshot,data:M({source:O.MediaInteraction},D)}),styleSheetRuleCb:D=>G({type:$.IncrementalSnapshot,data:M({source:O.StyleSheetRule},D)}),styleDeclarationCb:D=>G({type:$.IncrementalSnapshot,data:M({source:O.StyleDeclaration},D)}),canvasMutationCb:zs,fontCb:D=>G({type:$.IncrementalSnapshot,data:M({source:O.Font},D)}),selectionCb:D=>{G({type:$.IncrementalSnapshot,data:M({source:O.Selection},D)})},customElementCb:D=>{G({type:$.IncrementalSnapshot,data:M({source:O.CustomElement},D)})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskTextClass:o,maskTextSelector:c,maskInputOptions:ge,inlineStylesheet:u,sampling:S,recordDOM:b,recordCanvas:v,inlineImages:Q,userTriggeredOnInput:B,collectFonts:V,doc:A,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:oe,dataURLOptions:C,mirror:re,iframeManager:Ie,stylesheetManager:ve,shadowDomManager:yt,processedNodeManager:br,canvasManager:Lr,ignoreCSSAttributes:Ge,plugins:((X=ne==null?void 0:ne.filter(D=>D.observer))==null?void 0:X.map(D=>({observer:D.observer,options:D.options,callback:Sr=>G({type:$.Plugin,data:{plugin:D.name,payload:Sr}})})))||[]},f)};Ie.addLoadListener(A=>{try{P.push(ae(A.contentDocument))}catch(X){console.warn(X)}});const ce=()=>{Ht(),P.push(ae(document)),ar=!0};return document.readyState==="interactive"||document.readyState==="complete"?ce():(P.push(Z("DOMContentLoaded",()=>{G({type:$.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&ce()})),P.push(Z("load",()=>{G({type:$.Load,data:{}}),k==="load"&&ce()},window))),()=>{P.forEach(A=>A()),br.destroy(),ar=!1,zh()}}catch(P){console.warn(P)}}Se.addCustomEvent=(s,e)=>{if(!ar)throw new Error("please add custom event after start recording");G({type:$.Custom,data:{tag:s,payload:e}})};Se.freezePage=()=>{xe.forEach(s=>s.freeze())};Se.takeFullSnapshot=s=>{if(!ar)throw new Error("please take full snapshot after start recording");Ht(s)};Se.mirror=re;var ji;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(ji||(ji={}));const{addCustomEvent:Zf}=Se,{freezePage:Jf}=Se,{takeFullSnapshot:Xf}=Se;exports.record=Se;
59
59
  ;if (typeof module.exports == "object" && typeof exports == "object") {
60
60
  var __cp = (to, from, except, desc) => {
61
61
  if ((from && typeof from === "object") || typeof from === "function") {