vident-rum 0.13.1 → 0.14.0

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,56 +1,56 @@
1
- var pe=Uint8Array,ue=Uint16Array,kr=Int32Array,$r=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),_r=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),hs=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ms=function(i,e){for(var t=new ue(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];for(var s=new kr(t[30]),r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)s[n]=n-t[r]<<5|r;return{b:t,r:s}},gs=ms($r,2),ma=gs.b,Rr=gs.r;ma[28]=258,Rr[258]=28;var ys=ms(_r,0),qf=ys.b,fs=ys.r,Or=new ue(32768);for(_=0;_<32768;++_)be=(_&43690)>>1|(_&21845)<<1,be=(be&52428)>>2|(be&13107)<<2,be=(be&61680)>>4|(be&3855)<<4,Or[_]=((be&65280)>>8|(be&255)<<8)>>1;var be,_,rt=(function(i,e,t){for(var r=i.length,s=0,n=new ue(e);s<r;++s)i[s]&&++n[i[s]-1];var o=new ue(e);for(s=1;s<e;++s)o[s]=o[s-1]+n[s-1]<<1;var l;if(t){l=new ue(1<<e);var a=15-e;for(s=0;s<r;++s)if(i[s])for(var u=s<<4|i[s],c=e-i[s],h=o[i[s]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)l[Or[h]>>a]=u}else for(l=new ue(r),s=0;s<r;++s)i[s]&&(l[s]=Or[o[i[s]-1]++]>>15-i[s]);return l}),ke=new pe(288);for(_=0;_<144;++_)ke[_]=8;var _;for(_=144;_<256;++_)ke[_]=9;var _;for(_=256;_<280;++_)ke[_]=7;var _;for(_=280;_<288;++_)ke[_]=8;var _,Mt=new pe(32);for(_=0;_<32;++_)Mt[_]=5;var _,ga=rt(ke,9,0);var ya=rt(Mt,5,0);var vs=function(i){return(i+7)/8|0},va=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new pe(i.subarray(e,t))};var Ce=function(i,e,t){t<<=e&7;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8},et=function(i,e,t){t<<=e&7;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8,i[r+2]|=t>>16},Ar=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var s=t.length,n=t.slice();if(!s)return{t:Ss,l:0};if(s==1){var o=new pe(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(I,M){return I.f-M.f}),t.push({s:-1,f:25001});var l=t[0],a=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:l.f+a.f,l,r:a};c!=s-1;)l=t[t[u].f<t[h].f?u++:h++],a=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:l.f+a.f,l,r:a};for(var d=n[0].s,r=1;r<s;++r)n[r].s>d&&(d=n[r].s);var m=new ue(d+1),g=Tr(t[c-1],m,0);if(g>e){var r=0,p=0,f=g-e,S=1<<f;for(n.sort(function(M,A){return m[A.s]-m[M.s]||M.f-A.f});r<s;++r){var w=n[r].s;if(m[w]>e)p+=S-(1<<g-m[w]),m[w]=e;else break}for(p>>=f;p>0;){var y=n[r].s;m[y]<e?p-=1<<e-m[y]++-1:++r}for(;r>=0&&p;--r){var b=n[r].s;m[b]==e&&(--m[b],++p)}g=e}return{t:new pe(m),l:g}},Tr=function(i,e,t){return i.s==-1?Math.max(Tr(i.l,e,t+1),Tr(i.r,e,t+1)):e[i.s]=t},ps=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new ue(++e),r=0,s=i[0],n=1,o=function(a){t[r++]=a},l=1;l<=e;++l)if(i[l]==s&&l!=e)++n;else{if(!s&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(s),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(s);n=1,s=i[l]}return{c:t.subarray(0,r),n:e}},tt=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},ws=function(i,e,t){var r=t.length,s=vs(e+2);i[s]=r&255,i[s+1]=r>>8,i[s+2]=i[s]^255,i[s+3]=i[s+1]^255;for(var n=0;n<r;++n)i[s+n+4]=t[n];return(s+4+r)*8},ds=function(i,e,t,r,s,n,o,l,a,u,c){Ce(e,c++,t),++s[256];for(var h=Ar(s,15),d=h.t,m=h.l,g=Ar(n,15),p=g.t,f=g.l,S=ps(d),w=S.c,y=S.n,b=ps(p),I=b.c,M=b.n,A=new ue(19),x=0;x<w.length;++x)++A[w[x]&31];for(var x=0;x<I.length;++x)++A[I[x]&31];for(var C=Ar(A,7),T=C.t,K=C.l,N=19;N>4&&!T[hs[N-1]];--N);var E=u+5<<3,z=tt(s,ke)+tt(n,Mt)+o,Y=tt(s,d)+tt(n,p)+o+14+3*N+tt(A,T)+2*A[16]+3*A[17]+7*A[18];if(a>=0&&E<=z&&E<=Y)return ws(e,c,i.subarray(a,a+u));var P,L,q,Q;if(Ce(e,c,1+(Y<z)),c+=2,Y<z){P=rt(d,m,0),L=d,q=rt(p,f,0),Q=p;var Fe=rt(T,K,0);Ce(e,c,y-257),Ce(e,c+5,M-1),Ce(e,c+10,N-4),c+=14;for(var x=0;x<N;++x)Ce(e,c+3*x,T[hs[x]]);c+=3*N;for(var ne=[w,I],Ne=0;Ne<2;++Ne)for(var he=ne[Ne],x=0;x<he.length;++x){var le=he[x]&31;Ce(e,c,Fe[le]),c+=T[le],le>15&&(Ce(e,c,he[x]>>5&127),c+=he[x]>>12)}}else P=ga,L=ke,q=ya,Q=Mt;for(var x=0;x<l;++x){var ee=r[x];if(ee>255){var le=ee>>18&31;et(e,c,P[le+257]),c+=L[le+257],le>7&&(Ce(e,c,ee>>23&31),c+=$r[le]);var Ae=ee&31;et(e,c,q[Ae]),c+=Q[Ae],Ae>3&&(et(e,c,ee>>5&8191),c+=_r[Ae])}else et(e,c,P[ee]),c+=L[ee]}return et(e,c,P[256]),c+L[256]},wa=new kr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ss=new pe(0),Sa=function(i,e,t,r,s,n){var o=n.z||i.length,l=new pe(r+o+5*(1+Math.ceil(o/7e3))+s),a=l.subarray(r,l.length-s),u=n.l,c=(n.r||0)&7;if(e){c&&(a[0]=n.r>>3);for(var h=wa[e-1],d=h>>13,m=h&8191,g=(1<<t)-1,p=n.p||new ue(32768),f=n.h||new ue(g+1),S=Math.ceil(t/3),w=2*S,y=function(V){return(i[V]^i[V+1]<<S^i[V+2]<<w)&g},b=new kr(25e3),I=new ue(288),M=new ue(32),A=0,x=0,C=n.i||0,T=0,K=n.w||0,N=0;C+2<o;++C){var E=y(C),z=C&32767,Y=f[E];if(p[z]=Y,f[E]=z,K<=C){var P=o-C;if((A>7e3||T>24576)&&(P>423||!u)){c=ds(i,a,0,b,I,M,x,T,N,C-N,c),T=A=x=0,N=C;for(var L=0;L<286;++L)I[L]=0;for(var L=0;L<30;++L)M[L]=0}var q=2,Q=0,Fe=m,ne=z-Y&32767;if(P>2&&E==y(C-ne))for(var Ne=Math.min(d,P)-1,he=Math.min(32767,C),le=Math.min(258,P);ne<=he&&--Fe&&z!=Y;){if(i[C+q]==i[C+q-ne]){for(var ee=0;ee<le&&i[C+ee]==i[C+ee-ne];++ee);if(ee>q){if(q=ee,Q=ne,ee>Ne)break;for(var Ae=Math.min(ne,ee-2),ye=0,L=0;L<Ae;++L){var fe=C-ne+L&32767,Qe=p[fe],De=fe-Qe&32767;De>ye&&(ye=De,Y=fe)}}}z=Y,Y=p[z],ne+=z-Y&32767}if(Q){b[T++]=268435456|Rr[q]<<18|fs[Q];var k=Rr[q]&31,oe=fs[Q]&31;x+=$r[k]+_r[oe],++I[257+k],++M[oe],K=C+q,++A}else b[T++]=i[C],++I[i[C]]}}for(C=Math.max(C,K);C<o;++C)b[T++]=i[C],++I[i[C]];c=ds(i,a,u,b,I,M,x,T,N,C-N,c),u||(n.r=c&7|a[c/8|0]<<3,c-=7,n.h=f,n.p=p,n.i=C,n.w=K)}else{for(var C=n.w||0;C<o+u;C+=65535){var W=C+65535;W>=o&&(a[c/8|0]=u,W=o),c=ws(a,c+1,i.subarray(C,W))}n.i=o}return va(l,0,r+vs(c)+s)},ba=(function(){for(var i=new Int32Array(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(t&1&&-306674912)^t>>>1;i[e]=t}return i})(),Ca=function(){var i=-1;return{p:function(e){for(var t=i,r=0;r<e.length;++r)t=ba[t&255^e[r]]^t>>>8;i=t},d:function(){return~i}}};var xa=function(i,e,t,r,s){if(!s&&(s={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),o=new pe(n.length+i.length);o.set(n),o.set(i,n.length),i=o,s.w=n.length}return Sa(i,e.level==null?6:e.level,e.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(i.length)))*1.5):20:12+e.mem,t,r,s)};var Dr=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8},Ea=function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:e.level==9?2:0,i[9]=3,e.mtime!=0&&Dr(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var r=0;r<=t.length;++r)i[r+10]=t.charCodeAt(r)}};var Ia=function(i){return 10+(i.filename?i.filename.length+1:0)};function bs(i,e){e||(e={});var t=Ca(),r=i.length;t.p(i);var s=xa(i,e,Ia(e),8),n=s.length;return Ea(s,e),Dr(s,n-8,t.d()),Dr(s,n-4,r),s}var Ma=typeof TextDecoder<"u"&&new TextDecoder,Na=0;try{Ma.decode(Ss,{stream:!0}),Na=1}catch{}var Aa=Object.defineProperty,Ra=(i,e,t)=>e in i?Aa(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,v=(i,e,t)=>Ra(i,typeof e!="symbol"?e+"":e,t),Cs,Oa=Object.defineProperty,Ta=(i,e,t)=>e in i?Oa(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,xs=(i,e,t)=>Ta(i,typeof e!="symbol"?e+"":e,t),te=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(te||{}),Es={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Is={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Nt={},Da=()=>!!globalThis.Zone;function zi(i){if(Nt[i])return Nt[i];let e=globalThis[i],t=e.prototype,r=i in Es?Es[i]:void 0,s=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=i in Is?Is[i]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!Da())return Nt[i]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[i].prototype;return document.body.removeChild(l),u?Nt[i]=u:t}catch{return t}}var Pr={};function Oe(i,e,t){var r;let s=`${i}.${String(t)}`;if(Pr[s])return Pr[s].call(e);let n=zi(i),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Pr[s]=o,o.call(e)):e[t]}var Lr={};function bn(i,e,t){let r=`${i}.${String(t)}`;if(Lr[r])return Lr[r].bind(e);let n=zi(i)[t];return typeof n!="function"?e[t]:(Lr[r]=n,n.bind(e))}function ka(i){return Oe("Node",i,"childNodes")}function $a(i){return Oe("Node",i,"parentNode")}function _a(i){return Oe("Node",i,"parentElement")}function Pa(i){return Oe("Node",i,"textContent")}function La(i,e){return bn("Node",i,"contains")(e)}function Fa(i){return bn("Node",i,"getRootNode")()}function Ua(i){return!i||!("host"in i)?null:Oe("ShadowRoot",i,"host")}function za(i){return i.styleSheets}function Ba(i){return!i||!("shadowRoot"in i)?null:Oe("Element",i,"shadowRoot")}function Wa(i,e){return Oe("Element",i,"querySelector")(e)}function Va(i,e){return Oe("Element",i,"querySelectorAll")(e)}function Ga(){return zi("MutationObserver").constructor}var re={childNodes:ka,parentNode:$a,parentElement:_a,textContent:Pa,contains:La,getRootNode:Fa,host:Ua,styleSheets:za,shadowRoot:Ba,querySelector:Wa,querySelectorAll:Va,mutationObserver:Ga};function Cn(i){return i.nodeType===i.ELEMENT_NODE}function lt(i){let e=i&&"host"in i&&"mode"in i&&re.host(i)||null;return!!(e&&"shadowRoot"in e&&re.shadowRoot(e)===i)}function ut(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function ja(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function Ha(i){let{cssText:e}=i;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function Kr(i){try{let e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);let r=Array.from(e,s=>xn(s,t)).join("");return ja(r)}catch{return null}}function xn(i,e){if(Za(i)){let t;try{t=Kr(i.styleSheet)||Ha(i)}catch{t=i.cssText}return i.styleSheet.href?rr(t,i.styleSheet.href):t}else{let t=i.cssText;return Xa(i)&&i.selectorText.includes(":")&&(t=Ya(t)),e?rr(t,e):t}}function Ya(i){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function Za(i){return"styleSheet"in i}function Xa(i){return"selectorText"in i}var tr=class{constructor(){xs(this,"idNodeMap",new Map),xs(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ja(){return new tr}function Bi({element:i,maskInputOptions:e,tagName:t,type:r,value:s,maskInputFn:n}){let o=s||"",l=r&&_e(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,i):o="*".repeat(o.length)),o}function _e(i){return i.toLowerCase()}var Ms="__rrweb_original__";function Ka(i){let e=i.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<i.width;r+=t)for(let s=0;s<i.height;s+=t){let n=e.getImageData,o=Ms in n?n[Ms]:n;if(new Uint32Array(o.call(e,r,s,Math.min(t,i.width-r),Math.min(t,i.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function Wi(i){let e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?_e(e):null}function En(i,e){let t;try{t=new URL(i,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(r);return s?.[1]??null}function qa(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}var Qa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,el=/^(?:[a-z+]+:)?\/\//i,tl=/^www\..*/i,rl=/^(data:)([^,]*),(.*)/i;function rr(i,e){return(i||"").replace(Qa,(t,r,s,n,o,l)=>{let a=s||o||l,u=r||n||"";if(!a)return t;if(el.test(a)||tl.test(a))return`url(${u}${a}${u})`;if(rl.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${qa(e)+a}${u})`;let c=e.split("/"),h=a.split("/");c.pop();for(let d of h)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function Fr(i){return i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function il(i,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&i&&typeof i=="string"){let s=Fr(i);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent=="string"){let o=Fr(t[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(s.split(a).length===2){let u=s.indexOf(a);for(let c=u;c<i.length;c++)if(Fr(i.substring(0,c)).length===u){r.push(i.substring(0,c)),i=i.substring(c);break}break}}}}return r.push(i),r}function sl(i,e){return il(i,e).join("/* rr_split */")}var nl=1,ol=new RegExp("[^a-z0-9-_:]"),ht=-2;function In(){return nl++}function al(i){if(i instanceof HTMLFormElement)return"form";let e=_e(i.tagName);return ol.test(e)?"div":e}var Ue,Ns,ll=/^[^ \t\n\r\u000c]+/,ul=/^[, \t\n\r\u000c]+/;function cl(i,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let s=[];for(;r(ul),!(t>=e.length);){let n=r(ll);if(n.slice(-1)===",")n=We(i,n.substring(0,n.length-1)),s.push(n);else{let o="";n=We(i,n);let l=!1;for(;;){let a=e.charAt(t);if(a===""){s.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,s.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return s.join(", ")}var As=new WeakMap;function We(i,e){return!e||e.trim()===""?e:Vi(i,e)}function hl(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Vi(i,e){let t=As.get(i);if(t||(t=i.createElement("a"),As.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Mn(i,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")?We(i,r):t==="srcset"?cl(i,r):t==="style"?rr(r,Vi(i)):e==="object"&&t==="data"?We(i,r):r)}function Nn(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function fl(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let r=i.classList.length;r--;){let s=i.classList[r];if(e.test(s))return!0}if(t)return i.matches(t)}catch{}return!1}function ir(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?ir(re.parentNode(i),e,t):!1;for(let r=i.classList.length;r--;){let s=i.classList[r];if(e.test(s))return!0}return t?ir(re.parentNode(i),e,t):!1}function An(i,e,t,r){let s;if(Cn(i)){if(s=i,!re.childNodes(s).length)return!1}else{if(re.parentElement(i)===null)return!1;s=re.parentElement(i)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(ir(s,e,r))return!0;if(t){if(r){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch{}return!1}function pl(i,e,t){let r=i.contentWindow;if(!r)return;let s=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let l=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(l),s=!0,e()});return}let o="about:blank";if(r.location.href!==o||i.src===o||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function dl(i,e,t){let r=!1,s;try{s=i.sheet}catch{return}if(s)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function ml(i,e){let{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:p=!1,cssCaptured:f=!1}=e,S=gl(t,r);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:te.Document,childNodes:[],compatMode:i.compatMode}:{type:te.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:te.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return vl(i,{doc:t,blockClass:s,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:p,rootId:S});case i.TEXT_NODE:return yl(i,{doc:t,needsMask:o,maskTextFn:u,rootId:S,cssCaptured:f});case i.CDATA_SECTION_NODE:return{type:te.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:te.Comment,textContent:re.textContent(i)||"",rootId:S};default:return!1}}function gl(i,e){if(!e.hasNode(i))return;let t=e.getId(i);return t===1?void 0:t}function yl(i,e){let{needsMask:t,maskTextFn:r,rootId:s,cssCaptured:n}=e,o=re.parentNode(i),l=o&&o.tagName,a="",u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=re.textContent(i),u&&a&&(a=rr(a,Vi(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,re.parentElement(i)):a.replace(/[\S]/g,"*")),{type:te.Text,textContent:a||"",rootId:s}}function vl(i,e){let{doc:t,blockClass:r,blockSelector:s,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:d=!1,rootId:m}=e,g=fl(i,r,s),p=al(i),f={},S=i.attributes.length;for(let y=0;y<S;y++){let b=i.attributes[y];Nn(p,b.name,b.value)||(f[b.name]=Mn(t,p,_e(b.name),b.value))}if(p==="link"&&n){let y=Array.from(t.styleSheets).find(I=>I.href===i.href),b=null;y&&(b=Kr(y)),b&&(delete f.rel,delete f.href,f._cssText=b)}if(p==="style"&&i.sheet){let y=Kr(i.sheet);y&&(i.childNodes.length>1&&(y=sl(y,i)),f._cssText=y)}if(p==="input"||p==="textarea"||p==="select"){let y=i.value,b=i.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Bi({element:i,type:Wi(i),tagName:p,value:y,maskInputOptions:o,maskInputFn:l}):b&&(f.checked=b)}if(p==="option"&&(i.selected&&!o.select?f.selected=!0:delete f.selected),p==="dialog"&&i.open&&(f.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&c){if(i.__context==="2d")Ka(i)||(f.rr_dataURL=i.toDataURL(a.type,a.quality));else if(!("__context"in i)){let y=i.toDataURL(a.type,a.quality),b=t.createElement("canvas");b.width=i.width,b.height=i.height;let I=b.toDataURL(a.type,a.quality);y!==I&&(f.rr_dataURL=y)}}if(p==="img"&&u){Ue||(Ue=t.createElement("canvas"),Ns=Ue.getContext("2d"));let y=i,b=y.currentSrc||y.getAttribute("src")||"<unknown-src>",I=y.crossOrigin,M=()=>{y.removeEventListener("load",M);try{Ue.width=y.naturalWidth,Ue.height=y.naturalHeight,Ns.drawImage(y,0,0),f.rr_dataURL=Ue.toDataURL(a.type,a.quality)}catch(A){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?M():y.addEventListener("load",M);return}else console.warn(`Cannot inline img src=${b}! Error: ${A}`)}y.crossOrigin==="anonymous"&&(I?f.crossOrigin=I:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?M():y.addEventListener("load",M)}if(p==="audio"||p==="video"){let y=f;y.rr_mediaState=i.paused?"paused":"played",y.rr_mediaCurrentTime=i.currentTime,y.rr_mediaPlaybackRate=i.playbackRate,y.rr_mediaMuted=i.muted,y.rr_mediaLoop=i.loop,y.rr_mediaVolume=i.volume}if(d||(i.scrollLeft&&(f.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(f.rr_scrollTop=i.scrollTop)),g){let{width:y,height:b}=i.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${b}px`}}p==="iframe"&&!h(f.src)&&(i.contentDocument||(f.rr_src=f.src),delete f.src);let w;try{customElements.get(p)&&(w=!0)}catch{}return{type:te.Element,tagName:p,attributes:f,childNodes:[],isSVG:hl(i)||void 0,needBlock:g,rootId:m,isCustom:w}}function G(i){return i==null?"":i.toLowerCase()}function wl(i,e){if(e.comment&&i.type===te.Comment)return!0;if(i.type===te.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"||i.attributes.rel==="modulepreload")&&i.attributes.as==="script"||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&En(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(G(i.attributes.name).match(/^msapplication-tile(image|color)$/)||G(i.attributes.name)==="application-name"||G(i.attributes.rel)==="icon"||G(i.attributes.rel)==="apple-touch-icon"||G(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&G(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(G(i.attributes.property).match(/^(og|twitter|fb):/)||G(i.attributes.name).match(/^(og|twitter):/)||G(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(G(i.attributes.name)==="robots"||G(i.attributes.name)==="googlebot"||G(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(G(i.attributes.name)==="author"||G(i.attributes.name)==="generator"||G(i.attributes.name)==="framework"||G(i.attributes.name)==="publisher"||G(i.attributes.name)==="progid"||G(i.attributes.property).match(/^article:/)||G(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(G(i.attributes.name)==="google-site-verification"||G(i.attributes.name)==="yandex-verification"||G(i.attributes.name)==="csrf-token"||G(i.attributes.name)==="p:domain_verify"||G(i.attributes.name)==="verify-v1"||G(i.attributes.name)==="verification"||G(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(i,e){let{doc:t,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g={},inlineImages:p=!1,recordCanvas:f=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:A=!1,cssCaptured:x=!1}=e,{needsMask:C}=e,{preserveWhiteSpace:T=!0}=e;C||(C=An(i,o,l,C===void 0));let K=ml(i,{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:C,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,keepIframeSrcFn:M,newlyAddedElement:A,cssCaptured:x});if(!K)return console.warn(i,"not serialized"),null;let N;r.hasNode(i)?N=r.getId(i):wl(K,m)||!T&&K.type===te.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?N=ht:N=In();let E=Object.assign(K,{id:N});if(r.add(i,E),N===ht)return null;S&&S(i);let z=!a;if(E.type===te.Element){z=z&&!E.needBlock,delete E.needBlock;let P=re.shadowRoot(i);P&&ut(P)&&(E.isShadowHost=!0)}if((E.type===te.Document||E.type===te.Element)&&z){m.headWhitespace&&E.type===te.Element&&E.tagName==="head"&&(T=!1);let P={doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:C,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:T,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:I,keepIframeSrcFn:M,cssCaptured:!1};if(!(E.type===te.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===te.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(P.cssCaptured=!0);for(let q of Array.from(re.childNodes(i))){let Q=Ve(q,P);Q&&E.childNodes.push(Q)}}let L=null;if(Cn(i)&&(L=re.shadowRoot(i)))for(let q of Array.from(re.childNodes(L))){let Q=Ve(q,P);Q&&(ut(L)&&(Q.isShadow=!0),E.childNodes.push(Q))}}let Y=re.parentNode(i);return Y&&lt(Y)&&ut(Y)&&(E.isShadow=!0),E.type===te.Element&&E.tagName==="iframe"&&pl(i,()=>{let P=i.contentDocument;if(P&&w){let L=Ve(P,{doc:P,mirror:r,blockClass:s,blockSelector:n,needsMask:C,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:T,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:I,keepIframeSrcFn:M});L&&w(i,L)}},y),E.type===te.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&En(E.attributes.href)==="css")&&dl(i,()=>{if(b){let P=Ve(i,{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:C,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:T,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:I,keepIframeSrcFn:M});P&&b(i,P)}},I),E}function Sl(i,e){let{mirror:t=new tr,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:d,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:I=()=>!1}=e||{};return Ve(i,{doc:i,mirror:t,blockClass:r,blockSelector:s,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:d,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:I,newlyAddedElement:!1})}var bl=/(max|min)-device-(width|height)/,ep=new RegExp(bl.source,"g");function Cl(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function xl(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var Gi={exports:{}},j=String,Rn=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};Gi.exports=Rn();Gi.exports.createColors=Rn;var El=Gi.exports,Il={},Ml=Object.freeze(Object.defineProperty({__proto__:null,default:Il},Symbol.toStringTag,{value:"Module"})),me=xl(Ml),Rs=El,Os=me,qr=class On extends Error{constructor(e,t,r,s,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(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,On)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Rs.isColorSupported),Os&&e&&(t=Os(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=Rs.createColors(!0);l=d=>u(h(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(s,n).map((u,c)=>{let h=s+1+c,d=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+`
2
- `+m+l("^")}return" "+a(d)+u}).join(`
1
+ var pe=Uint8Array,ce=Uint16Array,kr=Int32Array,$r=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Pr=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ps=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ys=function(i,e){for(var t=new ce(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];for(var s=new kr(t[30]),r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)s[n]=n-t[r]<<5|r;return{b:t,r:s}},vs=ys($r,2),ga=vs.b,Rr=vs.r;ga[28]=258,Rr[258]=28;var ws=ys(Pr,0),Qf=ws.b,ds=ws.r,Or=new ce(32768);for(L=0;L<32768;++L)Ce=(L&43690)>>1|(L&21845)<<1,Ce=(Ce&52428)>>2|(Ce&13107)<<2,Ce=(Ce&61680)>>4|(Ce&3855)<<4,Or[L]=((Ce&65280)>>8|(Ce&255)<<8)>>1;var Ce,L,rt=(function(i,e,t){for(var r=i.length,s=0,n=new ce(e);s<r;++s)i[s]&&++n[i[s]-1];var o=new ce(e);for(s=1;s<e;++s)o[s]=o[s-1]+n[s-1]<<1;var l;if(t){l=new ce(1<<e);var a=15-e;for(s=0;s<r;++s)if(i[s])for(var u=s<<4|i[s],c=e-i[s],h=o[i[s]-1]++<<c,m=h|(1<<c)-1;h<=m;++h)l[Or[h]>>a]=u}else for(l=new ce(r),s=0;s<r;++s)i[s]&&(l[s]=Or[o[i[s]-1]++]>>15-i[s]);return l}),$e=new pe(288);for(L=0;L<144;++L)$e[L]=8;var L;for(L=144;L<256;++L)$e[L]=9;var L;for(L=256;L<280;++L)$e[L]=7;var L;for(L=280;L<288;++L)$e[L]=8;var L,Mt=new pe(32);for(L=0;L<32;++L)Mt[L]=5;var L,ya=rt($e,9,0);var va=rt(Mt,5,0);var Ss=function(i){return(i+7)/8|0},wa=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new pe(i.subarray(e,t))};var xe=function(i,e,t){t<<=e&7;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8},et=function(i,e,t){t<<=e&7;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8,i[r+2]|=t>>16},Ar=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var s=t.length,n=t.slice();if(!s)return{t:Cs,l:0};if(s==1){var o=new pe(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(M,A){return M.f-A.f}),t.push({s:-1,f:25001});var l=t[0],a=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:l.f+a.f,l,r:a};c!=s-1;)l=t[t[u].f<t[h].f?u++:h++],a=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:l.f+a.f,l,r:a};for(var m=n[0].s,r=1;r<s;++r)n[r].s>m&&(m=n[r].s);var d=new ce(m+1),g=Tr(t[c-1],d,0);if(g>e){var r=0,p=0,f=g-e,S=1<<f;for(n.sort(function(A,R){return d[R.s]-d[A.s]||A.f-R.f});r<s;++r){var w=n[r].s;if(d[w]>e)p+=S-(1<<g-d[w]),d[w]=e;else break}for(p>>=f;p>0;){var y=n[r].s;d[y]<e?p-=1<<e-d[y]++-1:++r}for(;r>=0&&p;--r){var b=n[r].s;d[b]==e&&(--d[b],++p)}g=e}return{t:new pe(d),l:g}},Tr=function(i,e,t){return i.s==-1?Math.max(Tr(i.l,e,t+1),Tr(i.r,e,t+1)):e[i.s]=t},ms=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new ce(++e),r=0,s=i[0],n=1,o=function(a){t[r++]=a},l=1;l<=e;++l)if(i[l]==s&&l!=e)++n;else{if(!s&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(s),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(s);n=1,s=i[l]}return{c:t.subarray(0,r),n:e}},tt=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},bs=function(i,e,t){var r=t.length,s=Ss(e+2);i[s]=r&255,i[s+1]=r>>8,i[s+2]=i[s]^255,i[s+3]=i[s+1]^255;for(var n=0;n<r;++n)i[s+n+4]=t[n];return(s+4+r)*8},gs=function(i,e,t,r,s,n,o,l,a,u,c){xe(e,c++,t),++s[256];for(var h=Ar(s,15),m=h.t,d=h.l,g=Ar(n,15),p=g.t,f=g.l,S=ms(m),w=S.c,y=S.n,b=ms(p),M=b.c,A=b.n,R=new ce(19),x=0;x<w.length;++x)++R[w[x]&31];for(var x=0;x<M.length;++x)++R[M[x]&31];for(var C=Ar(R,7),D=C.t,J=C.l,W=19;W>4&&!D[ps[W-1]];--W);var N=u+5<<3,Q=tt(s,$e)+tt(n,Mt)+o,ee=tt(s,m)+tt(n,p)+o+14+3*W+tt(R,D)+2*R[16]+3*R[17]+7*R[18];if(a>=0&&N<=Q&&N<=ee)return bs(e,c,i.subarray(a,a+u));var E,I,$,z;if(xe(e,c,1+(ee<Q)),c+=2,ee<Q){E=rt(m,d,0),I=m,$=rt(p,f,0),z=p;var Ae=rt(D,J,0);xe(e,c,y-257),xe(e,c+5,A-1),xe(e,c+10,W-4),c+=14;for(var x=0;x<W;++x)xe(e,c+3*x,D[ps[x]]);c+=3*W;for(var ie=[w,M],ye=0;ye<2;++ye)for(var ue=ie[ye],x=0;x<ue.length;++x){var re=ue[x]&31;xe(e,c,Ae[re]),c+=D[re],re>15&&(xe(e,c,ue[x]>>5&127),c+=ue[x]>>12)}}else E=ya,I=$e,$=va,z=Mt;for(var x=0;x<l;++x){var K=r[x];if(K>255){var re=K>>18&31;et(e,c,E[re+257]),c+=I[re+257],re>7&&(xe(e,c,K>>23&31),c+=$r[re]);var Re=K&31;et(e,c,$[Re]),c+=z[Re],Re>3&&(et(e,c,K>>5&8191),c+=Pr[Re])}else et(e,c,E[K]),c+=I[K]}return et(e,c,E[256]),c+I[256]},Sa=new kr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Cs=new pe(0),ba=function(i,e,t,r,s,n){var o=n.z||i.length,l=new pe(r+o+5*(1+Math.ceil(o/7e3))+s),a=l.subarray(r,l.length-s),u=n.l,c=(n.r||0)&7;if(e){c&&(a[0]=n.r>>3);for(var h=Sa[e-1],m=h>>13,d=h&8191,g=(1<<t)-1,p=n.p||new ce(32768),f=n.h||new ce(g+1),S=Math.ceil(t/3),w=2*S,y=function(G){return(i[G]^i[G+1]<<S^i[G+2]<<w)&g},b=new kr(25e3),M=new ce(288),A=new ce(32),R=0,x=0,C=n.i||0,D=0,J=n.w||0,W=0;C+2<o;++C){var N=y(C),Q=C&32767,ee=f[N];if(p[Q]=ee,f[N]=Q,J<=C){var E=o-C;if((R>7e3||D>24576)&&(E>423||!u)){c=gs(i,a,0,b,M,A,x,D,W,C-W,c),D=R=x=0,W=C;for(var I=0;I<286;++I)M[I]=0;for(var I=0;I<30;++I)A[I]=0}var $=2,z=0,Ae=d,ie=Q-ee&32767;if(E>2&&N==y(C-ie))for(var ye=Math.min(m,E)-1,ue=Math.min(32767,C),re=Math.min(258,E);ie<=ue&&--Ae&&Q!=ee;){if(i[C+$]==i[C+$-ie]){for(var K=0;K<re&&i[C+K]==i[C+K-ie];++K);if(K>$){if($=K,z=ie,K>ye)break;for(var Re=Math.min(ie,K-2),ve=0,I=0;I<Re;++I){var fe=C-ie+I&32767,Qe=p[fe],ke=fe-Qe&32767;ke>ve&&(ve=ke,ee=fe)}}}Q=ee,ee=p[Q],ie+=Q-ee&32767}if(z){b[D++]=268435456|Rr[$]<<18|ds[z];var P=Rr[$]&31,ae=ds[z]&31;x+=$r[P]+Pr[ae],++M[257+P],++A[ae],J=C+$,++R}else b[D++]=i[C],++M[i[C]]}}for(C=Math.max(C,J);C<o;++C)b[D++]=i[C],++M[i[C]];c=gs(i,a,u,b,M,A,x,D,W,C-W,c),u||(n.r=c&7|a[c/8|0]<<3,c-=7,n.h=f,n.p=p,n.i=C,n.w=J)}else{for(var C=n.w||0;C<o+u;C+=65535){var V=C+65535;V>=o&&(a[c/8|0]=u,V=o),c=bs(a,c+1,i.subarray(C,V))}n.i=o}return wa(l,0,r+Ss(c)+s)},Ca=(function(){for(var i=new Int32Array(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(t&1&&-306674912)^t>>>1;i[e]=t}return i})(),xa=function(){var i=-1;return{p:function(e){for(var t=i,r=0;r<e.length;++r)t=Ca[t&255^e[r]]^t>>>8;i=t},d:function(){return~i}}};var Ea=function(i,e,t,r,s){if(!s&&(s={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),o=new pe(n.length+i.length);o.set(n),o.set(i,n.length),i=o,s.w=n.length}return ba(i,e.level==null?6:e.level,e.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(i.length)))*1.5):20:12+e.mem,t,r,s)};var Dr=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8},Ia=function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:e.level==9?2:0,i[9]=3,e.mtime!=0&&Dr(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var r=0;r<=t.length;++r)i[r+10]=t.charCodeAt(r)}};var Ma=function(i){return 10+(i.filename?i.filename.length+1:0)};function _r(i,e){e||(e={});var t=xa(),r=i.length;t.p(i);var s=Ea(i,e,Ma(e),8),n=s.length;return Ia(s,e),Dr(s,n-8,t.d()),Dr(s,n-4,r),s}var Na=typeof TextDecoder<"u"&&new TextDecoder,Aa=0;try{Na.decode(Cs,{stream:!0}),Aa=1}catch{}var Ra=Object.defineProperty,Oa=(i,e,t)=>e in i?Ra(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,v=(i,e,t)=>Oa(i,typeof e!="symbol"?e+"":e,t),xs,Ta=Object.defineProperty,Da=(i,e,t)=>e in i?Ta(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Es=(i,e,t)=>Da(i,typeof e!="symbol"?e+"":e,t),te=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(te||{}),Is={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ms={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Nt={},ka=()=>!!globalThis.Zone;function Bi(i){if(Nt[i])return Nt[i];let e=globalThis[i],t=e.prototype,r=i in Is?Is[i]:void 0,s=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=i in Ms?Ms[i]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!ka())return Nt[i]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[i].prototype;return document.body.removeChild(l),u?Nt[i]=u:t}catch{return t}}var Lr={};function Te(i,e,t){var r;let s=`${i}.${String(t)}`;if(Lr[s])return Lr[s].call(e);let n=Bi(i),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Lr[s]=o,o.call(e)):e[t]}var Fr={};function Cn(i,e,t){let r=`${i}.${String(t)}`;if(Fr[r])return Fr[r].bind(e);let n=Bi(i)[t];return typeof n!="function"?e[t]:(Fr[r]=n,n.bind(e))}function $a(i){return Te("Node",i,"childNodes")}function Pa(i){return Te("Node",i,"parentNode")}function _a(i){return Te("Node",i,"parentElement")}function La(i){return Te("Node",i,"textContent")}function Fa(i,e){return Cn("Node",i,"contains")(e)}function Ua(i){return Cn("Node",i,"getRootNode")()}function za(i){return!i||!("host"in i)?null:Te("ShadowRoot",i,"host")}function Ba(i){return i.styleSheets}function Wa(i){return!i||!("shadowRoot"in i)?null:Te("Element",i,"shadowRoot")}function Va(i,e){return Te("Element",i,"querySelector")(e)}function Ga(i,e){return Te("Element",i,"querySelectorAll")(e)}function ja(){return Bi("MutationObserver").constructor}var se={childNodes:$a,parentNode:Pa,parentElement:_a,textContent:La,contains:Fa,getRootNode:Ua,host:za,styleSheets:Ba,shadowRoot:Wa,querySelector:Va,querySelectorAll:Ga,mutationObserver:ja};function xn(i){return i.nodeType===i.ELEMENT_NODE}function lt(i){let e=i&&"host"in i&&"mode"in i&&se.host(i)||null;return!!(e&&"shadowRoot"in e&&se.shadowRoot(e)===i)}function ut(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function Ha(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function Ya(i){let{cssText:e}=i;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function qr(i){try{let e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);let r=Array.from(e,s=>En(s,t)).join("");return Ha(r)}catch{return null}}function En(i,e){if(Xa(i)){let t;try{t=qr(i.styleSheet)||Ya(i)}catch{t=i.cssText}return i.styleSheet.href?rr(t,i.styleSheet.href):t}else{let t=i.cssText;return Ja(i)&&i.selectorText.includes(":")&&(t=Za(t)),e?rr(t,e):t}}function Za(i){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function Xa(i){return"styleSheet"in i}function Ja(i){return"selectorText"in i}var tr=class{constructor(){Es(this,"idNodeMap",new Map),Es(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ka(){return new tr}function Wi({element:i,maskInputOptions:e,tagName:t,type:r,value:s,maskInputFn:n}){let o=s||"",l=r&&_e(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,i):o="*".repeat(o.length)),o}function _e(i){return i.toLowerCase()}var Ns="__rrweb_original__";function qa(i){let e=i.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<i.width;r+=t)for(let s=0;s<i.height;s+=t){let n=e.getImageData,o=Ns in n?n[Ns]:n;if(new Uint32Array(o.call(e,r,s,Math.min(t,i.width-r),Math.min(t,i.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function Vi(i){let e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?_e(e):null}function In(i,e){let t;try{t=new URL(i,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(r);return s?.[1]??null}function Qa(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}var el=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,tl=/^(?:[a-z+]+:)?\/\//i,rl=/^www\..*/i,il=/^(data:)([^,]*),(.*)/i;function rr(i,e){return(i||"").replace(el,(t,r,s,n,o,l)=>{let a=s||o||l,u=r||n||"";if(!a)return t;if(tl.test(a)||rl.test(a))return`url(${u}${a}${u})`;if(il.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Qa(e)+a}${u})`;let c=e.split("/"),h=a.split("/");c.pop();for(let m of h)m!=="."&&(m===".."?c.pop():c.push(m));return`url(${u}${c.join("/")}${u})`})}function Ur(i){return i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function sl(i,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&i&&typeof i=="string"){let s=Ur(i);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent=="string"){let o=Ur(t[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(s.split(a).length===2){let u=s.indexOf(a);for(let c=u;c<i.length;c++)if(Ur(i.substring(0,c)).length===u){r.push(i.substring(0,c)),i=i.substring(c);break}break}}}}return r.push(i),r}function nl(i,e){return sl(i,e).join("/* rr_split */")}var ol=1,al=new RegExp("[^a-z0-9-_:]"),ht=-2;function Mn(){return ol++}function ll(i){if(i instanceof HTMLFormElement)return"form";let e=_e(i.tagName);return al.test(e)?"div":e}var Ue,As,ul=/^[^ \t\n\r\u000c]+/,cl=/^[, \t\n\r\u000c]+/;function hl(i,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let s=[];for(;r(cl),!(t>=e.length);){let n=r(ul);if(n.slice(-1)===",")n=We(i,n.substring(0,n.length-1)),s.push(n);else{let o="";n=We(i,n);let l=!1;for(;;){let a=e.charAt(t);if(a===""){s.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,s.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return s.join(", ")}var Rs=new WeakMap;function We(i,e){return!e||e.trim()===""?e:Gi(i,e)}function fl(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Gi(i,e){let t=Rs.get(i);if(t||(t=i.createElement("a"),Rs.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Nn(i,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")?We(i,r):t==="srcset"?hl(i,r):t==="style"?rr(r,Gi(i)):e==="object"&&t==="data"?We(i,r):r)}function An(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function pl(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let r=i.classList.length;r--;){let s=i.classList[r];if(e.test(s))return!0}if(t)return i.matches(t)}catch{}return!1}function ir(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?ir(se.parentNode(i),e,t):!1;for(let r=i.classList.length;r--;){let s=i.classList[r];if(e.test(s))return!0}return t?ir(se.parentNode(i),e,t):!1}function Rn(i,e,t,r){let s;if(xn(i)){if(s=i,!se.childNodes(s).length)return!1}else{if(se.parentElement(i)===null)return!1;s=se.parentElement(i)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(ir(s,e,r))return!0;if(t){if(r){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch{}return!1}function dl(i,e,t){let r=i.contentWindow;if(!r)return;let s=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let l=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(l),s=!0,e()});return}let o="about:blank";if(r.location.href!==o||i.src===o||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function ml(i,e,t){let r=!1,s;try{s=i.sheet}catch{return}if(s)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function gl(i,e){let{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p=!1,cssCaptured:f=!1}=e,S=yl(t,r);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:te.Document,childNodes:[],compatMode:i.compatMode}:{type:te.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:te.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return wl(i,{doc:t,blockClass:s,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p,rootId:S});case i.TEXT_NODE:return vl(i,{doc:t,needsMask:o,maskTextFn:u,rootId:S,cssCaptured:f});case i.CDATA_SECTION_NODE:return{type:te.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:te.Comment,textContent:se.textContent(i)||"",rootId:S};default:return!1}}function yl(i,e){if(!e.hasNode(i))return;let t=e.getId(i);return t===1?void 0:t}function vl(i,e){let{needsMask:t,maskTextFn:r,rootId:s,cssCaptured:n}=e,o=se.parentNode(i),l=o&&o.tagName,a="",u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=se.textContent(i),u&&a&&(a=rr(a,Gi(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,se.parentElement(i)):a.replace(/[\S]/g,"*")),{type:te.Text,textContent:a||"",rootId:s}}function wl(i,e){let{doc:t,blockClass:r,blockSelector:s,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:d}=e,g=pl(i,r,s),p=ll(i),f={},S=i.attributes.length;for(let y=0;y<S;y++){let b=i.attributes[y];An(p,b.name,b.value)||(f[b.name]=Nn(t,p,_e(b.name),b.value))}if(p==="link"&&n){let y=Array.from(t.styleSheets).find(M=>M.href===i.href),b=null;y&&(b=qr(y)),b&&(delete f.rel,delete f.href,f._cssText=b)}if(p==="style"&&i.sheet){let y=qr(i.sheet);y&&(i.childNodes.length>1&&(y=nl(y,i)),f._cssText=y)}if(p==="input"||p==="textarea"||p==="select"){let y=i.value,b=i.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Wi({element:i,type:Vi(i),tagName:p,value:y,maskInputOptions:o,maskInputFn:l}):b&&(f.checked=b)}if(p==="option"&&(i.selected&&!o.select?f.selected=!0:delete f.selected),p==="dialog"&&i.open&&(f.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&c){if(i.__context==="2d")qa(i)||(f.rr_dataURL=i.toDataURL(a.type,a.quality));else if(!("__context"in i)){let y=i.toDataURL(a.type,a.quality),b=t.createElement("canvas");b.width=i.width,b.height=i.height;let M=b.toDataURL(a.type,a.quality);y!==M&&(f.rr_dataURL=y)}}if(p==="img"&&u){Ue||(Ue=t.createElement("canvas"),As=Ue.getContext("2d"));let y=i,b=y.currentSrc||y.getAttribute("src")||"<unknown-src>",M=y.crossOrigin,A=()=>{y.removeEventListener("load",A);try{Ue.width=y.naturalWidth,Ue.height=y.naturalHeight,As.drawImage(y,0,0),f.rr_dataURL=Ue.toDataURL(a.type,a.quality)}catch(R){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${b}! Error: ${R}`)}y.crossOrigin==="anonymous"&&(M?f.crossOrigin=M:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A)}if(p==="audio"||p==="video"){let y=f;y.rr_mediaState=i.paused?"paused":"played",y.rr_mediaCurrentTime=i.currentTime,y.rr_mediaPlaybackRate=i.playbackRate,y.rr_mediaMuted=i.muted,y.rr_mediaLoop=i.loop,y.rr_mediaVolume=i.volume}if(m||(i.scrollLeft&&(f.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(f.rr_scrollTop=i.scrollTop)),g){let{width:y,height:b}=i.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${b}px`}}p==="iframe"&&!h(f.src)&&(i.contentDocument||(f.rr_src=f.src),delete f.src);let w;try{customElements.get(p)&&(w=!0)}catch{}return{type:te.Element,tagName:p,attributes:f,childNodes:[],isSVG:fl(i)||void 0,needBlock:g,rootId:d,isCustom:w}}function j(i){return i==null?"":i.toLowerCase()}function Sl(i,e){if(e.comment&&i.type===te.Comment)return!0;if(i.type===te.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"||i.attributes.rel==="modulepreload")&&i.attributes.as==="script"||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&In(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(j(i.attributes.name).match(/^msapplication-tile(image|color)$/)||j(i.attributes.name)==="application-name"||j(i.attributes.rel)==="icon"||j(i.attributes.rel)==="apple-touch-icon"||j(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&j(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(j(i.attributes.property).match(/^(og|twitter|fb):/)||j(i.attributes.name).match(/^(og|twitter):/)||j(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(j(i.attributes.name)==="robots"||j(i.attributes.name)==="googlebot"||j(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(j(i.attributes.name)==="author"||j(i.attributes.name)==="generator"||j(i.attributes.name)==="framework"||j(i.attributes.name)==="publisher"||j(i.attributes.name)==="progid"||j(i.attributes.property).match(/^article:/)||j(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(j(i.attributes.name)==="google-site-verification"||j(i.attributes.name)==="yandex-verification"||j(i.attributes.name)==="csrf-token"||j(i.attributes.name)==="p:domain_verify"||j(i.attributes.name)==="verify-v1"||j(i.attributes.name)==="verification"||j(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(i,e){let{doc:t,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g={},inlineImages:p=!1,recordCanvas:f=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:R=!1,cssCaptured:x=!1}=e,{needsMask:C}=e,{preserveWhiteSpace:D=!0}=e;C||(C=Rn(i,o,l,C===void 0));let J=gl(i,{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:C,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,keepIframeSrcFn:A,newlyAddedElement:R,cssCaptured:x});if(!J)return console.warn(i,"not serialized"),null;let W;r.hasNode(i)?W=r.getId(i):Sl(J,d)||!D&&J.type===te.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?W=ht:W=Mn();let N=Object.assign(J,{id:W});if(r.add(i,N),W===ht)return null;S&&S(i);let Q=!a;if(N.type===te.Element){Q=Q&&!N.needBlock,delete N.needBlock;let E=se.shadowRoot(i);E&&ut(E)&&(N.isShadowHost=!0)}if((N.type===te.Document||N.type===te.Element)&&Q){d.headWhitespace&&N.type===te.Element&&N.tagName==="head"&&(D=!1);let E={doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:C,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:M,keepIframeSrcFn:A,cssCaptured:!1};if(!(N.type===te.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===te.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(E.cssCaptured=!0);for(let $ of Array.from(se.childNodes(i))){let z=Ve($,E);z&&N.childNodes.push(z)}}let I=null;if(xn(i)&&(I=se.shadowRoot(i)))for(let $ of Array.from(se.childNodes(I))){let z=Ve($,E);z&&(ut(I)&&(z.isShadow=!0),N.childNodes.push(z))}}let ee=se.parentNode(i);return ee&&lt(ee)&&ut(ee)&&(N.isShadow=!0),N.type===te.Element&&N.tagName==="iframe"&&dl(i,()=>{let E=i.contentDocument;if(E&&w){let I=Ve(E,{doc:E,mirror:r,blockClass:s,blockSelector:n,needsMask:C,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:M,keepIframeSrcFn:A});I&&w(i,I)}},y),N.type===te.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&In(N.attributes.href)==="css")&&ml(i,()=>{if(b){let E=Ve(i,{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:C,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:M,keepIframeSrcFn:A});E&&b(i,E)}},M),N}function bl(i,e){let{mirror:t=new tr,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:m,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:M=()=>!1}=e||{};return Ve(i,{doc:i,mirror:t,blockClass:r,blockSelector:s,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn: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:a,recordCanvas:u,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:M,newlyAddedElement:!1})}var Cl=/(max|min)-device-(width|height)/,tp=new RegExp(Cl.source,"g");function xl(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function El(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var ji={exports:{}},H=String,On=function(){return{isColorSupported:!1,reset:H,bold:H,dim:H,italic:H,underline:H,inverse:H,hidden:H,strikethrough:H,black:H,red:H,green:H,yellow:H,blue:H,magenta:H,cyan:H,white:H,gray:H,bgBlack:H,bgRed:H,bgGreen:H,bgYellow:H,bgBlue:H,bgMagenta:H,bgCyan:H,bgWhite:H}};ji.exports=On();ji.exports.createColors=On;var Il=ji.exports,Ml={},Nl=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"})),me=El(Nl),Os=Il,Ts=me,Qr=class Tn extends Error{constructor(e,t,r,s,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(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,Tn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Os.isColorSupported),Ts&&e&&(t=Ts(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=Os.createColors(!0);l=m=>u(h(m)),a=m=>c(m)}else l=a=u=>u;return r.slice(s,n).map((u,c)=>{let h=s+1+c,m=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let d=a(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(m)+u+`
2
+ `+d+l("^")}return" "+a(m)+u}).join(`
3
3
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
4
4
 
5
5
  `+e+`
6
- `),this.name+": "+this.message+e}},ji=qr;qr.default=qr;var bt={};bt.isClean=Symbol("isClean");bt.my=Symbol("my");var Ts={after:`
6
+ `),this.name+": "+this.message+e}},Hi=Qr;Qr.default=Qr;var bt={};bt.isClean=Symbol("isClean");bt.my=Symbol("my");var Ds={after:`
7
7
  `,beforeClose:`
8
8
  `,beforeComment:`
9
9
  `,beforeDecl:`
10
10
  `,beforeOpen:" ",beforeRule:`
11
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Nl(i){return i[0].toUpperCase()+i.slice(1)}var Qr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+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 s=e.parent,n=0;for(;s&&s.type!=="root";)n+=1,s=s.parent;if(r.includes(`
12
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),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 s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s<"u"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ts[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Nl(r);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=Ts[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
11
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Al(i){return i[0].toUpperCase()+i.slice(1)}var ei=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+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 s=e.parent,n=0;for(;s&&s.type!=="root";)n+=1,s=s.parent;if(r.includes(`
12
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),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 s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s<"u"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ds[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Al(r);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=Ds[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
13
13
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
14
14
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
15
15
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?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<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
16
16
  `)&&(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<"u")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<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
17
- `);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<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.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)}},Tn=Qr;Qr.default=Qr;var Al=Tn;function ei(i,e){new Al(e).stringify(i)}var gr=ei;ei.default=ei;var{isClean:At,my:Rl}=bt,Ol=ji,Tl=Tn,Dl=gr;function ti(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],n=typeof s;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(o=>ti(o,t)):(n==="object"&&s!==null&&(s=ti(s)),t[r]=s)}return t}var ri=class{constructor(e={}){this.raws={},this[At]=!1,this[Rl]=!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=ti(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:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Ol(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}}}markDirty(){if(this[At]){this[At]=!1;let e=this;for(;e=e.parent;)e[At]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
18
- `?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},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 s=this.toString(),n=s.indexOf(e.word);n!==-1&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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 Tl().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 s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);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={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return s&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Dl){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}get proxyOf(){return this}},yr=ri;ri.default=ri;var kl=yr,ii=class extends kl{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},vr=ii;ii.default=ii;var $l="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_l=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Pl=(i=21)=>{let e="",t=i;for(;t--;)e+=$l[Math.random()*64|0];return e},Ll={nanoid:Pl,customAlphabet:_l},{SourceMapConsumer:Ds,SourceMapGenerator:ks}=me,{existsSync:Fl,readFileSync:Ul}=me,{dirname:Ur,join:zl}=me;function Bl(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}var si=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ur(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ds(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Bl(e.substr(RegExp.lastMatch.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=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Ur(e),Fl(e))return this.mapFile=e,Ul(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Ds)return ks.fromSourceMap(t).toString();if(t instanceof ks)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=zl(Ur(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)}},Dn=si;si.default=si;var{SourceMapConsumer:Wl,SourceMapGenerator:Vl}=me,{fileURLToPath:$s,pathToFileURL:Rt}=me,{isAbsolute:ni,resolve:oi}=me,{nanoid:Gl}=Ll,zr=me,_s=ji,jl=Dn,Br=Symbol("fromOffsetCache"),Hl=!!(Wl&&Vl),Ps=!!(oi&&ni),sr=class{constructor(e,t={}){if(e===null||typeof e>"u"||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,t.from&&(!Ps||/^\w+:\/\//.test(t.from)||ni(t.from)?this.file=t.from:this.file=oi(t.from)),Ps&&Hl){let r=new jl(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Gl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new _s(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):n=new _s(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Rt&&(n.input.url=Rt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Br])r=this[Br];else{let n=this.css.split(`
19
- `);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Br]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let n=r.length-2,o;for(;s<n;)if(o=s+(n-s>>1),e<r[o])n=o-1;else if(e>=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:oi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:s,line:r}));let a;ni(o.source)?a=Rt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Rt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if($s)u.file=$s(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},wr=sr;sr.default=sr;zr&&zr.registerInput&&zr.registerInput(sr);var{SourceMapConsumer:kn,SourceMapGenerator:Xt}=me,{dirname:Jt,relative:$n,resolve:_n,sep:Pn}=me,{pathToFileURL:Ls}=me,Yl=wr,Zl=!!(kn&&Xt),Xl=!!(Jt&&_n&&$n&&Pn),Jl=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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=`
17
+ `);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<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.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)}},Dn=ei;ei.default=ei;var Rl=Dn;function ti(i,e){new Rl(e).stringify(i)}var gr=ti;ti.default=ti;var{isClean:At,my:Ol}=bt,Tl=Hi,Dl=Dn,kl=gr;function ri(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],n=typeof s;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(o=>ri(o,t)):(n==="object"&&s!==null&&(s=ri(s)),t[r]=s)}return t}var ii=class{constructor(e={}){this.raws={},this[At]=!1,this[Ol]=!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=ri(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:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Tl(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}}}markDirty(){if(this[At]){this[At]=!1;let e=this;for(;e=e.parent;)e[At]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
18
+ `?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},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 s=this.toString(),n=s.indexOf(e.word);n!==-1&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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 Dl().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 s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);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={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return s&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=kl){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}get proxyOf(){return this}},yr=ii;ii.default=ii;var $l=yr,si=class extends $l{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},vr=si;si.default=si;var Pl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_l=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Ll=(i=21)=>{let e="",t=i;for(;t--;)e+=Pl[Math.random()*64|0];return e},Fl={nanoid:Ll,customAlphabet:_l},{SourceMapConsumer:ks,SourceMapGenerator:$s}=me,{existsSync:Ul,readFileSync:zl}=me,{dirname:zr,join:Bl}=me;function Wl(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}var ni=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=zr(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new ks(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Wl(e.substr(RegExp.lastMatch.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=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=zr(e),Ul(e))return this.mapFile=e,zl(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof ks)return $s.fromSourceMap(t).toString();if(t instanceof $s)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=Bl(zr(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)}},kn=ni;ni.default=ni;var{SourceMapConsumer:Vl,SourceMapGenerator:Gl}=me,{fileURLToPath:Ps,pathToFileURL:Rt}=me,{isAbsolute:oi,resolve:ai}=me,{nanoid:jl}=Fl,Br=me,_s=Hi,Hl=kn,Wr=Symbol("fromOffsetCache"),Yl=!!(Vl&&Gl),Ls=!!(ai&&oi),sr=class{constructor(e,t={}){if(e===null||typeof e>"u"||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,t.from&&(!Ls||/^\w+:\/\//.test(t.from)||oi(t.from)?this.file=t.from:this.file=ai(t.from)),Ls&&Yl){let r=new Hl(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+jl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new _s(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):n=new _s(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Rt&&(n.input.url=Rt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Wr])r=this[Wr];else{let n=this.css.split(`
19
+ `);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Wr]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let n=r.length-2,o;for(;s<n;)if(o=s+(n-s>>1),e<r[o])n=o-1;else if(e>=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ai(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:s,line:r}));let a;oi(o.source)?a=Rt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Rt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ps)u.file=Ps(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},wr=sr;sr.default=sr;Br&&Br.registerInput&&Br.registerInput(sr);var{SourceMapConsumer:$n,SourceMapGenerator:Xt}=me,{dirname:Jt,relative:Pn,resolve:_n,sep:Ln}=me,{pathToFileURL:Fs}=me,Zl=wr,Xl=!!($n&&Xt),Jl=!!(Jt&&_n&&Pn&&Ln),Kl=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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=`
20
20
  `;this.css.includes(`\r
21
21
  `)&&(t=`\r
22
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Jt(e.file),s;this.mapOpts.sourcesContent===!1?(s=new kn(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Xl&&Zl&&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=Xt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Xt({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 Xt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
23
- `),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?Jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Jt(_n(r,this.mapOpts.annotation)));let s=$n(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Yl(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 s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){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(Ls){let r=Ls(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;Pn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Ln=Jl,Kl=yr,ai=class extends Kl{constructor(e){super(e),this.type="comment"}},Sr=ai;ai.default=ai;var{isClean:Fn,my:Un}=bt,zn=vr,Bn=Sr,ql=yr,Wn,Hi,Yi,Vn;function Gn(i){return i.map(e=>(e.nodes&&(e.nodes=Gn(e.nodes)),delete e.source,e))}function jn(i){if(i[Fn]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)jn(e)}var Ee=class Hn extends ql{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}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(s=>typeof s=="function"?(n,o)=>s(n.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.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),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Gn(Wn(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new zn(e)]}else if(e.selector)e=[new Hi(e)];else if(e.name)e=[new Yi(e)];else if(e.text)e=[new Bn(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Un]||Hn.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Fn]&&jn(s),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+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(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}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,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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]}};Ee.registerParse=i=>{Wn=i};Ee.registerRule=i=>{Hi=i};Ee.registerAtRule=i=>{Yi=i};Ee.registerRoot=i=>{Vn=i};var Pe=Ee;Ee.default=Ee;Ee.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Yi.prototype):i.type==="rule"?Object.setPrototypeOf(i,Hi.prototype):i.type==="decl"?Object.setPrototypeOf(i,zn.prototype):i.type==="comment"?Object.setPrototypeOf(i,Bn.prototype):i.type==="root"&&Object.setPrototypeOf(i,Vn.prototype),i[Un]=!0,i.nodes&&i.nodes.forEach(e=>{Ee.rebuild(e)})};var Ql=Pe,Yn,Zn,ft=class extends Ql{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Yn(new Zn,this,e).stringify()}};ft.registerLazyResult=i=>{Yn=i};ft.registerProcessor=i=>{Zn=i};var Zi=ft;ft.default=ft;var li=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}},Xn=li;li.default=li;var eu=Xn,ui=class{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 eu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Xi=ui;ui.default=ui;var Wr=39,Fs=34,Ot=92,Us=47,Tt=10,it=32,Dt=12,kt=9,$t=13,tu=91,ru=93,iu=40,su=41,nu=123,ou=125,au=59,lu=42,uu=58,cu=64,_t=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,hu=/.[\r\n"'(/\\]/,zs=/[\da-f]/i,fu=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,u,c,h,d,m,g,p=r.length,f=0,S=[],w=[];function y(){return f}function b(x){throw e.error("Unclosed "+x,f)}function I(){return w.length===0&&f>=p}function M(x){if(w.length)return w.pop();if(f>=p)return;let C=x?x.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Tt:case it:case kt:case $t:case Dt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===it||n===Tt||n===kt||n===$t||n===Dt);g=["space",r.slice(f,o)],f=o-1;break}case tu:case ru:case nu:case ou:case uu:case au:case su:{let T=String.fromCharCode(n);g=[T,T,f];break}case iu:{if(d=S.length?S.pop()[1]:"",m=r.charCodeAt(f+1),d==="url"&&m!==Wr&&m!==Fs&&m!==it&&m!==Tt&&m!==kt&&m!==Dt&&m!==$t){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(s||C){o=f;break}else b("bracket");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||hu.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Wr:case Fs:{l=n===Wr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(s||C){o=f+1;break}else b("string");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case cu:{_t.lastIndex=f+1,_t.test(r),_t.lastIndex===0?o=r.length-1:o=_t.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ot:{for(o=f,u=!0;r.charCodeAt(o+1)===Ot;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Us&&n!==it&&n!==Tt&&n!==kt&&n!==$t&&n!==Dt&&(o+=1,zs.test(r.charAt(o)))){for(;zs.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===it&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Us&&r.charCodeAt(f+1)===lu?(o=r.indexOf("*/",f+2)+1,o===0&&(s||C?o=r.length:b("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],S.push(g),f=o);break}}return f++,g}function A(x){w.push(x)}return{back:A,endOfFile:I,nextToken:M,position:y}},Jn=Pe,nr=class extends Jn{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)}},Ji=nr;nr.default=nr;Jn.registerAtRule(nr);var Kn=Pe,qn,Qn,je=class extends Kn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)n.raws.before=t.raws.before}return s}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 qn(new Qn,this,e).stringify()}};je.registerLazyResult=i=>{qn=i};je.registerProcessor=i=>{Qn=i};var Ct=je;je.default=je;Kn.registerRoot(je);var pt={comma(i){return pt.split(i,[","],!0)},space(i){let e=[" ",`
24
- `," "];return pt.split(i,e)},split(i,e,t){let r=[],s="",n=!1,o=0,l=!1,a="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}},eo=pt;pt.default=pt;var to=Pe,pu=eo,or=class extends to{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return pu.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)}},Ki=or;or.default=or;to.registerRule(or);var du=vr,mu=fu,gu=Sr,yu=Ji,vu=Ct,Bs=Ki,Ws={empty:!0,space:!0};function wu(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}var Su=class{constructor(e){this.input=e,this.root=new vu,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 yu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(a.length>0){for(n=a.length-1,s=a[n];s&&s[0]==="space";)s=a[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(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,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[o,l]of e.entries()){if(r=l,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new gu;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=mu(this.input)}decl(e,t){let r=new du;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||wu(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 u=e[0][0];if(u===":"||u==="space"||u==="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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let m=c[d][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 Bs;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="")}}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,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&s&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}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,s){let n,o,l=r.length,a="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o==="space"&&d===l-1&&!s?u=!1:o==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!Ws[h]&&!Ws[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let d=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Bs;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 s=t;s<e.length;s++)r+=e[s][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",{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})}},bu=Su,Cu=Pe,xu=bu,Eu=wr;function ar(i,e){let t=new Eu(i,e),r=new xu(t);try{r.parse()}catch(s){throw s}return r.root}var qi=ar;ar.default=ar;Cu.registerParse(ar);var{isClean:we,my:Iu}=bt,Mu=Ln,Nu=gr,Au=Pe,Ru=Zi;var Vs=Xi,Ou=qi,Tu=Ct,Du={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ku={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},$u={Once:!0,postcssPlugin:!0,prepare:!0},He=0;function st(i){return typeof i=="object"&&typeof i.then=="function"}function ro(i){let e=!1,t=Du[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,He,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,He,t+"Exit"]:[t,t+"Exit"]}function Gs(i){let e;return i.type==="document"?e=["Document",He,"DocumentExit"]:i.type==="root"?e=["Root",He,"RootExit"]:e=ro(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function ci(i){return i[we]=!1,i.nodes&&i.nodes.forEach(e=>ci(e)),i}var hi={},Ye=class io{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=ci(t);else if(t instanceof io||t instanceof Vs)s=ci(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ou;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[Iu]&&Au.rebuild(s)}this.result=new Vs(e,s,r),this.helpers={...hi,postcss:hi,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!ku[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!$u[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(st(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];){e[we]=!0;let t=[Gs(e)];for(;t.length>0;){let r=this.visitTick(t);if(st(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return st(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=Nu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Mu(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(st(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];)e[we]=!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,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(st(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[we]){l[we]=!0,e.push(Gs(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===He){r.nodes&&r.nodes.length&&(r[we]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[we]=!0;let t=ro(e);for(let r of t)if(r===He)e.nodes&&e.each(s=>{s[we]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ye.registerPostcss=i=>{hi=i};var so=Ye;Ye.default=Ye;Tu.registerLazyResult(Ye);Ru.registerLazyResult(Ye);var _u=Ln,Pu=gr;var Lu=qi,Fu=Xi,fi=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=Pu;this.result=new Fu(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new _u(n,s,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}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[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Lu;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},Uu=fi;fi.default=fi;var zu=Uu,Bu=so,Wu=Zi,Vu=Ct,dt=class{constructor(e=[]){this.version="8.4.38",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 zu(this,e,t):new Bu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Gu=dt;dt.default=dt;Vu.registerProcessor(dt);Wu.registerProcessor(dt);var ju=vr,Hu=Dn,Yu=Sr,Zu=Ji,Xu=wr,Ju=Ct,Ku=Ki;function mt(i,e){if(Array.isArray(i))return i.map(s=>mt(s));let{inputs:t,...r}=i;if(t){e=[];for(let s of t){let n={...s,__proto__:Xu.prototype};n.map&&(n.map={...n.map,__proto__:Hu.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=i.nodes.map(s=>mt(s,e))),r.source){let{inputId:s,...n}=r.source;r.source=n,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new Ju(r);if(r.type==="decl")return new ju(r);if(r.type==="rule")return new Ku(r);if(r.type==="comment")return new Yu(r);if(r.type==="atrule")return new Zu(r);throw new Error("Unknown node type: "+i.type)}var qu=mt;mt.default=mt;var Qu=ji,no=vr,ec=so,tc=Pe,Qi=Gu,rc=gr,ic=qu,oo=Zi,sc=Xn,ao=Sr,lo=Ji,nc=Xi,oc=wr,ac=qi,lc=eo,uo=Ki,co=Ct,uc=yr;function F(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Qi(i)}F.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
22
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Jt(e.file),s;this.mapOpts.sourcesContent===!1?(s=new $n(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Jl&&Xl&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Xt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Xt({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 Xt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
23
+ `),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?Jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Jt(_n(r,this.mapOpts.annotation)));let s=Pn(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Zl(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 s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){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(Fs){let r=Fs(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;Ln==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Fn=Kl,ql=yr,li=class extends ql{constructor(e){super(e),this.type="comment"}},Sr=li;li.default=li;var{isClean:Un,my:zn}=bt,Bn=vr,Wn=Sr,Ql=yr,Vn,Yi,Zi,Gn;function jn(i){return i.map(e=>(e.nodes&&(e.nodes=jn(e.nodes)),delete e.source,e))}function Hn(i){if(i[Un]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Hn(e)}var Ie=class Yn extends Ql{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}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(s=>typeof s=="function"?(n,o)=>s(n.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.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),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=jn(Vn(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Bn(e)]}else if(e.selector)e=[new Yi(e)];else if(e.name)e=[new Zi(e)];else if(e.text)e=[new Wn(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[zn]||Yn.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Un]&&Hn(s),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+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(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}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,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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]}};Ie.registerParse=i=>{Vn=i};Ie.registerRule=i=>{Yi=i};Ie.registerAtRule=i=>{Zi=i};Ie.registerRoot=i=>{Gn=i};var Le=Ie;Ie.default=Ie;Ie.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Zi.prototype):i.type==="rule"?Object.setPrototypeOf(i,Yi.prototype):i.type==="decl"?Object.setPrototypeOf(i,Bn.prototype):i.type==="comment"?Object.setPrototypeOf(i,Wn.prototype):i.type==="root"&&Object.setPrototypeOf(i,Gn.prototype),i[zn]=!0,i.nodes&&i.nodes.forEach(e=>{Ie.rebuild(e)})};var eu=Le,Zn,Xn,ft=class extends eu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Zn(new Xn,this,e).stringify()}};ft.registerLazyResult=i=>{Zn=i};ft.registerProcessor=i=>{Xn=i};var Xi=ft;ft.default=ft;var ui=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}},Jn=ui;ui.default=ui;var tu=Jn,ci=class{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 tu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Ji=ci;ci.default=ci;var Vr=39,Us=34,Ot=92,zs=47,Tt=10,it=32,Dt=12,kt=9,$t=13,ru=91,iu=93,su=40,nu=41,ou=123,au=125,lu=59,uu=42,cu=58,hu=64,Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,_t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,fu=/.[\r\n"'(/\\]/,Bs=/[\da-f]/i,pu=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,u,c,h,m,d,g,p=r.length,f=0,S=[],w=[];function y(){return f}function b(x){throw e.error("Unclosed "+x,f)}function M(){return w.length===0&&f>=p}function A(x){if(w.length)return w.pop();if(f>=p)return;let C=x?x.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Tt:case it:case kt:case $t:case Dt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===it||n===Tt||n===kt||n===$t||n===Dt);g=["space",r.slice(f,o)],f=o-1;break}case ru:case iu:case ou:case au:case cu:case lu:case nu:{let D=String.fromCharCode(n);g=[D,D,f];break}case su:{if(m=S.length?S.pop()[1]:"",d=r.charCodeAt(f+1),m==="url"&&d!==Vr&&d!==Us&&d!==it&&d!==Tt&&d!==kt&&d!==Dt&&d!==$t){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(s||C){o=f;break}else b("bracket");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||fu.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Vr:case Us:{l=n===Vr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(s||C){o=f+1;break}else b("string");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case hu:{Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ot:{for(o=f,u=!0;r.charCodeAt(o+1)===Ot;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==zs&&n!==it&&n!==Tt&&n!==kt&&n!==$t&&n!==Dt&&(o+=1,Bs.test(r.charAt(o)))){for(;Bs.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===it&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===zs&&r.charCodeAt(f+1)===uu?(o=r.indexOf("*/",f+2)+1,o===0&&(s||C?o=r.length:b("comment")),g=["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,g=["word",r.slice(f,o+1),f,o],S.push(g),f=o);break}}return f++,g}function R(x){w.push(x)}return{back:R,endOfFile:M,nextToken:A,position:y}},Kn=Le,nr=class extends Kn{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)}},Ki=nr;nr.default=nr;Kn.registerAtRule(nr);var qn=Le,Qn,eo,je=class extends qn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)n.raws.before=t.raws.before}return s}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 Qn(new eo,this,e).stringify()}};je.registerLazyResult=i=>{Qn=i};je.registerProcessor=i=>{eo=i};var Ct=je;je.default=je;qn.registerRoot(je);var pt={comma(i){return pt.split(i,[","],!0)},space(i){let e=[" ",`
24
+ `," "];return pt.split(i,e)},split(i,e,t){let r=[],s="",n=!1,o=0,l=!1,a="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}},to=pt;pt.default=pt;var ro=Le,du=to,or=class extends ro{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return du.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)}},qi=or;or.default=or;ro.registerRule(or);var mu=vr,gu=pu,yu=Sr,vu=Ki,wu=Ct,Ws=qi,Vs={empty:!0,space:!0};function Su(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}var bu=class{constructor(e){this.input=e,this.root=new wu,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 vu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(a.length>0){for(n=a.length-1,s=a[n];s&&s[0]==="space";)s=a[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(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,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[o,l]of e.entries()){if(r=l,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=gu(this.input)}decl(e,t){let r=new mu;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[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 u=e[0][0];if(u===":"||u==="space"||u==="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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let m=u;m>0;m--){let d=c[m][0];if(h.trim().indexOf("!")===0&&d!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 Ws;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="")}}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,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&s&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}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,s){let n,o,l=r.length,a="",u=!0,c,h;for(let m=0;m<l;m+=1)n=r[m],o=n[0],o==="space"&&m===l-1&&!s?u=!1:o==="comment"?(h=r[m-1]?r[m-1][0]:"empty",c=r[m+1]?r[m+1][0]:"empty",!Vs[h]&&!Vs[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new Ws;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 s=t;s<e.length;s++)r+=e[s][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",{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})}},Cu=bu,xu=Le,Eu=Cu,Iu=wr;function ar(i,e){let t=new Iu(i,e),r=new Eu(t);try{r.parse()}catch(s){throw s}return r.root}var Qi=ar;ar.default=ar;xu.registerParse(ar);var{isClean:Se,my:Mu}=bt,Nu=Fn,Au=gr,Ru=Le,Ou=Xi;var Gs=Ji,Tu=Qi,Du=Ct,ku={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},Pu={Once:!0,postcssPlugin:!0,prepare:!0},He=0;function st(i){return typeof i=="object"&&typeof i.then=="function"}function io(i){let e=!1,t=ku[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,He,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,He,t+"Exit"]:[t,t+"Exit"]}function js(i){let e;return i.type==="document"?e=["Document",He,"DocumentExit"]:i.type==="root"?e=["Root",He,"RootExit"]:e=io(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function hi(i){return i[Se]=!1,i.nodes&&i.nodes.forEach(e=>hi(e)),i}var fi={},Ye=class so{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=hi(t);else if(t instanceof so||t instanceof Gs)s=hi(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Tu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[Mu]&&Ru.rebuild(s)}this.result=new Gs(e,s,r),this.helpers={...fi,postcss:fi,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};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(!Pu[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(st(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let t=[js(e)];for(;t.length>0;){let r=this.visitTick(t);if(st(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return st(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=Au;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Nu(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(st(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];)e[Se]=!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,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(st(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[Se]){l[Se]=!0,e.push(js(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===He){r.nodes&&r.nodes.length&&(r[Se]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Se]=!0;let t=io(e);for(let r of t)if(r===He)e.nodes&&e.each(s=>{s[Se]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ye.registerPostcss=i=>{fi=i};var no=Ye;Ye.default=Ye;Du.registerLazyResult(Ye);Ou.registerLazyResult(Ye);var _u=Fn,Lu=gr;var Fu=Qi,Uu=Ji,pi=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=Lu;this.result=new Uu(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new _u(n,s,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}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[]}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=Fu;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"}},zu=pi;pi.default=pi;var Bu=zu,Wu=no,Vu=Xi,Gu=Ct,dt=class{constructor(e=[]){this.version="8.4.38",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 Bu(this,e,t):new Wu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},ju=dt;dt.default=dt;Gu.registerProcessor(dt);Vu.registerProcessor(dt);var Hu=vr,Yu=kn,Zu=Sr,Xu=Ki,Ju=wr,Ku=Ct,qu=qi;function mt(i,e){if(Array.isArray(i))return i.map(s=>mt(s));let{inputs:t,...r}=i;if(t){e=[];for(let s of t){let n={...s,__proto__:Ju.prototype};n.map&&(n.map={...n.map,__proto__:Yu.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=i.nodes.map(s=>mt(s,e))),r.source){let{inputId:s,...n}=r.source;r.source=n,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new Ku(r);if(r.type==="decl")return new Hu(r);if(r.type==="rule")return new qu(r);if(r.type==="comment")return new Zu(r);if(r.type==="atrule")return new Xu(r);throw new Error("Unknown node type: "+i.type)}var Qu=mt;mt.default=mt;var ec=Hi,oo=vr,tc=no,rc=Le,es=ju,ic=gr,sc=Qu,ao=Xi,nc=Jn,lo=Sr,uo=Ki,oc=Ji,ac=wr,lc=Qi,uc=to,co=qi,ho=Ct,cc=yr;function F(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new es(i)}F.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
25
25
  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:
26
- https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Qi().version,l}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(o,l,a){return F([s(a)]).process(o,l)},s};F.stringify=rc;F.parse=ac;F.fromJSON=ic;F.list=lc;F.comment=i=>new ao(i);F.atRule=i=>new lo(i);F.decl=i=>new no(i);F.rule=i=>new uo(i);F.root=i=>new co(i);F.document=i=>new oo(i);F.CssSyntaxError=Qu;F.Declaration=no;F.Container=tc;F.Processor=Qi;F.Document=oo;F.Comment=ao;F.Warning=sc;F.AtRule=lo;F.Result=nc;F.Input=oc;F.Rule=uo;F.Root=co;F.Node=uc;ec.registerPostcss(F);var cc=F;F.default=F;var Z=Cl(cc);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var hc=Object.defineProperty,fc=(i,e,t)=>e in i?hc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ce=(i,e,t)=>fc(i,typeof e!="symbol"?e+"":e,t);function pc(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function dc(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var es={exports:{}},H=String,ho=function(){return{isColorSupported:!1,reset:H,bold:H,dim:H,italic:H,underline:H,inverse:H,hidden:H,strikethrough:H,black:H,red:H,green:H,yellow:H,blue:H,magenta:H,cyan:H,white:H,gray:H,bgBlack:H,bgRed:H,bgGreen:H,bgYellow:H,bgBlue:H,bgMagenta:H,bgCyan:H,bgWhite:H}};es.exports=ho();es.exports.createColors=ho;var mc=es.exports,gc={},yc=Object.freeze(Object.defineProperty({__proto__:null,default:gc},Symbol.toStringTag,{value:"Module"})),ge=dc(yc),js=mc,Hs=ge,pi=class fo extends Error{constructor(e,t,r,s,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(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,fo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=js.isColorSupported),Hs&&e&&(t=Hs(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=js.createColors(!0);l=d=>u(h(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(s,n).map((u,c)=>{let h=s+1+c,d=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+`
27
- `+m+l("^")}return" "+a(d)+u}).join(`
26
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new es().version,l}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(o,l,a){return F([s(a)]).process(o,l)},s};F.stringify=ic;F.parse=lc;F.fromJSON=sc;F.list=uc;F.comment=i=>new lo(i);F.atRule=i=>new uo(i);F.decl=i=>new oo(i);F.rule=i=>new co(i);F.root=i=>new ho(i);F.document=i=>new ao(i);F.CssSyntaxError=ec;F.Declaration=oo;F.Container=rc;F.Processor=es;F.Document=ao;F.Comment=lo;F.Warning=nc;F.AtRule=uo;F.Result=oc;F.Input=ac;F.Rule=co;F.Root=ho;F.Node=cc;tc.registerPostcss(F);var hc=F;F.default=F;var Z=xl(hc);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var fc=Object.defineProperty,pc=(i,e,t)=>e in i?fc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,he=(i,e,t)=>pc(i,typeof e!="symbol"?e+"":e,t);function dc(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function mc(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var ts={exports:{}},Y=String,fo=function(){return{isColorSupported:!1,reset:Y,bold:Y,dim:Y,italic:Y,underline:Y,inverse:Y,hidden:Y,strikethrough:Y,black:Y,red:Y,green:Y,yellow:Y,blue:Y,magenta:Y,cyan:Y,white:Y,gray:Y,bgBlack:Y,bgRed:Y,bgGreen:Y,bgYellow:Y,bgBlue:Y,bgMagenta:Y,bgCyan:Y,bgWhite:Y}};ts.exports=fo();ts.exports.createColors=fo;var gc=ts.exports,yc={},vc=Object.freeze(Object.defineProperty({__proto__:null,default:yc},Symbol.toStringTag,{value:"Module"})),ge=mc(vc),Hs=gc,Ys=ge,di=class po extends Error{constructor(e,t,r,s,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(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,po)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Hs.isColorSupported),Ys&&e&&(t=Ys(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=Hs.createColors(!0);l=m=>u(h(m)),a=m=>c(m)}else l=a=u=>u;return r.slice(s,n).map((u,c)=>{let h=s+1+c,m=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let d=a(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(m)+u+`
27
+ `+d+l("^")}return" "+a(m)+u}).join(`
28
28
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
29
29
 
30
30
  `+e+`
31
- `),this.name+": "+this.message+e}},ts=pi;pi.default=pi;var xt={};xt.isClean=Symbol("isClean");xt.my=Symbol("my");var Ys={after:`
31
+ `),this.name+": "+this.message+e}},rs=di;di.default=di;var xt={};xt.isClean=Symbol("isClean");xt.my=Symbol("my");var Zs={after:`
32
32
  `,beforeClose:`
33
33
  `,beforeComment:`
34
34
  `,beforeDecl:`
35
35
  `,beforeOpen:" ",beforeRule:`
36
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function vc(i){return i[0].toUpperCase()+i.slice(1)}var di=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+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 s=e.parent,n=0;for(;s&&s.type!=="root";)n+=1,s=s.parent;if(r.includes(`
37
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),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 s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s<"u"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ys[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+vc(r);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=Ys[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
36
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function wc(i){return i[0].toUpperCase()+i.slice(1)}var mi=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+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 s=e.parent,n=0;for(;s&&s.type!=="root";)n+=1,s=s.parent;if(r.includes(`
37
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),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 s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s<"u"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Zs[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+wc(r);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=Zs[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
38
38
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
39
39
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(`
40
40
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?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<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
41
41
  `)&&(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<"u")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<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
42
- `);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<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.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)}},po=di;di.default=di;var wc=po;function mi(i,e){new wc(e).stringify(i)}var br=mi;mi.default=mi;var{isClean:Lt,my:Sc}=xt,bc=ts,Cc=po,xc=br;function gi(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],n=typeof s;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(o=>gi(o,t)):(n==="object"&&s!==null&&(s=gi(s)),t[r]=s)}return t}var yi=class{constructor(e={}){this.raws={},this[Lt]=!1,this[Sc]=!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=gi(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:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new bc(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}}}markDirty(){if(this[Lt]){this[Lt]=!1;let e=this;for(;e=e.parent;)e[Lt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
43
- `?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},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 s=this.toString(),n=s.indexOf(e.word);n!==-1&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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 Cc().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 s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);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={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return s&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=xc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}get proxyOf(){return this}},Cr=yi;yi.default=yi;var Ec=Cr,vi=class extends Ec{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},xr=vi;vi.default=vi;var Ic="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Mc=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Nc=(i=21)=>{let e="",t=i;for(;t--;)e+=Ic[Math.random()*64|0];return e},Ac={nanoid:Nc,customAlphabet:Mc},{SourceMapConsumer:Zs,SourceMapGenerator:Xs}=ge,{existsSync:Rc,readFileSync:Oc}=ge,{dirname:Vr,join:Tc}=ge;function Dc(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}var wi=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Vr(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Zs(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Dc(e.substr(RegExp.lastMatch.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=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Vr(e),Rc(e))return this.mapFile=e,Oc(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Zs)return Xs.fromSourceMap(t).toString();if(t instanceof Xs)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=Tc(Vr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},mo=wi;wi.default=wi;var{SourceMapConsumer:kc,SourceMapGenerator:$c}=ge,{fileURLToPath:Js,pathToFileURL:Ft}=ge,{isAbsolute:Si,resolve:bi}=ge,{nanoid:_c}=Ac,Gr=ge,Ks=ts,Pc=mo,jr=Symbol("fromOffsetCache"),Lc=!!(kc&&$c),qs=!!(bi&&Si),lr=class{constructor(e,t={}){if(e===null||typeof e>"u"||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,t.from&&(!qs||/^\w+:\/\//.test(t.from)||Si(t.from)?this.file=t.from:this.file=bi(t.from)),qs&&Lc){let r=new Pc(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+_c(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Ks(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):n=new Ks(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Ft&&(n.input.url=Ft(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[jr])r=this[jr];else{let n=this.css.split(`
44
- `);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[jr]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let n=r.length-2,o;for(;s<n;)if(o=s+(n-s>>1),e<r[o])n=o-1;else if(e>=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:bi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:s,line:r}));let a;Si(o.source)?a=Ft(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ft(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Js)u.file=Js(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Er=lr;lr.default=lr;Gr&&Gr.registerInput&&Gr.registerInput(lr);var{SourceMapConsumer:go,SourceMapGenerator:Kt}=ge,{dirname:qt,relative:yo,resolve:vo,sep:wo}=ge,{pathToFileURL:Qs}=ge,Fc=Er,Uc=!!(go&&Kt),zc=!!(qt&&vo&&yo&&wo),Bc=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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=`
42
+ `);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<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.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)}},mo=mi;mi.default=mi;var Sc=mo;function gi(i,e){new Sc(e).stringify(i)}var br=gi;gi.default=gi;var{isClean:Lt,my:bc}=xt,Cc=rs,xc=mo,Ec=br;function yi(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],n=typeof s;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(o=>yi(o,t)):(n==="object"&&s!==null&&(s=yi(s)),t[r]=s)}return t}var vi=class{constructor(e={}){this.raws={},this[Lt]=!1,this[bc]=!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=yi(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:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Cc(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}}}markDirty(){if(this[Lt]){this[Lt]=!1;let e=this;for(;e=e.parent;)e[Lt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
43
+ `?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},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 s=this.toString(),n=s.indexOf(e.word);n!==-1&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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 xc().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 s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);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={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return s&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ec){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}get proxyOf(){return this}},Cr=vi;vi.default=vi;var Ic=Cr,wi=class extends Ic{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},xr=wi;wi.default=wi;var Mc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Nc=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Ac=(i=21)=>{let e="",t=i;for(;t--;)e+=Mc[Math.random()*64|0];return e},Rc={nanoid:Ac,customAlphabet:Nc},{SourceMapConsumer:Xs,SourceMapGenerator:Js}=ge,{existsSync:Oc,readFileSync:Tc}=ge,{dirname:Gr,join:Dc}=ge;function kc(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}var Si=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Gr(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Xs(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return kc(e.substr(RegExp.lastMatch.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=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Gr(e),Oc(e))return this.mapFile=e,Tc(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 s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Xs)return Js.fromSourceMap(t).toString();if(t instanceof Js)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=Dc(Gr(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)}},go=Si;Si.default=Si;var{SourceMapConsumer:$c,SourceMapGenerator:Pc}=ge,{fileURLToPath:Ks,pathToFileURL:Ft}=ge,{isAbsolute:bi,resolve:Ci}=ge,{nanoid:_c}=Rc,jr=ge,qs=rs,Lc=go,Hr=Symbol("fromOffsetCache"),Fc=!!($c&&Pc),Qs=!!(Ci&&bi),lr=class{constructor(e,t={}){if(e===null||typeof e>"u"||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,t.from&&(!Qs||/^\w+:\/\//.test(t.from)||bi(t.from)?this.file=t.from:this.file=Ci(t.from)),Qs&&Fc){let r=new Lc(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+_c(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new qs(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):n=new qs(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Ft&&(n.input.url=Ft(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Hr])r=this[Hr];else{let n=this.css.split(`
44
+ `);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Hr]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let n=r.length-2,o;for(;s<n;)if(o=s+(n-s>>1),e<r[o])n=o-1;else if(e>=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ci(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:s,line:r}));let a;bi(o.source)?a=Ft(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ft(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ks)u.file=Ks(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Er=lr;lr.default=lr;jr&&jr.registerInput&&jr.registerInput(lr);var{SourceMapConsumer:yo,SourceMapGenerator:Kt}=ge,{dirname:qt,relative:vo,resolve:wo,sep:So}=ge,{pathToFileURL:en}=ge,Uc=Er,zc=!!(yo&&Kt),Bc=!!(qt&&wo&&vo&&So),Wc=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;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=`
45
45
  `;this.css.includes(`\r
46
46
  `)&&(t=`\r
47
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||qt(e.file),s;this.mapOpts.sourcesContent===!1?(s=new go(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),zc&&Uc&&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>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
48
- `),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?qt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=qt(vo(r,this.mapOpts.annotation)));let s=yo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Fc(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 s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){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(Qs){let r=Qs(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;wo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},So=Bc,Wc=Cr,Ci=class extends Wc{constructor(e){super(e),this.type="comment"}},Ir=Ci;Ci.default=Ci;var{isClean:bo,my:Co}=xt,xo=xr,Eo=Ir,Vc=Cr,Io,rs,is,Mo;function No(i){return i.map(e=>(e.nodes&&(e.nodes=No(e.nodes)),delete e.source,e))}function Ao(i){if(i[bo]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Ao(e)}var Ie=class Ro extends Vc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}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(s=>typeof s=="function"?(n,o)=>s(n.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.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),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=No(Io(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xo(e)]}else if(e.selector)e=[new rs(e)];else if(e.name)e=[new is(e)];else if(e.text)e=[new Eo(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Co]||Ro.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[bo]&&Ao(s),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+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(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}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,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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]}};Ie.registerParse=i=>{Io=i};Ie.registerRule=i=>{rs=i};Ie.registerAtRule=i=>{is=i};Ie.registerRoot=i=>{Mo=i};var Le=Ie;Ie.default=Ie;Ie.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,is.prototype):i.type==="rule"?Object.setPrototypeOf(i,rs.prototype):i.type==="decl"?Object.setPrototypeOf(i,xo.prototype):i.type==="comment"?Object.setPrototypeOf(i,Eo.prototype):i.type==="root"&&Object.setPrototypeOf(i,Mo.prototype),i[Co]=!0,i.nodes&&i.nodes.forEach(e=>{Ie.rebuild(e)})};var Gc=Le,Oo,To,gt=class extends Gc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Oo(new To,this,e).stringify()}};gt.registerLazyResult=i=>{Oo=i};gt.registerProcessor=i=>{To=i};var ss=gt;gt.default=gt;var xi=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}},Do=xi;xi.default=xi;var jc=Do,Ei=class{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 jc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ns=Ei;Ei.default=Ei;var Hr=39,en=34,Ut=92,tn=47,zt=10,nt=32,Bt=12,Wt=9,Vt=13,Hc=91,Yc=93,Zc=40,Xc=41,Jc=123,Kc=125,qc=59,Qc=42,eh=58,th=64,Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,rh=/.[\r\n"'(/\\]/,rn=/[\da-f]/i,ih=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,u,c,h,d,m,g,p=r.length,f=0,S=[],w=[];function y(){return f}function b(x){throw e.error("Unclosed "+x,f)}function I(){return w.length===0&&f>=p}function M(x){if(w.length)return w.pop();if(f>=p)return;let C=x?x.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case zt:case nt:case Wt:case Vt:case Bt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===nt||n===zt||n===Wt||n===Vt||n===Bt);g=["space",r.slice(f,o)],f=o-1;break}case Hc:case Yc:case Jc:case Kc:case eh:case qc:case Xc:{let T=String.fromCharCode(n);g=[T,T,f];break}case Zc:{if(d=S.length?S.pop()[1]:"",m=r.charCodeAt(f+1),d==="url"&&m!==Hr&&m!==en&&m!==nt&&m!==zt&&m!==Wt&&m!==Bt&&m!==Vt){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(s||C){o=f;break}else b("bracket");for(h=o;r.charCodeAt(h-1)===Ut;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||rh.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Hr:case en:{l=n===Hr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(s||C){o=f+1;break}else b("string");for(h=o;r.charCodeAt(h-1)===Ut;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case th:{Gt.lastIndex=f+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ut:{for(o=f,u=!0;r.charCodeAt(o+1)===Ut;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==tn&&n!==nt&&n!==zt&&n!==Wt&&n!==Vt&&n!==Bt&&(o+=1,rn.test(r.charAt(o)))){for(;rn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===nt&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===tn&&r.charCodeAt(f+1)===Qc?(o=r.indexOf("*/",f+2)+1,o===0&&(s||C?o=r.length:b("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(jt.lastIndex=f+1,jt.test(r),jt.lastIndex===0?o=r.length-1:o=jt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],S.push(g),f=o);break}}return f++,g}function A(x){w.push(x)}return{back:A,endOfFile:I,nextToken:M,position:y}},ko=Le,ur=class extends ko{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)}},os=ur;ur.default=ur;ko.registerAtRule(ur);var $o=Le,_o,Po,Ze=class extends $o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)n.raws.before=t.raws.before}return s}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 _o(new Po,this,e).stringify()}};Ze.registerLazyResult=i=>{_o=i};Ze.registerProcessor=i=>{Po=i};var Et=Ze;Ze.default=Ze;$o.registerRoot(Ze);var yt={comma(i){return yt.split(i,[","],!0)},space(i){let e=[" ",`
49
- `," "];return yt.split(i,e)},split(i,e,t){let r=[],s="",n=!1,o=0,l=!1,a="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}},Lo=yt;yt.default=yt;var Fo=Le,sh=Lo,cr=class extends Fo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return sh.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)}},as=cr;cr.default=cr;Fo.registerRule(cr);var nh=xr,oh=ih,ah=Ir,lh=os,uh=Et,sn=as,nn={empty:!0,space:!0};function ch(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}var hh=class{constructor(e){this.input=e,this.root=new uh,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 lh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(a.length>0){for(n=a.length-1,s=a[n];s&&s[0]==="space";)s=a[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(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,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[o,l]of e.entries()){if(r=l,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new ah;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=oh(this.input)}decl(e,t){let r=new nh;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||ch(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 u=e[0][0];if(u===":"||u==="space"||u==="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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let m=c[d][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 sn;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="")}}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,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&s&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}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,s){let n,o,l=r.length,a="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o==="space"&&d===l-1&&!s?u=!1:o==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!nn[h]&&!nn[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let d=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new sn;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 s=t;s<e.length;s++)r+=e[s][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",{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})}},fh=hh,ph=Le,dh=fh,mh=Er;function hr(i,e){let t=new mh(i,e),r=new dh(t);try{r.parse()}catch(s){throw s}return r.root}var ls=hr;hr.default=hr;ph.registerParse(hr);var{isClean:Se,my:gh}=xt,yh=So,vh=br,wh=Le,Sh=ss;var on=ns,bh=ls,Ch=Et,xh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Eh={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},Ih={Once:!0,postcssPlugin:!0,prepare:!0},Xe=0;function ot(i){return typeof i=="object"&&typeof i.then=="function"}function Uo(i){let e=!1,t=xh[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,Xe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,Xe,t+"Exit"]:[t,t+"Exit"]}function an(i){let e;return i.type==="document"?e=["Document",Xe,"DocumentExit"]:i.type==="root"?e=["Root",Xe,"RootExit"]:e=Uo(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Ii(i){return i[Se]=!1,i.nodes&&i.nodes.forEach(e=>Ii(e)),i}var Mi={},Je=class zo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Ii(t);else if(t instanceof zo||t instanceof on)s=Ii(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=bh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[gh]&&wh.rebuild(s)}this.result=new on(e,s,r),this.helpers={...Mi,postcss:Mi,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Eh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ih[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(ot(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];){e[Se]=!0;let t=[an(e)];for(;t.length>0;){let r=this.visitTick(t);if(ot(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ot(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=vh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new yh(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Se];)e[Se]=!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,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ot(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[Se]){l[Se]=!0,e.push(an(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Xe){r.nodes&&r.nodes.length&&(r[Se]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Se]=!0;let t=Uo(e);for(let r of t)if(r===Xe)e.nodes&&e.each(s=>{s[Se]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Je.registerPostcss=i=>{Mi=i};var Bo=Je;Je.default=Je;Ch.registerLazyResult(Je);Sh.registerLazyResult(Je);var Mh=So,Nh=br;var Ah=ls,Rh=ns,Ni=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=Nh;this.result=new Rh(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Mh(n,s,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}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[]}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=Ah;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"}},Oh=Ni;Ni.default=Ni;var Th=Oh,Dh=Bo,kh=ss,$h=Et,vt=class{constructor(e=[]){this.version="8.4.38",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 Th(this,e,t):new Dh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},_h=vt;vt.default=vt;$h.registerProcessor(vt);kh.registerProcessor(vt);var Ph=xr,Lh=mo,Fh=Ir,Uh=os,zh=Er,Bh=Et,Wh=as;function wt(i,e){if(Array.isArray(i))return i.map(s=>wt(s));let{inputs:t,...r}=i;if(t){e=[];for(let s of t){let n={...s,__proto__:zh.prototype};n.map&&(n.map={...n.map,__proto__:Lh.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=i.nodes.map(s=>wt(s,e))),r.source){let{inputId:s,...n}=r.source;r.source=n,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new Bh(r);if(r.type==="decl")return new Ph(r);if(r.type==="rule")return new Wh(r);if(r.type==="comment")return new Fh(r);if(r.type==="atrule")return new Uh(r);throw new Error("Unknown node type: "+i.type)}var Vh=wt;wt.default=wt;var Gh=ts,Wo=xr,jh=Bo,Hh=Le,us=_h,Yh=br,Zh=Vh,Vo=ss,Xh=Do,Go=Ir,jo=os,Jh=ns,Kh=Er,qh=ls,Qh=Lo,Ho=as,Yo=Et,ef=Cr;function U(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new us(i)}U.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
47
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||qt(e.file),s;this.mapOpts.sourcesContent===!1?(s=new yo(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Bc&&zc&&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>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
48
+ `),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?qt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=qt(wo(r,this.mapOpts.annotation)));let s=vo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Uc(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 s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){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(en){let r=en(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;So==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},bo=Wc,Vc=Cr,xi=class extends Vc{constructor(e){super(e),this.type="comment"}},Ir=xi;xi.default=xi;var{isClean:Co,my:xo}=xt,Eo=xr,Io=Ir,Gc=Cr,Mo,is,ss,No;function Ao(i){return i.map(e=>(e.nodes&&(e.nodes=Ao(e.nodes)),delete e.source,e))}function Ro(i){if(i[Co]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Ro(e)}var Me=class Oo extends Gc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}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(s=>typeof s=="function"?(n,o)=>s(n.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.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),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ao(Mo(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Eo(e)]}else if(e.selector)e=[new is(e)];else if(e.name)e=[new ss(e)];else if(e.text)e=[new Io(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[xo]||Oo.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Co]&&Ro(s),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+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(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}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,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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]}};Me.registerParse=i=>{Mo=i};Me.registerRule=i=>{is=i};Me.registerAtRule=i=>{ss=i};Me.registerRoot=i=>{No=i};var Fe=Me;Me.default=Me;Me.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,ss.prototype):i.type==="rule"?Object.setPrototypeOf(i,is.prototype):i.type==="decl"?Object.setPrototypeOf(i,Eo.prototype):i.type==="comment"?Object.setPrototypeOf(i,Io.prototype):i.type==="root"&&Object.setPrototypeOf(i,No.prototype),i[xo]=!0,i.nodes&&i.nodes.forEach(e=>{Me.rebuild(e)})};var jc=Fe,To,Do,gt=class extends jc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new To(new Do,this,e).stringify()}};gt.registerLazyResult=i=>{To=i};gt.registerProcessor=i=>{Do=i};var ns=gt;gt.default=gt;var Ei=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}},ko=Ei;Ei.default=Ei;var Hc=ko,Ii=class{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 Hc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},os=Ii;Ii.default=Ii;var Yr=39,tn=34,Ut=92,rn=47,zt=10,nt=32,Bt=12,Wt=9,Vt=13,Yc=91,Zc=93,Xc=40,Jc=41,Kc=123,qc=125,Qc=59,eh=42,th=58,rh=64,Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ih=/.[\r\n"'(/\\]/,sn=/[\da-f]/i,sh=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,u,c,h,m,d,g,p=r.length,f=0,S=[],w=[];function y(){return f}function b(x){throw e.error("Unclosed "+x,f)}function M(){return w.length===0&&f>=p}function A(x){if(w.length)return w.pop();if(f>=p)return;let C=x?x.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case zt:case nt:case Wt:case Vt:case Bt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===nt||n===zt||n===Wt||n===Vt||n===Bt);g=["space",r.slice(f,o)],f=o-1;break}case Yc:case Zc:case Kc:case qc:case th:case Qc:case Jc:{let D=String.fromCharCode(n);g=[D,D,f];break}case Xc:{if(m=S.length?S.pop()[1]:"",d=r.charCodeAt(f+1),m==="url"&&d!==Yr&&d!==tn&&d!==nt&&d!==zt&&d!==Wt&&d!==Bt&&d!==Vt){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(s||C){o=f;break}else b("bracket");for(h=o;r.charCodeAt(h-1)===Ut;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||ih.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Yr:case tn:{l=n===Yr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(s||C){o=f+1;break}else b("string");for(h=o;r.charCodeAt(h-1)===Ut;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case rh:{Gt.lastIndex=f+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ut:{for(o=f,u=!0;r.charCodeAt(o+1)===Ut;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==rn&&n!==nt&&n!==zt&&n!==Wt&&n!==Vt&&n!==Bt&&(o+=1,sn.test(r.charAt(o)))){for(;sn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===nt&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===rn&&r.charCodeAt(f+1)===eh?(o=r.indexOf("*/",f+2)+1,o===0&&(s||C?o=r.length:b("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(jt.lastIndex=f+1,jt.test(r),jt.lastIndex===0?o=r.length-1:o=jt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],S.push(g),f=o);break}}return f++,g}function R(x){w.push(x)}return{back:R,endOfFile:M,nextToken:A,position:y}},$o=Fe,ur=class extends $o{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)}},as=ur;ur.default=ur;$o.registerAtRule(ur);var Po=Fe,_o,Lo,Ze=class extends Po{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)n.raws.before=t.raws.before}return s}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 _o(new Lo,this,e).stringify()}};Ze.registerLazyResult=i=>{_o=i};Ze.registerProcessor=i=>{Lo=i};var Et=Ze;Ze.default=Ze;Po.registerRoot(Ze);var yt={comma(i){return yt.split(i,[","],!0)},space(i){let e=[" ",`
49
+ `," "];return yt.split(i,e)},split(i,e,t){let r=[],s="",n=!1,o=0,l=!1,a="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}},Fo=yt;yt.default=yt;var Uo=Fe,nh=Fo,cr=class extends Uo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nh.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)}},ls=cr;cr.default=cr;Uo.registerRule(cr);var oh=xr,ah=sh,lh=Ir,uh=as,ch=Et,nn=ls,on={empty:!0,space:!0};function hh(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}var fh=class{constructor(e){this.input=e,this.root=new ch,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 uh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(a.length>0){for(n=a.length-1,s=a[n];s&&s[0]==="space";)s=a[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(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,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[o,l]of e.entries()){if(r=l,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new lh;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=ah(this.input)}decl(e,t){let r=new oh;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||hh(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 u=e[0][0];if(u===":"||u==="space"||u==="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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let m=u;m>0;m--){let d=c[m][0];if(h.trim().indexOf("!")===0&&d!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 nn;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="")}}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,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&s&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}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,s){let n,o,l=r.length,a="",u=!0,c,h;for(let m=0;m<l;m+=1)n=r[m],o=n[0],o==="space"&&m===l-1&&!s?u=!1:o==="comment"?(h=r[m-1]?r[m-1][0]:"empty",c=r[m+1]?r[m+1][0]:"empty",!on[h]&&!on[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new nn;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 s=t;s<e.length;s++)r+=e[s][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",{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})}},ph=fh,dh=Fe,mh=ph,gh=Er;function hr(i,e){let t=new gh(i,e),r=new mh(t);try{r.parse()}catch(s){throw s}return r.root}var us=hr;hr.default=hr;dh.registerParse(hr);var{isClean:be,my:yh}=xt,vh=bo,wh=br,Sh=Fe,bh=ns;var an=os,Ch=us,xh=Et,Eh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ih={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},Mh={Once:!0,postcssPlugin:!0,prepare:!0},Xe=0;function ot(i){return typeof i=="object"&&typeof i.then=="function"}function zo(i){let e=!1,t=Eh[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,Xe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,Xe,t+"Exit"]:[t,t+"Exit"]}function ln(i){let e;return i.type==="document"?e=["Document",Xe,"DocumentExit"]:i.type==="root"?e=["Root",Xe,"RootExit"]:e=zo(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Mi(i){return i[be]=!1,i.nodes&&i.nodes.forEach(e=>Mi(e)),i}var Ni={},Je=class Bo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Mi(t);else if(t instanceof Bo||t instanceof an)s=Mi(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ch;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[yh]&&Sh.rebuild(s)}this.result=new an(e,s,r),this.helpers={...Ni,postcss:Ni,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Ih[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Mh[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(ot(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];){e[be]=!0;let t=[ln(e)];for(;t.length>0;){let r=this.visitTick(t);if(ot(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ot(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=wh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new vh(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];)e[be]=!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,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ot(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[be]){l[be]=!0,e.push(ln(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Xe){r.nodes&&r.nodes.length&&(r[be]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[be]=!0;let t=zo(e);for(let r of t)if(r===Xe)e.nodes&&e.each(s=>{s[be]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Je.registerPostcss=i=>{Ni=i};var Wo=Je;Je.default=Je;xh.registerLazyResult(Je);bh.registerLazyResult(Je);var Nh=bo,Ah=br;var Rh=us,Oh=os,Ai=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=Ah;this.result=new Oh(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Nh(n,s,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}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[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Rh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},Th=Ai;Ai.default=Ai;var Dh=Th,kh=Wo,$h=ns,Ph=Et,vt=class{constructor(e=[]){this.version="8.4.38",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 Dh(this,e,t):new kh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},_h=vt;vt.default=vt;Ph.registerProcessor(vt);$h.registerProcessor(vt);var Lh=xr,Fh=go,Uh=Ir,zh=as,Bh=Er,Wh=Et,Vh=ls;function wt(i,e){if(Array.isArray(i))return i.map(s=>wt(s));let{inputs:t,...r}=i;if(t){e=[];for(let s of t){let n={...s,__proto__:Bh.prototype};n.map&&(n.map={...n.map,__proto__:Fh.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=i.nodes.map(s=>wt(s,e))),r.source){let{inputId:s,...n}=r.source;r.source=n,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new Wh(r);if(r.type==="decl")return new Lh(r);if(r.type==="rule")return new Vh(r);if(r.type==="comment")return new Uh(r);if(r.type==="atrule")return new zh(r);throw new Error("Unknown node type: "+i.type)}var Gh=wt;wt.default=wt;var jh=rs,Vo=xr,Hh=Wo,Yh=Fe,cs=_h,Zh=br,Xh=Gh,Go=ns,Jh=ko,jo=Ir,Ho=as,Kh=os,qh=Er,Qh=us,ef=Fo,Yo=ls,Zo=Et,tf=Cr;function U(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new cs(i)}U.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
50
50
  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:
51
- https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new us().version,l}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(o,l,a){return U([s(a)]).process(o,l)},s};U.stringify=Yh;U.parse=qh;U.fromJSON=Zh;U.list=Qh;U.comment=i=>new Go(i);U.atRule=i=>new jo(i);U.decl=i=>new Wo(i);U.rule=i=>new Ho(i);U.root=i=>new Yo(i);U.document=i=>new Vo(i);U.CssSyntaxError=Gh;U.Declaration=Wo;U.Container=Hh;U.Processor=us;U.Document=Vo;U.Comment=Go;U.Warning=Xh;U.AtRule=jo;U.Result=Jh;U.Input=Kh;U.Rule=Ho;U.Root=Yo;U.Node=ef;jh.registerPostcss(U);var tf=U;U.default=U;var X=pc(tf);X.stringify;X.fromJSON;X.plugin;X.parse;X.list;X.document;X.comment;X.atRule;X.rule;X.decl;X.root;X.CssSyntaxError;X.Declaration;X.Container;X.Processor;X.Document;X.Comment;X.Warning;X.AtRule;X.Result;X.Input;X.Rule;X.Root;X.Node;var Ai=class i{constructor(...e){ce(this,"parentElement",null),ce(this,"parentNode",null),ce(this,"ownerDocument"),ce(this,"firstChild",null),ce(this,"lastChild",null),ce(this,"previousSibling",null),ce(this,"nextSibling",null),ce(this,"ELEMENT_NODE",1),ce(this,"TEXT_NODE",3),ce(this,"nodeType"),ce(this,"nodeName"),ce(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof i){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"}};var ln={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},un={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ht={},rf=()=>!!globalThis.Zone;function cs(i){if(Ht[i])return Ht[i];let e=globalThis[i],t=e.prototype,r=i in ln?ln[i]:void 0,s=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=i in un?un[i]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!rf())return Ht[i]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[i].prototype;return document.body.removeChild(l),u?Ht[i]=u:t}catch{return t}}var Yr={};function Te(i,e,t){var r;let s=`${i}.${String(t)}`;if(Yr[s])return Yr[s].call(e);let n=cs(i),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Yr[s]=o,o.call(e)):e[t]}var Zr={};function Zo(i,e,t){let r=`${i}.${String(t)}`;if(Zr[r])return Zr[r].bind(e);let n=cs(i)[t];return typeof n!="function"?e[t]:(Zr[r]=n,n.bind(e))}function sf(i){return Te("Node",i,"childNodes")}function nf(i){return Te("Node",i,"parentNode")}function of(i){return Te("Node",i,"parentElement")}function af(i){return Te("Node",i,"textContent")}function lf(i,e){return Zo("Node",i,"contains")(e)}function uf(i){return Zo("Node",i,"getRootNode")()}function cf(i){return!i||!("host"in i)?null:Te("ShadowRoot",i,"host")}function hf(i){return i.styleSheets}function ff(i){return!i||!("shadowRoot"in i)?null:Te("Element",i,"shadowRoot")}function pf(i,e){return Te("Element",i,"querySelector")(e)}function df(i,e){return Te("Element",i,"querySelectorAll")(e)}function Xo(){return cs("MutationObserver").constructor}var R={childNodes:sf,parentNode:nf,parentElement:of,textContent:af,contains:lf,getRootNode:uf,host:cf,styleSheets:hf,shadowRoot:ff,querySelector:pf,querySelectorAll:df,mutationObserver:Xo};function ie(i,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(i,e,r),()=>t.removeEventListener(i,e,r)}var ze=`Please stop import mirror directly. Instead of that,\r
51
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new cs().version,l}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(o,l,a){return U([s(a)]).process(o,l)},s};U.stringify=Zh;U.parse=Qh;U.fromJSON=Xh;U.list=ef;U.comment=i=>new jo(i);U.atRule=i=>new Ho(i);U.decl=i=>new Vo(i);U.rule=i=>new Yo(i);U.root=i=>new Zo(i);U.document=i=>new Go(i);U.CssSyntaxError=jh;U.Declaration=Vo;U.Container=Yh;U.Processor=cs;U.Document=Go;U.Comment=jo;U.Warning=Jh;U.AtRule=Ho;U.Result=Kh;U.Input=qh;U.Rule=Yo;U.Root=Zo;U.Node=tf;Hh.registerPostcss(U);var rf=U;U.default=U;var X=dc(rf);X.stringify;X.fromJSON;X.plugin;X.parse;X.list;X.document;X.comment;X.atRule;X.rule;X.decl;X.root;X.CssSyntaxError;X.Declaration;X.Container;X.Processor;X.Document;X.Comment;X.Warning;X.AtRule;X.Result;X.Input;X.Rule;X.Root;X.Node;var Ri=class i{constructor(...e){he(this,"parentElement",null),he(this,"parentNode",null),he(this,"ownerDocument"),he(this,"firstChild",null),he(this,"lastChild",null),he(this,"previousSibling",null),he(this,"nextSibling",null),he(this,"ELEMENT_NODE",1),he(this,"TEXT_NODE",3),he(this,"nodeType"),he(this,"nodeName"),he(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof i){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"}};var un={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ht={},sf=()=>!!globalThis.Zone;function hs(i){if(Ht[i])return Ht[i];let e=globalThis[i],t=e.prototype,r=i in un?un[i]:void 0,s=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=i in cn?cn[i]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!sf())return Ht[i]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[i].prototype;return document.body.removeChild(l),u?Ht[i]=u:t}catch{return t}}var Zr={};function De(i,e,t){var r;let s=`${i}.${String(t)}`;if(Zr[s])return Zr[s].call(e);let n=hs(i),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Zr[s]=o,o.call(e)):e[t]}var Xr={};function Xo(i,e,t){let r=`${i}.${String(t)}`;if(Xr[r])return Xr[r].bind(e);let n=hs(i)[t];return typeof n!="function"?e[t]:(Xr[r]=n,n.bind(e))}function nf(i){return De("Node",i,"childNodes")}function of(i){return De("Node",i,"parentNode")}function af(i){return De("Node",i,"parentElement")}function lf(i){return De("Node",i,"textContent")}function uf(i,e){return Xo("Node",i,"contains")(e)}function cf(i){return Xo("Node",i,"getRootNode")()}function hf(i){return!i||!("host"in i)?null:De("ShadowRoot",i,"host")}function ff(i){return i.styleSheets}function pf(i){return!i||!("shadowRoot"in i)?null:De("Element",i,"shadowRoot")}function df(i,e){return De("Element",i,"querySelector")(e)}function mf(i,e){return De("Element",i,"querySelectorAll")(e)}function Jo(){return hs("MutationObserver").constructor}var O={childNodes:nf,parentNode:of,parentElement:af,textContent:lf,contains:uf,getRootNode:cf,host:hf,styleSheets:ff,shadowRoot:pf,querySelector:df,querySelectorAll:mf,mutationObserver:Jo};function ne(i,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(i,e,r),()=>t.removeEventListener(i,e,r)}var ze=`Please stop import mirror directly. Instead of that,\r
52
52
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
53
- or you can use record.mirror to access the mirror instance during recording.`,cn={map:{},getId(){return console.error(ze),-1},getNode(){return console.error(ze),null},removeNodeFromMap(){console.error(ze)},has(){return console.error(ze),!1},reset(){console.error(ze)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(cn=new Proxy(cn,{get(i,e,t){return e==="map"&&console.error(ze),Reflect.get(i,e,t)}}));function St(i,e,t={}){let r=null,s=0;return function(...n){let o=Date.now();!s&&t.leading===!1&&(s=o);let l=e-(o-s),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),s=o,i.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{s=t.leading===!1?0:Date.now(),r=null,i.apply(a,n)},l))}}function Mr(i,e,t,r,s=window){let n=s.Object.getOwnPropertyDescriptor(i,e);return s.Object.defineProperty(i,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Mr(i,e,n||{},!0)}function qe(i,e,t){try{if(!(e in i))return()=>{};let r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch{return()=>{}}}var fr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(fr=()=>new Date().getTime());function Jo(i){var e,t,r,s;let n=i.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=R.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=R.parentElement(n.body))==null?void 0:r.scrollTop)||((s=n?.body)==null?void 0:s.scrollTop)||0}}function Ko(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Qo(i){return i?i.nodeType===i.ELEMENT_NODE?i:R.parentElement(i):null}function se(i,e,t,r){if(!i)return!1;let s=Qo(i);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(ir(s,e,r))return!0}catch{}return!!(t&&(s.matches(t)||r&&s.closest(t)!==null))}function mf(i,e){return e.getId(i)!==-1}function Xr(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===ht}function ea(i,e){if(lt(i))return!1;let t=e.getId(i);if(!e.has(t))return!0;let r=R.parentNode(i);return r&&r.nodeType===i.DOCUMENT_NODE?!1:r?ea(r,e):!0}function Ri(i){return!!i.changedTouches}function gf(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function ta(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function ra(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function Oi(i){return i?i instanceof Ai&&"shadowRoot"in i?!!i.shadowRoot:!!R.shadowRoot(i):!1}var Ti=class{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-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 ia(i){var e;let t=null;return"getRootNode"in i&&((e=R.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&R.host(R.getRootNode(i))&&(t=R.host(R.getRootNode(i))),t}function yf(i){let e=i,t;for(;t=ia(e);)e=t;return e}function vf(i){let e=i.ownerDocument;if(!e)return!1;let t=yf(i);return R.contains(e,t)}function sa(i){let e=i.ownerDocument;return e?R.contains(e,i)||vf(i):!1}var $=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))($||{}),O=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i))(O||{}),ae=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(ae||{}),xe=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(xe||{}),Ke=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Ke||{}),Be=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Be||{});var na=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(na||{});function hn(i){return"__ln"in i}var Di=class{constructor(){v(this,"length",0),v(this,"head",null),v(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?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&hn(e.previousSibling)){let 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&&hn(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let 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--)}},fn=(i,e)=>`${i}@${e}`,ki=class{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Di,s=a=>{let u=a,c=ht;for(;c===ht;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{let u=R.parentNode(a);if(!u||!sa(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){let g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=lt(u)?this.mirror.getId(ia(a)):this.mirror.getId(u),d=s(a);if(h===-1||d===-1)return r.addNode(a);let m=Ve(a,{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:g=>{ta(g,this.mirror)&&this.iframeManager.addIframe(g),ra(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Oi(a)&&this.shadowDomManager.addShadowRoot(R.shadowRoot(a),this.doc)},onIframeLoad:(g,p)=>{this.iframeManager.attachIframe(g,p),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,p)=>{this.stylesheetManager.attachLinkElement(g,p)},cssCaptured:c});m&&(e.push({parentId:h,nextId:d,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)pn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(R.parentNode(a))||n(a);for(let a of this.addedSet)!dn(this.droppedSet,a)&&!pn(this.removesSubTreeCache,a,this.mirror)||dn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let u=this.mirror.getId(R.parentNode(o.value)),c=s(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(R.parentNode(c.value));if(s(c.value)===-1)continue;if(h!==-1){a=c;break}else{let m=c.value,g=R.parentNode(m);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=R.host(g);if(this.mirror.getId(p)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}let l={texts:this.texts.map(a=>{let u=a.node,c=R.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:u}=a;if(typeof u.style=="string"){let c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l))}),v(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)),t.attributes.value=Array.from(R.childNodes(e),r=>R.textContent(r)||"").join("")}),v(this,"processMutation",e=>{if(!Xr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=R.textContent(e.target);!se(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:An(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Qo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){let o=Wi(t);s=Bi({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:s,maskInputFn:this.maskInputFn})}if(se(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))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"),!Nn(t.tagName,r))if(n.attributes[r]=Mn(this.doc,_e(t.tagName),_e(r),s),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(let l of Array.from(o.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(se(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),s=lt(e.target)?this.mirror.getId(R.host(e.target)):this.mirror.getId(e.target);se(e.target,this.blockClass,this.blockSelector,!1)||Xr(t,this.mirror,this.slimDOMOptions)||!mf(t,this.mirror)||(this.addedSet.has(t)?($i(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ea(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[fn(r,s)]?$i(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:lt(e.target)&&ut(e.target)?!0:void 0}),wf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Xr(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[fn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);se(e,this.blockClass,this.blockSelector,!1)||(R.childNodes(e).forEach(r=>this.genAdds(r)),Oi(e)&&R.childNodes(R.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","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 $i(i,e){i.delete(e),R.childNodes(e).forEach(t=>$i(i,t))}function wf(i,e){let t=[i];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),R.childNodes(r).forEach(s=>t.push(s)))}}function pn(i,e,t){return i.size===0?!1:Sf(i,e)}function Sf(i,e,t){let r=R.parentNode(e);return r?i.has(r):!1}function dn(i,e){return i.size===0?!1:oa(i,e)}function oa(i,e){let t=R.parentNode(e);return t?i.has(t)?!0:oa(i,t):!1}var ct;function bf(i){ct=i}function Cf(){ct=void 0}var D=i=>ct?(...t)=>{try{return i(...t)}catch(r){if(ct&&ct(r)===!0)return;throw r}}:i,$e=[];function It(i){try{if("composedPath"in i){let e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch{}return i&&i.target}function aa(i,e){let t=new ki;$e.push(t),t.init(i);let r=new(Xo())(D(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function xf({mousemoveCb:i,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let s=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=St(D(h=>{let d=Date.now()-l;i(o.map(m=>(m.timeOffset-=d,m)),h),o=[],l=null}),n),u=D(St(D(h=>{let d=It(h),{clientX:m,clientY:g}=Ri(h)?h.changedTouches[0]:h;l||(l=fr()),o.push({x:m,y:g,id:r.getId(d),timeOffset:fr()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?O.Drag:h instanceof MouseEvent?O.MouseMove:O.TouchMove)}),s,{trailing:!1})),c=[ie("mousemove",u,t),ie("touchmove",u,t),ie("drag",u,t)];return D(()=>{c.forEach(h=>h())})}function Ef({mouseInteractionCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,u=c=>h=>{let d=It(h);if(se(d,r,s,!0))return;let m=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=xe.Mouse;break;case"touch":m=xe.Touch;break;case"pen":m=xe.Pen;break}m===xe.Touch?ae[c]===ae.MouseDown?g="TouchStart":ae[c]===ae.MouseUp&&(g="TouchEnd"):xe.Pen}else Ri(h)&&(m=xe.Touch);m!==null?(a=m,(g.startsWith("Touch")&&m===xe.Touch||g.startsWith("Mouse")&&m===xe.Mouse)&&(m=null)):ae[c]===ae.Click&&(m=a,a=null);let p=Ri(h)?h.changedTouches[0]:h;if(!p)return;let f=t.getId(d),{clientX:S,clientY:w}=p;D(i)({type:ae[g],id:f,x:S,y:w,...m!==null&&{pointerType:m}})};return Object.keys(ae).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=_e(c),d=u(c);if(window.PointerEvent)switch(ae[c]){case ae.MouseDown:case ae.MouseUp:h=h.replace("mouse","pointer");break;case ae.TouchStart:case ae.TouchEnd:return}l.push(ie(h,d,e))}),D(()=>{l.forEach(c=>c())})}function la({scrollCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:n}){let o=D(St(D(l=>{let a=It(l);if(!a||se(a,r,s,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let c=Jo(e.defaultView);i({id:u,x:c.left,y:c.top})}else i({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ie("scroll",o,e)}function If({viewportResizeCb:i},{win:e}){let t=-1,r=-1,s=D(St(D(()=>{let n=Ko(),o=qo();(t!==n||r!==o)&&(i({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return ie("resize",s,e)}var Mf=["INPUT","TEXTAREA","SELECT"],mn=new WeakMap;function Nf({inputCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(w){let y=It(w),b=w.isTrusted,I=y&&y.tagName;if(y&&I==="OPTION"&&(y=R.parentElement(y)),!y||!I||Mf.indexOf(I)<0||se(y,r,s,!0)||y.classList.contains(n)||o&&y.matches(o))return;let M=y.value,A=!1,x=Wi(y)||"";x==="radio"||x==="checkbox"?A=y.checked:(l[I.toLowerCase()]||l[x])&&(M=Bi({element:y,maskInputOptions:l,tagName:I,type:x,value:M,maskInputFn:a})),d(y,c?{text:M,isChecked:A,userTriggered:b}:{text:M,isChecked:A});let C=y.name;x==="radio"&&C&&A&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(T=>{if(T!==y){let K=T.value;d(T,c?{text:K,isChecked:!A,userTriggered:!1}:{text:K,isChecked:!A})}})}function d(w,y){let b=mn.get(w);if(!b||b.text!==y.text||b.isChecked!==y.isChecked){mn.set(w,y);let I=t.getId(w);D(i)({...y,id:I})}}let g=(u.input==="last"?["change"]:["input","change"]).map(w=>ie(w,D(h),e)),p=e.defaultView;if(!p)return()=>{g.forEach(w=>w())};let f=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),S=[[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(...S.map(w=>Mr(w[0],w[1],{set(){D(h)({target:this,isTrusted:!1})}},!1,p))),D(()=>{g.forEach(w=>w())})}function pr(i){let e=[];function t(r,s){if(Yt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Yt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Yt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Yt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return t(i,e)}function Re(i,e,t){let r,s;return i?(i.ownerNode?r=e.getId(i.ownerNode):s=t.getId(i),{styleId:s,id:r}):{}}function Af({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:D((c,h,d)=>{let[m,g]=d,{id:p,styleId:f}=Re(h,e,t.styleMirror);return(p&&p!==-1||f&&f!==-1)&&i({id:p,styleId:f,adds:[{rule:m,index:g}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){let m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,d])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:D((c,h,d)=>{let[m]=d,{id:g,styleId:p}=Re(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,removes:[{index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:D((c,h,d)=>{let[m]=d,{id:g,styleId:p}=Re(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,replace:m}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:D((c,h,d)=>{let[m]=d,{id:g,styleId:p}=Re(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,replaceSync:m}),c.apply(h,d)})}));let a={};Zt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Zt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Zt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Zt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:D((d,m,g)=>{let[p,f]=g,{id:S,styleId:w}=Re(m.parentStyleSheet,e,t.styleMirror);return(S&&S!==-1||w&&w!==-1)&&i({id:S,styleId:w,adds:[{rule:p,index:[...pr(m),f||0]}]}),d.apply(m,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:D((d,m,g)=>{let[p]=g,{id:f,styleId:S}=Re(m.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||S&&S!==-1)&&i({id:f,styleId:S,removes:[{index:[...pr(m),p]}]}),d.apply(m,g)})})}),D(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function ua({mirror:i,stylesheetManager:e},t){var r,s,n;let o=null;t.nodeName==="#document"?o=i.getId(t):o=i.getId(R.host(t));let l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:n.ShadowRoot,a=l?.prototype?Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),D(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Rf({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:s}){let n=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:D((l,a,u)=>{var c;let[h,d,m]=u;if(t.has(h))return n.apply(a,[h,d,m]);let{id:g,styleId:p}=Re((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,set:{property:h,value:d,priority:m},index:pr(a.parentRule)}),l.apply(a,u)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:D((l,a,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(a,[h]);let{id:d,styleId:m}=Re((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&i({id:d,styleId:m,remove:{property:h},index:pr(a.parentRule)}),l.apply(a,u)})}),D(()=>{s.CSSStyleDeclaration.prototype.setProperty=n,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Of({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:r,sampling:s,doc:n}){let o=D(a=>St(D(u=>{let c=It(u);if(!c||se(c,e,t,!0))return;let{currentTime:h,volume:d,muted:m,playbackRate:g,loop:p}=c;i({type:a,id:r.getId(c),currentTime:h,volume:d,muted:m,playbackRate:g,loop:p})}),s.media||500)),l=[ie("play",o(Be.Play),n),ie("pause",o(Be.Pause),n),ie("seeked",o(Be.Seeked),n),ie("volumechange",o(Be.VolumeChange),n),ie("ratechange",o(Be.RateChange),n)];return D(()=>{l.forEach(a=>a())})}function Tf({fontCb:i,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],s=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){let h=new n(a,u,c);return s.set(h,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let o=qe(e.fonts,"add",function(l){return function(a){return setTimeout(D(()=>{let u=s.get(a);u&&(i(u),s.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),D(()=>{r.forEach(l=>l())})}function Df(i){let{doc:e,mirror:t,blockClass:r,blockSelector:s,selectionCb:n}=i,o=!0,l=D(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){let d=a.getRangeAt(h),{startContainer:m,startOffset:g,endContainer:p,endOffset:f}=d;se(m,r,s,!0)||se(p,r,s,!0)||u.push({start:t.getId(m),startOffset:g,end:t.getId(p),endOffset:f})}n({ranges:u})});return l(),ie("selectionchange",l)}function kf({doc:i,customElementCb:e}){let t=i.defaultView;return!t||!t.customElements?()=>{}:qe(t.customElements,"define",function(s){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return s.apply(this,[n,o,l])}})}function $f(i,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:s,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:d,selectionCb:m,customElementCb:g}=i;i.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},i.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},i.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),s(...p)},i.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},i.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},i.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},i.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p)},i.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},i.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},i.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},i.fontCb=(...p)=>{e.font&&e.font(...p),d(...p)},i.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},i.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),g(...p)}}function _f(i,e={}){let t=i.doc.defaultView;if(!t)return()=>{};$f(i,e);let r;i.recordDOM&&(r=aa(i,i.doc));let s=xf(i),n=Ef(i),o=la(i),l=If(i,{win:t}),a=Nf(i),u=Of(i),c=()=>{},h=()=>{},d=()=>{},m=()=>{};i.recordDOM&&(c=Af(i,{win:t}),h=ua(i,i.doc),d=Rf(i,{win:t}),i.collectFonts&&(m=Tf(i)));let g=Df(i),p=kf(i),f=[];for(let S of i.plugins)f.push(S.observer(S.callback,t,S.options));return D(()=>{$e.forEach(S=>S.reset()),r?.disconnect(),s(),n(),o(),l(),a(),u(),c(),h(),d(),m(),g(),p(),f.forEach(S=>S())})}function Yt(i){return typeof window[i]<"u"}function Zt(i){return!!(typeof window[i]<"u"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}var dr=class{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){let n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,s))}getRemoteId(e,t,r){let s=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=s.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,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}},_i=class{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new dr(In)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dr(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,s;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))),(s=this.loadListener)==null||s.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){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let s=this.crossOriginIframeMap.get(e.source);if(!s)return;let n=this.transformCrossOriginEvent(s,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);let s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{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(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(s.node,n)}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case O.Drag:case O.TouchMove:case O.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,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(s=>{this.replaceIds(s,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(s=>{this.replaceStyleIds(s,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(let n of s)!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!==na.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Pi=class{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!ut(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=aa({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(la({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(R.host(e))),this.restoreHandlers.push(ua({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){let r=this;this.restoreHandlers.push(qe(e.prototype,"attachShadow",function(s){return function(n){let o=s.call(this,n),l=R.shadowRoot(this);return l&&sa(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(at=0;at<Ge.length;at++)Pf[Ge.charCodeAt(at)]=at;var at,Lf=function(i){var e=new Uint8Array(i),t,r=e.length,s="";for(t=0;t<r;t+=3)s+=Ge[e[t]>>2],s+=Ge[(e[t]&3)<<4|e[t+1]>>4],s+=Ge[(e[t+1]&15)<<2|e[t+2]>>6],s+=Ge[e[t+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var gn=new Map;function Ff(i,e){let t=gn.get(i);return t||(t=new Map,gn.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}var ca=(i,e,t)=>{if(!i||!(fa(i,e)||typeof i=="object"))return;let r=i.constructor.name,s=Ff(t,r),n=s.indexOf(i);return n===-1&&(n=s.length,s.push(i)),n};function Qt(i,e,t){if(i instanceof Array)return i.map(r=>Qt(r,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){let r=i.constructor.name,s=Lf(i);return{rr_type:r,base64:s}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Qt(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){let r=i.constructor.name,{src:s}=i;return{rr_type:r,src:s}}else if(i instanceof HTMLCanvasElement){let r="HTMLImageElement",s=i.toDataURL();return{rr_type:r,src:s}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[Qt(i.data,e,t),i.width,i.height]};if(fa(i,e)||typeof i=="object"){let r=i.constructor.name,s=ca(i,e,t);return{rr_type:r,index:s}}}}return i}var ha=(i,e,t)=>i.map(r=>Qt(r,e,t)),fa=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>i instanceof e[s]);function Uf(i,e,t,r){let s=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=qe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return se(this.canvas,t,r,!0)||setTimeout(()=>{let c=ha(u,e,this);i(this.canvas,{type:Ke["2D"],property:o,args:c})},0),a.apply(this,u)}});s.push(l)}catch{let l=Mr(e.CanvasRenderingContext2D.prototype,o,{set(a){i(this.canvas,{type:Ke["2D"],property:o,args:[a],setter:!0})}});s.push(l)}return()=>{s.forEach(o=>o())}}function zf(i){return i==="experimental-webgl"?"webgl":i}function yn(i,e,t,r){let s=[];try{let n=qe(i.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!se(this,e,t,!0)){let u=zf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){let c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});s.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(n=>n())}}function vn(i,e,t,r,s,n){let o=[],l=Object.getOwnPropertyNames(i);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof i[a]!="function")continue;let u=qe(i,a,function(c){return function(...h){let d=c.apply(this,h);if(ca(d,n,this),"tagName"in this.canvas&&!se(this.canvas,r,s,!0)){let m=ha(h,n,this),g={type:e,property:a,args:m};t(this.canvas,g)}return d}});o.push(u)}catch{let u=Mr(i,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}return o}function Bf(i,e,t,r){let s=[];return s.push(...vn(e.WebGLRenderingContext.prototype,Ke.WebGL,i,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...vn(e.WebGL2RenderingContext.prototype,Ke.WebGL2,i,t,r,e)),()=>{s.forEach(n=>n())}}var pa="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Wf=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),wn=typeof window<"u"&&window.Blob&&new Blob([Wf(pa)],{type:"text/javascript;charset=utf-8"});function Vf(i){let e;try{if(e=wn&&(window.URL||window.webkitURL).createObjectURL(wn),!e)throw"";let t=new Worker(e,{name:i?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+pa,{name:i?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var Li=class{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});let{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,s,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,s,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,s,n){let o=yn(t,r,s,!0),l=new Map,a=new Vf;a.onmessage=g=>{let{id:p}=g.data;if(l.set(p,!1),!("base64"in g.data))return;let{base64:f,type:S,width:w,height:y}=g.data;this.mutationCb({id:p,type:Ke["2D"],commands:[{property:"clearRect",args:[0,0,w,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:S}]},0,0]}]})};let u=1e3/e,c=0,h,d=()=>{let g=[];return t.document.querySelectorAll("canvas").forEach(p=>{se(p,r,s,!0)||g.push(p)}),g},m=g=>{if(c&&g-c<u){h=requestAnimationFrame(m);return}c=g,d().forEach(async p=>{var f;let S=this.mirror.getId(p);if(l.get(S)||p.width===0||p.height===0)return;if(l.set(S,!0),["webgl","webgl2"].includes(p.__context)){let y=p.getContext(p.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let w=await createImageBitmap(p);a.postMessage({id:S,bitmap:w,width:p.width,height:p.height,dataURLOptions:n.dataURLOptions},[w])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=yn(e,t,r,!1),n=Uf(this.processMutation.bind(this),e,t,r),o=Bf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let s=r.map(o=>{let{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}},Fi=class{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new Ti),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},s=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),s.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:xn(l,n.href),index:a}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Ui=class{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==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(){}},J,er,Jr,mr=!1;try{if(Array.from([1],i=>i*2)[0]!==2){let i=document.createElement("iframe");document.body.appendChild(i),Array.from=((Cs=i.contentWindow)==null?void 0:Cs.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}var de=Ja();function Me(i={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:m,maskInputFn:g,maskTextFn:p,hooks:f,packFn:S,sampling:w={},dataURLOptions:y={},mousemoveWait:b,recordDOM:I=!0,recordCanvas:M=!1,recordCrossOriginIframes:A=!1,recordAfter:x=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",userTriggeredOnInput:C=!1,collectFonts:T=!1,inlineImages:K=!1,plugins:N,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:Y}=i;bf(Y);let P=A?window.parent===window:!0,L=!1;if(!P)try{window.parent.document&&(L=!1)}catch{L=!0}if(P&&!e)throw new Error("emit function is required");if(!P&&!L)return()=>{};b!==void 0&&w.mousemove===void 0&&(w.mousemove=b),de.reset();let q=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}:d!==void 0?d:{password:!0},Q=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};gf();let Fe,ne=0,Ne=k=>{for(let oe of N||[])oe.eventProcessor&&(k=oe.eventProcessor(k));return S&&!L&&(k=S(k)),k};J=(k,oe)=>{var W;let V=k;if(V.timestamp=fr(),(W=$e[0])!=null&&W.isFrozen()&&V.type!==$.FullSnapshot&&!(V.type===$.IncrementalSnapshot&&V.data.source===O.Mutation)&&$e.forEach(ve=>ve.unfreeze()),P)e?.(Ne(V),oe);else if(L){let ve={type:"rrweb",event:Ne(V),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(ve,"*")}if(V.type===$.FullSnapshot)Fe=V,ne=0;else if(V.type===$.IncrementalSnapshot){if(V.data.source===O.Mutation&&V.data.isAttachIframe)return;ne++;let ve=r&&ne>=r,B=t&&V.timestamp-Fe.timestamp>t;(ve||B)&&er(!0)}};let he=k=>{J({type:$.IncrementalSnapshot,data:{source:O.Mutation,...k}})},le=k=>J({type:$.IncrementalSnapshot,data:{source:O.Scroll,...k}}),ee=k=>J({type:$.IncrementalSnapshot,data:{source:O.CanvasMutation,...k}}),Ae=k=>J({type:$.IncrementalSnapshot,data:{source:O.AdoptedStyleSheet,...k}}),ye=new Fi({mutationCb:he,adoptedStyleSheetCb:Ae}),fe=new _i({mirror:de,mutationCb:he,stylesheetManager:ye,recordCrossOriginIframes:A,wrappedEmit:J});for(let k of N||[])k.getMirror&&k.getMirror({nodeMirror:de,crossOriginIframeMirror:fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:fe.crossOriginIframeStyleMirror});let Qe=new Ui;Jr=new Li({recordCanvas:M,mutationCb:ee,win:window,blockClass:s,blockSelector:n,mirror:de,sampling:w.canvas,dataURLOptions:y});let De=new Pi({mutationCb:he,scrollCb:le,bypassOptions:{blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:q,dataURLOptions:y,maskTextFn:p,maskInputFn:g,recordCanvas:M,inlineImages:K,sampling:w,slimDOMOptions:Q,iframeManager:fe,stylesheetManager:ye,canvasManager:Jr,keepIframeSrcFn:E,processedNodeManager:Qe},mirror:de});er=(k=!1)=>{if(!I)return;J({type:$.Meta,data:{href:window.location.href,width:qo(),height:Ko()}},k),ye.reset(),De.init(),$e.forEach(W=>W.lock());let oe=Sl(document,{mirror:de,blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:q,maskTextFn:p,maskInputFn:g,slimDOM:Q,dataURLOptions:y,recordCanvas:M,inlineImages:K,onSerialize:W=>{ta(W,de)&&fe.addIframe(W),ra(W,de)&&ye.trackLinkElement(W),Oi(W)&&De.addShadowRoot(R.shadowRoot(W),document)},onIframeLoad:(W,V)=>{fe.attachIframe(W,V),De.observeAttachShadow(W)},onStylesheetLoad:(W,V)=>{ye.attachLinkElement(W,V)},keepIframeSrcFn:E});if(!oe)return console.warn("Failed to snapshot the document");J({type:$.FullSnapshot,data:{node:oe,initialOffset:Jo(window)}},k),$e.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ye.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};try{let k=[],oe=V=>{var ve;return D(_f)({mutationCb:he,mousemoveCb:(B,Nr)=>J({type:$.IncrementalSnapshot,data:{source:Nr,positions:B}}),mouseInteractionCb:B=>J({type:$.IncrementalSnapshot,data:{source:O.MouseInteraction,...B}}),scrollCb:le,viewportResizeCb:B=>J({type:$.IncrementalSnapshot,data:{source:O.ViewportResize,...B}}),inputCb:B=>J({type:$.IncrementalSnapshot,data:{source:O.Input,...B}}),mediaInteractionCb:B=>J({type:$.IncrementalSnapshot,data:{source:O.MediaInteraction,...B}}),styleSheetRuleCb:B=>J({type:$.IncrementalSnapshot,data:{source:O.StyleSheetRule,...B}}),styleDeclarationCb:B=>J({type:$.IncrementalSnapshot,data:{source:O.StyleDeclaration,...B}}),canvasMutationCb:ee,fontCb:B=>J({type:$.IncrementalSnapshot,data:{source:O.Font,...B}}),selectionCb:B=>{J({type:$.IncrementalSnapshot,data:{source:O.Selection,...B}})},customElementCb:B=>{J({type:$.IncrementalSnapshot,data:{source:O.CustomElement,...B}})},blockClass:s,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:q,inlineStylesheet:c,sampling:w,recordDOM:I,recordCanvas:M,inlineImages:K,userTriggeredOnInput:C,collectFonts:T,doc:V,maskInputFn:g,maskTextFn:p,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:Q,dataURLOptions:y,mirror:de,iframeManager:fe,stylesheetManager:ye,shadowDomManager:De,processedNodeManager:Qe,canvasManager:Jr,ignoreCSSAttributes:z,plugins:((ve=N?.filter(B=>B.observer))==null?void 0:ve.map(B=>({observer:B.observer,options:B.options,callback:Nr=>J({type:$.Plugin,data:{plugin:B.name,payload:Nr}})})))||[]},f)};fe.addLoadListener(V=>{try{k.push(oe(V.contentDocument))}catch(ve){console.warn(ve)}});let W=()=>{er(),k.push(oe(document)),mr=!0};return document.readyState==="interactive"||document.readyState==="complete"?W():(k.push(ie("DOMContentLoaded",()=>{J({type:$.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&W()})),k.push(ie("load",()=>{J({type:$.Load,data:{}}),x==="load"&&W()},window))),()=>{k.forEach(V=>V()),Qe.destroy(),mr=!1,Cf()}}catch(k){console.warn(k)}}Me.addCustomEvent=(i,e)=>{if(!mr)throw new Error("please add custom event after start recording");J({type:$.Custom,data:{tag:i,payload:e}})};Me.freezePage=()=>{$e.forEach(i=>i.freeze())};Me.takeFullSnapshot=i=>{if(!mr)throw new Error("please take full snapshot after start recording");er(i)};Me.mirror=de;var Sn;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(Sn||(Sn={}));var kp=5*1e3;var{addCustomEvent:$p}=Me,{freezePage:_p}=Me,{takeFullSnapshot:da}=Me;var Gf=64*1024,jf=5e3,Hf=6e4,Yf=1e4,Zf="[data-sw-block], .rr-block",Xf="[data-sw-mask], .rr-mask",Jf="[data-sw-unmask]";function Kf(i){let e="";for(let t of i)e+=String.fromCharCode(t);return btoa(e)}function Up(i,e,t,r){let s=[],n=0,o=0,l=null,a=null,u=!1,c=null,h=!1,d="buffer",m=Math.random()<(i.sampleRate??.1),g=!1;function p(){let N=e!=="permissive",E=e==="strict";return{emit:f,checkoutEveryNms:180*1e3,inlineImages:!0,collectFonts:!0,sampling:{mousemove:!0,mouseInteraction:!0,scroll:150,input:"last"},maskAllInputs:N,maskAllText:E,maskTextSelector:E?void 0:Xf,unmaskTextSelector:E?Jf:void 0,blockSelector:Zf,slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0},errorHandler:z=>{let Y=z instanceof Error?z.message:String(z);Y.includes("matches is not a function")||console.warn("[Vident Replay] Recording error:",Y)}}}function f(N){s.push(N),n+=JSON.stringify(N).length+1,d==="upload"&&(n>=Gf?y():S())}function S(){l||d!=="upload"||(l=setTimeout(()=>{l=null,y()},jf))}function w(N){let E=bs(new TextEncoder().encode(JSON.stringify(N)));return JSON.stringify({sessionId:t.sessionId,chunkIndex:o,data:Kf(E),isFullSnapshot:o===0,timestamp:Date.now(),hasErrors:h})}async function y(){if(s.length===0||d!=="upload")return;let N=s.splice(0);n=0;let E=new AbortController,z=setTimeout(()=>E.abort(),1e4);try{await fetch(`${t.baseUrl}/v1/ingest/replays`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t.apiKey},body:w(N),signal:E.signal}),o++}catch(Y){console.warn("[Vident Replay] Failed to send chunk:",Y)}finally{clearTimeout(z)}}function b(){if(s.length===0||d!=="upload")return;let N=s.splice(0);n=0;try{fetch(`${t.baseUrl}/v1/ingest/replays`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t.apiKey},body:w(N),keepalive:!0}).catch(()=>{}),o++}catch{}}function I(){if(d!=="buffer"||s.length===0)return;let N=Date.now()-Hf,E=0;for(let z of s)if(z.timestamp<N)E++;else break;E>0&&(s.splice(0,E),n=s.reduce((z,Y)=>z+JSON.stringify(Y).length+1,0))}function M(){d!=="upload"&&(d="upload",a&&(clearInterval(a),a=null),s.length>0&&y())}function A(){if(u)return;u=!0,m?d="upload":(d="buffer",a=setInterval(I,Yf)),c=Me(p())??null,window.addEventListener("visibilitychange",C),window.addEventListener("pagehide",T)}function x(){u&&(u=!1,c&&(c(),c=null),l&&(clearTimeout(l),l=null),a&&(clearInterval(a),a=null),d==="upload"&&y(),window.removeEventListener("visibilitychange",C),window.removeEventListener("pagehide",T))}function C(){document.visibilityState==="hidden"&&d==="upload"&&b()}function T(){d==="upload"&&b()}function K(){if(h=!0,d==="upload")return;let N=i.onErrorSampleRate??1;Math.random()<N&&(g=!0,M(),r?.())}return i.enabled&&setTimeout(A,0),{start:A,stop:x,markError:K,snapshot:()=>{u&&da()},isRecording:()=>u,isUploading:()=>d==="upload",wasUpgradedByError:()=>g,startUploading:M}}export{Up as createReplayRecorder};
53
+ or you can use record.mirror to access the mirror instance during recording.`,hn={map:{},getId(){return console.error(ze),-1},getNode(){return console.error(ze),null},removeNodeFromMap(){console.error(ze)},has(){return console.error(ze),!1},reset(){console.error(ze)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(hn=new Proxy(hn,{get(i,e,t){return e==="map"&&console.error(ze),Reflect.get(i,e,t)}}));function St(i,e,t={}){let r=null,s=0;return function(...n){let o=Date.now();!s&&t.leading===!1&&(s=o);let l=e-(o-s),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),s=o,i.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{s=t.leading===!1?0:Date.now(),r=null,i.apply(a,n)},l))}}function Mr(i,e,t,r,s=window){let n=s.Object.getOwnPropertyDescriptor(i,e);return s.Object.defineProperty(i,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Mr(i,e,n||{},!0)}function qe(i,e,t){try{if(!(e in i))return()=>{};let r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch{return()=>{}}}var fr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(fr=()=>new Date().getTime());function Ko(i){var e,t,r,s;let n=i.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=O.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=O.parentElement(n.body))==null?void 0:r.scrollTop)||((s=n?.body)==null?void 0:s.scrollTop)||0}}function qo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Qo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ea(i){return i?i.nodeType===i.ELEMENT_NODE?i:O.parentElement(i):null}function oe(i,e,t,r){if(!i)return!1;let s=ea(i);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(ir(s,e,r))return!0}catch{}return!!(t&&(s.matches(t)||r&&s.closest(t)!==null))}function gf(i,e){return e.getId(i)!==-1}function Jr(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===ht}function ta(i,e){if(lt(i))return!1;let t=e.getId(i);if(!e.has(t))return!0;let r=O.parentNode(i);return r&&r.nodeType===i.DOCUMENT_NODE?!1:r?ta(r,e):!0}function Oi(i){return!!i.changedTouches}function yf(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function ra(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function ia(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function Ti(i){return i?i instanceof Ri&&"shadowRoot"in i?!!i.shadowRoot:!!O.shadowRoot(i):!1}var Di=class{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-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 sa(i){var e;let t=null;return"getRootNode"in i&&((e=O.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&O.host(O.getRootNode(i))&&(t=O.host(O.getRootNode(i))),t}function vf(i){let e=i,t;for(;t=sa(e);)e=t;return e}function wf(i){let e=i.ownerDocument;if(!e)return!1;let t=vf(i);return O.contains(e,t)}function na(i){let e=i.ownerDocument;return e?O.contains(e,i)||wf(i):!1}var _=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(_||{}),T=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i))(T||{}),le=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(le||{}),Ee=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(Ee||{}),Ke=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Ke||{}),Be=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Be||{});var oa=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(oa||{});function fn(i){return"__ln"in i}var ki=class{constructor(){v(this,"length",0),v(this,"head",null),v(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?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&fn(e.previousSibling)){let 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&&fn(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let 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--)}},pn=(i,e)=>`${i}@${e}`,$i=class{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new ki,s=a=>{let u=a,c=ht;for(;c===ht;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{let u=O.parentNode(a);if(!u||!na(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){let g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=lt(u)?this.mirror.getId(sa(a)):this.mirror.getId(u),m=s(a);if(h===-1||m===-1)return r.addNode(a);let d=Ve(a,{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:g=>{ra(g,this.mirror)&&this.iframeManager.addIframe(g),ia(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Ti(a)&&this.shadowDomManager.addShadowRoot(O.shadowRoot(a),this.doc)},onIframeLoad:(g,p)=>{this.iframeManager.attachIframe(g,p),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,p)=>{this.stylesheetManager.attachLinkElement(g,p)},cssCaptured:c});d&&(e.push({parentId:h,nextId:m,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)dn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(O.parentNode(a))||n(a);for(let a of this.addedSet)!mn(this.droppedSet,a)&&!dn(this.removesSubTreeCache,a,this.mirror)||mn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let u=this.mirror.getId(O.parentNode(o.value)),c=s(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(O.parentNode(c.value));if(s(c.value)===-1)continue;if(h!==-1){a=c;break}else{let d=c.value,g=O.parentNode(d);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=O.host(g);if(this.mirror.getId(p)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}let l={texts:this.texts.map(a=>{let u=a.node,c=O.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:u}=a;if(typeof u.style=="string"){let c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l))}),v(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)),t.attributes.value=Array.from(O.childNodes(e),r=>O.textContent(r)||"").join("")}),v(this,"processMutation",e=>{if(!Jr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=O.textContent(e.target);!oe(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,ea(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){let o=Vi(t);s=Wi({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:s,maskInputFn:this.maskInputFn})}if(oe(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))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"),!An(t.tagName,r))if(n.attributes[r]=Nn(this.doc,_e(t.tagName),_e(r),s),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(let l of Array.from(o.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(oe(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),s=lt(e.target)?this.mirror.getId(O.host(e.target)):this.mirror.getId(e.target);oe(e.target,this.blockClass,this.blockSelector,!1)||Jr(t,this.mirror,this.slimDOMOptions)||!gf(t,this.mirror)||(this.addedSet.has(t)?(Pi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ta(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[pn(r,s)]?Pi(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:lt(e.target)&&ut(e.target)?!0:void 0}),Sf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Jr(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[pn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);oe(e,this.blockClass,this.blockSelector,!1)||(O.childNodes(e).forEach(r=>this.genAdds(r)),Ti(e)&&O.childNodes(O.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","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 Pi(i,e){i.delete(e),O.childNodes(e).forEach(t=>Pi(i,t))}function Sf(i,e){let t=[i];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),O.childNodes(r).forEach(s=>t.push(s)))}}function dn(i,e,t){return i.size===0?!1:bf(i,e)}function bf(i,e,t){let r=O.parentNode(e);return r?i.has(r):!1}function mn(i,e){return i.size===0?!1:aa(i,e)}function aa(i,e){let t=O.parentNode(e);return t?i.has(t)?!0:aa(i,t):!1}var ct;function Cf(i){ct=i}function xf(){ct=void 0}var k=i=>ct?(...t)=>{try{return i(...t)}catch(r){if(ct&&ct(r)===!0)return;throw r}}:i,Pe=[];function It(i){try{if("composedPath"in i){let e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch{}return i&&i.target}function la(i,e){let t=new $i;Pe.push(t),t.init(i);let r=new(Jo())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Ef({mousemoveCb:i,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let s=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=St(k(h=>{let m=Date.now()-l;i(o.map(d=>(d.timeOffset-=m,d)),h),o=[],l=null}),n),u=k(St(k(h=>{let m=It(h),{clientX:d,clientY:g}=Oi(h)?h.changedTouches[0]:h;l||(l=fr()),o.push({x:d,y:g,id:r.getId(m),timeOffset:fr()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?T.Drag:h instanceof MouseEvent?T.MouseMove:T.TouchMove)}),s,{trailing:!1})),c=[ne("mousemove",u,t),ne("touchmove",u,t),ne("drag",u,t)];return k(()=>{c.forEach(h=>h())})}function If({mouseInteractionCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,u=c=>h=>{let m=It(h);if(oe(m,r,s,!0))return;let d=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":d=Ee.Mouse;break;case"touch":d=Ee.Touch;break;case"pen":d=Ee.Pen;break}d===Ee.Touch?le[c]===le.MouseDown?g="TouchStart":le[c]===le.MouseUp&&(g="TouchEnd"):Ee.Pen}else Oi(h)&&(d=Ee.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===Ee.Touch||g.startsWith("Mouse")&&d===Ee.Mouse)&&(d=null)):le[c]===le.Click&&(d=a,a=null);let p=Oi(h)?h.changedTouches[0]:h;if(!p)return;let f=t.getId(m),{clientX:S,clientY:w}=p;k(i)({type:le[g],id:f,x:S,y:w,...d!==null&&{pointerType:d}})};return Object.keys(le).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=_e(c),m=u(c);if(window.PointerEvent)switch(le[c]){case le.MouseDown:case le.MouseUp:h=h.replace("mouse","pointer");break;case le.TouchStart:case le.TouchEnd:return}l.push(ne(h,m,e))}),k(()=>{l.forEach(c=>c())})}function ua({scrollCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:n}){let o=k(St(k(l=>{let a=It(l);if(!a||oe(a,r,s,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let c=Ko(e.defaultView);i({id:u,x:c.left,y:c.top})}else i({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ne("scroll",o,e)}function Mf({viewportResizeCb:i},{win:e}){let t=-1,r=-1,s=k(St(k(()=>{let n=qo(),o=Qo();(t!==n||r!==o)&&(i({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return ne("resize",s,e)}var Nf=["INPUT","TEXTAREA","SELECT"],gn=new WeakMap;function Af({inputCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(w){let y=It(w),b=w.isTrusted,M=y&&y.tagName;if(y&&M==="OPTION"&&(y=O.parentElement(y)),!y||!M||Nf.indexOf(M)<0||oe(y,r,s,!0)||y.classList.contains(n)||o&&y.matches(o))return;let A=y.value,R=!1,x=Vi(y)||"";x==="radio"||x==="checkbox"?R=y.checked:(l[M.toLowerCase()]||l[x])&&(A=Wi({element:y,maskInputOptions:l,tagName:M,type:x,value:A,maskInputFn:a})),m(y,c?{text:A,isChecked:R,userTriggered:b}:{text:A,isChecked:R});let C=y.name;x==="radio"&&C&&R&&e.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(D=>{if(D!==y){let J=D.value;m(D,c?{text:J,isChecked:!R,userTriggered:!1}:{text:J,isChecked:!R})}})}function m(w,y){let b=gn.get(w);if(!b||b.text!==y.text||b.isChecked!==y.isChecked){gn.set(w,y);let M=t.getId(w);k(i)({...y,id:M})}}let g=(u.input==="last"?["change"]:["input","change"]).map(w=>ne(w,k(h),e)),p=e.defaultView;if(!p)return()=>{g.forEach(w=>w())};let f=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),S=[[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(...S.map(w=>Mr(w[0],w[1],{set(){k(h)({target:this,isTrusted:!1})}},!1,p))),k(()=>{g.forEach(w=>w())})}function pr(i){let e=[];function t(r,s){if(Yt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Yt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Yt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Yt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return t(i,e)}function Oe(i,e,t){let r,s;return i?(i.ownerNode?r=e.getId(i.ownerNode):s=t.getId(i),{styleId:s,id:r}):{}}function Rf({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:k((c,h,m)=>{let[d,g]=m,{id:p,styleId:f}=Oe(h,e,t.styleMirror);return(p&&p!==-1||f&&f!==-1)&&i({id:p,styleId:f,adds:[{rule:d,index:g}]}),c.apply(h,m)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,m=this.cssRules.length){let d=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,m])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:k((c,h,m)=>{let[d]=m,{id:g,styleId:p}=Oe(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,removes:[{index:d}]}),c.apply(h,m)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:k((c,h,m)=>{let[d]=m,{id:g,styleId:p}=Oe(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,replace:d}),c.apply(h,m)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:k((c,h,m)=>{let[d]=m,{id:g,styleId:p}=Oe(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,replaceSync:d}),c.apply(h,m)})}));let a={};Zt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Zt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Zt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Zt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:k((m,d,g)=>{let[p,f]=g,{id:S,styleId:w}=Oe(d.parentStyleSheet,e,t.styleMirror);return(S&&S!==-1||w&&w!==-1)&&i({id:S,styleId:w,adds:[{rule:p,index:[...pr(d),f||0]}]}),m.apply(d,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:k((m,d,g)=>{let[p]=g,{id:f,styleId:S}=Oe(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||S&&S!==-1)&&i({id:f,styleId:S,removes:[{index:[...pr(d),p]}]}),m.apply(d,g)})})}),k(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function ca({mirror:i,stylesheetManager:e},t){var r,s,n;let o=null;t.nodeName==="#document"?o=i.getId(t):o=i.getId(O.host(t));let l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:n.ShadowRoot,a=l?.prototype?Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Of({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:s}){let n=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:k((l,a,u)=>{var c;let[h,m,d]=u;if(t.has(h))return n.apply(a,[h,m,d]);let{id:g,styleId:p}=Oe((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||p&&p!==-1)&&i({id:g,styleId:p,set:{property:h,value:m,priority:d},index:pr(a.parentRule)}),l.apply(a,u)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:k((l,a,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(a,[h]);let{id:m,styleId:d}=Oe((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&i({id:m,styleId:d,remove:{property:h},index:pr(a.parentRule)}),l.apply(a,u)})}),k(()=>{s.CSSStyleDeclaration.prototype.setProperty=n,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Tf({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:r,sampling:s,doc:n}){let o=k(a=>St(k(u=>{let c=It(u);if(!c||oe(c,e,t,!0))return;let{currentTime:h,volume:m,muted:d,playbackRate:g,loop:p}=c;i({type:a,id:r.getId(c),currentTime:h,volume:m,muted:d,playbackRate:g,loop:p})}),s.media||500)),l=[ne("play",o(Be.Play),n),ne("pause",o(Be.Pause),n),ne("seeked",o(Be.Seeked),n),ne("volumechange",o(Be.VolumeChange),n),ne("ratechange",o(Be.RateChange),n)];return k(()=>{l.forEach(a=>a())})}function Df({fontCb:i,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],s=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){let h=new n(a,u,c);return s.set(h,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let o=qe(e.fonts,"add",function(l){return function(a){return setTimeout(k(()=>{let u=s.get(a);u&&(i(u),s.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),k(()=>{r.forEach(l=>l())})}function kf(i){let{doc:e,mirror:t,blockClass:r,blockSelector:s,selectionCb:n}=i,o=!0,l=k(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){let m=a.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:p,endOffset:f}=m;oe(d,r,s,!0)||oe(p,r,s,!0)||u.push({start:t.getId(d),startOffset:g,end:t.getId(p),endOffset:f})}n({ranges:u})});return l(),ne("selectionchange",l)}function $f({doc:i,customElementCb:e}){let t=i.defaultView;return!t||!t.customElements?()=>{}:qe(t.customElements,"define",function(s){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return s.apply(this,[n,o,l])}})}function Pf(i,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:s,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:m,selectionCb:d,customElementCb:g}=i;i.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},i.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},i.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),s(...p)},i.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},i.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},i.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},i.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p)},i.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},i.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},i.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},i.fontCb=(...p)=>{e.font&&e.font(...p),m(...p)},i.selectionCb=(...p)=>{e.selection&&e.selection(...p),d(...p)},i.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),g(...p)}}function _f(i,e={}){let t=i.doc.defaultView;if(!t)return()=>{};Pf(i,e);let r;i.recordDOM&&(r=la(i,i.doc));let s=Ef(i),n=If(i),o=ua(i),l=Mf(i,{win:t}),a=Af(i),u=Tf(i),c=()=>{},h=()=>{},m=()=>{},d=()=>{};i.recordDOM&&(c=Rf(i,{win:t}),h=ca(i,i.doc),m=Of(i,{win:t}),i.collectFonts&&(d=Df(i)));let g=kf(i),p=$f(i),f=[];for(let S of i.plugins)f.push(S.observer(S.callback,t,S.options));return k(()=>{Pe.forEach(S=>S.reset()),r?.disconnect(),s(),n(),o(),l(),a(),u(),c(),h(),m(),d(),g(),p(),f.forEach(S=>S())})}function Yt(i){return typeof window[i]<"u"}function Zt(i){return!!(typeof window[i]<"u"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}var dr=class{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){let n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,s))}getRemoteId(e,t,r){let s=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=s.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,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}},_i=class{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new dr(Mn)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dr(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,s;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))),(s=this.loadListener)==null||s.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){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let s=this.crossOriginIframeMap.get(e.source);if(!s)return;let n=this.transformCrossOriginEvent(s,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);let s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:_.IncrementalSnapshot,data:{source:T.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 T.Mutation:return t.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(s.node,n)}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case T.Drag:case T.TouchMove:case T.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(t.data,e,["id"]),t;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case T.Font:return t;case T.Selection:return t.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),t;case T.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(let n of s)!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!==oa.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Li=class{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!ut(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=la({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ua({...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(O.host(e))),this.restoreHandlers.push(ca({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){let r=this;this.restoreHandlers.push(qe(e.prototype,"attachShadow",function(s){return function(n){let o=s.call(this,n),l=O.shadowRoot(this);return l&&na(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(at=0;at<Ge.length;at++)Lf[Ge.charCodeAt(at)]=at;var at,Ff=function(i){var e=new Uint8Array(i),t,r=e.length,s="";for(t=0;t<r;t+=3)s+=Ge[e[t]>>2],s+=Ge[(e[t]&3)<<4|e[t+1]>>4],s+=Ge[(e[t+1]&15)<<2|e[t+2]>>6],s+=Ge[e[t+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var yn=new Map;function Uf(i,e){let t=yn.get(i);return t||(t=new Map,yn.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}var ha=(i,e,t)=>{if(!i||!(pa(i,e)||typeof i=="object"))return;let r=i.constructor.name,s=Uf(t,r),n=s.indexOf(i);return n===-1&&(n=s.length,s.push(i)),n};function Qt(i,e,t){if(i instanceof Array)return i.map(r=>Qt(r,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){let r=i.constructor.name,s=Ff(i);return{rr_type:r,base64:s}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Qt(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){let r=i.constructor.name,{src:s}=i;return{rr_type:r,src:s}}else if(i instanceof HTMLCanvasElement){let r="HTMLImageElement",s=i.toDataURL();return{rr_type:r,src:s}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[Qt(i.data,e,t),i.width,i.height]};if(pa(i,e)||typeof i=="object"){let r=i.constructor.name,s=ha(i,e,t);return{rr_type:r,index:s}}}}return i}var fa=(i,e,t)=>i.map(r=>Qt(r,e,t)),pa=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>i instanceof e[s]);function zf(i,e,t,r){let s=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=qe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return oe(this.canvas,t,r,!0)||setTimeout(()=>{let c=fa(u,e,this);i(this.canvas,{type:Ke["2D"],property:o,args:c})},0),a.apply(this,u)}});s.push(l)}catch{let l=Mr(e.CanvasRenderingContext2D.prototype,o,{set(a){i(this.canvas,{type:Ke["2D"],property:o,args:[a],setter:!0})}});s.push(l)}return()=>{s.forEach(o=>o())}}function Bf(i){return i==="experimental-webgl"?"webgl":i}function vn(i,e,t,r){let s=[];try{let n=qe(i.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!oe(this,e,t,!0)){let u=Bf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){let c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});s.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(n=>n())}}function wn(i,e,t,r,s,n){let o=[],l=Object.getOwnPropertyNames(i);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof i[a]!="function")continue;let u=qe(i,a,function(c){return function(...h){let m=c.apply(this,h);if(ha(m,n,this),"tagName"in this.canvas&&!oe(this.canvas,r,s,!0)){let d=fa(h,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return m}});o.push(u)}catch{let u=Mr(i,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}return o}function Wf(i,e,t,r){let s=[];return s.push(...wn(e.WebGLRenderingContext.prototype,Ke.WebGL,i,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...wn(e.WebGL2RenderingContext.prototype,Ke.WebGL2,i,t,r,e)),()=>{s.forEach(n=>n())}}var da="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Vf=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),Sn=typeof window<"u"&&window.Blob&&new Blob([Vf(da)],{type:"text/javascript;charset=utf-8"});function Gf(i){let e;try{if(e=Sn&&(window.URL||window.webkitURL).createObjectURL(Sn),!e)throw"";let t=new Worker(e,{name:i?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+da,{name:i?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var Fi=class{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});let{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,s,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,s,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,s,n){let o=vn(t,r,s,!0),l=new Map,a=new Gf;a.onmessage=g=>{let{id:p}=g.data;if(l.set(p,!1),!("base64"in g.data))return;let{base64:f,type:S,width:w,height:y}=g.data;this.mutationCb({id:p,type:Ke["2D"],commands:[{property:"clearRect",args:[0,0,w,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:S}]},0,0]}]})};let u=1e3/e,c=0,h,m=()=>{let g=[];return t.document.querySelectorAll("canvas").forEach(p=>{oe(p,r,s,!0)||g.push(p)}),g},d=g=>{if(c&&g-c<u){h=requestAnimationFrame(d);return}c=g,m().forEach(async p=>{var f;let S=this.mirror.getId(p);if(l.get(S)||p.width===0||p.height===0)return;if(l.set(S,!0),["webgl","webgl2"].includes(p.__context)){let y=p.getContext(p.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let w=await createImageBitmap(p);a.postMessage({id:S,bitmap:w,width:p.width,height:p.height,dataURLOptions:n.dataURLOptions},[w])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=vn(e,t,r,!1),n=zf(this.processMutation.bind(this),e,t,r),o=Wf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let s=r.map(o=>{let{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}},Ui=class{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new Di),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},s=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),s.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:En(l,n.href),index:a}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},zi=class{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==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(){}},q,er,Kr,mr=!1;try{if(Array.from([1],i=>i*2)[0]!==2){let i=document.createElement("iframe");document.body.appendChild(i),Array.from=((xs=i.contentWindow)==null?void 0:xs.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}var de=Ka();function Ne(i={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:m,slimDOMOptions:d,maskInputFn:g,maskTextFn:p,hooks:f,packFn:S,sampling:w={},dataURLOptions:y={},mousemoveWait:b,recordDOM:M=!0,recordCanvas:A=!1,recordCrossOriginIframes:R=!1,recordAfter:x=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",userTriggeredOnInput:C=!1,collectFonts:D=!1,inlineImages:J=!1,plugins:W,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:Q=new Set([]),errorHandler:ee}=i;Cf(ee);let E=R?window.parent===window:!0,I=!1;if(!E)try{window.parent.document&&(I=!1)}catch{I=!0}if(E&&!e)throw new Error("emit function is required");if(!E&&!I)return()=>{};b!==void 0&&w.mousemove===void 0&&(w.mousemove=b),de.reset();let $=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},z=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||{};yf();let Ae,ie=0,ye=P=>{for(let ae of W||[])ae.eventProcessor&&(P=ae.eventProcessor(P));return S&&!I&&(P=S(P)),P};q=(P,ae)=>{var V;let G=P;if(G.timestamp=fr(),(V=Pe[0])!=null&&V.isFrozen()&&G.type!==_.FullSnapshot&&!(G.type===_.IncrementalSnapshot&&G.data.source===T.Mutation)&&Pe.forEach(we=>we.unfreeze()),E)e?.(ye(G),ae);else if(I){let we={type:"rrweb",event:ye(G),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(we,"*")}if(G.type===_.FullSnapshot)Ae=G,ie=0;else if(G.type===_.IncrementalSnapshot){if(G.data.source===T.Mutation&&G.data.isAttachIframe)return;ie++;let we=r&&ie>=r,B=t&&G.timestamp-Ae.timestamp>t;(we||B)&&er(!0)}};let ue=P=>{q({type:_.IncrementalSnapshot,data:{source:T.Mutation,...P}})},re=P=>q({type:_.IncrementalSnapshot,data:{source:T.Scroll,...P}}),K=P=>q({type:_.IncrementalSnapshot,data:{source:T.CanvasMutation,...P}}),Re=P=>q({type:_.IncrementalSnapshot,data:{source:T.AdoptedStyleSheet,...P}}),ve=new Ui({mutationCb:ue,adoptedStyleSheetCb:Re}),fe=new _i({mirror:de,mutationCb:ue,stylesheetManager:ve,recordCrossOriginIframes:R,wrappedEmit:q});for(let P of W||[])P.getMirror&&P.getMirror({nodeMirror:de,crossOriginIframeMirror:fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:fe.crossOriginIframeStyleMirror});let Qe=new zi;Kr=new Fi({recordCanvas:A,mutationCb:K,win:window,blockClass:s,blockSelector:n,mirror:de,sampling:w.canvas,dataURLOptions:y});let ke=new Li({mutationCb:ue,scrollCb:re,bypassOptions:{blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:$,dataURLOptions:y,maskTextFn:p,maskInputFn:g,recordCanvas:A,inlineImages:J,sampling:w,slimDOMOptions:z,iframeManager:fe,stylesheetManager:ve,canvasManager:Kr,keepIframeSrcFn:N,processedNodeManager:Qe},mirror:de});er=(P=!1)=>{if(!M)return;q({type:_.Meta,data:{href:window.location.href,width:Qo(),height:qo()}},P),ve.reset(),ke.init(),Pe.forEach(V=>V.lock());let ae=bl(document,{mirror:de,blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:$,maskTextFn:p,maskInputFn:g,slimDOM:z,dataURLOptions:y,recordCanvas:A,inlineImages:J,onSerialize:V=>{ra(V,de)&&fe.addIframe(V),ia(V,de)&&ve.trackLinkElement(V),Ti(V)&&ke.addShadowRoot(O.shadowRoot(V),document)},onIframeLoad:(V,G)=>{fe.attachIframe(V,G),ke.observeAttachShadow(V)},onStylesheetLoad:(V,G)=>{ve.attachLinkElement(V,G)},keepIframeSrcFn:N});if(!ae)return console.warn("Failed to snapshot the document");q({type:_.FullSnapshot,data:{node:ae,initialOffset:Ko(window)}},P),Pe.forEach(V=>V.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};try{let P=[],ae=G=>{var we;return k(_f)({mutationCb:ue,mousemoveCb:(B,Nr)=>q({type:_.IncrementalSnapshot,data:{source:Nr,positions:B}}),mouseInteractionCb:B=>q({type:_.IncrementalSnapshot,data:{source:T.MouseInteraction,...B}}),scrollCb:re,viewportResizeCb:B=>q({type:_.IncrementalSnapshot,data:{source:T.ViewportResize,...B}}),inputCb:B=>q({type:_.IncrementalSnapshot,data:{source:T.Input,...B}}),mediaInteractionCb:B=>q({type:_.IncrementalSnapshot,data:{source:T.MediaInteraction,...B}}),styleSheetRuleCb:B=>q({type:_.IncrementalSnapshot,data:{source:T.StyleSheetRule,...B}}),styleDeclarationCb:B=>q({type:_.IncrementalSnapshot,data:{source:T.StyleDeclaration,...B}}),canvasMutationCb:K,fontCb:B=>q({type:_.IncrementalSnapshot,data:{source:T.Font,...B}}),selectionCb:B=>{q({type:_.IncrementalSnapshot,data:{source:T.Selection,...B}})},customElementCb:B=>{q({type:_.IncrementalSnapshot,data:{source:T.CustomElement,...B}})},blockClass:s,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:$,inlineStylesheet:c,sampling:w,recordDOM:M,recordCanvas:A,inlineImages:J,userTriggeredOnInput:C,collectFonts:D,doc:G,maskInputFn:g,maskTextFn:p,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:z,dataURLOptions:y,mirror:de,iframeManager:fe,stylesheetManager:ve,shadowDomManager:ke,processedNodeManager:Qe,canvasManager:Kr,ignoreCSSAttributes:Q,plugins:((we=W?.filter(B=>B.observer))==null?void 0:we.map(B=>({observer:B.observer,options:B.options,callback:Nr=>q({type:_.Plugin,data:{plugin:B.name,payload:Nr}})})))||[]},f)};fe.addLoadListener(G=>{try{P.push(ae(G.contentDocument))}catch(we){console.warn(we)}});let V=()=>{er(),P.push(ae(document)),mr=!0};return document.readyState==="interactive"||document.readyState==="complete"?V():(P.push(ne("DOMContentLoaded",()=>{q({type:_.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&V()})),P.push(ne("load",()=>{q({type:_.Load,data:{}}),x==="load"&&V()},window))),()=>{P.forEach(G=>G()),Qe.destroy(),mr=!1,xf()}}catch(P){console.warn(P)}}Ne.addCustomEvent=(i,e)=>{if(!mr)throw new Error("please add custom event after start recording");q({type:_.Custom,data:{tag:i,payload:e}})};Ne.freezePage=()=>{Pe.forEach(i=>i.freeze())};Ne.takeFullSnapshot=i=>{if(!mr)throw new Error("please take full snapshot after start recording");er(i)};Ne.mirror=de;var bn;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(bn||(bn={}));var $p=5*1e3;var{addCustomEvent:Pp}=Ne,{freezePage:_p}=Ne,{takeFullSnapshot:fs}=Ne;var jf=64*1024,Hf=5e3,Yf=6e4,Zf=1e4,Xf="[data-sw-block], .rr-block",Jf="[data-sw-mask], .rr-mask",Kf="[data-sw-unmask]";function ma(i){let e="";for(let t of i)e+=String.fromCharCode(t);return btoa(e)}function zp(i,e,t,r){let s=[],n=0,o=0,l=null,a=null,u=!1,c=null,h=!1,m=null,d="buffer",g=Math.random()<(i.sampleRate??.1),p=!1;function f(){let E=e!=="permissive",I=e==="strict";return{emit:S,checkoutEveryNms:180*1e3,inlineImages:!0,collectFonts:!0,sampling:{mousemove:!0,mouseInteraction:!0,scroll:150,input:"last"},maskAllInputs:E,maskAllText:I,maskTextSelector:I?void 0:Jf,unmaskTextSelector:I?Kf:void 0,blockSelector:Xf,slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0},errorHandler:$=>{let z=$ instanceof Error?$.message:String($);z.includes("matches is not a function")||console.warn("[Vident Replay] Recording error:",z)}}}function S(E){s.push(E),n+=JSON.stringify(E).length+1,E.type===4&&(m=E),d==="upload"&&(n>=jf?b():w())}function w(){l||d!=="upload"||(l=setTimeout(()=>{l=null,b()},Hf))}function y(E){let I=_r(new TextEncoder().encode(JSON.stringify(E)));return JSON.stringify({sessionId:t.sessionId,chunkIndex:o,data:ma(I),isFullSnapshot:o===0,timestamp:Date.now(),hasErrors:h})}async function b(){if(s.length===0||d!=="upload")return;let E=s.splice(0);n=0;let I=new AbortController,$=setTimeout(()=>I.abort(),1e4);try{await fetch(`${t.baseUrl}/v1/ingest/replays`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t.apiKey},body:y(E),signal:I.signal}),o++}catch(z){console.warn("[Vident Replay] Failed to send chunk:",z)}finally{clearTimeout($)}}function M(){if(s.length===0||d!=="upload")return;let E=s.splice(0);n=0;try{fetch(`${t.baseUrl}/v1/ingest/replays`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t.apiKey},body:y(E),keepalive:!0}).catch(()=>{}),o++}catch{}}function A(){if(d!=="buffer"||s.length===0)return;let E=Date.now()-Yf,I=0;for(let $ of s)if($.timestamp<E)I++;else break;I>0&&(s.splice(0,I),n=s.reduce(($,z)=>$+JSON.stringify(z).length+1,0))}function R(){d!=="upload"&&(d="upload",a&&(clearInterval(a),a=null),s.length>0&&b())}function x(){if(u)return;u=!0,g?d="upload":(d="buffer",a=setInterval(A,Zf)),c=Ne(f())??null,window.addEventListener("visibilitychange",D),window.addEventListener("pagehide",J)}function C(){u&&(u=!1,c&&(c(),c=null),l&&(clearTimeout(l),l=null),a&&(clearInterval(a),a=null),d==="upload"&&b(),window.removeEventListener("visibilitychange",D),window.removeEventListener("pagehide",J))}function D(){document.visibilityState==="hidden"&&d==="upload"&&M()}function J(){d==="upload"&&M()}function W(){if(h=!0,d==="upload")return;let E=i.onErrorSampleRate??1;Math.random()<E&&(p=!0,R(),r?.())}i.enabled&&setTimeout(x,0);let N=new Set;async function Q(E){let I=qf(E);if(N.has(I)||!u||!m)return;N.add(I),fs();let $=null;for(let re=s.length-1;re>=0;re--){let K=s[re];if(K?.type===2){$=K;break}}if(!$)return;let Ae=JSON.stringify([m,$]),ie=_r(new TextEncoder().encode(Ae)),ye=ma(ie),ue=JSON.stringify({url:I,data:ye,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});try{await fetch(`${t.baseUrl}/v1/ingest/heatmap-snapshot`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":t.apiKey},body:ue,keepalive:!0})}catch{}}function ee(){}return{start:x,stop:C,markError:W,snapshot:()=>{u&&fs()},isRecording:()=>u,isUploading:()=>d==="upload",wasUpgradedByError:()=>p,startUploading:R,captureHeatmapSnapshot:Q,resetHeatmapSnapshot:ee}}function qf(i){try{let e=new URL(i);return e.search="",e.hash="",e.toString()}catch{return i}}export{zp as createReplayRecorder};
54
54
  /*! Bundled license information:
55
55
 
56
56
  rrweb/dist/rrweb.js:
@@ -69,4 +69,4 @@ rrweb/dist/rrweb.js:
69
69
  PERFORMANCE OF THIS SOFTWARE.
70
70
  ***************************************************************************** *)
71
71
  */
72
- //# sourceMappingURL=replay-M65UVSYF.js.map
72
+ //# sourceMappingURL=replay-SUSGC5DP.js.map