@glimt/record 0.0.47 → 0.0.48

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,61 +1,61 @@
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 sa=Object.defineProperty,ia=Object.defineProperties;var na=Object.getOwnPropertyDescriptors;var Rt=Object.getOwnPropertySymbols;var ei=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable;var Qs=(s,e,t)=>e in s?sa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))ei.call(e,t)&&Qs(s,t,e[t]);if(Rt)for(var t of Rt(e))ti.call(e,t)&&Qs(s,t,e[t]);return s},ee=(s,e)=>ia(s,na(e));var $e=(s,e)=>{var t={};for(var r in s)ei.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Rt)for(var r of Rt(s))e.indexOf(r)<0&&ti.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var oa=Object.defineProperty,aa=(s,e,t)=>e in s?oa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>aa(s,typeof e!="symbol"?e+"":e,t),ri,$=(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||{}),Ue=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ue||{}),Le=(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))(Le||{}),sn=(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))(sn||{});const si={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ii={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ot={},la=()=>!!globalThis.Zone;function Rs(s){if(Ot[s])return Ot[s];const e=globalThis[s],t=e.prototype,r=s in si?si[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 ii?ii[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&&!la())return Ot[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?Ot[s]=c:t}catch(l){return t}}const kr={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(kr[i])return kr[i].call(e);const n=Rs(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(kr[i]=a,a.call(e)):e[t]}const Tr={};function nn(s,e,t){const r=`${s}.${String(t)}`;if(Tr[r])return Tr[r].bind(e);const n=Rs(s)[t];return typeof n!="function"?e[t]:(Tr[r]=n,n.bind(e))}function ua(s){return we("Node",s,"childNodes")}function ca(s){return we("Node",s,"parentNode")}function ha(s){return we("Node",s,"parentElement")}function fa(s){return we("Node",s,"textContent")}function pa(s,e){return nn("Node",s,"contains")(e)}function da(s){return nn("Node",s,"getRootNode")()}function ma(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function ga(s){return s.styleSheets}function ya(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function wa(s,e){return we("Element",s,"querySelector")(e)}function ba(s,e){return we("Element",s,"querySelectorAll")(e)}function on(){return Rs("MutationObserver").constructor}function Oe(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 A={childNodes:ua,parentNode:ca,parentElement:ha,textContent:fa,contains:pa,getRootNode:da,host:ma,styleSheets:ga,shadowRoot:ya,querySelector:wa,querySelectorAll:ba,mutationObserver:on,patch:Oe};var Sa=Object.defineProperty,Ca=(s,e,t)=>e in s?Sa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Be=(s,e,t)=>Ca(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 ni={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},oi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Mt={},va=()=>!!globalThis.Zone;function Os(s){if(Mt[s])return Mt[s];const e=globalThis[s],t=e.prototype,r=s in ni?ni[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 oi?oi[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&&!va())return Mt[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?Mt[s]=c:t}catch(l){return t}}const Lr={};function be(s,e,t){var r;const i=`${s}.${String(t)}`;if(Lr[i])return Lr[i].call(e);const n=Os(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Lr[i]=a,a.call(e)):e[t]}const Pr={};function an(s,e,t){const r=`${s}.${String(t)}`;if(Pr[r])return Pr[r].bind(e);const n=Os(s)[t];return typeof n!="function"?e[t]:(Pr[r]=n,n.bind(e))}function Ia(s){return be("Node",s,"childNodes")}function xa(s){return be("Node",s,"parentNode")}function Aa(s){return be("Node",s,"parentElement")}function Ra(s){return be("Node",s,"textContent")}function Oa(s,e){return an("Node",s,"contains")(e)}function Ma(s){return an("Node",s,"getRootNode")()}function Ea(s){return!s||!("host"in s)?null:be("ShadowRoot",s,"host")}function $a(s){return s.styleSheets}function Na(s){return!s||!("shadowRoot"in s)?null:be("Element",s,"shadowRoot")}function ka(s,e){return be("Element",s,"querySelector")(e)}function Ta(s,e){return be("Element",s,"querySelectorAll")(e)}function La(){return Os("MutationObserver").constructor}function Pa(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:Ia,parentNode:xa,parentElement:Aa,textContent:Ra,contains:Oa,getRootNode:Ma,host:Ea,styleSheets:$a,shadowRoot:Na,querySelector:ka,querySelectorAll:Ta,mutationObserver:La,patch:Pa};function ln(s){return s.nodeType===s.ELEMENT_NODE}function rt(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function st(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function _a(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 Da(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 ir(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=>un(i,t)).join("");return _a(r)}catch(e){return null}}function un(s,e){if(Ba(s)){let t;try{t=ir(s.styleSheet)||Da(s)}catch(r){t=s.cssText}return s.styleSheet.href?ar(t,s.styleSheet.href):t}else{let t=s.cssText;return Ua(s)&&s.selectorText.includes(":")&&(t=Fa(t)),e?ar(t,e):t}}function Fa(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ba(s){return"styleSheet"in s}function Ua(s){return"selectorText"in s}class cn{constructor(){Be(this,"idNodeMap",new Map),Be(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 Wa(){return new cn}function nr({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 ai="__rrweb_original__",za=25e4;function ja(s,e){if(s.width*s.height<za)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function Ga(s,e){if(s.width===0||s.height===0)return!0;const t=ja(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=ai in i?i[ai]:i;for(let a=0;a<s.width;a+=r){const l=Math.min(r,s.width-a);for(let o=0;o<s.height;o+=r){const c=Math.min(r,s.height-o),u=new Uint32Array(n.call(t,a,o,l,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function or(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function hn(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 Va(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ha=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ya=/^(?:[a-z+]+:)?\/\//i,Za=/^www\..*/i,Ja=/^(data:)([^,]*),(.*)/i;function ar(s,e){return(s||"").replace(Ha,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(Ya.test(o)||Za.test(o))return`url(${c}${o}${c})`;if(Ja.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${Va(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 Et(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Xa(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Et(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=Et(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=Et(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=Et(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 Ka(s,e){return Xa(s,e).join("/* rr_split */")}const qa=1e3*30,Ne="data-rrweb-link-cloned",Qa=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],fn=class Jt{constructor(){if(Be(this,"currentHref",null),Be(this,"clones",{}),Be(this,"cleanTimeout",null),Jt.instance)return Jt.instance;Jt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Ne}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let a=t.length-1;a>=0;a--)if(t[a].href===e){r=t[a];break}if(!r)return this.removeCloneNode(e);const i=ir(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Ne}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Ne)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Ne)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){it.cleanTimeout=null,it.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const a=r.split("/").pop();if(a&&a.includes(".")){const[l]=a.split("?"),o=l.split(".").pop();if(o&&Qa.includes(o.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Ne,n),e.setAttribute(Ne,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(it.onCleanTimeout,qa)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};Be(fn,"instance");let el=fn;const it=new el;let tl=1;const rl=new RegExp("[^a-z0-9-_:]"),at=-2;function pn(){return tl++}function sl(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return rl.test(e)?"div":e}let ke,li;const il=/^[^ \t\n\r\u000c]+/,nl=/^[, \t\n\r\u000c]+/;function ol(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(nl),!(t>=e.length);){let n=r(il);if(n.slice(-1)===",")n=_e(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=_e(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 ui=new WeakMap;function _e(s,e){return!e||e.trim()===""?e:Ms(s,e)}function al(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ms(s,e){let t=ui.get(s);if(t||(t=s.createElement("a"),ui.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function dn(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")?_e(s,r):t==="srcset"?ol(s,r):t==="style"?ar(r,Ms(s)):e==="object"&&t==="data"?_e(s,r):r)}function mn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ll(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 lr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?lr(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?lr(Z.parentNode(s),e,t):!1}function gn(s,e,t,r){let i;if(ln(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(lr(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 ul(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 cl(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 hl(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=fl(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 ml(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 dl(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 fl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}const pl=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)};function dl(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=ar(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 ml(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=ll(s,r,i),m=sl(s);let f={};const b=s.attributes.length;for(let y=0;y<b;y++){const C=s.attributes[y];mn(m,C.name,C.value)||(f[C.name]=dn(t,m,Re(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets);let C=null;for(let x=0;x<y.length;x++)if(y[x].href===s.href){C=y[x];break}let R=null;if(C&&(R=ir(C)),R||(R=it.getClonedCssTextIfAvailable(s.href)),R)delete f.rel,delete f.href,f._cssText=R;else{const x=`css-request-${Math.random().toString(36).slice(2)}`;it.requestClone({forElement:s,requestCssId:x}),f._requestCssId=x}}if(m==="style"&&s.sheet){let y=ir(s.sheet);y&&(s.childNodes.length>1&&(y=Ka(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=nr({element:s,type:or(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){let y="getContext"in s?s.getContext("2d"):null;if(y!=null)Ga(s,y)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(s.width!==0&&s.height!==0){const C=s.toDataURL(o.type,o.quality);f.rr_dataURL=C,pl(()=>{try{const R=t.createElement("canvas");R.width=s.width,R.height=s.height;const x=R.toDataURL(o.type,o.quality);C===x&&delete f.rr_dataURL}catch(R){}})}}if(m==="img"&&c){ke||(ke=t.createElement("canvas"),li=ke.getContext("2d"));let y=s.cloneNode(!0);const C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",R=()=>{y=null},x=()=>{y.removeEventListener("load",x),y.removeEventListener("error",z);try{ke.width=y.naturalWidth,ke.height=y.naturalHeight,li.drawImage(y,0,0),f.rr_dataURL=ke.toDataURL(o.type,o.quality)}catch(P){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?x():(y.addEventListener("load",x),y.addEventListener("error",z));return}else console.warn(`Cannot inline img src=${C}! Error: ${P}`)}R()},z=()=>{y.removeEventListener("load",x),y.removeEventListener("error",z),R()};y.complete&&y.naturalWidth!==0?x():(y.addEventListener("load",x),y.addEventListener("error",z))}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:al(s)||void 0,needBlock:g,rootId:d,isCustom:S}}function _(s){return s==null?"":s.toLowerCase()}function gl(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"&&hn(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 De(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:R=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:z=!1,cssCaptured:P=!1}=e;let{needsMask:j}=e,{preserveWhiteSpace:Y=!0}=e;j||(j=gn(s,a,l,j===void 0));const q=hl(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:x,newlyAddedElement:z,cssCaptured:P});if(!q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):gl(q,d)||!Y&&q.type===H.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=at:oe=pn();const N=Object.assign(q,{id:oe});if(r.add(s,N),oe===at)return null;b&&b(s);let Ye=!o;if(N.type===H.Element){Ye=Ye&&!N.needBlock,delete N.needBlock;const V=Z.shadowRoot(s);V&&st(V)&&(N.isShadowHost=!0)}if((N.type===H.Document||N.type===H.Element)&&Ye){d.headWhitespace&&N.type===H.Element&&N.tagName==="head"&&(Y=!1);const V={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,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:R,keepIframeSrcFn:x,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"&&(V.cssCaptured=!0);for(const ge of Array.from(Z.childNodes(s))){const ae=De(ge,V);ae&&N.childNodes.push(ae)}}let Q=null;if(ln(s)&&(Q=Z.shadowRoot(s))){const ge=Z.childNodes(Q);for(let ae=0;ae<ge.length;ae++){const vt=ge[ae],Ce=De(vt,V);Ce&&(st(Q)&&(Ce.isShadow=!0),N.childNodes.push(Ce))}}}const Ze=Z.parentNode(s);return Ze&&rt(Ze)&&st(Ze)&&(N.isShadow=!0),N.type===H.Element&&N.tagName==="iframe"&&ul(s,()=>{const V=s.contentDocument;if(V&&S){const Q=De(V,{doc:V,mirror:r,blockClass:i,blockSelector:n,needsMask:j,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:R,keepIframeSrcFn:x});Q&&S(s,Q)}},y),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"&&hn(N.attributes.href)==="css")&&cl(s,()=>{if(C){const V=De(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,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:R,keepIframeSrcFn:x});V&&C(s,V)}},R),N}function yl(s,e){const{mirror:t=new cn,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:R=()=>!1}=e||{};return De(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:R,newlyAddedElement:!1})}function wl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function bl(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 Es={exports:{}},v=String,yn=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}};Es.exports=yn();Es.exports.createColors=yn;var Sl=Es.exports;const Cl={},vl=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"})),ie=bl(vl);let ci=Sl,hi=ie,Yr=class wn 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,wn)}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=ci.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=ci.createColors(!0);i=d=>u(p(d)),r=d=>h(d),hi&&(n=d=>hi(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)+`
2
+ "use strict";var zo=Object.defineProperty,Go=Object.defineProperties;var Vo=Object.getOwnPropertyDescriptors;var wt=Object.getOwnPropertySymbols;var Vs=Object.prototype.hasOwnProperty,js=Object.prototype.propertyIsEnumerable;var Gs=(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={}))Vs.call(e,t)&&Gs(s,t,e[t]);if(wt)for(var t of wt(e))js.call(e,t)&&Gs(s,t,e[t]);return s},ee=(s,e)=>Go(s,Vo(e));var Me=(s,e)=>{var t={};for(var r in s)Vs.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&&js.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),Hs,A=(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))(A||{}),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||{}),he=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(he||{}),Le=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Le||{}),Ee=(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))(Ee||{}),ji=(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))(ji||{});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={},Yo=()=>!!globalThis.Zone;function gs(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&&!Yo())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 vr={};function ge(s,e,t){var r;const i=`${s}.${String(t)}`;if(vr[i])return vr[i].call(e);const n=gs(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(vr[i]=a,a.call(e)):e[t]}const Ir={};function Hi(s,e,t){const r=`${s}.${String(t)}`;if(Ir[r])return Ir[r].bind(e);const n=gs(s)[t];return typeof n!="function"?e[t]:(Ir[r]=n,n.bind(e))}function Zo(s){return ge("Node",s,"childNodes")}function Jo(s){return ge("Node",s,"parentNode")}function Xo(s){return ge("Node",s,"parentElement")}function Ko(s){return ge("Node",s,"textContent")}function Qo(s,e){return Hi("Node",s,"contains")(e)}function qo(s){return Hi("Node",s,"getRootNode")()}function ea(s){return!s||!("host"in s)?null:ge("ShadowRoot",s,"host")}function ta(s){return s.styleSheets}function ra(s){return!s||!("shadowRoot"in s)?null:ge("Element",s,"shadowRoot")}function sa(s,e){return ge("Element",s,"querySelector")(e)}function ia(s,e){return ge("Element",s,"querySelectorAll")(e)}function Yi(){return gs("MutationObserver").constructor}function xe(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:Zo,parentNode:Jo,parentElement:Xo,textContent:Ko,contains:Qo,getRootNode:qo,host:ea,styleSheets:ta,shadowRoot:ra,querySelector:sa,querySelectorAll:ia,mutationObserver:Yi,patch:xe};var na=Object.defineProperty,oa=(s,e,t)=>e in s?na(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Js=(s,e,t)=>oa(s,typeof e!="symbol"?e+"":e,t),Y=(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))(Y||{});const Xs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ks={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},St={},aa=()=>!!globalThis.Zone;function ys(s){if(St[s])return St[s];const e=globalThis[s],t=e.prototype,r=s in Xs?Xs[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 Ks?Ks[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&&!aa())return St[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?St[s]=c:t}catch(l){return t}}const xr={};function ye(s,e,t){var r;const i=`${s}.${String(t)}`;if(xr[i])return xr[i].call(e);const n=ys(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(xr[i]=a,a.call(e)):e[t]}const Rr={};function Zi(s,e,t){const r=`${s}.${String(t)}`;if(Rr[r])return Rr[r].bind(e);const n=ys(s)[t];return typeof n!="function"?e[t]:(Rr[r]=n,n.bind(e))}function la(s){return ye("Node",s,"childNodes")}function ua(s){return ye("Node",s,"parentNode")}function ca(s){return ye("Node",s,"parentElement")}function ha(s){return ye("Node",s,"textContent")}function fa(s,e){return Zi("Node",s,"contains")(e)}function pa(s){return Zi("Node",s,"getRootNode")()}function da(s){return!s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function ma(s){return s.styleSheets}function ga(s){return!s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function ya(s,e){return ye("Element",s,"querySelector")(e)}function wa(s,e){return ye("Element",s,"querySelectorAll")(e)}function ba(){return ys("MutationObserver").constructor}function Sa(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:la,parentNode:ua,parentElement:ca,textContent:ha,contains:fa,getRootNode:pa,host:da,styleSheets:ma,shadowRoot:ga,querySelector:ya,querySelectorAll:wa,mutationObserver:ba,patch:Sa};function Ji(s){return s.nodeType===s.ELEMENT_NODE}function Ke(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Qe(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ca(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 va(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 Tr(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=>Xi(i,t)).join("");return Ca(r)}catch(e){return null}}function Xi(s,e){if(xa(s)){let t;try{t=Tr(s.styleSheet)||va(s)}catch(r){t=s.cssText}return s.styleSheet.href?Xt(t,s.styleSheet.href):t}else{let t=s.cssText;return Ra(s)&&s.selectorText.includes(":")&&(t=Ia(t)),e?Xt(t,e):t}}function Ia(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function xa(s){return"styleSheet"in s}function Ra(s){return"selectorText"in s}class Ki{constructor(){Js(this,"idNodeMap",new Map),Js(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 Oa(){return new Ki}function Zt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&Ie(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function Ie(s){return s.toLowerCase()}const Qs="__rrweb_original__",Ma=25e4;function Aa(s,e){if(s.width*s.height<Ma)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function Ea(s,e){if(s.width===0||s.height===0)return!0;const t=Aa(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=Qs in i?i[Qs]:i;for(let a=0;a<s.width;a+=r){const l=Math.min(r,s.width-a);for(let o=0;o<s.height;o+=r){const c=Math.min(r,s.height-o),u=new Uint32Array(n.call(t,a,o,l,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function Jt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ie(e):null}function Qi(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 $a(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Na=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ka=/^(?:[a-z+]+:)?\/\//i,Pa=/^www\..*/i,La=/^(data:)([^,]*),(.*)/i;function Xt(s,e){return(s||"").replace(Na,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(ka.test(o)||Pa.test(o))return`url(${c}${o}${c})`;if(La.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${$a(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const m of h)m!=="."&&(m===".."?u.pop():u.push(m));return`url(${c}${u.join("/")}${c})`})}function Ct(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Da(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Ct(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=Ct(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 m=c.substring(0,h),d=a.split(m),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[o-1].textContent!=="")g=a.indexOf(m,1);else if(d.length===1){if(m=m.substring(0,m.length-1),d=a.split(m),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=a.indexOf(m));if(d.length>=2&&h>u){const p=r[o-1].textContent;if(p&&typeof p=="string"){const f=Ct(p).length;g=a.indexOf(m,f)}g===-1&&(g=d[0].length)}if(g!==-1){let p=Math.floor(g/l);for(;p>0&&p<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Ct(s.substring(0,p),t);if(f.length===g){i.push(s.substring(0,p)),s=s.substring(p),a=a.substring(g);break}else f.length<g?p+=Math.max(1,Math.floor((g-f.length)/l)):p-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function Ta(s,e){return Da(s,e).join("/* rr_split */")}let _a=1;const Fa=new RegExp("[^a-z0-9-_:]"),et=-2;function qi(){return _a++}function Ba(s){if(s instanceof HTMLFormElement)return"form";const e=Ie(s.tagName);return Fa.test(e)?"div":e}let Ae,qs;const Ua=/^[^ \t\n\r\u000c]+/,Wa=/^[, \t\n\r\u000c]+/;function za(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(Wa),!(t>=e.length);){let n=r(Ua);if(n.slice(-1)===",")n=Ne(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=Ne(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 ei=new WeakMap;function Ne(s,e){return!e||e.trim()===""?e:ws(s,e)}function Ga(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function ws(s,e){let t=ei.get(s);if(t||(t=s.createElement("a"),ei.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function en(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")?Ne(s,r):t==="srcset"?za(s,r):t==="style"?Xt(r,ws(s)):e==="object"&&t==="data"?Ne(s,r):r)}function tn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Va(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 Kt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Kt(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?Kt(Z.parentNode(s),e,t):!1}function rn(s,e,t,r){let i;if(Ji(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(Kt(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 ja(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 Ha(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 Ya(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:a,inlineStylesheet:l,maskInputOptions:o={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p=!1,cssCaptured:f=!1}=e,b=Za(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:b};case s.ELEMENT_NODE:return Ka(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:o,maskInputFn:u,dataURLOptions:h,inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p,rootId:b});case s.TEXT_NODE:return Xa(s,{doc:t,needsMask:a,maskTextFn:c,rootId:b,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:b};case s.COMMENT_NODE:return{type:Y.Comment,textContent:Z.textContent(s)||"",rootId:b};default:return!1}}function Za(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}const Ja=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)};function Xa(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=Xt(o,ws(e.doc)))),!c&&!u&&o&&t&&(o=r?r(o,Z.parentElement(s)):o.replace(/[\S]/g,"*")),{type:Y.Text,textContent:o||"",rootId:i}}function Ka(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:o={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:d}=e,g=Va(s,r,i),p=Ba(s);let f={};const b=s.attributes.length;for(let y=0;y<b;y++){const C=s.attributes[y];tn(p,C.name,C.value)||(f[C.name]=en(t,p,Ie(C.name),C.value))}if(p==="link"&&n){const y=Array.from(t.styleSheets).find($=>$.href===s.href);let C=null;y&&(C=Tr(y)),C&&(delete f.rel,delete f.href,f._cssText=C)}if(p==="style"&&s.sheet){let y=Tr(s.sheet);y&&(s.childNodes.length>1&&(y=Ta(y,s)),f._cssText=y)}if(p==="input"||p==="textarea"||p==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Zt({element:s,type:Jt(s),tagName:p,value:y,maskInputOptions:a,maskInputFn:l}):C&&(f.checked=C)}if(p==="option"&&(s.selected&&!a.select?f.selected=!0:delete f.selected),p==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&u){let y="getContext"in s?s.getContext("2d"):null;if(y!=null)Ea(s,y)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(s.width!==0&&s.height!==0){const C=s.toDataURL(o.type,o.quality);f.rr_dataURL=C,Ja(()=>{try{const $=t.createElement("canvas");$.width=s.width,$.height=s.height;const _=$.toDataURL(o.type,o.quality);C===_&&delete f.rr_dataURL}catch($){}})}}if(p==="img"&&c){Ae||(Ae=t.createElement("canvas"),qs=Ae.getContext("2d"));let y=s;const C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",$=y.naturalHeight,_=y.naturalWidth,V=()=>{y=null},N=()=>{y.removeEventListener("error",F);try{Ae.width=_,Ae.height=$,qs.drawImage(y,0,0),f.rr_dataURL=Ae.toDataURL(o.type,o.quality)}catch(j){if(y.crossOrigin!=="anonymous"){y=new Image,y.src=C,y.crossOrigin="anonymous",y.height=$,y.width=_,y.complete&&y.naturalWidth!==0?N():(y.addEventListener("load",N,{once:!0}),y.addEventListener("error",F,{once:!0}));return}else console.warn(`Cannot inline img src=${C}! Error: ${j}`)}V()},F=()=>{y.removeEventListener("load",N),V()};y.complete&&y.naturalWidth!==0?N():(y.addEventListener("load",N,{once:!0}),y.addEventListener("error",F,{once:!0}))}if(p==="audio"||p==="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(m||(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`}}p==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let S;try{customElements.get(p)&&(S=!0)}catch(y){}return{type:Y.Element,tagName:p,attributes:f,childNodes:[],isSVG:Ga(s)||void 0,needBlock:g,rootId:d,isCustom:S}}function T(s){return s==null?"":s.toLowerCase()}function Qa(s,e){if(e.comment&&s.type===Y.Comment)return!0;if(s.type===Y.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"&&Qi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(T(s.attributes.name).match(/^msapplication-tile(image|color)$/)||T(s.attributes.name)==="application-name"||T(s.attributes.rel)==="icon"||T(s.attributes.rel)==="apple-touch-icon"||T(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&T(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(T(s.attributes.property).match(/^(og|twitter|fb):/)||T(s.attributes.name).match(/^(og|twitter):/)||T(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(T(s.attributes.name)==="robots"||T(s.attributes.name)==="googlebot"||T(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(T(s.attributes.name)==="author"||T(s.attributes.name)==="generator"||T(s.attributes.name)==="framework"||T(s.attributes.name)==="publisher"||T(s.attributes.name)==="progid"||T(s.attributes.property).match(/^article:/)||T(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(T(s.attributes.name)==="google-site-verification"||T(s.attributes.name)==="yandex-verification"||T(s.attributes.name)==="csrf-token"||T(s.attributes.name)==="p:domain_verify"||T(s.attributes.name)==="verify-v1"||T(s.attributes.name)==="verification"||T(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ke(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:m,slimDOMOptions:d,dataURLOptions:g={},inlineImages:p=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:$=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:V=!1,cssCaptured:N=!1}=e;let{needsMask:F}=e,{preserveWhiteSpace:j=!0}=e;F||(F=rn(s,a,l,F===void 0));const Q=Ya(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:F,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,keepIframeSrcFn:_,newlyAddedElement:V,cssCaptured:N});if(!Q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):Qa(Q,d)||!j&&Q.type===Y.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=et:oe=qi();const E=Object.assign(Q,{id:oe});if(r.add(s,E),oe===et)return null;b&&b(s);let We=!o;if(E.type===Y.Element){We=We&&!E.needBlock,delete E.needBlock;const H=Z.shadowRoot(s);H&&Qe(H)&&(E.isShadowHost=!0)}if((E.type===Y.Document||E.type===Y.Element)&&We){d.headWhitespace&&E.type===Y.Element&&E.tagName==="head"&&(j=!1);const H={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:F,maskTextClass:a,maskTextSelector:l,skipChild:o,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:j,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:$,keepIframeSrcFn:_,cssCaptured:!1};if(!(E.type===Y.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===Y.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(H.cssCaptured=!0);for(const de of Array.from(Z.childNodes(s))){const ae=ke(de,H);ae&&E.childNodes.push(ae)}}let q=null;if(Ji(s)&&(q=Z.shadowRoot(s))){const de=Z.childNodes(q);for(let ae=0;ae<de.length;ae++){const mt=de[ae],be=ke(mt,H);be&&(Qe(q)&&(be.isShadow=!0),E.childNodes.push(be))}}}const ze=Z.parentNode(s);return ze&&Ke(ze)&&Qe(ze)&&(E.isShadow=!0),E.type===Y.Element&&E.tagName==="iframe"&&ja(s,()=>{const H=s.contentDocument;if(H&&S){const q=ke(H,{doc:H,mirror:r,blockClass:i,blockSelector:n,needsMask:F,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:j,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:$,keepIframeSrcFn:_});q&&S(s,q)}},y),E.type===Y.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&Qi(E.attributes.href)==="css")&&Ha(s,()=>{if(C){const H=ke(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:F,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:j,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:$,keepIframeSrcFn:_});H&&C(s,H)}},$),E}function qa(s,e){const{mirror:t=new Ki,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:m,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:$=()=>!1}=e||{};return ke(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:m,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:p,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:$,newlyAddedElement:!1})}function el(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function tl(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 bs={exports:{}},v=String,sn=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}};bs.exports=sn();bs.exports.createColors=sn;var rl=bs.exports;const sl={},il=Object.freeze(Object.defineProperty({__proto__:null,default:sl},Symbol.toStringTag,{value:"Module"})),ie=tl(il);let ti=rl,ri=ie,_r=class nn 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,nn)}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=ti.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:m}=ti.createColors(!0);i=d=>u(m(d)),r=d=>h(d),ri&&(n=d=>ri(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 m=l+1+h,d=" "+(" "+m).slice(-c)+" | ";if(m===this.line){if(u.length>160){let p=20,f=Math.max(0,this.column-p),b=Math.max(this.column+p,this.endColumn+p),S=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,p-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
3
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)+`
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 $s=Yr;Yr.default=Yr;const fi={after:`
8
+ `),this.name+": "+this.message+e}};var Ss=_r;_r.default=_r;const si={after:`
9
9
  `,beforeClose:`
10
10
  `,beforeComment:`
11
11
  `,beforeDecl:`
12
12
  `,beforeOpen:" ",beforeRule:`
13
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Il(s){return s[0].toUpperCase()+s.slice(1)}let Zr=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(`
14
- `)){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 fi[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"+Il(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=fi[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(`
13
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function nl(s){return s[0].toUpperCase()+s.slice(1)}let Fr=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(`
14
+ `)){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 si[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"+nl(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=si[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(`
15
15
  `)&&(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(`
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 bn=Zr;Zr.default=Zr;let xl=bn;function Jr(s,e){new xl(e).stringify(s)}var br=Jr;Jr.default=Jr;var yt={};yt.isClean=Symbol("isClean");yt.my=Symbol("my");let Al=$s,Rl=bn,Ol=br,{isClean:Je,my:Ml}=yt;function Xr(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=>Xr(a,t)):(n==="object"&&i!==null&&(i=Xr(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 Kr=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Je]=!1,this[Ml]=!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=Xr(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 Al(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 Rl().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=Ol){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 Sr=Kr;Kr.default=Kr;let El=Sr,qr=class extends El{constructor(e){super(e),this.type="comment"}};var Cr=qr;qr.default=qr;let $l=Sr,Qr=class extends $l{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 vr=Qr;Qr.default=Qr;let Sn=Cr,Cn=vr,Nl=Sr,{isClean:vn,my:In}=yt,Ns,xn,An,ks;function Rn(s){return s.map(e=>(e.nodes&&(e.nodes=Rn(e.nodes)),delete e.source,e))}function On(s){if(s[vn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)On(e)}let de=class Mn extends Nl{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=Rn(xn(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 Cn(e)]}else if(e.selector||e.selectors)e=[new ks(e)];else if(e.name)e=[new Ns(e)];else if(e.text)e=[new Sn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[In]||Mn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[vn]&&On(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=>{xn=s};de.registerRule=s=>{ks=s};de.registerAtRule=s=>{Ns=s};de.registerRoot=s=>{An=s};var Me=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ns.prototype):s.type==="rule"?Object.setPrototypeOf(s,ks.prototype):s.type==="decl"?Object.setPrototypeOf(s,Cn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Sn.prototype):s.type==="root"&&Object.setPrototypeOf(s,An.prototype),s[In]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};let En=Me,ur=class extends En{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 Ts=ur;ur.default=ur;En.registerAtRule(ur);let kl=Me,$n,Nn,lt=class extends kl{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new $n(new Nn,this,e).stringify()}};lt.registerLazyResult=s=>{$n=s};lt.registerProcessor=s=>{Nn=s};var Ls=lt;lt.default=lt;let Tl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ll=(s=21)=>{let e="",t=s|0;for(;t--;)e+=Tl[Math.random()*64|0];return e};var Pl={nanoid:Ll};let{existsSync:_l,readFileSync:Dl}=ie,{dirname:_r,join:Fl}=ie,{SourceMapConsumer:pi,SourceMapGenerator:di}=ie;function Bl(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let es=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=_r(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new pi(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 Bl(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=_r(e),_l(e))return this.mapFile=e,Dl(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 pi)return di.fromSourceMap(t).toString();if(t instanceof di)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=Fl(_r(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 kn=es;es.default=es;let{nanoid:Ul}=Pl,{isAbsolute:ts,resolve:rs}=ie,{SourceMapConsumer:Wl,SourceMapGenerator:zl}=ie,{fileURLToPath:mi,pathToFileURL:$t}=ie,gi=$s,jl=kn,Dr=ie,Fr=Symbol("lineToIndexCache"),Gl=!!(Wl&&zl),yi=!!(rs&&ts);function wi(s){if(s[Fr])return s[Fr];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[Fr]=t,t}let cr=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&&(!yi||/^\w+:\/\//.test(t.from)||ts(t.from)?this.file=t.from:this.file=rs(t.from)),yi&&Gl){let r=new jl(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 gi(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 gi(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&&($t&&(c.input.url=$t(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return wi(this)[e-1]+t-1}fromOffset(e){let t=wi(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:rs(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;ts(a.source)?o=$t(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||$t(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(mi)c.file=mi(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 Ir=cr;cr.default=cr;Dr&&Dr.registerInput&&Dr.registerInput(cr);let Tn=Me,Ln,Pn,We=class extends Tn{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 Ln(new Pn,this,e).stringify()}};We.registerLazyResult=s=>{Ln=s};We.registerProcessor=s=>{Pn=s};var wt=We;We.default=We;Tn.registerRoot(We);let ut={comma(s){return ut.split(s,[","],!0)},space(s){let e=[" ",`
23
- `," "];return ut.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 _n=ut;ut.default=ut;let Dn=Me,Vl=_n,hr=class extends Dn{get selectors(){return Vl.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=hr;hr.default=hr;Dn.registerRule(hr);let Hl=Ts,Yl=Cr,Zl=vr,Jl=Ir,Xl=kn,Kl=wt,ql=Ps;function ct(s,e){if(Array.isArray(s))return s.map(a=>ct(a));let i=s,{inputs:t}=i,r=$e(i,["inputs"]);if(t){e=[];for(let a of t){let l=ee(M({},a),{__proto__:Jl.prototype});l.map&&(l.map=ee(M({},l.map),{__proto__:Xl.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>ct(a,e))),r.source){let n=r.source,{inputId:a}=n,l=$e(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Kl(r);if(r.type==="decl")return new Zl(r);if(r.type==="rule")return new ql(r);if(r.type==="comment")return new Yl(r);if(r.type==="atrule")return new Hl(r);throw new Error("Unknown node type: "+s.type)}var Ql=ct;ct.default=ct;let{dirname:Xt,relative:Fn,resolve:Bn,sep:Un}=ie,{SourceMapConsumer:Wn,SourceMapGenerator:Kt}=ie,{pathToFileURL:bi}=ie,eu=Ir,tu=!!(Wn&&Kt),ru=!!(Xt&&Bn&&Fn&&Un),su=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 on=Fr;Fr.default=Fr;let ol=on;function Br(s,e){new ol(e).stringify(s)}var ur=Br;Br.default=Br;var ct={};ct.isClean=Symbol("isClean");ct.my=Symbol("my");let al=Ss,ll=on,ul=ur,{isClean:Ge,my:cl}=ct;function Ur(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=>Ur(a,t)):(n==="object"&&i!==null&&(i=Ur(i)),t[r]=i)}return t}function Ve(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 Wr=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ge]=!1,this[cl]=!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=Ur(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 al(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[Ge]=!0}markDirty(){if(this[Ge]){this[Ge]=!1;let e=this;for(;e=e.parent;)e[Ge]=!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(Ve(r,this.source.start),Ve(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=Ve(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}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,a=i.slice(Ve(i,this.source.start),Ve(i,this.source.end)).indexOf(e.word);a!==-1&&(t=this.positionInside(a),r=this.positionInside(a+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new ll().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"){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=ul){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 cr=Wr;Wr.default=Wr;let hl=cr,zr=class extends hl{constructor(e){super(e),this.type="comment"}};var hr=zr;zr.default=zr;let fl=cr,Gr=class extends fl{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 fr=Gr;Gr.default=Gr;let an=hr,ln=fr,pl=cr,{isClean:un,my:cn}=ct,Cs,hn,fn,vs;function pn(s){return s.map(e=>(e.nodes&&(e.nodes=pn(e.nodes)),delete e.source,e))}function dn(s){if(s[un]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)dn(e)}let fe=class mn extends pl{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=pn(hn(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 ln(e)]}else if(e.selector||e.selectors)e=[new vs(e)];else if(e.name)e=[new Cs(e)];else if(e.text)e=[new an(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[cn]||mn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[un]&&dn(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)}))}};fe.registerParse=s=>{hn=s};fe.registerRule=s=>{vs=s};fe.registerAtRule=s=>{Cs=s};fe.registerRoot=s=>{fn=s};var Re=fe;fe.default=fe;fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Cs.prototype):s.type==="rule"?Object.setPrototypeOf(s,vs.prototype):s.type==="decl"?Object.setPrototypeOf(s,ln.prototype):s.type==="comment"?Object.setPrototypeOf(s,an.prototype):s.type==="root"&&Object.setPrototypeOf(s,fn.prototype),s[cn]=!0,s.nodes&&s.nodes.forEach(e=>{fe.rebuild(e)})};let gn=Re,Qt=class extends gn{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 Is=Qt;Qt.default=Qt;gn.registerAtRule(Qt);let dl=Re,yn,wn,tt=class extends dl{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new yn(new wn,this,e).stringify()}};tt.registerLazyResult=s=>{yn=s};tt.registerProcessor=s=>{wn=s};var xs=tt;tt.default=tt;let ml="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",gl=(s=21)=>{let e="",t=s|0;for(;t--;)e+=ml[Math.random()*64|0];return e};var yl={nanoid:gl};let{existsSync:wl,readFileSync:bl}=ie,{dirname:Or,join:Sl}=ie,{SourceMapConsumer:ii,SourceMapGenerator:ni}=ie;function Cl(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Vr=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 ii(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 Cl(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),wl(e))return this.mapFile=e,bl(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 ii)return ni.fromSourceMap(t).toString();if(t instanceof ni)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=Sl(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 bn=Vr;Vr.default=Vr;let{nanoid:vl}=yl,{isAbsolute:jr,resolve:Hr}=ie,{SourceMapConsumer:Il,SourceMapGenerator:xl}=ie,{fileURLToPath:oi,pathToFileURL:vt}=ie,ai=Ss,Rl=bn,Mr=ie,Ar=Symbol("fromOffsetCache"),Ol=!!(Il&&xl),li=!!(Hr&&jr),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&&(!li||/^\w+:\/\//.test(t.from)||jr(t.from)?this.file=t.from:this.file=Hr(t.from)),li&&Ol){let r=new Rl(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 "+vl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,r=h.col}else t=c.line,r=c.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);a=h.line,n=h.col}else a=u.line,n=u.column}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col}let o=this.origin(t,r,a,n);return o?l=new ai(e,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,i.plugin):l=new ai(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),l.input={column:r,endColumn:n,endLine:a,line:t,source:this.css},this.file&&(vt&&(l.input.url=vt(this.file).toString()),l.input.file=this.file),l}fromOffset(e){let t,r;if(this[Ar])r=this[Ar];else{let n=this.css.split(`
22
+ `);r=new Array(n.length);let a=0;for(let l=0,o=n.length;l<o;l++)r[l]=a,a+=n[l].length+1;this[Ar]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<r[a])n=a-1;else if(e>=r[a+1])i=a+1;else{i=a;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Hr(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;jr(a.source)?o=vt(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||vt(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(oi)c.file=oi(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 pr=qt;qt.default=qt;Mr&&Mr.registerInput&&Mr.registerInput(qt);let Sn=Re,Cn,vn,De=class extends Sn{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 Cn(new vn,this,e).stringify()}};De.registerLazyResult=s=>{Cn=s};De.registerProcessor=s=>{vn=s};var ht=De;De.default=De;Sn.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 In=rt;rt.default=rt;let xn=Re,Ml=In,er=class extends xn{get selectors(){return Ml.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 Rs=er;er.default=er;xn.registerRule(er);let Al=Is,El=hr,$l=fr,Nl=pr,kl=bn,Pl=ht,Ll=Rs;function st(s,e){if(Array.isArray(s))return s.map(a=>st(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__:Nl.prototype});l.map&&(l.map=ee(O({},l.map),{__proto__:kl.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=Me(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Pl(r);if(r.type==="decl")return new $l(r);if(r.type==="rule")return new Ll(r);if(r.type==="comment")return new El(r);if(r.type==="atrule")return new Al(r);throw new Error("Unknown node type: "+s.type)}var Dl=st;st.default=st;let{dirname:Wt,relative:Rn,resolve:On,sep:Mn}=ie,{SourceMapConsumer:An,SourceMapGenerator:zt}=ie,{pathToFileURL:ui}=ie,Tl=pr,_l=!!(An&&zt),Fl=!!(Wt&&On&&Rn&&Mn),Bl=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||Xt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Wn(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(),ru&&tu&&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=Kt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Kt({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 Kt({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?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(Bn(r,this.mapOpts.annotation)));let i=Fn(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 eu(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(bi){let r=bi(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;Un==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var zn=su;const Br=39,Si=34,Nt=92,Ci=47,kt=10,Xe=32,Tt=12,Lt=9,Pt=13,iu=91,nu=93,ou=40,au=41,lu=123,uu=125,cu=59,hu=42,fu=58,pu=64,_t=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,du=/.[\r\n"'(/\\]/,vi=/[\da-f]/i;var mu=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(P){throw e.error("Unclosed "+P,f)}function R(){return S.length===0&&f>=m}function x(P){if(S.length)return S.pop();if(f>=m)return;let j=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case kt:case Xe:case Lt:case Pt:case Tt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Xe||n===kt||n===Lt||n===Pt||n===Tt);u=["space",r.slice(f,o)],f=o-1;break}case iu:case nu:case lu:case uu:case fu:case cu:case au:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case ou:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Br&&d!==Si&&d!==Xe&&d!==kt&&d!==Lt&&d!==Tt&&d!==Pt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||j){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Nt;)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||du.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Br:case Si:{c=n===Br?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||j){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Nt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case pu:{_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 Nt:{for(o=f,l=!0;r.charCodeAt(o+1)===Nt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Ci&&n!==Xe&&n!==kt&&n!==Lt&&n!==Pt&&n!==Tt&&(o+=1,vi.test(r.charAt(o)))){for(;vi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Xe&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ci&&r.charCodeAt(f+1)===hu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||j?o=r.length:C("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],b.push(u),f=o);break}}return f++,u}function z(P){S.push(P)}return{back:z,endOfFile:R,nextToken:x,position:y}};let gu=Ts,yu=Cr,wu=vr,bu=wt,Ii=Ps,Su=mu;const xi={empty:!0,space:!0};function Cu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let vu=class{constructor(e){this.input=e,this.root=new bu,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 gu;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 yu;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=Su(this.input)}decl(e,t){let r=new wu;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]||Cu(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 Ii;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",!xi[h]&&!xi[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 Ii;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 Iu=vu;let xu=Me,Au=Ir,Ru=Iu;function fr(s,e){let t=new Au(s,e),r=new Ru(t);try{r.parse()}catch(i){throw i}return r.root}var _s=fr;fr.default=fr;xu.registerParse(fr);let ss=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 jn=ss;ss.default=ss;let Ou=jn,is=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 Ou(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ds=is;is.default=is;let Mu=Me,Eu=Ls,$u=zn,Nu=_s,Ai=Ds,ku=wt,Tu=br,{isClean:le,my:Lu}=yt;const Pu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},_u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Du={Once:!0,postcssPlugin:!0,prepare:!0},ze=0;function Ke(s){return typeof s=="object"&&typeof s.then=="function"}function Gn(s){let e=!1,t=Pu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ze,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ze,t+"Exit"]:[t,t+"Exit"]}function Ri(s){let e;return s.type==="document"?e=["Document",ze,"DocumentExit"]:s.type==="root"?e=["Root",ze,"RootExit"]:e=Gn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ns(s){return s[le]=!1,s.nodes&&s.nodes.forEach(e=>ns(e)),s}let os={},je=class Vn{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=ns(t);else if(t instanceof Vn||t instanceof Ai)i=ns(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=Nu;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[Lu]&&Mu.rebuild(i)}this.result=new Ai(e,i,r),this.helpers=ee(M({},os),{postcss:os,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(!_u[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Du[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(Ke(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=[Ri(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ke(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 Ke(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=Tu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new $u(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(Ke(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(Ke(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(Ri(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===ze){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=Gn(e);for(let r of t)if(r===ze)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()}};je.registerPostcss=s=>{os=s};var Hn=je;je.default=je;ku.registerLazyResult(je);Eu.registerLazyResult(je);let Fu=zn,Bu=_s;const Uu=Ds;let Wu=br;let as=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=Bu;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=Wu;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 Fu(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 zu=as;as.default=as;let ju=Ls,Gu=Hn,Vu=zu,Hu=wt,ht=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 Vu(this,e,t):new Gu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yu=ht;ht.default=ht;Hu.registerProcessor(ht);ju.registerProcessor(ht);let Yn=Ts,Zn=Cr,Zu=Me,Ju=$s,Jn=vr,Xn=Ls,Xu=Ql,Ku=Ir,qu=Hn,Qu=_n,ec=Sr,tc=_s,Fs=Yu,rc=Ds,Kn=wt,qn=Ps,sc=br,ic=jn;function T(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Fs(s)}T.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||Wt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new An(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(),Fl&&_l&&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(`
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?Wt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Wt(On(r,this.mapOpts.annotation)));let i=Rn(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 Tl(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(ui){let r=ui(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;Mn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var En=Bl;const Er=39,ci=34,It=92,hi=47,xt=10,je=32,Rt=12,Ot=9,Mt=13,Ul=91,Wl=93,zl=40,Gl=41,Vl=123,jl=125,Hl=59,Yl=42,Zl=58,Jl=64,At=/[\t\n\f\r "#'()/;[\\\]{}]/g,Et=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xl=/.[\r\n"'(/\\]/,fi=/[\da-f]/i;var Kl=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,m,d,g,p=r.length,f=0,b=[],S=[];function y(){return f}function C(N){throw e.error("Unclosed "+N,f)}function $(){return S.length===0&&f>=p}function _(N){if(S.length)return S.pop();if(f>=p)return;let F=N?N.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case xt:case je:case Ot:case Mt:case Rt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===je||n===xt||n===Ot||n===Mt||n===Rt);u=["space",r.slice(f,o)],f=o-1;break}case Ul:case Wl:case Vl:case jl:case Zl:case Hl:case Gl:{let j=String.fromCharCode(n);u=[j,j,f];break}case zl:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Er&&d!==ci&&d!==je&&d!==xt&&d!==Ot&&d!==Rt&&d!==Mt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||F){o=f;break}else C("bracket");for(m=o;r.charCodeAt(m-1)===It;)m-=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||Xl.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Er:case ci:{c=n===Er?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||F){o=f+1;break}else C("string");for(m=o;r.charCodeAt(m-1)===It;)m-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Jl:{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 It:{for(o=f,l=!0;r.charCodeAt(o+1)===It;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==hi&&n!==je&&n!==xt&&n!==Ot&&n!==Mt&&n!==Rt&&(o+=1,fi.test(r.charAt(o)))){for(;fi.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===hi&&r.charCodeAt(f+1)===Yl?(o=r.indexOf("*/",f+2)+1,o===0&&(i||F?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Et.lastIndex=f+1,Et.test(r),Et.lastIndex===0?o=r.length-1:o=Et.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function V(N){S.push(N)}return{back:V,endOfFile:$,nextToken:_,position:y}};let Ql=Is,ql=hr,eu=fr,tu=ht,pi=Rs,ru=Kl;const di={empty:!0,space:!0};function su(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let iu=class{constructor(e){this.input=e,this.root=new tu,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 Ql;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 ql;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=ru(this.input)}decl(e,t){let r=new eu;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]||su(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 m=c;m>0;m--){let d=u[m][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 pi;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 m=0;m<l;m+=1)n=r[m],a=n[0],a==="space"&&m===l-1&&!i?c=!1:a==="comment"?(h=r[m-1]?r[m-1][0]:"empty",u=r[m+1]?r[m+1][0]:"empty",!di[h]&&!di[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:o}}e[t]=o}rule(e){e.pop();let t=new pi;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 nu=iu;let ou=Re,au=pr,lu=nu;function tr(s,e){let t=new au(s,e),r=new lu(t);try{r.parse()}catch(i){throw i}return r.root}var Os=tr;tr.default=tr;ou.registerParse(tr);let Yr=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 $n=Yr;Yr.default=Yr;let uu=$n,Zr=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,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 uu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ms=Zr;Zr.default=Zr;let cu=Re,hu=xs,fu=En,pu=Os,mi=Ms,du=ht,mu=ur,{isClean:ue,my:gu}=ct;const yu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},wu={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},bu={Once:!0,postcssPlugin:!0,prepare:!0},Te=0;function He(s){return typeof s=="object"&&typeof s.then=="function"}function Nn(s){let e=!1,t=yu[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 gi(s){let e;return s.type==="document"?e=["Document",Te,"DocumentExit"]:s.type==="root"?e=["Root",Te,"RootExit"]:e=Nn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Jr(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>Jr(e)),s}let Xr={},_e=class kn{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=Jr(t);else if(t instanceof kn||t instanceof mi)i=Jr(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=pu;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[gu]&&cu.rebuild(i)}this.result=new mi(e,i,r),this.helpers=ee(O({},Xr),{postcss:Xr,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(!wu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!bu[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=[gi(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=mu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new fu(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(gi(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=Nn(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=>{Xr=s};var Pn=_e;_e.default=_e;du.registerLazyResult(_e);hu.registerLazyResult(_e);let Su=En,Cu=Os;const vu=Ms;let Iu=ur;let Kr=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=Cu;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=Iu;this.result=new vu(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Su(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 xu=Kr;Kr.default=Kr;let Ru=xs,Ou=Pn,Mu=xu,Au=ht,it=class{constructor(e=[]){this.version="8.5.3",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 Mu(this,e,t):new Ou(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Eu=it;it.default=it;Au.registerProcessor(it);Ru.registerProcessor(it);let Ln=Is,Dn=hr,$u=Re,Nu=Ss,Tn=fr,_n=xs,ku=Dl,Pu=pr,Lu=Pn,Du=In,Tu=cr,_u=Os,As=Eu,Fu=Ms,Fn=ht,Bn=Rs,Bu=ur,Uu=$n;function P(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new As(s)}P.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 Fs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return T([i(o)]).process(a,l)},i};T.stringify=sc;T.parse=tc;T.fromJSON=Xu;T.list=Qu;T.comment=s=>new Zn(s);T.atRule=s=>new Yn(s);T.decl=s=>new Jn(s);T.rule=s=>new qn(s);T.root=s=>new Kn(s);T.document=s=>new Xn(s);T.CssSyntaxError=Ju;T.Declaration=Jn;T.Container=Zu;T.Processor=Fs;T.Document=Xn;T.Comment=Zn;T.Warning=ic;T.AtRule=Yn;T.Result=rc;T.Input=Ku;T.Rule=qn;T.Root=Kn;T.Node=ec;qu.registerPostcss(T);var nc=T;T.default=T;const F=wl(nc);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 oc=Object.defineProperty,ac=(s,e,t)=>e in s?oc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>ac(s,typeof e!="symbol"?e+"":e,t),lc=Object.defineProperty,uc=(s,e,t)=>e in s?lc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,qt=(s,e,t)=>uc(s,typeof e!="symbol"?e+"":e,t);function cc(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 hc(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 Qn(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=>fc(i,t)).join("");return cc(r)}catch(e){return null}}function fc(s,e){if(dc(s)){let t;try{t=Qn(s.styleSheet)||hc(s)}catch(r){t=s.cssText}return s.styleSheet.href?Oi(t,s.styleSheet.href):t}else{let t=s.cssText;return mc(s)&&s.selectorText.includes(":")&&(t=pc(t)),e?Oi(t,e):t}}function pc(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function dc(s){return"styleSheet"in s}function mc(s){return"selectorText"in s}function gc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const yc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,wc=/^(?:[a-z+]+:)?\/\//i,bc=/^www\..*/i,Sc=/^(data:)([^,]*),(.*)/i;function Oi(s,e){return(s||"").replace(yc,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(wc.test(o)||bc.test(o))return`url(${c}${o}${c})`;if(Sc.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${gc(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})`})}const Cc=1e3*30,Te="data-rrweb-link-cloned",vc=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],eo=class Qt{constructor(){if(qt(this,"currentHref",null),qt(this,"clones",{}),qt(this,"cleanTimeout",null),Qt.instance)return Qt.instance;Qt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Te}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let a=t.length-1;a>=0;a--)if(t[a].href===e){r=t[a];break}if(!r)return this.removeCloneNode(e);const i=Qn(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Te}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Te)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Te)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){Ur.cleanTimeout=null,Ur.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const a=r.split("/").pop();if(a&&a.includes(".")){const[l]=a.split("?"),o=l.split(".").pop();if(o&&vc.includes(o.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Te,n),e.setAttribute(Te,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(Ur.onCleanTimeout,Cc)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};qt(eo,"instance");let Ic=eo;const Ur=new Ic;function xc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ac(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 Bs={exports:{}},I=String,to=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}};Bs.exports=to();Bs.exports.createColors=to;var Rc=Bs.exports;const Oc={},Mc=Object.freeze(Object.defineProperty({__proto__:null,default:Oc},Symbol.toStringTag,{value:"Module"})),ne=Ac(Mc);let Mi=Rc,Ei=ne,ls=class ro 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,ro)}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),Ei&&(n=d=>Ei(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)+`
29
+ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new As().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return P([i(o)]).process(a,l)},i};P.stringify=Bu;P.parse=_u;P.fromJSON=ku;P.list=Du;P.comment=s=>new Dn(s);P.atRule=s=>new Ln(s);P.decl=s=>new Tn(s);P.rule=s=>new Bn(s);P.root=s=>new Fn(s);P.document=s=>new _n(s);P.CssSyntaxError=Nu;P.Declaration=Tn;P.Container=$u;P.Processor=As;P.Document=_n;P.Comment=Dn;P.Warning=Uu;P.AtRule=Ln;P.Result=Fu;P.Input=Pu;P.Rule=Bn;P.Root=Fn;P.Node=Tu;Lu.registerPostcss(P);var Wu=P;P.default=P;const B=el(Wu);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;var zu=Object.defineProperty,Gu=(s,e,t)=>e in s?zu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>Gu(s,typeof e!="symbol"?e+"":e,t);function Vu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ju(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 Es={exports:{}},I=String,Un=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}};Es.exports=Un();Es.exports.createColors=Un;var Hu=Es.exports;const Yu={},Zu=Object.freeze(Object.defineProperty({__proto__:null,default:Yu},Symbol.toStringTag,{value:"Module"})),ne=ju(Zu);let yi=Hu,wi=ne,Qr=class Wn 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,Wn)}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=yi.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:m}=yi.createColors(!0);i=d=>u(m(d)),r=d=>h(d),wi&&(n=d=>wi(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 m=l+1+h,d=" "+(" "+m).slice(-c)+" | ";if(m===this.line){if(u.length>160){let p=20,f=Math.max(0,this.column-p),b=Math.max(this.column+p,this.endColumn+p),S=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,p-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
30
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)+`
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 Us=ls;ls.default=ls;const $i={after:`
35
+ `),this.name+": "+this.message+e}};var $s=Qr;Qr.default=Qr;const bi={after:`
36
36
  `,beforeClose:`
37
37
  `,beforeComment:`
38
38
  `,beforeDecl:`
39
39
  `,beforeOpen:" ",beforeRule:`
40
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ec(s){return s[0].toUpperCase()+s.slice(1)}let us=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 $i[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"+Ec(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=$i[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 Ju(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 bi[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"+Ju(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=bi[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 so=us;us.default=us;let $c=so;function cs(s,e){new $c(e).stringify(s)}var xr=cs;cs.default=cs;var bt={};bt.isClean=Symbol("isClean");bt.my=Symbol("my");let Nc=Us,kc=so,Tc=xr,{isClean:qe,my:Lc}=bt;function hs(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=>hs(a,t)):(n==="object"&&i!==null&&(i=hs(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 fs=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[qe]=!1,this[Lc]=!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=hs(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 Nc(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[qe]=!0}markDirty(){if(this[qe]){this[qe]=!1;let e=this;for(;e=e.parent;)e[qe]=!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 kc().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=Tc){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=fs;fs.default=fs;let Pc=Ar,ps=class extends Pc{constructor(e){super(e),this.type="comment"}};var Rr=ps;ps.default=ps;let _c=Ar,ds=class extends _c{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 Or=ds;ds.default=ds;let io=Rr,no=Or,Dc=Ar,{isClean:oo,my:ao}=bt,Ws,lo,uo,zs;function co(s){return s.map(e=>(e.nodes&&(e.nodes=co(e.nodes)),delete e.source,e))}function ho(s){if(s[oo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ho(e)}let me=class fo extends Dc{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=co(lo(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 no(e)]}else if(e.selector||e.selectors)e=[new zs(e)];else if(e.name)e=[new Ws(e)];else if(e.text)e=[new io(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ao]||fo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[oo]&&ho(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=>{lo=s};me.registerRule=s=>{zs=s};me.registerAtRule=s=>{Ws=s};me.registerRoot=s=>{uo=s};var Ee=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ws.prototype):s.type==="rule"?Object.setPrototypeOf(s,zs.prototype):s.type==="decl"?Object.setPrototypeOf(s,no.prototype):s.type==="comment"?Object.setPrototypeOf(s,io.prototype):s.type==="root"&&Object.setPrototypeOf(s,uo.prototype),s[ao]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let po=Ee,pr=class extends po{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 js=pr;pr.default=pr;po.registerAtRule(pr);let Fc=Ee,mo,go,ft=class extends Fc{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new mo(new go,this,e).stringify()}};ft.registerLazyResult=s=>{mo=s};ft.registerProcessor=s=>{go=s};var Gs=ft;ft.default=ft;let Bc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Uc=(s=21)=>{let e="",t=s|0;for(;t--;)e+=Bc[Math.random()*64|0];return e};var Wc={nanoid:Uc};let{existsSync:zc,readFileSync:jc}=ne,{dirname:Wr,join:Gc}=ne,{SourceMapConsumer:Ni,SourceMapGenerator:ki}=ne;function Vc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ms=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=Wr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Ni(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 Vc(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=Wr(e),zc(e))return this.mapFile=e,jc(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 Ni)return ki.fromSourceMap(t).toString();if(t instanceof ki)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=Gc(Wr(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 yo=ms;ms.default=ms;let{nanoid:Hc}=Wc,{isAbsolute:gs,resolve:ys}=ne,{SourceMapConsumer:Yc,SourceMapGenerator:Zc}=ne,{fileURLToPath:Ti,pathToFileURL:Ft}=ne,Li=Us,Jc=yo,zr=ne,jr=Symbol("lineToIndexCache"),Xc=!!(Yc&&Zc),Pi=!!(ys&&gs);function _i(s){if(s[jr])return s[jr];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[jr]=t,t}let dr=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&&(!Pi||/^\w+:\/\//.test(t.from)||gs(t.from)?this.file=t.from:this.file=ys(t.from)),Pi&&Xc){let r=new Jc(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 "+Hc(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 Li(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 Li(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&&(Ft&&(c.input.url=Ft(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return _i(this)[e-1]+t-1}fromOffset(e){let t=_i(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:ys(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;gs(a.source)?o=Ft(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Ft(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(Ti)c.file=Ti(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 Mr=dr;dr.default=dr;zr&&zr.registerInput&&zr.registerInput(dr);let wo=Ee,bo,So,Ge=class extends wo{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 bo(new So,this,e).stringify()}};Ge.registerLazyResult=s=>{bo=s};Ge.registerProcessor=s=>{So=s};var St=Ge;Ge.default=Ge;wo.registerRoot(Ge);let pt={comma(s){return pt.split(s,[","],!0)},space(s){let e=[" ",`
50
- `," "];return pt.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 Co=pt;pt.default=pt;let vo=Ee,Kc=Co,mr=class extends vo{get selectors(){return Kc.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=mr;mr.default=mr;vo.registerRule(mr);let qc=js,Qc=Rr,eh=Or,th=Mr,rh=yo,sh=St,ih=Vs;function dt(s,e){if(Array.isArray(s))return s.map(a=>dt(a));let i=s,{inputs:t}=i,r=$e(i,["inputs"]);if(t){e=[];for(let a of t){let l=ee(M({},a),{__proto__:th.prototype});l.map&&(l.map=ee(M({},l.map),{__proto__:rh.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>dt(a,e))),r.source){let n=r.source,{inputId:a}=n,l=$e(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new sh(r);if(r.type==="decl")return new eh(r);if(r.type==="rule")return new ih(r);if(r.type==="comment")return new Qc(r);if(r.type==="atrule")return new qc(r);throw new Error("Unknown node type: "+s.type)}var nh=dt;dt.default=dt;let{dirname:er,relative:Io,resolve:xo,sep:Ao}=ne,{SourceMapConsumer:Ro,SourceMapGenerator:tr}=ne,{pathToFileURL:Di}=ne,oh=Mr,ah=!!(Ro&&tr),lh=!!(er&&xo&&Io&&Ao),uh=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 zn=qr;qr.default=qr;let Xu=zn;function es(s,e){new Xu(e).stringify(s)}var dr=es;es.default=es;var ft={};ft.isClean=Symbol("isClean");ft.my=Symbol("my");let Ku=$s,Qu=zn,qu=dr,{isClean:Ye,my:ec}=ft;function ts(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=>ts(a,t)):(n==="object"&&i!==null&&(i=ts(i)),t[r]=i)}return t}function Ze(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 rs=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ye]=!1,this[ec]=!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=ts(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 Ku(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(Ze(r,this.source.start),Ze(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=Ze(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}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,a=i.slice(Ze(i,this.source.start),Ze(i,this.source.end)).indexOf(e.word);a!==-1&&(t=this.positionInside(a),r=this.positionInside(a+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Qu().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"){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=qu){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 mr=rs;rs.default=rs;let tc=mr,ss=class extends tc{constructor(e){super(e),this.type="comment"}};var gr=ss;ss.default=ss;let rc=mr,is=class extends rc{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 yr=is;is.default=is;let Gn=gr,Vn=yr,sc=mr,{isClean:jn,my:Hn}=ft,Ns,Yn,Zn,ks;function Jn(s){return s.map(e=>(e.nodes&&(e.nodes=Jn(e.nodes)),delete e.source,e))}function Xn(s){if(s[jn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Xn(e)}let pe=class Kn extends sc{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=Jn(Yn(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 Vn(e)]}else if(e.selector||e.selectors)e=[new ks(e)];else if(e.name)e=[new Ns(e)];else if(e.text)e=[new Gn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Hn]||Kn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[jn]&&Xn(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)}))}};pe.registerParse=s=>{Yn=s};pe.registerRule=s=>{ks=s};pe.registerAtRule=s=>{Ns=s};pe.registerRoot=s=>{Zn=s};var Oe=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ns.prototype):s.type==="rule"?Object.setPrototypeOf(s,ks.prototype):s.type==="decl"?Object.setPrototypeOf(s,Vn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Gn.prototype):s.type==="root"&&Object.setPrototypeOf(s,Zn.prototype),s[Hn]=!0,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e)})};let Qn=Oe,rr=class extends Qn{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 Ps=rr;rr.default=rr;Qn.registerAtRule(rr);let ic=Oe,qn,eo,nt=class extends ic{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new qn(new eo,this,e).stringify()}};nt.registerLazyResult=s=>{qn=s};nt.registerProcessor=s=>{eo=s};var Ls=nt;nt.default=nt;let nc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",oc=(s=21)=>{let e="",t=s|0;for(;t--;)e+=nc[Math.random()*64|0];return e};var ac={nanoid:oc};let{existsSync:lc,readFileSync:uc}=ne,{dirname:$r,join:cc}=ne,{SourceMapConsumer:Si,SourceMapGenerator:Ci}=ne;function hc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ns=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=$r(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Si(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 hc(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=$r(e),lc(e))return this.mapFile=e,uc(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 Si)return Ci.fromSourceMap(t).toString();if(t instanceof Ci)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=cc($r(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 to=ns;ns.default=ns;let{nanoid:fc}=ac,{isAbsolute:os,resolve:as}=ne,{SourceMapConsumer:pc,SourceMapGenerator:dc}=ne,{fileURLToPath:vi,pathToFileURL:$t}=ne,Ii=$s,mc=to,Nr=ne,kr=Symbol("fromOffsetCache"),gc=!!(pc&&dc),xi=!!(as&&os),sr=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&&(!xi||/^\w+:\/\//.test(t.from)||os(t.from)?this.file=t.from:this.file=as(t.from)),xi&&gc){let r=new mc(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 "+fc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,r=h.col}else t=c.line,r=c.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);a=h.line,n=h.col}else a=u.line,n=u.column}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col}let o=this.origin(t,r,a,n);return o?l=new Ii(e,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,i.plugin):l=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),l.input={column:r,endColumn:n,endLine:a,line:t,source:this.css},this.file&&($t&&(l.input.url=$t(this.file).toString()),l.input.file=this.file),l}fromOffset(e){let t,r;if(this[kr])r=this[kr];else{let n=this.css.split(`
49
+ `);r=new Array(n.length);let a=0;for(let l=0,o=n.length;l<o;l++)r[l]=a,a+=n[l].length+1;this[kr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<r[a])n=a-1;else if(e>=r[a+1])i=a+1;else{i=a;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:as(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;os(a.source)?o=$t(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||$t(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(vi)c.file=vi(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 wr=sr;sr.default=sr;Nr&&Nr.registerInput&&Nr.registerInput(sr);let ro=Oe,so,io,Fe=class extends ro{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 so(new io,this,e).stringify()}};Fe.registerLazyResult=s=>{so=s};Fe.registerProcessor=s=>{io=s};var pt=Fe;Fe.default=Fe;ro.registerRoot(Fe);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 no=ot;ot.default=ot;let oo=Oe,yc=no,ir=class extends oo{get selectors(){return yc.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 Ds=ir;ir.default=ir;oo.registerRule(ir);let wc=Ps,bc=gr,Sc=yr,Cc=wr,vc=to,Ic=pt,xc=Ds;function at(s,e){if(Array.isArray(s))return s.map(a=>at(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__:Cc.prototype});l.map&&(l.map=ee(O({},l.map),{__proto__:vc.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=Me(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Ic(r);if(r.type==="decl")return new Sc(r);if(r.type==="rule")return new xc(r);if(r.type==="comment")return new bc(r);if(r.type==="atrule")return new wc(r);throw new Error("Unknown node type: "+s.type)}var Rc=at;at.default=at;let{dirname:Gt,relative:ao,resolve:lo,sep:uo}=ne,{SourceMapConsumer:co,SourceMapGenerator:Vt}=ne,{pathToFileURL:Ri}=ne,Oc=wr,Mc=!!(co&&Vt),Ac=!!(Gt&&lo&&ao&&uo),Ec=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||er(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ro(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(),lh&&ah&&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=tr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new tr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});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 tr({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?er(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=er(xo(r,this.mapOpts.annotation)));let i=Io(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 oh(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(Di){let r=Di(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 Oo=uh;const Gr=39,Fi=34,Bt=92,Bi=47,Ut=10,Qe=32,Wt=12,zt=9,jt=13,ch=91,hh=93,fh=40,ph=41,dh=123,mh=125,gh=59,yh=42,wh=58,bh=64,Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Vt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Sh=/.[\r\n"'(/\\]/,Ui=/[\da-f]/i;var Ch=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(P){throw e.error("Unclosed "+P,f)}function R(){return S.length===0&&f>=m}function x(P){if(S.length)return S.pop();if(f>=m)return;let j=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ut:case Qe:case zt:case jt:case Wt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Qe||n===Ut||n===zt||n===jt||n===Wt);u=["space",r.slice(f,o)],f=o-1;break}case ch:case hh:case dh:case mh:case wh:case gh:case ph:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case fh:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Gr&&d!==Fi&&d!==Qe&&d!==Ut&&d!==zt&&d!==Wt&&d!==jt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||j){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Bt;)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||Sh.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Gr:case Fi:{c=n===Gr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||j){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Bt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case bh:{Gt.lastIndex=f+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Bt:{for(o=f,l=!0;r.charCodeAt(o+1)===Bt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Bi&&n!==Qe&&n!==Ut&&n!==zt&&n!==jt&&n!==Wt&&(o+=1,Ui.test(r.charAt(o)))){for(;Ui.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Qe&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Bi&&r.charCodeAt(f+1)===yh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||j?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Vt.lastIndex=f+1,Vt.test(r),Vt.lastIndex===0?o=r.length-1:o=Vt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function z(P){S.push(P)}return{back:z,endOfFile:R,nextToken:x,position:y}};let vh=js,Ih=Rr,xh=Or,Ah=St,Wi=Vs,Rh=Ch;const zi={empty:!0,space:!0};function Oh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Mh=class{constructor(e){this.input=e,this.root=new Ah,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 vh;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 Ih;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=Rh(this.input)}decl(e,t){let r=new xh;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]||Oh(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 Wi;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",!zi[h]&&!zi[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 Wi;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 Eh=Mh;let $h=Ee,Nh=Mr,kh=Eh;function gr(s,e){let t=new Nh(s,e),r=new kh(t);try{r.parse()}catch(i){throw i}return r.root}var Hs=gr;gr.default=gr;$h.registerParse(gr);let ws=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 Mo=ws;ws.default=ws;let Th=Mo,bs=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 Th(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ys=bs;bs.default=bs;let Lh=Ee,Ph=Gs,_h=Oo,Dh=Hs,ji=Ys,Fh=St,Bh=xr,{isClean:ue,my:Uh}=bt;const Wh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zh={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},jh={Once:!0,postcssPlugin:!0,prepare:!0},Ve=0;function et(s){return typeof s=="object"&&typeof s.then=="function"}function Eo(s){let e=!1,t=Wh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ve,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ve,t+"Exit"]:[t,t+"Exit"]}function Gi(s){let e;return s.type==="document"?e=["Document",Ve,"DocumentExit"]:s.type==="root"?e=["Root",Ve,"RootExit"]:e=Eo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ss(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>Ss(e)),s}let Cs={},He=class $o{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=Ss(t);else if(t instanceof $o||t instanceof ji)i=Ss(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=Dh;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[Uh]&&Lh.rebuild(i)}this.result=new ji(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(!zh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jh[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(et(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=[Gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(et(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 et(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=Bh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new _h(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(et(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(et(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(Gi(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===Ve){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=Eo(e);for(let r of t)if(r===Ve)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()}};He.registerPostcss=s=>{Cs=s};var No=He;He.default=He;Fh.registerLazyResult(He);Ph.registerLazyResult(He);let Gh=Oo,Vh=Hs;const Hh=Ys;let Yh=xr;let vs=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=Vh;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=Yh;this.result=new Hh(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Gh(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 Zh=vs;vs.default=vs;let Jh=Gs,Xh=No,Kh=Zh,qh=St,mt=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 Kh(this,e,t):new Xh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qh=mt;mt.default=mt;qh.registerProcessor(mt);Jh.registerProcessor(mt);let ko=js,To=Rr,ef=Ee,tf=Us,Lo=Or,Po=Gs,rf=nh,sf=Mr,nf=No,of=Co,af=Ar,lf=Hs,Zs=Qh,uf=Ys,_o=St,Do=Vs,cf=xr,hf=Mo;function L(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zs(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:
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 co(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(),Ac&&Mc&&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(lo(r,this.mapOpts.annotation)));let i=ao(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 Oc(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(Ri){let r=Ri(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;uo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ho=Ec;const Pr=39,Oi=34,Nt=92,Mi=47,kt=10,Je=32,Pt=12,Lt=9,Dt=13,$c=91,Nc=93,kc=40,Pc=41,Lc=123,Dc=125,Tc=59,_c=42,Fc=58,Bc=64,Tt=/[\t\n\f\r "#'()/;[\\\]{}]/g,_t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Uc=/.[\r\n"'(/\\]/,Ai=/[\da-f]/i;var Wc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,m,d,g,p=r.length,f=0,b=[],S=[];function y(){return f}function C(N){throw e.error("Unclosed "+N,f)}function $(){return S.length===0&&f>=p}function _(N){if(S.length)return S.pop();if(f>=p)return;let F=N?N.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case kt:case Je:case Lt:case Dt:case Pt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Je||n===kt||n===Lt||n===Dt||n===Pt);u=["space",r.slice(f,o)],f=o-1;break}case $c:case Nc:case Lc:case Dc:case Fc:case Tc:case Pc:{let j=String.fromCharCode(n);u=[j,j,f];break}case kc:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Pr&&d!==Oi&&d!==Je&&d!==kt&&d!==Lt&&d!==Pt&&d!==Dt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||F){o=f;break}else C("bracket");for(m=o;r.charCodeAt(m-1)===Nt;)m-=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||Uc.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Pr:case Oi:{c=n===Pr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||F){o=f+1;break}else C("string");for(m=o;r.charCodeAt(m-1)===Nt;)m-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Bc:{Tt.lastIndex=f+1,Tt.test(r),Tt.lastIndex===0?o=r.length-1:o=Tt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Nt:{for(o=f,l=!0;r.charCodeAt(o+1)===Nt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Mi&&n!==Je&&n!==kt&&n!==Lt&&n!==Dt&&n!==Pt&&(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===Mi&&r.charCodeAt(f+1)===_c?(o=r.indexOf("*/",f+2)+1,o===0&&(i||F?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(_t.lastIndex=f+1,_t.test(r),_t.lastIndex===0?o=r.length-1:o=_t.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function V(N){S.push(N)}return{back:V,endOfFile:$,nextToken:_,position:y}};let zc=Ps,Gc=gr,Vc=yr,jc=pt,Ei=Ds,Hc=Wc;const $i={empty:!0,space:!0};function Yc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Zc=class{constructor(e){this.input=e,this.root=new jc,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 zc;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 Gc;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=Hc(this.input)}decl(e,t){let r=new Vc;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]||Yc(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 m=c;m>0;m--){let d=u[m][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 Ei;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 m=0;m<l;m+=1)n=r[m],a=n[0],a==="space"&&m===l-1&&!i?c=!1:a==="comment"?(h=r[m-1]?r[m-1][0]:"empty",u=r[m+1]?r[m+1][0]:"empty",!$i[h]&&!$i[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:o}}e[t]=o}rule(e){e.pop();let t=new Ei;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 Jc=Zc;let Xc=Oe,Kc=wr,Qc=Jc;function nr(s,e){let t=new Kc(s,e),r=new Qc(t);try{r.parse()}catch(i){throw i}return r.root}var Ts=nr;nr.default=nr;Xc.registerParse(nr);let ls=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 fo=ls;ls.default=ls;let qc=fo,us=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,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 qc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var _s=us;us.default=us;let eh=Oe,th=Ls,rh=ho,sh=Ts,Ni=_s,ih=pt,nh=dr,{isClean:ce,my:oh}=ft;const ah={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},lh={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},uh={Once:!0,postcssPlugin:!0,prepare:!0},Be=0;function Xe(s){return typeof s=="object"&&typeof s.then=="function"}function po(s){let e=!1,t=ah[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 ki(s){let e;return s.type==="document"?e=["Document",Be,"DocumentExit"]:s.type==="root"?e=["Root",Be,"RootExit"]:e=po(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function cs(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>cs(e)),s}let hs={},Ue=class mo{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=cs(t);else if(t instanceof mo||t instanceof Ni)i=cs(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=sh;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[oh]&&eh.rebuild(i)}this.result=new Ni(e,i,r),this.helpers=ee(O({},hs),{postcss:hs,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(!lh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uh[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[ce];){e[ce]=!0;let t=[ki(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=nh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new rh(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[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(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[ce]){l[ce]=!0,e.push(ki(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=po(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=>{hs=s};var go=Ue;Ue.default=Ue;ih.registerLazyResult(Ue);th.registerLazyResult(Ue);let ch=ho,hh=Ts;const fh=_s;let ph=dr;let fs=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=hh;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=ph;this.result=new fh(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new ch(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 dh=fs;fs.default=fs;let mh=Ls,gh=go,yh=dh,wh=pt,lt=class{constructor(e=[]){this.version="8.5.3",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 yh(this,e,t):new gh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var bh=lt;lt.default=lt;wh.registerProcessor(lt);mh.registerProcessor(lt);let yo=Ps,wo=gr,Sh=Oe,Ch=$s,bo=yr,So=Ls,vh=Rc,Ih=wr,xh=go,Rh=no,Oh=mr,Mh=Ts,Fs=bh,Ah=_s,Co=pt,vo=Ds,Eh=dr,$h=fo;function L(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Fs(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:
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 Zs().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=cf;L.parse=lf;L.fromJSON=rf;L.list=of;L.comment=s=>new To(s);L.atRule=s=>new ko(s);L.decl=s=>new Lo(s);L.rule=s=>new Do(s);L.root=s=>new _o(s);L.document=s=>new Po(s);L.CssSyntaxError=tf;L.Declaration=Lo;L.Container=ef;L.Processor=Zs;L.Document=Po;L.Comment=To;L.Warning=hf;L.AtRule=ko;L.Result=uf;L.Input=sf;L.Rule=Do;L.Root=_o;L.Node=af;nf.registerPostcss(L);var ff=L;L.default=L;const B=xc(ff);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 Js{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 Js){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"}}function J(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Pe=`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 Fs().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=Eh;L.parse=Mh;L.fromJSON=vh;L.list=Rh;L.comment=s=>new wo(s);L.atRule=s=>new yo(s);L.decl=s=>new bo(s);L.rule=s=>new vo(s);L.root=s=>new Co(s);L.document=s=>new So(s);L.CssSyntaxError=Ch;L.Declaration=bo;L.Container=Sh;L.Processor=Fs;L.Document=So;L.Comment=wo;L.Warning=$h;L.AtRule=yo;L.Result=Ah;L.Input=Ih;L.Rule=vo;L.Root=Co;L.Node=Oh;xh.registerPostcss(L);var Nh=L;L.default=L;const U=Vu(Nh);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;class Bs{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 Bs){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"}}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
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 Vi={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Vi=new Proxy(Vi,{get(s,e,t){return e==="map"&&console.error(Pe),Reflect.get(s,e,t)}}));function gt(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 Er(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)}}),()=>Er(s,e,n||{},!0)}let yr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(yr=()=>new Date().getTime());function Fo(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=A.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=A.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Bo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Uo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Wo(s){return s?s.nodeType===s.ELEMENT_NODE?s:A.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=Wo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(lr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function pf(s,e){return e.getId(s)!==-1}function Vr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===at}function zo(s,e){if(rt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=A.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?zo(r,e):!0}function Is(s){return!!s.changedTouches}function df(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 jo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Go(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function xs(s){return s?s instanceof Js&&"shadowRoot"in s?!!s.shadowRoot:!!A.shadowRoot(s):!1}class mf{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 Vo(s){var e;let t=null;return"getRootNode"in s&&((e=A.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&A.host(A.getRootNode(s))&&(t=A.host(A.getRootNode(s))),t}function gf(s){let e=s,t;for(;t=Vo(e);)e=t;return e}function yf(s){const e=s.ownerDocument;if(!e)return!1;const t=gf(s);return A.contains(e,t)}function Ho(s){const e=s.ownerDocument;return e?A.contains(e,s)||yf(s):!1}let nt;function wf(s){nt=s}function bf(){nt=void 0}const E=s=>nt?(...t)=>{try{return s(...t)}catch(r){if(nt&&nt(r)===!0)return;throw r}}:s;class Hi{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 Sf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Hi(pn)),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 Hi(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!==sn.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const Yo=class rr{constructor(){if(w(this,"lastFullSnapshot",-1),w(this,"intervalBetweenSnapshots",150),w(this,"debounceTimeout",null),w(this,"debounceTime",10),rr.instance)return rr.instance;rr.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){console.log("StormSnapshotManager, takeSnapshot: too soon");return}console.log("StormSnapshotManager, takeSnapshot: taking full snapshot"),qf(),this.lastFullSnapshot=Date.now()}};w(Yo,"instance");let Cf=Yo;const vf=new Cf;function Yi(s){return"__ln"in s}class If{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&&Yi(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&&Yi(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 Zi=(s,e)=>`${s}@${e}`;class xf{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,"stormBatches",[]),w(this,"stormInfo",null),w(this,"stormSettings",{batchSize:150,timeout:30,mutationLimit:800}),w(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),w(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],vf.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),w(this,"processInternalMutations",(e,t=!1)=>{if(!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),w(this,"processMutations",e=>{this.processInternalMutations(e)}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new If,i=u=>{let h=u,p=at;for(;p===at;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},n=u=>{const h=A.parentNode(u);if(!h||!Ho(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=rt(h)?this.mirror.getId(Vo(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=De(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=>{jo(f,this.mirror)&&this.iframeManager.addIframe(f),Go(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),xs(u)&&this.shadowDomManager.addShadowRoot(A.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)Ji(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(A.parentNode(u))||n(u);for(const u of this.addedSet)!Xi(this.droppedSet,u)&&!Ji(this.removesSubTreeCache,u,this.mirror)||Xi(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(A.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(A.parentNode(p.value));if(i(p.value)===-1)continue;if(d!==-1){u=p;break}else{const m=p.value,f=A.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=A.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=A.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(A.childNodes(e),i=>A.textContent(i)||"").join("");t.attributes.value=nr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:or(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Vr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=A.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:gn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Wo(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=or(t);i=nr({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"),!mn(t.tagName,r))if(n.attributes[r]=dn(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(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let a=0;a<e.addedNodes.length;a++)this.genAdds(e.addedNodes[a],e.target);const t=rt(e.target)?this.mirror.getId(A.host(e.target)):this.mirror.getId(e.target);if(X(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=zo(e.target,this.mirror),n=rt(e.target)&&st(e.target)?!0:void 0;for(let a=0;a<e.removedNodes.length;a++){const l=e.removedNodes[a],o=this.mirror.getId(l);if(Vr(l,this.mirror,this.slimDOMOptions)||!pf(l,this.mirror))return;this.addedSet.has(l)?(As(this.addedSet,l),this.droppedSet.add(l)):r&&o===-1||i||(this.movedSet.has(l)&&this.movedMap[Zi(o,t)]?As(this.movedSet,l):(this.removes.push({parentId:t,id:o,isShadow:n}),Af(l,this.removesSubTreeCache))),this.mapRemoves.push(l)}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(Vr(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[Zi(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=A.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(xs(e)){const i=A.childNodes(A.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 As(s,e){s.delete(e);const t=A.childNodes(e);for(let r=0;r<t.length;r++)As(s,t[r])}function Af(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=A.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Ji(s,e,t){return s.size===0?!1:Rf(s,e)}function Rf(s,e,t){const r=A.parentNode(e);return r?s.has(r):!1}function Xi(s,e){return s.size===0?!1:Zo(s,e)}function Zo(s,e){const t=A.parentNode(e);return t?s.has(t)?!0:Zo(s,t):!1}const Ae=[];function Ct(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 Jo(s,e){const t=new xf;Ae.push(t),t.init(s);const r=new(on())(E(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Of({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=gt(E(h=>{const p=Date.now()-l;s(a.map(d=>(d.timeOffset-=p,d)),h),a=[],l=null}),n),c=E(gt(E(h=>{const p=Ct(h),{clientX:d,clientY:g}=Is(h)?h.changedTouches[0]:h;l||(l=yr()),a.push({x:d,y:g,id:r.getId(p),timeOffset:yr()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?O.Drag:h instanceof MouseEvent?O.MouseMove:O.TouchMove)}),i,{trailing:!1})),u=[J("mousemove",c,t),J("touchmove",c,t),J("drag",c,t)];return E(()=>{u.forEach(h=>h())})}function Mf({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=Ct(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 Is(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=Is(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:b,clientY:S}=m;E(s)(M({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=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(J(h,p,e))}),E(()=>{l.forEach(u=>u())})}function Xo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=E(gt(E(l=>{const o=Ct(l);if(!o||X(o,r,i,!0))return;const c=t.getId(o);if(o===e&&e.defaultView){const u=Fo(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 Ef({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=E(gt(E(()=>{const n=Bo(),a=Uo();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return J("resize",i,e)}const $f=["INPUT","TEXTAREA","SELECT"],Ki=new WeakMap;function Nf({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=Ct(S);const C=S.isTrusted,R=y&&y.tagName;if(y&&R==="OPTION"&&(y=A.parentElement(y)),!y||!R||$f.indexOf(R)<0||X(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let x=y.value,z=!1;const P=or(y)||"";P==="radio"||P==="checkbox"?z=y.checked:(l[R.toLowerCase()]||l[P])&&(x=nr({element:y,maskInputOptions:l,tagName:R,type:P,value:x,maskInputFn:o})),p(y,u?{text:x,isChecked:z,userTriggered:C}:{text:x,isChecked:z});const j=y.name;P==="radio"&&j&&z&&e.querySelectorAll(`input[type="radio"][name="${j}"]`).forEach(Y=>{if(Y!==y){const q=Y.value;p(Y,u?{text:q,isChecked:!z,userTriggered:!1}:{text:q,isChecked:!z})}})}function p(S,y){const C=Ki.get(S);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Ki.set(S,y);const R=t.getId(S);E(s)(ee(M({},y),{id:R}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(S=>J(S,E(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=>Er(S[0],S[1],{set(){E(h)({target:this,isTrusted:!1})}},!1,m))),E(()=>{g.forEach(S=>S())})}function wr(s){const e=[];function t(r,i){if(Ht("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ht("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ht("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ht("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 kf({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={};Yt("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(Yt("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),Yt("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),Yt("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:b,styleId:S}=ye(d.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:m,index:[...wr(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:b}=ye(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...wr(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 Ko({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(A.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 Tf({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:wr(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:wr(o.parentRule)}),l.apply(o,c)})}),E(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Lf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=E(o=>gt(E(c=>{const u=Ct(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(Le.Play),n),J("pause",a(Le.Pause),n),J("seeked",a(Le.Seeked),n),J("volumechange",a(Le.VolumeChange),n),J("ratechange",a(Le.RateChange),n)];return E(()=>{l.forEach(o=>o())})}function Pf({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=Oe(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 _f(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;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 Df({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Oe(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 Ff(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 Bf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Ff(s,e);let r;s.recordDOM&&(r=Jo(s,s.doc));const i=Of(s),n=Mf(s),a=Xo(s),l=Ef(s,{win:t}),o=Nf(s),c=Lf(s);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(u=kf(s,{win:t}),h=Ko(s,s.doc),p=Tf(s,{win:t}),s.collectFonts&&(d=Pf(s)));const g=_f(s),m=Df(s),f=[];for(const b of s.plugins)f.push(b.observer(b.callback,t,b.options));return E(()=>{Ae.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 Ht(s){return typeof window[s]!="undefined"}function Yt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Zt=0;Zt<Fe.length;Zt++)Uf[Fe.charCodeAt(Zt)]=Zt;var Wf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Fe[e[t]>>2],i+=Fe[(e[t]&3)<<4|e[t+1]>>4],i+=Fe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Fe[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 qi=new Map;function zf(s,e){let t=qi.get(s);return t||(t=new Map,qi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const qo=(s,e,t)=>{if(!s||!(ea(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=zf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function sr(s,e,t){if(s instanceof Array)return s.map(r=>sr(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=Wf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[sr(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:[sr(s.data,e,t),s.width,s.height]};if(ea(s,e)||typeof s=="object"){const r=s.constructor.name,i=qo(s,e,t);return{rr_type:r,index:i}}}}return s}const Qo=(s,e,t)=>s.map(r=>sr(r,e,t)),ea=(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 jf(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=Oe(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...c){return X(this.canvas,t,r,!0)||setTimeout(()=>{const u=Qo(c,e,this);s(this.canvas,{type:Ue["2D"],property:a,args:u})},0),o.apply(this,c)}});i.push(l)}catch(l){const o=Er(e.CanvasRenderingContext2D.prototype,a,{set(c){s(this.canvas,{type:Ue["2D"],property:a,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function Gf(s){return s==="experimental-webgl"?"webgl":s}function Qi(s,e,t,r){const i=[];try{const n=Oe(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!X(this,e,t,!0)){const c=Gf(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 en(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=Oe(s,o,function(u){return function(...h){const p=u.apply(this,h);if(qo(p,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=Qo(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return p}});a.push(c)}catch(c){const u=Er(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(u)}return a}function Vf(s,e,t,r){const i=[];return i.push(...en(e.WebGLRenderingContext.prototype,Ue.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...en(e.WebGL2RenderingContext.prototype,Ue.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const ta="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Hf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),tn=typeof self!="undefined"&&self.Blob&&new Blob([Hf(ta)],{type:"text/javascript;charset=utf-8"});function Yf(s){let e;try{if(e=tn&&(self.URL||self.webkitURL).createObjectURL(tn),!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,"+ta,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Zf{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=Qi(t,r,i,!0),l=new Map,o=new Yf;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:Ue["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=Qi(e,t,r,!1),n=jf(this.processMutation.bind(this),e,t,r),a=Vf(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 $e(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Jf{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(){}}class Xf{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(!st(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Jo(ee(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Xo(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(A.host(e))),this.restoreHandlers.push(Ko({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(Oe(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=A.shadowRoot(this);return l&&Ho(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Kf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new mf),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:un(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){}}let W,tt,Hr,ot=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ri=s.contentWindow)==null?void 0:ri.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=Wa();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:b,sampling:S={},dataURLOptions:y={},mousemoveWait:C,recordDOM:R=!0,recordCanvas:x=!1,recordCrossOriginIframes:z=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:Y=!1,inlineImages:q=!1,plugins:oe,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:Ye=new Set([]),errorHandler:Ze}=s;wf(Ze);const V=z?window.parent===window:!0;let Q=!1;if(!V)try{window.parent.document&&(Q=!1)}catch(k){Q=!0}if(V&&!e)throw new Error("emit function is required");if(!V&&!Q)return()=>{};C!==void 0&&S.mousemove===void 0&&(S.mousemove=C),se.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},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||{};df();let vt,Ce=0;const Xs=k=>{for(const re of oe||[])re.eventProcessor&&(k=re.eventProcessor(k));return b&&!Q&&(k=b(k)),k};W=(k,re)=>{var U;const G=k;if(G.timestamp=yr(),(U=Ae[0])!=null&&U.isFrozen()&&G.type!==$.FullSnapshot&&!(G.type===$.IncrementalSnapshot&&G.data.source===O.Mutation)&&Ae.forEach(ce=>ce.unfreeze()),V)e==null||e(Xs(G),re);else if(Q){const ce={type:"rrweb",event:Xs(G),origin:window.location.origin,isCheckout:re};window.parent.postMessage(ce,"*")}if(G.type===$.FullSnapshot)vt=G,Ce=0;else if(G.type===$.IncrementalSnapshot){if(G.data.source===O.Mutation&&G.data.isAttachIframe)return;Ce++;const ce=r&&Ce>=r,xe=t&&G.timestamp-vt.timestamp>t;(ce||xe)&&tt(!0)}};const It=k=>{W({type:$.IncrementalSnapshot,data:M({source:O.Mutation},k)})},Ks=k=>W({type:$.IncrementalSnapshot,data:M({source:O.Scroll},k)}),qs=k=>W({type:$.IncrementalSnapshot,data:M({source:O.CanvasMutation},k)}),ra=k=>W({type:$.IncrementalSnapshot,data:M({source:O.AdoptedStyleSheet},k)}),ve=new Kf({mutationCb:It,adoptedStyleSheetCb:ra}),Ie=new Sf({mirror:se,mutationCb:It,stylesheetManager:ve,recordCrossOriginIframes:z,wrappedEmit:W});for(const k of oe||[])k.getMirror&&k.getMirror({nodeMirror:se,crossOriginIframeMirror:Ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ie.crossOriginIframeStyleMirror});const $r=new Jf;Hr=new Zf({recordCanvas:x,mutationCb:qs,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:S.canvas,dataURLOptions:y});const xt=new Xf({mutationCb:It,scrollCb:Ks,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:ge,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:x,inlineImages:q,sampling:S,slimDOMOptions:ae,iframeManager:Ie,stylesheetManager:ve,canvasManager:Hr,keepIframeSrcFn:N,processedNodeManager:$r},mirror:se});tt=(k=!1)=>{if(!R)return;W({type:$.Meta,data:{href:window.location.href,width:Uo(),height:Bo()}},k),ve.reset(),xt.init(),Ae.forEach(U=>U.lock());const re=yl(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:ge,maskTextFn:m,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:x,inlineImages:q,onSerialize:U=>{jo(U,se)&&Ie.addIframe(U),Go(U,se)&&ve.trackLinkElement(U),xs(U)&&xt.addShadowRoot(A.shadowRoot(U),document)},onIframeLoad:(U,G)=>{Ie.attachIframe(U,G),xt.observeAttachShadow(U)},onStylesheetLoad:(U,G)=>{ve.attachLinkElement(U,G)},keepIframeSrcFn:N});if(!re)return console.warn("Failed to snapshot the document");W({type:$.FullSnapshot,data:{node:re,initialOffset:Fo(window)}},k),Ae.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const k=[],re=xe=>{var At;return E(Bf)({mutationCb:It,mousemoveCb:(D,Nr)=>W({type:$.IncrementalSnapshot,data:{source:Nr,positions:D}}),mouseInteractionCb:D=>W({type:$.IncrementalSnapshot,data:M({source:O.MouseInteraction},D)}),scrollCb:Ks,viewportResizeCb:D=>W({type:$.IncrementalSnapshot,data:M({source:O.ViewportResize},D)}),inputCb:D=>W({type:$.IncrementalSnapshot,data:M({source:O.Input},D)}),mediaInteractionCb:D=>W({type:$.IncrementalSnapshot,data:M({source:O.MediaInteraction},D)}),styleSheetRuleCb:D=>W({type:$.IncrementalSnapshot,data:M({source:O.StyleSheetRule},D)}),styleDeclarationCb:D=>W({type:$.IncrementalSnapshot,data:M({source:O.StyleDeclaration},D)}),canvasMutationCb:qs,fontCb:D=>W({type:$.IncrementalSnapshot,data:M({source:O.Font},D)}),selectionCb:D=>{W({type:$.IncrementalSnapshot,data:M({source:O.Selection},D)})},customElementCb:D=>{W({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:R,recordCanvas:x,inlineImages:q,userTriggeredOnInput:j,collectFonts:Y,doc:xe,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:Ie,stylesheetManager:ve,shadowDomManager:xt,processedNodeManager:$r,canvasManager:Hr,ignoreCSSAttributes:Ye,plugins:((At=oe==null?void 0:oe.filter(D=>D.observer))==null?void 0:At.map(D=>({observer:D.observer,options:D.options,callback:Nr=>W({type:$.Plugin,data:{plugin:D.name,payload:Nr}})})))||[]},f)};Ie.addLoadListener(xe=>{try{k.push(re(xe.contentDocument))}catch(At){console.warn(At)}});let U=null;const G=()=>{U=Date.now(),tt(),k.push(re(document)),ot=!0},ce=()=>{window.removeEventListener("load",ce),!(!ot||U==null)&&(Date.now()-U<=10||tt())};return window.addEventListener("load",ce),document.readyState==="interactive"||document.readyState==="complete"?(document.readyState==="complete"&&window.removeEventListener("load",ce),G()):(k.push(J("DOMContentLoaded",()=>{W({type:$.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&G()})),k.push(J("load",()=>{W({type:$.Load,data:{}}),P==="load"&&G()},window))),()=>{k.forEach(xe=>xe()),$r.destroy(),ot=!1,bf()}}catch(k){console.warn(k)}}Se.addCustomEvent=(s,e)=>{if(!ot)throw new Error("please add custom event after start recording");W({type:$.Custom,data:{tag:s,payload:e}})};Se.freezePage=()=>{Ae.forEach(s=>s.freeze())};Se.takeFullSnapshot=s=>{if(!ot)throw new Error("please take full snapshot after start recording");tt(s)};Se.mirror=se;var rn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(rn||(rn={}));const{addCustomEvent:kp}=Se,{freezePage:Tp}=Se,{takeFullSnapshot:qf}=Se;exports.record=Se;
58
+ or you can use record.mirror to access the mirror instance during recording.`;let Pi={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&&(Pi=new Proxy(Pi,{get(s,e,t){return e==="map"&&console.error($e),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 br(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)}}),()=>br(s,e,n||{},!0)}let or=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(or=()=>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(Kt(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function kh(s,e){return e.getId(s)!==-1}function Lr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===et}function Mo(s,e){if(Ke(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?Mo(r,e):!0}function ps(s){return!!s.changedTouches}function Ph(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 Ao(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 ds(s){return s?s instanceof Bs&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class Lh{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 Dh(s){let e=s,t;for(;t=$o(e);)e=t;return e}function Th(s){const e=s.ownerDocument;if(!e)return!1;const t=Dh(s);return x.contains(e,t)}function No(s){const e=s.ownerDocument;return e?x.contains(e,s)||Th(s):!1}let qe;function _h(s){qe=s}function Fh(){qe=void 0}const M=s=>qe?(...t)=>{try{return s(...t)}catch(r){if(qe&&qe(r)===!0)return;throw r}}:s;class Li{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 Bh{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Li(qi)),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 Li(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 A.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:A.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return t;case A.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case A.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!==ji.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const ko=class jt{constructor(){if(w(this,"lastFullSnapshot",-1),w(this,"intervalBetweenSnapshots",150),w(this,"debounceTimeout",null),w(this,"debounceTime",10),jt.instance)return jt.instance;jt.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){console.log("StormSnapshotManager, takeSnapshot: too soon");return}console.log("StormSnapshotManager, takeSnapshot: taking full snapshot"),wf(),this.lastFullSnapshot=Date.now()}};w(ko,"instance");let Uh=ko;const Wh=new Uh;function Di(s){return"__ln"in s}class zh{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 Gh{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,"stormBatches",[]),w(this,"stormInfo",null),w(this,"stormSettings",{batchSize:150,timeout:30,mutationLimit:800}),w(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),w(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],Wh.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),w(this,"processInternalMutations",(e,t=!1)=>{if(!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),w(this,"processMutations",e=>{this.processInternalMutations(e)}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new zh,i=u=>{let h=u,m=et;for(;m===et;)h=h&&h.nextSibling,m=h&&this.mirror.getId(h);return m},n=u=>{const h=x.parentNode(u);if(!h||!No(u))return;let m=!1;if(u.nodeType===Node.TEXT_NODE){const f=h.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(h)&&(m=!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 p=ke(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=>{Ao(f,this.mirror)&&this.iframeManager.addIframe(f),Eo(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),ds(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:m});p&&(e.push({parentId:d,nextId:g,node:p}),t.add(p.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)),m=i(a.value);h!==-1&&m!==-1&&(u=a)}if(!u){let h=r.tail;for(;h;){const m=h;if(h=h.previous,m){const d=this.mirror.getId(x.parentNode(m.value));if(i(m.value)===-1)continue;if(d!==-1){u=m;break}else{const p=m.value,f=x.parentNode(p);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=x.host(f);if(this.mirror.getId(b)!==-1){u=m;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,m=x.parentNode(h);m&&m.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(m);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 m=this.mirror.getId(u.node);!t.has(m)&&this.mirror.has(m)&&o.push({id:m,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=Zt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Jt(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Lr(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:rn(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=Jt(t);i=Zt({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"),!tn(t.tagName,r))if(n.attributes[r]=en(this.doc,Ie(t.tagName),Ie(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 a=0;a<e.addedNodes.length;a++)this.genAdds(e.addedNodes[a],e.target);const t=Ke(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);if(X(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=Mo(e.target,this.mirror),n=Ke(e.target)&&Qe(e.target)?!0:void 0;for(let a=0;a<e.removedNodes.length;a++){const l=e.removedNodes[a],o=this.mirror.getId(l);if(Lr(l,this.mirror,this.slimDOMOptions)||!kh(l,this.mirror))return;this.addedSet.has(l)?(ms(this.addedSet,l),this.droppedSet.add(l)):r&&o===-1||i||(this.movedSet.has(l)&&this.movedMap[Ti(o,t)]?ms(this.movedSet,l):(this.removes.push({parentId:t,id:o,isShadow:n}),Vh(l,this.removesSubTreeCache))),this.mapRemoves.push(l)}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(Lr(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(ds(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 ms(s,e){s.delete(e);const t=x.childNodes(e);for(let r=0;r<t.length;r++)ms(s,t[r])}function Vh(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:jh(s,e)}function jh(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}const ve=[];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 Gh;ve.push(t),t.init(s);const r=new(Yi())(M(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Hh({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(M(h=>{const m=Date.now()-l;s(a.map(d=>(d.timeOffset-=m,d)),h),a=[],l=null}),n),c=M(ut(M(h=>{const m=dt(h),{clientX:d,clientY:g}=ps(h)?h.changedTouches[0]:h;l||(l=or()),a.push({x:d,y:g,id:r.getId(m),timeOffset:or()-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 M(()=>{u.forEach(h=>h())})}function Yh({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 m=dt(h);if(X(m,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=he.Mouse;break;case"touch":d=he.Touch;break;case"pen":d=he.Pen;break}d===he.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):he.Pen}else ps(h)&&(d=he.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===he.Touch||g.startsWith("Mouse")&&d===he.Mouse)&&(d=null)):K[u]===K.Click&&(d=o,o=null);const p=ps(h)?h.changedTouches[0]:h;if(!p)return;const f=t.getId(m),{clientX:b,clientY:S}=p;M(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=Ie(u);const m=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,m,e))}),M(()=>{l.forEach(u=>u())})}function Do({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=M(ut(M(l=>{const o=dt(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 Zh({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=M(ut(M(()=>{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 Xh({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=dt(S);const C=S.isTrusted,$=y&&y.tagName;if(y&&$==="OPTION"&&(y=x.parentElement(y)),!y||!$||Jh.indexOf($)<0||X(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let _=y.value,V=!1;const N=Jt(y)||"";N==="radio"||N==="checkbox"?V=y.checked:(l[$.toLowerCase()]||l[N])&&(_=Zt({element:y,maskInputOptions:l,tagName:$,type:N,value:_,maskInputFn:o})),m(y,u?{text:_,isChecked:V,userTriggered:C}:{text:_,isChecked:V});const F=y.name;N==="radio"&&F&&V&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(j=>{if(j!==y){const Q=j.value;m(j,u?{text:Q,isChecked:!V,userTriggered:!1}:{text:Q,isChecked:!V})}})}function m(S,y){const C=Bi.get(S);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Bi.set(S,y);const $=t.getId(S);M(s)(ee(O({},y),{id:$}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(S=>J(S,M(h),e)),p=e.defaultView;if(!p)return()=>{g.forEach(S=>S())};const f=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(S=>br(S[0],S[1],{set(){M(h)({target:this,isTrusted:!1})}},!1,p))),M(()=>{g.forEach(S=>S())})}function ar(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 me(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Kh({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:M((u,h,m)=>{const[d,g]=m,{id:p,styleId:f}=me(h,e,t.styleMirror);return(p&&p!==-1||f&&f!==-1)&&s({id:p,styleId:f,adds:[{rule:d,index:g}]}),u.apply(h,m)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,m=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,m])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:M((u,h,m)=>{const[d]=m,{id:g,styleId:p}=me(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,removes:[{index:d}]}),u.apply(h,m)})}),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:M((u,h,m)=>{const[d]=m,{id:g,styleId:p}=me(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replace:d}),u.apply(h,m)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:M((u,h,m)=>{const[d]=m,{id:g,styleId:p}=me(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replaceSync:d}),u.apply(h,m)})}));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:M((m,d,g)=>{const[p,f]=g,{id:b,styleId:S}=me(d.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:p,index:[...ar(d),f||0]}]}),m.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:M((m,d,g)=>{const[p]=g,{id:f,styleId:b}=me(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...ar(d),p]}]}),m.apply(d,g)})})}),M(()=>{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(m){}return h}}),M(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Qh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:M((l,o,c)=>{var u;const[h,m,d]=c;if(t.has(h))return n.apply(o,[h,m,d]);const{id:g,styleId:p}=me((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,set:{property:h,value:m,priority:d},index:ar(o.parentRule)}),l.apply(o,c)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:M((l,o,c)=>{var u;const[h]=c;if(t.has(h))return a.apply(o,[h]);const{id:m,styleId:d}=me((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,remove:{property:h},index:ar(o.parentRule)}),l.apply(o,c)})}),M(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function qh({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=M(o=>ut(M(c=>{const u=dt(c);if(!u||X(u,e,t,!0))return;const{currentTime:h,volume:m,muted:d,playbackRate:g,loop:p}=u;s({type:o,id:r.getId(u),currentTime:h,volume:m,muted:d,playbackRate:g,loop:p})}),i.media||500)),l=[J("play",a(Ee.Play),n),J("pause",a(Ee.Pause),n),J("seeked",a(Ee.Seeked),n),J("volumechange",a(Ee.VolumeChange),n),J("ratechange",a(Ee.RateChange),n)];return M(()=>{l.forEach(o=>o())})}function ef({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=xe(e.fonts,"add",function(l){return function(o){return setTimeout(M(()=>{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),M(()=>{r.forEach(l=>l())})}function tf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=M(()=>{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 m=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:p,endOffset:f}=m;X(d,r,i,!0)||X(p,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(p),endOffset:f})}n({ranges:c})});return l(),J("selectionchange",l)}function rf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:xe(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 sf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:m,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),a(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),o(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),c(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),u(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),m(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),d(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),g(...p)}}function nf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};sf(s,e);let r;s.recordDOM&&(r=Lo(s,s.doc));const i=Hh(s),n=Yh(s),a=Do(s),l=Zh(s,{win:t}),o=Xh(s),c=qh(s);let u=()=>{},h=()=>{},m=()=>{},d=()=>{};s.recordDOM&&(u=Kh(s,{win:t}),h=To(s,s.doc),m=Qh(s,{win:t}),s.collectFonts&&(d=ef(s)));const g=tf(s),p=rf(s),f=[];for(const b of s.plugins)f.push(b.observer(b.callback,t,b.options));return M(()=>{ve.forEach(b=>b.reset()),r==null||r.disconnect(),i(),n(),a(),l(),o(),c(),u(),h(),m(),d(),g(),p(),f.forEach(b=>b())})}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)}var Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",of=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ut=0;Ut<Pe.length;Ut++)of[Pe.charCodeAt(Ut)]=Ut;var af=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Pe[e[t]>>2],i+=Pe[(e[t]&3)<<4|e[t+1]>>4],i+=Pe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Pe[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 Ui=new Map;function lf(s,e){let t=Ui.get(s);return t||(t=new Map,Ui.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=lf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Ht(s,e,t){if(s instanceof Array)return s.map(r=>Ht(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=af(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Ht(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:[Ht(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=>Ht(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 uf(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=xe(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:Le["2D"],property:a,args:u})},0),o.apply(this,c)}});i.push(l)}catch(l){const o=br(e.CanvasRenderingContext2D.prototype,a,{set(c){s(this.canvas,{type:Le["2D"],property:a,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function cf(s){return s==="experimental-webgl"?"webgl":s}function Wi(s,e,t,r){const i=[];try{const n=xe(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!X(this,e,t,!0)){const c=cf(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 zi(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=xe(s,o,function(u){return function(...h){const m=u.apply(this,h);if(_o(m,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 m}});a.push(c)}catch(c){const u=br(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(u)}return a}function hf(s,e,t,r){const i=[];return i.push(...zi(e.WebGLRenderingContext.prototype,Le.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...zi(e.WebGL2RenderingContext.prototype,Le.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Uo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ff=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Gi=typeof self!="undefined"&&self.Blob&&new Blob([ff(Uo)],{type:"text/javascript;charset=utf-8"});function pf(s){let e;try{if(e=Gi&&(self.URL||self.webkitURL).createObjectURL(Gi),!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 df{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 pf;o.onmessage=g=>{const{id:p}=g.data;if(l.set(p,!1),!("base64"in g.data))return;const{base64:f,type:b,width:S,height:y}=g.data;this.mutationCb({id:p,type:Le["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 m=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(p=>{X(p,r,i,!0)||g.push(p)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,m().forEach(async p=>{var f;const b=this.mirror.getId(p);if(l.get(b)||p.width===0||p.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(p.__context)){const y=p.getContext(p.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const S=await createImageBitmap(p);o.postMessage({id:b,bitmap:S,width:p.width,height:p.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=uf(this.processMutation.bind(this),e,t,r),a=hf(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 mf{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(){}}class gf{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(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(xe(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}}class yf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Lh),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:Xi(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){}}let G,Yt,Dr,lr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Hs=s.contentWindow)==null?void 0:Hs.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=Oa();function we(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:m,slimDOMOptions:d,maskInputFn:g,maskTextFn:p,hooks:f,packFn:b,sampling:S={},dataURLOptions:y={},mousemoveWait:C,recordDOM:$=!0,recordCanvas:_=!1,recordCrossOriginIframes:V=!1,recordAfter:N=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:j=!1,inlineImages:Q=!1,plugins:oe,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:We=new Set([]),errorHandler:ze}=s;_h(ze);const H=V?window.parent===window:!0;let q=!1;if(!H)try{window.parent.document&&(q=!1)}catch(k){q=!0}if(H&&!e)throw new Error("emit function is required");if(!H&&!q)return()=>{};C!==void 0&&S.mousemove===void 0&&(S.mousemove=C),se.reset();const de=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}:m!==void 0?m:{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||{};Ph();let mt,be=0;const Us=k=>{for(const re of oe||[])re.eventProcessor&&(k=re.eventProcessor(k));return b&&!q&&(k=b(k)),k};G=(k,re)=>{var W;const z=k;if(z.timestamp=or(),(W=ve[0])!=null&&W.isFrozen()&&z.type!==A.FullSnapshot&&!(z.type===A.IncrementalSnapshot&&z.data.source===R.Mutation)&&ve.forEach(le=>le.unfreeze()),H)e==null||e(Us(z),re);else if(q){const le={type:"rrweb",event:Us(z),origin:window.location.origin,isCheckout:re};window.parent.postMessage(le,"*")}if(z.type===A.FullSnapshot)mt=z,be=0;else if(z.type===A.IncrementalSnapshot){if(z.data.source===R.Mutation&&z.data.isAttachIframe)return;be++;const le=r&&be>=r,D=t&&z.timestamp-mt.timestamp>t;(le||D)&&Yt(!0)}};const gt=k=>{G({type:A.IncrementalSnapshot,data:O({source:R.Mutation},k)})},Ws=k=>G({type:A.IncrementalSnapshot,data:O({source:R.Scroll},k)}),zs=k=>G({type:A.IncrementalSnapshot,data:O({source:R.CanvasMutation},k)}),Wo=k=>G({type:A.IncrementalSnapshot,data:O({source:R.AdoptedStyleSheet},k)}),Se=new yf({mutationCb:gt,adoptedStyleSheetCb:Wo}),Ce=new Bh({mirror:se,mutationCb:gt,stylesheetManager:Se,recordCrossOriginIframes:V,wrappedEmit:G});for(const k of oe||[])k.getMirror&&k.getMirror({nodeMirror:se,crossOriginIframeMirror:Ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ce.crossOriginIframeStyleMirror});const Sr=new mf;Dr=new df({recordCanvas:_,mutationCb:zs,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:S.canvas,dataURLOptions:y});const yt=new gf({mutationCb:gt,scrollCb:Ws,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:de,dataURLOptions:y,maskTextFn:p,maskInputFn:g,recordCanvas:_,inlineImages:Q,sampling:S,slimDOMOptions:ae,iframeManager:Ce,stylesheetManager:Se,canvasManager:Dr,keepIframeSrcFn:E,processedNodeManager:Sr},mirror:se});Yt=(k=!1)=>{if(!$)return;G({type:A.Meta,data:{href:window.location.href,width:Ro(),height:xo()}},k),Se.reset(),yt.init(),ve.forEach(W=>W.lock());const re=qa(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:de,maskTextFn:p,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:_,inlineImages:Q,onSerialize:W=>{Ao(W,se)&&Ce.addIframe(W),Eo(W,se)&&Se.trackLinkElement(W),ds(W)&&yt.addShadowRoot(x.shadowRoot(W),document)},onIframeLoad:(W,z)=>{Ce.attachIframe(W,z),yt.observeAttachShadow(W)},onStylesheetLoad:(W,z)=>{Se.attachLinkElement(W,z)},keepIframeSrcFn:E});if(!re)return console.warn("Failed to snapshot the document");G({type:A.FullSnapshot,data:{node:re,initialOffset:Io(window)}},k),ve.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const k=[],re=z=>{var le;return M(nf)({mutationCb:gt,mousemoveCb:(D,Cr)=>G({type:A.IncrementalSnapshot,data:{source:Cr,positions:D}}),mouseInteractionCb:D=>G({type:A.IncrementalSnapshot,data:O({source:R.MouseInteraction},D)}),scrollCb:Ws,viewportResizeCb:D=>G({type:A.IncrementalSnapshot,data:O({source:R.ViewportResize},D)}),inputCb:D=>G({type:A.IncrementalSnapshot,data:O({source:R.Input},D)}),mediaInteractionCb:D=>G({type:A.IncrementalSnapshot,data:O({source:R.MediaInteraction},D)}),styleSheetRuleCb:D=>G({type:A.IncrementalSnapshot,data:O({source:R.StyleSheetRule},D)}),styleDeclarationCb:D=>G({type:A.IncrementalSnapshot,data:O({source:R.StyleDeclaration},D)}),canvasMutationCb:zs,fontCb:D=>G({type:A.IncrementalSnapshot,data:O({source:R.Font},D)}),selectionCb:D=>{G({type:A.IncrementalSnapshot,data:O({source:R.Selection},D)})},customElementCb:D=>{G({type:A.IncrementalSnapshot,data:O({source:R.CustomElement},D)})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskTextClass:o,maskTextSelector:c,maskInputOptions:de,inlineStylesheet:u,sampling:S,recordDOM:$,recordCanvas:_,inlineImages:Q,userTriggeredOnInput:F,collectFonts:j,doc:z,maskInputFn:g,maskTextFn:p,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:Ce,stylesheetManager:Se,shadowDomManager:yt,processedNodeManager:Sr,canvasManager:Dr,ignoreCSSAttributes:We,plugins:((le=oe==null?void 0:oe.filter(D=>D.observer))==null?void 0:le.map(D=>({observer:D.observer,options:D.options,callback:Cr=>G({type:A.Plugin,data:{plugin:D.name,payload:Cr}})})))||[]},f)};Ce.addLoadListener(z=>{try{k.push(re(z.contentDocument))}catch(le){console.warn(le)}});const W=()=>{Yt(),k.push(re(document)),lr=!0};return document.readyState==="interactive"||document.readyState==="complete"?W():(k.push(J("DOMContentLoaded",()=>{G({type:A.DomContentLoaded,data:{}}),N==="DOMContentLoaded"&&W()})),k.push(J("load",()=>{G({type:A.Load,data:{}}),N==="load"&&W()},window))),()=>{k.forEach(z=>z()),Sr.destroy(),lr=!1,Fh()}}catch(k){console.warn(k)}}we.addCustomEvent=(s,e)=>{if(!lr)throw new Error("please add custom event after start recording");G({type:A.Custom,data:{tag:s,payload:e}})};we.freezePage=()=>{ve.forEach(s=>s.freeze())};we.takeFullSnapshot=s=>{if(!lr)throw new Error("please take full snapshot after start recording");Yt(s)};we.mirror=se;var Vi;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Vi||(Vi={}));const{addCustomEvent:Qf}=we,{freezePage:qf}=we,{takeFullSnapshot:wf}=we;exports.record=we;
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") {