@posthog/rrweb-snapshot 0.0.6 → 0.0.7

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.
@@ -37,7 +37,7 @@ var module = { exports };
37
37
  `),t=l.length-n):t+=l.length,a&&u!=="start"){let f=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==f.last||f.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?xe(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=xe(vr(r,this.mapOpts.annotation)));let s=xr(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ys(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Vt){let r=Vt(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Er==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Or=Ss;let Cs=Pe,nt=class extends Cs{constructor(e){super(e),this.type="comment"}};var Le=nt;nt.default=nt;let{isClean:Rr,my:Nr}=oe,Mr=Ie,Ar=Le,xs=Pe,_r,gt,yt,kr;function Pr(i){return i.map(e=>(e.nodes&&(e.nodes=Pr(e.nodes)),delete e.source,e))}function Ir(i){if(i[Rr]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Ir(e)}let D=class $r extends xs{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of o)this.proxyOf.nodes.splice(r,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<=n&&(this.indexes[l]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Pr(_r(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Mr(e)]}else if(e.selector)e=[new gt(e)];else if(e.name)e=[new yt(e)];else if(e.text)e=[new Ar(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Nr]||$r.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Rr]&&Ir(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};D.registerParse=i=>{_r=i};D.registerRule=i=>{gt=i};D.registerAtRule=i=>{yt=i};D.registerRoot=i=>{kr=i};var z=D;D.default=D;D.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,yt.prototype):i.type==="rule"?Object.setPrototypeOf(i,gt.prototype):i.type==="decl"?Object.setPrototypeOf(i,Mr.prototype):i.type==="comment"?Object.setPrototypeOf(i,Ar.prototype):i.type==="root"&&Object.setPrototypeOf(i,kr.prototype),i[Nr]=!0,i.nodes&&i.nodes.forEach(e=>{D.rebuild(e)})};let vs=z,Lr,Dr,te=class extends vs{constructor(e){super(L({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Lr(new Dr,this,e).stringify()}};te.registerLazyResult=i=>{Lr=i};te.registerProcessor=i=>{Dr=i};var wt=te;te.default=te;let ot=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Tr=ot;ot.default=ot;let Es=Tr,lt=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Es(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var bt=lt;lt.default=lt;const Je=39,Gt=34,he=92,Ht=47,pe=10,Z=32,de=12,me=9,ge=13,Os=91,Rs=93,Ns=40,Ms=41,As=123,_s=125,ks=59,Ps=42,Is=58,$s=64,ye=/[\t\n\f\r "#'()/;[\\\]{}]/g,we=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ls=/.[\r\n"'(/\\]/,qt=/[\da-f]/i;var Ds=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,l,a,u,f,h,d,m,y,w=r.length,c=0,O=[],M=[];function p(){return c}function b(I){throw e.error("Unclosed "+I,c)}function R(){return M.length===0&&c>=w}function A(I){if(M.length)return M.pop();if(c>=w)return;let k=I?I.ignoreUnclosed:!1;switch(o=r.charCodeAt(c),o){case pe:case Z:case me:case ge:case de:{n=c;do n+=1,o=r.charCodeAt(n);while(o===Z||o===pe||o===me||o===ge||o===de);y=["space",r.slice(c,n)],c=n-1;break}case Os:case Rs:case As:case _s:case Is:case ks:case Ms:{let U=String.fromCharCode(o);y=[U,U,c];break}case Ns:{if(d=O.length?O.pop()[1]:"",m=r.charCodeAt(c+1),d==="url"&&m!==Je&&m!==Gt&&m!==Z&&m!==pe&&m!==me&&m!==de&&m!==ge){n=c;do{if(f=!1,n=r.indexOf(")",n+1),n===-1)if(s||k){n=c;break}else b("bracket");for(h=n;r.charCodeAt(h-1)===he;)h-=1,f=!f}while(f);y=["brackets",r.slice(c,n+1),c,n],c=n}else n=r.indexOf(")",c+1),a=r.slice(c,n+1),n===-1||Ls.test(a)?y=["(","(",c]:(y=["brackets",a,c,n],c=n);break}case Je:case Gt:{l=o===Je?"'":'"',n=c;do{if(f=!1,n=r.indexOf(l,n+1),n===-1)if(s||k){n=c+1;break}else b("string");for(h=n;r.charCodeAt(h-1)===he;)h-=1,f=!f}while(f);y=["string",r.slice(c,n+1),c,n],c=n;break}case $s:{ye.lastIndex=c+1,ye.test(r),ye.lastIndex===0?n=r.length-1:n=ye.lastIndex-2,y=["at-word",r.slice(c,n+1),c,n],c=n;break}case he:{for(n=c,u=!0;r.charCodeAt(n+1)===he;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Ht&&o!==Z&&o!==pe&&o!==me&&o!==ge&&o!==de&&(n+=1,qt.test(r.charAt(n)))){for(;qt.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Z&&(n+=1)}y=["word",r.slice(c,n+1),c,n],c=n;break}default:{o===Ht&&r.charCodeAt(c+1)===Ps?(n=r.indexOf("*/",c+2)+1,n===0&&(s||k?n=r.length:b("comment")),y=["comment",r.slice(c,n+1),c,n],c=n):(we.lastIndex=c+1,we.test(r),we.lastIndex===0?n=r.length-1:n=we.lastIndex-2,y=["word",r.slice(c,n+1),c,n],O.push(y),c=n);break}}return c++,y}function T(I){M.push(I)}return{back:T,endOfFile:R,nextToken:A,position:p}};let Ur=z,Re=class extends Ur{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var St=Re;Re.default=Re;Ur.registerAtRule(Re);let Fr=z,zr,Br,H=class extends Fr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of s)o.raws.before=t.raws.before}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new zr(new Br,this,e).stringify()}};H.registerLazyResult=i=>{zr=i};H.registerProcessor=i=>{Br=i};var le=H;H.default=H;Fr.registerRoot(H);let re={comma(i){return re.split(i,[","],!0)},space(i){let e=[" ",`
38
38
  `," "];return re.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,l=!1,a="",u=!1;for(let f of i)u?u=!1:f==="\\"?u=!0:l?f===a&&(l=!1):f==='"'||f==="'"?(l=!0,a=f):f==="("?n+=1:f===")"?n>0&&(n-=1):n===0&&e.includes(f)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=f;return(t||s!=="")&&r.push(s.trim()),r}};var jr=re;re.default=re;let Wr=z,Ts=jr,Ne=class extends Wr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ts.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ct=Ne;Ne.default=Ne;Wr.registerRule(Ne);let Us=Ie,Fs=Ds,zs=Le,Bs=St,js=le,Jt=Ct;const Yt={empty:!0,space:!0};function Ws(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let Vs=class{constructor(e){this.input=e,this.root=new js,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Bs;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(o=a.length-1,s=a[o];s&&s[0]==="space";)s=a[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),n&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,l]of e.entries()){if(r=l,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new zs;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Fs(this.input)}decl(e,t){let r=new Us;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Ws(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let f=this.stringFrom(e,u);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(o[1].toLowerCase()==="important"){let f=e.slice(0),h="";for(let d=u;d>0;d--){let m=f[d][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=f.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=f)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Jt;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,o=null,n=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(l&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&s){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let o,n,l=r.length,a="",u=!0,f,h;for(let d=0;d<l;d+=1)o=r[d],n=o[0],n==="space"&&d===l-1&&!s?u=!1:n==="comment"?(h=r[d-1]?r[d-1][0]:"empty",f=r[d+1]?r[d+1][0]:"empty",!Yt[h]&&!Yt[f]?a.slice(-1)===","?u=!1:a+=o[1]:u=!1):a+=o[1];if(!u){let d=r.reduce((m,y)=>m+y[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Jt;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Gs=Vs;let Hs=z,qs=Gs,Js=$e;function Me(i,e){let t=new Js(i,e),r=new qs(t);try{r.parse()}catch(s){throw s}return r.root}var xt=Me;Me.default=Me;Hs.registerParse(Me);let{isClean:$,my:Ys}=oe,Ks=Or,Qs=ke,Zs=z,Xs=wt;let Kt=bt,en=xt,tn=le;const rn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},sn={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},nn={Once:!0,postcssPlugin:!0,prepare:!0},q=0;function X(i){return typeof i=="object"&&typeof i.then=="function"}function Vr(i){let e=!1,t=rn[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,q,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,q,t+"Exit"]:[t,t+"Exit"]}function Qt(i){let e;return i.type==="document"?e=["Document",q,"DocumentExit"]:i.type==="root"?e=["Root",q,"RootExit"]:e=Vr(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function at(i){return i[$]=!1,i.nodes&&i.nodes.forEach(e=>at(e)),i}let ut={},J=class Gr{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=at(t);else if(t instanceof Gr||t instanceof Kt)s=at(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=en;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[Ys]&&Zs.rebuild(s)}this.result=new Kt(e,s,r),this.helpers=Q(L({},ut),{postcss:ut,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?L(L({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!sn[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!nn[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(X(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$];){e[$]=!0;let t=[Qt(e)];for(;t.length>0;){let r=this.visitTick(t);if(X(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return X(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Qs;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Ks(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(X(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$];)e[$]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(X(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let n=t.iterator,l;for(;l=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!l[$]){l[$]=!0,e.push(Qt(l));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===q){r.nodes&&r.nodes.length&&(r[$]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[$]=!0;let t=Vr(e);for(let r of t)if(r===q)e.nodes&&e.each(s=>{s[$]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};J.registerPostcss=i=>{ut=i};var Hr=J;J.default=J;tn.registerLazyResult(J);Xs.registerLazyResult(J);let on=Or,ln=ke;let an=xt;const un=bt;let ft=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,o=ln;this.result=new un(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let l=new on(o,s,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=an;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var fn=ft;ft.default=ft;let cn=fn,hn=Hr,pn=wt,dn=le,ie=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new cn(this,e,t):new hn(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var mn=ie;ie.default=ie;dn.registerProcessor(ie);pn.registerProcessor(ie);let gn=Ie,yn=Sr,wn=Le,bn=St,Sn=$e,Cn=le,xn=Ct;function se(i,e){if(Array.isArray(i))return i.map(n=>se(n));let s=i,{inputs:t}=s,r=ze(s,["inputs"]);if(t){e=[];for(let n of t){let l=Q(L({},n),{__proto__:Sn.prototype});l.map&&(l.map=Q(L({},l.map),{__proto__:yn.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>se(n,e))),r.source){let o=r.source,{inputId:n}=o,l=ze(o,["inputId"]);r.source=l,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Cn(r);if(r.type==="decl")return new gn(r);if(r.type==="rule")return new xn(r);if(r.type==="comment")return new wn(r);if(r.type==="atrule")return new bn(r);throw new Error("Unknown node type: "+i.type)}var vn=se;se.default=se;let En=mt,qr=Ie,On=Hr,Rn=z,vt=mn,Nn=ke,Mn=vn,Jr=wt,An=Tr,Yr=Le,Kr=St,_n=bt,kn=$e,Pn=xt,In=jr,Qr=Ct,Zr=le,$n=Pe;function S(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new vt(i)}S.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
39
39
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
40
- https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new vt().version,l}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,l,a){return S([s(a)]).process(n,l)},s};S.stringify=Nn;S.parse=Pn;S.fromJSON=Mn;S.list=In;S.comment=i=>new Yr(i);S.atRule=i=>new Kr(i);S.decl=i=>new qr(i);S.rule=i=>new Qr(i);S.root=i=>new Zr(i);S.document=i=>new Jr(i);S.CssSyntaxError=En;S.Declaration=qr;S.Container=Rn;S.Processor=vt;S.Document=Jr;S.Comment=Yr;S.Warning=An;S.AtRule=Kr;S.Result=_n;S.Input=kn;S.Rule=Qr;S.Root=Zr;S.Node=$n;On.registerPostcss(S);var Ln=S;S.default=S;const E=Hi(Ln);E.stringify;E.fromJSON;E.plugin;E.parse;E.list;E.document;E.comment;E.atRule;E.rule;E.decl;E.root;E.CssSyntaxError;E.Declaration;E.Container;E.Processor;E.Document;E.Comment;E.Warning;E.AtRule;E.Result;E.Input;E.Rule;E.Root;E.Node;const Zt={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Dn(i){let e=Zt[i.tagName]?Zt[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function De(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;const s=E([Vi,Gi]).process(i).css;return e==null||e.stylesWithHoverClass.set(i,s),s}function Tn(){return{stylesWithHoverClass:new Map}}function Un(i,e,t,r){const s=[];for(const n of i.childNodes)n.type===g.Text&&s.push(n);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>s.length;)o.splice(-2,2,o.slice(-2).join(""));for(let n=0;n<s.length;n++){const l=s[n],a=o[n];l&&a&&(l.textContent=t?De(a,r):a)}}function Fn(i,e,t,r){const{doc:s,hackCss:o,cache:n}=r;i.childNodes.length?Un(i,t,o,n):(o&&(t=De(t,n)),e.appendChild(s.createTextNode(t)))}function zn(i,e){var t;const{doc:r,hackCss:s,cache:o}=e;switch(i.type){case g.Document:return r.implementation.createDocument(null,"",null);case g.DocumentType:return r.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case g.Element:{const n=Dn(i);let l;i.isSVG?l=r.createElementNS("http://www.w3.org/2000/svg",n):(i.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(i.tagName)&&r.defaultView.customElements.define(i.tagName,class extends r.defaultView.HTMLElement{}),l=r.createElement(n));const a={};for(const u in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,u))continue;let f=i.attributes[u];if(!(n==="option"&&u==="selected"&&f===!1)&&f!==null){if(f===!0&&(f=""),u.startsWith("rr_")){a[u]=f;continue}if(typeof f=="string"){if(n==="style"&&u==="_cssText"){Fn(i,l,f,e);continue}else if(n==="textarea"&&u==="value"){l.appendChild(r.createTextNode(f)),i.childNodes=[];continue}}try{if(i.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,f.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,f.toString());else if(n==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",f.toString());continue}else n==="link"&&(i.attributes.rel==="preload"||i.attributes.rel==="modulepreload")&&i.attributes.as==="script"||n==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&i.attributes.href.endsWith(".js")||(n==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",i.attributes.srcset):l.setAttribute(u,f.toString()))}catch(h){}}}for(const u in a){const f=a[u];if(n==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=f.toString(),l.RRNodeType&&(l.rr_dataURL=f.toString())}else if(n==="img"&&u==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.attributes.src),h.src=f.toString())}if(u==="rr_width")l.style.setProperty("width",f.toString());else if(u==="rr_height")l.style.setProperty("height",f.toString());else if(u==="rr_mediaCurrentTime"&&typeof f=="number")l.currentTime=f;else if(u==="rr_mediaState")switch(f){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof f=="number"?l.playbackRate=f:u==="rr_mediaMuted"&&typeof f=="boolean"?l.muted=f:u==="rr_mediaLoop"&&typeof f=="boolean"?l.loop=f:u==="rr_mediaVolume"&&typeof f=="number"?l.volume=f:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",f)}if(i.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case g.Text:return i.isStyle&&s?r.createTextNode(De(i.textContent,o)):r.createTextNode(i.textContent);case g.CDATA:return r.createCDATASection(i.textContent);case g.Comment:return r.createComment(i.textContent);default:return null}}function Et(i,e){const{doc:t,mirror:r,skipChild:s=!1,hackCss:o=!0,afterAppend:n,cache:l}=e;if(r.has(i.id)){const u=r.getNode(i.id),f=r.getMeta(u);if(ar(f,i))return r.getNode(i.id)}let a=zn(i,{doc:t,hackCss:o,cache:l});if(!a)return null;if(i.rootId&&r.getNode(i.rootId)!==t&&r.replace(i.rootId,t),i.type===g.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==g.DocumentType&&(i.childNodes[0].type===g.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),r.add(a,i),(i.type===g.Document||i.type===g.Element)&&!s)for(const u of i.childNodes){const f=Et(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:l});if(!f){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Ae(a)&&a.shadowRoot)a.shadowRoot.appendChild(f);else if(i.type===g.Document&&u.type==g.Element){const h=f;let d=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(d=m)}),d?(h.removeChild(d),a.appendChild(f),h.appendChild(d)):a.appendChild(f)}else a.appendChild(f);n&&n(f,u.id)}return a}function Bn(i,e){function t(r){e(r)}for(const r of i.getIds())i.has(r)&&t(i.getNode(r))}function jn(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==g.Element)return;const r=i;for(const s in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,s)&&s.startsWith("rr_")))continue;const o=t.attributes[s];s==="rr_scrollLeft"&&(r.scrollLeft=o),s==="rr_scrollTop"&&(r.scrollTop=o)}}function Wn(i,e){const{doc:t,onVisit:r,hackCss:s=!0,afterAppend:o,cache:n,mirror:l=new _e}=e,a=Et(i,{doc:t,mirror:l,skipChild:!1,hackCss:s,afterAppend:o,cache:n});return Bn(l,u=>{r&&r(u),jn(u,l)}),a}exports.IGNORED_NODE=Ye;exports.Mirror=_e;exports.absolutifyURLs=ee;exports.adaptCssForReplay=De;exports.buildNodeWithSN=Et;exports.classMatchesRegex=Ee;exports.cleanupSnapshot=ji;exports.createCache=Tn;exports.createMirror=bi;exports.escapeImportStatement=tr;exports.extractFileExtension=ht;exports.fixSafariColons=ir;exports.genId=pr;exports.getInputType=ur;exports.ignoreAttribute=mr;exports.is2DCanvasBlank=lr;exports.isCSSImportRule=sr;exports.isCSSStyleRule=nr;exports.isElement=Ae;exports.isNativeShadowDom=be;exports.isNodeMetaEqual=ar;exports.isShadowRoot=er;exports.markCssSplits=cr;exports.maskInputValue=or;exports.needMaskingText=gr;exports.normalizeCssString=Se;exports.rebuild=Wn;exports.serializeNodeWithId=G;exports.snapshot=zi;exports.splitCssText=fr;exports.stringifyRule=rr;exports.stringifyStylesheet=ve;exports.toLowerCase=ne;exports.transformAttribute=dr;exports.visitSnapshot=Bi;
40
+ https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new vt().version,l}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,l,a){return S([s(a)]).process(n,l)},s};S.stringify=Nn;S.parse=Pn;S.fromJSON=Mn;S.list=In;S.comment=i=>new Yr(i);S.atRule=i=>new Kr(i);S.decl=i=>new qr(i);S.rule=i=>new Qr(i);S.root=i=>new Zr(i);S.document=i=>new Jr(i);S.CssSyntaxError=En;S.Declaration=qr;S.Container=Rn;S.Processor=vt;S.Document=Jr;S.Comment=Yr;S.Warning=An;S.AtRule=Kr;S.Result=_n;S.Input=kn;S.Rule=Qr;S.Root=Zr;S.Node=$n;On.registerPostcss(S);var Ln=S;S.default=S;const E=Hi(Ln);E.stringify;E.fromJSON;E.plugin;E.parse;E.list;E.document;E.comment;E.atRule;E.rule;E.decl;E.root;E.CssSyntaxError;E.Declaration;E.Container;E.Processor;E.Document;E.Comment;E.Warning;E.AtRule;E.Result;E.Input;E.Rule;E.Root;E.Node;const Zt={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Dn(i){let e=Zt[i.tagName]?Zt[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function De(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let r=i;try{r=E([Vi,Gi]).process(i).css}catch(s){console.warn("Failed to adapt css for replay",s)}return e==null||e.stylesWithHoverClass.set(i,r),r}function Tn(){return{stylesWithHoverClass:new Map}}function Un(i,e,t,r){const s=[];for(const n of i.childNodes)n.type===g.Text&&s.push(n);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>s.length;)o.splice(-2,2,o.slice(-2).join(""));for(let n=0;n<s.length;n++){const l=s[n],a=o[n];l&&a&&(l.textContent=t?De(a,r):a)}}function Fn(i,e,t,r){const{doc:s,hackCss:o,cache:n}=r;i.childNodes.length?Un(i,t,o,n):(o&&(t=De(t,n)),e.appendChild(s.createTextNode(t)))}function zn(i,e){var t;const{doc:r,hackCss:s,cache:o}=e;switch(i.type){case g.Document:return r.implementation.createDocument(null,"",null);case g.DocumentType:return r.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case g.Element:{const n=Dn(i);let l;i.isSVG?l=r.createElementNS("http://www.w3.org/2000/svg",n):(i.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(i.tagName)&&r.defaultView.customElements.define(i.tagName,class extends r.defaultView.HTMLElement{}),l=r.createElement(n));const a={};for(const u in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,u))continue;let f=i.attributes[u];if(!(n==="option"&&u==="selected"&&f===!1)&&f!==null){if(f===!0&&(f=""),u.startsWith("rr_")){a[u]=f;continue}if(typeof f=="string"){if(n==="style"&&u==="_cssText"){Fn(i,l,f,e);continue}else if(n==="textarea"&&u==="value"){l.appendChild(r.createTextNode(f)),i.childNodes=[];continue}}try{if(i.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,f.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,f.toString());else if(n==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",f.toString());continue}else n==="link"&&(i.attributes.rel==="preload"||i.attributes.rel==="modulepreload")&&i.attributes.as==="script"||n==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&i.attributes.href.endsWith(".js")||(n==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",i.attributes.srcset):l.setAttribute(u,f.toString()))}catch(h){}}}for(const u in a){const f=a[u];if(n==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=f.toString(),l.RRNodeType&&(l.rr_dataURL=f.toString())}else if(n==="img"&&u==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.attributes.src),h.src=f.toString())}if(u==="rr_width")l.style.setProperty("width",f.toString());else if(u==="rr_height")l.style.setProperty("height",f.toString());else if(u==="rr_mediaCurrentTime"&&typeof f=="number")l.currentTime=f;else if(u==="rr_mediaState")switch(f){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof f=="number"?l.playbackRate=f:u==="rr_mediaMuted"&&typeof f=="boolean"?l.muted=f:u==="rr_mediaLoop"&&typeof f=="boolean"?l.loop=f:u==="rr_mediaVolume"&&typeof f=="number"?l.volume=f:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",f)}if(i.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case g.Text:return i.isStyle&&s?r.createTextNode(De(i.textContent,o)):r.createTextNode(i.textContent);case g.CDATA:return r.createCDATASection(i.textContent);case g.Comment:return r.createComment(i.textContent);default:return null}}function Et(i,e){const{doc:t,mirror:r,skipChild:s=!1,hackCss:o=!0,afterAppend:n,cache:l}=e;if(r.has(i.id)){const u=r.getNode(i.id),f=r.getMeta(u);if(ar(f,i))return r.getNode(i.id)}let a=zn(i,{doc:t,hackCss:o,cache:l});if(!a)return null;if(i.rootId&&r.getNode(i.rootId)!==t&&r.replace(i.rootId,t),i.type===g.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==g.DocumentType&&(i.childNodes[0].type===g.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),r.add(a,i),(i.type===g.Document||i.type===g.Element)&&!s)for(const u of i.childNodes){const f=Et(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:l});if(!f){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Ae(a)&&a.shadowRoot)a.shadowRoot.appendChild(f);else if(i.type===g.Document&&u.type==g.Element){const h=f;let d=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(d=m)}),d?(h.removeChild(d),a.appendChild(f),h.appendChild(d)):a.appendChild(f)}else a.appendChild(f);n&&n(f,u.id)}return a}function Bn(i,e){function t(r){e(r)}for(const r of i.getIds())i.has(r)&&t(i.getNode(r))}function jn(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==g.Element)return;const r=i;for(const s in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,s)&&s.startsWith("rr_")))continue;const o=t.attributes[s];s==="rr_scrollLeft"&&(r.scrollLeft=o),s==="rr_scrollTop"&&(r.scrollTop=o)}}function Wn(i,e){const{doc:t,onVisit:r,hackCss:s=!0,afterAppend:o,cache:n,mirror:l=new _e}=e,a=Et(i,{doc:t,mirror:l,skipChild:!1,hackCss:s,afterAppend:o,cache:n});return Bn(l,u=>{r&&r(u),jn(u,l)}),a}exports.IGNORED_NODE=Ye;exports.Mirror=_e;exports.absolutifyURLs=ee;exports.adaptCssForReplay=De;exports.buildNodeWithSN=Et;exports.classMatchesRegex=Ee;exports.cleanupSnapshot=ji;exports.createCache=Tn;exports.createMirror=bi;exports.escapeImportStatement=tr;exports.extractFileExtension=ht;exports.fixSafariColons=ir;exports.genId=pr;exports.getInputType=ur;exports.ignoreAttribute=mr;exports.is2DCanvasBlank=lr;exports.isCSSImportRule=sr;exports.isCSSStyleRule=nr;exports.isElement=Ae;exports.isNativeShadowDom=be;exports.isNodeMetaEqual=ar;exports.isShadowRoot=er;exports.markCssSplits=cr;exports.maskInputValue=or;exports.needMaskingText=gr;exports.normalizeCssString=Se;exports.rebuild=Wn;exports.serializeNodeWithId=G;exports.snapshot=zi;exports.splitCssText=fr;exports.stringifyRule=rr;exports.stringifyStylesheet=ve;exports.toLowerCase=ne;exports.transformAttribute=dr;exports.visitSnapshot=Bi;
41
41
  if (typeof module.exports == "object" && typeof exports == "object") {
42
42
  var __cp = (to, from, except, desc) => {
43
43
  if ((from && typeof from === "object") || typeof from === "function") {