@posthog/rrweb-record 0.0.36 → 0.0.37

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.
@@ -24,9 +24,9 @@
24
24
  `;this.css.includes(`\r
25
25
  `)&&(n=`\r
26
26
  `),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),p=l.root||e(l.file),f;this.mapOpts.sourcesContent===!1?(f=new i(l.text),f.sourcesContent&&(f.sourcesContent=null)):f=l.consumer(),this.map.applySourceMap(f,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let n=this.root.nodes.length-1;n>=0;n--)l=this.root.nodes[n],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&m&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,n=>{l+=n}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,n=1,p="<no source>",f={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(w,v,x)=>{if(this.css+=w,v&&x!=="end"&&(f.generated.line=l,f.generated.column=n-1,v.source&&v.source.start?(f.source=this.sourcePath(v),f.original.line=v.source.start.line,f.original.column=v.source.start.column-1,this.map.addMapping(f)):(f.source=p,f.original.line=1,f.original.column=0,this.map.addMapping(f))),S=w.match(/\n/g),S?(l+=S.length,g=w.lastIndexOf(`
27
- `),n=w.length-g):n+=w.length,v&&x!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=p,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l!="undefined"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let f=t(p,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new d(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!l[p]){l[p]=!0;let f=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let p=c(l).toString();return this.memoizedFileURLs.set(l,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let p=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,p),p}}return Wt=r,Wt}var zt,ks;function Yi(){if(ks)return zt;ks=1;const e=39,t=34,s=92,o=47,i=10,a=32,c=12,d=9,m=13,h=91,r=93,u=40,l=41,n=123,p=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return zt=function(R,M={}){let O=R.css.valueOf(),N=M.ignoreErrors,A,ee,te,I,Q,T,$,X,H,be,me=O.length,E=0,oe=[],ae=[];function Ae(){return E}function ge(Y){throw R.error("Unclosed "+Y,E)}function he(){return ae.length===0&&E>=me}function re(Y){if(ae.length)return ae.pop();if(E>=me)return;let _=Y?Y.ignoreUnclosed:!1;switch(A=O.charCodeAt(E),A){case i:case a:case d:case m:case c:{I=E;do I+=1,A=O.charCodeAt(I);while(A===a||A===i||A===d||A===m||A===c);T=["space",O.slice(E,I)],E=I-1;break}case h:case r:case n:case p:case S:case f:case l:{let J=String.fromCharCode(A);T=[J,J,E];break}case u:{if(be=oe.length?oe.pop()[1]:"",H=O.charCodeAt(E+1),be==="url"&&H!==e&&H!==t&&H!==a&&H!==i&&H!==d&&H!==c&&H!==m){I=E;do{if($=!1,I=O.indexOf(")",I+1),I===-1)if(N||_){I=E;break}else ge("bracket");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["brackets",O.slice(E,I+1),E,I],E=I}else I=O.indexOf(")",E+1),ee=O.slice(E,I+1),I===-1||y.test(ee)?T=["(","(",E]:(T=["brackets",ee,E,I],E=I);break}case e:case t:{Q=A===e?"'":'"',I=E;do{if($=!1,I=O.indexOf(Q,I+1),I===-1)if(N||_){I=E+1;break}else ge("string");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["string",O.slice(E,I+1),E,I],E=I;break}case w:{v.lastIndex=E+1,v.test(O),v.lastIndex===0?I=O.length-1:I=v.lastIndex-2,T=["at-word",O.slice(E,I+1),E,I],E=I;break}case s:{for(I=E,te=!0;O.charCodeAt(I+1)===s;)I+=1,te=!te;if(A=O.charCodeAt(I+1),te&&A!==o&&A!==a&&A!==i&&A!==d&&A!==m&&A!==c&&(I+=1,b.test(O.charAt(I)))){for(;b.test(O.charAt(I+1));)I+=1;O.charCodeAt(I+1)===a&&(I+=1)}T=["word",O.slice(E,I+1),E,I],E=I;break}default:{A===o&&O.charCodeAt(E+1)===g?(I=O.indexOf("*/",E+2)+1,I===0&&(N||_?I=O.length:ge("comment")),T=["comment",O.slice(E,I+1),E,I],E=I):(x.lastIndex=E+1,x.test(O),x.lastIndex===0?I=O.length-1:I=x.lastIndex-2,T=["word",O.slice(E,I+1),E,I],oe.push(T),E=I);break}}return E++,T}function Re(Y){ae.push(Y)}return{back:Re,endOfFile:he,nextToken:re,position:Ae}},zt}var qt,Ls;function Zi(){if(Ls)return qt;Ls=1;let e=zr(),t=je(),s=mt(),o=He(),i=jr(),a=Yi();const c={empty:!0,space:!0};function d(h){for(let r=h.length-1;r>=0;r--){let u=h[r],l=u[3]||u[2];if(l)return l}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let l,n,p,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),l=r[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(p=S.length-1,n=S[p];n&&n[0]==="space";)n=S[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else S.push(r);else S.push(r);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(r=S[S.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let l=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(l+=1,l===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,l,n,p;for(let[f,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let l=r[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(r,u){let l=new s;this.init(l,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),l.source.end=this.getPosition(n[3]||n[2]||d(r)),l.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),l.raws.before+=r.shift()[1];for(l.source.start=this.getPosition(r[0][2]),l.prop="";r.length;){let w=r[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=r.shift()[1]}l.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){l.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),l.raws.between+=p[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)f.push(r.shift());this.precheckMissedSemicolon(r);for(let w=r.length-1;w>=0;w--){if(p=r[w],p[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(r,w);v=this.spacesFromEnd(r)+v,v!==" !important"&&(l.raws.important=v);break}else if(p[1].toLowerCase()==="important"){let v=r.slice(0),x="";for(let y=w;y>0;y--){let b=v[y][0];if(x.trim().startsWith("!")&&b!=="space")break;x=v.pop()[1]+x}x.trim().startsWith("!")&&(l.important=!0,l.raws.important=x,r=v)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(r),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="",u.source.end=this.getPosition(r[2]),u.source.end.offset+=u.raws.ownSemicolon.length)}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,l=null,n=!1,p=null,f=[],g=r[1].startsWith("--"),S=[],w=r;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")p||(p=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")p||(p=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(p=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,l,n){let p,f,g=l.length,S="",w=!0,v,x;for(let y=0;y<g;y+=1)p=l[y],f=p[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(x=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[x]&&!c[v]?S.slice(-1)===","?w=!1:S+=p[1]:w=!1):S+=p[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");r.raws[u]={raw:y,value:S}}r[u]=S}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)l=r.pop()[1]+l;return l}spacesAndCommentsFromStart(r){let u,l="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)l+=r.shift()[1];return l}spacesFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],u==="space");)l=r.pop()[1]+l;return l}stringFrom(r,u){let l="";for(let n=u;n<r.length;n++)l+=r[n][1];return r.splice(u,r.length-u),l}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word "+r[0][1],{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return qt=m,qt}var jt,Ds;function Hr(){if(Ds)return jt;Ds=1;let e=Ie(),t=gt(),s=Zi();function o(i,a){let c=new t(i,a),d=new s(c);try{d.parse()}catch(m){throw m}return d.root}return jt=o,o.default=o,e.registerParse(o),jt}var Ht,Ts;function Qi(){if(Ts)return Ht;Ts=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ht=e,e.default=e,Ht}var Vt,Fs;function Vr(){if(Fs)return Vt;Fs=1;let e=Qi();class t{get content(){return this.css}constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css="",this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}}return Vt=t,t.default=t,Vt}var Gt,Bs;function Xi(){if(Bs)return Gt;Bs=1;let e={};return Gt=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Gt}var Jt,$s;function Ki(){if($s)return Jt;$s=1;let e=Ie(),t=qr(),s=Ji(),o=Hr(),i=Vr(),a=He(),c=pt(),{isClean:d,my:m}=Wr(),h=Xi();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function f(x){let y=!1,b=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:x.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=f(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function S(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>S(y)),x}let w={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,b,C){this.stringified=!1,this.processed=!1;let R;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))R=S(b);else if(b instanceof v||b instanceof i)R=S(b.root),b.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let M=o;C.syntax&&(M=C.syntax.parse),C.parser&&(M=C.parser),M.parse&&(M=M.parse);try{R=M(b,C)}catch(O){this.processed=!0,this.error=O}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=le(L({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(M=>typeof M=="object"&&M.prepare?L(L({},M),M.prepare(this.result)):M)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(b,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,R])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let R in b[C])R==="*"?y(b,C,b[C][R]):y(b,C+"-"+R.toLowerCase(),b[C][R]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(p(C))try{await C}catch(R){let M=b[b.length-1].node;throw this.handleError(R,M)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let R=y.nodes.map(M=>C(M,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.stringifier),b.stringify&&(b=b.stringify);let R=new s(b,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let b=this.runOnRoot(y);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,R]of y){this.result.lastPlugin=C;let M;try{M=R(b,this.helpers)}catch(O){throw this.handleError(O,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(M))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:R}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&b.visitorIndex<R.length){let[O,N]=R[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===R.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=O;try{return N(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let O=b.iterator,N;for(;N=C.nodes[C.indexes[O]];)if(C.indexes[O]+=1,!N[d]){N[d]=!0,y.push(g(N));return}b.iterator=0,delete C.indexes[O]}let M=b.events;for(;b.eventIndex<M.length;){let O=M[b.eventIndex];if(b.eventIndex+=1,O===n){C.nodes&&C.nodes.length&&(C[d]=!0,b.iterator=C.getIterator());return}else if(this.listeners[O]){b.visitors=this.listeners[O];return}}y.pop()}walkSync(y){y[d]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return v.registerPostcss=x=>{w=x},Jt=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Jt}var Yt,Us;function $o(){if(Us)return Yt;Us=1;let e=Ji(),t=Hr();const s=Vr();let o=pt(),i=Xi();class a{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,m,h){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=h,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,f]=n.generate();p&&(this.result.css=p),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}}return Yt=a,a.default=a,Yt}var Zt,Ws;function Uo(){if(Ws)return Zt;Ws=1;let e=qr(),t=Ki(),s=$o(),o=He();class i{constructor(c=[]){this.version="8.5.6",this.plugins=this.normalize(c)}normalize(c){let d=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(c,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,c,d):new t(this,c,d)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Zt=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Zt}var Qt,zs;function en(){if(zs)return Qt;zs=1;let e=zr(),t=je(),s=Ie(),o=Ur(),i=mt(),a=qr(),c=Bo(),d=gt(),m=Ki(),h=Gi(),r=dt(),u=Hr(),l=Uo(),n=Vr(),p=He(),f=jr(),g=pt(),S=Qi();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(x,y){let b=!1;function C(...M){console&&console.warn&&!b&&(b=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
27
+ `),n=w.length-g):n+=w.length,v&&x!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=p,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l!="undefined"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let f=t(p,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new d(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!l[p]){l[p]=!0;let f=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let p=c(l).toString();return this.memoizedFileURLs.set(l,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let p=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,p),p}}return Wt=r,Wt}var zt,ks;function Yi(){if(ks)return zt;ks=1;const e=39,t=34,s=92,o=47,i=10,a=32,c=12,d=9,m=13,h=91,r=93,u=40,l=41,n=123,p=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return zt=function(R,M={}){let O=R.css.valueOf(),N=M.ignoreErrors,A,ee,te,I,Q,T,$,X,V,be,me=O.length,E=0,oe=[],ae=[];function Ae(){return E}function ge(Y){throw R.error("Unclosed "+Y,E)}function he(){return ae.length===0&&E>=me}function re(Y){if(ae.length)return ae.pop();if(E>=me)return;let _=Y?Y.ignoreUnclosed:!1;switch(A=O.charCodeAt(E),A){case i:case a:case d:case m:case c:{I=E;do I+=1,A=O.charCodeAt(I);while(A===a||A===i||A===d||A===m||A===c);T=["space",O.slice(E,I)],E=I-1;break}case h:case r:case n:case p:case S:case f:case l:{let G=String.fromCharCode(A);T=[G,G,E];break}case u:{if(be=oe.length?oe.pop()[1]:"",V=O.charCodeAt(E+1),be==="url"&&V!==e&&V!==t&&V!==a&&V!==i&&V!==d&&V!==c&&V!==m){I=E;do{if($=!1,I=O.indexOf(")",I+1),I===-1)if(N||_){I=E;break}else ge("bracket");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["brackets",O.slice(E,I+1),E,I],E=I}else I=O.indexOf(")",E+1),ee=O.slice(E,I+1),I===-1||y.test(ee)?T=["(","(",E]:(T=["brackets",ee,E,I],E=I);break}case e:case t:{Q=A===e?"'":'"',I=E;do{if($=!1,I=O.indexOf(Q,I+1),I===-1)if(N||_){I=E+1;break}else ge("string");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["string",O.slice(E,I+1),E,I],E=I;break}case w:{v.lastIndex=E+1,v.test(O),v.lastIndex===0?I=O.length-1:I=v.lastIndex-2,T=["at-word",O.slice(E,I+1),E,I],E=I;break}case s:{for(I=E,te=!0;O.charCodeAt(I+1)===s;)I+=1,te=!te;if(A=O.charCodeAt(I+1),te&&A!==o&&A!==a&&A!==i&&A!==d&&A!==m&&A!==c&&(I+=1,b.test(O.charAt(I)))){for(;b.test(O.charAt(I+1));)I+=1;O.charCodeAt(I+1)===a&&(I+=1)}T=["word",O.slice(E,I+1),E,I],E=I;break}default:{A===o&&O.charCodeAt(E+1)===g?(I=O.indexOf("*/",E+2)+1,I===0&&(N||_?I=O.length:ge("comment")),T=["comment",O.slice(E,I+1),E,I],E=I):(x.lastIndex=E+1,x.test(O),x.lastIndex===0?I=O.length-1:I=x.lastIndex-2,T=["word",O.slice(E,I+1),E,I],oe.push(T),E=I);break}}return E++,T}function Re(Y){ae.push(Y)}return{back:Re,endOfFile:he,nextToken:re,position:Ae}},zt}var qt,Ls;function Zi(){if(Ls)return qt;Ls=1;let e=zr(),t=je(),s=mt(),o=He(),i=jr(),a=Yi();const c={empty:!0,space:!0};function d(h){for(let r=h.length-1;r>=0;r--){let u=h[r],l=u[3]||u[2];if(l)return l}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let l,n,p,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),l=r[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(p=S.length-1,n=S[p];n&&n[0]==="space";)n=S[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else S.push(r);else S.push(r);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(r=S[S.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let l=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(l+=1,l===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,l,n,p;for(let[f,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let l=r[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(r,u){let l=new s;this.init(l,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),l.source.end=this.getPosition(n[3]||n[2]||d(r)),l.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),l.raws.before+=r.shift()[1];for(l.source.start=this.getPosition(r[0][2]),l.prop="";r.length;){let w=r[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=r.shift()[1]}l.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){l.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),l.raws.between+=p[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)f.push(r.shift());this.precheckMissedSemicolon(r);for(let w=r.length-1;w>=0;w--){if(p=r[w],p[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(r,w);v=this.spacesFromEnd(r)+v,v!==" !important"&&(l.raws.important=v);break}else if(p[1].toLowerCase()==="important"){let v=r.slice(0),x="";for(let y=w;y>0;y--){let b=v[y][0];if(x.trim().startsWith("!")&&b!=="space")break;x=v.pop()[1]+x}x.trim().startsWith("!")&&(l.important=!0,l.raws.important=x,r=v)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(r),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="",u.source.end=this.getPosition(r[2]),u.source.end.offset+=u.raws.ownSemicolon.length)}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,l=null,n=!1,p=null,f=[],g=r[1].startsWith("--"),S=[],w=r;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")p||(p=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")p||(p=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(p=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,l,n){let p,f,g=l.length,S="",w=!0,v,x;for(let y=0;y<g;y+=1)p=l[y],f=p[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(x=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[x]&&!c[v]?S.slice(-1)===","?w=!1:S+=p[1]:w=!1):S+=p[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");r.raws[u]={raw:y,value:S}}r[u]=S}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)l=r.pop()[1]+l;return l}spacesAndCommentsFromStart(r){let u,l="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)l+=r.shift()[1];return l}spacesFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],u==="space");)l=r.pop()[1]+l;return l}stringFrom(r,u){let l="";for(let n=u;n<r.length;n++)l+=r[n][1];return r.splice(u,r.length-u),l}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word "+r[0][1],{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return qt=m,qt}var jt,Ds;function Hr(){if(Ds)return jt;Ds=1;let e=Ie(),t=gt(),s=Zi();function o(i,a){let c=new t(i,a),d=new s(c);try{d.parse()}catch(m){throw m}return d.root}return jt=o,o.default=o,e.registerParse(o),jt}var Ht,Ts;function Qi(){if(Ts)return Ht;Ts=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ht=e,e.default=e,Ht}var Vt,Fs;function Vr(){if(Fs)return Vt;Fs=1;let e=Qi();class t{get content(){return this.css}constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css="",this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}}return Vt=t,t.default=t,Vt}var Gt,Bs;function Xi(){if(Bs)return Gt;Bs=1;let e={};return Gt=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Gt}var Jt,$s;function Ki(){if($s)return Jt;$s=1;let e=Ie(),t=qr(),s=Ji(),o=Hr(),i=Vr(),a=He(),c=pt(),{isClean:d,my:m}=Wr(),h=Xi();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function f(x){let y=!1,b=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:x.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=f(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function S(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>S(y)),x}let w={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,b,C){this.stringified=!1,this.processed=!1;let R;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))R=S(b);else if(b instanceof v||b instanceof i)R=S(b.root),b.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let M=o;C.syntax&&(M=C.syntax.parse),C.parser&&(M=C.parser),M.parse&&(M=M.parse);try{R=M(b,C)}catch(O){this.processed=!0,this.error=O}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=le(L({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(M=>typeof M=="object"&&M.prepare?L(L({},M),M.prepare(this.result)):M)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(b,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,R])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let R in b[C])R==="*"?y(b,C,b[C][R]):y(b,C+"-"+R.toLowerCase(),b[C][R]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(p(C))try{await C}catch(R){let M=b[b.length-1].node;throw this.handleError(R,M)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let R=y.nodes.map(M=>C(M,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.stringifier),b.stringify&&(b=b.stringify);let R=new s(b,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let b=this.runOnRoot(y);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,R]of y){this.result.lastPlugin=C;let M;try{M=R(b,this.helpers)}catch(O){throw this.handleError(O,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(M))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:R}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&b.visitorIndex<R.length){let[O,N]=R[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===R.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=O;try{return N(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let O=b.iterator,N;for(;N=C.nodes[C.indexes[O]];)if(C.indexes[O]+=1,!N[d]){N[d]=!0,y.push(g(N));return}b.iterator=0,delete C.indexes[O]}let M=b.events;for(;b.eventIndex<M.length;){let O=M[b.eventIndex];if(b.eventIndex+=1,O===n){C.nodes&&C.nodes.length&&(C[d]=!0,b.iterator=C.getIterator());return}else if(this.listeners[O]){b.visitors=this.listeners[O];return}}y.pop()}walkSync(y){y[d]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return v.registerPostcss=x=>{w=x},Jt=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Jt}var Yt,Us;function $o(){if(Us)return Yt;Us=1;let e=Ji(),t=Hr();const s=Vr();let o=pt(),i=Xi();class a{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,m,h){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=h,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,f]=n.generate();p&&(this.result.css=p),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}}return Yt=a,a.default=a,Yt}var Zt,Ws;function Uo(){if(Ws)return Zt;Ws=1;let e=qr(),t=Ki(),s=$o(),o=He();class i{constructor(c=[]){this.version="8.5.6",this.plugins=this.normalize(c)}normalize(c){let d=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(c,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,c,d):new t(this,c,d)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Zt=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Zt}var Qt,zs;function en(){if(zs)return Qt;zs=1;let e=zr(),t=je(),s=Ie(),o=Ur(),i=mt(),a=qr(),c=Bo(),d=gt(),m=Ki(),h=Gi(),r=dt(),u=Hr(),l=Uo(),n=Vr(),p=He(),f=jr(),g=pt(),S=Qi();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(x,y){let b=!1;function C(...M){console&&console.warn&&!b&&(b=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
28
28
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
29
- https://www.w3ctech.com/topic/2226`));let O=y(...M);return O.postcssPlugin=x,O.postcssVersion=new l().version,O}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(M,O,N){return w([C(N)]).process(M,O)},C},w.stringify=g,w.parse=u,w.fromJSON=c,w.list=h,w.comment=v=>new t(v),w.atRule=v=>new e(v),w.decl=v=>new i(v),w.rule=v=>new f(v),w.root=v=>new p(v),w.document=v=>new a(v),w.CssSyntaxError=o,w.Declaration=i,w.Container=s,w.Processor=l,w.Document=a,w.Comment=t,w.Warning=S,w.AtRule=e,w.Result=n,w.Input=d,w.Rule=f,w.Root=p,w.Node=r,m.registerPostcss(w),Qt=w,w.default=w,Qt}var Xt,qs;function Wo(){if(qs)return Xt;qs=1;let e=je(),t=Zi(),s=Yi();class o extends t{checkMissedSemicolon(){}comment(a){let c=new e;this.init(c,a[2]);let d=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);c.source.end={column:d.col,line:d.line,offset:a[3]+1};let m=a[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))c.text="",c.raws.left=m,c.raws.right="";else{let h=m.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(c=>c[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let c=this.colon(a);if(c===!1)return;let d,m;for(d=c-1;d>=0&&a[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(a[m][0]!=="space"){m+=1;break}let h=a.slice(d),r=a.slice(m,d);a.splice(m,a.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(h)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(c=>c[1]).join("")}unnamedAtrule(a){a.name=""}}return Xt=o,Xt}var Kt,js;function zo(){if(js)return Kt;js=1;let{Input:e}=en(),t=Wo();return Kt=function(o,i){let a=new e(o,i),c=new t(a);return c.parse(),c.root},Kt}zo();var qo=en();const z=_o(qo);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 jo=Object.defineProperty,Ho=(e,t,s)=>t in e?jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ue=(e,t,s)=>Ho(e,typeof t!="symbol"?t+"":t,s);function Vo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Go(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Ke={exports:{}},Hs;function Jo(){if(Hs)return Ke.exports;Hs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ke.exports=t(),Ke.exports.createColors=t,Ke.exports}const Yo={},Zo=Object.freeze(Object.defineProperty({__proto__:null,default:Yo},Symbol.toStringTag,{value:"Module"})),de=Go(Zo);var er,Vs;function Gr(){if(Vs)return er;Vs=1;let e=Jo(),t=de;class s extends Error{constructor(i,a,c,d,m,h){super(i),this.name="CssSyntaxError",this.reason=i,m&&(this.file=m),d&&(this.source=d),h&&(this.plugin=h),typeof a!="undefined"&&typeof c!="undefined"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let c=n=>n,d=n=>n,m=n=>n;if(i){let{bold:n,gray:p,red:f}=e.createColors(!0);d=g=>n(f(g)),c=g=>p(g),t&&(m=g=>t(g))}let h=a.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,h.length),l=String(u).length;return h.slice(r,u).map((n,p)=>{let f=r+1+p,g=" "+(" "+f).slice(-l)+" | ";if(f===this.line){if(n.length>160){let w=20,v=Math.max(0,this.column-w),x=Math.max(this.column+w,this.endColumn+w),y=n.slice(v,x),b=c(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return d(">")+c(g)+m(y)+`
29
+ https://www.w3ctech.com/topic/2226`));let O=y(...M);return O.postcssPlugin=x,O.postcssVersion=new l().version,O}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(M,O,N){return w([C(N)]).process(M,O)},C},w.stringify=g,w.parse=u,w.fromJSON=c,w.list=h,w.comment=v=>new t(v),w.atRule=v=>new e(v),w.decl=v=>new i(v),w.rule=v=>new f(v),w.root=v=>new p(v),w.document=v=>new a(v),w.CssSyntaxError=o,w.Declaration=i,w.Container=s,w.Processor=l,w.Document=a,w.Comment=t,w.Warning=S,w.AtRule=e,w.Result=n,w.Input=d,w.Rule=f,w.Root=p,w.Node=r,m.registerPostcss(w),Qt=w,w.default=w,Qt}var Xt,qs;function Wo(){if(qs)return Xt;qs=1;let e=je(),t=Zi(),s=Yi();class o extends t{checkMissedSemicolon(){}comment(a){let c=new e;this.init(c,a[2]);let d=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);c.source.end={column:d.col,line:d.line,offset:a[3]+1};let m=a[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))c.text="",c.raws.left=m,c.raws.right="";else{let h=m.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(c=>c[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let c=this.colon(a);if(c===!1)return;let d,m;for(d=c-1;d>=0&&a[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(a[m][0]!=="space"){m+=1;break}let h=a.slice(d),r=a.slice(m,d);a.splice(m,a.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(h)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(c=>c[1]).join("")}unnamedAtrule(a){a.name=""}}return Xt=o,Xt}var Kt,js;function zo(){if(js)return Kt;js=1;let{Input:e}=en(),t=Wo();return Kt=function(o,i){let a=new e(o,i),c=new t(a);return c.parse(),c.root},Kt}zo();var qo=en();const q=_o(qo);q.stringify;q.fromJSON;q.plugin;q.parse;q.list;q.document;q.comment;q.atRule;q.rule;q.decl;q.root;q.CssSyntaxError;q.Declaration;q.Container;q.Processor;q.Document;q.Comment;q.Warning;q.AtRule;q.Result;q.Input;q.Rule;q.Root;q.Node;var jo=Object.defineProperty,Ho=(e,t,s)=>t in e?jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ue=(e,t,s)=>Ho(e,typeof t!="symbol"?t+"":t,s);function Vo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Go(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Ke={exports:{}},Hs;function Jo(){if(Hs)return Ke.exports;Hs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ke.exports=t(),Ke.exports.createColors=t,Ke.exports}const Yo={},Zo=Object.freeze(Object.defineProperty({__proto__:null,default:Yo},Symbol.toStringTag,{value:"Module"})),de=Go(Zo);var er,Vs;function Gr(){if(Vs)return er;Vs=1;let e=Jo(),t=de;class s extends Error{constructor(i,a,c,d,m,h){super(i),this.name="CssSyntaxError",this.reason=i,m&&(this.file=m),d&&(this.source=d),h&&(this.plugin=h),typeof a!="undefined"&&typeof c!="undefined"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let c=n=>n,d=n=>n,m=n=>n;if(i){let{bold:n,gray:p,red:f}=e.createColors(!0);d=g=>n(f(g)),c=g=>p(g),t&&(m=g=>t(g))}let h=a.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,h.length),l=String(u).length;return h.slice(r,u).map((n,p)=>{let f=r+1+p,g=" "+(" "+f).slice(-l)+" | ";if(f===this.line){if(n.length>160){let w=20,v=Math.max(0,this.column-w),x=Math.max(this.column+w,this.endColumn+w),y=n.slice(v,x),b=c(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return d(">")+c(g)+m(y)+`
30
30
  `+b+d("^")}let S=c(g.replace(/\d/g," "))+n.slice(0,this.column-1).replace(/[^\t]/g," ");return d(">")+c(g)+m(n)+`
31
31
  `+S+d("^")}return" "+c(g)+m(n)}).join(`
32
32
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
@@ -51,11 +51,11 @@ https://www.w3ctech.com/topic/2226`));let O=y(...M);return O.postcssPlugin=x,O.p
51
51
  `;this.css.includes(`\r
52
52
  `)&&(n=`\r
53
53
  `),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),p=l.root||e(l.file),f;this.mapOpts.sourcesContent===!1?(f=new i(l.text),f.sourcesContent&&(f.sourcesContent=null)):f=l.consumer(),this.map.applySourceMap(f,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let n=this.root.nodes.length-1;n>=0;n--)l=this.root.nodes[n],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&m&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,n=>{l+=n}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,n=1,p="<no source>",f={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(w,v,x)=>{if(this.css+=w,v&&x!=="end"&&(f.generated.line=l,f.generated.column=n-1,v.source&&v.source.start?(f.source=this.sourcePath(v),f.original.line=v.source.start.line,f.original.column=v.source.start.column-1,this.map.addMapping(f)):(f.source=p,f.original.line=1,f.original.column=0,this.map.addMapping(f))),S=w.match(/\n/g),S?(l+=S.length,g=w.lastIndexOf(`
54
- `),n=w.length-g):n+=w.length,v&&x!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=p,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l!="undefined"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let f=t(p,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new d(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!l[p]){l[p]=!0;let f=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let p=c(l).toString();return this.memoizedFileURLs.set(l,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let p=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,p),p}}return gr=r,gr}var yr,ci;function on(){if(ci)return yr;ci=1;const e=39,t=34,s=92,o=47,i=10,a=32,c=12,d=9,m=13,h=91,r=93,u=40,l=41,n=123,p=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return yr=function(R,M={}){let O=R.css.valueOf(),N=M.ignoreErrors,A,ee,te,I,Q,T,$,X,H,be,me=O.length,E=0,oe=[],ae=[];function Ae(){return E}function ge(Y){throw R.error("Unclosed "+Y,E)}function he(){return ae.length===0&&E>=me}function re(Y){if(ae.length)return ae.pop();if(E>=me)return;let _=Y?Y.ignoreUnclosed:!1;switch(A=O.charCodeAt(E),A){case i:case a:case d:case m:case c:{I=E;do I+=1,A=O.charCodeAt(I);while(A===a||A===i||A===d||A===m||A===c);T=["space",O.slice(E,I)],E=I-1;break}case h:case r:case n:case p:case S:case f:case l:{let J=String.fromCharCode(A);T=[J,J,E];break}case u:{if(be=oe.length?oe.pop()[1]:"",H=O.charCodeAt(E+1),be==="url"&&H!==e&&H!==t&&H!==a&&H!==i&&H!==d&&H!==c&&H!==m){I=E;do{if($=!1,I=O.indexOf(")",I+1),I===-1)if(N||_){I=E;break}else ge("bracket");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["brackets",O.slice(E,I+1),E,I],E=I}else I=O.indexOf(")",E+1),ee=O.slice(E,I+1),I===-1||y.test(ee)?T=["(","(",E]:(T=["brackets",ee,E,I],E=I);break}case e:case t:{Q=A===e?"'":'"',I=E;do{if($=!1,I=O.indexOf(Q,I+1),I===-1)if(N||_){I=E+1;break}else ge("string");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["string",O.slice(E,I+1),E,I],E=I;break}case w:{v.lastIndex=E+1,v.test(O),v.lastIndex===0?I=O.length-1:I=v.lastIndex-2,T=["at-word",O.slice(E,I+1),E,I],E=I;break}case s:{for(I=E,te=!0;O.charCodeAt(I+1)===s;)I+=1,te=!te;if(A=O.charCodeAt(I+1),te&&A!==o&&A!==a&&A!==i&&A!==d&&A!==m&&A!==c&&(I+=1,b.test(O.charAt(I)))){for(;b.test(O.charAt(I+1));)I+=1;O.charCodeAt(I+1)===a&&(I+=1)}T=["word",O.slice(E,I+1),E,I],E=I;break}default:{A===o&&O.charCodeAt(E+1)===g?(I=O.indexOf("*/",E+2)+1,I===0&&(N||_?I=O.length:ge("comment")),T=["comment",O.slice(E,I+1),E,I],E=I):(x.lastIndex=E+1,x.test(O),x.lastIndex===0?I=O.length-1:I=x.lastIndex-2,T=["word",O.slice(E,I+1),E,I],oe.push(T),E=I);break}}return E++,T}function Re(Y){ae.push(Y)}return{back:Re,endOfFile:he,nextToken:re,position:Ae}},yr}var wr,hi;function an(){if(hi)return wr;hi=1;let e=Yr(),t=Ve(),s=bt(),o=Ge(),i=Qr(),a=on();const c={empty:!0,space:!0};function d(h){for(let r=h.length-1;r>=0;r--){let u=h[r],l=u[3]||u[2];if(l)return l}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let l,n,p,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),l=r[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(p=S.length-1,n=S[p];n&&n[0]==="space";)n=S[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else S.push(r);else S.push(r);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(r=S[S.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let l=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(l+=1,l===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,l,n,p;for(let[f,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let l=r[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(r,u){let l=new s;this.init(l,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),l.source.end=this.getPosition(n[3]||n[2]||d(r)),l.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),l.raws.before+=r.shift()[1];for(l.source.start=this.getPosition(r[0][2]),l.prop="";r.length;){let w=r[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=r.shift()[1]}l.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){l.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),l.raws.between+=p[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)f.push(r.shift());this.precheckMissedSemicolon(r);for(let w=r.length-1;w>=0;w--){if(p=r[w],p[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(r,w);v=this.spacesFromEnd(r)+v,v!==" !important"&&(l.raws.important=v);break}else if(p[1].toLowerCase()==="important"){let v=r.slice(0),x="";for(let y=w;y>0;y--){let b=v[y][0];if(x.trim().startsWith("!")&&b!=="space")break;x=v.pop()[1]+x}x.trim().startsWith("!")&&(l.important=!0,l.raws.important=x,r=v)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(r),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="",u.source.end=this.getPosition(r[2]),u.source.end.offset+=u.raws.ownSemicolon.length)}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,l=null,n=!1,p=null,f=[],g=r[1].startsWith("--"),S=[],w=r;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")p||(p=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")p||(p=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(p=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,l,n){let p,f,g=l.length,S="",w=!0,v,x;for(let y=0;y<g;y+=1)p=l[y],f=p[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(x=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[x]&&!c[v]?S.slice(-1)===","?w=!1:S+=p[1]:w=!1):S+=p[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");r.raws[u]={raw:y,value:S}}r[u]=S}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)l=r.pop()[1]+l;return l}spacesAndCommentsFromStart(r){let u,l="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)l+=r.shift()[1];return l}spacesFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],u==="space");)l=r.pop()[1]+l;return l}stringFrom(r,u){let l="";for(let n=u;n<r.length;n++)l+=r[n][1];return r.splice(u,r.length-u),l}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word "+r[0][1],{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return wr=m,wr}var br,fi;function Xr(){if(fi)return br;fi=1;let e=Me(),t=St(),s=an();function o(i,a){let c=new t(i,a),d=new s(c);try{d.parse()}catch(m){throw m}return d.root}return br=o,o.default=o,e.registerParse(o),br}var Sr,pi;function ln(){if(pi)return Sr;pi=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Sr=e,e.default=e,Sr}var vr,di;function Kr(){if(di)return vr;di=1;let e=ln();class t{get content(){return this.css}constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css="",this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}}return vr=t,t.default=t,vr}var Cr,mi;function un(){if(mi)return Cr;mi=1;let e={};return Cr=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Cr}var xr,gi;function cn(){if(gi)return xr;gi=1;let e=Me(),t=Zr(),s=nn(),o=Xr(),i=Kr(),a=Ge(),c=yt(),{isClean:d,my:m}=Jr(),h=un();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function f(x){let y=!1,b=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:x.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=f(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function S(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>S(y)),x}let w={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,b,C){this.stringified=!1,this.processed=!1;let R;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))R=S(b);else if(b instanceof v||b instanceof i)R=S(b.root),b.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let M=o;C.syntax&&(M=C.syntax.parse),C.parser&&(M=C.parser),M.parse&&(M=M.parse);try{R=M(b,C)}catch(O){this.processed=!0,this.error=O}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=le(L({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(M=>typeof M=="object"&&M.prepare?L(L({},M),M.prepare(this.result)):M)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(b,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,R])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let R in b[C])R==="*"?y(b,C,b[C][R]):y(b,C+"-"+R.toLowerCase(),b[C][R]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(p(C))try{await C}catch(R){let M=b[b.length-1].node;throw this.handleError(R,M)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let R=y.nodes.map(M=>C(M,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.stringifier),b.stringify&&(b=b.stringify);let R=new s(b,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let b=this.runOnRoot(y);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,R]of y){this.result.lastPlugin=C;let M;try{M=R(b,this.helpers)}catch(O){throw this.handleError(O,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(M))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:R}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&b.visitorIndex<R.length){let[O,N]=R[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===R.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=O;try{return N(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let O=b.iterator,N;for(;N=C.nodes[C.indexes[O]];)if(C.indexes[O]+=1,!N[d]){N[d]=!0,y.push(g(N));return}b.iterator=0,delete C.indexes[O]}let M=b.events;for(;b.eventIndex<M.length;){let O=M[b.eventIndex];if(b.eventIndex+=1,O===n){C.nodes&&C.nodes.length&&(C[d]=!0,b.iterator=C.getIterator());return}else if(this.listeners[O]){b.visitors=this.listeners[O];return}}y.pop()}walkSync(y){y[d]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return v.registerPostcss=x=>{w=x},xr=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),xr}var Rr,yi;function Ko(){if(yi)return Rr;yi=1;let e=nn(),t=Xr();const s=Kr();let o=yt(),i=un();class a{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,m,h){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=h,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,f]=n.generate();p&&(this.result.css=p),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}}return Rr=a,a.default=a,Rr}var Or,wi;function ea(){if(wi)return Or;wi=1;let e=Zr(),t=cn(),s=Ko(),o=Ge();class i{constructor(c=[]){this.version="8.5.6",this.plugins=this.normalize(c)}normalize(c){let d=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(c,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,c,d):new t(this,c,d)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Or=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Or}var Ir,bi;function hn(){if(bi)return Ir;bi=1;let e=Yr(),t=Ve(),s=Me(),o=Gr(),i=bt(),a=Zr(),c=Xo(),d=St(),m=cn(),h=sn(),r=wt(),u=Xr(),l=ea(),n=Kr(),p=Ge(),f=Qr(),g=yt(),S=ln();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(x,y){let b=!1;function C(...M){console&&console.warn&&!b&&(b=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
54
+ `),n=w.length-g):n+=w.length,v&&x!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=p,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l!="undefined"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let f=t(p,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new d(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!l[p]){l[p]=!0;let f=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let p=c(l).toString();return this.memoizedFileURLs.set(l,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let p=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,p),p}}return gr=r,gr}var yr,ci;function on(){if(ci)return yr;ci=1;const e=39,t=34,s=92,o=47,i=10,a=32,c=12,d=9,m=13,h=91,r=93,u=40,l=41,n=123,p=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return yr=function(R,M={}){let O=R.css.valueOf(),N=M.ignoreErrors,A,ee,te,I,Q,T,$,X,V,be,me=O.length,E=0,oe=[],ae=[];function Ae(){return E}function ge(Y){throw R.error("Unclosed "+Y,E)}function he(){return ae.length===0&&E>=me}function re(Y){if(ae.length)return ae.pop();if(E>=me)return;let _=Y?Y.ignoreUnclosed:!1;switch(A=O.charCodeAt(E),A){case i:case a:case d:case m:case c:{I=E;do I+=1,A=O.charCodeAt(I);while(A===a||A===i||A===d||A===m||A===c);T=["space",O.slice(E,I)],E=I-1;break}case h:case r:case n:case p:case S:case f:case l:{let G=String.fromCharCode(A);T=[G,G,E];break}case u:{if(be=oe.length?oe.pop()[1]:"",V=O.charCodeAt(E+1),be==="url"&&V!==e&&V!==t&&V!==a&&V!==i&&V!==d&&V!==c&&V!==m){I=E;do{if($=!1,I=O.indexOf(")",I+1),I===-1)if(N||_){I=E;break}else ge("bracket");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["brackets",O.slice(E,I+1),E,I],E=I}else I=O.indexOf(")",E+1),ee=O.slice(E,I+1),I===-1||y.test(ee)?T=["(","(",E]:(T=["brackets",ee,E,I],E=I);break}case e:case t:{Q=A===e?"'":'"',I=E;do{if($=!1,I=O.indexOf(Q,I+1),I===-1)if(N||_){I=E+1;break}else ge("string");for(X=I;O.charCodeAt(X-1)===s;)X-=1,$=!$}while($);T=["string",O.slice(E,I+1),E,I],E=I;break}case w:{v.lastIndex=E+1,v.test(O),v.lastIndex===0?I=O.length-1:I=v.lastIndex-2,T=["at-word",O.slice(E,I+1),E,I],E=I;break}case s:{for(I=E,te=!0;O.charCodeAt(I+1)===s;)I+=1,te=!te;if(A=O.charCodeAt(I+1),te&&A!==o&&A!==a&&A!==i&&A!==d&&A!==m&&A!==c&&(I+=1,b.test(O.charAt(I)))){for(;b.test(O.charAt(I+1));)I+=1;O.charCodeAt(I+1)===a&&(I+=1)}T=["word",O.slice(E,I+1),E,I],E=I;break}default:{A===o&&O.charCodeAt(E+1)===g?(I=O.indexOf("*/",E+2)+1,I===0&&(N||_?I=O.length:ge("comment")),T=["comment",O.slice(E,I+1),E,I],E=I):(x.lastIndex=E+1,x.test(O),x.lastIndex===0?I=O.length-1:I=x.lastIndex-2,T=["word",O.slice(E,I+1),E,I],oe.push(T),E=I);break}}return E++,T}function Re(Y){ae.push(Y)}return{back:Re,endOfFile:he,nextToken:re,position:Ae}},yr}var wr,hi;function an(){if(hi)return wr;hi=1;let e=Yr(),t=Ve(),s=bt(),o=Ge(),i=Qr(),a=on();const c={empty:!0,space:!0};function d(h){for(let r=h.length-1;r>=0;r--){let u=h[r],l=u[3]||u[2];if(l)return l}}class m{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let l,n,p,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),l=r[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(p=S.length-1,n=S[p];n&&n[0]==="space";)n=S[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else S.push(r);else S.push(r);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(r=S[S.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let l=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(l+=1,l===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,l,n,p;for(let[f,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let l=r[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(r,u){let l=new s;this.init(l,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),l.source.end=this.getPosition(n[3]||n[2]||d(r)),l.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),l.raws.before+=r.shift()[1];for(l.source.start=this.getPosition(r[0][2]),l.prop="";r.length;){let w=r[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=r.shift()[1]}l.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){l.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),l.raws.between+=p[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)f.push(r.shift());this.precheckMissedSemicolon(r);for(let w=r.length-1;w>=0;w--){if(p=r[w],p[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(r,w);v=this.spacesFromEnd(r)+v,v!==" !important"&&(l.raws.important=v);break}else if(p[1].toLowerCase()==="important"){let v=r.slice(0),x="";for(let y=w;y>0;y--){let b=v[y][0];if(x.trim().startsWith("!")&&b!=="space")break;x=v.pop()[1]+x}x.trim().startsWith("!")&&(l.important=!0,l.raws.important=x,r=v)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(r),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="",u.source.end=this.getPosition(r[2]),u.source.end.offset+=u.raws.ownSemicolon.length)}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,l=null,n=!1,p=null,f=[],g=r[1].startsWith("--"),S=[],w=r;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")p||(p=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")p||(p=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(p=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,l,n){let p,f,g=l.length,S="",w=!0,v,x;for(let y=0;y<g;y+=1)p=l[y],f=p[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(x=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[x]&&!c[v]?S.slice(-1)===","?w=!1:S+=p[1]:w=!1):S+=p[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");r.raws[u]={raw:y,value:S}}r[u]=S}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)l=r.pop()[1]+l;return l}spacesAndCommentsFromStart(r){let u,l="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)l+=r.shift()[1];return l}spacesFromEnd(r){let u,l="";for(;r.length&&(u=r[r.length-1][0],u==="space");)l=r.pop()[1]+l;return l}stringFrom(r,u){let l="";for(let n=u;n<r.length;n++)l+=r[n][1];return r.splice(u,r.length-u),l}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word "+r[0][1],{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return wr=m,wr}var br,fi;function Xr(){if(fi)return br;fi=1;let e=Me(),t=St(),s=an();function o(i,a){let c=new t(i,a),d=new s(c);try{d.parse()}catch(m){throw m}return d.root}return br=o,o.default=o,e.registerParse(o),br}var Sr,pi;function ln(){if(pi)return Sr;pi=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Sr=e,e.default=e,Sr}var vr,di;function Kr(){if(di)return vr;di=1;let e=ln();class t{get content(){return this.css}constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css="",this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}}return vr=t,t.default=t,vr}var Cr,mi;function un(){if(mi)return Cr;mi=1;let e={};return Cr=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Cr}var xr,gi;function cn(){if(gi)return xr;gi=1;let e=Me(),t=Zr(),s=nn(),o=Xr(),i=Kr(),a=Ge(),c=yt(),{isClean:d,my:m}=Jr(),h=un();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function f(x){let y=!1,b=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:x.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=f(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function S(x){return x[d]=!1,x.nodes&&x.nodes.forEach(y=>S(y)),x}let w={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,b,C){this.stringified=!1,this.processed=!1;let R;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))R=S(b);else if(b instanceof v||b instanceof i)R=S(b.root),b.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let M=o;C.syntax&&(M=C.syntax.parse),C.parser&&(M=C.parser),M.parse&&(M=M.parse);try{R=M(b,C)}catch(O){this.processed=!0,this.error=O}R&&!R[m]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=le(L({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(M=>typeof M=="object"&&M.prepare?L(L({},M),M.prepare(this.result)):M)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(b,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,R])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let R in b[C])R==="*"?y(b,C,b[C][R]):y(b,C+"-"+R.toLowerCase(),b[C][R]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(p(C))try{await C}catch(R){let M=b[b.length-1].node;throw this.handleError(R,M)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let R=y.nodes.map(M=>C(M,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.stringifier),b.stringify&&(b=b.stringify);let R=new s(b,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let b=this.runOnRoot(y);if(p(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,R]of y){this.result.lastPlugin=C;let M;try{M=R(b,this.helpers)}catch(O){throw this.handleError(O,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(p(M))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:R}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&b.visitorIndex<R.length){let[O,N]=R[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===R.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=O;try{return N(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let O=b.iterator,N;for(;N=C.nodes[C.indexes[O]];)if(C.indexes[O]+=1,!N[d]){N[d]=!0,y.push(g(N));return}b.iterator=0,delete C.indexes[O]}let M=b.events;for(;b.eventIndex<M.length;){let O=M[b.eventIndex];if(b.eventIndex+=1,O===n){C.nodes&&C.nodes.length&&(C[d]=!0,b.iterator=C.getIterator());return}else if(this.listeners[O]){b.visitors=this.listeners[O];return}}y.pop()}walkSync(y){y[d]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(R=>{R[d]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return v.registerPostcss=x=>{w=x},xr=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),xr}var Rr,yi;function Ko(){if(yi)return Rr;yi=1;let e=nn(),t=Xr();const s=Kr();let o=yt(),i=un();class a{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let d,m=t;try{d=m(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,m,h){m=m.toString(),this.stringified=!1,this._processor=d,this._css=m,this._opts=h,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=m;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,r,this._opts,m);if(n.isMap()){let[p,f]=n.generate();p&&(this.result.css=p),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,m){return this.async().then(d,m)}toString(){return this._css}warnings(){return[]}}return Rr=a,a.default=a,Rr}var Or,wi;function ea(){if(wi)return Or;wi=1;let e=Zr(),t=cn(),s=Ko(),o=Ge();class i{constructor(c=[]){this.version="8.5.6",this.plugins=this.normalize(c)}normalize(c){let d=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))d=d.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)d.push(m);else if(typeof m=="function")d.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return d}process(c,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,c,d):new t(this,c,d)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Or=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Or}var Ir,bi;function hn(){if(bi)return Ir;bi=1;let e=Yr(),t=Ve(),s=Me(),o=Gr(),i=bt(),a=Zr(),c=Xo(),d=St(),m=cn(),h=sn(),r=wt(),u=Xr(),l=ea(),n=Kr(),p=Ge(),f=Qr(),g=yt(),S=ln();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(x,y){let b=!1;function C(...M){console&&console.warn&&!b&&(b=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
55
55
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
56
- https://www.w3ctech.com/topic/2226`));let O=y(...M);return O.postcssPlugin=x,O.postcssVersion=new l().version,O}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(M,O,N){return w([C(N)]).process(M,O)},C},w.stringify=g,w.parse=u,w.fromJSON=c,w.list=h,w.comment=v=>new t(v),w.atRule=v=>new e(v),w.decl=v=>new i(v),w.rule=v=>new f(v),w.root=v=>new p(v),w.document=v=>new a(v),w.CssSyntaxError=o,w.Declaration=i,w.Container=s,w.Processor=l,w.Document=a,w.Comment=t,w.Warning=S,w.AtRule=e,w.Result=n,w.Input=d,w.Rule=f,w.Root=p,w.Node=r,m.registerPostcss(w),Ir=w,w.default=w,Ir}var Mr,Si;function ta(){if(Si)return Mr;Si=1;let e=Ve(),t=an(),s=on();class o extends t{checkMissedSemicolon(){}comment(a){let c=new e;this.init(c,a[2]);let d=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);c.source.end={column:d.col,line:d.line,offset:a[3]+1};let m=a[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))c.text="",c.raws.left=m,c.raws.right="";else{let h=m.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(c=>c[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let c=this.colon(a);if(c===!1)return;let d,m;for(d=c-1;d>=0&&a[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(a[m][0]!=="space"){m+=1;break}let h=a.slice(d),r=a.slice(m,d);a.splice(m,a.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(h)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(c=>c[1]).join("")}unnamedAtrule(a){a.name=""}}return Mr=o,Mr}var Er,vi;function ra(){if(vi)return Er;vi=1;let{Input:e}=hn(),t=ta();return Er=function(o,i){let a=new e(o,i),c=new t(a);return c.parse(),c.root},Er}ra();var sa=hn();const q=Vo(sa);q.stringify;q.fromJSON;q.plugin;q.parse;q.list;q.document;q.comment;q.atRule;q.rule;q.decl;q.root;q.CssSyntaxError;q.Declaration;q.Container;q.Processor;q.Document;q.Comment;q.Warning;q.AtRule;q.Result;q.Input;q.Rule;q.Root;q.Node;class es{constructor(...t){ue(this,"parentElement",null),ue(this,"parentNode",null),ue(this,"ownerDocument"),ue(this,"firstChild",null),ue(this,"lastChild",null),ue(this,"previousSibling",null),ue(this,"nextSibling",null),ue(this,"ELEMENT_NODE",1),ue(this,"TEXT_NODE",3),ue(this,"nodeType"),ue(this,"nodeName"),ue(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof es){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Ci={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},xi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tt={};function ia(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function ts(e){if(tt[e])return tt[e];const t=ia(e)||globalThis[e],s=t.prototype,o=e in Ci?Ci[e]:void 0,i=!!(o&&o.every(d=>{var m,h;return!!((h=(m=Object.getOwnPropertyDescriptor(s,d))==null?void 0:m.get)!=null&&h.toString().includes("[native code]"))})),a=e in xi?xi[e]:void 0,c=!!(a&&a.every(d=>{var m;return typeof s[d]=="function"&&((m=s[d])==null?void 0:m.toString().includes("[native code]"))}));if(i&&c)return tt[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");document.body.appendChild(d);const m=d.contentWindow;if(!m)return t.prototype;const h=m[e].prototype;return document.body.removeChild(d),h?tt[e]=h:s}catch(d){return s}}const Ar={};function Ce(e,t,s){var o;const i=`${e}.${String(s)}`;if(Ar[i])return Ar[i].call(t);const a=ts(e),c=(o=Object.getOwnPropertyDescriptor(a,s))==null?void 0:o.get;return c?(Ar[i]=c,c.call(t)):t[s]}const Pr={};function fn(e,t,s){const o=`${e}.${String(s)}`;if(Pr[o])return Pr[o].bind(t);const a=ts(e)[s];return typeof a!="function"?t[s]:(Pr[o]=a,a.bind(t))}function na(e){return Ce("Node",e,"childNodes")}function oa(e){return Ce("Node",e,"parentNode")}function aa(e){return Ce("Node",e,"parentElement")}function la(e){return Ce("Node",e,"textContent")}function ua(e,t){return fn("Node",e,"contains")(t)}function ca(e){return fn("Node",e,"getRootNode")()}function ha(e){return!e||!("host"in e)?null:Ce("ShadowRoot",e,"host")}function fa(e){return e.styleSheets}function pa(e){return!e||!("shadowRoot"in e)?null:Ce("Element",e,"shadowRoot")}function da(e,t){return Ce("Element",e,"querySelector")(t)}function ma(e,t){return Ce("Element",e,"querySelectorAll")(t)}function pn(){return ts("MutationObserver").constructor}function Ee(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const k={childNodes:na,parentNode:oa,parentElement:aa,textContent:la,contains:ua,getRootNode:ca,host:ha,styleSheets:fa,shadowRoot:pa,querySelector:da,querySelectorAll:ma,mutationObserver:pn,patch:Ee};function se(e,t,s=document){const o={capture:!0,passive:!0};return s.addEventListener(e,t,o),()=>s.removeEventListener(e,t,o)}const ke=`Please stop import mirror directly. Instead of that,\r
56
+ https://www.w3ctech.com/topic/2226`));let O=y(...M);return O.postcssPlugin=x,O.postcssVersion=new l().version,O}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(M,O,N){return w([C(N)]).process(M,O)},C},w.stringify=g,w.parse=u,w.fromJSON=c,w.list=h,w.comment=v=>new t(v),w.atRule=v=>new e(v),w.decl=v=>new i(v),w.rule=v=>new f(v),w.root=v=>new p(v),w.document=v=>new a(v),w.CssSyntaxError=o,w.Declaration=i,w.Container=s,w.Processor=l,w.Document=a,w.Comment=t,w.Warning=S,w.AtRule=e,w.Result=n,w.Input=d,w.Rule=f,w.Root=p,w.Node=r,m.registerPostcss(w),Ir=w,w.default=w,Ir}var Mr,Si;function ta(){if(Si)return Mr;Si=1;let e=Ve(),t=an(),s=on();class o extends t{checkMissedSemicolon(){}comment(a){let c=new e;this.init(c,a[2]);let d=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);c.source.end={column:d.col,line:d.line,offset:a[3]+1};let m=a[1].slice(2);if(m.slice(-2)==="*/"&&(m=m.slice(0,-2)),/^\s*$/.test(m))c.text="",c.raws.left=m,c.raws.right="";else{let h=m.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(c=>c[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let c=this.colon(a);if(c===!1)return;let d,m;for(d=c-1;d>=0&&a[d][0]!=="word";d--);if(d===0||d<0)return;for(m=d-1;m>=0;m--)if(a[m][0]!=="space"){m+=1;break}let h=a.slice(d),r=a.slice(m,d);a.splice(m,a.length-m),this.spaces=r.map(u=>u[1]).join(""),this.decl(h)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(c=>c[1]).join("")}unnamedAtrule(a){a.name=""}}return Mr=o,Mr}var Er,vi;function ra(){if(vi)return Er;vi=1;let{Input:e}=hn(),t=ta();return Er=function(o,i){let a=new e(o,i),c=new t(a);return c.parse(),c.root},Er}ra();var sa=hn();const j=Vo(sa);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;class es{constructor(...t){ue(this,"parentElement",null),ue(this,"parentNode",null),ue(this,"ownerDocument"),ue(this,"firstChild",null),ue(this,"lastChild",null),ue(this,"previousSibling",null),ue(this,"nextSibling",null),ue(this,"ELEMENT_NODE",1),ue(this,"TEXT_NODE",3),ue(this,"nodeType"),ue(this,"nodeName"),ue(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof es){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Ci={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},xi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tt={};function ia(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function ts(e){if(tt[e])return tt[e];const t=ia(e)||globalThis[e],s=t.prototype,o=e in Ci?Ci[e]:void 0,i=!!(o&&o.every(d=>{var m,h;return!!((h=(m=Object.getOwnPropertyDescriptor(s,d))==null?void 0:m.get)!=null&&h.toString().includes("[native code]"))})),a=e in xi?xi[e]:void 0,c=!!(a&&a.every(d=>{var m;return typeof s[d]=="function"&&((m=s[d])==null?void 0:m.toString().includes("[native code]"))}));if(i&&c)return tt[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");document.body.appendChild(d);const m=d.contentWindow;if(!m)return t.prototype;const h=m[e].prototype;return document.body.removeChild(d),h?tt[e]=h:s}catch(d){return s}}const Ar={};function Ce(e,t,s){var o;const i=`${e}.${String(s)}`;if(Ar[i])return Ar[i].call(t);const a=ts(e),c=(o=Object.getOwnPropertyDescriptor(a,s))==null?void 0:o.get;return c?(Ar[i]=c,c.call(t)):t[s]}const Pr={};function fn(e,t,s){const o=`${e}.${String(s)}`;if(Pr[o])return Pr[o].bind(t);const a=ts(e)[s];return typeof a!="function"?t[s]:(Pr[o]=a,a.bind(t))}function na(e){return Ce("Node",e,"childNodes")}function oa(e){return Ce("Node",e,"parentNode")}function aa(e){return Ce("Node",e,"parentElement")}function la(e){return Ce("Node",e,"textContent")}function ua(e,t){return fn("Node",e,"contains")(t)}function ca(e){return fn("Node",e,"getRootNode")()}function ha(e){return!e||!("host"in e)?null:Ce("ShadowRoot",e,"host")}function fa(e){return e.styleSheets}function pa(e){return!e||!("shadowRoot"in e)?null:Ce("Element",e,"shadowRoot")}function da(e,t){return Ce("Element",e,"querySelector")(t)}function ma(e,t){return Ce("Element",e,"querySelectorAll")(t)}function pn(){return ts("MutationObserver").constructor}function Ee(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const k={childNodes:na,parentNode:oa,parentElement:aa,textContent:la,contains:ua,getRootNode:ca,host:ha,styleSheets:fa,shadowRoot:pa,querySelector:da,querySelectorAll:ma,mutationObserver:pn,patch:Ee};function se(e,t,s=document){const o={capture:!0,passive:!0};return s.addEventListener(e,t,o),()=>s.removeEventListener(e,t,o)}const ke=`Please stop import mirror directly. Instead of that,\r
57
57
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
58
- or you can use record.mirror to access the mirror instance during recording.`;let Ri={map:{},getId(){return console.error(ke),-1},getNode(){return console.error(ke),null},removeNodeFromMap(){console.error(ke)},has(){return console.error(ke),!1},reset(){console.error(ke)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Ri=new Proxy(Ri,{get(e,t,s){return t==="map"&&console.error(ke),Reflect.get(e,t,s)}}));function qe(e,t,s={}){let o=null,i=0;return function(...a){const c=Date.now();!i&&s.leading===!1&&(i=c);const d=t-(c-i),m=this;d<=0||d>t?(o&&(clearTimeout(o),o=null),i=c,e.apply(m,a)):!o&&s.trailing!==!1&&(o=setTimeout(()=>{i=s.leading===!1?0:Date.now(),o=null,e.apply(m,a)},d))}}function vt(e,t,s,o,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?s:{set(c){setTimeout(()=>{s.set.call(this,c)},0),a&&a.set&&a.set.call(this,c)}}),()=>vt(e,t,a||{},!0)}let ct=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ct=()=>new Date().getTime());function dn(e){var t,s,o,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=k.parentElement(a.body))==null?void 0:t.scrollLeft)||((s=a==null?void 0:a.body)==null?void 0:s.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((o=k.parentElement(a.body))==null?void 0:o.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function mn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function gn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function yn(e){return e?e.nodeType===e.ELEMENT_NODE?e:k.parentElement(e):null}function ie(e,t,s,o){if(!e)return!1;const i=yn(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(ut(i,t,o))return!0}catch(a){}return!!(s&&(i.matches(s)||o&&i.closest(s)!==null))}function ga(e,t){return t.getId(e)!==-1}function Nr(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===ze}function wn(e,t){if($e(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const o=k.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?wn(o,t):!0}function kr(e){return!!e.changedTouches}function ya(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function bn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Sn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Lr(e){return e?e instanceof es&&"shadowRoot"in e?!!e.shadowRoot:!!k.shadowRoot(e):!1}class wa{constructor(){P(this,"id",1),P(this,"styleIDMap",new WeakMap),P(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let o;return s===void 0?o=this.id++:o=s,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function vn(e){var t;let s=null;return"getRootNode"in e&&((t=k.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(e))&&(s=k.host(k.getRootNode(e))),s}function ba(e){let t=e,s;for(;s=vn(t);)t=s;return t}function Sa(e){const t=e.ownerDocument;if(!t)return!1;const s=ba(e);return k.contains(t,s)}function Cn(e){const t=e.ownerDocument;return t?k.contains(t,e)||Sa(e):!1}var B=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(B||{}),D=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(D||{}),ne=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ne||{}),ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ye||{}),Be=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Be||{}),Le=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Le||{}),xn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(xn||{});function Oi(e){return"__ln"in e}class va{constructor(){P(this,"length",0),P(this,"head",null),P(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let o=0;o<t;o++)s=(s==null?void 0:s.next)||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&Oi(t.previousSibling)){const o=t.previousSibling.__ln.next;s.next=o,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,o&&(o.previous=s)}else if(t.nextSibling&&Oi(t.nextSibling)&&t.nextSibling.__ln.previous){const o=t.nextSibling.__ln.previous;s.previous=o,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,o&&(o.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Ii=(e,t)=>`${e}@${t}`;class Ca{constructor(){P(this,"frozen",!1),P(this,"locked",!1),P(this,"texts",[]),P(this,"attributes",[]),P(this,"attributeMap",new WeakMap),P(this,"removes",[]),P(this,"mapRemoves",[]),P(this,"movedMap",{}),P(this,"addedSet",new Set),P(this,"movedSet",new Set),P(this,"droppedSet",new Set),P(this,"removesSubTreeCache",new Set),P(this,"mutationCb"),P(this,"blockClass"),P(this,"blockSelector"),P(this,"maskTextClass"),P(this,"maskTextSelector"),P(this,"inlineStylesheet"),P(this,"maskInputOptions"),P(this,"maskTextFn"),P(this,"maskInputFn"),P(this,"keepIframeSrcFn"),P(this,"recordCanvas"),P(this,"inlineImages"),P(this,"slimDOMOptions"),P(this,"dataURLOptions"),P(this,"doc"),P(this,"mirror"),P(this,"iframeManager"),P(this,"stylesheetManager"),P(this,"shadowDomManager"),P(this,"canvasManager"),P(this,"processedNodeManager"),P(this,"unattachedDoc"),P(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),P(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,o=new va,i=m=>{let h=m,r=ze;for(;r===ze;)h=h&&h.nextSibling,r=h&&this.mirror.getId(h);return r},a=m=>{const h=k.parentNode(m);if(!h||!Cn(m)||h.tagName==="TEXTAREA")return;const r=$e(h)?this.mirror.getId(vn(m)):this.mirror.getId(h),u=i(m);if(r===-1||u===-1)return o.addNode(m);const l=Te(m,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:n=>{bn(n,this.mirror)&&this.iframeManager.addIframe(n),Sn(n,this.mirror)&&this.stylesheetManager.trackLinkElement(n),Lr(m)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(m),this.doc)},onIframeLoad:(n,p)=>{this.iframeManager.attachIframe(n,p),this.shadowDomManager.observeAttachShadow(n)},onStylesheetLoad:(n,p)=>{this.stylesheetManager.attachLinkElement(n,p)}});l&&(t.push({parentId:r,nextId:u,node:l}),s.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)Mi(this.removesSubTreeCache,m,this.mirror)&&!this.movedSet.has(k.parentNode(m))||a(m);for(const m of this.addedSet)!Ei(this.droppedSet,m)&&!Mi(this.removesSubTreeCache,m,this.mirror)||Ei(this.movedSet,m)?a(m):this.droppedSet.add(m);let c=null;for(;o.length;){let m=null;if(c){const h=this.mirror.getId(k.parentNode(c.value)),r=i(c.value);h!==-1&&r!==-1&&(m=c)}if(!m){let h=o.tail;for(;h;){const r=h;if(h=h.previous,r){const u=this.mirror.getId(k.parentNode(r.value));if(i(r.value)===-1)continue;if(u!==-1){m=r;break}else{const n=r.value,p=k.parentNode(n);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=k.host(p);if(this.mirror.getId(f)!==-1){m=r;break}}}}}}if(!m){for(;o.head;)o.removeNode(o.head.value);break}c=m.previous,o.removeNode(m.value),a(m.value)}const d={texts:this.texts.map(m=>{const h=m.node,r=k.parentNode(h);return r&&r.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(h),value:m.value}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:h}=m;if(typeof h.style=="string"){const r=JSON.stringify(m.styleDiff),u=JSON.stringify(m._unchangedStyles);r.length<h.style.length&&(r+u).split("var(").length===h.style.split("var(").length&&(h.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:h}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(d))}),P(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s)),s.attributes.value=Array.from(k.childNodes(t),o=>k.textContent(o)||"").join("")}),P(this,"processMutation",t=>{if(!Nr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=k.textContent(t.target);!ie(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:ji(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,yn(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){const c=Br(s);i=Fr({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:c,value:i,maskInputFn:this.maskInputFn})}if(ie(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!s.contentDocument)o="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),o==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!qi(s.tagName,o))if(a.attributes[o]=zi(this.doc,Oe(s.tagName),Oe(o),i,s,this.dataURLOptions),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(d){this.unattachedDoc=this.doc}const c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(const d of Array.from(s.style)){const m=s.style.getPropertyValue(d),h=s.style.getPropertyPriority(d);m!==c.style.getPropertyValue(d)||h!==c.style.getPropertyPriority(d)?h===""?a.styleDiff[d]=m:a.styleDiff[d]=[m,h]:a._unchangedStyles[d]=[m,h]}for(const d of Array.from(c.style))s.style.getPropertyValue(d)===""&&(a.styleDiff[d]=!1)}else o==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ie(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const o=this.mirror.getId(s),i=$e(t.target)?this.mirror.getId(k.host(t.target)):this.mirror.getId(t.target);ie(t.target,this.blockClass,this.blockSelector,!1)||Nr(s,this.mirror,this.slimDOMOptions)||!ga(s,this.mirror)||(this.addedSet.has(s)?(Dr(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&o===-1||wn(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[Ii(o,i)]?Dr(this.movedSet,s):(this.removes.push({parentId:i,id:o,isShadow:$e(t.target)&&Ue(t.target)?!0:void 0}),xa(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),P(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Nr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;s&&this.mirror.hasNode(s)&&(o=this.mirror.getId(s)),o&&o!==-1&&(this.movedMap[Ii(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ie(t,this.blockClass,this.blockSelector,!1)||(k.childNodes(t).forEach(o=>this.genAdds(o)),Lr(t)&&k.childNodes(k.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Dr(e,t){e.delete(t),k.childNodes(t).forEach(s=>Dr(e,s))}function xa(e,t){const s=[e];for(;s.length;){const o=s.pop();t.has(o)||(t.add(o),k.childNodes(o).forEach(i=>s.push(i)))}}function Mi(e,t,s){return e.size===0?!1:Ra(e,t)}function Ra(e,t,s){const o=k.parentNode(t);return o?e.has(o):!1}function Ei(e,t){return e.size===0?!1:Rn(e,t)}function Rn(e,t){const s=k.parentNode(t);return s?e.has(s)?!0:Rn(e,s):!1}let We;function Oa(e){We=e}function Ia(){We=void 0}const F=e=>We?(...s)=>{try{return e(...s)}catch(o){if(We&&We(o)===!0)return;throw o}}:e,we=[];function Je(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function On(e,t){const s=new Ca;we.push(s),s.init(e);const o=new(pn())(F(s.processMutations.bind(s)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ma({mousemoveCb:e,sampling:t,doc:s,mirror:o}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],d;const m=qe(F(u=>{const l=Date.now()-d;e(c.map(n=>(n.timeOffset-=l,n)),u),c=[],d=null}),a),h=F(qe(F(u=>{const l=Je(u),{clientX:n,clientY:p}=kr(u)?u.changedTouches[0]:u;d||(d=ct()),c.push({x:n,y:p,id:o.getId(l),timeOffset:ct()-d}),m(typeof DragEvent!="undefined"&&u instanceof DragEvent?D.Drag:u instanceof MouseEvent?D.MouseMove:D.TouchMove)}),i,{trailing:!1})),r=[se("mousemove",h,s),se("touchmove",h,s),se("drag",h,s)];return F(()=>{r.forEach(u=>u())})}function Ea({mouseInteractionCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const c=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,d=[];let m=null;const h=r=>u=>{const l=Je(u);if(ie(l,o,i,!0))return;let n=null,p=r;if("pointerType"in u){switch(u.pointerType){case"mouse":n=ye.Mouse;break;case"touch":n=ye.Touch;break;case"pen":n=ye.Pen;break}n===ye.Touch?ne[r]===ne.MouseDown?p="TouchStart":ne[r]===ne.MouseUp&&(p="TouchEnd"):ye.Pen}else kr(u)&&(n=ye.Touch);n!==null?(m=n,(p.startsWith("Touch")&&n===ye.Touch||p.startsWith("Mouse")&&n===ye.Mouse)&&(n=null)):ne[r]===ne.Click&&(n=m,m=null);const f=kr(u)?u.changedTouches[0]:u;if(!f)return;const g=s.getId(l),{clientX:S,clientY:w}=f;F(e)(L({type:ne[p],id:g,x:S,y:w},n!==null&&{pointerType:n}))};return Object.keys(ne).filter(r=>Number.isNaN(Number(r))&&!r.endsWith("_Departed")&&c[r]!==!1).forEach(r=>{let u=Oe(r);const l=h(r);if(window.PointerEvent)switch(ne[r]){case ne.MouseDown:case ne.MouseUp:u=u.replace("mouse","pointer");break;case ne.TouchStart:case ne.TouchEnd:return}d.push(se(u,l,t))}),F(()=>{d.forEach(r=>r())})}function In({scrollCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:a}){const c=F(qe(F(d=>{const m=Je(d);if(!m||ie(m,o,i,!0))return;const h=s.getId(m);if(m===t&&t.defaultView){const r=dn(t.defaultView);e({id:h,x:r.left,y:r.top})}else e({id:h,x:m.scrollLeft,y:m.scrollTop})}),a.scroll||100));return se("scroll",c,t)}function Aa({viewportResizeCb:e},{win:t}){let s=-1,o=-1;const i=F(qe(F(()=>{const a=mn(),c=gn();(s!==a||o!==c)&&(e({width:Number(c),height:Number(a)}),s=a,o=c)}),200));return se("resize",i,t)}const Pa=["INPUT","TEXTAREA","SELECT"],Ai=new WeakMap;function Na({inputCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,ignoreClass:a,ignoreSelector:c,maskInputOptions:d,maskInputFn:m,sampling:h,userTriggeredOnInput:r}){function u(w){let v=Je(w);const x=w.isTrusted,y=v&&v.tagName;if(v&&y==="OPTION"&&(v=k.parentElement(v)),!v||!y||Pa.indexOf(y)<0||ie(v,o,i,!0)||v.classList.contains(a)||c&&v.matches(c))return;let b=v.value,C=!1;const R=Br(v)||"";R==="radio"||R==="checkbox"?C=v.checked:(d[y.toLowerCase()]||d[R])&&(b=Fr({element:v,maskInputOptions:d,tagName:y,type:R,value:b,maskInputFn:m})),l(v,r?{text:b,isChecked:C,userTriggered:x}:{text:b,isChecked:C});const M=v.name;R==="radio"&&M&&C&&t.querySelectorAll(`input[type="radio"][name="${M}"]`).forEach(O=>{if(O!==v){const N=O.value;l(O,r?{text:N,isChecked:!C,userTriggered:!1}:{text:N,isChecked:!C})}})}function l(w,v){const x=Ai.get(w);if(!x||x.text!==v.text||x.isChecked!==v.isChecked){Ai.set(w,v);const y=s.getId(w);F(e)(le(L({},v),{id:y}))}}const p=(h.input==="last"?["change"]:["input","change"]).map(w=>se(w,F(u),t)),f=t.defaultView;if(!f)return()=>{p.forEach(w=>w())};const g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),S=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(w=>vt(w[0],w[1],{set(){F(u)({target:this,isTrusted:!1})}},!1,f))),F(()=>{p.forEach(w=>w())})}function ht(e){const t=[];function s(o,i){if(rt("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||rt("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||rt("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||rt("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){const c=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(c)}else if(o.parentStyleSheet){const c=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(c)}return i}return s(e,t)}function Se(e,t,s){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=s.getId(e),{styleId:i,id:o}):{}}function _a({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};const i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((r,u,l)=>{const[n,p]=l,{id:f,styleId:g}=Se(u,t,s.styleMirror);return(f&&f!==-1||g&&g!==-1)&&e({id:f,styleId:g,adds:[{rule:n,index:p}]}),r.apply(u,l)})}),o.CSSStyleSheet.prototype.addRule=function(r,u,l=this.cssRules.length){const n=`${r} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,l])};const a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:F((r,u,l)=>{const[n]=l,{id:p,styleId:f}=Se(u,t,s.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,removes:[{index:n}]}),r.apply(u,l)})}),o.CSSStyleSheet.prototype.removeRule=function(r){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[r])};let c;o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:F((r,u,l)=>{const[n]=l,{id:p,styleId:f}=Se(u,t,s.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,replace:n}),r.apply(u,l)})}));let d;o.CSSStyleSheet.prototype.replaceSync&&(d=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:F((r,u,l)=>{const[n]=l,{id:p,styleId:f}=Se(u,t,s.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,replaceSync:n}),r.apply(u,l)})}));const m={};st("CSSGroupingRule")?m.CSSGroupingRule=o.CSSGroupingRule:(st("CSSMediaRule")&&(m.CSSMediaRule=o.CSSMediaRule),st("CSSConditionRule")&&(m.CSSConditionRule=o.CSSConditionRule),st("CSSSupportsRule")&&(m.CSSSupportsRule=o.CSSSupportsRule));const h={};return Object.entries(m).forEach(([r,u])=>{h[r]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(h[r].insertRule,{apply:F((l,n,p)=>{const[f,g]=p,{id:S,styleId:w}=Se(n.parentStyleSheet,t,s.styleMirror);return(S&&S!==-1||w&&w!==-1)&&e({id:S,styleId:w,adds:[{rule:f,index:[...ht(n),g||0]}]}),l.apply(n,p)})}),u.prototype.deleteRule=new Proxy(h[r].deleteRule,{apply:F((l,n,p)=>{const[f]=p,{id:g,styleId:S}=Se(n.parentStyleSheet,t,s.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...ht(n),f]}]}),l.apply(n,p)})})}),F(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,c&&(o.CSSStyleSheet.prototype.replace=c),d&&(o.CSSStyleSheet.prototype.replaceSync=d),Object.entries(m).forEach(([r,u])=>{u.prototype.insertRule=h[r].insertRule,u.prototype.deleteRule=h[r].deleteRule})})}function Mn({mirror:e,stylesheetManager:t},s){var o,i,a;let c=null;s.nodeName==="#document"?c=e.getId(s):c=e.getId(k.host(s));const d=s.nodeName==="#document"?(o=s.defaultView)==null?void 0:o.Document:(a=(i=s.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,m=d!=null&&d.prototype?Object.getOwnPropertyDescriptor(d==null?void 0:d.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!d||!m?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get(){var h;return(h=m.get)==null?void 0:h.call(this)},set(h){var r;const u=(r=m.set)==null?void 0:r.call(this,h);if(c!==null&&c!==-1)try{t.adoptStyleSheets(h,c)}catch(l){}return u}}),F(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get:m.get,set:m.set})}))}function ka({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:o},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:F((d,m,h)=>{var r;const[u,l,n]=h;if(s.has(u))return a.apply(m,[u,l,n]);const{id:p,styleId:f}=Se((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,set:{property:u,value:l,priority:n},index:ht(m.parentRule)}),d.apply(m,h)})});const c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:F((d,m,h)=>{var r;const[u]=h;if(s.has(u))return c.apply(m,[u]);const{id:l,styleId:n}=Se((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(l&&l!==-1||n&&n!==-1)&&e({id:l,styleId:n,remove:{property:u},index:ht(m.parentRule)}),d.apply(m,h)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=c})}function La({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:o,sampling:i,doc:a}){const c=F(m=>qe(F(h=>{const r=Je(h);if(!r||ie(r,t,s,!0))return;const{currentTime:u,volume:l,muted:n,playbackRate:p,loop:f}=r;e({type:m,id:o.getId(r),currentTime:u,volume:l,muted:n,playbackRate:p,loop:f})}),i.media||500)),d=[se("play",c(Le.Play),a),se("pause",c(Le.Pause),a),se("seeked",c(Le.Seeked),a),se("volumechange",c(Le.VolumeChange),a),se("ratechange",c(Le.RateChange),a)];return F(()=>{d.forEach(m=>m())})}function Da({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const o=[],i=new WeakMap,a=s.FontFace;s.FontFace=function(m,h,r){const u=new a(m,h,r);return i.set(u,{family:m,buffer:typeof h!="string",descriptors:r,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),u};const c=Ee(t.fonts,"add",function(d){return function(m){return setTimeout(F(()=>{const h=i.get(m);h&&(e(h),i.delete(m))}),0),d.apply(this,[m])}});return o.push(()=>{s.FontFace=a}),o.push(c),F(()=>{o.forEach(d=>d())})}function Ta(e){const{doc:t,mirror:s,blockClass:o,blockSelector:i,selectionCb:a}=e;let c=!0;const d=F(()=>{const m=t.getSelection();if(!m||c&&(m!=null&&m.isCollapsed))return;c=m.isCollapsed||!1;const h=[],r=m.rangeCount||0;for(let u=0;u<r;u++){const l=m.getRangeAt(u),{startContainer:n,startOffset:p,endContainer:f,endOffset:g}=l;ie(n,o,i,!0)||ie(f,o,i,!0)||h.push({start:s.getId(n),startOffset:p,end:s.getId(f),endOffset:g})}a({ranges:h})});return d(),se("selectionchange",d)}function Fa({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:Ee(s.customElements,"define",function(i){return function(a,c,d){try{t({define:{name:a}})}catch(m){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,c,d])}})}function Ba(e,t){const{mutationCb:s,mousemoveCb:o,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:c,inputCb:d,mediaInteractionCb:m,styleSheetRuleCb:h,styleDeclarationCb:r,canvasMutationCb:u,fontCb:l,selectionCb:n,customElementCb:p}=e;e.mutationCb=(...f)=>{t.mutation&&t.mutation(...f),s(...f)},e.mousemoveCb=(...f)=>{t.mousemove&&t.mousemove(...f),o(...f)},e.mouseInteractionCb=(...f)=>{t.mouseInteraction&&t.mouseInteraction(...f),i(...f)},e.scrollCb=(...f)=>{t.scroll&&t.scroll(...f),a(...f)},e.viewportResizeCb=(...f)=>{t.viewportResize&&t.viewportResize(...f),c(...f)},e.inputCb=(...f)=>{t.input&&t.input(...f),d(...f)},e.mediaInteractionCb=(...f)=>{t.mediaInteaction&&t.mediaInteaction(...f),m(...f)},e.styleSheetRuleCb=(...f)=>{t.styleSheetRule&&t.styleSheetRule(...f),h(...f)},e.styleDeclarationCb=(...f)=>{t.styleDeclaration&&t.styleDeclaration(...f),r(...f)},e.canvasMutationCb=(...f)=>{t.canvasMutation&&t.canvasMutation(...f),u(...f)},e.fontCb=(...f)=>{t.font&&t.font(...f),l(...f)},e.selectionCb=(...f)=>{t.selection&&t.selection(...f),n(...f)},e.customElementCb=(...f)=>{t.customElement&&t.customElement(...f),p(...f)}}function $a(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};Ba(e,t);let o;e.recordDOM&&(o=On(e,e.doc));const i=Ma(e),a=Ea(e),c=In(e),d=Aa(e,{win:s}),m=Na(e),h=La(e);let r=()=>{},u=()=>{},l=()=>{},n=()=>{};e.recordDOM&&(r=_a(e,{win:s}),u=Mn(e,e.doc),l=ka(e,{win:s}),e.collectFonts&&(n=Da(e)));const p=Ta(e),f=Fa(e),g=[];for(const S of e.plugins)g.push(S.observer(S.callback,s,S.options));return F(()=>{we.forEach(S=>S.destroy()),we.forEach(S=>S.reset()),o==null||o.disconnect(),i(),a(),c(),d(),m(),h(),r(),u(),l(),n(),p(),f(),g.forEach(S=>S()),we.length=0})}function rt(e){return typeof window[e]!="undefined"}function st(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Pi{constructor(t){P(this,"iframeIdToRemoteIdMap",new WeakMap),P(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,o,i){const a=o||this.getIdToRemoteIdMap(t),c=i||this.getRemoteIdToIdMap(t);let d=a.get(s);return d||(d=this.generateIdFn(),a.set(s,d),c.set(d,s)),d}getIds(t,s){const o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return s.map(a=>this.getId(t,a,o,i))}getRemoteId(t,s,o){const i=o||this.getRemoteIdToIdMap(t);if(typeof s!="number")return s;const a=i.get(s);return a||-1}getRemoteIds(t,s){const o=this.getRemoteIdToIdMap(t);return s.map(i=>this.getRemoteId(t,i,o))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class Ua{constructor(t){P(this,"iframes",new WeakMap),P(this,"crossOriginIframeMap",new WeakMap),P(this,"crossOriginIframeMirror",new Pi(Wi)),P(this,"crossOriginIframeStyleMirror"),P(this,"crossOriginIframeRootIdMap",new WeakMap),P(this,"mirror"),P(this,"mutationCb"),P(this,"wrappedEmit"),P(this,"loadListener"),P(this,"stylesheetManager"),P(this,"recordCrossOriginIframes"),P(this,"messageHandler"),P(this,"nestedIframeListeners",new Map),P(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,s){const o=this.mirror.getId(t);return this.attachedIframes.set(o,{element:t,content:s}),o}attachIframe(t,s){var o;const i=this.trackIframeContent(t,s);this.mutationCb({adds:[{parentId:i,nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const a=t.contentWindow;if(this.recordCrossOriginIframes&&a&&!this.nestedIframeListeners.has(a)){const c=this.handleMessage.bind(this);this.nestedIframeListeners.set(a,c),a.addEventListener("message",c)}(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const a=this.transformCrossOriginEvent(i,s.data.event);a&&this.wrappedEmit(a,s.data.isCheckout)}transformCrossOriginEvent(t,s){var o;switch(s.type){case B.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const i=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(s.data.node,i),this.trackIframeContent(t,s.data.node),{timestamp:s.timestamp,type:B.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case B.Meta:case B.Load:case B.DomContentLoaded:return!1;case B.Plugin:return s;case B.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case B.IncrementalSnapshot:switch(s.data.source){case D.Mutation:return s.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),s.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),s.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),s.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.Drag:case D.TouchMove:case D.MouseMove:return s.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(s.data,t,["id"]),s;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case D.Font:return s;case D.Selection:return s.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),s;case D.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(o=s.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),s}}return!1}replace(t,s,o,i){for(const a of i)!Array.isArray(s[a])&&typeof s[a]!="number"||(Array.isArray(s[a])?s[a]=t.getIds(o,s[a]):s[a]=t.getId(o,s[a]));return s}replaceIds(t,s,o){return this.replace(this.crossOriginIframeMirror,t,s,o)}replaceStyleIds(t,s,o){return this.replace(this.crossOriginIframeStyleMirror,t,s,o)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,s)})}patchRootIdOnNode(t,s){t.type!==xn.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,s)})}removeIframeById(t){const s=this.attachedIframes.get(t);if(!s)return;const o=s.element.contentWindow;if(o&&this.nestedIframeListeners.has(o)){const i=this.nestedIframeListeners.get(o);o.removeEventListener("message",i),this.nestedIframeListeners.delete(o)}this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(({content:t},s)=>{if(!this.mirror.has(s)){this.attachedIframes.delete(s);return}this.mutationCb({adds:[{parentId:s,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0})})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,s)=>{s.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Wa{constructor(t){P(this,"shadowDoms",new WeakSet),P(this,"mutationCb"),P(this,"scrollCb"),P(this,"bypassOptions"),P(this,"mirror"),P(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!Ue(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const o=On(le(L({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(In(le(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(k.host(t))),this.restoreHandlers.push(Mn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const o=this;this.restoreHandlers.push(Ee(t.prototype,"attachShadow",function(i){return function(a){const c=i.call(this,a),d=k.shadowRoot(this);return d&&Cn(this)&&o.addShadowRoot(d,s),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(s){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var it=0;it<Fe.length;it++)za[Fe.charCodeAt(it)]=it;var qa=function(e){var t=new Uint8Array(e),s,o=t.length,i="";for(s=0;s<o;s+=3)i+=Fe[t[s]>>2],i+=Fe[(t[s]&3)<<4|t[s+1]>>4],i+=Fe[(t[s+1]&15)<<2|t[s+2]>>6],i+=Fe[t[s+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Ni=new Map;function ja(e,t){let s=Ni.get(e);return s||(s=new Map,Ni.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const En=(e,t,s)=>{if(!e||!(Pn(e,t)||typeof e=="object"))return;const o=e.constructor.name,i=ja(s,o);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function nt(e,t,s,o){if(e instanceof Array)return e.map(i=>nt(i,t,s,o));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,a=qa(e);return{rr_type:i,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[nt(e.buffer,t,s,o),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:a}=e;return{rr_type:i,src:a}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",a=e.toDataURL(o.type,o.quality);return{rr_type:i,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[nt(e.data,t,s,o),e.width,e.height]};if(Pn(e,t)||typeof e=="object"){const i=e.constructor.name,a=En(e,t,s);return{rr_type:i,index:a}}}}return e}const An=(e,t,s,o)=>e.map(i=>nt(i,t,s,o)),Pn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Ha(e,t,s,o,i){const a=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const d of c)try{if(typeof t.CanvasRenderingContext2D.prototype[d]!="function")continue;const m=Ee(t.CanvasRenderingContext2D.prototype,d,function(h){return function(...r){return ie(this.canvas,s,o,!0)||setTimeout(()=>{const u=An(r,t,this,i);e(this.canvas,{type:Be["2D"],property:d,args:u})},0),h.apply(this,r)}});a.push(m)}catch(m){const h=vt(t.CanvasRenderingContext2D.prototype,d,{set(r){e(this.canvas,{type:Be["2D"],property:d,args:[r],setter:!0})}});a.push(h)}return()=>{a.forEach(d=>d())}}function Va(e){return e==="experimental-webgl"?"webgl":e}function _i(e,t,s,o){const i=[];try{const a=Ee(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(d,...m){if(!ie(this,t,s,!0)){const h=Va(d);if("__context"in this||(this.__context=h),o&&["webgl","webgl2"].includes(h))if(m[0]&&typeof m[0]=="object"){const r=m[0];r.preserveDrawingBuffer||(r.preserveDrawingBuffer=!0)}else m.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[d,...m])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function ki(e,t,s,o,i,a,c){const d=[],m=Object.getOwnPropertyNames(e);for(const h of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;const r=Ee(e,h,function(u){return function(...l){const n=u.apply(this,l);if(En(n,a,this),"tagName"in this.canvas&&!ie(this.canvas,o,i,!0)){const p=An(l,a,this,c),f={type:t,property:h,args:p};s(this.canvas,f)}return n}});d.push(r)}catch(r){const u=vt(e,h,{set(l){s(this.canvas,{type:t,property:h,args:[l],setter:!0})}});d.push(u)}return d}function Ga(e,t,s,o,i){const a=[];return a.push(...ki(t.WebGLRenderingContext.prototype,Be.WebGL,e,s,o,t,i)),typeof t.WebGL2RenderingContext!="undefined"&&a.push(...ki(t.WebGL2RenderingContext.prototype,Be.WebGL2,e,s,o,t,i)),()=>{a.forEach(c=>c())}}const Nn=`(function() {
58
+ or you can use record.mirror to access the mirror instance during recording.`;let Ri={map:{},getId(){return console.error(ke),-1},getNode(){return console.error(ke),null},removeNodeFromMap(){console.error(ke)},has(){return console.error(ke),!1},reset(){console.error(ke)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Ri=new Proxy(Ri,{get(e,t,s){return t==="map"&&console.error(ke),Reflect.get(e,t,s)}}));function qe(e,t,s={}){let o=null,i=0;return function(...a){const c=Date.now();!i&&s.leading===!1&&(i=c);const d=t-(c-i),m=this;d<=0||d>t?(o&&(clearTimeout(o),o=null),i=c,e.apply(m,a)):!o&&s.trailing!==!1&&(o=setTimeout(()=>{i=s.leading===!1?0:Date.now(),o=null,e.apply(m,a)},d))}}function vt(e,t,s,o,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?s:{set(c){setTimeout(()=>{s.set.call(this,c)},0),a&&a.set&&a.set.call(this,c)}}),()=>vt(e,t,a||{},!0)}let ct=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ct=()=>new Date().getTime());function dn(e){var t,s,o,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=k.parentElement(a.body))==null?void 0:t.scrollLeft)||((s=a==null?void 0:a.body)==null?void 0:s.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((o=k.parentElement(a.body))==null?void 0:o.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function mn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function gn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function yn(e){return e?e.nodeType===e.ELEMENT_NODE?e:k.parentElement(e):null}function ie(e,t,s,o){if(!e)return!1;const i=yn(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(ut(i,t,o))return!0}catch(a){}return!!(s&&(i.matches(s)||o&&i.closest(s)!==null))}function ga(e,t){return t.getId(e)!==-1}function Nr(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===ze}function wn(e,t){if($e(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const o=k.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?wn(o,t):!0}function kr(e){return!!e.changedTouches}function ya(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function bn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Sn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Lr(e){return e?e instanceof es&&"shadowRoot"in e?!!e.shadowRoot:!!k.shadowRoot(e):!1}class wa{constructor(){P(this,"id",1),P(this,"styleIDMap",new WeakMap),P(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let o;return s===void 0?o=this.id++:o=s,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function vn(e){var t;let s=null;return"getRootNode"in e&&((t=k.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(e))&&(s=k.host(k.getRootNode(e))),s}function ba(e){let t=e,s;for(;s=vn(t);)t=s;return t}function Sa(e){const t=e.ownerDocument;if(!t)return!1;const s=ba(e);return k.contains(t,s)}function Cn(e){const t=e.ownerDocument;return t?k.contains(t,e)||Sa(e):!1}var B=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(B||{}),D=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(D||{}),ne=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ne||{}),ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ye||{}),Be=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Be||{}),Le=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Le||{}),xn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(xn||{});function Oi(e){return"__ln"in e}class va{constructor(){P(this,"length",0),P(this,"head",null),P(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let o=0;o<t;o++)s=(s==null?void 0:s.next)||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&Oi(t.previousSibling)){const o=t.previousSibling.__ln.next;s.next=o,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,o&&(o.previous=s)}else if(t.nextSibling&&Oi(t.nextSibling)&&t.nextSibling.__ln.previous){const o=t.nextSibling.__ln.previous;s.previous=o,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,o&&(o.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Ii=(e,t)=>`${e}@${t}`;class Ca{constructor(){P(this,"frozen",!1),P(this,"locked",!1),P(this,"texts",[]),P(this,"attributes",[]),P(this,"attributeMap",new WeakMap),P(this,"removes",[]),P(this,"mapRemoves",[]),P(this,"movedMap",{}),P(this,"addedSet",new Set),P(this,"movedSet",new Set),P(this,"droppedSet",new Set),P(this,"removesSubTreeCache",new Set),P(this,"mutationCb"),P(this,"blockClass"),P(this,"blockSelector"),P(this,"maskTextClass"),P(this,"maskTextSelector"),P(this,"inlineStylesheet"),P(this,"maskInputOptions"),P(this,"maskTextFn"),P(this,"maskInputFn"),P(this,"keepIframeSrcFn"),P(this,"recordCanvas"),P(this,"inlineImages"),P(this,"slimDOMOptions"),P(this,"dataURLOptions"),P(this,"doc"),P(this,"mirror"),P(this,"iframeManager"),P(this,"stylesheetManager"),P(this,"shadowDomManager"),P(this,"canvasManager"),P(this,"processedNodeManager"),P(this,"unattachedDoc"),P(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),P(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,o=new va,i=m=>{let h=m,r=ze;for(;r===ze;)h=h&&h.nextSibling,r=h&&this.mirror.getId(h);return r},a=m=>{const h=k.parentNode(m);if(!h||!Cn(m)||h.tagName==="TEXTAREA")return;const r=$e(h)?this.mirror.getId(vn(m)):this.mirror.getId(h),u=i(m);if(r===-1||u===-1)return o.addNode(m);const l=Te(m,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:n=>{bn(n,this.mirror)&&this.iframeManager.addIframe(n),Sn(n,this.mirror)&&this.stylesheetManager.trackLinkElement(n),Lr(m)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(m),this.doc)},onIframeLoad:(n,p)=>{this.iframeManager.attachIframe(n,p),this.shadowDomManager.observeAttachShadow(n)},onStylesheetLoad:(n,p)=>{this.stylesheetManager.attachLinkElement(n,p)}});l&&(t.push({parentId:r,nextId:u,node:l}),s.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)Mi(this.removesSubTreeCache,m,this.mirror)&&!this.movedSet.has(k.parentNode(m))||a(m);for(const m of this.addedSet)!Ei(this.droppedSet,m)&&!Mi(this.removesSubTreeCache,m,this.mirror)||Ei(this.movedSet,m)?a(m):this.droppedSet.add(m);let c=null;for(;o.length;){let m=null;if(c){const h=this.mirror.getId(k.parentNode(c.value)),r=i(c.value);h!==-1&&r!==-1&&(m=c)}if(!m){let h=o.tail;for(;h;){const r=h;if(h=h.previous,r){const u=this.mirror.getId(k.parentNode(r.value));if(i(r.value)===-1)continue;if(u!==-1){m=r;break}else{const n=r.value,p=k.parentNode(n);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=k.host(p);if(this.mirror.getId(f)!==-1){m=r;break}}}}}}if(!m){for(;o.head;)o.removeNode(o.head.value);break}c=m.previous,o.removeNode(m.value),a(m.value)}const d={texts:this.texts.map(m=>{const h=m.node,r=k.parentNode(h);return r&&r.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(h),value:m.value}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:h}=m;if(typeof h.style=="string"){const r=JSON.stringify(m.styleDiff),u=JSON.stringify(m._unchangedStyles);r.length<h.style.length&&(r+u).split("var(").length===h.style.split("var(").length&&(h.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:h}}).filter(m=>!s.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(d))}),P(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s)),s.attributes.value=Array.from(k.childNodes(t),o=>k.textContent(o)||"").join("")}),P(this,"processMutation",t=>{if(!Nr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=k.textContent(t.target);!ie(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:ji(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,yn(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){const c=Br(s);i=Fr({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:c,value:i,maskInputFn:this.maskInputFn})}if(ie(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!s.contentDocument)o="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),o==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!qi(s.tagName,o))if(a.attributes[o]=zi(this.doc,Oe(s.tagName),Oe(o),i,s,this.dataURLOptions),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(d){this.unattachedDoc=this.doc}const c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(const d of Array.from(s.style)){const m=s.style.getPropertyValue(d),h=s.style.getPropertyPriority(d);m!==c.style.getPropertyValue(d)||h!==c.style.getPropertyPriority(d)?h===""?a.styleDiff[d]=m:a.styleDiff[d]=[m,h]:a._unchangedStyles[d]=[m,h]}for(const d of Array.from(c.style))s.style.getPropertyValue(d)===""&&(a.styleDiff[d]=!1)}else o==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ie(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const o=this.mirror.getId(s),i=$e(t.target)?this.mirror.getId(k.host(t.target)):this.mirror.getId(t.target);ie(t.target,this.blockClass,this.blockSelector,!1)||Nr(s,this.mirror,this.slimDOMOptions)||!ga(s,this.mirror)||(this.addedSet.has(s)?(Dr(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&o===-1||wn(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[Ii(o,i)]?Dr(this.movedSet,s):(this.removes.push({parentId:i,id:o,isShadow:$e(t.target)&&Ue(t.target)?!0:void 0}),xa(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),P(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Nr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;s&&this.mirror.hasNode(s)&&(o=this.mirror.getId(s)),o&&o!==-1&&(this.movedMap[Ii(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ie(t,this.blockClass,this.blockSelector,!1)||(k.childNodes(t).forEach(o=>this.genAdds(o)),Lr(t)&&k.childNodes(k.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Dr(e,t){e.delete(t),k.childNodes(t).forEach(s=>Dr(e,s))}function xa(e,t){const s=[e];for(;s.length;){const o=s.pop();t.has(o)||(t.add(o),k.childNodes(o).forEach(i=>s.push(i)))}}function Mi(e,t,s){return e.size===0?!1:Ra(e,t)}function Ra(e,t,s){const o=k.parentNode(t);return o?e.has(o):!1}function Ei(e,t){return e.size===0?!1:Rn(e,t)}function Rn(e,t){const s=k.parentNode(t);return s?e.has(s)?!0:Rn(e,s):!1}let We;function Oa(e){We=e}function Ia(){We=void 0}const F=e=>We?(...s)=>{try{return e(...s)}catch(o){if(We&&We(o)===!0)return;throw o}}:e,we=[];function Je(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function On(e,t){const s=new Ca;we.push(s),s.init(e);const o=new(pn())(F(s.processMutations.bind(s)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ma({mousemoveCb:e,sampling:t,doc:s,mirror:o}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],d;const m=qe(F(u=>{const l=Date.now()-d;e(c.map(n=>(n.timeOffset-=l,n)),u),c=[],d=null}),a),h=F(qe(F(u=>{const l=Je(u),{clientX:n,clientY:p}=kr(u)?u.changedTouches[0]:u;d||(d=ct()),c.push({x:n,y:p,id:o.getId(l),timeOffset:ct()-d}),m(typeof DragEvent!="undefined"&&u instanceof DragEvent?D.Drag:u instanceof MouseEvent?D.MouseMove:D.TouchMove)}),i,{trailing:!1})),r=[se("mousemove",h,s),se("touchmove",h,s),se("drag",h,s)];return F(()=>{r.forEach(u=>u())})}function Ea({mouseInteractionCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const c=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,d=[];let m=null;const h=r=>u=>{const l=Je(u);if(ie(l,o,i,!0))return;let n=null,p=r;if("pointerType"in u){switch(u.pointerType){case"mouse":n=ye.Mouse;break;case"touch":n=ye.Touch;break;case"pen":n=ye.Pen;break}n===ye.Touch?ne[r]===ne.MouseDown?p="TouchStart":ne[r]===ne.MouseUp&&(p="TouchEnd"):ye.Pen}else kr(u)&&(n=ye.Touch);n!==null?(m=n,(p.startsWith("Touch")&&n===ye.Touch||p.startsWith("Mouse")&&n===ye.Mouse)&&(n=null)):ne[r]===ne.Click&&(n=m,m=null);const f=kr(u)?u.changedTouches[0]:u;if(!f)return;const g=s.getId(l),{clientX:S,clientY:w}=f;F(e)(L({type:ne[p],id:g,x:S,y:w},n!==null&&{pointerType:n}))};return Object.keys(ne).filter(r=>Number.isNaN(Number(r))&&!r.endsWith("_Departed")&&c[r]!==!1).forEach(r=>{let u=Oe(r);const l=h(r);if(window.PointerEvent)switch(ne[r]){case ne.MouseDown:case ne.MouseUp:u=u.replace("mouse","pointer");break;case ne.TouchStart:case ne.TouchEnd:return}d.push(se(u,l,t))}),F(()=>{d.forEach(r=>r())})}function In({scrollCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:a}){const c=F(qe(F(d=>{const m=Je(d);if(!m||ie(m,o,i,!0))return;const h=s.getId(m);if(m===t&&t.defaultView){const r=dn(t.defaultView);e({id:h,x:r.left,y:r.top})}else e({id:h,x:m.scrollLeft,y:m.scrollTop})}),a.scroll||100));return se("scroll",c,t)}function Aa({viewportResizeCb:e},{win:t}){let s=-1,o=-1;const i=F(qe(F(()=>{const a=mn(),c=gn();(s!==a||o!==c)&&(e({width:Number(c),height:Number(a)}),s=a,o=c)}),200));return se("resize",i,t)}const Pa=["INPUT","TEXTAREA","SELECT"],Ai=new WeakMap;function Na({inputCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,ignoreClass:a,ignoreSelector:c,maskInputOptions:d,maskInputFn:m,sampling:h,userTriggeredOnInput:r}){function u(w){let v=Je(w);const x=w.isTrusted,y=v&&v.tagName;if(v&&y==="OPTION"&&(v=k.parentElement(v)),!v||!y||Pa.indexOf(y)<0||ie(v,o,i,!0)||v.classList.contains(a)||c&&v.matches(c))return;let b=v.value,C=!1;const R=Br(v)||"";R==="radio"||R==="checkbox"?C=v.checked:(d[y.toLowerCase()]||d[R])&&(b=Fr({element:v,maskInputOptions:d,tagName:y,type:R,value:b,maskInputFn:m})),l(v,r?{text:b,isChecked:C,userTriggered:x}:{text:b,isChecked:C});const M=v.name;R==="radio"&&M&&C&&t.querySelectorAll(`input[type="radio"][name="${M}"]`).forEach(O=>{if(O!==v){const N=O.value;l(O,r?{text:N,isChecked:!C,userTriggered:!1}:{text:N,isChecked:!C})}})}function l(w,v){const x=Ai.get(w);if(!x||x.text!==v.text||x.isChecked!==v.isChecked){Ai.set(w,v);const y=s.getId(w);F(e)(le(L({},v),{id:y}))}}const p=(h.input==="last"?["change"]:["input","change"]).map(w=>se(w,F(u),t)),f=t.defaultView;if(!f)return()=>{p.forEach(w=>w())};const g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),S=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(w=>vt(w[0],w[1],{set(){F(u)({target:this,isTrusted:!1})}},!1,f))),F(()=>{p.forEach(w=>w())})}function ht(e){const t=[];function s(o,i){if(rt("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||rt("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||rt("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||rt("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){const c=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(c)}else if(o.parentStyleSheet){const c=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(c)}return i}return s(e,t)}function Se(e,t,s){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=s.getId(e),{styleId:i,id:o}):{}}function _a({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};const i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((r,u,l)=>{const[n,p]=l,{id:f,styleId:g}=Se(u,t,s.styleMirror);return(f&&f!==-1||g&&g!==-1)&&e({id:f,styleId:g,adds:[{rule:n,index:p}]}),r.apply(u,l)})}),o.CSSStyleSheet.prototype.addRule=function(r,u,l=this.cssRules.length){const n=`${r} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,l])};const a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:F((r,u,l)=>{const[n]=l,{id:p,styleId:f}=Se(u,t,s.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,removes:[{index:n}]}),r.apply(u,l)})}),o.CSSStyleSheet.prototype.removeRule=function(r){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[r])};let c;o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:F((r,u,l)=>{const[n]=l,{id:p,styleId:f}=Se(u,t,s.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,replace:n}),r.apply(u,l)})}));let d;o.CSSStyleSheet.prototype.replaceSync&&(d=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:F((r,u,l)=>{const[n]=l,{id:p,styleId:f}=Se(u,t,s.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,replaceSync:n}),r.apply(u,l)})}));const m={};st("CSSGroupingRule")?m.CSSGroupingRule=o.CSSGroupingRule:(st("CSSMediaRule")&&(m.CSSMediaRule=o.CSSMediaRule),st("CSSConditionRule")&&(m.CSSConditionRule=o.CSSConditionRule),st("CSSSupportsRule")&&(m.CSSSupportsRule=o.CSSSupportsRule));const h={};return Object.entries(m).forEach(([r,u])=>{h[r]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(h[r].insertRule,{apply:F((l,n,p)=>{const[f,g]=p,{id:S,styleId:w}=Se(n.parentStyleSheet,t,s.styleMirror);return(S&&S!==-1||w&&w!==-1)&&e({id:S,styleId:w,adds:[{rule:f,index:[...ht(n),g||0]}]}),l.apply(n,p)})}),u.prototype.deleteRule=new Proxy(h[r].deleteRule,{apply:F((l,n,p)=>{const[f]=p,{id:g,styleId:S}=Se(n.parentStyleSheet,t,s.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...ht(n),f]}]}),l.apply(n,p)})})}),F(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,c&&(o.CSSStyleSheet.prototype.replace=c),d&&(o.CSSStyleSheet.prototype.replaceSync=d),Object.entries(m).forEach(([r,u])=>{u.prototype.insertRule=h[r].insertRule,u.prototype.deleteRule=h[r].deleteRule})})}function Mn({mirror:e,stylesheetManager:t},s){var o,i,a;let c=null;s.nodeName==="#document"?c=e.getId(s):c=e.getId(k.host(s));const d=s.nodeName==="#document"?(o=s.defaultView)==null?void 0:o.Document:(a=(i=s.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,m=d!=null&&d.prototype?Object.getOwnPropertyDescriptor(d==null?void 0:d.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!d||!m?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get(){var h;return(h=m.get)==null?void 0:h.call(this)},set(h){var r;const u=(r=m.set)==null?void 0:r.call(this,h);if(c!==null&&c!==-1)try{t.adoptStyleSheets(h,c)}catch(l){}return u}}),F(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get:m.get,set:m.set})}))}function ka({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:o},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:F((d,m,h)=>{var r;const[u,l,n]=h;if(s.has(u))return a.apply(m,[u,l,n]);const{id:p,styleId:f}=Se((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,set:{property:u,value:l,priority:n},index:ht(m.parentRule)}),d.apply(m,h)})});const c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:F((d,m,h)=>{var r;const[u]=h;if(s.has(u))return c.apply(m,[u]);const{id:l,styleId:n}=Se((r=m.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(l&&l!==-1||n&&n!==-1)&&e({id:l,styleId:n,remove:{property:u},index:ht(m.parentRule)}),d.apply(m,h)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=c})}function La({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:o,sampling:i,doc:a}){const c=F(m=>qe(F(h=>{const r=Je(h);if(!r||ie(r,t,s,!0))return;const{currentTime:u,volume:l,muted:n,playbackRate:p,loop:f}=r;e({type:m,id:o.getId(r),currentTime:u,volume:l,muted:n,playbackRate:p,loop:f})}),i.media||500)),d=[se("play",c(Le.Play),a),se("pause",c(Le.Pause),a),se("seeked",c(Le.Seeked),a),se("volumechange",c(Le.VolumeChange),a),se("ratechange",c(Le.RateChange),a)];return F(()=>{d.forEach(m=>m())})}function Da({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const o=[],i=new WeakMap,a=s.FontFace;s.FontFace=function(m,h,r){const u=new a(m,h,r);return i.set(u,{family:m,buffer:typeof h!="string",descriptors:r,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),u};const c=Ee(t.fonts,"add",function(d){return function(m){return setTimeout(F(()=>{const h=i.get(m);h&&(e(h),i.delete(m))}),0),d.apply(this,[m])}});return o.push(()=>{s.FontFace=a}),o.push(c),F(()=>{o.forEach(d=>d())})}function Ta(e){const{doc:t,mirror:s,blockClass:o,blockSelector:i,selectionCb:a}=e;let c=!0;const d=F(()=>{const m=t.getSelection();if(!m||c&&(m!=null&&m.isCollapsed))return;c=m.isCollapsed||!1;const h=[],r=m.rangeCount||0;for(let u=0;u<r;u++){const l=m.getRangeAt(u),{startContainer:n,startOffset:p,endContainer:f,endOffset:g}=l;ie(n,o,i,!0)||ie(f,o,i,!0)||h.push({start:s.getId(n),startOffset:p,end:s.getId(f),endOffset:g})}a({ranges:h})});return d(),se("selectionchange",d)}function Fa({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:Ee(s.customElements,"define",function(i){return function(a,c,d){try{t({define:{name:a}})}catch(m){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,c,d])}})}function Ba(e,t){const{mutationCb:s,mousemoveCb:o,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:c,inputCb:d,mediaInteractionCb:m,styleSheetRuleCb:h,styleDeclarationCb:r,canvasMutationCb:u,fontCb:l,selectionCb:n,customElementCb:p}=e;e.mutationCb=(...f)=>{t.mutation&&t.mutation(...f),s(...f)},e.mousemoveCb=(...f)=>{t.mousemove&&t.mousemove(...f),o(...f)},e.mouseInteractionCb=(...f)=>{t.mouseInteraction&&t.mouseInteraction(...f),i(...f)},e.scrollCb=(...f)=>{t.scroll&&t.scroll(...f),a(...f)},e.viewportResizeCb=(...f)=>{t.viewportResize&&t.viewportResize(...f),c(...f)},e.inputCb=(...f)=>{t.input&&t.input(...f),d(...f)},e.mediaInteractionCb=(...f)=>{t.mediaInteaction&&t.mediaInteaction(...f),m(...f)},e.styleSheetRuleCb=(...f)=>{t.styleSheetRule&&t.styleSheetRule(...f),h(...f)},e.styleDeclarationCb=(...f)=>{t.styleDeclaration&&t.styleDeclaration(...f),r(...f)},e.canvasMutationCb=(...f)=>{t.canvasMutation&&t.canvasMutation(...f),u(...f)},e.fontCb=(...f)=>{t.font&&t.font(...f),l(...f)},e.selectionCb=(...f)=>{t.selection&&t.selection(...f),n(...f)},e.customElementCb=(...f)=>{t.customElement&&t.customElement(...f),p(...f)}}function $a(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};Ba(e,t);let o;e.recordDOM&&(o=On(e,e.doc));const i=Ma(e),a=Ea(e),c=In(e),d=Aa(e,{win:s}),m=Na(e),h=La(e);let r=()=>{},u=()=>{},l=()=>{},n=()=>{};e.recordDOM&&(r=_a(e,{win:s}),u=Mn(e,e.doc),l=ka(e,{win:s}),e.collectFonts&&(n=Da(e)));const p=Ta(e),f=Fa(e),g=[];for(const S of e.plugins)g.push(S.observer(S.callback,s,S.options));return F(()=>{we.forEach(S=>S.destroy()),we.forEach(S=>S.reset()),o==null||o.disconnect(),i(),a(),c(),d(),m(),h(),r(),u(),l(),n(),p(),f(),g.forEach(S=>S()),we.length=0})}function rt(e){return typeof window[e]!="undefined"}function st(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Pi{constructor(t){P(this,"iframeIdToRemoteIdMap",new WeakMap),P(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,o,i){const a=o||this.getIdToRemoteIdMap(t),c=i||this.getRemoteIdToIdMap(t);let d=a.get(s);return d||(d=this.generateIdFn(),a.set(s,d),c.set(d,s)),d}getIds(t,s){const o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return s.map(a=>this.getId(t,a,o,i))}getRemoteId(t,s,o){const i=o||this.getRemoteIdToIdMap(t);if(typeof s!="number")return s;const a=i.get(s);return a||-1}getRemoteIds(t,s){const o=this.getRemoteIdToIdMap(t);return s.map(i=>this.getRemoteId(t,i,o))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class Ua{constructor(t){P(this,"iframes",new WeakMap),P(this,"crossOriginIframeMap",new WeakMap),P(this,"crossOriginIframeMirror",new Pi(Wi)),P(this,"crossOriginIframeStyleMirror"),P(this,"crossOriginIframeRootIdMap",new WeakMap),P(this,"mirror"),P(this,"mutationCb"),P(this,"wrappedEmit"),P(this,"loadListener"),P(this,"stylesheetManager"),P(this,"recordCrossOriginIframes"),P(this,"messageHandler"),P(this,"nestedIframeListeners",new Map),P(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,s){const o=this.mirror.getId(t);return this.attachedIframes.set(o,{element:t,content:s}),o}attachIframe(t,s){var o;const i=this.trackIframeContent(t,s);this.mutationCb({adds:[{parentId:i,nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const a=t.contentWindow;if(this.recordCrossOriginIframes&&a&&!this.nestedIframeListeners.has(a)){const c=this.handleMessage.bind(this);this.nestedIframeListeners.set(a,c),a.addEventListener("message",c)}(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const a=this.transformCrossOriginEvent(i,s.data.event);a&&this.wrappedEmit(a,s.data.isCheckout)}transformCrossOriginEvent(t,s){var o;switch(s.type){case B.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const i=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(s.data.node,i),this.trackIframeContent(t,s.data.node),{timestamp:s.timestamp,type:B.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case B.Meta:case B.Load:case B.DomContentLoaded:return!1;case B.Plugin:return s;case B.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case B.IncrementalSnapshot:switch(s.data.source){case D.Mutation:return s.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),s.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),s.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),s.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.Drag:case D.TouchMove:case D.MouseMove:return s.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(s.data,t,["id"]),s;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case D.Font:return s;case D.Selection:return s.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),s;case D.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(o=s.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),s}}return!1}replace(t,s,o,i){for(const a of i)!Array.isArray(s[a])&&typeof s[a]!="number"||(Array.isArray(s[a])?s[a]=t.getIds(o,s[a]):s[a]=t.getId(o,s[a]));return s}replaceIds(t,s,o){return this.replace(this.crossOriginIframeMirror,t,s,o)}replaceStyleIds(t,s,o){return this.replace(this.crossOriginIframeStyleMirror,t,s,o)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,s)})}patchRootIdOnNode(t,s){t.type!==xn.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,s)})}removeIframeById(t){const s=this.attachedIframes.get(t),o=(s==null?void 0:s.element)||this.mirror.getNode(t);if(o){const i=o.contentWindow;if(i&&this.nestedIframeListeners.has(i)){const a=this.nestedIframeListeners.get(i);i.removeEventListener("message",a),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(o)}s&&this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(({content:t},s)=>{if(!this.mirror.has(s)){this.attachedIframes.delete(s);return}this.mutationCb({adds:[{parentId:s,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0})})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,s)=>{s.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Wa{constructor(t){P(this,"shadowDoms",new WeakSet),P(this,"mutationCb"),P(this,"scrollCb"),P(this,"bypassOptions"),P(this,"mirror"),P(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!Ue(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const o=On(le(L({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(In(le(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(k.host(t))),this.restoreHandlers.push(Mn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const o=this;this.restoreHandlers.push(Ee(t.prototype,"attachShadow",function(i){return function(a){const c=i.call(this,a),d=k.shadowRoot(this);return d&&Cn(this)&&o.addShadowRoot(d,s),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(s){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var it=0;it<Fe.length;it++)za[Fe.charCodeAt(it)]=it;var qa=function(e){var t=new Uint8Array(e),s,o=t.length,i="";for(s=0;s<o;s+=3)i+=Fe[t[s]>>2],i+=Fe[(t[s]&3)<<4|t[s+1]>>4],i+=Fe[(t[s+1]&15)<<2|t[s+2]>>6],i+=Fe[t[s+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Ni=new Map;function ja(e,t){let s=Ni.get(e);return s||(s=new Map,Ni.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const En=(e,t,s)=>{if(!e||!(Pn(e,t)||typeof e=="object"))return;const o=e.constructor.name,i=ja(s,o);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function nt(e,t,s,o){if(e instanceof Array)return e.map(i=>nt(i,t,s,o));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,a=qa(e);return{rr_type:i,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[nt(e.buffer,t,s,o),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:a}=e;return{rr_type:i,src:a}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",a=e.toDataURL(o.type,o.quality);return{rr_type:i,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[nt(e.data,t,s,o),e.width,e.height]};if(Pn(e,t)||typeof e=="object"){const i=e.constructor.name,a=En(e,t,s);return{rr_type:i,index:a}}}}return e}const An=(e,t,s,o)=>e.map(i=>nt(i,t,s,o)),Pn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Ha(e,t,s,o,i){const a=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const d of c)try{if(typeof t.CanvasRenderingContext2D.prototype[d]!="function")continue;const m=Ee(t.CanvasRenderingContext2D.prototype,d,function(h){return function(...r){return ie(this.canvas,s,o,!0)||setTimeout(()=>{const u=An(r,t,this,i);e(this.canvas,{type:Be["2D"],property:d,args:u})},0),h.apply(this,r)}});a.push(m)}catch(m){const h=vt(t.CanvasRenderingContext2D.prototype,d,{set(r){e(this.canvas,{type:Be["2D"],property:d,args:[r],setter:!0})}});a.push(h)}return()=>{a.forEach(d=>d())}}function Va(e){return e==="experimental-webgl"?"webgl":e}function _i(e,t,s,o){const i=[];try{const a=Ee(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(d,...m){if(!ie(this,t,s,!0)){const h=Va(d);if("__context"in this||(this.__context=h),o&&["webgl","webgl2"].includes(h))if(m[0]&&typeof m[0]=="object"){const r=m[0];r.preserveDrawingBuffer||(r.preserveDrawingBuffer=!0)}else m.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[d,...m])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function ki(e,t,s,o,i,a,c){const d=[],m=Object.getOwnPropertyNames(e);for(const h of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;const r=Ee(e,h,function(u){return function(...l){const n=u.apply(this,l);if(En(n,a,this),"tagName"in this.canvas&&!ie(this.canvas,o,i,!0)){const p=An(l,a,this,c),f={type:t,property:h,args:p};s(this.canvas,f)}return n}});d.push(r)}catch(r){const u=vt(e,h,{set(l){s(this.canvas,{type:t,property:h,args:[l],setter:!0})}});d.push(u)}return d}function Ga(e,t,s,o,i){const a=[];return a.push(...ki(t.WebGLRenderingContext.prototype,Be.WebGL,e,s,o,t,i)),typeof t.WebGL2RenderingContext!="undefined"&&a.push(...ki(t.WebGL2RenderingContext.prototype,Be.WebGL2,e,s,o,t,i)),()=>{a.forEach(c=>c())}}const Nn=`(function() {
59
59
  "use strict";
60
60
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
61
61
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -130,7 +130,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
130
130
  };
131
131
  })();
132
132
  //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
133
- `,Li=typeof self!="undefined"&&self.Blob&&new Blob([Nn],{type:"text/javascript;charset=utf-8"});function Ja(e){let t;try{if(t=Li&&(self.URL||self.webkitURL).createObjectURL(Li),!t)throw"";const s=new Worker(t,{name:e==null?void 0:e.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Nn),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Ya{constructor(t){P(this,"pendingCanvasMutations",new Map),P(this,"rafStamps",{latestId:0,invokeId:null}),P(this,"mirror"),P(this,"mutationCb"),P(this,"resetObservers"),P(this,"frozen",!1),P(this,"locked",!1),P(this,"rafIdTimestamp",null),P(this,"rafIdFlush",null),P(this,"processMutation",(m,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(m)||this.pendingCanvasMutations.set(m,[]),this.pendingCanvasMutations.get(m).push(h)});const{sampling:s="all",win:o,blockClass:i,blockSelector:a,recordCanvas:c,dataURLOptions:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&s==="all"&&this.initCanvasMutationObserver(o,i,a,d),c&&typeof s=="number"&&this.initCanvasFPSObserver(s,o,i,a,{dataURLOptions:d})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,s,o,i,a){const c=_i(s,o,i,!0),d=new Map,m=new Ja;m.onmessage=p=>{const{id:f}=p.data;if(d.set(f,!1),!("base64"in p.data))return;const{base64:g,type:S,width:w,height:v}=p.data;this.mutationCb({id:f,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};const h=1e3/t;let r=0,u;const l=()=>{const p=[],f=g=>{g.querySelectorAll("canvas").forEach(S=>{ie(S,o,i,!0)||p.push(S)}),g.querySelectorAll("*").forEach(S=>{S.shadowRoot&&f(S.shadowRoot)})};return f(s.document),p},n=p=>{if(r&&p-r<h){u=requestAnimationFrame(n);return}r=p,l().forEach(async f=>{var g;const S=this.mirror.getId(f);if(d.get(S)||f.width===0||f.height===0)return;if(d.set(S,!0),["webgl","webgl2"].includes(f.__context)){const y=f.getContext(f.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const w=f.clientWidth||f.width,v=f.clientHeight||f.height,x=await createImageBitmap(f,{resizeWidth:w,resizeHeight:v});m.postMessage({id:S,bitmap:x,width:w,height:v,dataURLOptions:a.dataURLOptions},[x])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,s,o,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const a=_i(t,s,o,!1),c=Ha(this.processMutation.bind(this),t,s,o,i),d=Ga(this.processMutation.bind(this),t,s,o,i);this.resetObservers=()=>{a(),c(),d()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const o=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,o)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const o=this.pendingCanvasMutations.get(t);if(!o||s===-1)return;const i=o.map(c=>{const h=c,{type:d}=h;return Ne(h,["type"])}),{type:a}=o[0];this.mutationCb({id:s,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Za{constructor(t){P(this,"trackedLinkElements",new WeakSet),P(this,"mutationCb"),P(this,"adoptedStyleSheetCb"),P(this,"styleMirror",new wa),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const o={id:s,styleIds:[]},i=[];for(const a of t){let c;this.styleMirror.has(a)?c=this.styleMirror.getId(a):(c=this.styleMirror.add(a),i.push({styleId:c,rules:Array.from(a.rules||CSSRule,(d,m)=>({rule:Bi(d,a.href),index:m}))})),o.styleIds.push(c)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Qa{constructor(){P(this,"nodeMap",new WeakMap),P(this,"active",!1)}inOtherBuffer(t,s){const o=this.nodeMap.get(t);return o&&Array.from(o).some(i=>i!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let j,ot,_r,ft=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ns=e.contentWindow)==null?void 0:ns.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ce=io();function xe(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:d=null,maskTextClass:m="rr-mask",maskTextSelector:h=null,inlineStylesheet:r=!0,maskAllInputs:u,maskInputOptions:l,slimDOMOptions:n,maskInputFn:p,maskTextFn:f,hooks:g,packFn:S,sampling:w={},dataURLOptions:v={},mousemoveWait:x,recordDOM:y=!0,recordCanvas:b=!1,recordCrossOriginIframes:C=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:M=!1,collectFonts:O=!1,inlineImages:N=!1,plugins:A,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:I}=e;Oa(I);const Q=L({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},v),T=C?window.parent===window:!0;let $=!1;if(!T)try{window.parent.document&&($=!1)}catch(_){$=!0}if(T&&!t)throw new Error("emit function is required");if(!T&&!$)return()=>{};x!==void 0&&w.mousemove===void 0&&(w.mousemove=x),ce.reset();const X=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:l!==void 0?l:{password:!0},H=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};ya();let be,me=0;const E=_=>{for(const J of A||[])J.eventProcessor&&(_=J.eventProcessor(_));return S&&!$&&(_=S(_)),_};j=(_,J)=>{var V;const G=_;if(G.timestamp=ct(),(V=we[0])!=null&&V.isFrozen()&&G.type!==B.FullSnapshot&&!(G.type===B.IncrementalSnapshot&&G.data.source===D.Mutation)&&we.forEach(fe=>fe.unfreeze()),T)t==null||t(E(G),J);else if($){const fe={type:"rrweb",event:E(G),origin:window.location.origin,isCheckout:J};window.parent.postMessage(fe,"*")}if(G.type===B.FullSnapshot)be=G,me=0;else if(G.type===B.IncrementalSnapshot){if(G.data.source===D.Mutation&&G.data.isAttachIframe)return;me++;const fe=o&&me>=o,Pe=s&&G.timestamp-be.timestamp>s;(fe||Pe)&&ot(!0)}};const oe=_=>{C&&_.removes&&_.removes.forEach(({id:J})=>{re.removeIframeById(J)}),j({type:B.IncrementalSnapshot,data:L({source:D.Mutation},_)})},ae=_=>j({type:B.IncrementalSnapshot,data:L({source:D.Scroll},_)}),Ae=_=>j({type:B.IncrementalSnapshot,data:L({source:D.CanvasMutation},_)}),ge=_=>j({type:B.IncrementalSnapshot,data:L({source:D.AdoptedStyleSheet},_)}),he=new Za({mutationCb:oe,adoptedStyleSheetCb:ge}),re=new Ua({mirror:ce,mutationCb:oe,stylesheetManager:he,recordCrossOriginIframes:C,wrappedEmit:j});for(const _ of A||[])_.getMirror&&_.getMirror({nodeMirror:ce,crossOriginIframeMirror:re.crossOriginIframeMirror,crossOriginIframeStyleMirror:re.crossOriginIframeStyleMirror});const Re=new Qa;_r=new Ya({recordCanvas:b,mutationCb:Ae,win:window,blockClass:i,blockSelector:a,mirror:ce,sampling:w.canvas,dataURLOptions:Q});const Y=new Wa({mutationCb:oe,scrollCb:ae,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:m,maskTextSelector:h,inlineStylesheet:r,maskInputOptions:X,dataURLOptions:Q,maskTextFn:f,maskInputFn:p,recordCanvas:b,inlineImages:N,sampling:w,slimDOMOptions:H,iframeManager:re,stylesheetManager:he,canvasManager:_r,keepIframeSrcFn:ee,processedNodeManager:Re},mirror:ce});ot=(_=!1)=>{if(!y)return;j({type:B.Meta,data:{href:window.location.href,width:gn(),height:mn()}},_),he.reset(),Y.init(),we.forEach(V=>V.lock());const J=No(document,{mirror:ce,blockClass:i,blockSelector:a,maskTextClass:m,maskTextSelector:h,inlineStylesheet:r,maskAllInputs:X,maskTextFn:f,maskInputFn:p,slimDOM:H,dataURLOptions:Q,recordCanvas:b,inlineImages:N,onSerialize:V=>{bn(V,ce)&&re.addIframe(V),Sn(V,ce)&&he.trackLinkElement(V),Lr(V)&&Y.addShadowRoot(k.shadowRoot(V),document)},onIframeLoad:(V,G)=>{re.attachIframe(V,G),Y.observeAttachShadow(V)},onStylesheetLoad:(V,G)=>{he.attachLinkElement(V,G)},keepIframeSrcFn:ee});if(!J)return console.warn("Failed to snapshot the document");j({type:B.FullSnapshot,data:{node:J,initialOffset:dn(window)}},_),we.forEach(V=>V.unlock()),C&&re.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&he.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const _=[],J=fe=>{var Pe;return F($a)({mutationCb:oe,mousemoveCb:(W,Ct)=>j({type:B.IncrementalSnapshot,data:{source:Ct,positions:W}}),mouseInteractionCb:W=>j({type:B.IncrementalSnapshot,data:L({source:D.MouseInteraction},W)}),scrollCb:ae,viewportResizeCb:W=>j({type:B.IncrementalSnapshot,data:L({source:D.ViewportResize},W)}),inputCb:W=>j({type:B.IncrementalSnapshot,data:L({source:D.Input},W)}),mediaInteractionCb:W=>j({type:B.IncrementalSnapshot,data:L({source:D.MediaInteraction},W)}),styleSheetRuleCb:W=>j({type:B.IncrementalSnapshot,data:L({source:D.StyleSheetRule},W)}),styleDeclarationCb:W=>j({type:B.IncrementalSnapshot,data:L({source:D.StyleDeclaration},W)}),canvasMutationCb:Ae,fontCb:W=>j({type:B.IncrementalSnapshot,data:L({source:D.Font},W)}),selectionCb:W=>{j({type:B.IncrementalSnapshot,data:L({source:D.Selection},W)})},customElementCb:W=>{j({type:B.IncrementalSnapshot,data:L({source:D.CustomElement},W)})},blockClass:i,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:h,maskInputOptions:X,inlineStylesheet:r,sampling:w,recordDOM:y,recordCanvas:b,inlineImages:N,userTriggeredOnInput:M,collectFonts:O,doc:fe,maskInputFn:p,maskTextFn:f,keepIframeSrcFn:ee,blockSelector:a,slimDOMOptions:H,dataURLOptions:Q,mirror:ce,iframeManager:re,stylesheetManager:he,shadowDomManager:Y,processedNodeManager:Re,canvasManager:_r,ignoreCSSAttributes:te,plugins:((Pe=A==null?void 0:A.filter(W=>W.observer))==null?void 0:Pe.map(W=>({observer:W.observer,options:W.options,callback:Ct=>j({type:B.Plugin,data:{plugin:W.name,payload:Ct}})})))||[]},g)},V=fe=>{try{_.push(J(fe.contentDocument))}catch(Pe){console.warn(Pe)}};re.addLoadListener(V);const G=()=>{ot(),_.push(J(document)),ft=!0};return document.readyState==="interactive"||document.readyState==="complete"?G():(_.push(se("DOMContentLoaded",()=>{j({type:B.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&G()})),_.push(se("load",()=>{j({type:B.Load,data:{}}),R==="load"&&G()},window))),()=>{_.forEach(fe=>fe()),Re.destroy(),re.removeLoadListener(),re.destroy(),ce.reset(),ft=!1,Ia()}}catch(_){console.warn(_)}}xe.addCustomEvent=(e,t)=>{if(!ft)throw new Error("please add custom event after start recording");j({type:B.Custom,data:{tag:e,payload:t}})};xe.freezePage=()=>{we.forEach(e=>e.freeze())};xe.takeFullSnapshot=e=>{if(!ft)throw new Error("please take full snapshot after start recording");ot(e)};xe.mirror=ce;var Di;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Di||(Di={}));const{addCustomEvent:Ka}=xe,{freezePage:el}=xe,{takeFullSnapshot:tl}=xe;exports.record=xe;
133
+ `,Li=typeof self!="undefined"&&self.Blob&&new Blob([Nn],{type:"text/javascript;charset=utf-8"});function Ja(e){let t;try{if(t=Li&&(self.URL||self.webkitURL).createObjectURL(Li),!t)throw"";const s=new Worker(t,{name:e==null?void 0:e.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Nn),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Ya{constructor(t){P(this,"pendingCanvasMutations",new Map),P(this,"rafStamps",{latestId:0,invokeId:null}),P(this,"mirror"),P(this,"mutationCb"),P(this,"resetObservers"),P(this,"frozen",!1),P(this,"locked",!1),P(this,"rafIdTimestamp",null),P(this,"rafIdFlush",null),P(this,"processMutation",(m,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(m)||this.pendingCanvasMutations.set(m,[]),this.pendingCanvasMutations.get(m).push(h)});const{sampling:s="all",win:o,blockClass:i,blockSelector:a,recordCanvas:c,dataURLOptions:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&s==="all"&&this.initCanvasMutationObserver(o,i,a,d),c&&typeof s=="number"&&this.initCanvasFPSObserver(s,o,i,a,{dataURLOptions:d})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,s,o,i,a){const c=_i(s,o,i,!0),d=new Map,m=new Ja;m.onmessage=p=>{const{id:f}=p.data;if(d.set(f,!1),!("base64"in p.data))return;const{base64:g,type:S,width:w,height:v}=p.data;this.mutationCb({id:f,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};const h=1e3/t;let r=0,u;const l=()=>{const p=[],f=g=>{g.querySelectorAll("canvas").forEach(S=>{ie(S,o,i,!0)||p.push(S)}),g.querySelectorAll("*").forEach(S=>{S.shadowRoot&&f(S.shadowRoot)})};return f(s.document),p},n=p=>{if(r&&p-r<h){u=requestAnimationFrame(n);return}r=p,l().forEach(async f=>{var g;const S=this.mirror.getId(f);if(d.get(S)||f.width===0||f.height===0)return;if(d.set(S,!0),["webgl","webgl2"].includes(f.__context)){const y=f.getContext(f.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const w=f.clientWidth||f.width,v=f.clientHeight||f.height,x=await createImageBitmap(f,{resizeWidth:w,resizeHeight:v});m.postMessage({id:S,bitmap:x,width:w,height:v,dataURLOptions:a.dataURLOptions},[x])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,s,o,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const a=_i(t,s,o,!1),c=Ha(this.processMutation.bind(this),t,s,o,i),d=Ga(this.processMutation.bind(this),t,s,o,i);this.resetObservers=()=>{a(),c(),d()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const o=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,o)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const o=this.pendingCanvasMutations.get(t);if(!o||s===-1)return;const i=o.map(c=>{const h=c,{type:d}=h;return Ne(h,["type"])}),{type:a}=o[0];this.mutationCb({id:s,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Za{constructor(t){P(this,"trackedLinkElements",new WeakSet),P(this,"mutationCb"),P(this,"adoptedStyleSheetCb"),P(this,"styleMirror",new wa),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const o={id:s,styleIds:[]},i=[];for(const a of t){let c;this.styleMirror.has(a)?c=this.styleMirror.getId(a):(c=this.styleMirror.add(a),i.push({styleId:c,rules:Array.from(a.rules||CSSRule,(d,m)=>({rule:Bi(d,a.href),index:m}))})),o.styleIds.push(c)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Qa{constructor(){P(this,"nodeMap",new WeakMap),P(this,"active",!1)}inOtherBuffer(t,s){const o=this.nodeMap.get(t);return o&&Array.from(o).some(i=>i!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let H,ot,_r,ft=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ns=e.contentWindow)==null?void 0:ns.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ce=io();function xe(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:d=null,maskTextClass:m="rr-mask",maskTextSelector:h=null,inlineStylesheet:r=!0,maskAllInputs:u,maskInputOptions:l,slimDOMOptions:n,maskInputFn:p,maskTextFn:f,hooks:g,packFn:S,sampling:w={},dataURLOptions:v={},mousemoveWait:x,recordDOM:y=!0,recordCanvas:b=!1,recordCrossOriginIframes:C=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:M=!1,collectFonts:O=!1,inlineImages:N=!1,plugins:A,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:I}=e;Oa(I);const Q=L({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},v),T=C?window.parent===window:!0;let $=!1;if(!T)try{window.parent.document&&($=!1)}catch(_){$=!0}if(T&&!t)throw new Error("emit function is required");if(!T&&!$)return()=>{};x!==void 0&&w.mousemove===void 0&&(w.mousemove=x),ce.reset();const X=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:l!==void 0?l:{password:!0},V=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};ya();let be,me=0;const E=_=>{for(const G of A||[])G.eventProcessor&&(_=G.eventProcessor(_));return S&&!$&&(_=S(_)),_};H=(_,G)=>{var W;const J=_;if(J.timestamp=ct(),(W=we[0])!=null&&W.isFrozen()&&J.type!==B.FullSnapshot&&!(J.type===B.IncrementalSnapshot&&J.data.source===D.Mutation)&&we.forEach(fe=>fe.unfreeze()),T)t==null||t(E(J),G);else if($){const fe={type:"rrweb",event:E(J),origin:window.location.origin,isCheckout:G};window.parent.postMessage(fe,"*")}if(J.type===B.FullSnapshot)be=J,me=0;else if(J.type===B.IncrementalSnapshot){if(J.data.source===D.Mutation&&J.data.isAttachIframe)return;me++;const fe=o&&me>=o,Pe=s&&J.timestamp-be.timestamp>s;(fe||Pe)&&ot(!0)}};const oe=_=>{if(C&&_.removes&&_.removes.length>0){const G=_.adds.length>0?new Set(_.adds.map(W=>W.node.id)):null;_.removes.forEach(({id:W})=>{(!G||!G.has(W))&&re.removeIframeById(W)})}H({type:B.IncrementalSnapshot,data:L({source:D.Mutation},_)})},ae=_=>H({type:B.IncrementalSnapshot,data:L({source:D.Scroll},_)}),Ae=_=>H({type:B.IncrementalSnapshot,data:L({source:D.CanvasMutation},_)}),ge=_=>H({type:B.IncrementalSnapshot,data:L({source:D.AdoptedStyleSheet},_)}),he=new Za({mutationCb:oe,adoptedStyleSheetCb:ge}),re=new Ua({mirror:ce,mutationCb:oe,stylesheetManager:he,recordCrossOriginIframes:C,wrappedEmit:H});for(const _ of A||[])_.getMirror&&_.getMirror({nodeMirror:ce,crossOriginIframeMirror:re.crossOriginIframeMirror,crossOriginIframeStyleMirror:re.crossOriginIframeStyleMirror});const Re=new Qa;_r=new Ya({recordCanvas:b,mutationCb:Ae,win:window,blockClass:i,blockSelector:a,mirror:ce,sampling:w.canvas,dataURLOptions:Q});const Y=new Wa({mutationCb:oe,scrollCb:ae,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:m,maskTextSelector:h,inlineStylesheet:r,maskInputOptions:X,dataURLOptions:Q,maskTextFn:f,maskInputFn:p,recordCanvas:b,inlineImages:N,sampling:w,slimDOMOptions:V,iframeManager:re,stylesheetManager:he,canvasManager:_r,keepIframeSrcFn:ee,processedNodeManager:Re},mirror:ce});ot=(_=!1)=>{if(!y)return;H({type:B.Meta,data:{href:window.location.href,width:gn(),height:mn()}},_),he.reset(),Y.init(),we.forEach(W=>W.lock());const G=No(document,{mirror:ce,blockClass:i,blockSelector:a,maskTextClass:m,maskTextSelector:h,inlineStylesheet:r,maskAllInputs:X,maskTextFn:f,maskInputFn:p,slimDOM:V,dataURLOptions:Q,recordCanvas:b,inlineImages:N,onSerialize:W=>{bn(W,ce)&&re.addIframe(W),Sn(W,ce)&&he.trackLinkElement(W),Lr(W)&&Y.addShadowRoot(k.shadowRoot(W),document)},onIframeLoad:(W,J)=>{re.attachIframe(W,J),Y.observeAttachShadow(W)},onStylesheetLoad:(W,J)=>{he.attachLinkElement(W,J)},keepIframeSrcFn:ee});if(!G)return console.warn("Failed to snapshot the document");H({type:B.FullSnapshot,data:{node:G,initialOffset:dn(window)}},_),we.forEach(W=>W.unlock()),C&&re.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&he.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const _=[],G=fe=>{var Pe;return F($a)({mutationCb:oe,mousemoveCb:(z,Ct)=>H({type:B.IncrementalSnapshot,data:{source:Ct,positions:z}}),mouseInteractionCb:z=>H({type:B.IncrementalSnapshot,data:L({source:D.MouseInteraction},z)}),scrollCb:ae,viewportResizeCb:z=>H({type:B.IncrementalSnapshot,data:L({source:D.ViewportResize},z)}),inputCb:z=>H({type:B.IncrementalSnapshot,data:L({source:D.Input},z)}),mediaInteractionCb:z=>H({type:B.IncrementalSnapshot,data:L({source:D.MediaInteraction},z)}),styleSheetRuleCb:z=>H({type:B.IncrementalSnapshot,data:L({source:D.StyleSheetRule},z)}),styleDeclarationCb:z=>H({type:B.IncrementalSnapshot,data:L({source:D.StyleDeclaration},z)}),canvasMutationCb:Ae,fontCb:z=>H({type:B.IncrementalSnapshot,data:L({source:D.Font},z)}),selectionCb:z=>{H({type:B.IncrementalSnapshot,data:L({source:D.Selection},z)})},customElementCb:z=>{H({type:B.IncrementalSnapshot,data:L({source:D.CustomElement},z)})},blockClass:i,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:h,maskInputOptions:X,inlineStylesheet:r,sampling:w,recordDOM:y,recordCanvas:b,inlineImages:N,userTriggeredOnInput:M,collectFonts:O,doc:fe,maskInputFn:p,maskTextFn:f,keepIframeSrcFn:ee,blockSelector:a,slimDOMOptions:V,dataURLOptions:Q,mirror:ce,iframeManager:re,stylesheetManager:he,shadowDomManager:Y,processedNodeManager:Re,canvasManager:_r,ignoreCSSAttributes:te,plugins:((Pe=A==null?void 0:A.filter(z=>z.observer))==null?void 0:Pe.map(z=>({observer:z.observer,options:z.options,callback:Ct=>H({type:B.Plugin,data:{plugin:z.name,payload:Ct}})})))||[]},g)},W=fe=>{try{_.push(G(fe.contentDocument))}catch(Pe){console.warn(Pe)}};re.addLoadListener(W);const J=()=>{ot(),_.push(G(document)),ft=!0};return document.readyState==="interactive"||document.readyState==="complete"?J():(_.push(se("DOMContentLoaded",()=>{H({type:B.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&J()})),_.push(se("load",()=>{H({type:B.Load,data:{}}),R==="load"&&J()},window))),()=>{_.forEach(fe=>fe()),Re.destroy(),re.removeLoadListener(),re.destroy(),ce.reset(),ft=!1,Ia()}}catch(_){console.warn(_)}}xe.addCustomEvent=(e,t)=>{if(!ft)throw new Error("please add custom event after start recording");H({type:B.Custom,data:{tag:e,payload:t}})};xe.freezePage=()=>{we.forEach(e=>e.freeze())};xe.takeFullSnapshot=e=>{if(!ft)throw new Error("please take full snapshot after start recording");ot(e)};xe.mirror=ce;var Di;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Di||(Di={}));const{addCustomEvent:Ka}=xe,{freezePage:el}=xe,{takeFullSnapshot:tl}=xe;exports.record=xe;
134
134
  ;if (typeof module.exports == "object" && typeof exports == "object") {
135
135
  var __cp = (to, from, except, desc) => {
136
136
  if ((from && typeof from === "object") || typeof from === "function") {