@posthog/rrweb-player 0.0.20

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.
@@ -0,0 +1,205 @@
1
+ (function (g, f) {
2
+ if ("object" == typeof exports && "object" == typeof module) {
3
+ module.exports = f();
4
+ } else if ("function" == typeof define && define.amd) {
5
+ define("rrwebPlayer", [], f);
6
+ } else if ("object" == typeof exports) {
7
+ exports["rrwebPlayer"] = f();
8
+ } else {
9
+ g["rrwebPlayer"] = f();
10
+ }
11
+ }(this, () => {
12
+ var exports = {};
13
+ var module = { exports };
14
+ "use strict";var Lo=Object.defineProperty,Fo=Object.defineProperties;var Bo=Object.getOwnPropertyDescriptors;var at=Object.getOwnPropertySymbols;var Oi=Object.prototype.hasOwnProperty,Ai=Object.prototype.propertyIsEnumerable;var Ni=(e,t,r)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q=(e,t)=>{for(var r in t||(t={}))Oi.call(t,r)&&Ni(e,r,t[r]);if(at)for(var r of at(t))Ai.call(t,r)&&Ni(e,r,t[r]);return e},le=(e,t)=>Fo(e,Bo(t));var He=(e,t)=>{var r={};for(var s in e)Oi.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&at)for(var s of at(e))t.indexOf(s)<0&&Ai.call(e,s)&&(r[s]=e[s]);return r};var Uo=Object.defineProperty,zo=(e,t,r)=>t in e?Uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Di=(e,t,r)=>zo(e,typeof t!="symbol"?t+"":t,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function et(){}function Pi(e,t){for(const r in t)e[r]=t[r];return e}function On(e){return e()}function Ti(){return Object.create(null)}function Ge(e){e.forEach(On)}function An(e){return typeof e=="function"}function si(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function qo(e){return Object.keys(e).length===0}function ki(e){const t={};for(const r in e)r[0]!=="$"&&(t[r]=e[r]);return t}function $(e,t){e.appendChild(t)}function Ee(e,t,r){e.insertBefore(t,r||null)}function ve(e){e.parentNode&&e.parentNode.removeChild(e)}function It(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function oe(e){return document.createElement(e)}function wt(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function De(e){return document.createTextNode(e)}function fe(){return De(" ")}function Wo(){return De("")}function ze(e,t,r,s){return e.addEventListener(t,r,s),()=>e.removeEventListener(t,r,s)}function F(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}function Vo(e){return Array.from(e.childNodes)}function vt(e,t){t=""+t,e.data!==t&&(e.data=t)}function ie(e,t,r,s){r==null?e.style.removeProperty(t):e.style.setProperty(t,r,"")}function Ve(e,t,r){e.classList.toggle(t,!!r)}function jo(e,t,{bubbles:r=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:s})}let tt;function Qe(e){tt=e}function xt(){if(!tt)throw new Error("Function called outside component initialization");return tt}function Dn(e){xt().$$.on_mount.push(e)}function Go(e){xt().$$.after_update.push(e)}function Pn(e){xt().$$.on_destroy.push(e)}function $o(){const e=xt();return(t,r,{cancelable:s=!1}={})=>{const i=e.$$.callbacks[t];if(i){const a=jo(t,r,{cancelable:s});return i.slice().forEach(o=>{o.call(e,a)}),!a.defaultPrevented}return!0}}const Le=[],Ae=[];let We=[];const Yr=[],Ho=Promise.resolve();let Jr=!1;function Yo(){Jr||(Jr=!0,Ho.then(Tn))}function Xr(e){We.push(e)}function Jo(e){Yr.push(e)}const Lt=new Set;let ke=0;function Tn(){if(ke!==0)return;const e=tt;do{try{for(;ke<Le.length;){const t=Le[ke];ke++,Qe(t),Xo(t.$$)}}catch(t){throw Le.length=0,ke=0,t}for(Qe(null),Le.length=0,ke=0;Ae.length;)Ae.pop()();for(let t=0;t<We.length;t+=1){const r=We[t];Lt.has(r)||(Lt.add(r),r())}We.length=0}while(Le.length);for(;Yr.length;)Yr.pop()();Jr=!1,Lt.clear(),Qe(e)}function Xo(e){if(e.fragment!==null){e.update(),Ge(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Xr)}}function Qo(e){const t=[],r=[];We.forEach(s=>e.indexOf(s)===-1?t.push(s):r.push(s)),r.forEach(s=>s()),We=t}const yt=new Set;let Oe;function kn(){Oe={r:0,c:[],p:Oe}}function In(){Oe.r||Ge(Oe.c),Oe=Oe.p}function Se(e,t){e&&e.i&&(yt.delete(e),e.i(t))}function je(e,t,r,s){if(e&&e.o){if(yt.has(e))return;yt.add(e),Oe.c.push(()=>{yt.delete(e),s&&(r&&e.d(1),s())}),e.o(t)}else s&&s()}function Ie(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Ko(e,t,r){const s=e.$$.props[t];s!==void 0&&(e.$$.bound[s]=r,r(e.$$.ctx[s]))}function Ln(e){e&&e.c()}function ni(e,t,r){const{fragment:s,after_update:i}=e.$$;s&&s.m(t,r),Xr(()=>{const a=e.$$.on_mount.map(On).filter(An);e.$$.on_destroy?e.$$.on_destroy.push(...a):Ge(a),e.$$.on_mount=[]}),i.forEach(Xr)}function oi(e,t){const r=e.$$;r.fragment!==null&&(Qo(r.after_update),Ge(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function Zo(e,t){e.$$.dirty[0]===-1&&(Le.push(e),Yo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ai(e,t,r,s,i,a,o=null,l=[-1]){const p=tt;Qe(e);const u=e.$$={fragment:null,ctx:[],props:a,update:et,not_equal:i,bound:Ti(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(p?p.$$.context:[])),callbacks:Ti(),dirty:l,skip_bound:!1,root:t.target||p.$$.root};o&&o(u.root);let n=!1;if(u.ctx=r?r(e,t.props||{},(h,c,...f)=>{const d=f.length?f[0]:c;return u.ctx&&i(u.ctx[h],u.ctx[h]=d)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](d),n&&Zo(e,h)),c}):[],u.update(),n=!0,Ge(u.before_update),u.fragment=s?s(u.ctx):!1,t.target){if(t.hydrate){const h=Vo(t.target);u.fragment&&u.fragment.l(h),h.forEach(ve)}else u.fragment&&u.fragment.c();t.intro&&Se(e.$$.fragment),ni(e,t.target,t.anchor),Tn()}Qe(p)}class li{constructor(){Di(this,"$$"),Di(this,"$$set")}$destroy(){oi(this,1),this.$destroy=et}$on(t,r){if(!An(r))return et;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(r),()=>{const i=s.indexOf(r);i!==-1&&s.splice(i,1)}}$set(t){this.$$set&&!qo(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ea="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ea);var ta=Object.defineProperty,ra=(e,t,r)=>t in e?ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t,r)=>ra(e,typeof t!="symbol"?t+"":t,r),Ii,ia=Object.defineProperty,sa=(e,t,r)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Li=(e,t,r)=>sa(e,typeof t!="symbol"?t+"":t,r),se=(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))(se||{});function na(e){return e.nodeType===e.ELEMENT_NODE}class Fn{constructor(){Li(this,"idNodeMap",new Map),Li(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Bn(){return new Fn}function oa(e){return e.toLowerCase()}function aa(e,t){return!e||!t||e.type!==t.type?!1:e.type===se.Document?e.compatMode===t.compatMode:e.type===se.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===se.Comment||e.type===se.Text||e.type===se.CDATA?e.textContent===t.textContent:e.type===se.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function la(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}const ua=/(max|min)-device-(width|height)/,Fi=new RegExp(ua.source,"g"),ca={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Fi)&&(e.params=e.params.replace(Fi,"$1-$2"))}}}},ha={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
15
+ `+r.replace(/:hover/g,".\\:hover"))}))}}}};function Un(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var lt={exports:{}},Bi;function pa(){if(Bi)return lt.exports;Bi=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 lt.exports=t(),lt.exports.createColors=t,lt.exports}const da={},ma=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),me=fa(ma);var Ft,Ui;function ui(){if(Ui)return Ft;Ui=1;let e=pa(),t=me;class r extends Error{constructor(i,a,o,l,p,u){super(i),this.name="CssSyntaxError",this.reason=i,p&&(this.file=p),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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 o=f=>f,l=f=>f,p=f=>f;if(i){let{bold:f,gray:d,red:m}=e.createColors(!0);l=g=>f(m(g)),o=g=>d(g),t&&(p=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),h=Math.min(this.line+2,u.length),c=String(h).length;return u.slice(n,h).map((f,d)=>{let m=n+1+d,g=" "+(" "+m).slice(-c)+" | ";if(m===this.line){if(f.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=f.slice(S,E),v=o(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+p(w)+`
16
+ `+v+l("^")}let b=o(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+p(f)+`
17
+ `+b+l("^")}return" "+o(g)+p(f)}).join(`
18
+ `)}toString(){let i=this.showSourceCode();return i&&(i=`
19
+
20
+ `+i+`
21
+ `),this.name+": "+this.message+i}}return Ft=r,r.default=r,Ft}var Bt,zi;function zn(){if(zi)return Bt;zi=1;const e={after:`
22
+ `,beforeClose:`
23
+ `,beforeComment:`
24
+ `,beforeDecl:`
25
+ `,beforeOpen:" ",beforeRule:`
26
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let p=(i.raws.between||"")+(a?";":"");this.builder(o+l+p,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,p=0;for(;l&&l.type!=="root";)p+=1,l=l.parent;if(o.includes(`
27
+ `)){let u=this.raw(i,null,"indent");if(u.length)for(let n=0;n<p;n++)o+=u}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let p=i.nodes[l],u=this.raw(p,"before");u&&this.builder(u),this.stringify(p,a!==l||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),a&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,a,o){let l;if(o||(o=a),a&&(l=i.raws[a],typeof l!="undefined"))return l;let p=i.parent;if(o==="before"&&(!p||p.type==="root"&&p.first===i||p&&p.type==="document"))return"";if(!p)return e[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]!="undefined")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?l=this[n](u,i):u.walk(h=>{if(l=h.raws[a],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=e[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
28
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
29
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
30
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
31
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let p=o.raws.before.split(`
32
+ `);return a=p[p.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Bt=r,r.default=r,Bt}var Ut,qi;function Rt(){if(qi)return Ut;qi=1;let e=zn();function t(r,s){new e(s).stringify(r)}return Ut=t,t.default=t,Ut}var ut={},Wi;function ci(){return Wi||(Wi=1,ut.isClean=Symbol("isClean"),ut.my=Symbol("my")),ut}var zt,Vi;function Mt(){if(Vi)return zt;Vi=1;let e=ui(),t=zn(),r=Rt(),{isClean:s,my:i}=ci();function a(p,u){let n=new p.constructor;for(let h in p){if(!Object.prototype.hasOwnProperty.call(p,h)||h==="proxyCache")continue;let c=p[h],f=typeof c;h==="parent"&&f==="object"?u&&(n[h]=u):h==="source"?n[h]=c:Array.isArray(c)?n[h]=c.map(d=>a(d,n)):(f==="object"&&c!==null&&(c=a(c)),n[h]=c)}return n}function o(p,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,h=1,c=0;for(let f=0;f<p.length;f++){if(h===u.line&&n===u.column){c=f;break}p[f]===`
33
+ `?(n=1,h+=1):n+=1}return c}class l{constructor(u={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in u)if(n==="nodes"){this.nodes=[];for(let h of u[n])typeof h.clone=="function"?this.append(h.clone()):this.append(h)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=a(this);for(let h in u)n[h]=u[h];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:h,start:c}=this.rangeBy(n);return this.source.input.error(u,{column:c.column,line:c.line},{column:h.column,line:h.line},n)}return new e(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,h){return u[n]===h||(u[n]=h,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let u=this;for(;u=u.parent;)u[s]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u){let n=this.source.start;if(u.index)n=this.positionInside(u.index);else if(u.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,f=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(u.word);f!==-1&&(n=this.positionInside(f))}return n}positionInside(u){let n=this.source.start.column,h=this.source.start.line,c="document"in this.source.input?this.source.input.document:this.source.input.css,f=o(c,this.source.start),d=f+u;for(let m=f;m<d;m++)c[m]===`
34
+ `?(n=1,h+=1):n+=1;return{column:n,line:h}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},h=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,d=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(u.word);d!==-1&&(n=this.positionInside(d),h=this.positionInside(d+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?h={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?h=this.positionInside(u.endIndex):u.index&&(h=this.positionInside(u.index+1));return(h.line<n.line||h.line===n.line&&h.column<=n.column)&&(h={column:n.column+1,line:n.line}),{end:h,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,h=!1;for(let c of u)c===this?h=!0:h?(this.parent.insertAfter(n,c),n=c):this.parent.insertBefore(n,c);h||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let h={},c=n==null;n=n||new Map;let f=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let m=this[d];if(Array.isArray(m))h[d]=m.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof m=="object"&&m.toJSON)h[d]=m.toJSON(null,n);else if(d==="source"){let g=n.get(m.input);g==null&&(g=f,n.set(m.input,f),f++),h[d]={end:m.end,inputId:g,start:m.start}}else h[d]=m}return c&&(h.inputs=[...n.keys()].map(d=>d.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,h=>{n+=h}),n}warn(u,n,h){let c={node:this};for(let f in h)c[f]=h[f];return u.warn(n,c)}get proxyOf(){return this}}return zt=l,l.default=l,zt}var qt,ji;function rt(){if(ji)return qt;ji=1;let e=Mt();class t extends e{constructor(s){super(s),this.type="comment"}}return qt=t,t.default=t,qt}var Wt,Gi;function _t(){if(Gi)return Wt;Gi=1;let e=Mt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=le(Q({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Wt=t,t.default=t,Wt}var Vt,$i;function Pe(){if($i)return Vt;$i=1;let e=rt(),t=_t(),r=Mt(),{isClean:s,my:i}=ci(),a,o,l,p;function u(c){return c.map(f=>(f.nodes&&(f.nodes=u(f.nodes)),delete f.source,f))}function n(c){if(c[s]=!1,c.proxyOf.nodes)for(let f of c.proxyOf.nodes)n(f)}class h extends r{append(...f){for(let d of f){let m=this.normalize(d,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let d of this.nodes)d.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let d=this.getIterator(),m,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(m=this.indexes[d],g=f(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,d){return d==="proxyOf"?f:f[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...m)=>f[d](...m.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):d==="every"||d==="some"?m=>f[d]((g,...b)=>m(g.toProxy(),...b)):d==="root"?()=>f.root().toProxy():d==="nodes"?f.nodes.map(m=>m.toProxy()):d==="first"||d==="last"?f[d].toProxy():f[d]:f[d]},set(f,d,m){return f[d]===m||(f[d]=m,(d==="name"||d==="params"||d==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,d){let m=this.index(f),g=this.normalize(d,this.proxyOf.nodes[m]).reverse();m=this.index(f);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],m<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(f,d){let m=this.index(f),g=m===0?"prepend":!1,b=this.normalize(d,this.proxyOf.nodes[m],g).reverse();m=this.index(f);for(let S of b)this.proxyOf.nodes.splice(m,0,S);let y;for(let S in this.indexes)y=this.indexes[S],m<=y&&(this.indexes[S]=y+b.length);return this.markDirty(),this}normalize(f,d){if(typeof f=="string")f=u(o(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new t(f)]}else if(f.selector||f.selectors)f=[new p(f)];else if(f.name)f=[new a(f)];else if(f.text)f=[new e(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[i]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&d&&typeof d.raws.before!="undefined"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let d of f){let m=this.normalize(d,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let d;for(let m in this.indexes)d=this.indexes[m],d>=f&&(this.indexes[m]=d-1);return this.markDirty(),this}replaceValues(f,d,m){return m||(m=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(f,m))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((d,m)=>{let g;try{g=f(d,m)}catch(b){throw d.addToError(b)}return g!==!1&&d.walk&&(g=d.walk(f)),g})}walkAtRules(f,d){return d?f instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&f.test(m.name))return d(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===f)return d(m,g)}):(d=f,this.walk((m,g)=>{if(m.type==="atrule")return d(m,g)}))}walkComments(f){return this.walk((d,m)=>{if(d.type==="comment")return f(d,m)})}walkDecls(f,d){return d?f instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&f.test(m.prop))return d(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===f)return d(m,g)}):(d=f,this.walk((m,g)=>{if(m.type==="decl")return d(m,g)}))}walkRules(f,d){return d?f instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&f.test(m.selector))return d(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===f)return d(m,g)}):(d=f,this.walk((m,g)=>{if(m.type==="rule")return d(m,g)}))}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]}}return h.registerParse=c=>{o=c},h.registerRule=c=>{p=c},h.registerAtRule=c=>{a=c},h.registerRoot=c=>{l=c},Vt=h,h.default=h,h.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,p.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[i]=!0,c.nodes&&c.nodes.forEach(f=>{h.rebuild(f)})},Vt}var jt,Hi;function hi(){if(Hi)return jt;Hi=1;let e=Pe();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return jt=t,t.default=t,e.registerAtRule(t),jt}var Gt,Yi;function fi(){if(Yi)return Gt;Yi=1;let e=Pe(),t,r;class s extends e{constructor(a){super(Q({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Gt=s,s.default=s,Gt}var $t,Ji;function ga(){if(Ji)return $t;Ji=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return $t={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},$t}var Ht,Xi;function qn(){if(Xi)return Ht;Xi=1;let{existsSync:e,readFileSync:t}=me,{dirname:r,join:s}=me,{SourceMapConsumer:i,SourceMapGenerator:a}=me;function o(p){return Buffer?Buffer.from(p,"base64").toString():window.atob(p)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=n.map?n.map.prev:void 0,c=this.loadMap(n.from,h);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/,d=u.match(c)||u.match(f);if(d)return decodeURIComponent(u.substr(d[0].length));let m=u.match(n)||u.match(h);if(m)return o(u.substr(m[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let h=u.lastIndexOf(n.pop()),c=u.indexOf("*/",h);h>-1&&c>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,c)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let h=n(u);if(h){let c=this.loadFile(h);if(!c)throw new Error("Unable to load previous source map: "+h.toString());return c}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=s(r(u),h)),this.loadFile(h)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ht=l,l.default=l,Ht}var Yt,Qi;function Nt(){if(Qi)return Yt;Qi=1;let{nanoid:e}=ga(),{isAbsolute:t,resolve:r}=me,{SourceMapConsumer:s,SourceMapGenerator:i}=me,{fileURLToPath:a,pathToFileURL:o}=me,l=ui(),p=qn(),u=me,n=Symbol("fromOffsetCache"),h=!!(s&&i),c=!!(r&&t);class f{constructor(m,g={}){if(m===null||typeof m=="undefined"||typeof m=="object"&&!m.toString)throw new Error(`PostCSS received ${m} instead of CSS string`);if(this.css=m.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!c||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),c&&h){let b=new p(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(m,g,b,y={}){let S,E,w;if(g&&typeof g=="object"){let C=g,x=b;if(typeof C.offset=="number"){let A=this.fromOffset(C.offset);g=A.line,b=A.col}else g=C.line,b=C.column;if(typeof x.offset=="number"){let A=this.fromOffset(x.offset);E=A.line,S=A.col}else E=x.line,S=x.column}else if(!b){let C=this.fromOffset(g);g=C.line,b=C.col}let v=this.origin(g,b,E,S);return v?w=new l(m,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,y.plugin):w=new l(m,E===void 0?g:{column:b,line:g},E===void 0?b:{column:S,line:E},this.css,this.file,y.plugin),w.input={column:b,endColumn:S,endLine:E,line:g,source:this.css},this.file&&(o&&(w.input.url=o(this.file).toString()),w.input.file=this.file),w}fromOffset(m){let g,b;if(this[n])b=this[n];else{let S=this.css.split(`
35
+ `);b=new Array(S.length);let E=0;for(let w=0,v=S.length;w<v;w++)b[w]=E,E+=S[w].length+1;this[n]=b}g=b[b.length-1];let y=0;if(m>=g)y=b.length-1;else{let S=b.length-2,E;for(;y<S;)if(E=y+(S-y>>1),m<b[E])S=E-1;else if(m>=b[E+1])y=E+1;else{y=E;break}}return{col:m-b[y]+1,line:y+1}}mapResolve(m){return/^\w+:\/\//.test(m)?m:r(this.map.consumer().sourceRoot||this.map.root||".",m)}origin(m,g,b,y){if(!this.map)return!1;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:m});if(!E.source)return!1;let w;typeof b=="number"&&(w=S.originalPositionFor({column:y,line:b}));let v;t(E.source)?v=o(E.source):v=new URL(E.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:v.toString()};if(v.protocol==="file:")if(a)C.file=a(v);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let m={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(m[g]=this[g]);return this.map&&(m.map=Q({},this.map),m.map.consumerCache&&(m.map.consumerCache=void 0)),m}get from(){return this.file||this.id}}return Yt=f,f.default=f,u&&u.registerInput&&u.registerInput(f),Yt}var Jt,Ki;function it(){if(Ki)return Jt;Ki=1;let e=Pe(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let p=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of p)u.raws.before=o.raws.before}return p}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Jt=s,s.default=s,e.registerRoot(s),Jt}var Xt,Zi;function Wn(){if(Zi)return Xt;Zi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
36
+ `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,p=!1,u="",n=!1;for(let h of t)n?n=!1:h==="\\"?n=!0:p?h===u&&(p=!1):h==='"'||h==="'"?(p=!0,u=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=h;return(s||a!=="")&&i.push(a.trim()),i}};return Xt=e,e.default=e,Xt}var Qt,es;function pi(){if(es)return Qt;es=1;let e=Pe(),t=Wn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Qt=r,r.default=r,e.registerRule(r),Qt}var Kt,ts;function ya(){if(ts)return Kt;ts=1;let e=hi(),t=rt(),r=_t(),s=Nt(),i=qn(),a=it(),o=pi();function l(p,u){if(Array.isArray(p))return p.map(d=>l(d));let c=p,{inputs:n}=c,h=He(c,["inputs"]);if(n){u=[];for(let d of n){let m=le(Q({},d),{__proto__:s.prototype});m.map&&(m.map=le(Q({},m.map),{__proto__:i.prototype})),u.push(m)}}if(h.nodes&&(h.nodes=p.nodes.map(d=>l(d,u))),h.source){let f=h.source,{inputId:d}=f,m=He(f,["inputId"]);h.source=m,d!=null&&(h.source.input=u[d])}if(h.type==="root")return new a(h);if(h.type==="decl")return new r(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new t(h);if(h.type==="atrule")return new e(h);throw new Error("Unknown node type: "+p.type)}return Kt=l,l.default=l,Kt}var Zt,rs;function Vn(){if(rs)return Zt;rs=1;let{dirname:e,relative:t,resolve:r,sep:s}=me,{SourceMapConsumer:i,SourceMapGenerator:a}=me,{pathToFileURL:o}=me,l=Nt(),p=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(c,f,d,m){this.stringify=c,this.mapOpts=d.map||{},this.root=f,this.opts=d,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let f=`
37
+ `;this.css.includes(`\r
38
+ `)&&(f=`\r
39
+ `),this.css+=f+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let f=this.toUrl(this.path(c.file)),d=c.root||e(c.file),m;this.mapOpts.sourcesContent===!1?(m=new i(c.text),m.sourcesContent&&(m.sourcesContent=null)):m=c.consumer(),this.map.applySourceMap(m,f,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let f=this.root.nodes.length-1;f>=0;f--)c=this.root.nodes[f],c.type==="comment"&&c.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&p&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,f=>{c+=f}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=a.fromSourceMap(c,{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 c=1,f=1,d="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,S,E)=>{if(this.css+=y,S&&E!=="end"&&(m.generated.line=c,m.generated.column=f-1,S.source&&S.source.start?(m.source=this.sourcePath(S),m.original.line=S.source.start.line,m.original.column=S.source.start.column-1,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,this.map.addMapping(m))),b=y.match(/\n/g),b?(c+=b.length,g=y.lastIndexOf(`
40
+ `),f=y.length-g):f+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=c,m.generated.column=f-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=c,m.generated.column=f-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c!="undefined"&&c!==!0?!1:this.previous().length?this.previous().some(f=>f.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(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let f=this.memoizedPaths.get(c);if(f)return f;let d=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=e(r(d,this.mapOpts.annotation)));let m=t(d,c);return this.memoizedPaths.set(c,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let f=c.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let c=new l(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(f=>{if(f.source){let d=f.source.input.from;if(d&&!c[d]){c[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let f=this.memoizedFileURLs.get(c);if(f)return f;if(o){let d=o(c).toString();return this.memoizedFileURLs.set(c,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let f=this.memoizedURLs.get(c);if(f)return f;s==="\\"&&(c=c.replace(/\\/g,"/"));let d=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,d),d}}return Zt=n,Zt}var er,is;function jn(){if(is)return er;is=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,p=13,u=91,n=93,h=40,c=41,f=123,d=125,m=59,g=42,b=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return er=function(x,A={}){let M=x.css.valueOf(),B=A.ignoreErrors,k,J,U,R,q,I,j,H,z,X,ae=M.length,_=0,D=[],O=[];function N(){return _}function P(re){throw x.error("Unclosed "+re,_)}function V(){return O.length===0&&_>=ae}function ue(re){if(O.length)return O.pop();if(_>=ae)return;let be=re?re.ignoreUnclosed:!1;switch(k=M.charCodeAt(_),k){case i:case a:case l:case p:case o:{R=_;do R+=1,k=M.charCodeAt(R);while(k===a||k===i||k===l||k===p||k===o);I=["space",M.slice(_,R)],_=R-1;break}case u:case n:case f:case d:case b:case m:case c:{let Ne=String.fromCharCode(k);I=[Ne,Ne,_];break}case h:{if(X=D.length?D.pop()[1]:"",z=M.charCodeAt(_+1),X==="url"&&z!==e&&z!==t&&z!==a&&z!==i&&z!==l&&z!==o&&z!==p){R=_;do{if(j=!1,R=M.indexOf(")",R+1),R===-1)if(B||be){R=_;break}else P("bracket");for(H=R;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["brackets",M.slice(_,R+1),_,R],_=R}else R=M.indexOf(")",_+1),J=M.slice(_,R+1),R===-1||w.test(J)?I=["(","(",_]:(I=["brackets",J,_,R],_=R);break}case e:case t:{q=k===e?"'":'"',R=_;do{if(j=!1,R=M.indexOf(q,R+1),R===-1)if(B||be){R=_+1;break}else P("string");for(H=R;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["string",M.slice(_,R+1),_,R],_=R;break}case y:{S.lastIndex=_+1,S.test(M),S.lastIndex===0?R=M.length-1:R=S.lastIndex-2,I=["at-word",M.slice(_,R+1),_,R],_=R;break}case r:{for(R=_,U=!0;M.charCodeAt(R+1)===r;)R+=1,U=!U;if(k=M.charCodeAt(R+1),U&&k!==s&&k!==a&&k!==i&&k!==l&&k!==p&&k!==o&&(R+=1,v.test(M.charAt(R)))){for(;v.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}I=["word",M.slice(_,R+1),_,R],_=R;break}default:{k===s&&M.charCodeAt(_+1)===g?(R=M.indexOf("*/",_+2)+1,R===0&&(B||be?R=M.length:P("comment")),I=["comment",M.slice(_,R+1),_,R],_=R):(E.lastIndex=_+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,I=["word",M.slice(_,R+1),_,R],D.push(I),_=R);break}}return _++,I}function ce(re){O.push(re)}return{back:ce,endOfFile:V,nextToken:ue,position:N}},er}var tr,ss;function Gn(){if(ss)return tr;ss=1;let e=hi(),t=rt(),r=_t(),s=it(),i=pi(),a=jn();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let h=u[n],c=h[3]||h[2];if(c)return c}}class p{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let h=new e;h.name=n[1].slice(1),h.name===""&&this.unnamedAtrule(h,n),this.init(h,n[2]);let c,f,d,m=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),c=n[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){h.source.end=this.getPosition(n[2]),h.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(b.length>0){for(d=b.length-1,f=b[d];f&&f[0]==="space";)f=b[--d];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){m=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(h.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(h,"params",b),m&&(n=b[b.length-1],h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(n){let h=this.colon(n);if(h===!1)return;let c=0,f;for(let d=h-1;d>=0&&(f=n[d],!(f[0]!=="space"&&(c+=1,c===2)));d--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let h=0,c,f,d;for(let[m,g]of n.entries()){if(f=g,d=f[0],d==="("&&(h+=1),d===")"&&(h-=1),h===0&&d===":")if(!c)this.doubleColon(f);else{if(c[0]==="word"&&c[1]==="progid")continue;return m}c=f}return!1}comment(n){let h=new t;this.init(h,n[2]),h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++;let c=n[1].slice(2,-2);if(/^\s*$/.test(c))h.text="",h.raws.left=c,h.raws.right="";else{let f=c.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,h){let c=new r;this.init(c,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),c.source.end=this.getPosition(f[3]||f[2]||l(n)),c.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),c.raws.before+=n.shift()[1];for(c.source.start=this.getPosition(n[0][2]),c.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=n.shift()[1]}c.raws.between="";let d;for(;n.length;)if(d=n.shift(),d[0]===":"){c.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),c.raws.between+=d[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let m=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)m.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(d=n[y],d[1].toLowerCase()==="!important"){c.important=!0;let S=this.stringFrom(n,y);S=this.spacesFromEnd(n)+S,S!==" !important"&&(c.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let w=y;w>0;w--){let v=S[w][0];if(E.trim().startsWith("!")&&v!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(c.important=!0,c.raws.important=E,n=S)}if(d[0]!=="space"&&d[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=m.map(y=>y[1]).join(""),m=[]),this.raw(c,"value",m.concat(n),h),c.value.includes(":")&&!h&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let h=new i;this.init(h,n[2]),h.selector="",h.raws.between="",this.current=h}end(n){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(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}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(n){if(this.spaces+=n[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let h=this.input.fromOffset(n);return{column:h.col,line:h.line,offset:n}}init(n,h){this.current.push(n),n.source={input:this.input,start:this.getPosition(h)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let h=!1,c=null,f=!1,d=null,m=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(c=y[0],b.push(y),c==="("||c==="[")d||(d=y),m.push(c==="("?")":"]");else if(g&&f&&c==="{")d||(d=y),m.push("}");else if(m.length===0)if(c===";")if(f){this.decl(b,g);return}else break;else if(c==="{"){this.rule(b);return}else if(c==="}"){this.tokenizer.back(b.pop()),h=!0;break}else c===":"&&(f=!0);else c===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),m.length>0&&this.unclosedBracket(d),h&&f){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,h,c,f){let d,m,g=c.length,b="",y=!0,S,E;for(let w=0;w<g;w+=1)d=c[w],m=d[0],m==="space"&&w===g-1&&!f?y=!1:m==="comment"?(E=c[w-1]?c[w-1][0]:"empty",S=c[w+1]?c[w+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?y=!1:b+=d[1]:y=!1):b+=d[1];if(!y){let w=c.reduce((v,C)=>v+C[1],"");n.raws[h]={raw:w,value:b}}n[h]=b}rule(n){n.pop();let h=new i;this.init(h,n[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(h,"selector",n),this.current=h}spacesAndCommentsFromEnd(n){let h,c="";for(;n.length&&(h=n[n.length-1][0],!(h!=="space"&&h!=="comment"));)c=n.pop()[1]+c;return c}spacesAndCommentsFromStart(n){let h,c="";for(;n.length&&(h=n[0][0],!(h!=="space"&&h!=="comment"));)c+=n.shift()[1];return c}spacesFromEnd(n){let h,c="";for(;n.length&&(h=n[n.length-1][0],h==="space");)c=n.pop()[1]+c;return c}stringFrom(n,h){let c="";for(let f=h;f<n.length;f++)c+=n[f][1];return n.splice(h,n.length-h),c}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return tr=p,tr}var rr,ns;function di(){if(ns)return rr;ns=1;let e=Pe(),t=Nt(),r=Gn();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(p){throw p}return l.root}return rr=s,s.default=s,e.registerParse(s),rr}var ir,os;function $n(){if(os)return ir;os=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[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 ir=e,e.default=e,ir}var sr,as;function mi(){if(as)return sr;as=1;let e=$n();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return sr=t,t.default=t,sr}var nr,ls;function Hn(){if(ls)return nr;ls=1;let e={};return nr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},nr}var or,us;function Yn(){if(us)return or;us=1;let e=Pe(),t=fi(),r=Vn(),s=di(),i=mi(),a=it(),o=Rt(),{isClean:l,my:p}=ci(),u=Hn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},c={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let w=!1,v=n[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,f,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,f,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",f,"DocumentExit"]:E.type==="root"?w=["Root",f,"RootExit"]:w=m(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[l]=!1,E.nodes&&E.nodes.forEach(w=>b(w)),E}let y={};class S{constructor(w,v,C){this.stringified=!1,this.processed=!1;let x;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))x=b(v);else if(v instanceof S||v instanceof i)x=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=s;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{x=A(v,C)}catch(M){this.processed=!0,this.error=M}x&&!x[p]&&e.rebuild(x)}this.result=new i(w,x,C),this.helpers=le(Q({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?Q(Q({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return w}prepareVisitors(){this.listeners={};let w=(v,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,x])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[C])if(typeof v[C]=="object")for(let x in v[C])x==="*"?w(v,C,v[C][x]):w(v,C+"-"+x.toLowerCase(),v[C][x]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(d(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];){w[l]=!0;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(x){let A=v[v.length-1].node;throw this.handleError(x,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let x=w.nodes.map(A=>C(A,this.helpers));await Promise.all(x)}else await C(w,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=o;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let x=new r(v,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 w of this.plugins){let v=this.runOnRoot(w);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];)w[l]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,x]of w){this.result.lastPlugin=C;let A;try{A=x(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:x}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(x.length>0&&v.visitorIndex<x.length){let[M,B]=x[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===x.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return B(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,B;for(;B=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!B[l]){B[l]=!0,w.push(g(B));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===f){C.nodes&&C.nodes.length&&(C[l]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop()}walkSync(w){w[l]=!0;let v=m(w);for(let C of v)if(C===f)w.nodes&&w.each(x=>{x[l]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,w.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"}}return S.registerPostcss=E=>{y=E},or=S,S.default=S,a.registerLazyResult(S),t.registerLazyResult(S),or}var ar,cs;function wa(){if(cs)return ar;cs=1;let e=Vn(),t=di();const r=mi();let s=Rt(),i=Hn();class a{constructor(l,p,u){p=p.toString(),this.stringified=!1,this._processor=l,this._css=p,this._opts=u,this._map=void 0;let n,h=s;this.result=new r(this._processor,n,this._opts),this.result.css=p;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,n,this._opts,p);if(f.isMap()){let[d,m]=f.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,p){return this.async().then(l,p)}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 l,p=t;try{l=p(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return ar=a,a.default=a,ar}var lr,hs;function va(){if(hs)return lr;hs=1;let e=fi(),t=Yn(),r=wa(),s=it();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))l=l.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)l.push(p);else if(typeof p=="function")l.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return lr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),lr}var ur,fs;function Jn(){if(fs)return ur;fs=1;let e=hi(),t=rt(),r=Pe(),s=ui(),i=_t(),a=fi(),o=ya(),l=Nt(),p=Yn(),u=Wn(),n=Mt(),h=di(),c=va(),f=mi(),d=it(),m=pi(),g=Rt(),b=$n();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new c(S)}return y.plugin=function(E,w){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
41
+ 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:
42
+ https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.postcssVersion=new c().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(A,M,B){return y([C(B)]).process(A,M)},C},y.stringify=g,y.parse=h,y.fromJSON=o,y.list=u,y.comment=S=>new t(S),y.atRule=S=>new e(S),y.decl=S=>new i(S),y.rule=S=>new m(S),y.root=S=>new d(S),y.document=S=>new a(S),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=f,y.Input=l,y.Rule=m,y.Root=d,y.Node=n,p.registerPostcss(y),ur=y,y.default=y,ur}var cr,ps;function ba(){if(ps)return cr;ps=1;let e=rt(),t=Gn(),r=jn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let p=a[1].slice(2);if(p.slice(-2)==="*/"&&(p=p.slice(0,-2)),/^\s*$/.test(p))o.text="",o.raws.left=p,o.raws.right="";else{let u=p.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[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 o=this.colon(a);if(o===!1)return;let l,p;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(p=l-1;p>=0;p--)if(a[p][0]!=="space"){p+=1;break}let u=a.slice(l),n=a.slice(p,l);a.splice(p,a.length-p),this.spaces=n.map(h=>h[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return cr=s,cr}var hr,ds;function Sa(){if(ds)return hr;ds=1;let{Input:e}=Jn(),t=ba();return hr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},hr}var Ea=Sa();const Ca=Un(Ea);var xa=Jn();const Z=Un(xa);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;const ms={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 Ra(e){let t=ms[e.tagName]?ms[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function gs(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Z([ca,ha]).process(e,{parser:Ca}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function ys(){return{stylesWithHoverClass:new Map}}function Ma(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case se.Document:return s.implementation.createDocument(null,"",null);case se.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case se.Element:{const o=Ra(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const p={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let n=e.attributes[u];if(o==="option"&&u==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),u.startsWith("rr_")){p[u]=n;continue}const h=o==="textarea"&&u==="value",c=o==="style"&&u==="_cssText";if(c&&i&&typeof n=="string"&&(n=gs(n,a)),(h||c)&&typeof n=="string"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,n.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&la(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,n.toString()))}catch(f){}}for(const u in p){const n=p[u];if(o==="canvas"&&u==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const c=l.getContext("2d");c&&c.drawImage(h,0,0,h.width,h.height)},h.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",e.attributes.src),h.src=n.toString())}if(u==="rr_width")l.style.setProperty("width",n.toString());else if(u==="rr_height")l.style.setProperty("height",n.toString());else if(u==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(u==="rr_mediaState")switch(n){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:u==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:u==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:u==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case se.Text:return s.createTextNode(e.isStyle&&i?gs(e.textContent,a):e.textContent);case se.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case se.Comment:return s.createComment(e.textContent);default:return null}}function Ke(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const u=s.getNode(e.id),n=s.getMeta(u);if(aa(n,e))return s.getNode(e.id)}let p=Ma(e,{doc:r,hackCss:a,cache:l});if(!p)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===se.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==se.DocumentType&&(e.childNodes[0].type===se.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),p=r),s.add(p,e),(e.type===se.Document||e.type===se.Element)&&!i)for(const u of e.childNodes){const n=Ke(u,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&na(p)&&p.shadowRoot)p.shadowRoot.appendChild(n);else if(e.type===se.Document&&u.type==se.Element){const h=n;let c=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(c=f)}),c?(h.removeChild(c),p.appendChild(n),h.appendChild(c)):p.appendChild(n)}else p.appendChild(n);o&&o(n,u.id)}return p}function _a(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function Na(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==se.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function Oa(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new Fn}=t,p=Ke(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return _a(l,u=>{s&&s(u),Na(u,l)}),p}var Aa=Object.defineProperty,Da=(e,t,r)=>t in e?Aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>Da(e,typeof t!="symbol"?t+"":t,r),Pa=Object.defineProperty,Ta=(e,t,r)=>t in e?Pa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ws=(e,t,r)=>Ta(e,typeof t!="symbol"?t+"":t,r);let ka=class{constructor(){ws(this,"idNodeMap",new Map),ws(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ia(){return new ka}function La(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var ct={exports:{}},vs;function Ba(){if(vs)return ct.exports;vs=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 ct.exports=t(),ct.exports.createColors=t,ct.exports}const Ua={},za=Object.freeze(Object.defineProperty({__proto__:null,default:Ua},Symbol.toStringTag,{value:"Module"})),ge=Fa(za);var fr,bs;function gi(){if(bs)return fr;bs=1;let e=Ba(),t=ge;class r extends Error{constructor(i,a,o,l,p,u){super(i),this.name="CssSyntaxError",this.reason=i,p&&(this.file=p),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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 o=f=>f,l=f=>f,p=f=>f;if(i){let{bold:f,gray:d,red:m}=e.createColors(!0);l=g=>f(m(g)),o=g=>d(g),t&&(p=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),h=Math.min(this.line+2,u.length),c=String(h).length;return u.slice(n,h).map((f,d)=>{let m=n+1+d,g=" "+(" "+m).slice(-c)+" | ";if(m===this.line){if(f.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=f.slice(S,E),v=o(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+p(w)+`
43
+ `+v+l("^")}let b=o(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+p(f)+`
44
+ `+b+l("^")}return" "+o(g)+p(f)}).join(`
45
+ `)}toString(){let i=this.showSourceCode();return i&&(i=`
46
+
47
+ `+i+`
48
+ `),this.name+": "+this.message+i}}return fr=r,r.default=r,fr}var pr,Ss;function Xn(){if(Ss)return pr;Ss=1;const e={after:`
49
+ `,beforeClose:`
50
+ `,beforeComment:`
51
+ `,beforeDecl:`
52
+ `,beforeOpen:" ",beforeRule:`
53
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let p=(i.raws.between||"")+(a?";":"");this.builder(o+l+p,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,p=0;for(;l&&l.type!=="root";)p+=1,l=l.parent;if(o.includes(`
54
+ `)){let u=this.raw(i,null,"indent");if(u.length)for(let n=0;n<p;n++)o+=u}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let p=i.nodes[l],u=this.raw(p,"before");u&&this.builder(u),this.stringify(p,a!==l||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),a&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,a,o){let l;if(o||(o=a),a&&(l=i.raws[a],typeof l!="undefined"))return l;let p=i.parent;if(o==="before"&&(!p||p.type==="root"&&p.first===i||p&&p.type==="document"))return"";if(!p)return e[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]!="undefined")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?l=this[n](u,i):u.walk(h=>{if(l=h.raws[a],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=e[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
55
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
56
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
57
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
58
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let p=o.raws.before.split(`
59
+ `);return a=p[p.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return pr=r,r.default=r,pr}var dr,Es;function Ot(){if(Es)return dr;Es=1;let e=Xn();function t(r,s){new e(s).stringify(r)}return dr=t,t.default=t,dr}var ht={},Cs;function yi(){return Cs||(Cs=1,ht.isClean=Symbol("isClean"),ht.my=Symbol("my")),ht}var mr,xs;function At(){if(xs)return mr;xs=1;let e=gi(),t=Xn(),r=Ot(),{isClean:s,my:i}=yi();function a(p,u){let n=new p.constructor;for(let h in p){if(!Object.prototype.hasOwnProperty.call(p,h)||h==="proxyCache")continue;let c=p[h],f=typeof c;h==="parent"&&f==="object"?u&&(n[h]=u):h==="source"?n[h]=c:Array.isArray(c)?n[h]=c.map(d=>a(d,n)):(f==="object"&&c!==null&&(c=a(c)),n[h]=c)}return n}function o(p,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,h=1,c=0;for(let f=0;f<p.length;f++){if(h===u.line&&n===u.column){c=f;break}p[f]===`
60
+ `?(n=1,h+=1):n+=1}return c}class l{constructor(u={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in u)if(n==="nodes"){this.nodes=[];for(let h of u[n])typeof h.clone=="function"?this.append(h.clone()):this.append(h)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=a(this);for(let h in u)n[h]=u[h];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:h,start:c}=this.rangeBy(n);return this.source.input.error(u,{column:c.column,line:c.line},{column:h.column,line:h.line},n)}return new e(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,h){return u[n]===h||(u[n]=h,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let u=this;for(;u=u.parent;)u[s]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u){let n=this.source.start;if(u.index)n=this.positionInside(u.index);else if(u.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,f=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(u.word);f!==-1&&(n=this.positionInside(f))}return n}positionInside(u){let n=this.source.start.column,h=this.source.start.line,c="document"in this.source.input?this.source.input.document:this.source.input.css,f=o(c,this.source.start),d=f+u;for(let m=f;m<d;m++)c[m]===`
61
+ `?(n=1,h+=1):n+=1;return{column:n,line:h}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},h=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,d=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(u.word);d!==-1&&(n=this.positionInside(d),h=this.positionInside(d+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?h={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?h=this.positionInside(u.endIndex):u.index&&(h=this.positionInside(u.index+1));return(h.line<n.line||h.line===n.line&&h.column<=n.column)&&(h={column:n.column+1,line:n.line}),{end:h,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,h=!1;for(let c of u)c===this?h=!0:h?(this.parent.insertAfter(n,c),n=c):this.parent.insertBefore(n,c);h||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let h={},c=n==null;n=n||new Map;let f=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let m=this[d];if(Array.isArray(m))h[d]=m.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof m=="object"&&m.toJSON)h[d]=m.toJSON(null,n);else if(d==="source"){let g=n.get(m.input);g==null&&(g=f,n.set(m.input,f),f++),h[d]={end:m.end,inputId:g,start:m.start}}else h[d]=m}return c&&(h.inputs=[...n.keys()].map(d=>d.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,h=>{n+=h}),n}warn(u,n,h){let c={node:this};for(let f in h)c[f]=h[f];return u.warn(n,c)}get proxyOf(){return this}}return mr=l,l.default=l,mr}var gr,Rs;function st(){if(Rs)return gr;Rs=1;let e=At();class t extends e{constructor(s){super(s),this.type="comment"}}return gr=t,t.default=t,gr}var yr,Ms;function Dt(){if(Ms)return yr;Ms=1;let e=At();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=le(Q({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return yr=t,t.default=t,yr}var wr,_s;function Te(){if(_s)return wr;_s=1;let e=st(),t=Dt(),r=At(),{isClean:s,my:i}=yi(),a,o,l,p;function u(c){return c.map(f=>(f.nodes&&(f.nodes=u(f.nodes)),delete f.source,f))}function n(c){if(c[s]=!1,c.proxyOf.nodes)for(let f of c.proxyOf.nodes)n(f)}class h extends r{append(...f){for(let d of f){let m=this.normalize(d,this.last);for(let g of m)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let d of this.nodes)d.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let d=this.getIterator(),m,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(m=this.indexes[d],g=f(this.proxyOf.nodes[m],m),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,d){return d==="proxyOf"?f:f[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...m)=>f[d](...m.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):d==="every"||d==="some"?m=>f[d]((g,...b)=>m(g.toProxy(),...b)):d==="root"?()=>f.root().toProxy():d==="nodes"?f.nodes.map(m=>m.toProxy()):d==="first"||d==="last"?f[d].toProxy():f[d]:f[d]},set(f,d,m){return f[d]===m||(f[d]=m,(d==="name"||d==="params"||d==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,d){let m=this.index(f),g=this.normalize(d,this.proxyOf.nodes[m]).reverse();m=this.index(f);for(let y of g)this.proxyOf.nodes.splice(m+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],m<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(f,d){let m=this.index(f),g=m===0?"prepend":!1,b=this.normalize(d,this.proxyOf.nodes[m],g).reverse();m=this.index(f);for(let S of b)this.proxyOf.nodes.splice(m,0,S);let y;for(let S in this.indexes)y=this.indexes[S],m<=y&&(this.indexes[S]=y+b.length);return this.markDirty(),this}normalize(f,d){if(typeof f=="string")f=u(o(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new t(f)]}else if(f.selector||f.selectors)f=[new p(f)];else if(f.name)f=[new a(f)];else if(f.text)f=[new e(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[i]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&d&&typeof d.raws.before!="undefined"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let d of f){let m=this.normalize(d,this.first,"prepend").reverse();for(let g of m)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+m.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let d;for(let m in this.indexes)d=this.indexes[m],d>=f&&(this.indexes[m]=d-1);return this.markDirty(),this}replaceValues(f,d,m){return m||(m=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(f,m))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((d,m)=>{let g;try{g=f(d,m)}catch(b){throw d.addToError(b)}return g!==!1&&d.walk&&(g=d.walk(f)),g})}walkAtRules(f,d){return d?f instanceof RegExp?this.walk((m,g)=>{if(m.type==="atrule"&&f.test(m.name))return d(m,g)}):this.walk((m,g)=>{if(m.type==="atrule"&&m.name===f)return d(m,g)}):(d=f,this.walk((m,g)=>{if(m.type==="atrule")return d(m,g)}))}walkComments(f){return this.walk((d,m)=>{if(d.type==="comment")return f(d,m)})}walkDecls(f,d){return d?f instanceof RegExp?this.walk((m,g)=>{if(m.type==="decl"&&f.test(m.prop))return d(m,g)}):this.walk((m,g)=>{if(m.type==="decl"&&m.prop===f)return d(m,g)}):(d=f,this.walk((m,g)=>{if(m.type==="decl")return d(m,g)}))}walkRules(f,d){return d?f instanceof RegExp?this.walk((m,g)=>{if(m.type==="rule"&&f.test(m.selector))return d(m,g)}):this.walk((m,g)=>{if(m.type==="rule"&&m.selector===f)return d(m,g)}):(d=f,this.walk((m,g)=>{if(m.type==="rule")return d(m,g)}))}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]}}return h.registerParse=c=>{o=c},h.registerRule=c=>{p=c},h.registerAtRule=c=>{a=c},h.registerRoot=c=>{l=c},wr=h,h.default=h,h.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,p.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[i]=!0,c.nodes&&c.nodes.forEach(f=>{h.rebuild(f)})},wr}var vr,Ns;function wi(){if(Ns)return vr;Ns=1;let e=Te();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return vr=t,t.default=t,e.registerAtRule(t),vr}var br,Os;function vi(){if(Os)return br;Os=1;let e=Te(),t,r;class s extends e{constructor(a){super(Q({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},br=s,s.default=s,br}var Sr,As;function qa(){if(As)return Sr;As=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Sr={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},Sr}var Er,Ds;function Qn(){if(Ds)return Er;Ds=1;let{existsSync:e,readFileSync:t}=ge,{dirname:r,join:s}=ge,{SourceMapConsumer:i,SourceMapGenerator:a}=ge;function o(p){return Buffer?Buffer.from(p,"base64").toString():window.atob(p)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=n.map?n.map.prev:void 0,c=this.loadMap(n.from,h);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/,d=u.match(c)||u.match(f);if(d)return decodeURIComponent(u.substr(d[0].length));let m=u.match(n)||u.match(h);if(m)return o(u.substr(m[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let h=u.lastIndexOf(n.pop()),c=u.indexOf("*/",h);h>-1&&c>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,c)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let h=n(u);if(h){let c=this.loadFile(h);if(!c)throw new Error("Unable to load previous source map: "+h.toString());return c}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=s(r(u),h)),this.loadFile(h)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Er=l,l.default=l,Er}var Cr,Ps;function Pt(){if(Ps)return Cr;Ps=1;let{nanoid:e}=qa(),{isAbsolute:t,resolve:r}=ge,{SourceMapConsumer:s,SourceMapGenerator:i}=ge,{fileURLToPath:a,pathToFileURL:o}=ge,l=gi(),p=Qn(),u=ge,n=Symbol("fromOffsetCache"),h=!!(s&&i),c=!!(r&&t);class f{constructor(m,g={}){if(m===null||typeof m=="undefined"||typeof m=="object"&&!m.toString)throw new Error(`PostCSS received ${m} instead of CSS string`);if(this.css=m.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!c||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),c&&h){let b=new p(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(m,g,b,y={}){let S,E,w;if(g&&typeof g=="object"){let C=g,x=b;if(typeof C.offset=="number"){let A=this.fromOffset(C.offset);g=A.line,b=A.col}else g=C.line,b=C.column;if(typeof x.offset=="number"){let A=this.fromOffset(x.offset);E=A.line,S=A.col}else E=x.line,S=x.column}else if(!b){let C=this.fromOffset(g);g=C.line,b=C.col}let v=this.origin(g,b,E,S);return v?w=new l(m,v.endLine===void 0?v.line:{column:v.column,line:v.line},v.endLine===void 0?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,y.plugin):w=new l(m,E===void 0?g:{column:b,line:g},E===void 0?b:{column:S,line:E},this.css,this.file,y.plugin),w.input={column:b,endColumn:S,endLine:E,line:g,source:this.css},this.file&&(o&&(w.input.url=o(this.file).toString()),w.input.file=this.file),w}fromOffset(m){let g,b;if(this[n])b=this[n];else{let S=this.css.split(`
62
+ `);b=new Array(S.length);let E=0;for(let w=0,v=S.length;w<v;w++)b[w]=E,E+=S[w].length+1;this[n]=b}g=b[b.length-1];let y=0;if(m>=g)y=b.length-1;else{let S=b.length-2,E;for(;y<S;)if(E=y+(S-y>>1),m<b[E])S=E-1;else if(m>=b[E+1])y=E+1;else{y=E;break}}return{col:m-b[y]+1,line:y+1}}mapResolve(m){return/^\w+:\/\//.test(m)?m:r(this.map.consumer().sourceRoot||this.map.root||".",m)}origin(m,g,b,y){if(!this.map)return!1;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:m});if(!E.source)return!1;let w;typeof b=="number"&&(w=S.originalPositionFor({column:y,line:b}));let v;t(E.source)?v=o(E.source):v=new URL(E.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:v.toString()};if(v.protocol==="file:")if(a)C.file=a(v);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let m={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(m[g]=this[g]);return this.map&&(m.map=Q({},this.map),m.map.consumerCache&&(m.map.consumerCache=void 0)),m}get from(){return this.file||this.id}}return Cr=f,f.default=f,u&&u.registerInput&&u.registerInput(f),Cr}var xr,Ts;function nt(){if(Ts)return xr;Ts=1;let e=Te(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let p=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of p)u.raws.before=o.raws.before}return p}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},xr=s,s.default=s,e.registerRoot(s),xr}var Rr,ks;function Kn(){if(ks)return Rr;ks=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
63
+ `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,p=!1,u="",n=!1;for(let h of t)n?n=!1:h==="\\"?n=!0:p?h===u&&(p=!1):h==='"'||h==="'"?(p=!0,u=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=h;return(s||a!=="")&&i.push(a.trim()),i}};return Rr=e,e.default=e,Rr}var Mr,Is;function bi(){if(Is)return Mr;Is=1;let e=Te(),t=Kn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Mr=r,r.default=r,e.registerRule(r),Mr}var _r,Ls;function Wa(){if(Ls)return _r;Ls=1;let e=wi(),t=st(),r=Dt(),s=Pt(),i=Qn(),a=nt(),o=bi();function l(p,u){if(Array.isArray(p))return p.map(d=>l(d));let c=p,{inputs:n}=c,h=He(c,["inputs"]);if(n){u=[];for(let d of n){let m=le(Q({},d),{__proto__:s.prototype});m.map&&(m.map=le(Q({},m.map),{__proto__:i.prototype})),u.push(m)}}if(h.nodes&&(h.nodes=p.nodes.map(d=>l(d,u))),h.source){let f=h.source,{inputId:d}=f,m=He(f,["inputId"]);h.source=m,d!=null&&(h.source.input=u[d])}if(h.type==="root")return new a(h);if(h.type==="decl")return new r(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new t(h);if(h.type==="atrule")return new e(h);throw new Error("Unknown node type: "+p.type)}return _r=l,l.default=l,_r}var Nr,Fs;function Zn(){if(Fs)return Nr;Fs=1;let{dirname:e,relative:t,resolve:r,sep:s}=ge,{SourceMapConsumer:i,SourceMapGenerator:a}=ge,{pathToFileURL:o}=ge,l=Pt(),p=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(c,f,d,m){this.stringify=c,this.mapOpts=d.map||{},this.root=f,this.opts=d,this.css=m,this.originalCSS=m,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let f=`
64
+ `;this.css.includes(`\r
65
+ `)&&(f=`\r
66
+ `),this.css+=f+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let f=this.toUrl(this.path(c.file)),d=c.root||e(c.file),m;this.mapOpts.sourcesContent===!1?(m=new i(c.text),m.sourcesContent&&(m.sourcesContent=null)):m=c.consumer(),this.map.applySourceMap(m,f,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let f=this.root.nodes.length-1;f>=0;f--)c=this.root.nodes[f],c.type==="comment"&&c.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&p&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,f=>{c+=f}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=a.fromSourceMap(c,{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 c=1,f=1,d="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,S,E)=>{if(this.css+=y,S&&E!=="end"&&(m.generated.line=c,m.generated.column=f-1,S.source&&S.source.start?(m.source=this.sourcePath(S),m.original.line=S.source.start.line,m.original.column=S.source.start.column-1,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,this.map.addMapping(m))),b=y.match(/\n/g),b?(c+=b.length,g=y.lastIndexOf(`
67
+ `),f=y.length-g):f+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=c,m.generated.column=f-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=c,m.generated.column=f-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c!="undefined"&&c!==!0?!1:this.previous().length?this.previous().some(f=>f.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(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let f=this.memoizedPaths.get(c);if(f)return f;let d=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=e(r(d,this.mapOpts.annotation)));let m=t(d,c);return this.memoizedPaths.set(c,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let f=c.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let c=new l(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(f=>{if(f.source){let d=f.source.input.from;if(d&&!c[d]){c[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let f=this.memoizedFileURLs.get(c);if(f)return f;if(o){let d=o(c).toString();return this.memoizedFileURLs.set(c,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let f=this.memoizedURLs.get(c);if(f)return f;s==="\\"&&(c=c.replace(/\\/g,"/"));let d=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,d),d}}return Nr=n,Nr}var Or,Bs;function eo(){if(Bs)return Or;Bs=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,p=13,u=91,n=93,h=40,c=41,f=123,d=125,m=59,g=42,b=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return Or=function(x,A={}){let M=x.css.valueOf(),B=A.ignoreErrors,k,J,U,R,q,I,j,H,z,X,ae=M.length,_=0,D=[],O=[];function N(){return _}function P(re){throw x.error("Unclosed "+re,_)}function V(){return O.length===0&&_>=ae}function ue(re){if(O.length)return O.pop();if(_>=ae)return;let be=re?re.ignoreUnclosed:!1;switch(k=M.charCodeAt(_),k){case i:case a:case l:case p:case o:{R=_;do R+=1,k=M.charCodeAt(R);while(k===a||k===i||k===l||k===p||k===o);I=["space",M.slice(_,R)],_=R-1;break}case u:case n:case f:case d:case b:case m:case c:{let Ne=String.fromCharCode(k);I=[Ne,Ne,_];break}case h:{if(X=D.length?D.pop()[1]:"",z=M.charCodeAt(_+1),X==="url"&&z!==e&&z!==t&&z!==a&&z!==i&&z!==l&&z!==o&&z!==p){R=_;do{if(j=!1,R=M.indexOf(")",R+1),R===-1)if(B||be){R=_;break}else P("bracket");for(H=R;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["brackets",M.slice(_,R+1),_,R],_=R}else R=M.indexOf(")",_+1),J=M.slice(_,R+1),R===-1||w.test(J)?I=["(","(",_]:(I=["brackets",J,_,R],_=R);break}case e:case t:{q=k===e?"'":'"',R=_;do{if(j=!1,R=M.indexOf(q,R+1),R===-1)if(B||be){R=_+1;break}else P("string");for(H=R;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["string",M.slice(_,R+1),_,R],_=R;break}case y:{S.lastIndex=_+1,S.test(M),S.lastIndex===0?R=M.length-1:R=S.lastIndex-2,I=["at-word",M.slice(_,R+1),_,R],_=R;break}case r:{for(R=_,U=!0;M.charCodeAt(R+1)===r;)R+=1,U=!U;if(k=M.charCodeAt(R+1),U&&k!==s&&k!==a&&k!==i&&k!==l&&k!==p&&k!==o&&(R+=1,v.test(M.charAt(R)))){for(;v.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}I=["word",M.slice(_,R+1),_,R],_=R;break}default:{k===s&&M.charCodeAt(_+1)===g?(R=M.indexOf("*/",_+2)+1,R===0&&(B||be?R=M.length:P("comment")),I=["comment",M.slice(_,R+1),_,R],_=R):(E.lastIndex=_+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,I=["word",M.slice(_,R+1),_,R],D.push(I),_=R);break}}return _++,I}function ce(re){O.push(re)}return{back:ce,endOfFile:V,nextToken:ue,position:N}},Or}var Ar,Us;function to(){if(Us)return Ar;Us=1;let e=wi(),t=st(),r=Dt(),s=nt(),i=bi(),a=eo();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let h=u[n],c=h[3]||h[2];if(c)return c}}class p{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let h=new e;h.name=n[1].slice(1),h.name===""&&this.unnamedAtrule(h,n),this.init(h,n[2]);let c,f,d,m=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),c=n[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){h.source.end=this.getPosition(n[2]),h.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(b.length>0){for(d=b.length-1,f=b[d];f&&f[0]==="space";)f=b[--d];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){m=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(h.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(h,"params",b),m&&(n=b[b.length-1],h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(n){let h=this.colon(n);if(h===!1)return;let c=0,f;for(let d=h-1;d>=0&&(f=n[d],!(f[0]!=="space"&&(c+=1,c===2)));d--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let h=0,c,f,d;for(let[m,g]of n.entries()){if(f=g,d=f[0],d==="("&&(h+=1),d===")"&&(h-=1),h===0&&d===":")if(!c)this.doubleColon(f);else{if(c[0]==="word"&&c[1]==="progid")continue;return m}c=f}return!1}comment(n){let h=new t;this.init(h,n[2]),h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++;let c=n[1].slice(2,-2);if(/^\s*$/.test(c))h.text="",h.raws.left=c,h.raws.right="";else{let f=c.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,h){let c=new r;this.init(c,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),c.source.end=this.getPosition(f[3]||f[2]||l(n)),c.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),c.raws.before+=n.shift()[1];for(c.source.start=this.getPosition(n[0][2]),c.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=n.shift()[1]}c.raws.between="";let d;for(;n.length;)if(d=n.shift(),d[0]===":"){c.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),c.raws.between+=d[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let m=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)m.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(d=n[y],d[1].toLowerCase()==="!important"){c.important=!0;let S=this.stringFrom(n,y);S=this.spacesFromEnd(n)+S,S!==" !important"&&(c.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let w=y;w>0;w--){let v=S[w][0];if(E.trim().startsWith("!")&&v!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(c.important=!0,c.raws.important=E,n=S)}if(d[0]!=="space"&&d[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=m.map(y=>y[1]).join(""),m=[]),this.raw(c,"value",m.concat(n),h),c.value.includes(":")&&!h&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let h=new i;this.init(h,n[2]),h.selector="",h.raws.between="",this.current=h}end(n){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(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}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(n){if(this.spaces+=n[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let h=this.input.fromOffset(n);return{column:h.col,line:h.line,offset:n}}init(n,h){this.current.push(n),n.source={input:this.input,start:this.getPosition(h)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let h=!1,c=null,f=!1,d=null,m=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(c=y[0],b.push(y),c==="("||c==="[")d||(d=y),m.push(c==="("?")":"]");else if(g&&f&&c==="{")d||(d=y),m.push("}");else if(m.length===0)if(c===";")if(f){this.decl(b,g);return}else break;else if(c==="{"){this.rule(b);return}else if(c==="}"){this.tokenizer.back(b.pop()),h=!0;break}else c===":"&&(f=!0);else c===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),m.length>0&&this.unclosedBracket(d),h&&f){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,h,c,f){let d,m,g=c.length,b="",y=!0,S,E;for(let w=0;w<g;w+=1)d=c[w],m=d[0],m==="space"&&w===g-1&&!f?y=!1:m==="comment"?(E=c[w-1]?c[w-1][0]:"empty",S=c[w+1]?c[w+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?y=!1:b+=d[1]:y=!1):b+=d[1];if(!y){let w=c.reduce((v,C)=>v+C[1],"");n.raws[h]={raw:w,value:b}}n[h]=b}rule(n){n.pop();let h=new i;this.init(h,n[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(h,"selector",n),this.current=h}spacesAndCommentsFromEnd(n){let h,c="";for(;n.length&&(h=n[n.length-1][0],!(h!=="space"&&h!=="comment"));)c=n.pop()[1]+c;return c}spacesAndCommentsFromStart(n){let h,c="";for(;n.length&&(h=n[0][0],!(h!=="space"&&h!=="comment"));)c+=n.shift()[1];return c}spacesFromEnd(n){let h,c="";for(;n.length&&(h=n[n.length-1][0],h==="space");)c=n.pop()[1]+c;return c}stringFrom(n,h){let c="";for(let f=h;f<n.length;f++)c+=n[f][1];return n.splice(h,n.length-h),c}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Ar=p,Ar}var Dr,zs;function Si(){if(zs)return Dr;zs=1;let e=Te(),t=Pt(),r=to();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(p){throw p}return l.root}return Dr=s,s.default=s,e.registerParse(s),Dr}var Pr,qs;function ro(){if(qs)return Pr;qs=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[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 Pr=e,e.default=e,Pr}var Tr,Ws;function Ei(){if(Ws)return Tr;Ws=1;let e=ro();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return Tr=t,t.default=t,Tr}var kr,Vs;function io(){if(Vs)return kr;Vs=1;let e={};return kr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},kr}var Ir,js;function so(){if(js)return Ir;js=1;let e=Te(),t=vi(),r=Zn(),s=Si(),i=Ei(),a=nt(),o=Ot(),{isClean:l,my:p}=yi(),u=io();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},c={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let w=!1,v=n[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,f,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,f,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",f,"DocumentExit"]:E.type==="root"?w=["Root",f,"RootExit"]:w=m(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[l]=!1,E.nodes&&E.nodes.forEach(w=>b(w)),E}let y={};class S{constructor(w,v,C){this.stringified=!1,this.processed=!1;let x;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))x=b(v);else if(v instanceof S||v instanceof i)x=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=s;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{x=A(v,C)}catch(M){this.processed=!0,this.error=M}x&&!x[p]&&e.rebuild(x)}this.result=new i(w,x,C),this.helpers=le(Q({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?Q(Q({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return w}prepareVisitors(){this.listeners={};let w=(v,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,x])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[C])if(typeof v[C]=="object")for(let x in v[C])x==="*"?w(v,C,v[C][x]):w(v,C+"-"+x.toLowerCase(),v[C][x]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(d(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];){w[l]=!0;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(x){let A=v[v.length-1].node;throw this.handleError(x,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let x=w.nodes.map(A=>C(A,this.helpers));await Promise.all(x)}else await C(w,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=o;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let x=new r(v,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 w of this.plugins){let v=this.runOnRoot(w);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];)w[l]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,x]of w){this.result.lastPlugin=C;let A;try{A=x(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:x}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(x.length>0&&v.visitorIndex<x.length){let[M,B]=x[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===x.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return B(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,B;for(;B=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!B[l]){B[l]=!0,w.push(g(B));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===f){C.nodes&&C.nodes.length&&(C[l]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop()}walkSync(w){w[l]=!0;let v=m(w);for(let C of v)if(C===f)w.nodes&&w.each(x=>{x[l]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,w.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"}}return S.registerPostcss=E=>{y=E},Ir=S,S.default=S,a.registerLazyResult(S),t.registerLazyResult(S),Ir}var Lr,Gs;function Va(){if(Gs)return Lr;Gs=1;let e=Zn(),t=Si();const r=Ei();let s=Ot(),i=io();class a{constructor(l,p,u){p=p.toString(),this.stringified=!1,this._processor=l,this._css=p,this._opts=u,this._map=void 0;let n,h=s;this.result=new r(this._processor,n,this._opts),this.result.css=p;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let f=new e(h,n,this._opts,p);if(f.isMap()){let[d,m]=f.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,p){return this.async().then(l,p)}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 l,p=t;try{l=p(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Lr=a,a.default=a,Lr}var Fr,$s;function ja(){if($s)return Fr;$s=1;let e=vi(),t=so(),r=Va(),s=nt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))l=l.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)l.push(p);else if(typeof p=="function")l.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Fr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Fr}var Br,Hs;function no(){if(Hs)return Br;Hs=1;let e=wi(),t=st(),r=Te(),s=gi(),i=Dt(),a=vi(),o=Wa(),l=Pt(),p=so(),u=Kn(),n=At(),h=Si(),c=ja(),f=Ei(),d=nt(),m=bi(),g=Ot(),b=ro();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new c(S)}return y.plugin=function(E,w){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
68
+ 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:
69
+ https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.postcssVersion=new c().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(A,M,B){return y([C(B)]).process(A,M)},C},y.stringify=g,y.parse=h,y.fromJSON=o,y.list=u,y.comment=S=>new t(S),y.atRule=S=>new e(S),y.decl=S=>new i(S),y.rule=S=>new m(S),y.root=S=>new d(S),y.document=S=>new a(S),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=f,y.Input=l,y.Rule=m,y.Root=d,y.Node=n,p.registerPostcss(y),Br=y,y.default=y,Br}var Ur,Ys;function Ga(){if(Ys)return Ur;Ys=1;let e=st(),t=to(),r=eo();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let p=a[1].slice(2);if(p.slice(-2)==="*/"&&(p=p.slice(0,-2)),/^\s*$/.test(p))o.text="",o.raws.left=p,o.raws.right="";else{let u=p.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[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 o=this.colon(a);if(o===!1)return;let l,p;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(p=l-1;p>=0;p--)if(a[p][0]!=="space"){p+=1;break}let u=a.slice(l),n=a.slice(p,l);a.splice(p,a.length-p),this.spaces=n.map(h=>h[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Ur=s,Ur}var zr,Js;function $a(){if(Js)return zr;Js=1;let{Input:e}=no(),t=Ga();return zr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},zr}$a();var Ha=no();const ee=La(Ha);ee.stringify;ee.fromJSON;ee.plugin;ee.parse;ee.list;ee.document;ee.comment;ee.atRule;ee.rule;ee.decl;ee.root;ee.CssSyntaxError;ee.Declaration;ee.Container;ee.Processor;ee.Document;ee.Comment;ee.Warning;ee.AtRule;ee.Result;ee.Input;ee.Rule;ee.Root;ee.Node;var W=(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))(W||{});function Ya(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(s);o.length>1&&(t[Qr(o[0].trim())]=o[1].trim())}}),t}function Xs(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Ka(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Ja=/-([a-z])/g,Xa=/^--[a-zA-Z0-9-]+$/,Qr=e=>Xa.test(e)?e:e.replace(Ja,(t,r)=>r?r.toUpperCase():""),Qa=/\B([A-Z])/g,Ka=e=>e.replace(Qa,"-$1").toLowerCase();class ye{constructor(...t){T(this,"parentElement",null),T(this,"parentNode",null),T(this,"ownerDocument"),T(this,"firstChild",null),T(this,"lastChild",null),T(this,"previousSibling",null),T(this,"nextSibling",null),T(this,"ELEMENT_NODE",1),T(this,"TEXT_NODE",3),T(this,"nodeType"),T(this,"nodeName"),T(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof ye){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,r){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"}}class Ci extends ye{constructor(...t){super(t),T(this,"nodeType",9),T(this,"nodeName","#document"),T(this,"compatMode","CSS1Compat"),T(this,"RRNodeType",W.Document),T(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===W.Element||r===W.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=xi(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===W.Element||s===W.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=co(this,t,r);return i.parentElement=null,i}removeChild(t){return ho(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Ci}createDocumentType(t,r,s){const i=new oo(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new Tt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new ao(t);return r.ownerDocument=this,r}createComment(t){const r=new lo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new uo(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class oo extends ye{constructor(t,r,s){super(),T(this,"nodeType",10),T(this,"RRNodeType",W.DocumentType),T(this,"name"),T(this,"publicId"),T(this,"systemId"),T(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class Tt extends ye{constructor(t){super(),T(this,"nodeType",1),T(this,"RRNodeType",W.Element),T(this,"tagName"),T(this,"attributes",{}),T(this,"shadowRoot",null),T(this,"scrollLeft"),T(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new tl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Ya(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const o=Qr(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=Xs(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=Qr(s),a=t[i]||"";return delete t[i],this.attributes.style=Xs(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return xi(this,t)}insertBefore(t,r){return co(this,t,r)}removeChild(t){return ho(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Za extends Tt{constructor(){super(...arguments),T(this,"currentTime"),T(this,"volume"),T(this,"paused"),T(this,"muted"),T(this,"playbackRate"),T(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class el extends Tt{constructor(){super(...arguments),T(this,"tagName","DIALOG"),T(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class ao extends ye{constructor(t){super(),T(this,"nodeType",3),T(this,"nodeName","#text"),T(this,"RRNodeType",W.Text),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class lo extends ye{constructor(t){super(),T(this,"nodeType",8),T(this,"nodeName","#comment"),T(this,"RRNodeType",W.Comment),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class uo extends ye{constructor(t){super(),T(this,"nodeName","#cdata-section"),T(this,"nodeType",4),T(this,"RRNodeType",W.CDATA),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class tl{constructor(t,r){if(T(this,"onChange"),T(this,"classes",[]),T(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),T(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function xi(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function co(e,t,r){if(!r)return xi(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function ho(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var he=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(he||{});const Kr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},rl={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"};let we=null;function bt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=il(e,t,r,s),fo(e,t,r,s),sl(e,t,r)}function il(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ri(e,t)){const a=St(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case W.Document:{if(!Fe(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case W.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;bt(l,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),fo(a.shadowRoot,o.shadowRoot,r,s)),nl(a,o,s);break}}return e}function sl(e,t,r){var s;switch(t.RRNodeType){case W.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case W.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const p=i.getContext("2d");p&&p.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,p=o.open,u=o.matches("dialog:modal"),n=l.open,h=l.isModal,c=u!==h,f=p!==n;if((c||p&&f)&&o.close(),n&&(f||c))try{h?o.showModal():o.show()}catch(d){console.warn(d)}break}}break}case W.Text:case W.Comment:case W.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function nl(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&Kr[a])e.setAttributeNS(Kr[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const p=document.createElement("img");p.src=o,p.onload=()=>{const u=e.getContext("2d");u&&u.drawImage(p,0,0,p.width,p.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(p){console.warn(p)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function fo(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,p=0,u=a.length-1,n=i[o],h=i[l],c=a[p],f=a[u],d,m;for(;o<=l&&p<=u;)if(n===void 0)n=i[++o];else if(h===void 0)h=i[--l];else if(Fe(n,c,r.mirror,s))n=i[++o],c=a[++p];else if(Fe(h,f,r.mirror,s))h=i[--l],f=a[--u];else if(Fe(n,f,r.mirror,s)){try{e.insertBefore(n,h.nextSibling)}catch(y){console.warn(y)}n=i[++o],f=a[--u]}else if(Fe(h,c,r.mirror,s)){try{e.insertBefore(h,n)}catch(y){console.warn(y)}h=i[--l],c=a[++p]}else{if(!d){d={};for(let S=o;S<=l;S++){const E=i[S];E&&r.mirror.hasNode(E)&&(d[r.mirror.getId(E)]=S)}}m=d[s.getId(c)];const y=i[m];if(m!==void 0&&y&&Fe(y,c,r.mirror,s)){try{e.insertBefore(y,n)}catch(S){console.warn(S)}i[m]=void 0}else{const S=St(c,r.mirror,s);e.nodeName==="#document"&&n&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(S,n||null)}catch(E){console.warn(E)}}c=a[++p]}if(o>l){const y=a[u+1];let S=null;for(y&&(S=r.mirror.getNode(s.getId(y)));p<=u;++p){const E=St(a[p],r.mirror,s);try{e.insertBefore(E,S)}catch(w){console.warn(w)}}}else if(p>u)for(;o<=l;o++){const y=i[o];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(S){console.warn(S)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)bt(g,b,r,s),g=g.nextSibling,b=b.nextSibling}function St(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ri(a,e))return a;switch(e.RRNodeType){case W.Document:a=new Document;break;case W.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case W.Element:{let o=e.tagName.toLowerCase();o=rl[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(Kr.svg,o):a=document.createElement(e.tagName);break}case W.Text:a=document.createTextNode(e.data);break;case W.Comment:a=document.createComment(e.data);break;case W.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,Q({},i));try{we==null||we.add(a)}catch(o){}return a}function Ri(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Fe(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ri(e,t)}class $e extends Ci{constructor(t){super(),T(this,"UNSERIALIZED_STARTING_ID",-2),T(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),T(this,"mirror",yl()),T(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new $e}createDocumentType(t,r,s){const i=new ol(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new al(r);break;case"IFRAME":s=new hl(r,this.mirror);break;case"CANVAS":s=new ul(r);break;case"STYLE":s=new cl(r);break;case"DIALOG":s=new ll(r);break;default:s=new kt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new pl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new dl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new fl(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const ol=oo;class kt extends Tt{constructor(){super(...arguments),T(this,"inputData",null),T(this,"scrollData",null)}}class al extends Za{}class ll extends el{}class ul extends kt{constructor(){super(...arguments),T(this,"rr_dataURL",null),T(this,"canvasMutations",[])}getContext(){return null}}class cl extends kt{constructor(){super(...arguments),T(this,"rules",[])}}class hl extends kt{constructor(t,r){super(t),T(this,"contentDocument",new $e),this.contentDocument.mirror=r}}const fl=ao,pl=lo,dl=uo;function ml(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function po(e,t,r,s){let i;switch(e.nodeType){case he.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case he.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case he.ELEMENT_NODE:{const o=e,l=ml(o);i=t.createElement(l);const p=i;for(const{name:u,value:n}of Array.from(o.attributes))p.attributes[u]=n;o.scrollLeft&&(p.scrollLeft=o.scrollLeft),o.scrollTop&&(p.scrollTop=o.scrollTop);break}case he.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case he.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case he.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case he.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof $e&&(a||(a=mo(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,Q({},a))),i}function gl(e,t=Ia(),r=new $e){function s(i,a){const o=po(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==he.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===he.DOCUMENT_NODE||i.nodeType===he.ELEMENT_NODE||i.nodeType===he.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===he.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(e,null),r}function yl(){return new wl}class wl{constructor(){T(this,"idNodeMap",new Map),T(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function mo(e,t){switch(e.RRNodeType){case W.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case W.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case W.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case W.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const Qs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ks={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};function vl(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function Mi(e){if(ft[e])return ft[e];const t=vl(e)||globalThis[e],r=t.prototype,s=e in Qs?Qs[e]:void 0,i=!!(s&&s.every(l=>{var p,u;return!!((u=(p=Object.getOwnPropertyDescriptor(r,l))==null?void 0:p.get)!=null&&u.toString().includes("[native code]"))})),a=e in Ks?Ks[e]:void 0,o=!!(a&&a.every(l=>{var p;return typeof r[l]=="function"&&((p=r[l])==null?void 0:p.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const p=l.contentWindow;if(!p)return t.prototype;const u=p[e].prototype;return document.body.removeChild(l),u?ft[e]=u:r}catch(l){return r}}const qr={};function _e(e,t,r){var s;const i=`${e}.${String(r)}`;if(qr[i])return qr[i].call(t);const a=Mi(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(qr[i]=o,o.call(t)):t[r]}const Wr={};function go(e,t,r){const s=`${e}.${String(r)}`;if(Wr[s])return Wr[s].bind(t);const a=Mi(e)[r];return typeof a!="function"?t[r]:(Wr[s]=a,a.bind(t))}function bl(e){return _e("Node",e,"childNodes")}function Sl(e){return _e("Node",e,"parentNode")}function El(e){return _e("Node",e,"parentElement")}function Cl(e){return _e("Node",e,"textContent")}function xl(e,t){return go("Node",e,"contains")(t)}function Rl(e){return go("Node",e,"getRootNode")()}function Ml(e){return!e||!("host"in e)?null:_e("ShadowRoot",e,"host")}function _l(e){return e.styleSheets}function Nl(e){return!e||!("shadowRoot"in e)?null:_e("Element",e,"shadowRoot")}function Ol(e,t){return _e("Element",e,"querySelector")(t)}function Al(e,t){return _e("Element",e,"querySelectorAll")(t)}function Dl(){return Mi("MutationObserver").constructor}function Pl(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const Tl={childNodes:bl,parentNode:Sl,parentElement:El,textContent:Cl,contains:xl,getRootNode:Rl,host:Ml,styleSheets:_l,shadowRoot:Nl,querySelector:Ol,querySelectorAll:Al,mutationObserver:Dl,patch:Pl},Be=`Please stop import mirror directly. Instead of that,\r
70
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
71
+ or you can use record.mirror to access the mirror instance during recording.`;let Zs={map:{},getId(){return console.error(Be),-1},getNode(){return console.error(Be),null},removeNodeFromMap(){console.error(Be)},has(){return console.error(Be),!1},reset(){console.error(Be)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Zs=new Proxy(Zs,{get(e,t,r){return t==="map"&&console.error(Be),Reflect.get(e,t,r)}}));Date.now().toString();function kl(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 Il(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const l=t[a];if(l.parent){const p=l.parent.children.indexOf(l);l.parent.children.splice(p,0,r(i,l.parent))}else{const p=s.indexOf(l);s.splice(p,0,r(i,null))}continue}if(o in t){const l=t[o];l.children.push(r(i,l));continue}s.push(r(i,null))}return s}function yo(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)yo(e.children[r],t)}function Vr(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function wo(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=i.getBoundingClientRect(),o=wo(i,t),l=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function pt(e){return e?e instanceof ye&&"shadowRoot"in e?!!e.shadowRoot:!!Tl.shadowRoot(e):!1}function Je(e,t){const r=e[t[0]];return t.length===1?r:Je(r.cssRules[t[1]].cssRules,t.slice(2))}function en(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Ll(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Fl{constructor(){L(this,"id",1),L(this,"styleIDMap",new WeakMap),L(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var te=(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))(te||{}),Y=(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))(Y||{}),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||{}),Et=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Et||{}),Zr=(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))(Zr||{}),G=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(G||{}),xe=(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))(xe||{}),tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xe=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var dt=0;dt<tn.length;dt++)Xe[tn.charCodeAt(dt)]=dt;var Bl=function(e){var t=e.length*.75,r=e.length,s,i=0,a,o,l,p;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var u=new ArrayBuffer(t),n=new Uint8Array(u);for(s=0;s<r;s+=4)a=Xe[e.charCodeAt(s)],o=Xe[e.charCodeAt(s+1)],l=Xe[e.charCodeAt(s+2)],p=Xe[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|l>>2,n[i++]=(l&3)<<6|p&63;return u};const Ul=`(function() {
72
+ "use strict";
73
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
74
+ var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
75
+ for (var i = 0; i < chars.length; i++) {
76
+ lookup[chars.charCodeAt(i)] = i;
77
+ }
78
+ var encode = function(arraybuffer) {
79
+ var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
80
+ for (i2 = 0; i2 < len; i2 += 3) {
81
+ base64 += chars[bytes[i2] >> 2];
82
+ base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
83
+ base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
84
+ base64 += chars[bytes[i2 + 2] & 63];
85
+ }
86
+ if (len % 3 === 2) {
87
+ base64 = base64.substring(0, base64.length - 1) + "=";
88
+ } else if (len % 3 === 1) {
89
+ base64 = base64.substring(0, base64.length - 2) + "==";
90
+ }
91
+ return base64;
92
+ };
93
+ const lastBlobMap = /* @__PURE__ */ new Map();
94
+ const transparentBlobMap = /* @__PURE__ */ new Map();
95
+ async function getTransparentBlobFor(width, height, dataURLOptions) {
96
+ const id = \`\${width}-\${height}\`;
97
+ if ("OffscreenCanvas" in globalThis) {
98
+ if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
99
+ const offscreen = new OffscreenCanvas(width, height);
100
+ offscreen.getContext("2d");
101
+ const blob = await offscreen.convertToBlob(dataURLOptions);
102
+ const arrayBuffer = await blob.arrayBuffer();
103
+ const base64 = encode(arrayBuffer);
104
+ transparentBlobMap.set(id, base64);
105
+ return base64;
106
+ } else {
107
+ return "";
108
+ }
109
+ }
110
+ const worker = self;
111
+ worker.onmessage = async function(e) {
112
+ if ("OffscreenCanvas" in globalThis) {
113
+ const { id, bitmap, width, height, dataURLOptions } = e.data;
114
+ const transparentBase64 = getTransparentBlobFor(
115
+ width,
116
+ height,
117
+ dataURLOptions
118
+ );
119
+ const offscreen = new OffscreenCanvas(width, height);
120
+ const ctx = offscreen.getContext("2d");
121
+ ctx.drawImage(bitmap, 0, 0);
122
+ bitmap.close();
123
+ const blob = await offscreen.convertToBlob(dataURLOptions);
124
+ const type = blob.type;
125
+ const arrayBuffer = await blob.arrayBuffer();
126
+ const base64 = encode(arrayBuffer);
127
+ if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
128
+ lastBlobMap.set(id, base64);
129
+ return worker.postMessage({ id });
130
+ }
131
+ if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
132
+ worker.postMessage({
133
+ id,
134
+ type,
135
+ base64,
136
+ width,
137
+ height
138
+ });
139
+ lastBlobMap.set(id, base64);
140
+ } else {
141
+ return worker.postMessage({ id: e.data.id });
142
+ }
143
+ };
144
+ })();
145
+ //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
146
+ `;typeof self!="undefined"&&self.Blob&&new Blob([Ul],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Ii=e.contentWindow)==null?void 0:Ii.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Bn();function vo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const zl=Object.freeze(Object.defineProperty({__proto__:null,default:vo},Symbol.toStringTag,{value:"Module"}));function ql(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||p,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(b){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(b)}const l=o(e.navigator.userAgent)?1:0;function p(b,y){this.scrollLeft=b,this.scrollTop=y}function u(b){return .5*(1-Math.cos(Math.PI*b))}function n(b){if(b===null||typeof b!="object"||b.behavior===void 0||b.behavior==="auto"||b.behavior==="instant")return!0;if(typeof b=="object"&&b.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+b.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(b,y){if(y==="Y")return b.clientHeight+l<b.scrollHeight;if(y==="X")return b.clientWidth+l<b.scrollWidth}function c(b,y){const S=e.getComputedStyle(b,null)["overflow"+y];return S==="auto"||S==="scroll"}function f(b){const y=h(b,"Y")&&c(b,"Y"),S=h(b,"X")&&c(b,"X");return y||S}function d(b){for(;b!==t.body&&f(b)===!1;)b=b.parentNode||b.host;return b}function m(b){const y=a();let S,E,w,v=(y-b.startTime)/s;v=v>1?1:v,S=u(v),E=b.startX+(b.x-b.startX)*S,w=b.startY+(b.y-b.startY)*S,b.method.call(b.scrollable,E,w),(E!==b.x||w!==b.y)&&e.requestAnimationFrame(m.bind(e,b))}function g(b,y,S){let E,w,v,C;const x=a();b===t.body?(E=e,w=e.scrollX||e.pageXOffset,v=e.scrollY||e.pageYOffset,C=i.scroll):(E=b,w=b.scrollLeft,v=b.scrollTop,C=p),m({scrollable:E,method:C,startTime:x,startX:w,startY:v,x:y,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const b=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof b=="undefined"?this.scrollLeft:~~b,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const b=d(this),y=b.getBoundingClientRect(),S=this.getBoundingClientRect();b!==t.body?(g.call(this,b,b.scrollLeft+S.left-y.left,b.scrollTop+S.top-y.top),e.getComputedStyle(b).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class Wl{constructor(t=[],r){L(this,"timeOffset",0),L(this,"speed"),L(this,"actions"),L(this,"raf",null),L(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function rn(e,t){if(e.type===te.IncrementalSnapshot&&e.data.source===Y.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
147
+ Copyright (c) Microsoft Corporation.
148
+
149
+ Permission to use, copy, modify, and/or distribute this software for any
150
+ purpose with or without fee is hereby granted.
151
+
152
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
153
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
154
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
155
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
156
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
157
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
158
+ PERFORMANCE OF THIS SOFTWARE.
159
+ ***************************************************************************** */function sn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var qe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(qe||(qe={}));var bo={type:"xstate.init"};function jr(e){return e===void 0?[]:[].concat(e)}function Ue(e){return{type:"xstate.assign",assignment:e}}function nn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Ct(e){return function(t){return e===t}}function So(e){return typeof e=="string"?{type:e}:e}function on(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Ct(e)}}function an(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](s,r):a.assignment[l]}),s=o,!1}return!0}),s,i]}function Eo(e,t){t===void 0&&(t={});var r=sn(an(jr(e.states[e.initial].entry).map(function(o){return nn(o,t.actions)}),e.context,bo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:Ct(e.initial)},transition:function(o,l){var p,u,n=typeof o=="string"?{value:o,context:e.context}:o,h=n.value,c=n.context,f=So(l),d=e.states[h];if(d.on){var m=jr(d.on[f.type]);try{for(var g=function(I){var j=typeof Symbol=="function"&&Symbol.iterator,H=j&&I[j],z=0;if(H)return H.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&z>=I.length&&(I=void 0),{value:I&&I[z++],done:!I}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return on(h,c);var S=typeof y=="string"?{target:y}:y,E=S.target,w=S.actions,v=w===void 0?[]:w,C=S.cond,x=C===void 0?function(){return!0}:C,A=E===void 0,M=E!=null?E:h,B=e.states[M];if(x(c,f)){var k=sn(an((A?jr(v):[].concat(d.exit,v,B.entry).filter(function(I){return I})).map(function(I){return nn(I,a._options.actions)}),c,f),3),J=k[0],U=k[1],R=k[2],q=E!=null?E:h;return{value:q,context:U,actions:J,changed:E!==h||J.length>0||R,matches:Ct(q)}}}}catch(I){p={error:I}}finally{try{b&&!b.done&&(u=g.return)&&u.call(g)}finally{if(p)throw p.error}}}return on(h,c)}};return a}var ln=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Co(e){var t=e.initialState,r=qe.NotStarted,s=new Set,i={_machine:e,send:function(a){r===qe.Running&&(t=e.transition(t,a),ln(t,So(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:Ct(o.value)}}return r=qe.Running,ln(t,bo),i},stop:function(){return r=qe.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function Vl(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===te.Meta&&s.timestamp<=t)return e.slice(r)}return e}function jl(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=Eo({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ue({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:Ue((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),le(Q({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:p,baselineTime:u,lastPlayedEvent:n}=a;l.clear();for(const d of p)rn(d,u);const h=Vl(p,u);let c=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===te.IncrementalSnapshot&&n.data.source===Y.MouseMove&&(c=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),u<(c||0)&&s.emit(G.PlayBack);const f=new Array;for(const d of h)if(!(c&&c<u&&(d.timestamp<=c||d===n)))if(d.timestamp<u)f.push(d);else{const m=t(d,!1);l.addAction({doAction:()=>{m()},delay:d.delay})}r(f),s.emit(G.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:Ue(a=>le(Q({},a),{lastPlayedEvent:null})),startLive:Ue({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:Ue((a,o)=>{const{baselineTime:l,timer:p,events:u}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;rn(n,l);let h=u.length-1;if(!u[h]||u[h].timestamp<=n.timestamp)u.push(n);else{let d=-1,m=0;for(;m<=h;){const g=Math.floor((m+h)/2);u[g].timestamp<=n.timestamp?m=g+1:h=g-1}d===-1&&(d=m),u.splice(d,0,n)}const c=n.timestamp<l,f=t(n,c);c?f():p.isActive()&&p.addAction({doAction:()=>{f()},delay:n.delay})}return le(Q({},a),{events:u})})}});return Co(i)}function Gl(e){const t=Eo({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:Ue({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Co(t)}const $l=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],un=new Map;function xo(e,t){let r=un.get(e);return r||(r=new Map,un.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Re(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Re(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:a}=s;return xo(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Re(e,t,r))))}else{if("base64"in s)return Bl(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Re(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Re(e,t,r)));return s}}function Hl(e,t){try{return t===Et.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Yl=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Jl(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Yl.includes(r))return;const s=xo(e,r);s.includes(t)||s.push(t)}async function Xl({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=Hl(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(Re(s,a))),p=o.apply(a,l);Jl(a,p);const u=!1}catch(a){i(e,a)}}async function Ql({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async p=>Promise.all(p.args.map(Re(s,a))));(await Promise.all(o)).forEach((p,u)=>{const n=t[u];try{if(n.setter){a[n.property]=n.args[0];return}const h=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),h.apply(a,n.args)):h.apply(a,p)}catch(h){i(n,h)}})}async function cn({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Et.WebGL,Et.WebGL2].includes(t.type)){for(let p=0;p<l.length;p++){const u=l[p];await Xl({mutation:u,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await Ql({event:e,mutations:l,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}const hn=["AUDIO","VIDEO"];class Kl{constructor(t){L(this,"mediaMap",new Map),L(this,"warn"),L(this,"service"),L(this,"speedService"),L(this,"emitter"),L(this,"getCurrentTime"),L(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(G.Start,this.start.bind(this)),this.emitter.on(G.SkipStart,this.start.bind(this)),this.emitter.on(G.Pause,this.pause.bind(this)),this.emitter.on(G.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var f,d,m,g,b;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:p,volume:u,loop:n}=s;return{isPlaying:a===Zr.Play||a!==Zr.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:r,playbackRate:(d=o!=null?o:i==null?void 0:i.playbackRate)!=null?d:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(g=p!=null?p:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=n!=null?n:i==null?void 0:i.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),p=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==p&&(t.playbackRate=p),o&&!l?t.play():t.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let p=!1;l.rr_mediaState?p=l.rr_mediaState==="played":p=i.getAttribute("autoplay")!==null,p&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let n=!1;typeof l.rr_mediaMuted=="boolean"?n=l.rr_mediaMuted:n=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.getAttribute("loop")!==null;let c=1;typeof l.rr_mediaVolume=="number"&&(c=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:p,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:u,volume:c,muted:n,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){hn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return hn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function mt(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(l?r.showModal():r.show())}}function Zl(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const eu=5*1e3,tu=vo||zl,fn="[replayer]",Gr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function pn(e){return e.type==te.IncrementalSnapshot&&(e.data.source==Y.TouchMove||e.data.source==Y.MouseInteraction&&e.data.type==ne.TouchStart)}class ru{constructor(t,r){if(L(this,"wrapper"),L(this,"iframe"),L(this,"service"),L(this,"speedService"),L(this,"config"),L(this,"usingVirtualDom",!1),L(this,"virtualDom",new $e),L(this,"mouse"),L(this,"mouseTail",null),L(this,"tailPositions",[]),L(this,"emitter",tu()),L(this,"nextUserInteractionEvent"),L(this,"legacy_missingNodeRetryMap",{}),L(this,"cache",ys()),L(this,"imageMap",new Map),L(this,"canvasEventMap",new Map),L(this,"mirror",Bn()),L(this,"styleMirror",new Fl),L(this,"mediaManager"),L(this,"firstFullSnapshot",null),L(this,"newDocumentQueue",[]),L(this,"mousePos",null),L(this,"touchActive",null),L(this,"lastMouseDownEvent",null),L(this,"lastHoveredRootNode"),L(this,"lastSelectionData",null),L(this,"constructedStyleMutations",[]),L(this,"adoptedStyleSheets",[]),L(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const p of[this.mouseTail,this.iframe])p&&(p.setAttribute("width",String(l.width)),p.setAttribute("height",String(l.height)))}),L(this,"applyEventsSynchronously",l=>{for(const p of l){switch(p.type){case te.DomContentLoaded:case te.Load:case te.Custom:continue;case te.FullSnapshot:case te.Meta:case te.Plugin:case te.IncrementalSnapshot:break}this.getCastFn(p,!0)()}}),L(this,"getCastFn",(l,p=!1)=>{let u;switch(l.type){case te.DomContentLoaded:case te.Load:break;case te.Custom:u=()=>{this.emitter.emit(G.CustomEvent,l)};break;case te.Meta:u=()=>this.emitter.emit(G.Resize,{width:l.data.width,height:l.data.height});break;case te.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,p),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case te.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,p),!p&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,c={speed:Math.min(Math.round(h/eu),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:c}),this.emitter.emit(G.SkipStart,c)}}};break}return()=>{u&&u();for(const c of this.config.plugins||[])c.handler&&c.handler(l,p,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const c=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(G.Finish))};let f=50;l.type===te.IncrementalSnapshot&&l.data.source===Y.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(c,f)}this.emitter.emit(G.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Gr,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(G.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(G.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(p,u,n)=>{cn({event:p,mutation:u,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(p,u)=>{p.source===Y.StyleSheetRule?this.applyStyleSheetRule(p,u):p.source===Y.StyleDeclaration&&this.applyStyleDeclaration(p,u)},afterAppend:(p,u)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(p,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{bt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(p){console.warn(p)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const p in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[p],n=St(u.node,this.mirror,this.virtualDom.mirror);bt(n,u.node,l,this.virtualDom.mirror),u.node=n}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(p=>{this.applyStyleSheetMutation(p)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(p=>{this.applyAdoptedStyleSheet(p)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,p]=this.lastMouseDownEvent;l.dispatchEvent(p)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(G.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Wl([],{speed:this.config.speed});this.service=jl({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,p)=>l.timestamp-p.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(G.StateChange,{player:l})}),this.speedService=Gl({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(G.StateChange,{speed:l})}),this.mediaManager=new Kl({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===te.Meta),o=this.service.state.context.events.find(l=>l.type===te.FullSnapshot);if(a){const{width:l,height:p}=a.data;setTimeout(()=>{this.emitter.emit(G.Resize,{width:l,height:p})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(pn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(G.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(G.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(G.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(G.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;pn(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=ys()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(ql(this.iframe.contentWindow,this.iframe.contentDocument),kl(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,a=(p,u)=>{if(p.nodeName==="DIALOG"&&i.add(p),this.collectIframeAndAttachDocument(s,p),this.mediaManager.isSupportedMediaElement(p)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(p,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(p,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Oa(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:p,builtNode:u}of s)this.attachDocumentToIframe(p,u),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==p);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(p=>mt(p)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(G.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=$l(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,mo(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:Y.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,p)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const u=s.getMeta(l);if((u==null?void 0:u.type)===xe.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:h}=r.contentDocument;this.insertStyleRules(n,h)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(l,{id:p,replayer:this})};Ke(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:p}of i)this.attachDocumentToIframe(l,p),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);a.forEach(l=>mt(l))}collectIframeAndAttachDocument(t,r){if(Vr(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(G.Start,o),this.emitter.on(G.Pause,o);const l=()=>{this.emitter.off(G.Start,o),this.emitter.off(G.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(p=>{p.sheet||(s.add(p),p.addEventListener("load",()=>{s.delete(p),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(G.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(G.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===te.IncrementalSnapshot&&r.data.source===Y.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(Re(this.imageMap,null,s)));return le(Q({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,le(Q({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Re(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,le(Q({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case Y.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case Y.Drag:case Y.TouchMove:case Y.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const p={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(p)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case Y.MouseInteraction:{if(o.id===-1)break;const l=new Event(oa(ne[o.type])),p=this.mirror.getNode(o.id);if(!p)return this.debugNodeNotFound(o,o.id);this.emitter.emit(G.MouseInteraction,{type:o.type,target:p});const{triggerFocus:u}=this.config;switch(o.type){case ne.Blur:"blur"in p&&p.blur();break;case ne.Focus:u&&p.focus&&p.focus({preventScroll:!0});break;case ne.Click:case ne.TouchStart:case ne.TouchEnd:case ne.MouseDown:case ne.MouseUp:r?(o.type===ne.TouchStart?this.touchActive=!0:o.type===ne.TouchEnd&&(this.touchActive=!1),o.type===ne.MouseDown?this.lastMouseDownEvent=[p,l]:o.type===ne.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===ne.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===ne.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===ne.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===ne.TouchEnd?this.mouse.classList.remove("touch-active"):p.dispatchEvent(l));break;case ne.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:p.dispatchEvent(l)}break}case Y.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case Y.ViewportResize:this.emitter.emit(G.Resize,{width:o.width,height:o.height});break;case Y.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case Y.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const p=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:p,timeOffset:t.timestamp-u[0].timestamp,mutation:o});break}case Y.StyleSheetRule:case Y.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case Y.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);cn({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case Y.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case Y.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case Y.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,gl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const n=this.legacy_missingNodeRetryMap[u],h=po(n.node,this.virtualDom,this.mirror);h&&(n.node=h)}catch(n){this.warn(n)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(t,u.id),!1)),t.removes.forEach(u=>{var n;const h=s.getNode(u.id);if(!h)return;let c=s.getNode(u.parentId);if(!c)return this.warnNodeNotFound(t,u.parentId);if(u.isShadow&&pt(c)&&(c=c.shadowRoot),s.removeNodeFromMap(h),c)try{c.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&c.nodeName==="STYLE"&&((n=c.rules)==null?void 0:n.length)>0&&(c.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",c,h,t);else throw f}});const i=Q({},this.legacy_missingNodeRetryMap),a=[],o=u=>{let n=null;return u.nextId&&(n=s.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!n},l=u=>{var n,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=s.getNode(u.parentId);if(!c)return u.node.type===xe.Document?this.newDocumentQueue.push(u):a.push(u);u.node.isShadow&&(pt(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let f=null,d=null;if(u.previousId&&(f=s.getNode(u.previousId)),u.nextId&&(d=s.getNode(u.nextId)),o(u))return a.push(u);if(u.node.rootId&&!s.getNode(u.node.rootId))return;const m=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Vr(c,s)){this.attachDocumentToIframe(u,c);return}const g=(S,E)=>{if(!this.usingVirtualDom){mt(S);for(const w of this.config.plugins||[])w.onBuild&&w.onBuild(S,{id:E,replayer:this})}},b=Ke(u.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:b,mutation:u};return}const y=s.getMeta(c);if(y&&y.type===xe.Element&&u.node.type===xe.Text){const S=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(y.tagName==="textarea")for(const E of S)E.nodeType===c.TEXT_NODE&&c.removeChild(E);else if(y.tagName==="style"&&S.length===1)for(const E of S)E.nodeType===c.TEXT_NODE&&!s.hasNode(E)&&(b.textContent=E.textContent,c.removeChild(E))}else if((y==null?void 0:y.type)===xe.Document){const S=c;u.node.type===xe.DocumentType&&((n=S.childNodes[0])==null?void 0:n.nodeType)===Node.DOCUMENT_TYPE_NODE&&S.removeChild(S.childNodes[0]),b.nodeName==="HTML"&&S.documentElement&&S.removeChild(S.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?c.insertBefore(b,f.nextSibling):d&&d.parentNode?c.contains(d)?c.insertBefore(b,d):c.insertBefore(b,null):c.appendChild(b),g(b,u.node.id),this.usingVirtualDom&&b.nodeName==="#text"&&c.nodeName==="STYLE"&&((h=c.rules)==null?void 0:h.length)>0&&(c.rules=[]),Vr(b,this.mirror)){const S=this.mirror.getId(b),E=this.newDocumentQueue.find(w=>w.parentId===S);E&&(this.attachDocumentToIframe(E,b),this.newDocumentQueue=this.newDocumentQueue.filter(w=>w!==E))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,c,b,u)};t.adds.forEach(u=>{l(u)});const p=Date.now();for(;a.length;){const u=Il(a);if(a.length=0,Date.now()-p>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const n of u)s.getNode(n.value.parentId)?yo(n,c=>{l(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",n)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Ll(t.texts).forEach(u=>{var n;const h=s.getNode(u.id);if(!h)return t.removes.find(c=>c.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);if(h.textContent=u.value,this.usingVirtualDom){const c=h.parentNode;((n=c==null?void 0:c.rules)==null?void 0:n.length)>0&&(c.rules=[])}}),t.attributes.forEach(u=>{var n;const h=s.getNode(u.id);if(!h)return t.removes.find(c=>c.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);for(const c in u.attributes)if(typeof c=="string"){const f=u.attributes[c];if(f===null)h.removeAttribute(c),c==="open"&&Zl(h,u);else if(typeof f=="string")try{if(c==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const d=s.getMeta(h);Object.assign(d.attributes,u.attributes);const m=Ke(d,{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),g=h.nextSibling,b=h.parentNode;if(m&&b){b.removeChild(h),b.insertBefore(m,g),s.replace(u.id,m);break}}catch(d){}if(c==="value"&&h.nodeName==="TEXTAREA"){const d=h;d.childNodes.forEach(g=>d.removeChild(g));const m=(n=h.ownerDocument)==null?void 0:n.createTextNode(f);m&&d.appendChild(m)}else h.setAttribute(c,f);c==="rr_open_mode"&&h.nodeName==="DIALOG"&&mt(h,u)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(c==="style"){const d=f,m=h;for(const g in d)if(d[g]===!1)m.style.removeProperty(g);else if(d[g]instanceof Array){const b=d[g];m.style.setProperty(g,b[0],b[1])}else{const b=d[g];m.style.setProperty(g,b)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===xe.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const p=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!p||!u)return;const n=new Range;n.setStart(p,a),n.setEnd(u,l);const h=p.ownerDocument,c=h==null?void 0:h.getSelection();return c&&r.add(c),{range:n,selection:c}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===Y.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===Y.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:l,index:p})=>{try{if(Array.isArray(p)){const{positions:u,index:n}=en(p);Je(r.cssRules,u).insertRule(l,n)}else{const u=p===void 0?void 0:Math.min(p,r.cssRules.length);r==null||r.insertRule(l,u)}}catch(u){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:p,index:u}=en(l);Je(r.cssRules,p).deleteRule(u||0)}else r==null||r.deleteRule(l)}catch(p){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){t.set&&Je(r.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&Je(r.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(l=>{var p;let u=null,n=null;if(pt(s)?n=((p=s.ownerDocument)==null?void 0:p.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{u=new n.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:Y.StyleSheetRule,adds:l.rules},u)}catch(h){}});const i=10;let a=0;const o=(l,p)=>{const u=p.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);pt(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==p.length&&a<i&&(setTimeout(()=>o(l,p),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,l=a&&t[a],p=o&&t[o];if(l){const{node:u,mutation:n}=l;r.insertBefore(u,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}if(p){const{node:u,mutation:n}=p;r.insertBefore(u,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const l=wo(o,this.iframe),p=t*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${p}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:p,y:u}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?Gr:Object.assign({},Gr,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(p=>l.lineTo(p.x,p.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==te.IncrementalSnapshot?!1:t.data.source>Y.Mutation&&t.data.source<=Y.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(G.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(fn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(fn,...t)}}var pe=Uint8Array,Me=Uint16Array,ei=Uint32Array,Ro=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Mo=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),iu=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_o=function(e,t){for(var r=new Me(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];for(var i=new ei(r[30]),s=1;s<30;++s)for(var a=r[s];a<r[s+1];++a)i[a]=a-r[s]<<5|s;return[r,i]},No=_o(Ro,2),Oo=No[0],su=No[1];Oo[28]=258,su[258]=28;var nu=_o(Mo,0),ou=nu[0],ti=new Me(32768);for(var K=0;K<32768;++K){var Ce=(K&43690)>>>1|(K&21845)<<1;Ce=(Ce&52428)>>>2|(Ce&13107)<<2,Ce=(Ce&61680)>>>4|(Ce&3855)<<4,ti[K]=((Ce&65280)>>>8|(Ce&255)<<8)>>>1}var Ze=function(e,t,r){for(var s=e.length,i=0,a=new Me(t);i<s;++i)++a[e[i]-1];var o=new Me(t);for(i=0;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var l;if(r){l=new Me(1<<t);var p=15-t;for(i=0;i<s;++i)if(e[i])for(var u=i<<4|e[i],n=t-e[i],h=o[e[i]-1]++<<n,c=h|(1<<n)-1;h<=c;++h)l[ti[h]>>>p]=u}else for(l=new Me(s),i=0;i<s;++i)l[i]=ti[o[e[i]-1]++]>>>15-e[i];return l},ot=new pe(288);for(var K=0;K<144;++K)ot[K]=8;for(var K=144;K<256;++K)ot[K]=9;for(var K=256;K<280;++K)ot[K]=7;for(var K=280;K<288;++K)ot[K]=8;var Ao=new pe(32);for(var K=0;K<32;++K)Ao[K]=5;var au=Ze(ot,9,1),lu=Ze(Ao,5,1),$r=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},de=function(e,t,r){var s=t/8>>0;return(e[s]|e[s+1]<<8)>>>(t&7)&r},Hr=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(t&7)},uu=function(e){return(e/8>>0)+(e&7&&1)},Do=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var s=new(e instanceof Me?Me:e instanceof ei?ei:pe)(r-t);return s.set(e.subarray(t,r)),s},cu=function(e,t,r){var s=e.length,i=!t||r,a=!r||r.i;r||(r={}),t||(t=new pe(s*3));var o=function(N){var P=t.length;if(N>P){var V=new pe(Math.max(P*2,N));V.set(t),t=V}},l=r.f||0,p=r.p||0,u=r.b||0,n=r.l,h=r.d,c=r.m,f=r.n,d=s*8;do{if(!n){r.f=l=de(e,p,1);var m=de(e,p+1,3);if(p+=3,m)if(m==1)n=au,h=lu,c=9,f=5;else if(m==2){var S=de(e,p,31)+257,E=de(e,p+10,15)+4,w=S+de(e,p+5,31)+1;p+=14;for(var v=new pe(w),C=new pe(19),x=0;x<E;++x)C[iu[x]]=de(e,p+x*3,7);p+=E*3;var A=$r(C),M=(1<<A)-1;if(!a&&p+w*(A+7)>d)break;for(var B=Ze(C,A,1),x=0;x<w;){var k=B[de(e,p,M)];p+=k&15;var g=k>>>4;if(g<16)v[x++]=g;else{var J=0,U=0;for(g==16?(U=3+de(e,p,3),p+=2,J=v[x-1]):g==17?(U=3+de(e,p,7),p+=3):g==18&&(U=11+de(e,p,127),p+=7);U--;)v[x++]=J}}var R=v.subarray(0,S),q=v.subarray(S);c=$r(R),f=$r(q),n=Ze(R,c,1),h=Ze(q,f,1)}else throw"invalid block type";else{var g=uu(p)+4,b=e[g-4]|e[g-3]<<8,y=g+b;if(y>s){if(a)throw"unexpected EOF";break}i&&o(u+b),t.set(e.subarray(g,y),u),r.b=u+=b,r.p=p=y*8;continue}if(p>d)throw"unexpected EOF"}i&&o(u+131072);for(var I=(1<<c)-1,j=(1<<f)-1,H=c+f+18;a||p+H<d;){var J=n[Hr(e,p)&I],z=J>>>4;if(p+=J&15,p>d)throw"unexpected EOF";if(!J)throw"invalid length/literal";if(z<256)t[u++]=z;else if(z==256){n=null;break}else{var X=z-254;if(z>264){var x=z-257,ae=Ro[x];X=de(e,p,(1<<ae)-1)+Oo[x],p+=ae}var _=h[Hr(e,p)&j],D=_>>>4;if(!_)throw"invalid distance";p+=_&15;var q=ou[D];if(D>3){var ae=Mo[D];q+=Hr(e,p)&(1<<ae)-1,p+=ae}if(p>d)throw"unexpected EOF";i&&o(u+131072);for(var O=u+X;u<O;u+=4)t[u]=t[u-q],t[u+1]=t[u+1-q],t[u+2]=t[u+2-q],t[u+3]=t[u+3-q];u=O}}r.l=n,r.p=p,r.b=u,n&&(l=1,r.m=c,r.d=h,r.n=f)}while(!l);return u==t.length?t:Do(t,0,u)},hu=function(e){if((e[0]&15)!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(e[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function fu(e,t){return cu((hu(e),e.subarray(2,-4)),t)}function pu(e,t){for(var r=e.length,s=new pe(e.length+(e.length>>>1)),i=0,a=function(u){s[i++]=u},o=0;o<r;++o){if(i+5>s.length){var l=new pe(i+8+(r-o<<1));l.set(s),s=l}var p=e.charCodeAt(o);p<128||t?a(p):p<2048?(a(192|p>>>6),a(128|p&63)):p>55295&&p<57344?(p=65536+(p&1047552)|e.charCodeAt(++o)&1023,a(240|p>>>18),a(128|p>>>12&63),a(128|p>>>6&63),a(128|p&63)):(a(224|p>>>12),a(128|p>>>6&63),a(128|p&63))}return Do(s,0,i)}function du(e,t){var r="";if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);for(var s=0;s<e.length;){var i=e[s++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((i&31)<<6|e[s++]&63):i<240?r+=String.fromCharCode((i&15)<<12|(e[s++]&63)<<6|e[s++]&63):(i=((i&15)<<18|(e[s++]&63)<<12|(e[s++]&63)<<6|e[s++]&63)-65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}return r}const dn="v1",mu=e=>{if(typeof e!="string")return e;try{const t=JSON.parse(e);if(t.timestamp)return t}catch(t){}try{const t=JSON.parse(du(fu(pu(e,!0))));if(t.v===dn)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${dn}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}};var _i=(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))(_i||{}),ri=(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))(ri||{});function mn(e){let t="";return Object.keys(e).forEach(r=>{t+=`${r}: ${e[r]};`}),t}function Ye(e,t=2){let r=String(e);const s=Math.pow(10,t-1);if(e<s)for(;String(s).length>r.length;)r=`0${e}`;return r}const Po=1e3,ii=60*Po,gn=60*ii;function gt(e){if(e<=0)return"00:00";const t=Math.floor(e/gn);e=e%gn;const r=Math.floor(e/ii);e=e%ii;const s=Math.floor(e/Po);return t?`${Ye(t)}:${Ye(r)}:${Ye(s)}`:`${Ye(r)}:${Ye(s)}`}function gu(e){return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.resolve()}function yu(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function yn(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function wu(e){return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}function wn(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function vu(e){return e.type!==_i.IncrementalSnapshot?!1:e.data.source>ri.Mutation&&e.data.source<=ri.Input}function bu(e,t){const r=[];let s=e[0].timestamp;for(const i of e)vu(i)&&(i.timestamp-s>t&&r.push([s,i.timestamp]),s=i.timestamp);return r}function Su(e){let t,r,s,i,a,o,l,p,u;return{c(){t=oe("div"),r=oe("input"),s=fe(),i=oe("label"),a=fe(),o=oe("span"),l=De(e[3]),F(r,"type","checkbox"),F(r,"id",e[2]),r.disabled=e[1],F(r,"class","svelte-a6h7w7"),F(i,"for",e[2]),F(i,"class","svelte-a6h7w7"),F(o,"class","label svelte-a6h7w7"),F(t,"class","switch svelte-a6h7w7"),Ve(t,"disabled",e[1])},m(n,h){Ee(n,t,h),$(t,r),r.checked=e[0],$(t,s),$(t,i),$(t,a),$(t,o),$(o,l),p||(u=ze(r,"change",e[4]),p=!0)},p(n,[h]){h&4&&F(r,"id",n[2]),h&2&&(r.disabled=n[1]),h&1&&(r.checked=n[0]),h&4&&F(i,"for",n[2]),h&8&&vt(l,n[3]),h&2&&Ve(t,"disabled",n[1])},i:et,o:et,d(n){n&&ve(t),p=!1,u()}}}function Eu(e,t,r){let{disabled:s}=t,{checked:i}=t,{id:a}=t,{label:o}=t;function l(){i=this.checked,r(0,i)}return e.$$set=p=>{"disabled"in p&&r(1,s=p.disabled),"checked"in p&&r(0,i=p.checked),"id"in p&&r(2,a=p.id),"label"in p&&r(3,o=p.label)},[i,s,a,o,l]}class Cu extends li{constructor(t){super(),ai(this,t,Eu,Su,si,{disabled:1,checked:0,id:2,label:3})}}function vn(e,t,r){const s=e.slice();return s[38]=t[r],s}function bn(e,t,r){const s=e.slice();return s[41]=t[r],s}function Sn(e,t,r){const s=e.slice();return s[44]=t[r],s}function En(e){let t,r,s,i=gt(e[6])+"",a,o,l,p,u,n,h,c,f,d,m=gt(e[8].totalTime)+"",g,b,y,S,E,w,v,C,x,A,M,B,k,J=Ie(e[13]),U=[];for(let D=0;D<J.length;D+=1)U[D]=Cn(Sn(e,J,D));let R=Ie(e[9]),q=[];for(let D=0;D<R.length;D+=1)q[D]=xn(bn(e,R,D));function I(D,O){return D[7]==="playing"?Ru:xu}let j=I(e),H=j(e),z=Ie(e[3]),X=[];for(let D=0;D<z.length;D+=1)X[D]=Rn(vn(e,z,D));function ae(D){e[29](D)}let _={id:"skip",disabled:e[10]==="skipping",label:"skip inactive"};return e[0]!==void 0&&(_.checked=e[0]),v=new Cu({props:_}),Ae.push(()=>Ko(v,"checked",ae)),{c(){t=oe("div"),r=oe("div"),s=oe("span"),a=De(i),o=fe(),l=oe("div"),p=oe("div"),u=fe();for(let D=0;D<U.length;D+=1)U[D].c();n=fe();for(let D=0;D<q.length;D+=1)q[D].c();h=fe(),c=oe("div"),f=fe(),d=oe("span"),g=De(m),b=fe(),y=oe("div"),S=oe("button"),H.c(),E=fe();for(let D=0;D<X.length;D+=1)X[D].c();w=fe(),Ln(v.$$.fragment),x=fe(),A=oe("button"),A.innerHTML=`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4
160
+ 18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4
161
+ 0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0
162
+ 224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48
163
+ 48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48
164
+ 48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4
165
+ 68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg>`,F(s,"class","rr-timeline__time svelte-189zk2r"),F(p,"class","rr-progress__step svelte-189zk2r"),ie(p,"width",e[12]),F(c,"class","rr-progress__handler svelte-189zk2r"),ie(c,"left",e[12]),F(l,"class","rr-progress svelte-189zk2r"),Ve(l,"disabled",e[10]==="skipping"),F(d,"class","rr-timeline__time svelte-189zk2r"),F(r,"class","rr-timeline svelte-189zk2r"),F(S,"class","svelte-189zk2r"),F(A,"class","svelte-189zk2r"),F(y,"class","rr-controller__btns svelte-189zk2r"),F(t,"class","rr-controller svelte-189zk2r")},m(D,O){Ee(D,t,O),$(t,r),$(r,s),$(s,a),$(r,o),$(r,l),$(l,p),$(l,u);for(let N=0;N<U.length;N+=1)U[N]&&U[N].m(l,null);$(l,n);for(let N=0;N<q.length;N+=1)q[N]&&q[N].m(l,null);$(l,h),$(l,c),e[27](l),$(r,f),$(r,d),$(d,g),$(t,b),$(t,y),$(y,S),H.m(S,null),$(y,E);for(let N=0;N<X.length;N+=1)X[N]&&X[N].m(y,null);$(y,w),ni(v,y,null),$(y,x),$(y,A),M=!0,B||(k=[ze(l,"click",e[15]),ze(l,"keydown",e[16]),ze(S,"click",e[4]),ze(A,"click",e[30])],B=!0)},p(D,O){if((!M||O[0]&64)&&i!==(i=gt(D[6])+"")&&vt(a,i),(!M||O[0]&4096)&&ie(p,"width",D[12]),O[0]&8192){J=Ie(D[13]);let P;for(P=0;P<J.length;P+=1){const V=Sn(D,J,P);U[P]?U[P].p(V,O):(U[P]=Cn(V),U[P].c(),U[P].m(l,n))}for(;P<U.length;P+=1)U[P].d(1);U.length=J.length}if(O[0]&512){R=Ie(D[9]);let P;for(P=0;P<R.length;P+=1){const V=bn(D,R,P);q[P]?q[P].p(V,O):(q[P]=xn(V),q[P].c(),q[P].m(l,h))}for(;P<q.length;P+=1)q[P].d(1);q.length=R.length}if((!M||O[0]&4096)&&ie(c,"left",D[12]),(!M||O[0]&1024)&&Ve(l,"disabled",D[10]==="skipping"),(!M||O[0]&256)&&m!==(m=gt(D[8].totalTime)+"")&&vt(g,m),j!==(j=I(D))&&(H.d(1),H=j(D),H&&(H.c(),H.m(S,null))),O[0]&1066){z=Ie(D[3]);let P;for(P=0;P<z.length;P+=1){const V=vn(D,z,P);X[P]?X[P].p(V,O):(X[P]=Rn(V),X[P].c(),X[P].m(y,w))}for(;P<X.length;P+=1)X[P].d(1);X.length=z.length}const N={};O[0]&1024&&(N.disabled=D[10]==="skipping"),!C&&O[0]&1&&(C=!0,N.checked=D[0],Jo(()=>C=!1)),v.$set(N)},i(D){M||(Se(v.$$.fragment,D),M=!0)},o(D){je(v.$$.fragment,D),M=!1},d(D){D&&ve(t),It(U,D),It(q,D),e[27](null),H.d(),It(X,D),oi(v),B=!1,Ge(k)}}}function Cn(e){let t,r;return{c(){t=oe("div"),F(t,"title",r=e[44].name),ie(t,"width",e[44].width),ie(t,"height","4px"),ie(t,"position","absolute"),ie(t,"background",e[44].background),ie(t,"left",e[44].position)},m(s,i){Ee(s,t,i)},p(s,i){i[0]&8192&&r!==(r=s[44].name)&&F(t,"title",r),i[0]&8192&&ie(t,"width",s[44].width),i[0]&8192&&ie(t,"background",s[44].background),i[0]&8192&&ie(t,"left",s[44].position)},d(s){s&&ve(t)}}}function xn(e){let t,r;return{c(){t=oe("div"),F(t,"title",r=e[41].name),ie(t,"width","10px"),ie(t,"height","5px"),ie(t,"position","absolute"),ie(t,"top","2px"),ie(t,"transform","translate(-50%, -50%)"),ie(t,"background",e[41].background),ie(t,"left",e[41].position)},m(s,i){Ee(s,t,i)},p(s,i){i[0]&512&&r!==(r=s[41].name)&&F(t,"title",r),i[0]&512&&ie(t,"background",s[41].background),i[0]&512&&ie(t,"left",s[41].position)},d(s){s&&ve(t)}}}function xu(e){let t,r;return{c(){t=wt("svg"),r=wt("path"),F(r,"d",`M170.65984 896l0-768 640 384zM644.66944
166
+ 512l-388.66944-233.32864 0 466.65728z`),F(t,"class","icon"),F(t,"viewBox","0 0 1024 1024"),F(t,"version","1.1"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),F(t,"width","16"),F(t,"height","16")},m(s,i){Ee(s,t,i),$(t,r)},d(s){s&&ve(t)}}}function Ru(e){let t,r;return{c(){t=wt("svg"),r=wt("path"),F(r,"d",`M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0
167
+ 512q0 53.00224-37.49888 90.50112t-90.50112
168
+ 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
169
+ 37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0
170
+ 90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888
171
+ 90.50112t-90.50112
172
+ 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
173
+ 37.49888-90.50112t90.50112-37.49888zM341.34016 213.34016q-17.67424
174
+ 0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928
175
+ 30.16704t30.16704 12.4928 30.16704-12.4928
176
+ 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984
177
+ 213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0
178
+ 17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928
179
+ 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z`),F(t,"class","icon"),F(t,"viewBox","0 0 1024 1024"),F(t,"version","1.1"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),F(t,"width","16"),F(t,"height","16")},m(s,i){Ee(s,t,i),$(t,r)},d(s){s&&ve(t)}}}function Rn(e){let t,r=e[38]+"",s,i,a,o,l;function p(){return e[28](e[38])}return{c(){t=oe("button"),s=De(r),i=De("x"),t.disabled=a=e[10]==="skipping",F(t,"class","svelte-189zk2r"),Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},m(u,n){Ee(u,t,n),$(t,s),$(t,i),o||(l=ze(t,"click",p),o=!0)},p(u,n){e=u,n[0]&8&&r!==(r=e[38]+"")&&vt(s,r),n[0]&1024&&a!==(a=e[10]==="skipping")&&(t.disabled=a),n[0]&1034&&Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},d(u){u&&ve(t),o=!1,l()}}}function Mu(e){let t,r,s=e[2]&&En(e);return{c(){s&&s.c(),t=Wo()},m(i,a){s&&s.m(i,a),Ee(i,t,a),r=!0},p(i,a){i[2]?s?(s.p(i,a),a[0]&4&&Se(s,1)):(s=En(i),s.c(),Se(s,1),s.m(t.parentNode,t)):s&&(kn(),je(s,1,1,()=>{s=null}),In())},i(i){r||(Se(s),r=!0)},o(i){je(s),r=!1},d(i){i&&ve(t),s&&s.d(i)}}}function Mn(e,t,r){const s=t-e;return(100-(t-r)/s*100).toFixed(2)}function _u(e,t,r){const s=$o();let{replayer:i}=t,{showController:a}=t,{autoPlay:o}=t,{skipInactive:l}=t,{speedOption:p}=t,{speed:u=p.length?p[0]:1}=t,{tags:n={}}=t,{inactiveColor:h}=t,c=0,f=null,d,m,g,b,y=!1,S=null,E=null,w,v,C,x;const A=()=>{M();function O(){r(6,c=i.getCurrentTime()),y&&c>=y&&(E?R(E.start,E.end,!0,void 0):(i.pause(),S&&(S(),S=null))),c<w.totalTime&&(f=requestAnimationFrame(O))}f=requestAnimationFrame(O)},M=()=>{f&&(cancelAnimationFrame(f),f=null)},B=()=>{switch(d){case"playing":J();break;case"paused":k();break}},k=()=>{d==="paused"&&(b?(i.play(),b=!1):i.play(c))},J=()=>{d==="playing"&&(i.pause(),y=!1)},U=(O,N)=>{r(6,c=O),y=!1,b=!1,(typeof N=="boolean"?N:d==="playing")?i.play(O):i.pause(O)},R=(O,N,P=!1,V=void 0)=>{P?E={start:O,end:N}:E=null,r(6,c=O),y=N,S=V||null,i.play(O)},q=O=>{if(m==="skipping")return;const N=g.getBoundingClientRect();let V=(O.clientX-N.left)/N.width;V<0?V=0:V>1&&(V=1);const ue=w.totalTime*V;U(ue)},I=O=>{m!=="skipping"&&(O.key==="ArrowLeft"?U(c-5):O.key==="ArrowRight"&&U(c+5))},j=O=>{let N=d==="playing";r(1,u=O),N&&i.pause(),i.setConfig({speed:u}),N&&i.play(c)},H=()=>{r(0,l=!l)},z=()=>Promise.resolve().then(()=>{r(8,w=i.getMetaData())});Dn(()=>{r(7,d=i.service.state.value),r(10,m=i.speedService.state.value),i.on("state-change",O=>{const{player:N,speed:P}=O;if(N!=null&&N.value&&d!==N.value)switch(r(7,d=N.value),d){case"playing":A();break;case"paused":M();break}P!=null&&P.value&&m!==P.value&&r(10,m=P.value)}),i.on("finish",()=>{b=!0,S&&(S(),S=null)}),o&&i.play()}),Go(()=>{l!==i.config.skipInactive&&i.setConfig({skipInactive:l})}),Pn(()=>{i.pause(),M()});function X(O){Ae[O?"unshift":"push"](()=>{g=O,r(11,g)})}const ae=O=>j(O);function _(O){l=O,r(0,l)}const D=()=>s("fullscreen");return e.$$set=O=>{"replayer"in O&&r(17,i=O.replayer),"showController"in O&&r(2,a=O.showController),"autoPlay"in O&&r(18,o=O.autoPlay),"skipInactive"in O&&r(0,l=O.skipInactive),"speedOption"in O&&r(3,p=O.speedOption),"speed"in O&&r(1,u=O.speed),"tags"in O&&r(19,n=O.tags),"inactiveColor"in O&&r(20,h=O.inactiveColor)},e.$$.update=()=>{if(e.$$.dirty[0]&64&&s("ui-update-current-time",{payload:c}),e.$$.dirty[0]&128&&s("ui-update-player-state",{payload:d}),e.$$.dirty[0]&131072&&r(8,w=i.getMetaData()),e.$$.dirty[0]&320){const O=Math.min(1,c/w.totalTime);r(12,v=`${100*O}%`),s("ui-update-progress",{payload:O})}e.$$.dirty[0]&655360&&r(9,C=(()=>{const{context:O}=i.service.state,N=O.events.length,P=O.events[0].timestamp,V=O.events[N-1].timestamp,ue=[];return O.events.forEach(ce=>{if(ce.type===_i.Custom){const re={name:ce.data.tag,background:n[ce.data.tag]||"rgb(73, 80, 246)",position:`${Mn(P,V,ce.timestamp)}%`};ue.push(re)}}),ue})()),e.$$.dirty[0]&1179648&&r(13,x=(()=>{try{const{context:O}=i.service.state,N=O.events.length,P=O.events[0].timestamp,V=O.events[N-1].timestamp,ue=bu(O.events,i.config.inactivePeriodThreshold),ce=(re,be,Ne,ko)=>{const Io=be-re;return((ko-Ne)/Io*100).toFixed(2)};return ue.map(re=>({name:"inactive period",background:h,position:`${Mn(P,V,re[0])}%`,width:`${ce(P,V,re[0],re[1])}%`}))}catch(O){return[]}})())},[l,u,a,p,B,j,c,d,w,C,m,g,v,x,s,q,I,i,o,n,h,k,J,U,R,H,z,X,ae,_,D]}class Nu extends li{constructor(t){super(),ai(this,t,_u,Mu,si,{replayer:17,showController:2,autoPlay:18,skipInactive:0,speedOption:3,speed:1,tags:19,inactiveColor:20,toggle:4,play:21,pause:22,goto:23,playRange:24,setSpeed:5,toggleSkipInactive:25,triggerUpdateMeta:26},null,[-1,-1])}get toggle(){return this.$$.ctx[4]}get play(){return this.$$.ctx[21]}get pause(){return this.$$.ctx[22]}get goto(){return this.$$.ctx[23]}get playRange(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[5]}get toggleSkipInactive(){return this.$$.ctx[25]}get triggerUpdateMeta(){return this.$$.ctx[26]}}function _n(e){let t,r,s={replayer:e[7],showController:e[3],autoPlay:e[1],speedOption:e[2],skipInactive:e[0],tags:e[4],inactiveColor:e[5]};return t=new Nu({props:s}),e[32](t),t.$on("fullscreen",e[33]),{c(){Ln(t.$$.fragment)},m(i,a){ni(t,i,a),r=!0},p(i,a){const o={};a[0]&128&&(o.replayer=i[7]),a[0]&8&&(o.showController=i[3]),a[0]&2&&(o.autoPlay=i[1]),a[0]&4&&(o.speedOption=i[2]),a[0]&1&&(o.skipInactive=i[0]),a[0]&16&&(o.tags=i[4]),a[0]&32&&(o.inactiveColor=i[5]),t.$set(o)},i(i){r||(Se(t.$$.fragment,i),r=!0)},o(i){je(t.$$.fragment,i),r=!1},d(i){e[32](null),oi(t,i)}}}function Ou(e){let t,r,s,i,a=e[7]&&_n(e);return{c(){t=oe("div"),r=oe("div"),s=fe(),a&&a.c(),F(r,"class","rr-player__frame"),F(r,"style",e[11]),F(t,"class","rr-player"),F(t,"style",e[12])},m(o,l){Ee(o,t,l),$(t,r),e[31](r),$(t,s),a&&a.m(t,null),e[34](t),i=!0},p(o,l){(!i||l[0]&2048)&&F(r,"style",o[11]),o[7]?a?(a.p(o,l),l[0]&128&&Se(a,1)):(a=_n(o),a.c(),Se(a,1),a.m(t,null)):a&&(kn(),je(a,1,1,()=>{a=null}),In()),(!i||l[0]&4096)&&F(t,"style",o[12])},i(o){i||(Se(a),i=!0)},o(o){je(a),i=!1},d(o){o&&ve(t),e[31](null),a&&a.d(),e[34](null)}}}const Nn=80;function Au(e,t,r){let{width:s=1024}=t,{height:i=576}=t,{maxScale:a=1}=t,{events:o}=t,{skipInactive:l=!0}=t,{autoPlay:p=!0}=t,{speedOption:u=[1,2,4,8]}=t,{speed:n=1}=t,{showController:h=!0}=t,{tags:c={}}=t,{inactiveColor:f="#D4D4D4"}=t,d;const m=()=>d.getMirror();let g,b,y,S=s,E=i,w,v,C;const x=(N,P)=>{const V=s/P.width,ue=i/P.height,ce=[V,ue];a&&ce.push(a),N.style.transform=`scale(${Math.min(...ce)})translate(-50%, -50%)`},A=()=>{x(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight})},M=()=>{g&&(yn()?yu():gu(g))},B=(N,P)=>{switch(d.on(N,P),N){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":w.$on(N,({detail:V})=>P(V))}},k=N=>{d.addEvent(N),w.triggerUpdateMeta()},J=()=>d.getMetaData(),U=()=>d,R=()=>{w.toggle()},q=N=>{w.setSpeed(N)},I=()=>{w.toggleSkipInactive()},j=()=>{w.play()},H=()=>{w.pause()},z=(N,P)=>{w.goto(N,P)},X=(N,P,V=!1,ue=void 0)=>{w.playRange(N,P,V,ue)};Dn(()=>{if(u!==void 0&&wn(u)!=="array")throw new Error("speedOption must be array");if(u.forEach(N=>{if(wn(N)!=="number")throw new Error("item of speedOption must be number")}),u.indexOf(n)<0)throw new Error(`speed must be one of speedOption,
180
+ current config:
181
+ {
182
+ ...
183
+ speed: ${n},
184
+ speedOption: [${u.toString()}]
185
+ ...
186
+ }
187
+ `);r(7,d=new ru(o,Q({speed:n,root:b,unpackFn:mu},t))),d.on("resize",N=>{x(d.wrapper,N)}),y=wu(()=>{yn()?setTimeout(()=>{S=s,E=i,r(13,s=g.offsetWidth),r(14,i=g.offsetHeight-(h?Nn:0)),x(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight})},0):(r(13,s=S),r(14,i=E),x(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight}))})}),Pn(()=>{y&&y()});function ae(N){Ae[N?"unshift":"push"](()=>{b=N,r(9,b)})}function _(N){Ae[N?"unshift":"push"](()=>{w=N,r(10,w)})}const D=()=>M();function O(N){Ae[N?"unshift":"push"](()=>{g=N,r(8,g)})}return e.$$set=N=>{r(39,t=Pi(Pi({},t),ki(N))),"width"in N&&r(13,s=N.width),"height"in N&&r(14,i=N.height),"maxScale"in N&&r(15,a=N.maxScale),"events"in N&&r(16,o=N.events),"skipInactive"in N&&r(0,l=N.skipInactive),"autoPlay"in N&&r(1,p=N.autoPlay),"speedOption"in N&&r(2,u=N.speedOption),"speed"in N&&r(17,n=N.speed),"showController"in N&&r(3,h=N.showController),"tags"in N&&r(4,c=N.tags),"inactiveColor"in N&&r(5,f=N.inactiveColor)},e.$$.update=()=>{e.$$.dirty[0]&24576&&r(11,v=mn({width:`${s}px`,height:`${i}px`})),e.$$.dirty[0]&24584&&r(12,C=mn({width:`${s}px`,height:`${i+(h?Nn:0)}px`}))},t=ki(t),[l,p,u,h,c,f,M,d,g,b,w,v,C,s,i,a,o,n,m,A,B,k,J,U,R,q,I,j,H,z,X,ae,_,D,O]}let Du=class extends li{constructor(t){super(),ai(this,t,Au,Ou,si,{width:13,height:14,maxScale:15,events:16,skipInactive:0,autoPlay:1,speedOption:2,speed:17,showController:3,tags:4,inactiveColor:5,getMirror:18,triggerResize:19,toggleFullscreen:6,addEventListener:20,addEvent:21,getMetaData:22,getReplayer:23,toggle:24,setSpeed:25,toggleSkipInactive:26,play:27,pause:28,goto:29,playRange:30},null,[-1,-1])}get getMirror(){return this.$$.ctx[18]}get triggerResize(){return this.$$.ctx[19]}get toggleFullscreen(){return this.$$.ctx[6]}get addEventListener(){return this.$$.ctx[20]}get addEvent(){return this.$$.ctx[21]}get getMetaData(){return this.$$.ctx[22]}get getReplayer(){return this.$$.ctx[23]}get toggle(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[25]}get toggleSkipInactive(){return this.$$.ctx[26]}get play(){return this.$$.ctx[27]}get pause(){return this.$$.ctx[28]}get goto(){return this.$$.ctx[29]}get playRange(){return this.$$.ctx[30]}};class To extends Du{constructor(t){super({target:t.target,props:t.data||t.props})}}exports.Player=To;exports.default=To;
188
+ if (typeof module.exports == "object" && typeof exports == "object") {
189
+ var __cp = (to, from, except, desc) => {
190
+ if ((from && typeof from === "object") || typeof from === "function") {
191
+ for (let key of Object.getOwnPropertyNames(from)) {
192
+ if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
193
+ Object.defineProperty(to, key, {
194
+ get: () => from[key],
195
+ enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
196
+ });
197
+ }
198
+ }
199
+ return to;
200
+ };
201
+ module.exports = __cp(module.exports, exports);
202
+ }
203
+ return module.exports;
204
+ }))
205
+ //# sourceMappingURL=rrweb-player.umd.min.cjs.map