@glimt/record 0.0.44 → 0.0.45
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.
- package/dist/record.cjs +10 -10
- package/dist/record.cjs.map +1 -1
- package/dist/record.js +10 -10
- package/dist/record.js.map +1 -1
- package/dist/record.umd.cjs +10 -10
- package/dist/record.umd.cjs.map +2 -2
- package/dist/record.umd.min.cjs +24 -24
- package/dist/record.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/record.umd.min.cjs
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
|
-
"use strict";var el=Object.defineProperty,tl=Object.defineProperties;var rl=Object.getOwnPropertyDescriptors;var It=Object.getOwnPropertySymbols;var Ks=Object.prototype.hasOwnProperty,qs=Object.prototype.propertyIsEnumerable;var Xs=(s,e,t)=>e in s?el(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))Ks.call(e,t)&&Xs(s,t,e[t]);if(It)for(var t of It(e))qs.call(e,t)&&Xs(s,t,e[t]);return s},ee=(s,e)=>tl(s,rl(e));var $e=(s,e)=>{var t={};for(var r in s)Ks.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&It)for(var r of It(s))e.indexOf(r)<0&&qs.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var sl=Object.defineProperty,il=(s,e,t)=>e in s?sl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>il(s,typeof e!="symbol"?e+"":e,t),Qs,$=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))($||{}),R=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(R||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),Fe=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Fe||{}),ke=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(ke||{}),en=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(en||{});const ei={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ti={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xt={},nl=()=>!!globalThis.Zone;function Is(s){if(xt[s])return xt[s];const e=globalThis[s],t=e.prototype,r=s in ei?ei[s]:void 0,i=!!(r&&r.every(a=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,a))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in ti?ti[s]:void 0,l=!!(n&&n.every(a=>{var o;return typeof t[a]=="function"&&((o=t[a])==null?void 0:o.toString().includes("[native code]"))}));if(i&&l&&!nl())return xt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const o=a.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(a),c?xt[s]=c:t}catch(a){return t}}const Er={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(Er[i])return Er[i].call(e);const n=Is(s),l=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return l?(Er[i]=l,l.call(e)):e[t]}const $r={};function tn(s,e,t){const r=`${s}.${String(t)}`;if($r[r])return $r[r].bind(e);const n=Is(s)[t];return typeof n!="function"?e[t]:($r[r]=n,n.bind(e))}function ol(s){return we("Node",s,"childNodes")}function ll(s){return we("Node",s,"parentNode")}function al(s){return we("Node",s,"parentElement")}function ul(s){return we("Node",s,"textContent")}function cl(s,e){return tn("Node",s,"contains")(e)}function hl(s){return tn("Node",s,"getRootNode")()}function fl(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function pl(s){return s.styleSheets}function dl(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function ml(s,e){return we("Element",s,"querySelector")(e)}function gl(s,e){return we("Element",s,"querySelectorAll")(e)}function rn(){return Is("MutationObserver").constructor}function Me(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const x={childNodes:ol,parentNode:ll,parentElement:al,textContent:ul,contains:cl,getRootNode:hl,host:fl,styleSheets:pl,shadowRoot:dl,querySelector:ml,querySelectorAll:gl,mutationObserver:rn,patch:Me};var yl=Object.defineProperty,wl=(s,e,t)=>e in s?yl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,_e=(s,e,t)=>wl(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const ri={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},si={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},At={},Sl=()=>!!globalThis.Zone;function xs(s){if(At[s])return At[s];const e=globalThis[s],t=e.prototype,r=s in ri?ri[s]:void 0,i=!!(r&&r.every(a=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,a))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in si?si[s]:void 0,l=!!(n&&n.every(a=>{var o;return typeof t[a]=="function"&&((o=t[a])==null?void 0:o.toString().includes("[native code]"))}));if(i&&l&&!Sl())return At[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const o=a.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(a),c?At[s]=c:t}catch(a){return t}}const Nr={};function Se(s,e,t){var r;const i=`${s}.${String(t)}`;if(Nr[i])return Nr[i].call(e);const n=xs(s),l=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return l?(Nr[i]=l,l.call(e)):e[t]}const kr={};function sn(s,e,t){const r=`${s}.${String(t)}`;if(kr[r])return kr[r].bind(e);const n=xs(s)[t];return typeof n!="function"?e[t]:(kr[r]=n,n.bind(e))}function bl(s){return Se("Node",s,"childNodes")}function Cl(s){return Se("Node",s,"parentNode")}function vl(s){return Se("Node",s,"parentElement")}function Il(s){return Se("Node",s,"textContent")}function xl(s,e){return sn("Node",s,"contains")(e)}function Al(s){return sn("Node",s,"getRootNode")()}function Rl(s){return!s||!("host"in s)?null:Se("ShadowRoot",s,"host")}function Ml(s){return s.styleSheets}function Ol(s){return!s||!("shadowRoot"in s)?null:Se("Element",s,"shadowRoot")}function El(s,e){return Se("Element",s,"querySelector")(e)}function $l(s,e){return Se("Element",s,"querySelectorAll")(e)}function Nl(){return xs("MutationObserver").constructor}function kl(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const Z={childNodes:bl,parentNode:Cl,parentElement:vl,textContent:Il,contains:xl,getRootNode:Al,host:Rl,styleSheets:Ml,shadowRoot:Ol,querySelector:El,querySelectorAll:$l,mutationObserver:Nl,patch:kl};function nn(s){return s.nodeType===s.ELEMENT_NODE}function et(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function tt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Tl(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Ll(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function tr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>on(i,t)).join("");return Tl(r)}catch(e){return console.log("stringifyStylesheet error:",e),null}}function on(s,e){if(Dl(s)){let t;try{t=tr(s.styleSheet)||Ll(s)}catch(r){t=s.cssText}return s.styleSheet.href?ir(t,s.styleSheet.href):t}else{let t=s.cssText;return _l(s)&&s.selectorText.includes(":")&&(t=Pl(t)),e?ir(t,e):t}}function Pl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Dl(s){return"styleSheet"in s}function _l(s){return"selectorText"in s}class ln{constructor(){_e(this,"idNodeMap",new Map),_e(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Fl(){return new ln}function rr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let l=i||"";const a=r&&Re(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?l=n(l,s):l="*".repeat(l.length)),l}function Re(s){return s.toLowerCase()}const ii="__rrweb_original__",Bl=25e4;function Ul(s,e){if(s.width*s.height<Bl)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function Wl(s,e){if(s.width===0||s.height===0)return!0;const t=Ul(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=ii in i?i[ii]:i;for(let l=0;l<s.width;l+=r){const a=Math.min(r,s.width-l);for(let o=0;o<s.height;o+=r){const c=Math.min(r,s.height-o),u=new Uint32Array(n.call(t,l,o,a,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function sr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function an(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(l){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function zl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const jl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Gl=/^(?:[a-z+]+:)?\/\//i,Vl=/^www\..*/i,Hl=/^(data:)([^,]*),(.*)/i;function ir(s,e){return(s||"").replace(jl,(t,r,i,n,l,a)=>{const o=i||l||a,c=r||n||"";if(!o)return t;if(Gl.test(o)||Vl.test(o))return`url(${c}${o}${c})`;if(Hl.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${zl(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}function Rt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Yl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let l=Rt(s,t);const a=l.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const c=Rt(r[o].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let p=c.substring(0,h),d=l.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[o-1].textContent!=="")g=l.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=l.split(p),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=l.indexOf(p));if(d.length>=2&&h>u){const m=r[o-1].textContent;if(m&&typeof m=="string"){const f=Rt(m).length;g=l.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/a);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Rt(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),l=l.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/a)):m-=Math.max(1,Math.floor((f.length-g)*a))}break}}}}return i.push(s),i}function Zl(s,e){return Yl(s,e).join("/* rr_split */")}const Jl=1e3*60*2,Xl=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],un=class Ht{constructor(){if(_e(this,"currentHref",null),_e(this,"clones",{}),_e(this,"cleanTimeout",null),Ht.instance)return Ht.instance;Ht.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[data-rrweb-link-cloned="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;console.log("AsyncStylesheetManager, onLoad: href:",e);const t=Array.from(document.styleSheets);let r=null;for(let l=t.length-1;l>=0;l--)if(t[l].href===e){r=t[l];break}if(!r)return console.log("AsyncStylesheetManager, onLoad: couldn't find stylesheet for href:",e),this.removeCloneNode(e);const i=tr(r);if(this.removeCloneNode(e),!i){console.log("AsyncStylesheetManager, onLoad: couldn't stringify stylesheet for href:",e);return}console.log("AsyncStylesheetManager, onLoad: success! did get new css text! forcing mutation... for href:",e),this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[data-rrweb-link-cloned="source-${this.clones[e].cloneNodeAttrId}"]`);n?n.setAttribute("data-rrweb-mutation",Date.now().toString()):this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString())}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){console.log("AsyncStylesheetManager, onCleanTimeout: cleaning up"),this.cleanTimeout=null,this.removeAllCloneElements()}blowCache(){console.log("AsyncStylesheetManager, blowCache: blowing cache"),this.clones={},this.removeAllCloneElements()}registerClone({forElement:e}){this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const t=e.href;if(!t||t in this.clones&&this.clones[t]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const n=t.split("/").pop();if(n&&n.includes(".")){const[l]=n.split("?"),a=l.split(".").pop();if(a&&Xl.includes(a.toLowerCase()))return}}console.log("AsyncStylesheetManager, registerClone: registering clone for href:",t);const r=e.cloneNode(),i=Math.random().toString(36).slice(2);r.setAttribute("crossorigin","anonymous"),r.setAttribute("data-rrweb-link-cloned",i),e.setAttribute("data-rrweb-link-cloned",`source-${i}`),document.head.appendChild(r),this.clones[t]={original:e,clone:r,loaded:!1,cssText:null,cloneNodeAttrId:i},r.onload=()=>{this.onLoad(t)},r.onerror=()=>{this.onLoadError(t)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(jr.onCleanTimeout,Jl)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?(console.log("AsyncStylesheetManager, getClonedCssTextIfAvailable: returning cloned cssText, for href:",e),this.clones[e].cssText):null}};_e(un,"instance");let Kl=un;const jr=new Kl;let ql=1;const Ql=new RegExp("[^a-z0-9-_:]"),it=-2;function cn(){return ql++}function ea(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return Ql.test(e)?"div":e}let Ne,ni;const ta=/^[^ \t\n\r\u000c]+/,ra=/^[, \t\n\r\u000c]+/;function sa(s,e){if(e.trim()==="")return e;let t=0;function r(n){let l;const a=n.exec(e.substring(t));return a?(l=a[0],t+=l.length,l):""}const i=[];for(;r(ra),!(t>=e.length);){let n=r(ta);if(n.slice(-1)===",")n=Le(s,n.substring(0,n.length-1)),i.push(n);else{let l="";n=Le(s,n);let a=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+l).trim());break}else if(a)o===")"&&(a=!1);else if(o===","){t+=1,i.push((n+l).trim());break}else o==="("&&(a=!0);l+=o,t+=1}}}return i.join(", ")}const oi=new WeakMap;function Le(s,e){return!e||e.trim()===""?e:As(s,e)}function ia(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function As(s,e){let t=oi.get(s);if(t||(t=s.createElement("a"),oi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function hn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Le(s,r):t==="srcset"?sa(s,r):t==="style"?ir(r,As(s)):e==="object"&&t==="data"?Le(s,r):r)}function fn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function na(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function nr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?nr(Z.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?nr(Z.parentNode(s),e,t):!1}function pn(s,e,t,r){let i;if(nn(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(nr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function oa(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(a){return}if(n!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const l="about:blank";if(r.location.href!==l||s.src===l||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function la(s,e,t){let r=!1,i;try{i=s.sheet}catch(l){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function aa(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:l,inlineStylesheet:a,maskInputOptions:o={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,S=ua(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:S};case s.ELEMENT_NODE:return fa(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:o,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:S});case s.TEXT_NODE:return ha(s,{doc:t,needsMask:l,maskTextFn:c,rootId:S,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:S};case s.COMMENT_NODE:return{type:H.Comment,textContent:Z.textContent(s)||"",rootId:S};default:return!1}}function ua(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}const ca=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)};function ha(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,l=Z.parentNode(s),a=l&&l.tagName;let o="";const c=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?o="SCRIPT_PLACEHOLDER":n||(o=Z.textContent(s),c&&o&&(o=ir(o,As(e.doc)))),!c&&!u&&o&&t&&(o=r?r(o,Z.parentElement(s)):o.replace(/[\S]/g,"*")),{type:H.Text,textContent:o||"",rootId:i}}function fa(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:l={},maskInputFn:a,dataURLOptions:o={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=e,g=na(s,r,i),m=ea(s);let f={};const S=s.attributes.length;for(let y=0;y<S;y++){const C=s.attributes[y];fn(m,C.name,C.value)||(f[C.name]=hn(t,m,Re(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets);let C=null;for(let E=0;E<y.length;E++)if(y[E].href===s.href){C=y[E];break}let A=null;C&&(A=tr(C)),A||(A=jr.getClonedCssTextIfAvailable(s.href)),A?(delete f.rel,delete f.href,f._cssText=A):jr.registerClone({forElement:s})}if(m==="style"&&s.sheet){let y=tr(s.sheet);y&&(s.childNodes.length>1&&(y=Zl(y,s)),f._cssText=y)}if(m==="input"||m==="textarea"||m==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=rr({element:s,type:sr(s),tagName:m,value:y,maskInputOptions:l,maskInputFn:a}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!l.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&u){let y="getContext"in s?s.getContext("2d"):null;if(y!=null)Wl(s,y)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(s.width!==0&&s.height!==0){const C=s.toDataURL(o.type,o.quality);f.rr_dataURL=C,ca(()=>{try{const A=t.createElement("canvas");A.width=s.width,A.height=s.height;const E=A.toDataURL(o.type,o.quality);C===E&&delete f.rr_dataURL}catch(A){}})}}if(m==="img"&&c){Ne||(Ne=t.createElement("canvas"),ni=Ne.getContext("2d"));let y=s.cloneNode(!0);const C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",A=()=>{y=null},E=()=>{y.removeEventListener("load",E),y.removeEventListener("error",z);try{Ne.width=y.naturalWidth,Ne.height=y.naturalHeight,ni.drawImage(y,0,0),f.rr_dataURL=Ne.toDataURL(o.type,o.quality)}catch(P){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?E():(y.addEventListener("load",E),y.addEventListener("error",z));return}else console.warn(`Cannot inline img src=${C}! Error: ${P}`)}A()},z=()=>{y.removeEventListener("load",E),y.removeEventListener("error",z),A()};y.complete&&y.naturalWidth!==0?E():(y.addEventListener("load",E),y.addEventListener("error",z))}if(m==="audio"||m==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(m)&&(b=!0)}catch(y){}return{type:H.Element,tagName:m,attributes:f,childNodes:[],isSVG:ia(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function D(s){return s==null?"":s.toLowerCase()}function pa(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&an(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(D(s.attributes.name).match(/^msapplication-tile(image|color)$/)||D(s.attributes.name)==="application-name"||D(s.attributes.rel)==="icon"||D(s.attributes.rel)==="apple-touch-icon"||D(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&D(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(D(s.attributes.property).match(/^(og|twitter|fb):/)||D(s.attributes.name).match(/^(og|twitter):/)||D(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(D(s.attributes.name)==="robots"||D(s.attributes.name)==="googlebot"||D(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(D(s.attributes.name)==="author"||D(s.attributes.name)==="generator"||D(s.attributes.name)==="framework"||D(s.attributes.name)==="publisher"||D(s.attributes.name)==="progid"||D(s.attributes.property).match(/^article:/)||D(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(D(s.attributes.name)==="google-site-verification"||D(s.attributes.name)==="yandex-verification"||D(s.attributes.name)==="csrf-token"||D(s.attributes.name)==="p:domain_verify"||D(s.attributes.name)==="verify-v1"||D(s.attributes.name)==="verification"||D(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pe(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:a,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:z=!1,cssCaptured:P=!1}=e;let{needsMask:j}=e,{preserveWhiteSpace:Y=!0}=e;j||(j=pn(s,l,a,j===void 0));const q=aa(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:E,newlyAddedElement:z,cssCaptured:P});if(!q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):pa(q,d)||!Y&&q.type===H.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=it:oe=cn();const N=Object.assign(q,{id:oe});if(r.add(s,N),oe===it)return null;S&&S(s);let Ve=!o;if(N.type===H.Element){Ve=Ve&&!N.needBlock,delete N.needBlock;const V=Z.shadowRoot(s);V&&tt(V)&&(N.isShadowHost=!0)}if((N.type===H.Document||N.type===H.Element)&&Ve){d.headWhitespace&&N.type===H.Element&&N.tagName==="head"&&(Y=!1);const V={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:l,maskTextSelector:a,skipChild:o,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E,cssCaptured:!1};if(!(N.type===H.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===H.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(V.cssCaptured=!0);for(const ge of Array.from(Z.childNodes(s))){const le=Pe(ge,V);le&&N.childNodes.push(le)}}let Q=null;if(nn(s)&&(Q=Z.shadowRoot(s))){const ge=Z.childNodes(Q);for(let le=0;le<ge.length;le++){const St=ge[le],Ce=Pe(St,V);Ce&&(tt(Q)&&(Ce.isShadow=!0),N.childNodes.push(Ce))}}}const He=Z.parentNode(s);return He&&et(He)&&tt(He)&&(N.isShadow=!0),N.type===H.Element&&N.tagName==="iframe"&&oa(s,()=>{const V=s.contentDocument;if(V&&b){const Q=Pe(V,{doc:V,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E});Q&&b(s,Q)}},y),N.type===H.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&an(N.attributes.href)==="css")&&la(s,()=>{if(C){const V=Pe(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E});V&&C(s,V)}},A),N}function da(s,e){const{mirror:t=new ln,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:l=null,inlineStylesheet:a=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:A=()=>!1}=e||{};return Pe(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:o,recordCanvas:c,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:A,newlyAddedElement:!1})}function ma(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ga(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Rs={exports:{}},v=String,dn=function(){return{isColorSupported:!1,reset:v,bold:v,dim:v,italic:v,underline:v,inverse:v,hidden:v,strikethrough:v,black:v,red:v,green:v,yellow:v,blue:v,magenta:v,cyan:v,white:v,gray:v,bgBlack:v,bgRed:v,bgGreen:v,bgYellow:v,bgBlue:v,bgMagenta:v,bgCyan:v,bgWhite:v,blackBright:v,redBright:v,greenBright:v,yellowBright:v,blueBright:v,magentaBright:v,cyanBright:v,whiteBright:v,bgBlackBright:v,bgRedBright:v,bgGreenBright:v,bgYellowBright:v,bgBlueBright:v,bgMagentaBright:v,bgCyanBright:v,bgWhiteBright:v}};Rs.exports=dn();Rs.exports.createColors=dn;var ya=Rs.exports;const wa={},Sa=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),ie=ga(Sa);let li=ya,ai=ie,Gr=class mn extends Error{constructor(e,t,r,i,n,l){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),l&&(this.plugin=l),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,mn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=li.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=li.createColors(!0);i=d=>u(p(d)),r=d=>h(d),ai&&(n=d=>ai(d))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),c=String(o).length;return l.slice(a,o).map((u,h)=>{let p=a+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),S=Math.max(this.column+m,this.endColumn+m),b=u.slice(f,S),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(b)+`
|
|
2
|
+
"use strict";var tl=Object.defineProperty,rl=Object.defineProperties;var sl=Object.getOwnPropertyDescriptors;var xt=Object.getOwnPropertySymbols;var qs=Object.prototype.hasOwnProperty,Qs=Object.prototype.propertyIsEnumerable;var Ks=(s,e,t)=>e in s?tl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))qs.call(e,t)&&Ks(s,t,e[t]);if(xt)for(var t of xt(e))Qs.call(e,t)&&Ks(s,t,e[t]);return s},ee=(s,e)=>rl(s,sl(e));var $e=(s,e)=>{var t={};for(var r in s)qs.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&xt)for(var r of xt(s))e.indexOf(r)<0&&Qs.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var il=Object.defineProperty,nl=(s,e,t)=>e in s?il(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>nl(s,typeof e!="symbol"?e+"":e,t),ei,$=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))($||{}),R=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(R||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),Fe=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Fe||{}),ke=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(ke||{}),tn=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(tn||{});const ti={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ri={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},At={},ol=()=>!!globalThis.Zone;function xs(s){if(At[s])return At[s];const e=globalThis[s],t=e.prototype,r=s in ti?ti[s]:void 0,i=!!(r&&r.every(a=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,a))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in ri?ri[s]:void 0,l=!!(n&&n.every(a=>{var o;return typeof t[a]=="function"&&((o=t[a])==null?void 0:o.toString().includes("[native code]"))}));if(i&&l&&!ol())return At[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const o=a.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(a),c?At[s]=c:t}catch(a){return t}}const $r={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if($r[i])return $r[i].call(e);const n=xs(s),l=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return l?($r[i]=l,l.call(e)):e[t]}const Nr={};function rn(s,e,t){const r=`${s}.${String(t)}`;if(Nr[r])return Nr[r].bind(e);const n=xs(s)[t];return typeof n!="function"?e[t]:(Nr[r]=n,n.bind(e))}function ll(s){return we("Node",s,"childNodes")}function al(s){return we("Node",s,"parentNode")}function ul(s){return we("Node",s,"parentElement")}function cl(s){return we("Node",s,"textContent")}function hl(s,e){return rn("Node",s,"contains")(e)}function fl(s){return rn("Node",s,"getRootNode")()}function pl(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function dl(s){return s.styleSheets}function ml(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function gl(s,e){return we("Element",s,"querySelector")(e)}function yl(s,e){return we("Element",s,"querySelectorAll")(e)}function sn(){return xs("MutationObserver").constructor}function Me(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const x={childNodes:ll,parentNode:al,parentElement:ul,textContent:cl,contains:hl,getRootNode:fl,host:pl,styleSheets:dl,shadowRoot:ml,querySelector:gl,querySelectorAll:yl,mutationObserver:sn,patch:Me};var wl=Object.defineProperty,Sl=(s,e,t)=>e in s?wl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,_e=(s,e,t)=>Sl(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const si={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ii={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Rt={},bl=()=>!!globalThis.Zone;function As(s){if(Rt[s])return Rt[s];const e=globalThis[s],t=e.prototype,r=s in si?si[s]:void 0,i=!!(r&&r.every(a=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,a))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in ii?ii[s]:void 0,l=!!(n&&n.every(a=>{var o;return typeof t[a]=="function"&&((o=t[a])==null?void 0:o.toString().includes("[native code]"))}));if(i&&l&&!bl())return Rt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const o=a.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(a),c?Rt[s]=c:t}catch(a){return t}}const kr={};function Se(s,e,t){var r;const i=`${s}.${String(t)}`;if(kr[i])return kr[i].call(e);const n=As(s),l=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return l?(kr[i]=l,l.call(e)):e[t]}const Tr={};function nn(s,e,t){const r=`${s}.${String(t)}`;if(Tr[r])return Tr[r].bind(e);const n=As(s)[t];return typeof n!="function"?e[t]:(Tr[r]=n,n.bind(e))}function Cl(s){return Se("Node",s,"childNodes")}function vl(s){return Se("Node",s,"parentNode")}function Il(s){return Se("Node",s,"parentElement")}function xl(s){return Se("Node",s,"textContent")}function Al(s,e){return nn("Node",s,"contains")(e)}function Rl(s){return nn("Node",s,"getRootNode")()}function Ml(s){return!s||!("host"in s)?null:Se("ShadowRoot",s,"host")}function Ol(s){return s.styleSheets}function El(s){return!s||!("shadowRoot"in s)?null:Se("Element",s,"shadowRoot")}function $l(s,e){return Se("Element",s,"querySelector")(e)}function Nl(s,e){return Se("Element",s,"querySelectorAll")(e)}function kl(){return As("MutationObserver").constructor}function Tl(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const Z={childNodes:Cl,parentNode:vl,parentElement:Il,textContent:xl,contains:Al,getRootNode:Rl,host:Ml,styleSheets:Ol,shadowRoot:El,querySelector:$l,querySelectorAll:Nl,mutationObserver:kl,patch:Tl};function on(s){return s.nodeType===s.ELEMENT_NODE}function et(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function tt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ll(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Pl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function rr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>ln(i,t)).join("");return Ll(r)}catch(e){return console.log("stringifyStylesheet error:",e),null}}function ln(s,e){if(_l(s)){let t;try{t=rr(s.styleSheet)||Pl(s)}catch(r){t=s.cssText}return s.styleSheet.href?nr(t,s.styleSheet.href):t}else{let t=s.cssText;return Fl(s)&&s.selectorText.includes(":")&&(t=Dl(t)),e?nr(t,e):t}}function Dl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function _l(s){return"styleSheet"in s}function Fl(s){return"selectorText"in s}class an{constructor(){_e(this,"idNodeMap",new Map),_e(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Bl(){return new an}function sr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let l=i||"";const a=r&&Re(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?l=n(l,s):l="*".repeat(l.length)),l}function Re(s){return s.toLowerCase()}const ni="__rrweb_original__",Ul=25e4;function Wl(s,e){if(s.width*s.height<Ul)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function zl(s,e){if(s.width===0||s.height===0)return!0;const t=Wl(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=ni in i?i[ni]:i;for(let l=0;l<s.width;l+=r){const a=Math.min(r,s.width-l);for(let o=0;o<s.height;o+=r){const c=Math.min(r,s.height-o),u=new Uint32Array(n.call(t,l,o,a,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function ir(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function un(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(l){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function jl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Gl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Vl=/^(?:[a-z+]+:)?\/\//i,Hl=/^www\..*/i,Yl=/^(data:)([^,]*),(.*)/i;function nr(s,e){return(s||"").replace(Gl,(t,r,i,n,l,a)=>{const o=i||l||a,c=r||n||"";if(!o)return t;if(Vl.test(o)||Hl.test(o))return`url(${c}${o}${c})`;if(Yl.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${jl(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}function Mt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Zl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let l=Mt(s,t);const a=l.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const c=Mt(r[o].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let p=c.substring(0,h),d=l.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[o-1].textContent!=="")g=l.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=l.split(p),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=l.indexOf(p));if(d.length>=2&&h>u){const m=r[o-1].textContent;if(m&&typeof m=="string"){const f=Mt(m).length;g=l.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/a);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Mt(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),l=l.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/a)):m-=Math.max(1,Math.floor((f.length-g)*a))}break}}}}return i.push(s),i}function Jl(s,e){return Zl(s,e).join("/* rr_split */")}const Xl=1e3*30,Kl=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],cn=class Yt{constructor(){if(_e(this,"currentHref",null),_e(this,"clones",{}),_e(this,"cleanTimeout",null),Yt.instance)return Yt.instance;Yt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[data-rrweb-link-cloned="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;console.log("AsyncStylesheetManager, onLoad: href:",e);const t=Array.from(document.styleSheets);let r=null;for(let l=t.length-1;l>=0;l--)if(t[l].href===e){r=t[l];break}if(!r)return console.log("AsyncStylesheetManager, onLoad: couldn't find stylesheet for href:",e),this.removeCloneNode(e);const i=rr(r);if(this.removeCloneNode(e),!i){console.log("AsyncStylesheetManager, onLoad: couldn't stringify stylesheet for href:",e);return}console.log("AsyncStylesheetManager, onLoad: success! did get new css text! forcing mutation... for href:",e),this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[data-rrweb-link-cloned="source-${this.clones[e].cloneNodeAttrId}"]`);n?n.setAttribute("data-rrweb-mutation",Date.now().toString()):this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString())}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){console.log("AsyncStylesheetManager, onCleanTimeout: cleaning up"),rt.cleanTimeout=null,rt.removeAllCloneElements()}blowCache(){console.log("AsyncStylesheetManager, blowCache: blowing cache"),this.removeAllCloneElements(),this.clones={}}registerClone({forElement:e}){this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const t=e.href;if(!t||t in this.clones&&this.clones[t]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const n=t.split("/").pop();if(n&&n.includes(".")){const[l]=n.split("?"),a=l.split(".").pop();if(a&&Kl.includes(a.trim().toLowerCase()))return}}console.log("AsyncStylesheetManager, registerClone: registering clone for href:",t);const r=e.cloneNode(),i=Math.random().toString(36).slice(2);r.setAttribute("crossorigin","anonymous"),r.setAttribute("data-rrweb-link-cloned",i),e.setAttribute("data-rrweb-link-cloned",`source-${i}`),document.head.appendChild(r),this.clones[t]={original:e,clone:r,loaded:!1,cssText:null,cloneNodeAttrId:i},r.onload=()=>{this.onLoad(t)},r.onerror=()=>{this.onLoadError(t)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(rt.onCleanTimeout,Xl)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?(console.log("AsyncStylesheetManager, getClonedCssTextIfAvailable: returning cloned cssText, for href:",e),this.clones[e].cssText):null}};_e(cn,"instance");let ql=cn;const rt=new ql;let Ql=1;const ea=new RegExp("[^a-z0-9-_:]"),nt=-2;function hn(){return Ql++}function ta(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return ea.test(e)?"div":e}let Ne,oi;const ra=/^[^ \t\n\r\u000c]+/,sa=/^[, \t\n\r\u000c]+/;function ia(s,e){if(e.trim()==="")return e;let t=0;function r(n){let l;const a=n.exec(e.substring(t));return a?(l=a[0],t+=l.length,l):""}const i=[];for(;r(sa),!(t>=e.length);){let n=r(ra);if(n.slice(-1)===",")n=Le(s,n.substring(0,n.length-1)),i.push(n);else{let l="";n=Le(s,n);let a=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+l).trim());break}else if(a)o===")"&&(a=!1);else if(o===","){t+=1,i.push((n+l).trim());break}else o==="("&&(a=!0);l+=o,t+=1}}}return i.join(", ")}const li=new WeakMap;function Le(s,e){return!e||e.trim()===""?e:Rs(s,e)}function na(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Rs(s,e){let t=li.get(s);if(t||(t=s.createElement("a"),li.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function fn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Le(s,r):t==="srcset"?ia(s,r):t==="style"?nr(r,Rs(s)):e==="object"&&t==="data"?Le(s,r):r)}function pn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function oa(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function or(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?or(Z.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?or(Z.parentNode(s),e,t):!1}function dn(s,e,t,r){let i;if(on(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(or(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function la(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(a){return}if(n!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const l="about:blank";if(r.location.href!==l||s.src===l||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function aa(s,e,t){let r=!1,i;try{i=s.sheet}catch(l){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function ua(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:l,inlineStylesheet:a,maskInputOptions:o={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,S=ca(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:S};case s.ELEMENT_NODE:return pa(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:o,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:S});case s.TEXT_NODE:return fa(s,{doc:t,needsMask:l,maskTextFn:c,rootId:S,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:S};case s.COMMENT_NODE:return{type:H.Comment,textContent:Z.textContent(s)||"",rootId:S};default:return!1}}function ca(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}const ha=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)};function fa(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,l=Z.parentNode(s),a=l&&l.tagName;let o="";const c=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?o="SCRIPT_PLACEHOLDER":n||(o=Z.textContent(s),c&&o&&(o=nr(o,Rs(e.doc)))),!c&&!u&&o&&t&&(o=r?r(o,Z.parentElement(s)):o.replace(/[\S]/g,"*")),{type:H.Text,textContent:o||"",rootId:i}}function pa(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:l={},maskInputFn:a,dataURLOptions:o={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=e,g=oa(s,r,i),m=ta(s);let f={};const S=s.attributes.length;for(let y=0;y<S;y++){const C=s.attributes[y];pn(m,C.name,C.value)||(f[C.name]=fn(t,m,Re(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets);let C=null;for(let E=0;E<y.length;E++)if(y[E].href===s.href){C=y[E];break}let A=null;C&&(A=rr(C)),A||(A=rt.getClonedCssTextIfAvailable(s.href)),A?(delete f.rel,delete f.href,f._cssText=A):rt.registerClone({forElement:s})}if(m==="style"&&s.sheet){let y=rr(s.sheet);y&&(s.childNodes.length>1&&(y=Jl(y,s)),f._cssText=y)}if(m==="input"||m==="textarea"||m==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=sr({element:s,type:ir(s),tagName:m,value:y,maskInputOptions:l,maskInputFn:a}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!l.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&u){let y="getContext"in s?s.getContext("2d"):null;if(y!=null)zl(s,y)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(s.width!==0&&s.height!==0){const C=s.toDataURL(o.type,o.quality);f.rr_dataURL=C,ha(()=>{try{const A=t.createElement("canvas");A.width=s.width,A.height=s.height;const E=A.toDataURL(o.type,o.quality);C===E&&delete f.rr_dataURL}catch(A){}})}}if(m==="img"&&c){Ne||(Ne=t.createElement("canvas"),oi=Ne.getContext("2d"));let y=s.cloneNode(!0);const C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",A=()=>{y=null},E=()=>{y.removeEventListener("load",E),y.removeEventListener("error",z);try{Ne.width=y.naturalWidth,Ne.height=y.naturalHeight,oi.drawImage(y,0,0),f.rr_dataURL=Ne.toDataURL(o.type,o.quality)}catch(P){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?E():(y.addEventListener("load",E),y.addEventListener("error",z));return}else console.warn(`Cannot inline img src=${C}! Error: ${P}`)}A()},z=()=>{y.removeEventListener("load",E),y.removeEventListener("error",z),A()};y.complete&&y.naturalWidth!==0?E():(y.addEventListener("load",E),y.addEventListener("error",z))}if(m==="audio"||m==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(m)&&(b=!0)}catch(y){}return{type:H.Element,tagName:m,attributes:f,childNodes:[],isSVG:na(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function D(s){return s==null?"":s.toLowerCase()}function da(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&un(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(D(s.attributes.name).match(/^msapplication-tile(image|color)$/)||D(s.attributes.name)==="application-name"||D(s.attributes.rel)==="icon"||D(s.attributes.rel)==="apple-touch-icon"||D(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&D(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(D(s.attributes.property).match(/^(og|twitter|fb):/)||D(s.attributes.name).match(/^(og|twitter):/)||D(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(D(s.attributes.name)==="robots"||D(s.attributes.name)==="googlebot"||D(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(D(s.attributes.name)==="author"||D(s.attributes.name)==="generator"||D(s.attributes.name)==="framework"||D(s.attributes.name)==="publisher"||D(s.attributes.name)==="progid"||D(s.attributes.property).match(/^article:/)||D(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(D(s.attributes.name)==="google-site-verification"||D(s.attributes.name)==="yandex-verification"||D(s.attributes.name)==="csrf-token"||D(s.attributes.name)==="p:domain_verify"||D(s.attributes.name)==="verify-v1"||D(s.attributes.name)==="verification"||D(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pe(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:a,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:z=!1,cssCaptured:P=!1}=e;let{needsMask:j}=e,{preserveWhiteSpace:Y=!0}=e;j||(j=dn(s,l,a,j===void 0));const q=ua(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:E,newlyAddedElement:z,cssCaptured:P});if(!q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):da(q,d)||!Y&&q.type===H.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=nt:oe=hn();const N=Object.assign(q,{id:oe});if(r.add(s,N),oe===nt)return null;S&&S(s);let Ve=!o;if(N.type===H.Element){Ve=Ve&&!N.needBlock,delete N.needBlock;const V=Z.shadowRoot(s);V&&tt(V)&&(N.isShadowHost=!0)}if((N.type===H.Document||N.type===H.Element)&&Ve){d.headWhitespace&&N.type===H.Element&&N.tagName==="head"&&(Y=!1);const V={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:l,maskTextSelector:a,skipChild:o,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E,cssCaptured:!1};if(!(N.type===H.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===H.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(V.cssCaptured=!0);for(const ge of Array.from(Z.childNodes(s))){const le=Pe(ge,V);le&&N.childNodes.push(le)}}let Q=null;if(on(s)&&(Q=Z.shadowRoot(s))){const ge=Z.childNodes(Q);for(let le=0;le<ge.length;le++){const bt=ge[le],Ce=Pe(bt,V);Ce&&(tt(Q)&&(Ce.isShadow=!0),N.childNodes.push(Ce))}}}const He=Z.parentNode(s);return He&&et(He)&&tt(He)&&(N.isShadow=!0),N.type===H.Element&&N.tagName==="iframe"&&la(s,()=>{const V=s.contentDocument;if(V&&b){const Q=Pe(V,{doc:V,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E});Q&&b(s,Q)}},y),N.type===H.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&un(N.attributes.href)==="css")&&aa(s,()=>{if(C){const V=Pe(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:j,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:E});V&&C(s,V)}},A),N}function ma(s,e){const{mirror:t=new an,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:l=null,inlineStylesheet:a=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:A=()=>!1}=e||{};return Pe(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:o,recordCanvas:c,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:A,newlyAddedElement:!1})}function ga(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ya(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Ms={exports:{}},v=String,mn=function(){return{isColorSupported:!1,reset:v,bold:v,dim:v,italic:v,underline:v,inverse:v,hidden:v,strikethrough:v,black:v,red:v,green:v,yellow:v,blue:v,magenta:v,cyan:v,white:v,gray:v,bgBlack:v,bgRed:v,bgGreen:v,bgYellow:v,bgBlue:v,bgMagenta:v,bgCyan:v,bgWhite:v,blackBright:v,redBright:v,greenBright:v,yellowBright:v,blueBright:v,magentaBright:v,cyanBright:v,whiteBright:v,bgBlackBright:v,bgRedBright:v,bgGreenBright:v,bgYellowBright:v,bgBlueBright:v,bgMagentaBright:v,bgCyanBright:v,bgWhiteBright:v}};Ms.exports=mn();Ms.exports.createColors=mn;var wa=Ms.exports;const Sa={},ba=Object.freeze(Object.defineProperty({__proto__:null,default:Sa},Symbol.toStringTag,{value:"Module"})),ie=ya(ba);let ai=wa,ui=ie,Vr=class gn extends Error{constructor(e,t,r,i,n,l){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),l&&(this.plugin=l),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,gn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=ai.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=ai.createColors(!0);i=d=>u(p(d)),r=d=>h(d),ui&&(n=d=>ui(d))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),c=String(o).length;return l.slice(a,o).map((u,h)=>{let p=a+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),S=Math.max(this.column+m,this.endColumn+m),b=u.slice(f,S),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(b)+`
|
|
3
3
|
`+y+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
|
|
4
4
|
`+g+i("^")}return" "+r(d)+n(u)}).join(`
|
|
5
5
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
6
6
|
|
|
7
7
|
`+e+`
|
|
8
|
-
`),this.name+": "+this.message+e}};var
|
|
8
|
+
`),this.name+": "+this.message+e}};var Os=Vr;Vr.default=Vr;const ci={after:`
|
|
9
9
|
`,beforeClose:`
|
|
10
10
|
`,beforeComment:`
|
|
11
11
|
`,beforeDecl:`
|
|
12
12
|
`,beforeOpen:" ",beforeRule:`
|
|
13
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
14
|
-
`)){let l=this.raw(e,null,"indent");if(l.length)for(let a=0;a<n;a++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],l=this.raw(n,"before");l&&this.builder(l),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
13
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ca(s){return s[0].toUpperCase()+s.slice(1)}let Hr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
14
|
+
`)){let l=this.raw(e,null,"indent");if(l.length)for(let a=0;a<n;a++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],l=this.raw(n,"before");l&&this.builder(l),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return ci[r];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[r]!="undefined")return l.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Ca(r);this[a]?i=this[a](l,e):l.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=ci[r]),l.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
15
15
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
16
16
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
17
17
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
18
18
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
|
|
19
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var
|
|
20
|
-
`?(t=1,r+=1):t+=1}return i}let
|
|
21
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:l}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:he(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let l=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);l!==-1&&(r=this.positionInside(l),i=this.positionInside(l+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:he(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:he(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new Ia().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let a=this[l];if(Array.isArray(a))r[l]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)r[l]=a.toJSON(null,t);else if(l==="source"){if(a==null)continue;let o=t.get(a.input);o==null&&(o=n,t.set(a.input,n),n++),r[l]={end:a.end,inputId:o,start:a.start}}else r[l]=a}return i&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=xa){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var yr=Zr;Zr.default=Zr;let Ra=yr,Jr=class extends Ra{constructor(e){super(e),this.type="comment"}};var wr=Jr;Jr.default=Jr;let Ma=yr,Xr=class extends Ma{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Sr=Xr;Xr.default=Xr;let yn=wr,wn=Sr,Oa=yr,{isClean:Sn,my:bn}=dt,Os,Cn,vn,Es;function In(s){return s.map(e=>(e.nodes&&(e.nodes=In(e.nodes)),delete e.source,e))}function xn(s){if(s[Sn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)xn(e)}let de=class An extends Oa{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,l)=>i(n.toProxy(),l):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r+1,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<n&&(this.indexes[l]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let l;for(let a in this.indexes)l=this.indexes[a],r<=l&&(this.indexes[a]=l+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=In(Cn(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new wn(e)]}else if(e.selector||e.selectors)e=[new Es(e)];else if(e.name)e=[new Os(e)];else if(e.text)e=[new yn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[bn]||An.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Sn]&&xn(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};de.registerParse=s=>{Cn=s};de.registerRule=s=>{Es=s};de.registerAtRule=s=>{Os=s};de.registerRoot=s=>{vn=s};var Oe=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Os.prototype):s.type==="rule"?Object.setPrototypeOf(s,Es.prototype):s.type==="decl"?Object.setPrototypeOf(s,wn.prototype):s.type==="comment"?Object.setPrototypeOf(s,yn.prototype):s.type==="root"&&Object.setPrototypeOf(s,vn.prototype),s[bn]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};let Rn=Oe,or=class extends Rn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var $s=or;or.default=or;Rn.registerAtRule(or);let Ea=Oe,Mn,On,nt=class extends Ea{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Mn(new On,this,e).stringify()}};nt.registerLazyResult=s=>{Mn=s};nt.registerProcessor=s=>{On=s};var Ns=nt;nt.default=nt;let $a="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Na=(s=21)=>{let e="",t=s|0;for(;t--;)e+=$a[Math.random()*64|0];return e};var ka={nanoid:Na};let{existsSync:Ta,readFileSync:La}=ie,{dirname:Tr,join:Pa}=ie,{SourceMapConsumer:ci,SourceMapGenerator:hi}=ie;function Da(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Kr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Tr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ci(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,l=e.match(i)||e.match(n);if(l)return decodeURIComponent(e.substr(l[0].length));let a=e.match(t)||e.match(r);if(a)return Da(e.substr(a[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Tr(e),Ta(e))return this.mapFile=e,La(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof ci)return hi.fromSourceMap(t).toString();if(t instanceof hi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Pa(Tr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var En=Kr;Kr.default=Kr;let{nanoid:_a}=ka,{isAbsolute:qr,resolve:Qr}=ie,{SourceMapConsumer:Fa,SourceMapGenerator:Ba}=ie,{fileURLToPath:fi,pathToFileURL:Mt}=ie,pi=Ms,Ua=En,Lr=ie,Pr=Symbol("lineToIndexCache"),Wa=!!(Fa&&Ba),di=!!(Qr&&qr);function mi(s){if(s[Pr])return s[Pr];let e=s.css.split(`
|
|
22
|
-
`),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[
|
|
23
|
-
`," "];return
|
|
19
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var yn=Hr;Hr.default=Hr;let va=yn;function Yr(s,e){new va(e).stringify(s)}var yr=Yr;Yr.default=Yr;var mt={};mt.isClean=Symbol("isClean");mt.my=Symbol("my");let Ia=Os,xa=yn,Aa=yr,{isClean:Ye,my:Ra}=mt;function Zr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(l=>Zr(l,t)):(n==="object"&&i!==null&&(i=Zr(i)),t[r]=i)}return t}function he(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
|
|
20
|
+
`?(t=1,r+=1):t+=1}return i}let Jr=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ye]=!1,this[Ra]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Zr(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Ia(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Ye]=!0}markDirty(){if(this[Ye]){this[Ye]=!1;let e=this;for(;e=e.parent;)e[Ye]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(he(r,this.source.start),he(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=he(i,this.source.start),l=n+e;for(let a=n;a<l;a++)i[a]===`
|
|
21
|
+
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:l}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:he(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let l=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);l!==-1&&(r=this.positionInside(l),i=this.positionInside(l+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:he(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:he(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new xa().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let a=this[l];if(Array.isArray(a))r[l]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)r[l]=a.toJSON(null,t);else if(l==="source"){if(a==null)continue;let o=t.get(a.input);o==null&&(o=n,t.set(a.input,n),n++),r[l]={end:a.end,inputId:o,start:a.start}}else r[l]=a}return i&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Aa){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var wr=Jr;Jr.default=Jr;let Ma=wr,Xr=class extends Ma{constructor(e){super(e),this.type="comment"}};var Sr=Xr;Xr.default=Xr;let Oa=wr,Kr=class extends Oa{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var br=Kr;Kr.default=Kr;let wn=Sr,Sn=br,Ea=wr,{isClean:bn,my:Cn}=mt,Es,vn,In,$s;function xn(s){return s.map(e=>(e.nodes&&(e.nodes=xn(e.nodes)),delete e.source,e))}function An(s){if(s[bn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)An(e)}let de=class Rn extends Ea{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,l)=>i(n.toProxy(),l):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r+1,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<n&&(this.indexes[l]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let l;for(let a in this.indexes)l=this.indexes[a],r<=l&&(this.indexes[a]=l+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=xn(vn(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Sn(e)]}else if(e.selector||e.selectors)e=[new $s(e)];else if(e.name)e=[new Es(e)];else if(e.text)e=[new wn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Cn]||Rn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[bn]&&An(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};de.registerParse=s=>{vn=s};de.registerRule=s=>{$s=s};de.registerAtRule=s=>{Es=s};de.registerRoot=s=>{In=s};var Oe=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Es.prototype):s.type==="rule"?Object.setPrototypeOf(s,$s.prototype):s.type==="decl"?Object.setPrototypeOf(s,Sn.prototype):s.type==="comment"?Object.setPrototypeOf(s,wn.prototype):s.type==="root"&&Object.setPrototypeOf(s,In.prototype),s[Cn]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};let Mn=Oe,lr=class extends Mn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ns=lr;lr.default=lr;Mn.registerAtRule(lr);let $a=Oe,On,En,ot=class extends $a{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new On(new En,this,e).stringify()}};ot.registerLazyResult=s=>{On=s};ot.registerProcessor=s=>{En=s};var ks=ot;ot.default=ot;let Na="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ka=(s=21)=>{let e="",t=s|0;for(;t--;)e+=Na[Math.random()*64|0];return e};var Ta={nanoid:ka};let{existsSync:La,readFileSync:Pa}=ie,{dirname:Lr,join:Da}=ie,{SourceMapConsumer:hi,SourceMapGenerator:fi}=ie;function _a(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let qr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Lr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new hi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,l=e.match(i)||e.match(n);if(l)return decodeURIComponent(e.substr(l[0].length));let a=e.match(t)||e.match(r);if(a)return _a(e.substr(a[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Lr(e),La(e))return this.mapFile=e,Pa(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof hi)return fi.fromSourceMap(t).toString();if(t instanceof fi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Da(Lr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var $n=qr;qr.default=qr;let{nanoid:Fa}=Ta,{isAbsolute:Qr,resolve:es}=ie,{SourceMapConsumer:Ba,SourceMapGenerator:Ua}=ie,{fileURLToPath:pi,pathToFileURL:Ot}=ie,di=Os,Wa=$n,Pr=ie,Dr=Symbol("lineToIndexCache"),za=!!(Ba&&Ua),mi=!!(es&&Qr);function gi(s){if(s[Dr])return s[Dr];let e=s.css.split(`
|
|
22
|
+
`),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[Dr]=t,t}let ar=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!mi||/^\w+:\/\//.test(t.from)||Qr(t.from)?this.file=t.from:this.file=es(t.from)),mi&&za){let r=new Wa(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Fa(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,l,a,o,c;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){o=h.offset;let d=this.fromOffset(o);t=d.line,r=d.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){a=p.offset;let d=this.fromOffset(a);l=d.line,n=d.col}else l=p.line,n=p.column,a=this.fromLineAndColumn(p.line,p.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let u=this.origin(t,r,l,n);return u?c=new di(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new di(e,l===void 0?t:{column:r,line:t},l===void 0?r:{column:n,line:l},this.css,this.file,i.plugin),c.input={column:r,endColumn:n,endLine:l,endOffset:a,line:t,offset:o,source:this.css},this.file&&(Ot&&(c.input.url=Ot(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return gi(this)[e-1]+t-1}fromOffset(e){let t=gi(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,l;for(;i<n;)if(l=i+(n-i>>1),e<t[l])n=l-1;else if(e>=t[l+1])i=l+1;else{i=l;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:es(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),l=n.originalPositionFor({column:t,line:e});if(!l.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let o;Qr(l.source)?o=Ot(l.source):o=new URL(l.source,this.map.consumer().sourceRoot||Ot(this.map.mapFile));let c={column:l.column,endColumn:a&&a.column,endLine:a&&a.line,line:l.line,url:o.toString()};if(o.protocol==="file:")if(pi)c.file=pi(o);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(l.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Cr=ar;ar.default=ar;Pr&&Pr.registerInput&&Pr.registerInput(ar);let Nn=Oe,kn,Tn,Be=class extends Nn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new kn(new Tn,this,e).stringify()}};Be.registerLazyResult=s=>{kn=s};Be.registerProcessor=s=>{Tn=s};var gt=Be;Be.default=Be;Nn.registerRoot(Be);let lt={comma(s){return lt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
23
|
+
`," "];return lt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,l=0,a=!1,o="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:a?u===o&&(a=!1):u==='"'||u==="'"?(a=!0,o=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var Ln=lt;lt.default=lt;let Pn=Oe,ja=Ln,ur=class extends Pn{get selectors(){return ja.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Ts=ur;ur.default=ur;Pn.registerRule(ur);let Ga=Ns,Va=Sr,Ha=br,Ya=Cr,Za=$n,Ja=gt,Xa=Ts;function at(s,e){if(Array.isArray(s))return s.map(l=>at(l));let i=s,{inputs:t}=i,r=$e(i,["inputs"]);if(t){e=[];for(let l of t){let a=ee(M({},l),{__proto__:Ya.prototype});a.map&&(a.map=ee(M({},a.map),{__proto__:Za.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(l=>at(l,e))),r.source){let n=r.source,{inputId:l}=n,a=$e(n,["inputId"]);r.source=a,l!=null&&(r.source.input=e[l])}if(r.type==="root")return new Ja(r);if(r.type==="decl")return new Ha(r);if(r.type==="rule")return new Xa(r);if(r.type==="comment")return new Va(r);if(r.type==="atrule")return new Ga(r);throw new Error("Unknown node type: "+s.type)}var Ka=at;at.default=at;let{dirname:Zt,relative:Dn,resolve:_n,sep:Fn}=ie,{SourceMapConsumer:Bn,SourceMapGenerator:Jt}=ie,{pathToFileURL:yi}=ie,qa=Cr,Qa=!!(Bn&&Jt),eu=!!(Zt&&_n&&Dn&&Fn),tu=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
24
24
|
`;this.css.includes(`\r
|
|
25
25
|
`)&&(t=`\r
|
|
26
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
27
|
-
`),t=a.length-n):t+=a.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Yt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Yt(Dn(r,this.mapOpts.annotation)));let i=Pn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Ka(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(gi){let r=gi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;_n==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Bn=eu;const Dr=39,yi=34,Ot=92,wi=47,Et=10,Ze=32,$t=12,Nt=9,kt=13,tu=91,ru=93,su=40,iu=41,nu=123,ou=125,lu=59,au=42,uu=58,cu=64,Tt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Lt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,hu=/.[\r\n"'(/\\]/,Si=/[\da-f]/i;var fu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,l,a,o,c,u,h,p,d,g,m=r.length,f=0,S=[],b=[];function y(){return f}function C(P){throw e.error("Unclosed "+P,f)}function A(){return b.length===0&&f>=m}function E(P){if(b.length)return b.pop();if(f>=m)return;let j=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Et:case Ze:case Nt:case kt:case $t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===Et||n===Nt||n===kt||n===$t);u=["space",r.slice(f,o)],f=o-1;break}case tu:case ru:case nu:case ou:case uu:case lu:case iu:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case su:{if(g=S.length?S.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Dr&&d!==yi&&d!==Ze&&d!==Et&&d!==Nt&&d!==$t&&d!==kt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||j){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Ot;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),l=r.slice(f,o+1),o===-1||hu.test(l)?u=["(","(",f]:(u=["brackets",l,f,o],f=o);break}case Dr:case yi:{c=n===Dr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||j){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Ot;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case cu:{Tt.lastIndex=f+1,Tt.test(r),Tt.lastIndex===0?o=r.length-1:o=Tt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ot:{for(o=f,a=!0;r.charCodeAt(o+1)===Ot;)o+=1,a=!a;if(n=r.charCodeAt(o+1),a&&n!==wi&&n!==Ze&&n!==Et&&n!==Nt&&n!==kt&&n!==$t&&(o+=1,Si.test(r.charAt(o)))){for(;Si.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===wi&&r.charCodeAt(f+1)===au?(o=r.indexOf("*/",f+2)+1,o===0&&(i||j?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Lt.lastIndex=f+1,Lt.test(r),Lt.lastIndex===0?o=r.length-1:o=Lt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],S.push(u),f=o);break}}return f++,u}function z(P){b.push(P)}return{back:z,endOfFile:A,nextToken:E,position:y}};let pu=$s,du=wr,mu=Sr,gu=mt,bi=ks,yu=fu;const Ci={empty:!0,space:!0};function wu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Su=class{constructor(e){this.input=e,this.root=new gu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new pu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,l=!1,a=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),l&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[l,a]of e.entries()){if(i=a,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return l}r=i}return!1}comment(e){let t=new du;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=yu(this.input)}decl(e,t){let r=new mu;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||wu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=l.map(c=>c[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new bi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,l=[],a=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),l.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=c),l.push("}");else if(l.length===0)if(r===";")if(i){this.decl(o,a);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,l,a=r.length,o="",c=!0,u,h;for(let p=0;p<a;p+=1)n=r[p],l=n[0],l==="space"&&p===a-1&&!i?c=!1:l==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!Ci[h]&&!Ci[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new bi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var bu=Su;let Cu=Oe,vu=br,Iu=bu;function ur(s,e){let t=new vu(s,e),r=new Iu(t);try{r.parse()}catch(i){throw i}return r.root}var Ts=ur;ur.default=ur;Cu.registerParse(ur);let es=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Un=es;es.default=es;let xu=Un,ts=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new xu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ls=ts;ts.default=ts;let Au=Oe,Ru=Ns,Mu=Bn,Ou=Ts,vi=Ls,Eu=mt,$u=gr,{isClean:ae,my:Nu}=dt;const ku={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Tu={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},Lu={Once:!0,postcssPlugin:!0,prepare:!0},Ue=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function Wn(s){let e=!1,t=ku[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function Ii(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=Wn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function rs(s){return s[ae]=!1,s.nodes&&s.nodes.forEach(e=>rs(e)),s}let ss={},We=class zn{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=rs(t);else if(t instanceof zn||t instanceof vi)i=rs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ou;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(l){this.processed=!0,this.error=l}i&&!i[Nu]&&Au.rebuild(i)}this.result=new vi(e,i,r),this.helpers=ee(M({},ss),{postcss:ss,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Tu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Lu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ae];){e[ae]=!0;let t=[Ii(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=$u;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Mu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ae];)e[ae]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return a(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let l=t.iterator,a;for(;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[ae]){a[ae]=!0,e.push(Ii(a));return}t.iterator=0,delete r.indexes[l]}let n=t.events;for(;t.eventIndex<n.length;){let l=n[t.eventIndex];if(t.eventIndex+=1,l===Ue){r.nodes&&r.nodes.length&&(r[ae]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[ae]=!0;let t=Wn(e);for(let r of t)if(r===Ue)e.nodes&&e.each(i=>{i[ae]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};We.registerPostcss=s=>{ss=s};var jn=We;We.default=We;Eu.registerLazyResult(We);Ru.registerLazyResult(We);let Pu=Bn,Du=Ts;const _u=Ls;let Fu=gr;let is=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Du;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Fu;this.result=new _u(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new Pu(n,i,this._opts,t);if(a.isMap()){let[o,c]=a.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Bu=is;is.default=is;let Uu=Ns,Wu=jn,zu=Bu,ju=mt,at=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new zu(this,e,t):new Wu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Gu=at;at.default=at;ju.registerProcessor(at);Uu.registerProcessor(at);let Gn=$s,Vn=wr,Vu=Oe,Hu=Ms,Hn=Sr,Yn=Ns,Yu=Xa,Zu=br,Ju=jn,Xu=Tn,Ku=yr,qu=Ts,Ps=Gu,Qu=Ls,Zn=mt,Jn=ks,ec=gr,tc=Un;function T(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ps(s)}T.plugin=function(e,t){let r=!1;function i(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
26
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Zt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Bn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),eu&&Qa&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Jt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Jt({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 Jt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,l;this.stringify(this.root,(a,o,c)=>{if(this.css+=a,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),l=a.match(/\n/g),l?(e+=l.length,n=a.lastIndexOf(`
|
|
27
|
+
`),t=a.length-n):t+=a.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Zt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Zt(_n(r,this.mapOpts.annotation)));let i=Dn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new qa(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(yi){let r=yi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Fn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Un=tu;const _r=39,wi=34,Et=92,Si=47,$t=10,Ze=32,Nt=12,kt=9,Tt=13,ru=91,su=93,iu=40,nu=41,ou=123,lu=125,au=59,uu=42,cu=58,hu=64,Lt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,fu=/.[\r\n"'(/\\]/,bi=/[\da-f]/i;var pu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,l,a,o,c,u,h,p,d,g,m=r.length,f=0,S=[],b=[];function y(){return f}function C(P){throw e.error("Unclosed "+P,f)}function A(){return b.length===0&&f>=m}function E(P){if(b.length)return b.pop();if(f>=m)return;let j=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case $t:case Ze:case kt:case Tt:case Nt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===$t||n===kt||n===Tt||n===Nt);u=["space",r.slice(f,o)],f=o-1;break}case ru:case su:case ou:case lu:case cu:case au:case nu:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case iu:{if(g=S.length?S.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==_r&&d!==wi&&d!==Ze&&d!==$t&&d!==kt&&d!==Nt&&d!==Tt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||j){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Et;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),l=r.slice(f,o+1),o===-1||fu.test(l)?u=["(","(",f]:(u=["brackets",l,f,o],f=o);break}case _r:case wi:{c=n===_r?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||j){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Et;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case hu:{Lt.lastIndex=f+1,Lt.test(r),Lt.lastIndex===0?o=r.length-1:o=Lt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Et:{for(o=f,a=!0;r.charCodeAt(o+1)===Et;)o+=1,a=!a;if(n=r.charCodeAt(o+1),a&&n!==Si&&n!==Ze&&n!==$t&&n!==kt&&n!==Tt&&n!==Nt&&(o+=1,bi.test(r.charAt(o)))){for(;bi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Si&&r.charCodeAt(f+1)===uu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||j?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],S.push(u),f=o);break}}return f++,u}function z(P){b.push(P)}return{back:z,endOfFile:A,nextToken:E,position:y}};let du=Ns,mu=Sr,gu=br,yu=gt,Ci=Ts,wu=pu;const vi={empty:!0,space:!0};function Su(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let bu=class{constructor(e){this.input=e,this.root=new yu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new du;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,l=!1,a=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),l&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[l,a]of e.entries()){if(i=a,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return l}r=i}return!1}comment(e){let t=new mu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=wu(this.input)}decl(e,t){let r=new gu;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Su(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=l.map(c=>c[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Ci;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,l=[],a=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),l.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=c),l.push("}");else if(l.length===0)if(r===";")if(i){this.decl(o,a);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,l,a=r.length,o="",c=!0,u,h;for(let p=0;p<a;p+=1)n=r[p],l=n[0],l==="space"&&p===a-1&&!i?c=!1:l==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!vi[h]&&!vi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Ci;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Cu=bu;let vu=Oe,Iu=Cr,xu=Cu;function cr(s,e){let t=new Iu(s,e),r=new xu(t);try{r.parse()}catch(i){throw i}return r.root}var Ls=cr;cr.default=cr;vu.registerParse(cr);let ts=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Wn=ts;ts.default=ts;let Au=Wn,rs=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Au(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ps=rs;rs.default=rs;let Ru=Oe,Mu=ks,Ou=Un,Eu=Ls,Ii=Ps,$u=gt,Nu=yr,{isClean:ae,my:ku}=mt;const Tu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Lu={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Pu={Once:!0,postcssPlugin:!0,prepare:!0},Ue=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function zn(s){let e=!1,t=Tu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function xi(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=zn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ss(s){return s[ae]=!1,s.nodes&&s.nodes.forEach(e=>ss(e)),s}let is={},We=class jn{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ss(t);else if(t instanceof jn||t instanceof Ii)i=ss(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Eu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(l){this.processed=!0,this.error=l}i&&!i[ku]&&Ru.rebuild(i)}this.result=new Ii(e,i,r),this.helpers=ee(M({},is),{postcss:is,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Lu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Pu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ae];){e[ae]=!0;let t=[xi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Nu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Ou(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ae];)e[ae]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return a(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let l=t.iterator,a;for(;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[ae]){a[ae]=!0,e.push(xi(a));return}t.iterator=0,delete r.indexes[l]}let n=t.events;for(;t.eventIndex<n.length;){let l=n[t.eventIndex];if(t.eventIndex+=1,l===Ue){r.nodes&&r.nodes.length&&(r[ae]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[ae]=!0;let t=zn(e);for(let r of t)if(r===Ue)e.nodes&&e.each(i=>{i[ae]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};We.registerPostcss=s=>{is=s};var Gn=We;We.default=We;$u.registerLazyResult(We);Mu.registerLazyResult(We);let Du=Un,_u=Ls;const Fu=Ps;let Bu=yr;let ns=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=_u;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Bu;this.result=new Fu(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new Du(n,i,this._opts,t);if(a.isMap()){let[o,c]=a.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Uu=ns;ns.default=ns;let Wu=ks,zu=Gn,ju=Uu,Gu=gt,ut=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ju(this,e,t):new zu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vu=ut;ut.default=ut;Gu.registerProcessor(ut);Wu.registerProcessor(ut);let Vn=Ns,Hn=Sr,Hu=Oe,Yu=Os,Yn=br,Zn=ks,Zu=Ka,Ju=Cr,Xu=Gn,Ku=Ln,qu=wr,Qu=Ls,Ds=Vu,ec=Ps,Jn=gt,Xn=Ts,tc=yr,rc=Wn;function T(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ds(s)}T.plugin=function(e,t){let r=!1;function i(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
28
28
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
29
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...l);return a.postcssPlugin=e,a.postcssVersion=new
|
|
29
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...l);return a.postcssPlugin=e,a.postcssVersion=new Ds().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(l,a,o){return T([i(o)]).process(l,a)},i};T.stringify=tc;T.parse=Qu;T.fromJSON=Zu;T.list=Ku;T.comment=s=>new Hn(s);T.atRule=s=>new Vn(s);T.decl=s=>new Yn(s);T.rule=s=>new Xn(s);T.root=s=>new Jn(s);T.document=s=>new Zn(s);T.CssSyntaxError=Yu;T.Declaration=Yn;T.Container=Hu;T.Processor=Ds;T.Document=Zn;T.Comment=Hn;T.Warning=rc;T.AtRule=Vn;T.Result=ec;T.Input=Ju;T.Rule=Xn;T.Root=Jn;T.Node=qu;Xu.registerPostcss(T);var sc=T;T.default=T;const F=ga(sc);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var ic=Object.defineProperty,nc=(s,e,t)=>e in s?ic(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>nc(s,typeof e!="symbol"?e+"":e,t),oc=Object.defineProperty,lc=(s,e,t)=>e in s?oc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Xt=(s,e,t)=>lc(s,typeof e!="symbol"?e+"":e,t);function ac(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function uc(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Kn(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>cc(i,t)).join("");return ac(r)}catch(e){return console.log("stringifyStylesheet error:",e),null}}function cc(s,e){if(fc(s)){let t;try{t=Kn(s.styleSheet)||uc(s)}catch(r){t=s.cssText}return s.styleSheet.href?Ai(t,s.styleSheet.href):t}else{let t=s.cssText;return pc(s)&&s.selectorText.includes(":")&&(t=hc(t)),e?Ai(t,e):t}}function hc(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function fc(s){return"styleSheet"in s}function pc(s){return"selectorText"in s}function dc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const mc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,gc=/^(?:[a-z+]+:)?\/\//i,yc=/^www\..*/i,wc=/^(data:)([^,]*),(.*)/i;function Ai(s,e){return(s||"").replace(mc,(t,r,i,n,l,a)=>{const o=i||l||a,c=r||n||"";if(!o)return t;if(gc.test(o)||yc.test(o))return`url(${c}${o}${c})`;if(wc.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${dc(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}const Sc=1e3*30,bc=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],qn=class Kt{constructor(){if(Xt(this,"currentHref",null),Xt(this,"clones",{}),Xt(this,"cleanTimeout",null),Kt.instance)return Kt.instance;Kt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[data-rrweb-link-cloned="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;console.log("AsyncStylesheetManager, onLoad: href:",e);const t=Array.from(document.styleSheets);let r=null;for(let l=t.length-1;l>=0;l--)if(t[l].href===e){r=t[l];break}if(!r)return console.log("AsyncStylesheetManager, onLoad: couldn't find stylesheet for href:",e),this.removeCloneNode(e);const i=Kn(r);if(this.removeCloneNode(e),!i){console.log("AsyncStylesheetManager, onLoad: couldn't stringify stylesheet for href:",e);return}console.log("AsyncStylesheetManager, onLoad: success! did get new css text! forcing mutation... for href:",e),this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[data-rrweb-link-cloned="source-${this.clones[e].cloneNodeAttrId}"]`);n?n.setAttribute("data-rrweb-mutation",Date.now().toString()):this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString())}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){console.log("AsyncStylesheetManager, onCleanTimeout: cleaning up"),Fr.cleanTimeout=null,Fr.removeAllCloneElements()}blowCache(){console.log("AsyncStylesheetManager, blowCache: blowing cache"),this.removeAllCloneElements(),this.clones={}}registerClone({forElement:e}){this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const t=e.href;if(!t||t in this.clones&&this.clones[t]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const n=t.split("/").pop();if(n&&n.includes(".")){const[l]=n.split("?"),a=l.split(".").pop();if(a&&bc.includes(a.trim().toLowerCase()))return}}console.log("AsyncStylesheetManager, registerClone: registering clone for href:",t);const r=e.cloneNode(),i=Math.random().toString(36).slice(2);r.setAttribute("crossorigin","anonymous"),r.setAttribute("data-rrweb-link-cloned",i),e.setAttribute("data-rrweb-link-cloned",`source-${i}`),document.head.appendChild(r),this.clones[t]={original:e,clone:r,loaded:!1,cssText:null,cloneNodeAttrId:i},r.onload=()=>{this.onLoad(t)},r.onerror=()=>{this.onLoadError(t)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(Fr.onCleanTimeout,Sc)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?(console.log("AsyncStylesheetManager, getClonedCssTextIfAvailable: returning cloned cssText, for href:",e),this.clones[e].cssText):null}};Xt(qn,"instance");let Cc=qn;const Fr=new Cc;function vc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ic(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var _s={exports:{}},I=String,Qn=function(){return{isColorSupported:!1,reset:I,bold:I,dim:I,italic:I,underline:I,inverse:I,hidden:I,strikethrough:I,black:I,red:I,green:I,yellow:I,blue:I,magenta:I,cyan:I,white:I,gray:I,bgBlack:I,bgRed:I,bgGreen:I,bgYellow:I,bgBlue:I,bgMagenta:I,bgCyan:I,bgWhite:I,blackBright:I,redBright:I,greenBright:I,yellowBright:I,blueBright:I,magentaBright:I,cyanBright:I,whiteBright:I,bgBlackBright:I,bgRedBright:I,bgGreenBright:I,bgYellowBright:I,bgBlueBright:I,bgMagentaBright:I,bgCyanBright:I,bgWhiteBright:I}};_s.exports=Qn();_s.exports.createColors=Qn;var xc=_s.exports;const Ac={},Rc=Object.freeze(Object.defineProperty({__proto__:null,default:Ac},Symbol.toStringTag,{value:"Module"})),ne=Ic(Rc);let Ri=xc,Mi=ne,os=class eo extends Error{constructor(e,t,r,i,n,l){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),l&&(this.plugin=l),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,eo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ri.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=Ri.createColors(!0);i=d=>u(p(d)),r=d=>h(d),Mi&&(n=d=>Mi(d))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),c=String(o).length;return l.slice(a,o).map((u,h)=>{let p=a+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),S=Math.max(this.column+m,this.endColumn+m),b=u.slice(f,S),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(b)+`
|
|
30
30
|
`+y+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
|
|
31
31
|
`+g+i("^")}return" "+r(d)+n(u)}).join(`
|
|
32
32
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
33
33
|
|
|
34
34
|
`+e+`
|
|
35
|
-
`),this.name+": "+this.message+e}};var
|
|
35
|
+
`),this.name+": "+this.message+e}};var Fs=os;os.default=os;const Oi={after:`
|
|
36
36
|
`,beforeClose:`
|
|
37
37
|
`,beforeComment:`
|
|
38
38
|
`,beforeDecl:`
|
|
39
39
|
`,beforeOpen:" ",beforeRule:`
|
|
40
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Mc(s){return s[0].toUpperCase()+s.slice(1)}let
|
|
41
|
-
`)){let l=this.raw(e,null,"indent");if(l.length)for(let a=0;a<n;a++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],l=this.raw(n,"before");l&&this.builder(l),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
40
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Mc(s){return s[0].toUpperCase()+s.slice(1)}let ls=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
41
|
+
`)){let l=this.raw(e,null,"indent");if(l.length)for(let a=0;a<n;a++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],l=this.raw(n,"before");l&&this.builder(l),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Oi[r];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[r]!="undefined")return l.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Mc(r);this[a]?i=this[a](l,e):l.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Oi[r]),l.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
42
42
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
43
43
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
44
44
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
45
45
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
|
|
46
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var
|
|
47
|
-
`?(t=1,r+=1):t+=1}return i}let
|
|
48
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:l}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:fe(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:fe(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let l=t.slice(fe(t,this.source.start),fe(t,this.source.end)).indexOf(e.word);l!==-1&&(r=this.positionInside(l),i=this.positionInside(l+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:fe(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:fe(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new $c().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let a=this[l];if(Array.isArray(a))r[l]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)r[l]=a.toJSON(null,t);else if(l==="source"){if(a==null)continue;let o=t.get(a.input);o==null&&(o=n,t.set(a.input,n),n++),r[l]={end:a.end,inputId:o,start:a.start}}else r[l]=a}return i&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Nc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var vr=us;us.default=us;let Tc=vr,cs=class extends Tc{constructor(e){super(e),this.type="comment"}};var Ir=cs;cs.default=cs;let Lc=vr,hs=class extends Lc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var xr=hs;hs.default=hs;let to=Ir,ro=xr,Pc=vr,{isClean:so,my:io}=gt,Fs,no,oo,Bs;function lo(s){return s.map(e=>(e.nodes&&(e.nodes=lo(e.nodes)),delete e.source,e))}function ao(s){if(s[so]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ao(e)}let me=class uo extends Pc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,l)=>i(n.toProxy(),l):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r+1,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<n&&(this.indexes[l]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let l;for(let a in this.indexes)l=this.indexes[a],r<=l&&(this.indexes[a]=l+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=lo(no(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ro(e)]}else if(e.selector||e.selectors)e=[new Bs(e)];else if(e.name)e=[new Fs(e)];else if(e.text)e=[new to(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[io]||uo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[so]&&ao(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};me.registerParse=s=>{no=s};me.registerRule=s=>{Bs=s};me.registerAtRule=s=>{Fs=s};me.registerRoot=s=>{oo=s};var Ee=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Fs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Bs.prototype):s.type==="decl"?Object.setPrototypeOf(s,ro.prototype):s.type==="comment"?Object.setPrototypeOf(s,to.prototype):s.type==="root"&&Object.setPrototypeOf(s,oo.prototype),s[io]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let co=Ee,cr=class extends co{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Us=cr;cr.default=cr;co.registerAtRule(cr);let Dc=Ee,ho,fo,ut=class extends Dc{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ho(new fo,this,e).stringify()}};ut.registerLazyResult=s=>{ho=s};ut.registerProcessor=s=>{fo=s};var Ws=ut;ut.default=ut;let _c="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fc=(s=21)=>{let e="",t=s|0;for(;t--;)e+=_c[Math.random()*64|0];return e};var Bc={nanoid:Fc};let{existsSync:Uc,readFileSync:Wc}=ne,{dirname:_r,join:zc}=ne,{SourceMapConsumer:Oi,SourceMapGenerator:Ei}=ne;function jc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let fs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=_r(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Oi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,l=e.match(i)||e.match(n);if(l)return decodeURIComponent(e.substr(l[0].length));let a=e.match(t)||e.match(r);if(a)return jc(e.substr(a[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=_r(e),Uc(e))return this.mapFile=e,Wc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Oi)return Ei.fromSourceMap(t).toString();if(t instanceof Ei)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=zc(_r(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var po=fs;fs.default=fs;let{nanoid:Gc}=Bc,{isAbsolute:ps,resolve:ds}=ne,{SourceMapConsumer:Vc,SourceMapGenerator:Hc}=ne,{fileURLToPath:$i,pathToFileURL:Pt}=ne,Ni=_s,Yc=po,Fr=ne,Br=Symbol("lineToIndexCache"),Zc=!!(Vc&&Hc),ki=!!(ds&&ps);function Ti(s){if(s[Br])return s[Br];let e=s.css.split(`
|
|
49
|
-
`),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[
|
|
50
|
-
`," "];return
|
|
46
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var to=ls;ls.default=ls;let Oc=to;function as(s,e){new Oc(e).stringify(s)}var vr=as;as.default=as;var yt={};yt.isClean=Symbol("isClean");yt.my=Symbol("my");let Ec=Fs,$c=to,Nc=vr,{isClean:Xe,my:kc}=yt;function us(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(l=>us(l,t)):(n==="object"&&i!==null&&(i=us(i)),t[r]=i)}return t}function fe(s,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,i=0;for(let n=0;n<s.length;n++){if(r===e.line&&t===e.column){i=n;break}s[n]===`
|
|
47
|
+
`?(t=1,r+=1):t+=1}return i}let cs=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Xe]=!1,this[kc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=us(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Ec(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Xe]=!0}markDirty(){if(this[Xe]){this[Xe]=!1;let e=this;for(;e=e.parent;)e[Xe]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(fe(r,this.source.start),fe(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=fe(i,this.source.start),l=n+e;for(let a=n;a<l;a++)i[a]===`
|
|
48
|
+
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:l}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:fe(t,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:fe(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let l=t.slice(fe(t,this.source.start),fe(t,this.source.end)).indexOf(e.word);l!==-1&&(r=this.positionInside(l),i=this.positionInside(l+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:fe(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:fe(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new $c().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let a=this[l];if(Array.isArray(a))r[l]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)r[l]=a.toJSON(null,t);else if(l==="source"){if(a==null)continue;let o=t.get(a.input);o==null&&(o=n,t.set(a.input,n),n++),r[l]={end:a.end,inputId:o,start:a.start}}else r[l]=a}return i&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Nc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var Ir=cs;cs.default=cs;let Tc=Ir,hs=class extends Tc{constructor(e){super(e),this.type="comment"}};var xr=hs;hs.default=hs;let Lc=Ir,fs=class extends Lc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Ar=fs;fs.default=fs;let ro=xr,so=Ar,Pc=Ir,{isClean:io,my:no}=yt,Bs,oo,lo,Us;function ao(s){return s.map(e=>(e.nodes&&(e.nodes=ao(e.nodes)),delete e.source,e))}function uo(s){if(s[io]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)uo(e)}let me=class co extends Pc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,l)=>i(n.toProxy(),l):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r+1,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<n&&(this.indexes[l]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let l;for(let a in this.indexes)l=this.indexes[a],r<=l&&(this.indexes[a]=l+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ao(oo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new so(e)]}else if(e.selector||e.selectors)e=[new Us(e)];else if(e.name)e=[new Bs(e)];else if(e.text)e=[new ro(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[no]||co.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[io]&&uo(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};me.registerParse=s=>{oo=s};me.registerRule=s=>{Us=s};me.registerAtRule=s=>{Bs=s};me.registerRoot=s=>{lo=s};var Ee=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Bs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Us.prototype):s.type==="decl"?Object.setPrototypeOf(s,so.prototype):s.type==="comment"?Object.setPrototypeOf(s,ro.prototype):s.type==="root"&&Object.setPrototypeOf(s,lo.prototype),s[no]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let ho=Ee,hr=class extends ho{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ws=hr;hr.default=hr;ho.registerAtRule(hr);let Dc=Ee,fo,po,ct=class extends Dc{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new fo(new po,this,e).stringify()}};ct.registerLazyResult=s=>{fo=s};ct.registerProcessor=s=>{po=s};var zs=ct;ct.default=ct;let _c="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fc=(s=21)=>{let e="",t=s|0;for(;t--;)e+=_c[Math.random()*64|0];return e};var Bc={nanoid:Fc};let{existsSync:Uc,readFileSync:Wc}=ne,{dirname:Br,join:zc}=ne,{SourceMapConsumer:Ei,SourceMapGenerator:$i}=ne;function jc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ps=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Br(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Ei(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,l=e.match(i)||e.match(n);if(l)return decodeURIComponent(e.substr(l[0].length));let a=e.match(t)||e.match(r);if(a)return jc(e.substr(a[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Br(e),Uc(e))return this.mapFile=e,Wc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Ei)return $i.fromSourceMap(t).toString();if(t instanceof $i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=zc(Br(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var mo=ps;ps.default=ps;let{nanoid:Gc}=Bc,{isAbsolute:ds,resolve:ms}=ne,{SourceMapConsumer:Vc,SourceMapGenerator:Hc}=ne,{fileURLToPath:Ni,pathToFileURL:Dt}=ne,ki=Fs,Yc=mo,Ur=ne,Wr=Symbol("lineToIndexCache"),Zc=!!(Vc&&Hc),Ti=!!(ms&&ds);function Li(s){if(s[Wr])return s[Wr];let e=s.css.split(`
|
|
49
|
+
`),t=new Array(e.length),r=0;for(let i=0,n=e.length;i<n;i++)t[i]=r,r+=e[i].length+1;return s[Wr]=t,t}let fr=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Ti||/^\w+:\/\//.test(t.from)||ds(t.from)?this.file=t.from:this.file=ms(t.from)),Ti&&Zc){let r=new Yc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Gc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,l,a,o,c;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){o=h.offset;let d=this.fromOffset(o);t=d.line,r=d.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){a=p.offset;let d=this.fromOffset(a);l=d.line,n=d.col}else l=p.line,n=p.column,a=this.fromLineAndColumn(p.line,p.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let u=this.origin(t,r,l,n);return u?c=new ki(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,i.plugin):c=new ki(e,l===void 0?t:{column:r,line:t},l===void 0?r:{column:n,line:l},this.css,this.file,i.plugin),c.input={column:r,endColumn:n,endLine:l,endOffset:a,line:t,offset:o,source:this.css},this.file&&(Dt&&(c.input.url=Dt(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Li(this)[e-1]+t-1}fromOffset(e){let t=Li(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,l;for(;i<n;)if(l=i+(n-i>>1),e<t[l])n=l-1;else if(e>=t[l+1])i=l+1;else{i=l;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ms(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),l=n.originalPositionFor({column:t,line:e});if(!l.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let o;ds(l.source)?o=Dt(l.source):o=new URL(l.source,this.map.consumer().sourceRoot||Dt(this.map.mapFile));let c={column:l.column,endColumn:a&&a.column,endLine:a&&a.line,line:l.line,url:o.toString()};if(o.protocol==="file:")if(Ni)c.file=Ni(o);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(l.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Rr=fr;fr.default=fr;Ur&&Ur.registerInput&&Ur.registerInput(fr);let go=Ee,yo,wo,ze=class extends go{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new yo(new wo,this,e).stringify()}};ze.registerLazyResult=s=>{yo=s};ze.registerProcessor=s=>{wo=s};var wt=ze;ze.default=ze;go.registerRoot(ze);let ht={comma(s){return ht.split(s,[","],!0)},space(s){let e=[" ",`
|
|
50
|
+
`," "];return ht.split(s,e)},split(s,e,t){let r=[],i="",n=!1,l=0,a=!1,o="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:a?u===o&&(a=!1):u==='"'||u==="'"?(a=!0,o=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&e.includes(u)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var So=ht;ht.default=ht;let bo=Ee,Jc=So,pr=class extends bo{get selectors(){return Jc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var js=pr;pr.default=pr;bo.registerRule(pr);let Xc=Ws,Kc=xr,qc=Ar,Qc=Rr,eh=mo,th=wt,rh=js;function ft(s,e){if(Array.isArray(s))return s.map(l=>ft(l));let i=s,{inputs:t}=i,r=$e(i,["inputs"]);if(t){e=[];for(let l of t){let a=ee(M({},l),{__proto__:Qc.prototype});a.map&&(a.map=ee(M({},a.map),{__proto__:eh.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(l=>ft(l,e))),r.source){let n=r.source,{inputId:l}=n,a=$e(n,["inputId"]);r.source=a,l!=null&&(r.source.input=e[l])}if(r.type==="root")return new th(r);if(r.type==="decl")return new qc(r);if(r.type==="rule")return new rh(r);if(r.type==="comment")return new Kc(r);if(r.type==="atrule")return new Xc(r);throw new Error("Unknown node type: "+s.type)}var sh=ft;ft.default=ft;let{dirname:qt,relative:Co,resolve:vo,sep:Io}=ne,{SourceMapConsumer:xo,SourceMapGenerator:Qt}=ne,{pathToFileURL:Pi}=ne,ih=Rr,nh=!!(xo&&Qt),oh=!!(qt&&vo&&Co&&Io),lh=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
51
51
|
`;this.css.includes(`\r
|
|
52
52
|
`)&&(t=`\r
|
|
53
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
54
|
-
`),t=a.length-n):t+=a.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Kt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Kt(Co(r,this.mapOpts.annotation)));let i=bo(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ih(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Li){let r=Li(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;vo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var xo=lh;const Ur=39,Pi=34,Dt=92,Di=47,_t=10,Ke=32,Ft=12,Bt=9,Ut=13,ah=91,uh=93,ch=40,hh=41,fh=123,ph=125,dh=59,mh=42,gh=58,yh=64,Wt=/[\t\n\f\r "#'()/;[\\\]{}]/g,zt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wh=/.[\r\n"'(/\\]/,_i=/[\da-f]/i;var Sh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,l,a,o,c,u,h,p,d,g,m=r.length,f=0,S=[],b=[];function y(){return f}function C(P){throw e.error("Unclosed "+P,f)}function A(){return b.length===0&&f>=m}function E(P){if(b.length)return b.pop();if(f>=m)return;let j=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case _t:case Ke:case Bt:case Ut:case Ft:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ke||n===_t||n===Bt||n===Ut||n===Ft);u=["space",r.slice(f,o)],f=o-1;break}case ah:case uh:case fh:case ph:case gh:case dh:case hh:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case ch:{if(g=S.length?S.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Ur&&d!==Pi&&d!==Ke&&d!==_t&&d!==Bt&&d!==Ft&&d!==Ut){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||j){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Dt;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),l=r.slice(f,o+1),o===-1||wh.test(l)?u=["(","(",f]:(u=["brackets",l,f,o],f=o);break}case Ur:case Pi:{c=n===Ur?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||j){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Dt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case yh:{Wt.lastIndex=f+1,Wt.test(r),Wt.lastIndex===0?o=r.length-1:o=Wt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Dt:{for(o=f,a=!0;r.charCodeAt(o+1)===Dt;)o+=1,a=!a;if(n=r.charCodeAt(o+1),a&&n!==Di&&n!==Ke&&n!==_t&&n!==Bt&&n!==Ut&&n!==Ft&&(o+=1,_i.test(r.charAt(o)))){for(;_i.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ke&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Di&&r.charCodeAt(f+1)===mh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||j?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(zt.lastIndex=f+1,zt.test(r),zt.lastIndex===0?o=r.length-1:o=zt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],S.push(u),f=o);break}}return f++,u}function z(P){b.push(P)}return{back:z,endOfFile:A,nextToken:E,position:y}};let bh=Us,Ch=Ir,vh=xr,Ih=yt,Fi=zs,xh=Sh;const Bi={empty:!0,space:!0};function Ah(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Rh=class{constructor(e){this.input=e,this.root=new Ih,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new bh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,l=!1,a=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),l&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[l,a]of e.entries()){if(i=a,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return l}r=i}return!1}comment(e){let t=new Ch;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=xh(this.input)}decl(e,t){let r=new vh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Ah(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=l.map(c=>c[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Fi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,l=[],a=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),l.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=c),l.push("}");else if(l.length===0)if(r===";")if(i){this.decl(o,a);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,l,a=r.length,o="",c=!0,u,h;for(let p=0;p<a;p+=1)n=r[p],l=n[0],l==="space"&&p===a-1&&!i?c=!1:l==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!Bi[h]&&!Bi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Fi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Mh=Rh;let Oh=Ee,Eh=Ar,$h=Mh;function pr(s,e){let t=new Eh(s,e),r=new $h(t);try{r.parse()}catch(i){throw i}return r.root}var js=pr;pr.default=pr;Oh.registerParse(pr);let ms=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ao=ms;ms.default=ms;let Nh=Ao,gs=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Nh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Gs=gs;gs.default=gs;let kh=Ee,Th=Ws,Lh=xo,Ph=js,Ui=Gs,Dh=yt,_h=Cr,{isClean:ue,my:Fh}=gt;const Bh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Uh={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},Wh={Once:!0,postcssPlugin:!0,prepare:!0},je=0;function qe(s){return typeof s=="object"&&typeof s.then=="function"}function Ro(s){let e=!1,t=Bh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,je,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,je,t+"Exit"]:[t,t+"Exit"]}function Wi(s){let e;return s.type==="document"?e=["Document",je,"DocumentExit"]:s.type==="root"?e=["Root",je,"RootExit"]:e=Ro(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ys(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>ys(e)),s}let ws={},Ge=class Mo{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ys(t);else if(t instanceof Mo||t instanceof Ui)i=ys(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ph;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(l){this.processed=!0,this.error=l}i&&!i[Fh]&&kh.rebuild(i)}this.result=new Ui(e,i,r),this.helpers=ee(M({},ws),{postcss:ws,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Uh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(qe(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[Wi(e)];for(;t.length>0;){let r=this.visitTick(t);if(qe(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return qe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=_h;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Lh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(qe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(qe(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return a(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let l=t.iterator,a;for(;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[ue]){a[ue]=!0,e.push(Wi(a));return}t.iterator=0,delete r.indexes[l]}let n=t.events;for(;t.eventIndex<n.length;){let l=n[t.eventIndex];if(t.eventIndex+=1,l===je){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[ue]=!0;let t=Ro(e);for(let r of t)if(r===je)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Ge.registerPostcss=s=>{ws=s};var Oo=Ge;Ge.default=Ge;Dh.registerLazyResult(Ge);Th.registerLazyResult(Ge);let zh=xo,jh=js;const Gh=Gs;let Vh=Cr;let Ss=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=jh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Vh;this.result=new Gh(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new zh(n,i,this._opts,t);if(a.isMap()){let[o,c]=a.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Hh=Ss;Ss.default=Ss;let Yh=Ws,Zh=Oo,Jh=Hh,Xh=yt,ft=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Jh(this,e,t):new Zh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Kh=ft;ft.default=ft;Xh.registerProcessor(ft);Yh.registerProcessor(ft);let Eo=Us,$o=Ir,qh=Ee,Qh=_s,No=xr,ko=Ws,ef=sh,tf=Ar,rf=Oo,sf=wo,nf=vr,of=js,Vs=Kh,lf=Gs,To=yt,Lo=zs,af=Cr,uf=Ao;function L(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Vs(s)}L.plugin=function(e,t){let r=!1;function i(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
53
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||qt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new xo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),oh&&nh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Qt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Qt({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 Qt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,l;this.stringify(this.root,(a,o,c)=>{if(this.css+=a,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),l=a.match(/\n/g),l?(e+=l.length,n=a.lastIndexOf(`
|
|
54
|
+
`),t=a.length-n):t+=a.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?qt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=qt(vo(r,this.mapOpts.annotation)));let i=Co(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ih(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Pi){let r=Pi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Io==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Ao=lh;const zr=39,Di=34,_t=92,_i=47,Ft=10,Ke=32,Bt=12,Ut=9,Wt=13,ah=91,uh=93,ch=40,hh=41,fh=123,ph=125,dh=59,mh=42,gh=58,yh=64,zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wh=/.[\r\n"'(/\\]/,Fi=/[\da-f]/i;var Sh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,l,a,o,c,u,h,p,d,g,m=r.length,f=0,S=[],b=[];function y(){return f}function C(P){throw e.error("Unclosed "+P,f)}function A(){return b.length===0&&f>=m}function E(P){if(b.length)return b.pop();if(f>=m)return;let j=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ft:case Ke:case Ut:case Wt:case Bt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ke||n===Ft||n===Ut||n===Wt||n===Bt);u=["space",r.slice(f,o)],f=o-1;break}case ah:case uh:case fh:case ph:case gh:case dh:case hh:{let Y=String.fromCharCode(n);u=[Y,Y,f];break}case ch:{if(g=S.length?S.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==zr&&d!==Di&&d!==Ke&&d!==Ft&&d!==Ut&&d!==Bt&&d!==Wt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||j){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===_t;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),l=r.slice(f,o+1),o===-1||wh.test(l)?u=["(","(",f]:(u=["brackets",l,f,o],f=o);break}case zr:case Di:{c=n===zr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||j){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===_t;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case yh:{zt.lastIndex=f+1,zt.test(r),zt.lastIndex===0?o=r.length-1:o=zt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case _t:{for(o=f,a=!0;r.charCodeAt(o+1)===_t;)o+=1,a=!a;if(n=r.charCodeAt(o+1),a&&n!==_i&&n!==Ke&&n!==Ft&&n!==Ut&&n!==Wt&&n!==Bt&&(o+=1,Fi.test(r.charAt(o)))){for(;Fi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ke&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===_i&&r.charCodeAt(f+1)===mh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||j?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(jt.lastIndex=f+1,jt.test(r),jt.lastIndex===0?o=r.length-1:o=jt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],S.push(u),f=o);break}}return f++,u}function z(P){b.push(P)}return{back:z,endOfFile:A,nextToken:E,position:y}};let bh=Ws,Ch=xr,vh=Ar,Ih=wt,Bi=js,xh=Sh;const Ui={empty:!0,space:!0};function Ah(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Rh=class{constructor(e){this.input=e,this.root=new Ih,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new bh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,l=!1,a=!1,o=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),l&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[l,a]of e.entries()){if(i=a,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return l}r=i}return!1}comment(e){let t=new Ch;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=xh(this.input)}decl(e,t){let r=new vh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Ah(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=l.map(c=>c[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Bi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,l=[],a=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),l.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=c),l.push("}");else if(l.length===0)if(r===";")if(i){this.decl(o,a);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,l,a=r.length,o="",c=!0,u,h;for(let p=0;p<a;p+=1)n=r[p],l=n[0],l==="space"&&p===a-1&&!i?c=!1:l==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!Ui[h]&&!Ui[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Bi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Mh=Rh;let Oh=Ee,Eh=Rr,$h=Mh;function dr(s,e){let t=new Eh(s,e),r=new $h(t);try{r.parse()}catch(i){throw i}return r.root}var Gs=dr;dr.default=dr;Oh.registerParse(dr);let gs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ro=gs;gs.default=gs;let Nh=Ro,ys=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Nh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Vs=ys;ys.default=ys;let kh=Ee,Th=zs,Lh=Ao,Ph=Gs,Wi=Vs,Dh=wt,_h=vr,{isClean:ue,my:Fh}=yt;const Bh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Uh={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},Wh={Once:!0,postcssPlugin:!0,prepare:!0},je=0;function qe(s){return typeof s=="object"&&typeof s.then=="function"}function Mo(s){let e=!1,t=Bh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,je,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,je,t+"Exit"]:[t,t+"Exit"]}function zi(s){let e;return s.type==="document"?e=["Document",je,"DocumentExit"]:s.type==="root"?e=["Root",je,"RootExit"]:e=Mo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ws(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>ws(e)),s}let Ss={},Ge=class Oo{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ws(t);else if(t instanceof Oo||t instanceof Wi)i=ws(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ph;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(l){this.processed=!0,this.error=l}i&&!i[Fh]&&kh.rebuild(i)}this.result=new Wi(e,i,r),this.helpers=ee(M({},Ss),{postcss:Ss,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Uh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(qe(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[zi(e)];for(;t.length>0;){let r=this.visitTick(t);if(qe(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return qe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=_h;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Lh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(qe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(qe(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return a(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let l=t.iterator,a;for(;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[ue]){a[ue]=!0,e.push(zi(a));return}t.iterator=0,delete r.indexes[l]}let n=t.events;for(;t.eventIndex<n.length;){let l=n[t.eventIndex];if(t.eventIndex+=1,l===je){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[ue]=!0;let t=Mo(e);for(let r of t)if(r===je)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Ge.registerPostcss=s=>{Ss=s};var Eo=Ge;Ge.default=Ge;Dh.registerLazyResult(Ge);Th.registerLazyResult(Ge);let zh=Ao,jh=Gs;const Gh=Vs;let Vh=vr;let bs=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=jh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Vh;this.result=new Gh(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new zh(n,i,this._opts,t);if(a.isMap()){let[o,c]=a.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Hh=bs;bs.default=bs;let Yh=zs,Zh=Eo,Jh=Hh,Xh=wt,pt=class{constructor(e=[]){this.version="8.5.4",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Jh(this,e,t):new Zh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Kh=pt;pt.default=pt;Xh.registerProcessor(pt);Yh.registerProcessor(pt);let $o=Ws,No=xr,qh=Ee,Qh=Fs,ko=Ar,To=zs,ef=sh,tf=Rr,rf=Eo,sf=So,nf=Ir,of=Gs,Hs=Kh,lf=Vs,Lo=wt,Po=js,af=vr,uf=Ro;function L(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Hs(s)}L.plugin=function(e,t){let r=!1;function i(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
55
55
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
56
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...l);return a.postcssPlugin=e,a.postcssVersion=new
|
|
56
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...l);return a.postcssPlugin=e,a.postcssVersion=new Hs().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(l,a,o){return L([i(o)]).process(l,a)},i};L.stringify=af;L.parse=of;L.fromJSON=ef;L.list=sf;L.comment=s=>new No(s);L.atRule=s=>new $o(s);L.decl=s=>new ko(s);L.rule=s=>new Po(s);L.root=s=>new Lo(s);L.document=s=>new To(s);L.CssSyntaxError=Qh;L.Declaration=ko;L.Container=qh;L.Processor=Hs;L.Document=To;L.Comment=No;L.Warning=uf;L.AtRule=$o;L.Result=lf;L.Input=tf;L.Rule=Po;L.Root=Lo;L.Node=nf;rf.registerPostcss(L);var cf=L;L.default=L;const B=vc(cf);B.stringify;B.fromJSON;B.plugin;B.parse;B.list;B.document;B.comment;B.atRule;B.rule;B.decl;B.root;B.CssSyntaxError;B.Declaration;B.Container;B.Processor;B.Document;B.Comment;B.Warning;B.AtRule;B.Result;B.Input;B.Rule;B.Root;B.Node;class Ys{constructor(...e){te(this,"parentElement",null),te(this,"parentNode",null),te(this,"ownerDocument"),te(this,"firstChild",null),te(this,"lastChild",null),te(this,"previousSibling",null),te(this,"nextSibling",null),te(this,"ELEMENT_NODE",1),te(this,"TEXT_NODE",3),te(this,"nodeType"),te(this,"nodeName"),te(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ys){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function J(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Te=`Please stop import mirror directly. Instead of that,\r
|
|
57
57
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
58
|
-
or you can use record.mirror to access the mirror instance during recording.`;let zi={map:{},getId(){return console.error(Te),-1},getNode(){return console.error(Te),null},removeNodeFromMap(){console.error(Te)},has(){return console.error(Te),!1},reset(){console.error(Te)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(zi=new Proxy(zi,{get(s,e,t){return e==="map"&&console.error(Te),Reflect.get(s,e,t)}}));function pt(s,e,t={}){let r=null,i=0;return function(...n){const l=Date.now();!i&&t.leading===!1&&(i=l);const a=e-(l-i),o=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=l,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},a))}}function Rr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(l){setTimeout(()=>{t.set.call(this,l)},0),n&&n.set&&n.set.call(this,l)}}),()=>Rr(s,e,n||{},!0)}let dr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(dr=()=>new Date().getTime());function Po(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=x.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=x.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Do(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function _o(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Fo(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=Fo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(nr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function hf(s,e){return e.getId(s)!==-1}function Wr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===it}function Bo(s,e){if(et(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Bo(r,e):!0}function bs(s){return!!s.changedTouches}function ff(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Uo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Wo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Cs(s){return s?s instanceof Hs&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class pf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zo(s){var e;let t=null;return"getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function df(s){let e=s,t;for(;t=zo(e);)e=t;return e}function mf(s){const e=s.ownerDocument;if(!e)return!1;const t=df(s);return x.contains(e,t)}function jo(s){const e=s.ownerDocument;return e?x.contains(e,s)||mf(s):!1}let rt;function gf(s){rt=s}function yf(){rt=void 0}const O=s=>rt?(...t)=>{try{return s(...t)}catch(r){if(rt&&rt(r)===!0)return;throw r}}:s;class ji{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),l=i||this.getRemoteIdToIdMap(e);let a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),l.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class wf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new ji(cn)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ji(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case $.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:$.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return t;case $.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case $.IncrementalSnapshot:switch(t.data.source){case R.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.ViewportResize:return!1;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case R.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==en.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const Go=class Qt{constructor(){if(w(this,"lastFullSnapshot",-1),w(this,"intervalBetweenSnapshots",150),w(this,"debounceTimeout",null),w(this,"debounceTime",10),Qt.instance)return Qt.instance;Qt.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){console.log("StormSnapshotManager, takeSnapshot: too soon");return}console.log("StormSnapshotManager, takeSnapshot: taking full snapshot"),Xf(),this.lastFullSnapshot=Date.now()}};w(Go,"instance");let Sf=Go;const bf=new Sf;function Gi(s){return"__ln"in s}class Cf{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Gi(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Gi(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Vi=(s,e)=>`${s}@${e}`;class vf{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"stormBatches",[]),w(this,"stormInfo",null),w(this,"stormSettings",{batchSize:150,timeout:30,mutationLimit:800}),w(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),w(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],bf.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),w(this,"processInternalMutations",(e,t=!1)=>{if(!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),w(this,"processMutations",e=>{this.processInternalMutations(e)}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Cf,i=u=>{let h=u,p=it;for(;p===it;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},n=u=>{const h=x.parentNode(u);if(!h||!jo(u))return;let p=!1;if(u.nodeType===Node.TEXT_NODE){const f=h.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(h)&&(p=!0)}const d=et(h)?this.mirror.getId(zo(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=Pe(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Uo(f,this.mirror)&&this.iframeManager.addIframe(f),Wo(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Cs(u)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(u),this.doc)},onIframeLoad:(f,S)=>{this.iframeManager.attachIframe(f,S),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,S)=>{this.stylesheetManager.attachLinkElement(f,S)},cssCaptured:p});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)Hi(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(x.parentNode(u))||n(u);for(const u of this.addedSet)!Yi(this.droppedSet,u)&&!Hi(this.removesSubTreeCache,u,this.mirror)||Yi(this.movedSet,u)?n(u):this.droppedSet.add(u);let l=null;for(;r.length;){let u=null;if(l){const h=this.mirror.getId(x.parentNode(l.value)),p=i(l.value);h!==-1&&p!==-1&&(u=l)}if(!u){let h=r.tail;for(;h;){const p=h;if(h=h.previous,p){const d=this.mirror.getId(x.parentNode(p.value));if(i(p.value)===-1)continue;if(d!==-1){u=p;break}else{const m=p.value,f=x.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const S=x.host(f);if(this.mirror.getId(S)!==-1){u=p;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}l=u.previous,r.removeNode(u.value),n(u.value)}const a=[];for(const u of this.texts){const h=u.node,p=x.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&a.push({id:d,value:u.value})}const o=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const p=this.mirror.getId(u.node);!t.has(p)&&this.mirror.has(p)&&o.push({id:p,attributes:h})}const c={texts:a,attributes:o,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(c))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=rr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:sr(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Wr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=x.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:pn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Fo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const l=sr(t);i=rr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!fn(t.tagName,r))if(n.attributes[r]=hn(this.doc,Re(t.tagName),Re(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const o=t.style.getPropertyValue(a),c=t.style.getPropertyPriority(a);o!==l.style.getPropertyValue(a)||c!==l.style.getPropertyPriority(a)?c===""?n.styleDiff[a]=o:n.styleDiff[a]=[o,c]:n._unchangedStyles[a]=[o,c]}for(const a of Array.from(l.style))t.style.getPropertyValue(a)===""&&(n.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let l=0;l<e.addedNodes.length;l++)this.genAdds(e.addedNodes[l],e.target);const t=et(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);if(X(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=Bo(e.target,this.mirror),n=et(e.target)&&tt(e.target)?!0:void 0;for(let l=0;l<e.removedNodes.length;l++){const a=e.removedNodes[l],o=this.mirror.getId(a);if(Wr(a,this.mirror,this.slimDOMOptions)||!hf(a,this.mirror))return;this.addedSet.has(a)?(vs(this.addedSet,a),this.droppedSet.add(a)):r&&o===-1||i||(this.movedSet.has(a)&&this.movedMap[Vi(o,t)]?vs(this.movedSet,a):(this.removes.push({parentId:t,id:o,isShadow:n}),If(a,this.removesSubTreeCache))),this.mapRemoves.push(a)}break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Wr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Vi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!X(e,this.blockClass,this.blockSelector,!1)){const r=x.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(Cs(e)){const i=x.childNodes(x.shadowRoot(e));for(let n=0;n<i.length;n++){const l=i[n];this.processedNodeManager.add(l,this),this.genAdds(l,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function vs(s,e){s.delete(e);const t=x.childNodes(e);for(let r=0;r<t.length;r++)vs(s,t[r])}function If(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=x.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Hi(s,e,t){return s.size===0?!1:xf(s,e)}function xf(s,e,t){const r=x.parentNode(e);return r?s.has(r):!1}function Yi(s,e){return s.size===0?!1:Vo(s,e)}function Vo(s,e){const t=x.parentNode(e);return t?s.has(t)?!0:Vo(s,t):!1}const Ae=[];function wt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Ho(s,e){const t=new vf;Ae.push(t),t.init(s);const r=new(rn())(O(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Af({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let l=[],a;const o=pt(O(h=>{const p=Date.now()-a;s(l.map(d=>(d.timeOffset-=p,d)),h),l=[],a=null}),n),c=O(pt(O(h=>{const p=wt(h),{clientX:d,clientY:g}=bs(h)?h.changedTouches[0]:h;a||(a=dr()),l.push({x:d,y:g,id:r.getId(p),timeOffset:dr()-a}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?R.Drag:h instanceof MouseEvent?R.MouseMove:R.TouchMove)}),i,{trailing:!1})),u=[J("mousemove",c,t),J("touchmove",c,t),J("drag",c,t)];return O(()=>{u.forEach(h=>h())})}function Rf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const l=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[];let o=null;const c=u=>h=>{const p=wt(h);if(X(p,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):pe.Pen}else bs(h)&&(d=pe.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):K[u]===K.Click&&(d=o,o=null);const m=bs(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:S,clientY:b}=m;O(s)(M({type:K[g],id:f,x:S,y:b},d!==null&&{pointerType:d}))};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&l[u]!==!1).forEach(u=>{let h=Re(u);const p=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}a.push(J(h,p,e))}),O(()=>{a.forEach(u=>u())})}function Yo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const l=O(pt(O(a=>{const o=wt(a);if(!o||X(o,r,i,!0))return;const c=t.getId(o);if(o===e&&e.defaultView){const u=Po(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return J("scroll",l,e)}function Mf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=O(pt(O(()=>{const n=Do(),l=_o();(t!==n||r!==l)&&(s({width:Number(l),height:Number(n)}),t=n,r=l)}),200));return J("resize",i,e)}const Of=["INPUT","TEXTAREA","SELECT"],Zi=new WeakMap;function Ef({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:l,maskInputOptions:a,maskInputFn:o,sampling:c,userTriggeredOnInput:u}){function h(b){let y=wt(b);const C=b.isTrusted,A=y&&y.tagName;if(y&&A==="OPTION"&&(y=x.parentElement(y)),!y||!A||Of.indexOf(A)<0||X(y,r,i,!0)||y.classList.contains(n)||l&&y.matches(l))return;let E=y.value,z=!1;const P=sr(y)||"";P==="radio"||P==="checkbox"?z=y.checked:(a[A.toLowerCase()]||a[P])&&(E=rr({element:y,maskInputOptions:a,tagName:A,type:P,value:E,maskInputFn:o})),p(y,u?{text:E,isChecked:z,userTriggered:C}:{text:E,isChecked:z});const j=y.name;P==="radio"&&j&&z&&e.querySelectorAll(`input[type="radio"][name="${j}"]`).forEach(Y=>{if(Y!==y){const q=Y.value;p(Y,u?{text:q,isChecked:!z,userTriggered:!1}:{text:q,isChecked:!z})}})}function p(b,y){const C=Zi.get(b);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Zi.set(b,y);const A=t.getId(b);O(s)(ee(M({},y),{id:A}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(b=>J(b,O(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),S=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...S.map(b=>Rr(b[0],b[1],{set(){O(h)({target:this,isTrusted:!1})}},!1,m))),O(()=>{g.forEach(b=>b())})}function mr(s){const e=[];function t(r,i){if(jt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||jt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||jt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||jt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const l=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(l)}else if(r.parentStyleSheet){const l=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(l)}return i}return t(s,e)}function ye(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function $f({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:O((u,h,p)=>{const[d,g]=p,{id:m,styleId:f}=ye(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:O((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let l;r.CSSStyleSheet.prototype.replace&&(l=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:O((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:O((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,p)})}));const o={};Gt("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(Gt("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),Gt("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),Gt("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(o).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:O((p,d,g)=>{const[m,f]=g,{id:S,styleId:b}=ye(d.parentStyleSheet,e,t.styleMirror);return(S&&S!==-1||b&&b!==-1)&&s({id:S,styleId:b,adds:[{rule:m,index:[...mr(d),f||0]}]}),p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:O((p,d,g)=>{const[m]=g,{id:f,styleId:S}=ye(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||S&&S!==-1)&&s({id:f,styleId:S,removes:[{index:[...mr(d),m]}]}),p.apply(d,g)})})}),O(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,l&&(r.CSSStyleSheet.prototype.replace=l),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(o).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function Zo({mirror:s,stylesheetManager:e},t){var r,i,n;let l=null;t.nodeName==="#document"?l=s.getId(t):l=s.getId(x.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!a||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var c;return(c=o.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=o.set)==null?void 0:u.call(this,c);if(l!==null&&l!==-1)try{e.adoptStyleSheets(c,l)}catch(p){}return h}}),O(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Nf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:O((a,o,c)=>{var u;const[h,p,d]=c;if(t.has(h))return n.apply(o,[h,p,d]);const{id:g,styleId:m}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:p,priority:d},index:mr(o.parentRule)}),a.apply(o,c)})});const l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:O((a,o,c)=>{var u;const[h]=c;if(t.has(h))return l.apply(o,[h]);const{id:p,styleId:d}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:h},index:mr(o.parentRule)}),a.apply(o,c)})}),O(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=l})}function kf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const l=O(o=>pt(O(c=>{const u=wt(c);if(!u||X(u,e,t,!0))return;const{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=u;s({type:o,id:r.getId(u),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),a=[J("play",l(ke.Play),n),J("pause",l(ke.Pause),n),J("seeked",l(ke.Seeked),n),J("volumechange",l(ke.VolumeChange),n),J("ratechange",l(ke.RateChange),n)];return O(()=>{a.forEach(o=>o())})}function Tf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,c,u){const h=new n(o,c,u);return i.set(h,{family:o,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const l=Me(e.fonts,"add",function(a){return function(o){return setTimeout(O(()=>{const c=i.get(o);c&&(s(c),i.delete(o))}),0),a.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(l),O(()=>{r.forEach(a=>a())})}function Lf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let l=!0;const a=O(()=>{const o=e.getSelection();if(!o||l&&(o!=null&&o.isCollapsed))return;l=o.isCollapsed||!1;const c=[],u=o.rangeCount||0;for(let h=0;h<u;h++){const p=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;X(d,r,i,!0)||X(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:c})});return a(),J("selectionchange",a)}function Pf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Me(t.customElements,"define",function(i){return function(n,l,a){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,l,a])}})}function Df(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:l,inputCb:a,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),l(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),a(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),o(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function _f(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Df(s,e);let r;s.recordDOM&&(r=Ho(s,s.doc));const i=Af(s),n=Rf(s),l=Yo(s),a=Mf(s,{win:t}),o=Ef(s),c=kf(s);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(u=$f(s,{win:t}),h=Zo(s,s.doc),p=Nf(s,{win:t}),s.collectFonts&&(d=Tf(s)));const g=Lf(s),m=Pf(s),f=[];for(const S of s.plugins)f.push(S.observer(S.callback,t,S.options));return O(()=>{Ae.forEach(S=>S.reset()),r==null||r.disconnect(),i(),n(),l(),a(),o(),c(),u(),h(),p(),d(),g(),m(),f.forEach(S=>S())})}function jt(s){return typeof window[s]!="undefined"}function Gt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ff=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Vt=0;Vt<De.length;Vt++)Ff[De.charCodeAt(Vt)]=Vt;var Bf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=De[e[t]>>2],i+=De[(e[t]&3)<<4|e[t+1]>>4],i+=De[(e[t+1]&15)<<2|e[t+2]>>6],i+=De[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Ji=new Map;function Uf(s,e){let t=Ji.get(s);return t||(t=new Map,Ji.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Jo=(s,e,t)=>{if(!s||!(Ko(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Uf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function er(s,e,t){if(s instanceof Array)return s.map(r=>er(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Bf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[er(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[er(s.data,e,t),s.width,s.height]};if(Ko(s,e)||typeof s=="object"){const r=s.constructor.name,i=Jo(s,e,t);return{rr_type:r,index:i}}}}return s}const Xo=(s,e,t)=>s.map(r=>er(r,e,t)),Ko=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Wf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const l of n)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;const a=Me(e.CanvasRenderingContext2D.prototype,l,function(o){return function(...c){return X(this.canvas,t,r,!0)||setTimeout(()=>{const u=Xo(c,e,this);s(this.canvas,{type:Fe["2D"],property:l,args:u})},0),o.apply(this,c)}});i.push(a)}catch(a){const o=Rr(e.CanvasRenderingContext2D.prototype,l,{set(c){s(this.canvas,{type:Fe["2D"],property:l,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(l=>l())}}function zf(s){return s==="experimental-webgl"?"webgl":s}function Xi(s,e,t,r){const i=[];try{const n=Me(s.HTMLCanvasElement.prototype,"getContext",function(l){return function(a,...o){if(!X(this,e,t,!0)){const c=zf(a);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(o[0]&&typeof o[0]=="object"){const u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[a,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Ki(s,e,t,r,i,n){const l=[],a=Object.getOwnPropertyNames(s);for(const o of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const c=Me(s,o,function(u){return function(...h){const p=u.apply(this,h);if(Jo(p,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=Xo(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return p}});l.push(c)}catch(c){const u=Rr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});l.push(u)}return l}function jf(s,e,t,r){const i=[];return i.push(...Ki(e.WebGLRenderingContext.prototype,Fe.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Ki(e.WebGL2RenderingContext.prototype,Fe.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const qo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Gf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),qi=typeof self!="undefined"&&self.Blob&&new Blob([Gf(qo)],{type:"text/javascript;charset=utf-8"});function Vf(s){let e;try{if(e=qi&&(self.URL||self.webkitURL).createObjectURL(qi),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+qo,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Hf{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:l,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,l&&t==="all"&&this.initCanvasMutationObserver(r,i,n),l&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const l=Xi(t,r,i,!0),a=new Map,o=new Vf;o.onmessage=g=>{const{id:m}=g.data;if(a.set(m,!1),!("base64"in g.data))return;const{base64:f,type:S,width:b,height:y}=g.data;this.mutationCb({id:m,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:S}]},0,0]}]})};const c=1e3/e;let u=0,h;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{X(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,p().forEach(async m=>{var f;const S=this.mirror.getId(m);if(a.get(S)||m.width===0||m.height===0)return;if(a.set(S,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);o.postMessage({id:S,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{l(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Xi(e,t,r,!1),n=Wf(this.processMutation.bind(this),e,t,r),l=jf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(l=>{const c=l,{type:a}=c;return $e(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Yf{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}class Zf{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!tt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ho(ee(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Yo(ee(M({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(Zo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Me(e.prototype,"attachShadow",function(i){return function(n){const l=i.call(this,n),a=x.shadowRoot(this);return a&&jo(this)&&r.addShadowRoot(a,t),l}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Jf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new pf),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let l;this.styleMirror.has(n)?l=this.styleMirror.getId(n):(l=this.styleMirror.add(n),i.push({styleId:l,rules:Array.from(n.rules||CSSRule,(a,o)=>({rule:on(a,n.href),index:o}))})),r.styleIds.push(l)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let W,Qe,zr,st=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Qs=s.contentWindow)==null?void 0:Qs.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=Fl();function be(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:l="rr-ignore",ignoreSelector:a=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:S,sampling:b={},dataURLOptions:y={},mousemoveWait:C,recordDOM:A=!0,recordCanvas:E=!1,recordCrossOriginIframes:z=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:Y=!1,inlineImages:q=!1,plugins:oe,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:Ve=new Set([]),errorHandler:He}=s;gf(He);const V=z?window.parent===window:!0;let Q=!1;if(!V)try{window.parent.document&&(Q=!1)}catch(k){Q=!0}if(V&&!e)throw new Error("emit function is required");if(!V&&!Q)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),se.reset();const ge=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},le=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};ff();let St,Ce=0;const Ys=k=>{for(const re of oe||[])re.eventProcessor&&(k=re.eventProcessor(k));return S&&!Q&&(k=S(k)),k};W=(k,re)=>{var U;const G=k;if(G.timestamp=dr(),(U=Ae[0])!=null&&U.isFrozen()&&G.type!==$.FullSnapshot&&!(G.type===$.IncrementalSnapshot&&G.data.source===R.Mutation)&&Ae.forEach(ce=>ce.unfreeze()),V)e==null||e(Ys(G),re);else if(Q){const ce={type:"rrweb",event:Ys(G),origin:window.location.origin,isCheckout:re};window.parent.postMessage(ce,"*")}if(G.type===$.FullSnapshot)St=G,Ce=0;else if(G.type===$.IncrementalSnapshot){if(G.data.source===R.Mutation&&G.data.isAttachIframe)return;Ce++;const ce=r&&Ce>=r,xe=t&&G.timestamp-St.timestamp>t;(ce||xe)&&Qe(!0)}};const bt=k=>{W({type:$.IncrementalSnapshot,data:M({source:R.Mutation},k)})},Zs=k=>W({type:$.IncrementalSnapshot,data:M({source:R.Scroll},k)}),Js=k=>W({type:$.IncrementalSnapshot,data:M({source:R.CanvasMutation},k)}),Qo=k=>W({type:$.IncrementalSnapshot,data:M({source:R.AdoptedStyleSheet},k)}),ve=new Jf({mutationCb:bt,adoptedStyleSheetCb:Qo}),Ie=new wf({mirror:se,mutationCb:bt,stylesheetManager:ve,recordCrossOriginIframes:z,wrappedEmit:W});for(const k of oe||[])k.getMirror&&k.getMirror({nodeMirror:se,crossOriginIframeMirror:Ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ie.crossOriginIframeStyleMirror});const Mr=new Yf;zr=new Hf({recordCanvas:E,mutationCb:Js,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:b.canvas,dataURLOptions:y});const Ct=new Zf({mutationCb:bt,scrollCb:Zs,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:ge,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:E,inlineImages:q,sampling:b,slimDOMOptions:le,iframeManager:Ie,stylesheetManager:ve,canvasManager:zr,keepIframeSrcFn:N,processedNodeManager:Mr},mirror:se});Qe=(k=!1)=>{if(!A)return;W({type:$.Meta,data:{href:window.location.href,width:_o(),height:Do()}},k),ve.reset(),Ct.init(),Ae.forEach(U=>U.lock());const re=da(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:ge,maskTextFn:m,maskInputFn:g,slimDOM:le,dataURLOptions:y,recordCanvas:E,inlineImages:q,onSerialize:U=>{Uo(U,se)&&Ie.addIframe(U),Wo(U,se)&&ve.trackLinkElement(U),Cs(U)&&Ct.addShadowRoot(x.shadowRoot(U),document)},onIframeLoad:(U,G)=>{Ie.attachIframe(U,G),Ct.observeAttachShadow(U)},onStylesheetLoad:(U,G)=>{ve.attachLinkElement(U,G)},keepIframeSrcFn:N});if(!re)return console.warn("Failed to snapshot the document");W({type:$.FullSnapshot,data:{node:re,initialOffset:Po(window)}},k),Ae.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const k=[],re=xe=>{var vt;return O(_f)({mutationCb:bt,mousemoveCb:(_,Or)=>W({type:$.IncrementalSnapshot,data:{source:Or,positions:_}}),mouseInteractionCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.MouseInteraction},_)}),scrollCb:Zs,viewportResizeCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.ViewportResize},_)}),inputCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.Input},_)}),mediaInteractionCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.MediaInteraction},_)}),styleSheetRuleCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.StyleSheetRule},_)}),styleDeclarationCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.StyleDeclaration},_)}),canvasMutationCb:Js,fontCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.Font},_)}),selectionCb:_=>{W({type:$.IncrementalSnapshot,data:M({source:R.Selection},_)})},customElementCb:_=>{W({type:$.IncrementalSnapshot,data:M({source:R.CustomElement},_)})},blockClass:i,ignoreClass:l,ignoreSelector:a,maskTextClass:o,maskTextSelector:c,maskInputOptions:ge,inlineStylesheet:u,sampling:b,recordDOM:A,recordCanvas:E,inlineImages:q,userTriggeredOnInput:j,collectFonts:Y,doc:xe,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:le,dataURLOptions:y,mirror:se,iframeManager:Ie,stylesheetManager:ve,shadowDomManager:Ct,processedNodeManager:Mr,canvasManager:zr,ignoreCSSAttributes:Ve,plugins:((vt=oe==null?void 0:oe.filter(_=>_.observer))==null?void 0:vt.map(_=>({observer:_.observer,options:_.options,callback:Or=>W({type:$.Plugin,data:{plugin:_.name,payload:Or}})})))||[]},f)};Ie.addLoadListener(xe=>{try{k.push(re(xe.contentDocument))}catch(vt){console.warn(vt)}});let U=null;const G=()=>{U=Date.now(),Qe(),k.push(re(document)),st=!0},ce=()=>{window.removeEventListener("load",ce),!(!st||U==null)&&(Date.now()-U<=10||Qe())};return window.addEventListener("load",ce),document.readyState==="interactive"||document.readyState==="complete"?(document.readyState==="complete"&&window.removeEventListener("load",ce),G()):(k.push(J("DOMContentLoaded",()=>{W({type:$.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&G()})),k.push(J("load",()=>{W({type:$.Load,data:{}}),P==="load"&&G()},window))),()=>{k.forEach(xe=>xe()),Mr.destroy(),st=!1,yf()}}catch(k){console.warn(k)}}be.addCustomEvent=(s,e)=>{if(!st)throw new Error("please add custom event after start recording");W({type:$.Custom,data:{tag:s,payload:e}})};be.freezePage=()=>{Ae.forEach(s=>s.freeze())};be.takeFullSnapshot=s=>{if(!st)throw new Error("please take full snapshot after start recording");Qe(s)};be.mirror=se;var Qi;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Qi||(Qi={}));const{addCustomEvent:$p}=be,{freezePage:Np}=be,{takeFullSnapshot:Xf}=be;exports.record=be;
|
|
58
|
+
or you can use record.mirror to access the mirror instance during recording.`;let ji={map:{},getId(){return console.error(Te),-1},getNode(){return console.error(Te),null},removeNodeFromMap(){console.error(Te)},has(){return console.error(Te),!1},reset(){console.error(Te)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(ji=new Proxy(ji,{get(s,e,t){return e==="map"&&console.error(Te),Reflect.get(s,e,t)}}));function dt(s,e,t={}){let r=null,i=0;return function(...n){const l=Date.now();!i&&t.leading===!1&&(i=l);const a=e-(l-i),o=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=l,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},a))}}function Mr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(l){setTimeout(()=>{t.set.call(this,l)},0),n&&n.set&&n.set.call(this,l)}}),()=>Mr(s,e,n||{},!0)}let mr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(mr=()=>new Date().getTime());function Do(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=x.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=x.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function _o(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Fo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Bo(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=Bo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(or(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function hf(s,e){return e.getId(s)!==-1}function jr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===nt}function Uo(s,e){if(et(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Uo(r,e):!0}function Cs(s){return!!s.changedTouches}function ff(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Wo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function zo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function vs(s){return s?s instanceof Ys&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class pf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function jo(s){var e;let t=null;return"getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function df(s){let e=s,t;for(;t=jo(e);)e=t;return e}function mf(s){const e=s.ownerDocument;if(!e)return!1;const t=df(s);return x.contains(e,t)}function Go(s){const e=s.ownerDocument;return e?x.contains(e,s)||mf(s):!1}let st;function gf(s){st=s}function yf(){st=void 0}const O=s=>st?(...t)=>{try{return s(...t)}catch(r){if(st&&st(r)===!0)return;throw r}}:s;class Gi{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),l=i||this.getRemoteIdToIdMap(e);let a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),l.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class wf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Gi(hn)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Gi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case $.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:$.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return t;case $.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case $.IncrementalSnapshot:switch(t.data.source){case R.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.ViewportResize:return!1;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case R.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==tn.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const Vo=class er{constructor(){if(w(this,"lastFullSnapshot",-1),w(this,"intervalBetweenSnapshots",150),w(this,"debounceTimeout",null),w(this,"debounceTime",10),er.instance)return er.instance;er.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){console.log("StormSnapshotManager, takeSnapshot: too soon");return}console.log("StormSnapshotManager, takeSnapshot: taking full snapshot"),Xf(),this.lastFullSnapshot=Date.now()}};w(Vo,"instance");let Sf=Vo;const bf=new Sf;function Vi(s){return"__ln"in s}class Cf{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Vi(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Vi(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Hi=(s,e)=>`${s}@${e}`;class vf{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"stormBatches",[]),w(this,"stormInfo",null),w(this,"stormSettings",{batchSize:150,timeout:30,mutationLimit:800}),w(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),w(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],bf.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),w(this,"processInternalMutations",(e,t=!1)=>{if(!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),w(this,"processMutations",e=>{this.processInternalMutations(e)}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Cf,i=u=>{let h=u,p=nt;for(;p===nt;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},n=u=>{const h=x.parentNode(u);if(!h||!Go(u))return;let p=!1;if(u.nodeType===Node.TEXT_NODE){const f=h.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(h)&&(p=!0)}const d=et(h)?this.mirror.getId(jo(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=Pe(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Wo(f,this.mirror)&&this.iframeManager.addIframe(f),zo(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),vs(u)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(u),this.doc)},onIframeLoad:(f,S)=>{this.iframeManager.attachIframe(f,S),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,S)=>{this.stylesheetManager.attachLinkElement(f,S)},cssCaptured:p});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)Yi(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(x.parentNode(u))||n(u);for(const u of this.addedSet)!Zi(this.droppedSet,u)&&!Yi(this.removesSubTreeCache,u,this.mirror)||Zi(this.movedSet,u)?n(u):this.droppedSet.add(u);let l=null;for(;r.length;){let u=null;if(l){const h=this.mirror.getId(x.parentNode(l.value)),p=i(l.value);h!==-1&&p!==-1&&(u=l)}if(!u){let h=r.tail;for(;h;){const p=h;if(h=h.previous,p){const d=this.mirror.getId(x.parentNode(p.value));if(i(p.value)===-1)continue;if(d!==-1){u=p;break}else{const m=p.value,f=x.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const S=x.host(f);if(this.mirror.getId(S)!==-1){u=p;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}l=u.previous,r.removeNode(u.value),n(u.value)}const a=[];for(const u of this.texts){const h=u.node,p=x.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&a.push({id:d,value:u.value})}const o=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const p=this.mirror.getId(u.node);!t.has(p)&&this.mirror.has(p)&&o.push({id:p,attributes:h})}const c={texts:a,attributes:o,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(c))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=sr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ir(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!jr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=x.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:dn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Bo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const l=ir(t);i=sr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!pn(t.tagName,r))if(n.attributes[r]=fn(this.doc,Re(t.tagName),Re(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const o=t.style.getPropertyValue(a),c=t.style.getPropertyPriority(a);o!==l.style.getPropertyValue(a)||c!==l.style.getPropertyPriority(a)?c===""?n.styleDiff[a]=o:n.styleDiff[a]=[o,c]:n._unchangedStyles[a]=[o,c]}for(const a of Array.from(l.style))t.style.getPropertyValue(a)===""&&(n.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let l=0;l<e.addedNodes.length;l++)this.genAdds(e.addedNodes[l],e.target);const t=et(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);if(X(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=Uo(e.target,this.mirror),n=et(e.target)&&tt(e.target)?!0:void 0;for(let l=0;l<e.removedNodes.length;l++){const a=e.removedNodes[l],o=this.mirror.getId(a);if(jr(a,this.mirror,this.slimDOMOptions)||!hf(a,this.mirror))return;this.addedSet.has(a)?(Is(this.addedSet,a),this.droppedSet.add(a)):r&&o===-1||i||(this.movedSet.has(a)&&this.movedMap[Hi(o,t)]?Is(this.movedSet,a):(this.removes.push({parentId:t,id:o,isShadow:n}),If(a,this.removesSubTreeCache))),this.mapRemoves.push(a)}break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(jr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Hi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!X(e,this.blockClass,this.blockSelector,!1)){const r=x.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(vs(e)){const i=x.childNodes(x.shadowRoot(e));for(let n=0;n<i.length;n++){const l=i[n];this.processedNodeManager.add(l,this),this.genAdds(l,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Is(s,e){s.delete(e);const t=x.childNodes(e);for(let r=0;r<t.length;r++)Is(s,t[r])}function If(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=x.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Yi(s,e,t){return s.size===0?!1:xf(s,e)}function xf(s,e,t){const r=x.parentNode(e);return r?s.has(r):!1}function Zi(s,e){return s.size===0?!1:Ho(s,e)}function Ho(s,e){const t=x.parentNode(e);return t?s.has(t)?!0:Ho(s,t):!1}const Ae=[];function St(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Yo(s,e){const t=new vf;Ae.push(t),t.init(s);const r=new(sn())(O(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Af({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let l=[],a;const o=dt(O(h=>{const p=Date.now()-a;s(l.map(d=>(d.timeOffset-=p,d)),h),l=[],a=null}),n),c=O(dt(O(h=>{const p=St(h),{clientX:d,clientY:g}=Cs(h)?h.changedTouches[0]:h;a||(a=mr()),l.push({x:d,y:g,id:r.getId(p),timeOffset:mr()-a}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?R.Drag:h instanceof MouseEvent?R.MouseMove:R.TouchMove)}),i,{trailing:!1})),u=[J("mousemove",c,t),J("touchmove",c,t),J("drag",c,t)];return O(()=>{u.forEach(h=>h())})}function Rf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const l=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[];let o=null;const c=u=>h=>{const p=St(h);if(X(p,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):pe.Pen}else Cs(h)&&(d=pe.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):K[u]===K.Click&&(d=o,o=null);const m=Cs(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:S,clientY:b}=m;O(s)(M({type:K[g],id:f,x:S,y:b},d!==null&&{pointerType:d}))};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&l[u]!==!1).forEach(u=>{let h=Re(u);const p=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}a.push(J(h,p,e))}),O(()=>{a.forEach(u=>u())})}function Zo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const l=O(dt(O(a=>{const o=St(a);if(!o||X(o,r,i,!0))return;const c=t.getId(o);if(o===e&&e.defaultView){const u=Do(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return J("scroll",l,e)}function Mf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=O(dt(O(()=>{const n=_o(),l=Fo();(t!==n||r!==l)&&(s({width:Number(l),height:Number(n)}),t=n,r=l)}),200));return J("resize",i,e)}const Of=["INPUT","TEXTAREA","SELECT"],Ji=new WeakMap;function Ef({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:l,maskInputOptions:a,maskInputFn:o,sampling:c,userTriggeredOnInput:u}){function h(b){let y=St(b);const C=b.isTrusted,A=y&&y.tagName;if(y&&A==="OPTION"&&(y=x.parentElement(y)),!y||!A||Of.indexOf(A)<0||X(y,r,i,!0)||y.classList.contains(n)||l&&y.matches(l))return;let E=y.value,z=!1;const P=ir(y)||"";P==="radio"||P==="checkbox"?z=y.checked:(a[A.toLowerCase()]||a[P])&&(E=sr({element:y,maskInputOptions:a,tagName:A,type:P,value:E,maskInputFn:o})),p(y,u?{text:E,isChecked:z,userTriggered:C}:{text:E,isChecked:z});const j=y.name;P==="radio"&&j&&z&&e.querySelectorAll(`input[type="radio"][name="${j}"]`).forEach(Y=>{if(Y!==y){const q=Y.value;p(Y,u?{text:q,isChecked:!z,userTriggered:!1}:{text:q,isChecked:!z})}})}function p(b,y){const C=Ji.get(b);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Ji.set(b,y);const A=t.getId(b);O(s)(ee(M({},y),{id:A}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(b=>J(b,O(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),S=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...S.map(b=>Mr(b[0],b[1],{set(){O(h)({target:this,isTrusted:!1})}},!1,m))),O(()=>{g.forEach(b=>b())})}function gr(s){const e=[];function t(r,i){if(Gt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Gt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Gt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Gt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const l=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(l)}else if(r.parentStyleSheet){const l=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(l)}return i}return t(s,e)}function ye(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function $f({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:O((u,h,p)=>{const[d,g]=p,{id:m,styleId:f}=ye(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:O((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let l;r.CSSStyleSheet.prototype.replace&&(l=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:O((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:O((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,p)})}));const o={};Vt("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(Vt("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),Vt("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),Vt("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(o).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:O((p,d,g)=>{const[m,f]=g,{id:S,styleId:b}=ye(d.parentStyleSheet,e,t.styleMirror);return(S&&S!==-1||b&&b!==-1)&&s({id:S,styleId:b,adds:[{rule:m,index:[...gr(d),f||0]}]}),p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:O((p,d,g)=>{const[m]=g,{id:f,styleId:S}=ye(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||S&&S!==-1)&&s({id:f,styleId:S,removes:[{index:[...gr(d),m]}]}),p.apply(d,g)})})}),O(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,l&&(r.CSSStyleSheet.prototype.replace=l),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(o).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function Jo({mirror:s,stylesheetManager:e},t){var r,i,n;let l=null;t.nodeName==="#document"?l=s.getId(t):l=s.getId(x.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!a||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var c;return(c=o.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=o.set)==null?void 0:u.call(this,c);if(l!==null&&l!==-1)try{e.adoptStyleSheets(c,l)}catch(p){}return h}}),O(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Nf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:O((a,o,c)=>{var u;const[h,p,d]=c;if(t.has(h))return n.apply(o,[h,p,d]);const{id:g,styleId:m}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:p,priority:d},index:gr(o.parentRule)}),a.apply(o,c)})});const l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:O((a,o,c)=>{var u;const[h]=c;if(t.has(h))return l.apply(o,[h]);const{id:p,styleId:d}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:h},index:gr(o.parentRule)}),a.apply(o,c)})}),O(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=l})}function kf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const l=O(o=>dt(O(c=>{const u=St(c);if(!u||X(u,e,t,!0))return;const{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=u;s({type:o,id:r.getId(u),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),a=[J("play",l(ke.Play),n),J("pause",l(ke.Pause),n),J("seeked",l(ke.Seeked),n),J("volumechange",l(ke.VolumeChange),n),J("ratechange",l(ke.RateChange),n)];return O(()=>{a.forEach(o=>o())})}function Tf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,c,u){const h=new n(o,c,u);return i.set(h,{family:o,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const l=Me(e.fonts,"add",function(a){return function(o){return setTimeout(O(()=>{const c=i.get(o);c&&(s(c),i.delete(o))}),0),a.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(l),O(()=>{r.forEach(a=>a())})}function Lf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let l=!0;const a=O(()=>{const o=e.getSelection();if(!o||l&&(o!=null&&o.isCollapsed))return;l=o.isCollapsed||!1;const c=[],u=o.rangeCount||0;for(let h=0;h<u;h++){const p=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;X(d,r,i,!0)||X(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:c})});return a(),J("selectionchange",a)}function Pf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Me(t.customElements,"define",function(i){return function(n,l,a){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,l,a])}})}function Df(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:l,inputCb:a,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),l(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),a(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),o(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function _f(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Df(s,e);let r;s.recordDOM&&(r=Yo(s,s.doc));const i=Af(s),n=Rf(s),l=Zo(s),a=Mf(s,{win:t}),o=Ef(s),c=kf(s);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(u=$f(s,{win:t}),h=Jo(s,s.doc),p=Nf(s,{win:t}),s.collectFonts&&(d=Tf(s)));const g=Lf(s),m=Pf(s),f=[];for(const S of s.plugins)f.push(S.observer(S.callback,t,S.options));return O(()=>{Ae.forEach(S=>S.reset()),r==null||r.disconnect(),i(),n(),l(),a(),o(),c(),u(),h(),p(),d(),g(),m(),f.forEach(S=>S())})}function Gt(s){return typeof window[s]!="undefined"}function Vt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ff=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ht=0;Ht<De.length;Ht++)Ff[De.charCodeAt(Ht)]=Ht;var Bf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=De[e[t]>>2],i+=De[(e[t]&3)<<4|e[t+1]>>4],i+=De[(e[t+1]&15)<<2|e[t+2]>>6],i+=De[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Xi=new Map;function Uf(s,e){let t=Xi.get(s);return t||(t=new Map,Xi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Xo=(s,e,t)=>{if(!s||!(qo(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Uf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function tr(s,e,t){if(s instanceof Array)return s.map(r=>tr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Bf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[tr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[tr(s.data,e,t),s.width,s.height]};if(qo(s,e)||typeof s=="object"){const r=s.constructor.name,i=Xo(s,e,t);return{rr_type:r,index:i}}}}return s}const Ko=(s,e,t)=>s.map(r=>tr(r,e,t)),qo=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Wf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const l of n)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;const a=Me(e.CanvasRenderingContext2D.prototype,l,function(o){return function(...c){return X(this.canvas,t,r,!0)||setTimeout(()=>{const u=Ko(c,e,this);s(this.canvas,{type:Fe["2D"],property:l,args:u})},0),o.apply(this,c)}});i.push(a)}catch(a){const o=Mr(e.CanvasRenderingContext2D.prototype,l,{set(c){s(this.canvas,{type:Fe["2D"],property:l,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(l=>l())}}function zf(s){return s==="experimental-webgl"?"webgl":s}function Ki(s,e,t,r){const i=[];try{const n=Me(s.HTMLCanvasElement.prototype,"getContext",function(l){return function(a,...o){if(!X(this,e,t,!0)){const c=zf(a);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(o[0]&&typeof o[0]=="object"){const u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[a,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function qi(s,e,t,r,i,n){const l=[],a=Object.getOwnPropertyNames(s);for(const o of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const c=Me(s,o,function(u){return function(...h){const p=u.apply(this,h);if(Xo(p,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=Ko(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return p}});l.push(c)}catch(c){const u=Mr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});l.push(u)}return l}function jf(s,e,t,r){const i=[];return i.push(...qi(e.WebGLRenderingContext.prototype,Fe.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...qi(e.WebGL2RenderingContext.prototype,Fe.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Qo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Gf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Qi=typeof self!="undefined"&&self.Blob&&new Blob([Gf(Qo)],{type:"text/javascript;charset=utf-8"});function Vf(s){let e;try{if(e=Qi&&(self.URL||self.webkitURL).createObjectURL(Qi),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Qo,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Hf{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:l,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,l&&t==="all"&&this.initCanvasMutationObserver(r,i,n),l&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const l=Ki(t,r,i,!0),a=new Map,o=new Vf;o.onmessage=g=>{const{id:m}=g.data;if(a.set(m,!1),!("base64"in g.data))return;const{base64:f,type:S,width:b,height:y}=g.data;this.mutationCb({id:m,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:S}]},0,0]}]})};const c=1e3/e;let u=0,h;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{X(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,p().forEach(async m=>{var f;const S=this.mirror.getId(m);if(a.get(S)||m.width===0||m.height===0)return;if(a.set(S,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);o.postMessage({id:S,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{l(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Ki(e,t,r,!1),n=Wf(this.processMutation.bind(this),e,t,r),l=jf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(l=>{const c=l,{type:a}=c;return $e(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Yf{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}class Zf{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!tt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Yo(ee(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Zo(ee(M({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(Jo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Me(e.prototype,"attachShadow",function(i){return function(n){const l=i.call(this,n),a=x.shadowRoot(this);return a&&Go(this)&&r.addShadowRoot(a,t),l}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Jf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new pf),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let l;this.styleMirror.has(n)?l=this.styleMirror.getId(n):(l=this.styleMirror.add(n),i.push({styleId:l,rules:Array.from(n.rules||CSSRule,(a,o)=>({rule:ln(a,n.href),index:o}))})),r.styleIds.push(l)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let W,Qe,Gr,it=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ei=s.contentWindow)==null?void 0:ei.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=Bl();function be(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:l="rr-ignore",ignoreSelector:a=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:S,sampling:b={},dataURLOptions:y={},mousemoveWait:C,recordDOM:A=!0,recordCanvas:E=!1,recordCrossOriginIframes:z=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:Y=!1,inlineImages:q=!1,plugins:oe,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:Ve=new Set([]),errorHandler:He}=s;gf(He);const V=z?window.parent===window:!0;let Q=!1;if(!V)try{window.parent.document&&(Q=!1)}catch(k){Q=!0}if(V&&!e)throw new Error("emit function is required");if(!V&&!Q)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),se.reset();const ge=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},le=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};ff();let bt,Ce=0;const Zs=k=>{for(const re of oe||[])re.eventProcessor&&(k=re.eventProcessor(k));return S&&!Q&&(k=S(k)),k};W=(k,re)=>{var U;const G=k;if(G.timestamp=mr(),(U=Ae[0])!=null&&U.isFrozen()&&G.type!==$.FullSnapshot&&!(G.type===$.IncrementalSnapshot&&G.data.source===R.Mutation)&&Ae.forEach(ce=>ce.unfreeze()),V)e==null||e(Zs(G),re);else if(Q){const ce={type:"rrweb",event:Zs(G),origin:window.location.origin,isCheckout:re};window.parent.postMessage(ce,"*")}if(G.type===$.FullSnapshot)bt=G,Ce=0;else if(G.type===$.IncrementalSnapshot){if(G.data.source===R.Mutation&&G.data.isAttachIframe)return;Ce++;const ce=r&&Ce>=r,xe=t&&G.timestamp-bt.timestamp>t;(ce||xe)&&Qe(!0)}};const Ct=k=>{W({type:$.IncrementalSnapshot,data:M({source:R.Mutation},k)})},Js=k=>W({type:$.IncrementalSnapshot,data:M({source:R.Scroll},k)}),Xs=k=>W({type:$.IncrementalSnapshot,data:M({source:R.CanvasMutation},k)}),el=k=>W({type:$.IncrementalSnapshot,data:M({source:R.AdoptedStyleSheet},k)}),ve=new Jf({mutationCb:Ct,adoptedStyleSheetCb:el}),Ie=new wf({mirror:se,mutationCb:Ct,stylesheetManager:ve,recordCrossOriginIframes:z,wrappedEmit:W});for(const k of oe||[])k.getMirror&&k.getMirror({nodeMirror:se,crossOriginIframeMirror:Ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ie.crossOriginIframeStyleMirror});const Or=new Yf;Gr=new Hf({recordCanvas:E,mutationCb:Xs,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:b.canvas,dataURLOptions:y});const vt=new Zf({mutationCb:Ct,scrollCb:Js,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:ge,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:E,inlineImages:q,sampling:b,slimDOMOptions:le,iframeManager:Ie,stylesheetManager:ve,canvasManager:Gr,keepIframeSrcFn:N,processedNodeManager:Or},mirror:se});Qe=(k=!1)=>{if(!A)return;W({type:$.Meta,data:{href:window.location.href,width:Fo(),height:_o()}},k),ve.reset(),vt.init(),Ae.forEach(U=>U.lock());const re=ma(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:ge,maskTextFn:m,maskInputFn:g,slimDOM:le,dataURLOptions:y,recordCanvas:E,inlineImages:q,onSerialize:U=>{Wo(U,se)&&Ie.addIframe(U),zo(U,se)&&ve.trackLinkElement(U),vs(U)&&vt.addShadowRoot(x.shadowRoot(U),document)},onIframeLoad:(U,G)=>{Ie.attachIframe(U,G),vt.observeAttachShadow(U)},onStylesheetLoad:(U,G)=>{ve.attachLinkElement(U,G)},keepIframeSrcFn:N});if(!re)return console.warn("Failed to snapshot the document");W({type:$.FullSnapshot,data:{node:re,initialOffset:Do(window)}},k),Ae.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const k=[],re=xe=>{var It;return O(_f)({mutationCb:Ct,mousemoveCb:(_,Er)=>W({type:$.IncrementalSnapshot,data:{source:Er,positions:_}}),mouseInteractionCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.MouseInteraction},_)}),scrollCb:Js,viewportResizeCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.ViewportResize},_)}),inputCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.Input},_)}),mediaInteractionCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.MediaInteraction},_)}),styleSheetRuleCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.StyleSheetRule},_)}),styleDeclarationCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.StyleDeclaration},_)}),canvasMutationCb:Xs,fontCb:_=>W({type:$.IncrementalSnapshot,data:M({source:R.Font},_)}),selectionCb:_=>{W({type:$.IncrementalSnapshot,data:M({source:R.Selection},_)})},customElementCb:_=>{W({type:$.IncrementalSnapshot,data:M({source:R.CustomElement},_)})},blockClass:i,ignoreClass:l,ignoreSelector:a,maskTextClass:o,maskTextSelector:c,maskInputOptions:ge,inlineStylesheet:u,sampling:b,recordDOM:A,recordCanvas:E,inlineImages:q,userTriggeredOnInput:j,collectFonts:Y,doc:xe,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:le,dataURLOptions:y,mirror:se,iframeManager:Ie,stylesheetManager:ve,shadowDomManager:vt,processedNodeManager:Or,canvasManager:Gr,ignoreCSSAttributes:Ve,plugins:((It=oe==null?void 0:oe.filter(_=>_.observer))==null?void 0:It.map(_=>({observer:_.observer,options:_.options,callback:Er=>W({type:$.Plugin,data:{plugin:_.name,payload:Er}})})))||[]},f)};Ie.addLoadListener(xe=>{try{k.push(re(xe.contentDocument))}catch(It){console.warn(It)}});let U=null;const G=()=>{U=Date.now(),Qe(),k.push(re(document)),it=!0},ce=()=>{window.removeEventListener("load",ce),!(!it||U==null)&&(Date.now()-U<=10||Qe())};return window.addEventListener("load",ce),document.readyState==="interactive"||document.readyState==="complete"?(document.readyState==="complete"&&window.removeEventListener("load",ce),G()):(k.push(J("DOMContentLoaded",()=>{W({type:$.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&G()})),k.push(J("load",()=>{W({type:$.Load,data:{}}),P==="load"&&G()},window))),()=>{k.forEach(xe=>xe()),Or.destroy(),it=!1,yf()}}catch(k){console.warn(k)}}be.addCustomEvent=(s,e)=>{if(!it)throw new Error("please add custom event after start recording");W({type:$.Custom,data:{tag:s,payload:e}})};be.freezePage=()=>{Ae.forEach(s=>s.freeze())};be.takeFullSnapshot=s=>{if(!it)throw new Error("please take full snapshot after start recording");Qe(s)};be.mirror=se;var en;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(en||(en={}));const{addCustomEvent:$p}=be,{freezePage:Np}=be,{takeFullSnapshot:Xf}=be;exports.record=be;
|
|
59
59
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
60
60
|
var __cp = (to, from, except, desc) => {
|
|
61
61
|
if ((from && typeof from === "object") || typeof from === "function") {
|