@appsurify-testmap/rrweb 2.1.0-alpha.7 → 2.1.1-alpha.2

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.
@@ -11,60 +11,60 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var hl=Object.defineProperty,fl=Object.defineProperties;var dl=Object.getOwnPropertyDescriptors;var Tt=Object.getOwnPropertySymbols;var Vi=Object.prototype.hasOwnProperty,zi=Object.prototype.propertyIsEnumerable;var Wi=(s,e,t)=>e in s?hl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e)=>{for(var t in e||(e={}))Vi.call(e,t)&&Wi(s,t,e[t]);if(Tt)for(var t of Tt(e))zi.call(e,t)&&Wi(s,t,e[t]);return s},ee=(s,e)=>fl(s,dl(e));var Ue=(s,e)=>{var t={};for(var r in s)Vi.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Tt)for(var r of Tt(s))e.indexOf(r)<0&&zi.call(s,r)&&(t[r]=s[r]);return t};var pl=Object.defineProperty,ml=(s,e,t)=>e in s?pl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>ml(s,typeof e!="symbol"?e+"":e,t),Gi;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var gl=Object.defineProperty,yl=(s,e,t)=>e in s?gl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ji=(s,e,t)=>yl(s,typeof e!="symbol"?e+"":e,t),A=(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))(A||{});const Hi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Yi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},_t={},wl=()=>!!globalThis.Zone;function Xs(s){if(_t[s])return _t[s];const e=globalThis[s],t=e.prototype,r=s in Hi?Hi[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Yi?Yi[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!wl())return _t[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?_t[s]=u:t}catch(a){return t}}const Xr={};function De(s,e,t){var r;const i=`${s}.${String(t)}`;if(Xr[i])return Xr[i].call(e);const o=Xs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Xr[i]=n,n.call(e)):e[t]}const Jr={};function io(s,e,t){const r=`${s}.${String(t)}`;if(Jr[r])return Jr[r].bind(e);const o=Xs(s)[t];return typeof o!="function"?e[t]:(Jr[r]=o,o.bind(e))}function bl(s){return De("Node",s,"childNodes")}function vl(s){return De("Node",s,"parentNode")}function Sl(s){return De("Node",s,"parentElement")}function Cl(s){return De("Node",s,"textContent")}function El(s,e){return io("Node",s,"contains")(e)}function Il(s){return io("Node",s,"getRootNode")()}function xl(s){return!s||!("host"in s)?null:De("ShadowRoot",s,"host")}function Ml(s){return s.styleSheets}function Nl(s){return!s||!("shadowRoot"in s)?null:De("Element",s,"shadowRoot")}function Rl(s,e){return De("Element",s,"querySelector")(e)}function Al(s,e){return De("Element",s,"querySelectorAll")(e)}function Ol(){return Xs("MutationObserver").constructor}function Dl(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 te={childNodes:bl,parentNode:vl,parentElement:Sl,textContent:Cl,contains:El,getRootNode:Il,host:xl,styleSheets:Ml,shadowRoot:Nl,querySelector:Rl,querySelectorAll:Al,mutationObserver:Ol,patch:Dl};function Js(s){return s.nodeType===s.ELEMENT_NODE}function ht(s){const e=s&&"host"in s&&"mode"in s&&te.host(s)||null;return!!(e&&"shadowRoot"in e&&te.shadowRoot(e)===s)}function ft(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 _l(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 fs(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=>no(i,t)).join("");return Tl(r)}catch(e){return null}}function no(s,e){if($l(s)){let t;try{t=fs(s.styleSheet)||_l(s)}catch(r){t=s.cssText}return s.styleSheet.href?dr(t,s.styleSheet.href):t}else{let t=s.cssText;return Ll(s)&&s.selectorText.includes(":")&&(t=kl(t)),e?dr(t,e):t}}function kl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function $l(s){return"styleSheet"in s}function Ll(s){return"selectorText"in s}class Ks{constructor(){ji(this,"idNodeMap",new Map),ji(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 oo(){return new Ks}function hr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Oe(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Oe(s){return s.toLowerCase()}const Zi="__rrweb_original__";function Pl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const o=e.getImageData,n=Zi in o?o[Zi]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function Fl(s,e){return!s||!e||s.type!==e.type?!1:s.type===A.Document?s.compatMode===e.compatMode:s.type===A.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===A.Comment||s.type===A.Text||s.type===A.CDATA?s.textContent===e.textContent:s.type===A.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function fr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Oe(e):null}function Qs(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o:null}function Bl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ul=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Wl=/^(?:[a-z+]+:)?\/\//i,Vl=/^www\..*/i,zl=/^(data:)([^,]*),(.*)/i;function dr(s,e){return(s||"").replace(Ul,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(Wl.test(l)||Vl.test(l))return`url(${u}${l}${u})`;if(zl.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Bl(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function kt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Gl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=kt(s,t);const a=n.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=kt(r[l].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),m=n.split(f),d=-1;if(m.length===2)d=m[0].length;else if(m.length>2&&m[0]===""&&r[l-1].textContent!=="")d=n.indexOf(f,1);else if(m.length===1){if(f=f.substring(0,f.length-1),m=n.split(f),m.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(d=n.indexOf(f));if(m.length>=2&&h>c){const p=r[l-1].textContent;if(p&&typeof p=="string"){const g=kt(p).length;d=n.indexOf(f,g)}d===-1&&(d=m[0].length)}if(d!==-1){let p=Math.floor(d/a);for(;p>0&&p<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const g=kt(s.substring(0,p),t);if(g.length===d){i.push(s.substring(0,p)),s=s.substring(p),n=n.substring(d);break}else g.length<d?p+=Math.max(1,Math.floor((d-g.length)/a)):p-=Math.max(1,Math.floor((g.length-d)*a))}break}}}}return i.push(s),i}function jl(s,e){return Gl(s,e).join("/* rr_split */")}function ut(s){if(s.nodeType===Node.DOCUMENT_NODE)return"/";if(s.nodeType===Node.DOCUMENT_TYPE_NODE)return"/html/doctype";if(s.nodeType===Node.ELEMENT_NODE){const e=s;if(e.id)return`//*[@id="${e.id}"]`;if(e.tagName&&e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=Array.from(t.children).filter(o=>o.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${ut(t)}/${e.tagName.toLowerCase()}${i}`}if(s.nodeType===Node.TEXT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.TEXT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/text()${r}`}if(s.nodeType===Node.CDATA_SECTION_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.CDATA_SECTION_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/text()${r}`}if(s.nodeType===Node.COMMENT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.COMMENT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/comment()${r}`}return""}function Hl(s){var e;const t=te.parentNode(s),r=t&&t;return!r||!ao(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function ao(s){var a;var e;const t=(a=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?a:null,r=t?t.getComputedStyle(s):null,i=r!=null&&r.display!=="none"&&r.visibility!=="hidden"&&parseFloat(r.opacity)!==0,o=s.getBoundingClientRect();return i&&Yl(o)}function Yl(s,e=window){var l,u,c,h;var t,r,i,o;const n=(u=(l=e==null?void 0:e.innerHeight)!=null?l:(r=(t=e==null?void 0:e.document)==null?void 0:t.documentElement)==null?void 0:r.clientHeight)!=null?u:0,a=(h=(c=e==null?void 0:e.innerWidth)!=null?c:(o=(i=e==null?void 0:e.document)==null?void 0:i.documentElement)==null?void 0:o.clientWidth)!=null?h:0;return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=n&&s.right<=a}const Zl=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Xl=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Jl=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],qs=new WeakSet,Kl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Kl.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Zl.includes(r)&&qs.add(this)}};const Ql=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Ql.call(this,s,e,t)};function ql(s){return s instanceof Element&&qs.has(s)}function lo(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Xl.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return ql(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Xi(){document.querySelectorAll("*").forEach(e=>{Jl.forEach(t=>{e.hasAttribute(t)&&qs.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?Xi():document.addEventListener("DOMContentLoaded",Xi);let eu=1;const tu=new RegExp("[^a-z0-9-_:]"),mt=-2;function uo(){return eu++}function ru(s){if(s instanceof HTMLFormElement)return"form";const e=Oe(s.tagName);return tu.test(e)?"div":e}let We,Ji;const su=/^[^ \t\n\r\u000c]+/,iu=/^[, \t\n\r\u000c]+/;function nu(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r(iu),!(t>=e.length);){let o=r(su);if(o.slice(-1)===",")o=je(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=je(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const Ki=new WeakMap;function je(s,e){return!e||e.trim()===""?e:ei(s,e)}function ou(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function ei(s,e){let t=Ki.get(s);if(t||(t=s.createElement("a"),Ki.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function co(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")?je(s,r):t==="srcset"?nu(s,r):t==="style"?dr(r,ei(s)):e==="object"&&t==="data"?je(s,r):r)}function ho(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function au(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function fo(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function lu(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 pr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?pr(te.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?pr(te.parentNode(s),e,t):!1}function po(s,e,t,r){let i;if(Js(s)){if(i=s,!te.childNodes(i).length)return!1}else{if(te.parentElement(s)===null)return!1;i=te.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(pr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function uu(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function cu(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function hu(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:n,includeAttribute:a,needsMask:l,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,dataURLOptions:m={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y=!1,cssCaptured:v=!1}=e,w=fu(t,r),C=ut(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:A.Document,childNodes:[],xPath:C,compatMode:s.compatMode}:{type:A.Document,childNodes:[],xPath:C};case s.DOCUMENT_TYPE_NODE:return{type:A.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w,xPath:C};case s.ELEMENT_NODE:return pu(s,{doc:t,blockClass:i,blockSelector:o,excludeAttribute:n,includeAttribute:a,inlineStylesheet:u,maskInputOptions:c,maskInputFn:f,dataURLOptions:m,inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y,rootId:w,xPath:C});case s.TEXT_NODE:return du(s,{doc:t,needsMask:l,maskTextFn:h,rootId:w,cssCaptured:v,xPath:C});case s.CDATA_SECTION_NODE:return{type:A.CDATA,textContent:"",rootId:w,xPath:C};case s.COMMENT_NODE:return{type:A.Comment,textContent:te.textContent(s)||"",rootId:w,xPath:C};default:return!1}}function fu(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function du(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o,xPath:n}=e,a=te.parentNode(s),l=a&&a.tagName;let u="";const c=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;h?u="SCRIPT_PLACEHOLDER":o||(u=te.textContent(s),c&&u&&(u=dr(u,ei(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,te.parentElement(s)):u.replace(/[\S]/g,"*"));const f=Hl(s),m=lo(s);return{type:A.Text,textContent:u||"",rootId:i,isVisible:f,isInteractive:m,xPath:n}}function pu(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:o,includeAttribute:n,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:u,dataURLOptions:c={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:d=!1,rootId:p,xPath:g}=e,y=lu(s,r,i),v=ru(s);let w={};const C=s.attributes.length;for(let S=0;S<C;S++){const R=s.attributes[S];fo(R.name,o)&&!au(R.name,n)||ho(v,R.name,R.value)||(w[R.name]=co(t,v,Oe(R.name),R.value))}if(v==="link"&&a){const S=Array.from(t.styleSheets).find(z=>z.href===s.href);let R=null;S&&(R=fs(S)),R&&(delete w.rel,delete w.href,w._cssText=R)}if(v==="style"&&s.sheet){let S=fs(s.sheet);S&&(s.childNodes.length>1&&(S=jl(S,s)),w._cssText=S)}if(v==="input"||v==="textarea"||v==="select"){const S=s.value,R=s.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&S?w.value=hr({element:s,type:fr(s),tagName:v,value:S,maskInputOptions:l,maskInputFn:u}):R&&(w.checked=R)}if(v==="option"&&(s.selected&&!l.select?w.selected=!0:delete w.selected),v==="dialog"&&s.open&&(w.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),v==="canvas"&&f){if(s.__context==="2d")Pl(s)||(w.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const S=s.toDataURL(c.type,c.quality),R=t.createElement("canvas");R.width=s.width,R.height=s.height;const z=R.toDataURL(c.type,c.quality);S!==z&&(w.rr_dataURL=S)}}if(v==="img"&&h){We||(We=t.createElement("canvas"),Ji=We.getContext("2d"));const S=s,R=S.currentSrc||S.getAttribute("src")||"<unknown-src>",z=S.crossOrigin,Z=()=>{S.removeEventListener("load",Z);try{We.width=S.naturalWidth,We.height=S.naturalHeight,Ji.drawImage(S,0,0),w.rr_dataURL=We.toDataURL(c.type,c.quality)}catch(ie){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?Z():S.addEventListener("load",Z);return}else console.warn(`Cannot inline img src=${R}! Error: ${ie}`)}S.crossOrigin==="anonymous"&&(z?w.crossOrigin=z:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?Z():S.addEventListener("load",Z)}if(v==="audio"||v==="video"){const S=w;S.rr_mediaState=s.paused?"paused":"played",S.rr_mediaCurrentTime=s.currentTime,S.rr_mediaPlaybackRate=s.playbackRate,S.rr_mediaMuted=s.muted,S.rr_mediaLoop=s.loop,S.rr_mediaVolume=s.volume}if(d||(s.scrollLeft&&(w.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(w.rr_scrollTop=s.scrollTop)),y){const{width:S,height:R}=s.getBoundingClientRect();w={class:w.class,rr_width:`${S}px`,rr_height:`${R}px`}}v==="iframe"&&!m(w.src)&&(s.contentDocument||(w.rr_src=w.src),delete w.src);let x;try{customElements.get(v)&&(x=!0)}catch(S){}const T=ao(s),P=lo(s);return{type:A.Element,tagName:v,attributes:w,childNodes:[],isSVG:ou(s)||void 0,needBlock:y,rootId:p,isCustom:x,isVisible:T,isInteractive:P,xPath:g}}function V(s){return s==null?"":s.toLowerCase()}function mu(s,e){if(e.comment&&s.type===A.Comment)return!0;if(s.type===A.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"&&Qs(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(V(s.attributes.name).match(/^msapplication-tile(image|color)$/)||V(s.attributes.name)==="application-name"||V(s.attributes.rel)==="icon"||V(s.attributes.rel)==="apple-touch-icon"||V(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&V(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(V(s.attributes.property).match(/^(og|twitter|fb):/)||V(s.attributes.name).match(/^(og|twitter):/)||V(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(V(s.attributes.name)==="robots"||V(s.attributes.name)==="googlebot"||V(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(V(s.attributes.name)==="author"||V(s.attributes.name)==="generator"||V(s.attributes.name)==="framework"||V(s.attributes.name)==="publisher"||V(s.attributes.name)==="progid"||V(s.attributes.property).match(/^article:/)||V(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(V(s.attributes.name)==="google-site-verification"||V(s.attributes.name)==="yandex-verification"||V(s.attributes.name)==="csrf-token"||V(s.attributes.name)==="p:domain_verify"||V(s.attributes.name)==="verify-v1"||V(s.attributes.name)==="verification"||V(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function He(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:m,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g={},inlineImages:y=!1,recordCanvas:v=!1,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:x=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:R=!1,cssCaptured:z=!1}=e;let{needsMask:Z}=e,{preserveWhiteSpace:ie=!0}=e;Z||(Z=po(s,n,a,Z===void 0));const le=hu(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:l,includeAttribute:u,needsMask:Z,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:d,dataURLOptions:g,inlineImages:y,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:R,cssCaptured:z});if(!le)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):mu(le,p)||!ie&&le.type===A.Text&&!le.textContent.replace(/^\s+|\s+$/gm,"").length?oe=mt:oe=uo();const O=Object.assign(le,{id:oe});if(r.add(s,O),oe===mt)return null;w&&w(s);let ue=!c;if(O.type===A.Element){ue=ue&&!O.needBlock,delete O.needBlock;const q=te.shadowRoot(s);q&&ft(q)&&(O.isShadowHost=!0)}if((O.type===A.Document||O.type===A.Element)&&ue){p.headWhitespace&&O.type===A.Element&&O.tagName==="head"&&(ie=!1);const q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:Z,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:c,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:y,recordCanvas:v,preserveWhiteSpace:ie,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:P,keepIframeSrcFn:S,cssCaptured:!1};if(!(O.type===A.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===A.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(q.cssCaptured=!0);for(const ce of Array.from(te.childNodes(s))){const ge=He(ce,q);ge&&O.childNodes.push(ge)}}let ne=null;if(Js(s)&&(ne=te.shadowRoot(s)))for(const ce of Array.from(te.childNodes(ne))){const ge=He(ce,q);ge&&(ft(ne)&&(ge.isShadow=!0),O.childNodes.push(ge))}}const J=te.parentNode(s);return J&&ht(J)&&ft(J)&&(O.isShadow=!0),O.type===A.Element&&O.tagName==="iframe"&&uu(s,()=>{const q=s.contentDocument;if(q&&C){const ne=He(q,{doc:q,mirror:r,blockClass:i,blockSelector:o,needsMask:Z,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:y,recordCanvas:v,preserveWhiteSpace:ie,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:P,keepIframeSrcFn:S});ne&&C(s,ne)}},x),O.type===A.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Qs(O.attributes.href)==="css")&&cu(s,()=>{if(T){const q=He(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:Z,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:m,maskInputFn:d,slimDOMOptions:p,dataURLOptions:g,inlineImages:y,recordCanvas:v,preserveWhiteSpace:ie,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:P,keepIframeSrcFn:S});q&&T(s,q)}},P),O}function gu(s,e){const{mirror:t=new Ks,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:a=/^$a/,includeAttribute:l=/.+/i,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:h=!1,maskAllInputs:f=!1,maskTextFn:m,maskInputFn:d,slimDOM:p=!1,dataURLOptions:g,preserveWhiteSpace:y,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:P=()=>!1}=e||{};return He(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,excludeAttribute:a,includeAttribute:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:f===!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}:f===!1?{password:!0}:f,maskTextFn:m,maskInputFn:d,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:g,inlineImages:c,recordCanvas:h,preserveWhiteSpace:y,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:P,newlyAddedElement:!1})}const yu=/(max|min)-device-(width|height)/,Qi=new RegExp(yu.source,"g"),wu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Qi)&&(s.params=s.params.replace(Qi,"$1-$2"))}}}},bu={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
- `+t.replace(/:hover/g,".\\:hover"))}))}}}};function vu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Su(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 ti={exports:{}},G=String,mo=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};ti.exports=mo();ti.exports.createColors=mo;var Cu=ti.exports;const Eu={},Iu=Object.freeze(Object.defineProperty({__proto__:null,default:Eu},Symbol.toStringTag,{value:"Module"})),de=Su(Iu);let qi=Cu,en=de,ds=class go extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),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,go)}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=qi.isColorSupported),en&&e&&(t=en(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=qi.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
- `+m+a("^")}return" "+l(f)+u}).join(`
14
+ "use strict";var dl=Object.defineProperty,pl=Object.defineProperties;var ml=Object.getOwnPropertyDescriptors;var kt=Object.getOwnPropertySymbols;var Hi=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable;var ji=(s,e,t)=>e in s?dl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))Hi.call(e,t)&&ji(s,t,e[t]);if(kt)for(var t of kt(e))Yi.call(e,t)&&ji(s,t,e[t]);return s},Q=(s,e)=>pl(s,ml(e));var Ve=(s,e)=>{var t={};for(var r in s)Hi.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&kt)for(var r of kt(s))e.indexOf(r)<0&&Yi.call(s,r)&&(t[r]=s[r]);return t};var gl=Object.defineProperty,yl=(s,e,t)=>e in s?gl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>yl(s,typeof e!="symbol"?e+"":e,t),Zi;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var bl=Object.defineProperty,wl=(s,e,t)=>e in s?bl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Xi=(s,e,t)=>wl(s,typeof e!="symbol"?e+"":e,t),A=(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))(A||{});const Ji={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ki={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},$t={},vl=()=>!!globalThis.Zone;function Qs(s){if($t[s])return $t[s];const e=globalThis[s],t=e.prototype,r=s in Ji?Ji[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Ki?Ki[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!vl())return $t[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?$t[s]=u:t}catch(a){return t}}const Kr={};function Te(s,e,t){var r;const i=`${s}.${String(t)}`;if(Kr[i])return Kr[i].call(e);const o=Qs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Kr[i]=n,n.call(e)):e[t]}const Qr={};function lo(s,e,t){const r=`${s}.${String(t)}`;if(Qr[r])return Qr[r].bind(e);const o=Qs(s)[t];return typeof o!="function"?e[t]:(Qr[r]=o,o.bind(e))}function Sl(s){return Te("Node",s,"childNodes")}function Cl(s){return Te("Node",s,"parentNode")}function El(s){return Te("Node",s,"parentElement")}function xl(s){return Te("Node",s,"textContent")}function Il(s,e){return lo("Node",s,"contains")(e)}function Ml(s){return lo("Node",s,"getRootNode")()}function Nl(s){return!s||!("host"in s)?null:Te("ShadowRoot",s,"host")}function Rl(s){return s.styleSheets}function Al(s){return!s||!("shadowRoot"in s)?null:Te("Element",s,"shadowRoot")}function Ol(s,e){return Te("Element",s,"querySelector")(e)}function Tl(s,e){return Te("Element",s,"querySelectorAll")(e)}function Dl(){return Qs("MutationObserver").constructor}function _l(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()=>{}}}function kl(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function $l(s){var f;var e,t;const r=(f=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const g=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),y=g*p,d=i.width*i.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const q={childNodes:Sl,parentNode:Cl,parentElement:El,textContent:xl,contains:Il,getRootNode:Ml,host:Nl,styleSheets:Rl,shadowRoot:Al,querySelector:Ol,querySelectorAll:Tl,mutationObserver:Dl,patch:_l,describeNode:kl,getElementVisibility:$l};function ft(s){return s.nodeType===s.ELEMENT_NODE}function dt(s){const e=s&&"host"in s&&"mode"in s&&q.host(s)||null;return!!(e&&"shadowRoot"in e&&q.shadowRoot(e)===s)}function pt(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 ps(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=>uo(i,t)).join("");return Ll(r)}catch(e){return null}}function uo(s,e){if(Bl(s)){let t;try{t=ps(s.styleSheet)||Pl(s)}catch(r){t=s.cssText}return s.styleSheet.href?mr(t,s.styleSheet.href):t}else{let t=s.cssText;return Ul(s)&&s.selectorText.includes(":")&&(t=Fl(t)),e?mr(t,e):t}}function Fl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Bl(s){return"styleSheet"in s}function Ul(s){return"selectorText"in s}class qs{constructor(){Xi(this,"idNodeMap",new Map),Xi(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 co(){return new qs}function dr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Oe(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Oe(s){return s.toLowerCase()}const Qi="__rrweb_original__";function Vl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const o=e.getImageData,n=Qi in o?o[Qi]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function Wl(s,e){return!s||!e||s.type!==e.type?!1:s.type===A.Document?s.compatMode===e.compatMode:s.type===A.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===A.Comment||s.type===A.Text||s.type===A.CDATA?s.textContent===e.textContent:s.type===A.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function pr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Oe(e):null}function ei(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o: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 Gl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,jl=/^(?:[a-z+]+:)?\/\//i,Hl=/^www\..*/i,Yl=/^(data:)([^,]*),(.*)/i;function mr(s,e){return(s||"").replace(Gl,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(jl.test(l)||Hl.test(l))return`url(${u}${l}${u})`;if(Yl.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${zl(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Lt(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 o=0;if(r.length>1&&s&&typeof s=="string"){let n=Lt(s,t);const a=n.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=Lt(r[l].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),g=n.split(f),p=-1;if(g.length===2)p=g[0].length;else if(g.length>2&&g[0]===""&&r[l-1].textContent!=="")p=n.indexOf(f,1);else if(g.length===1){if(f=f.substring(0,f.length-1),g=n.split(f),g.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(p=n.indexOf(f));if(g.length>=2&&h>c){const y=r[l-1].textContent;if(y&&typeof y=="string"){const d=Lt(y).length;p=n.indexOf(f,d)}p===-1&&(p=g[0].length)}if(p!==-1){let y=Math.floor(p/a);for(;y>0&&y<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const d=Lt(s.substring(0,y),t);if(d.length===p){i.push(s.substring(0,y)),s=s.substring(y),n=n.substring(p);break}else d.length<p?y+=Math.max(1,Math.floor((p-d.length)/a)):y-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return i.push(s),i}function Xl(s,e){return Zl(s,e).join("/* rr_split */")}function Jl(s,e){try{const t=document.querySelectorAll(s);return t.length===1&&t[0]===e}catch(t){return!1}}function Kl(s){if(!(s instanceof Element))return null;if(s.id)return`#${CSS.escape(s.id)}`;const e=[],t=s.tagName.toLowerCase();s.classList.length&&e.push(...Array.from(s.classList).map(n=>`.${CSS.escape(n)}`)),Array.from(s.attributes).forEach(n=>{n.name.startsWith("data-")&&e.push(`[${n.name}="${CSS.escape(n.value)}"]`)});const r=`${t}${e.join("")}`;if(Jl(r,s))return r;const i=[];let o=s;for(;o&&o.nodeType===Node.ELEMENT_NODE;){const n=o.parentElement,a=o.tagName.toLowerCase();let l="";if(n){const u=Array.from(n.children).filter(c=>c.tagName.toLowerCase()===a);u.length>1&&(l=`:nth-of-type(${u.indexOf(o)+1})`)}i.unshift(`${a}${l}`),o=n}return i.join(" > ")||null}function ms(s){switch(s.nodeType){case Node.DOCUMENT_NODE:return"/";case Node.DOCUMENT_TYPE_NODE:return"/html/doctype";case Node.ELEMENT_NODE:{const e=s;if(e.id)return`//*[@id="${CSS.escape(e.id)}"]`;if(e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=e.tagName.toLowerCase(),i=Array.from(t.children).filter(n=>n.tagName.toLowerCase()===r),o=i.length>1?`[${i.indexOf(e)+1}]`:"";return`${ms(t)}/${r}${o}`}case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:case Node.COMMENT_NODE:{const e=s.parentNode;if(!e)return"";const t={[Node.TEXT_NODE]:"text()",[Node.CDATA_SECTION_NODE]:"text()",[Node.COMMENT_NODE]:"comment()"},r=Array.from(e.childNodes).filter(o=>o.nodeType===s.nodeType),i=r.length>1?`[${r.indexOf(s)}]`:"";return`${ms(e)}/${t[s.nodeType]}${i}`}default:return""}}function Ql(s){var e;const t=q.parentNode(s),r=t&&t;return!r||!ti(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function ti(s){return q.getElementVisibility(s).isVisible}const ql=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],eu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],tu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],ri=new WeakSet,ru=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ru.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();ql.includes(r)&&ri.add(this)}};const su=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){su.call(this,s,e,t)};function iu(s){return s instanceof Element&&ri.has(s)}function nu(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(eu.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return iu(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function qi(){document.querySelectorAll("*").forEach(e=>{tu.forEach(t=>{e.hasAttribute(t)&&ri.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?qi():document.addEventListener("DOMContentLoaded",qi);let ou=1;const au=new RegExp("[^a-z0-9-_:]"),yt=-2;function ho(){return ou++}function lu(s){if(s instanceof HTMLFormElement)return"form";const e=Oe(s.tagName);return au.test(e)?"div":e}let We,en;const uu=/^[^ \t\n\r\u000c]+/,cu=/^[, \t\n\r\u000c]+/;function hu(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r(cu),!(t>=e.length);){let o=r(uu);if(o.slice(-1)===",")o=He(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=He(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const tn=new WeakMap;function He(s,e){return!e||e.trim()===""?e:si(s,e)}function fu(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function si(s,e){let t=tn.get(s);if(t||(t=s.createElement("a"),tn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function fo(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")?He(s,r):t==="srcset"?hu(s,r):t==="style"?mr(r,si(s)):e==="object"&&t==="data"?He(s,r):r)}function po(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function gs(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function du(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 gr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?gr(q.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?gr(q.parentNode(s),e,t):!1}function mo(s,e,t,r){let i;if(ft(s)){if(i=s,!q.childNodes(i).length)return!1}else{if(q.parentElement(s)===null)return!1;i=q.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(gr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function pu(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function mu(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function gu(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:n,needsMask:a,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:f={},inlineImages:g,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d=!1,cssCaptured:m=!1}=e,v=yu(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:A.Document,childNodes:[],compatMode:s.compatMode}:{type:A.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:A.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return wu(s,{doc:t,blockClass:i,blockSelector:o,excludeAttribute:n,inlineStylesheet:l,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:g,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d,rootId:v});case s.TEXT_NODE:return bu(s,{doc:t,needsMask:a,maskTextFn:c,rootId:v,cssCaptured:m});case s.CDATA_SECTION_NODE:return{type:A.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:A.Comment,textContent:q.textContent(s)||"",rootId:v};default:return!1}}function yu(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function bu(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=q.parentNode(s),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=q.textContent(s),u&&l&&(l=mr(l,si(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,q.parentElement(s)):l.replace(/[\S]/g,"*")),{type:A.Text,textContent:l||"",rootId:i}}function wu(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:g=!1,rootId:p}=e,y=du(s,r,i),d=lu(s);let m={};const v=s.attributes.length;for(let w=0;w<v;w++){const C=s.attributes[w];gs(C.name,o)||po(d,C.name,C.value)||(m[C.name]=fo(t,d,Oe(C.name),C.value))}if(d==="link"&&n){const w=Array.from(t.styleSheets).find(N=>N.href===s.href);let C=null;w&&(C=ps(w)),C&&(delete m.rel,delete m.href,m._cssText=C)}if(d==="style"&&s.sheet){let w=ps(s.sheet);w&&(s.childNodes.length>1&&(w=Xl(w,s)),m._cssText=w)}if(d==="input"||d==="textarea"||d==="select"){const w=s.value,C=s.checked;m.type!=="radio"&&m.type!=="checkbox"&&m.type!=="submit"&&m.type!=="button"&&w?m.value=dr({element:s,type:pr(s),tagName:d,value:w,maskInputOptions:a,maskInputFn:l}):C&&(m.checked=C)}if(d==="option"&&(s.selected&&!a.select?m.selected=!0:delete m.selected),d==="dialog"&&s.open&&(m.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&h){if(s.__context==="2d")Vl(s)||(m.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const w=s.toDataURL(u.type,u.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const N=C.toDataURL(u.type,u.quality);w!==N&&(m.rr_dataURL=w)}}if(d==="img"&&c){We||(We=t.createElement("canvas"),en=We.getContext("2d"));const w=s,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",N=w.crossOrigin,T=()=>{w.removeEventListener("load",T);try{We.width=w.naturalWidth,We.height=w.naturalHeight,en.drawImage(w,0,0),m.rr_dataURL=We.toDataURL(u.type,u.quality)}catch(D){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?T():w.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${C}! Error: ${D}`)}w.crossOrigin==="anonymous"&&(N?m.crossOrigin=N:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?T():w.addEventListener("load",T)}if(d==="audio"||d==="video"){const w=m;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(g||(s.scrollLeft&&(m.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(m.rr_scrollTop=s.scrollTop)),y){const{width:w,height:C}=s.getBoundingClientRect();m={class:m.class,rr_width:`${w}px`,rr_height:`${C}px`}}d==="iframe"&&!f(m.src)&&(s.contentDocument||(m.rr_src=m.src),delete m.src);let S;try{customElements.get(d)&&(S=!0)}catch(w){}return{type:A.Element,tagName:d,attributes:m,childNodes:[],isSVG:fu(s)||void 0,needBlock:y,rootId:p,isCustom:S}}function W(s){return s==null?"":s.toLowerCase()}function vu(s,e){if(e.comment&&s.type===A.Comment)return!0;if(s.type===A.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"&&ei(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(W(s.attributes.name).match(/^msapplication-tile(image|color)$/)||W(s.attributes.name)==="application-name"||W(s.attributes.rel)==="icon"||W(s.attributes.rel)==="apple-touch-icon"||W(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&W(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(W(s.attributes.property).match(/^(og|twitter|fb):/)||W(s.attributes.name).match(/^(og|twitter):/)||W(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(W(s.attributes.name)==="robots"||W(s.attributes.name)==="googlebot"||W(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(W(s.attributes.name)==="author"||W(s.attributes.name)==="generator"||W(s.attributes.name)==="framework"||W(s.attributes.name)==="publisher"||W(s.attributes.name)==="progid"||W(s.attributes.property).match(/^article:/)||W(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(W(s.attributes.name)==="google-site-verification"||W(s.attributes.name)==="yandex-verification"||W(s.attributes.name)==="csrf-token"||W(s.attributes.name)==="p:domain_verify"||W(s.attributes.name)==="verify-v1"||W(s.attributes.name)==="verification"||W(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ye(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:g,slimDOMOptions:p,dataURLOptions:y={},inlineImages:d=!1,recordCanvas:m=!1,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:T=()=>!1,newlyAddedElement:D=!1,cssCaptured:X=!1}=e;let{needsMask:z}=e,{preserveWhiteSpace:re=!0}=e;z||(z=mo(s,n,a,z===void 0));const ne=gu(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:l,needsMask:z,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:g,dataURLOptions:y,inlineImages:d,recordCanvas:m,keepIframeSrcFn:T,newlyAddedElement:D,cssCaptured:X});if(!ne)return console.warn(s,"not serialized"),null;let ae;r.hasNode(s)?ae=r.getId(s):vu(ne,p)||!re&&ne.type===A.Text&&!ne.textContent.replace(/^\s+|\s+$/gm,"").length?ae=yt:ae=ho();const R=Object.assign(ne,{id:ae});if(ft(s)||s.nodeType===Node.TEXT_NODE){if(R.xpath=ms(s),ft(s)){const k=Kl(s);k&&(R.selector=k)}s.nodeType===Node.TEXT_NODE&&(R.isVisible=Ql(s)),s.nodeType===Node.ELEMENT_NODE&&(R.isVisible=ti(s),R.isInteractive=nu(s))}if(r.add(s,R),ae===yt)return null;v&&v(s);let le=!u;if(R.type===A.Element){le=le&&!R.needBlock,delete R.needBlock;const k=q.shadowRoot(s);k&&pt(k)&&(R.isShadowHost=!0)}if((R.type===A.Document||R.type===A.Element)&&le){p.headWhitespace&&R.type===A.Element&&R.tagName==="head"&&(re=!1);const k={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:z,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:m,preserveWhiteSpace:re,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:N,keepIframeSrcFn:T,cssCaptured:!1};if(!(R.type===A.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===A.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&(k.cssCaptured=!0);for(const fe of Array.from(q.childNodes(s))){const se=Ye(fe,k);se&&R.childNodes.push(se)}}let ce=null;if(ft(s)&&(ce=q.shadowRoot(s)))for(const fe of Array.from(q.childNodes(ce))){const se=Ye(fe,k);se&&(pt(ce)&&(se.isShadow=!0),R.childNodes.push(se))}}const ue=q.parentNode(s);return ue&&dt(ue)&&pt(ue)&&(R.isShadow=!0),R.type===A.Element&&R.tagName==="iframe"&&pu(s,()=>{const k=s.contentDocument;if(k&&S){const ce=Ye(k,{doc:k,mirror:r,blockClass:i,blockSelector:o,needsMask:z,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:m,preserveWhiteSpace:re,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:N,keepIframeSrcFn:T});ce&&S(s,ce)}},w),R.type===A.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&ei(R.attributes.href)==="css")&&mu(s,()=>{if(C){const k=Ye(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:z,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:m,preserveWhiteSpace:re,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:N,keepIframeSrcFn:T});k&&C(s,k)}},N),R}function Su(s,e){const{mirror:t=new qs,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:a=/.^/,inlineStylesheet:l=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:f,maskInputFn:g,slimDOM:p=!1,dataURLOptions:y,preserveWhiteSpace:d,onSerialize:m,onIframeLoad:v,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:N=()=>!1}=e||{};return Ye(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,excludeAttribute:a,skipChild:!1,inlineStylesheet:l,maskInputOptions: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}:h===!1?{password:!0}:h,maskTextFn:f,maskInputFn:g,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:y,inlineImages:u,recordCanvas:c,preserveWhiteSpace:d,onSerialize:m,onIframeLoad:v,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:N,newlyAddedElement:!1})}const Cu=/(max|min)-device-(width|height)/,rn=new RegExp(Cu.source,"g"),Eu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(rn)&&(s.params=s.params.replace(rn,"$1-$2"))}}}},xu={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
+ `+t.replace(/:hover/g,".\\:hover"))}))}}}};function Iu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Mu(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 ii={exports:{}},G=String,go=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};ii.exports=go();ii.exports.createColors=go;var Nu=ii.exports;const Ru={},Au=Object.freeze(Object.defineProperty({__proto__:null,default:Ru},Symbol.toStringTag,{value:"Module"})),de=Mu(Au);let sn=Nu,nn=de,ys=class yo extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),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,yo)}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=sn.isColorSupported),nn&&e&&(t=nn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=sn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
+ `+g+a("^")}return" "+l(f)+u}).join(`
17
17
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
18
18
 
19
19
  `+e+`
20
- `),this.name+": "+this.message+e}};var ri=ds;ds.default=ds;var It={};It.isClean=Symbol("isClean");It.my=Symbol("my");const tn={after:`
20
+ `),this.name+": "+this.message+e}};var ni=ys;ys.default=ys;var Mt={};Mt.isClean=Symbol("isClean");Mt.my=Symbol("my");const on={after:`
21
21
  `,beforeClose:`
22
22
  `,beforeComment:`
23
23
  `,beforeDecl:`
24
24
  `,beforeOpen:" ",beforeRule:`
25
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function xu(s){return s[0].toUpperCase()+s.slice(1)}let ps=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 o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,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,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
26
- `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}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 o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,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 o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return tn[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+xu(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=tn[r]),n.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(`
25
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ou(s){return s[0].toUpperCase()+s.slice(1)}let bs=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 o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,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,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
26
+ `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}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 o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,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 o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return on[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Ou(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=on[r]),n.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(`
27
27
  `)&&(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(`
28
28
  `)&&(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(`
29
29
  `)&&(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(`
30
30
  `)&&(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 o=r.raws.before.split(`
31
- `);return t=o[o.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 yo=ps;ps.default=ps;let Mu=yo;function ms(s,e){new Mu(e).stringify(s)}var Or=ms;ms.default=ms;let{isClean:$t,my:Nu}=It,Ru=ri,Au=yo,Ou=Or;function gs(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],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>gs(n,t)):(o==="object"&&i!==null&&(i=gs(i)),t[r]=i)}return t}let ys=class{constructor(e={}){this.raws={},this[$t]=!1,this[Nu]=!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=gs(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 Ru(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[$t]){this[$t]=!1;let e=this;for(;e=e.parent;)e[$t]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
32
- `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Au().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 o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ou){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var Dr=ys;ys.default=ys;let Du=Dr,ws=class extends Du{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(N({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Tr=ws;ws.default=ws;let Tu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_u=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},ku=(s=21)=>{let e="",t=s;for(;t--;)e+=Tu[Math.random()*64|0];return e};var $u={nanoid:ku,customAlphabet:_u};let{SourceMapConsumer:rn,SourceMapGenerator:sn}=de,{existsSync:Lu,readFileSync:Pu}=de,{dirname:Kr,join:Fu}=de;function Bu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let bs=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=Kr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new rn(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,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Bu(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Kr(e),Lu(e))return this.mapFile=e,Pu(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 rn)return sn.fromSourceMap(t).toString();if(t instanceof sn)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=Fu(Kr(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 wo=bs;bs.default=bs;let{SourceMapConsumer:Uu,SourceMapGenerator:Wu}=de,{fileURLToPath:nn,pathToFileURL:Lt}=de,{isAbsolute:vs,resolve:Ss}=de,{nanoid:Vu}=$u,Qr=de,on=ri,zu=wo,qr=Symbol("fromOffsetCache"),Gu=!!(Uu&&Wu),an=!!(Ss&&vs),mr=class{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,t.from&&(!an||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=Ss(t.from)),an&&Gu){let r=new zu(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 "+Vu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new on(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new on(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(Lt&&(o.input.url=Lt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[qr])r=this[qr];else{let o=this.css.split(`
33
- `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[qr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ss(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;vs(n.source)?l=Lt(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||Lt(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(nn)u.file=nn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=N({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var _r=mr;mr.default=mr;Qr&&Qr.registerInput&&Qr.registerInput(mr);let{SourceMapConsumer:bo,SourceMapGenerator:ir}=de,{dirname:nr,relative:vo,resolve:So,sep:Co}=de,{pathToFileURL:ln}=de,ju=_r,Hu=!!(bo&&ir),Yu=!!(nr&&So&&vo&&Co),Zu=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=`
31
+ `);return t=o[o.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 bo=bs;bs.default=bs;let Tu=bo;function ws(s,e){new Tu(e).stringify(s)}var Dr=ws;ws.default=ws;let{isClean:Pt,my:Du}=Mt,_u=ni,ku=bo,$u=Dr;function vs(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],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>vs(n,t)):(o==="object"&&i!==null&&(i=vs(i)),t[r]=i)}return t}let Ss=class{constructor(e={}){this.raws={},this[Pt]=!1,this[Du]=!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=vs(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 _u(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Pt]){this[Pt]=!1;let e=this;for(;e=e.parent;)e[Pt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
32
+ `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new ku().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 o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=$u){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var _r=Ss;Ss.default=Ss;let Lu=_r,Cs=class extends Lu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=Q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var kr=Cs;Cs.default=Cs;let Pu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Fu=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Bu=(s=21)=>{let e="",t=s;for(;t--;)e+=Pu[Math.random()*64|0];return e};var Uu={nanoid:Bu,customAlphabet:Fu};let{SourceMapConsumer:an,SourceMapGenerator:ln}=de,{existsSync:Vu,readFileSync:Wu}=de,{dirname:qr,join:zu}=de;function Gu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Es=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=qr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new an(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,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Gu(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=qr(e),Vu(e))return this.mapFile=e,Wu(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 an)return ln.fromSourceMap(t).toString();if(t instanceof ln)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=zu(qr(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 wo=Es;Es.default=Es;let{SourceMapConsumer:ju,SourceMapGenerator:Hu}=de,{fileURLToPath:un,pathToFileURL:Ft}=de,{isAbsolute:xs,resolve:Is}=de,{nanoid:Yu}=Uu,es=de,cn=ni,Zu=wo,ts=Symbol("fromOffsetCache"),Xu=!!(ju&&Hu),hn=!!(Is&&xs),yr=class{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,t.from&&(!hn||/^\w+:\/\//.test(t.from)||xs(t.from)?this.file=t.from:this.file=Is(t.from)),hn&&Xu){let r=new Zu(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 "+Yu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new cn(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new cn(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(Ft&&(o.input.url=Ft(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[ts])r=this[ts];else{let o=this.css.split(`
33
+ `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[ts]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Is(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;xs(n.source)?l=Ft(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||Ft(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(un)u.file=un(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var $r=yr;yr.default=yr;es&&es.registerInput&&es.registerInput(yr);let{SourceMapConsumer:vo,SourceMapGenerator:or}=de,{dirname:ar,relative:So,resolve:Co,sep:Eo}=de,{pathToFileURL:fn}=de,Ju=$r,Ku=!!(vo&&or),Qu=!!(ar&&Co&&So&&Eo),qu=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=`
34
34
  `;this.css.includes(`\r
35
35
  `)&&(t=`\r
36
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||nr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new bo(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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Yu&&Hu&&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=ir.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ir({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 ir({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:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
37
- `),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?nr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=nr(So(r,this.mapOpts.annotation)));let i=vo(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 ju(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(ln){let r=ln(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;Co==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Eo=Zu;let Xu=Dr,Cs=class extends Xu{constructor(e){super(e),this.type="comment"}};var kr=Cs;Cs.default=Cs;let{isClean:Io,my:xo}=It,Mo=Tr,No=kr,Ju=Dr,Ro,si,ii,Ao;function Oo(s){return s.map(e=>(e.nodes&&(e.nodes=Oo(e.nodes)),delete e.source,e))}function Do(s){if(s[Io]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Do(e)}let Ee=class To extends Ju{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"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Oo(Ro(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 Mo(e)]}else if(e.selector)e=[new si(e)];else if(e.name)e=[new ii(e)];else if(e.text)e=[new No(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[xo]||To.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Io]&&Do(i),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(o){throw t.addToError(o)}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)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ee.registerParse=s=>{Ro=s};Ee.registerRule=s=>{si=s};Ee.registerAtRule=s=>{ii=s};Ee.registerRoot=s=>{Ao=s};var Pe=Ee;Ee.default=Ee;Ee.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ii.prototype):s.type==="rule"?Object.setPrototypeOf(s,si.prototype):s.type==="decl"?Object.setPrototypeOf(s,Mo.prototype):s.type==="comment"?Object.setPrototypeOf(s,No.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ao.prototype),s[xo]=!0,s.nodes&&s.nodes.forEach(e=>{Ee.rebuild(e)})};let Ku=Pe,_o,ko,gt=class extends Ku{constructor(e){super(N({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new _o(new ko,this,e).stringify()}};gt.registerLazyResult=s=>{_o=s};gt.registerProcessor=s=>{ko=s};var ni=gt;gt.default=gt;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 $o=Es;Es.default=Es;let Qu=$o,Is=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Qu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var oi=Is;Is.default=Is;const es=39,un=34,Pt=92,cn=47,Ft=10,nt=32,Bt=12,Ut=9,Wt=13,qu=91,ec=93,tc=40,rc=41,sc=123,ic=125,nc=59,oc=42,ac=58,lc=64,Vt=/[\t\n\f\r "#'()/;[\\\]{}]/g,zt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,uc=/.[\r\n"'(/\\]/,hn=/[\da-f]/i;var cc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,m,d,p=r.length,g=0,y=[],v=[];function w(){return g}function C(S){throw e.error("Unclosed "+S,g)}function x(){return v.length===0&&g>=p}function T(S){if(v.length)return v.pop();if(g>=p)return;let R=S?S.ignoreUnclosed:!1;switch(o=r.charCodeAt(g),o){case Ft:case nt:case Ut:case Wt:case Bt:{n=g;do n+=1,o=r.charCodeAt(n);while(o===nt||o===Ft||o===Ut||o===Wt||o===Bt);d=["space",r.slice(g,n)],g=n-1;break}case qu:case ec:case sc:case ic:case ac:case nc:case rc:{let z=String.fromCharCode(o);d=[z,z,g];break}case tc:{if(f=y.length?y.pop()[1]:"",m=r.charCodeAt(g+1),f==="url"&&m!==es&&m!==un&&m!==nt&&m!==Ft&&m!==Ut&&m!==Bt&&m!==Wt){n=g;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||R){n=g;break}else C("bracket");for(h=n;r.charCodeAt(h-1)===Pt;)h-=1,c=!c}while(c);d=["brackets",r.slice(g,n+1),g,n],g=n}else n=r.indexOf(")",g+1),l=r.slice(g,n+1),n===-1||uc.test(l)?d=["(","(",g]:(d=["brackets",l,g,n],g=n);break}case es:case un:{a=o===es?"'":'"',n=g;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||R){n=g+1;break}else C("string");for(h=n;r.charCodeAt(h-1)===Pt;)h-=1,c=!c}while(c);d=["string",r.slice(g,n+1),g,n],g=n;break}case lc:{Vt.lastIndex=g+1,Vt.test(r),Vt.lastIndex===0?n=r.length-1:n=Vt.lastIndex-2,d=["at-word",r.slice(g,n+1),g,n],g=n;break}case Pt:{for(n=g,u=!0;r.charCodeAt(n+1)===Pt;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==cn&&o!==nt&&o!==Ft&&o!==Ut&&o!==Wt&&o!==Bt&&(n+=1,hn.test(r.charAt(n)))){for(;hn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===nt&&(n+=1)}d=["word",r.slice(g,n+1),g,n],g=n;break}default:{o===cn&&r.charCodeAt(g+1)===oc?(n=r.indexOf("*/",g+2)+1,n===0&&(i||R?n=r.length:C("comment")),d=["comment",r.slice(g,n+1),g,n],g=n):(zt.lastIndex=g+1,zt.test(r),zt.lastIndex===0?n=r.length-1:n=zt.lastIndex-2,d=["word",r.slice(g,n+1),g,n],y.push(d),g=n);break}}return g++,d}function P(S){v.push(S)}return{back:P,endOfFile:x,nextToken:T,position:w}};let Lo=Pe,gr=class extends Lo{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 ai=gr;gr.default=gr;Lo.registerAtRule(gr);let Po=Pe,Fo,Bo,Ke=class extends Po{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 o of i)o.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 Fo(new Bo,this,e).stringify()}};Ke.registerLazyResult=s=>{Fo=s};Ke.registerProcessor=s=>{Bo=s};var xt=Ke;Ke.default=Ke;Po.registerRoot(Ke);let yt={comma(s){return yt.split(s,[","],!0)},space(s){let e=[" ",`
38
- `," "];return yt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Uo=yt;yt.default=yt;let Wo=Pe,hc=Uo,yr=class extends Wo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return hc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var li=yr;yr.default=yr;Wo.registerRule(yr);let fc=Tr,dc=cc,pc=kr,mc=ai,gc=xt,fn=li;const dn={empty:!0,space:!0};function yc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let wc=class{constructor(e){this.input=e,this.root=new gc,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 mc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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 o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new pc;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=dc(this.input)}decl(e,t){let r=new fc;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]||yc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new fn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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 o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!dn[h]&&!dn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,d)=>m+d[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new fn;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",{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 bc=wc;let vc=Pe,Sc=bc,Cc=_r;function wr(s,e){let t=new Cc(s,e),r=new Sc(t);try{r.parse()}catch(i){throw i}return r.root}var ui=wr;wr.default=wr;vc.registerParse(wr);let{isClean:we,my:Ec}=It,Ic=Eo,xc=Or,Mc=Pe,Nc=ni;let pn=oi,Rc=ui,Ac=xt;const Oc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Dc={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},Tc={Once:!0,postcssPlugin:!0,prepare:!0},Qe=0;function ot(s){return typeof s=="object"&&typeof s.then=="function"}function Vo(s){let e=!1,t=Oc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Qe,t+"Exit"]:[t,t+"Exit"]}function mn(s){let e;return s.type==="document"?e=["Document",Qe,"DocumentExit"]:s.type==="root"?e=["Root",Qe,"RootExit"]:e=Vo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function xs(s){return s[we]=!1,s.nodes&&s.nodes.forEach(e=>xs(e)),s}let Ms={},qe=class zo{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=xs(t);else if(t instanceof zo||t instanceof pn)i=xs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Rc;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[Ec]&&Mc.rebuild(i)}this.result=new pn(e,i,r),this.helpers=ee(N({},Ms),{postcss:Ms,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?N(N({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(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(!Dc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Tc[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(ot(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];){e[we]=!0;let t=[mn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ot(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}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(o=>r(o,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 ot(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=xc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Ic(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(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];)e[we]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ot(o))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[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[we]){a[we]=!0,e.push(mn(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===Qe){r.nodes&&r.nodes.length&&(r[we]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[we]=!0;let t=Vo(e);for(let r of t)if(r===Qe)e.nodes&&e.each(i=>{i[we]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};qe.registerPostcss=s=>{Ms=s};var Go=qe;qe.default=qe;Ac.registerLazyResult(qe);Nc.registerLazyResult(qe);let _c=Eo,kc=Or;let $c=ui;const Lc=oi;let Ns=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=kc;this.result=new Lc(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new _c(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}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[]}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=$c;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Pc=Ns;Ns.default=Ns;let Fc=Pc,Bc=Go,Uc=ni,Wc=xt,wt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Fc(this,e,t):new Bc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vc=wt;wt.default=wt;Wc.registerProcessor(wt);Uc.registerProcessor(wt);let zc=Tr,Gc=wo,jc=kr,Hc=ai,Yc=_r,Zc=xt,Xc=li;function bt(s,e){if(Array.isArray(s))return s.map(n=>bt(n));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let n of t){let a=ee(N({},n),{__proto__:Yc.prototype});a.map&&(a.map=ee(N({},a.map),{__proto__:Gc.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>bt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ue(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Zc(r);if(r.type==="decl")return new zc(r);if(r.type==="rule")return new Xc(r);if(r.type==="comment")return new jc(r);if(r.type==="atrule")return new Hc(r);throw new Error("Unknown node type: "+s.type)}var Jc=bt;bt.default=bt;let Kc=ri,jo=Tr,Qc=Go,qc=Pe,ci=Vc,eh=Or,th=Jc,Ho=ni,rh=$o,Yo=kr,Zo=ai,sh=oi,ih=_r,nh=ui,oh=Uo,Xo=li,Jo=xt,ah=Dr;function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ci(s)}B.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
36
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ar(e.file),i;this.mapOpts.sourcesContent===!1?(i=new vo(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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Qu&&Ku&&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=or.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new or({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 or({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:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
37
+ `),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?ar(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ar(Co(r,this.mapOpts.annotation)));let i=So(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 Ju(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(fn){let r=fn(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;Eo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var xo=qu;let ec=_r,Ms=class extends ec{constructor(e){super(e),this.type="comment"}};var Lr=Ms;Ms.default=Ms;let{isClean:Io,my:Mo}=Mt,No=kr,Ro=Lr,tc=_r,Ao,oi,ai,Oo;function To(s){return s.map(e=>(e.nodes&&(e.nodes=To(e.nodes)),delete e.source,e))}function Do(s){if(s[Io]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Do(e)}let Ce=class _o extends tc{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"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=To(Ao(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 No(e)]}else if(e.selector)e=[new oi(e)];else if(e.name)e=[new ai(e)];else if(e.text)e=[new Ro(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Mo]||_o.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Io]&&Do(i),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(o){throw t.addToError(o)}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)}))}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]}};Ce.registerParse=s=>{Ao=s};Ce.registerRule=s=>{oi=s};Ce.registerAtRule=s=>{ai=s};Ce.registerRoot=s=>{Oo=s};var Pe=Ce;Ce.default=Ce;Ce.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ai.prototype):s.type==="rule"?Object.setPrototypeOf(s,oi.prototype):s.type==="decl"?Object.setPrototypeOf(s,No.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ro.prototype):s.type==="root"&&Object.setPrototypeOf(s,Oo.prototype),s[Mo]=!0,s.nodes&&s.nodes.forEach(e=>{Ce.rebuild(e)})};let rc=Pe,ko,$o,bt=class extends rc{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ko(new $o,this,e).stringify()}};bt.registerLazyResult=s=>{ko=s};bt.registerProcessor=s=>{$o=s};var li=bt;bt.default=bt;let Ns=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 Lo=Ns;Ns.default=Ns;let sc=Lo,Rs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new sc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ui=Rs;Rs.default=Rs;const rs=39,dn=34,Bt=92,pn=47,Ut=10,ot=32,Vt=12,Wt=9,zt=13,ic=91,nc=93,oc=40,ac=41,lc=123,uc=125,cc=59,hc=42,fc=58,dc=64,Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,pc=/.[\r\n"'(/\\]/,mn=/[\da-f]/i;var mc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,g,p,y=r.length,d=0,m=[],v=[];function S(){return d}function w(D){throw e.error("Unclosed "+D,d)}function C(){return v.length===0&&d>=y}function N(D){if(v.length)return v.pop();if(d>=y)return;let X=D?D.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Ut:case ot:case Wt:case zt:case Vt:{n=d;do n+=1,o=r.charCodeAt(n);while(o===ot||o===Ut||o===Wt||o===zt||o===Vt);p=["space",r.slice(d,n)],d=n-1;break}case ic:case nc:case lc:case uc:case fc:case cc:case ac:{let z=String.fromCharCode(o);p=[z,z,d];break}case oc:{if(f=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==rs&&g!==dn&&g!==ot&&g!==Ut&&g!==Wt&&g!==Vt&&g!==zt){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||X){n=d;break}else w("bracket");for(h=n;r.charCodeAt(h-1)===Bt;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||pc.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case rs:case dn:{a=o===rs?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||X){n=d+1;break}else w("string");for(h=n;r.charCodeAt(h-1)===Bt;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case dc:{Gt.lastIndex=d+1,Gt.test(r),Gt.lastIndex===0?n=r.length-1:n=Gt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Bt:{for(n=d,u=!0;r.charCodeAt(n+1)===Bt;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==pn&&o!==ot&&o!==Ut&&o!==Wt&&o!==zt&&o!==Vt&&(n+=1,mn.test(r.charAt(n)))){for(;mn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===ot&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===pn&&r.charCodeAt(d+1)===hc?(n=r.indexOf("*/",d+2)+1,n===0&&(i||X?n=r.length:w("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(jt.lastIndex=d+1,jt.test(r),jt.lastIndex===0?n=r.length-1:n=jt.lastIndex-2,p=["word",r.slice(d,n+1),d,n],m.push(p),d=n);break}}return d++,p}function T(D){v.push(D)}return{back:T,endOfFile:C,nextToken:N,position:S}};let Po=Pe,br=class extends Po{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 ci=br;br.default=br;Po.registerAtRule(br);let Fo=Pe,Bo,Uo,Qe=class extends Fo{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 o of i)o.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 Bo(new Uo,this,e).stringify()}};Qe.registerLazyResult=s=>{Bo=s};Qe.registerProcessor=s=>{Uo=s};var Nt=Qe;Qe.default=Qe;Fo.registerRoot(Qe);let wt={comma(s){return wt.split(s,[","],!0)},space(s){let e=[" ",`
38
+ `," "];return wt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Vo=wt;wt.default=wt;let Wo=Pe,gc=Vo,wr=class extends Wo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return gc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var hi=wr;wr.default=wr;Wo.registerRule(wr);let yc=kr,bc=mc,wc=Lr,vc=ci,Sc=Nt,gn=hi;const yn={empty:!0,space:!0};function Cc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Ec=class{constructor(e){this.input=e,this.root=new Sc,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 vc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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 o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new wc;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=bc(this.input)}decl(e,t){let r=new yc;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]||Cc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new gn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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 o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!yn[h]&&!yn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new gn;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",{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 xc=Ec;let Ic=Pe,Mc=xc,Nc=$r;function vr(s,e){let t=new Nc(s,e),r=new Mc(t);try{r.parse()}catch(i){throw i}return r.root}var fi=vr;vr.default=vr;Ic.registerParse(vr);let{isClean:ye,my:Rc}=Mt,Ac=xo,Oc=Dr,Tc=Pe,Dc=li;let bn=ui,_c=fi,kc=Nt;const $c={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Lc={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},Pc={Once:!0,postcssPlugin:!0,prepare:!0},qe=0;function at(s){return typeof s=="object"&&typeof s.then=="function"}function zo(s){let e=!1,t=$c[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,qe,t+"Exit"]:[t,t+"Exit"]}function wn(s){let e;return s.type==="document"?e=["Document",qe,"DocumentExit"]:s.type==="root"?e=["Root",qe,"RootExit"]:e=zo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function As(s){return s[ye]=!1,s.nodes&&s.nodes.forEach(e=>As(e)),s}let Os={},et=class Go{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=As(t);else if(t instanceof Go||t instanceof bn)i=As(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=_c;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[Rc]&&Tc.rebuild(i)}this.result=new bn(e,i,r),this.helpers=Q(M({},Os),{postcss:Os,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(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(!Lc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Pc[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(at(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ye];){e[ye]=!0;let t=[wn(e)];for(;t.length>0;){let r=this.visitTick(t);if(at(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}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(o=>r(o,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 at(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=Oc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Ac(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(at(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ye];)e[ye]=!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 o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(at(o))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[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[ye]){a[ye]=!0,e.push(wn(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===qe){r.nodes&&r.nodes.length&&(r[ye]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ye]=!0;let t=zo(e);for(let r of t)if(r===qe)e.nodes&&e.each(i=>{i[ye]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};et.registerPostcss=s=>{Os=s};var jo=et;et.default=et;kc.registerLazyResult(et);Dc.registerLazyResult(et);let Fc=xo,Bc=Dr;let Uc=fi;const Vc=ui;let Ts=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=Bc;this.result=new Vc(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Fc(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}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[]}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=Uc;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Wc=Ts;Ts.default=Ts;let zc=Wc,Gc=jo,jc=li,Hc=Nt,vt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new zc(this,e,t):new Gc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yc=vt;vt.default=vt;Hc.registerProcessor(vt);jc.registerProcessor(vt);let Zc=kr,Xc=wo,Jc=Lr,Kc=ci,Qc=$r,qc=Nt,eh=hi;function St(s,e){if(Array.isArray(s))return s.map(n=>St(n));let i=s,{inputs:t}=i,r=Ve(i,["inputs"]);if(t){e=[];for(let n of t){let a=Q(M({},n),{__proto__:Qc.prototype});a.map&&(a.map=Q(M({},a.map),{__proto__:Xc.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>St(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ve(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new qc(r);if(r.type==="decl")return new Zc(r);if(r.type==="rule")return new eh(r);if(r.type==="comment")return new Jc(r);if(r.type==="atrule")return new Kc(r);throw new Error("Unknown node type: "+s.type)}var th=St;St.default=St;let rh=ni,Ho=kr,sh=jo,ih=Pe,di=Yc,nh=Dr,oh=th,Yo=li,ah=Lo,Zo=Lr,Xo=ci,lh=ui,uh=$r,ch=fi,hh=Vo,Jo=hi,Ko=Nt,fh=_r;function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new di(s)}B.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
39
39
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
40
- https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new ci().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return B([i(l)]).process(n,a)},i};B.stringify=eh;B.parse=nh;B.fromJSON=th;B.list=oh;B.comment=s=>new Yo(s);B.atRule=s=>new Zo(s);B.decl=s=>new jo(s);B.rule=s=>new Xo(s);B.root=s=>new Jo(s);B.document=s=>new Ho(s);B.CssSyntaxError=Kc;B.Declaration=jo;B.Container=qc;B.Processor=ci;B.Document=Ho;B.Comment=Yo;B.Warning=rh;B.AtRule=Zo;B.Result=sh;B.Input=ih;B.Rule=Xo;B.Root=Jo;B.Node=ah;Qc.registerPostcss(B);var lh=B;B.default=B;const H=vu(lh);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;const gn={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function uh(s){let e=gn[s.tagName]?gn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function $r(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=H([wu,bu]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function yn(){return{stylesWithHoverClass:new Map}}function ch(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===A.Text&&i.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=$r(o.join(""),r));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){const u=i[l];if(!t)u.textContent=o[l];else if(l<o.length-1){let c=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const m=o[l+1].substring(0,h),d=n.substring(a).indexOf(m);if(f=d!==-1,f){c+=d;break}}f||(c+=o[l].length),u.textContent=n.substring(a,c),a=c}else u.textContent=n.substring(a)}}function hh(s,e,t,r){const{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?ch(s,t,o,n):(o&&(t=$r(t,n)),e.appendChild(i.createTextNode(t)))}function fh(s,e){var t;const{doc:r,hackCss:i,cache:o}=e;switch(s.type){case A.Document:return r.implementation.createDocument(null,"",null);case A.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case A.Element:{const n=uh(s);let a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));const l={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){hh(s,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(n==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else n==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||n==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Qs(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(n==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(n==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case A.Text:return s.isStyle&&i?r.createTextNode($r(s.textContent,o)):r.createTextNode(s.textContent);case A.CDATA:return r.createCDATASection(s.textContent);case A.Comment:return r.createComment(s.textContent);default:return null}}function dt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(Fl(c,s))return r.getNode(s.id)}let l=fh(s,{doc:t,hackCss:o,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===A.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==A.DocumentType&&(s.childNodes[0].type===A.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===A.Document||s.type===A.Element)&&!i)for(const u of s.childNodes){const c=dt(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Js(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===A.Document&&u.type==A.Element){const h=c;let f=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(f=m)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);n&&n(c,u.id)}return l}function dh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function ph(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==A.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}function mh(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new Ks}=e,l=dt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return dh(a,u=>{r&&r(u),ph(u,a)}),l}var gh=Object.defineProperty,yh=(s,e,t)=>e in s?gh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,E=(s,e,t)=>yh(s,typeof e!="symbol"?e+"":e,t),wh=Object.defineProperty,bh=(s,e,t)=>e in s?wh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,wn=(s,e,t)=>bh(s,typeof e!="symbol"?e+"":e,t);let vh=class{constructor(){wn(this,"idNodeMap",new Map),wn(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 Sh(){return new vh}const Ch=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Eh=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ko=new WeakSet,Ih=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Ih.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Ch.includes(r)&&Ko.add(this)}};const xh=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){xh.call(this,s,e,t)};function bn(){document.querySelectorAll("*").forEach(e=>{Eh.forEach(t=>{e.hasAttribute(t)&&Ko.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?bn():document.addEventListener("DOMContentLoaded",bn);function Mh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Nh(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 hi={exports:{}},j=String,Qo=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};hi.exports=Qo();hi.exports.createColors=Qo;var Rh=hi.exports;const Ah={},Oh=Object.freeze(Object.defineProperty({__proto__:null,default:Ah},Symbol.toStringTag,{value:"Module"})),pe=Nh(Oh);let vn=Rh,Sn=pe,Rs=class qo extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),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,qo)}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=vn.isColorSupported),Sn&&e&&(t=Sn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=vn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
41
- `+m+a("^")}return" "+l(f)+u}).join(`
40
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new di().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return B([i(l)]).process(n,a)},i};B.stringify=nh;B.parse=ch;B.fromJSON=oh;B.list=hh;B.comment=s=>new Zo(s);B.atRule=s=>new Xo(s);B.decl=s=>new Ho(s);B.rule=s=>new Jo(s);B.root=s=>new Ko(s);B.document=s=>new Yo(s);B.CssSyntaxError=rh;B.Declaration=Ho;B.Container=ih;B.Processor=di;B.Document=Yo;B.Comment=Zo;B.Warning=ah;B.AtRule=Xo;B.Result=lh;B.Input=uh;B.Rule=Jo;B.Root=Ko;B.Node=fh;sh.registerPostcss(B);var dh=B;B.default=B;const H=Iu(dh);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;const vn={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ph(s){let e=vn[s.tagName]?vn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function Pr(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=H([Eu,xu]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function Sn(){return{stylesWithHoverClass:new Map}}function mh(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===A.Text&&i.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=Pr(o.join(""),r));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){const u=i[l];if(!t)u.textContent=o[l];else if(l<o.length-1){let c=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const g=o[l+1].substring(0,h),p=n.substring(a).indexOf(g);if(f=p!==-1,f){c+=p;break}}f||(c+=o[l].length),u.textContent=n.substring(a,c),a=c}else u.textContent=n.substring(a)}}function gh(s,e,t,r){const{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?mh(s,t,o,n):(o&&(t=Pr(t,n)),e.appendChild(i.createTextNode(t)))}function yh(s,e){var t;const{doc:r,hackCss:i,cache:o}=e;switch(s.type){case A.Document:return r.implementation.createDocument(null,"",null);case A.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case A.Element:{const n=ph(s);let a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));const l={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){gh(s,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(n==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else n==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||n==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&ei(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(n==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(n==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case A.Text:return s.isStyle&&i?r.createTextNode(Pr(s.textContent,o)):r.createTextNode(s.textContent);case A.CDATA:return r.createCDATASection(s.textContent);case A.Comment:return r.createComment(s.textContent);default:return null}}function mt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(Wl(c,s))return r.getNode(s.id)}let l=yh(s,{doc:t,hackCss:o,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===A.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==A.DocumentType&&(s.childNodes[0].type===A.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===A.Document||s.type===A.Element)&&!i)for(const u of s.childNodes){const c=mt(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ft(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===A.Document&&u.type==A.Element){const h=c;let f=null;h.childNodes.forEach(g=>{g.nodeName==="BODY"&&(f=g)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);n&&n(c,u.id)}return l}function bh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function wh(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==A.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}function vh(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new qs}=e,l=mt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return bh(a,u=>{r&&r(u),wh(u,a)}),l}var Sh=Object.defineProperty,Ch=(s,e,t)=>e in s?Sh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,x=(s,e,t)=>Ch(s,typeof e!="symbol"?e+"":e,t),Eh=Object.defineProperty,xh=(s,e,t)=>e in s?Eh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Cn=(s,e,t)=>xh(s,typeof e!="symbol"?e+"":e,t);let Ih=class{constructor(){Cn(this,"idNodeMap",new Map),Cn(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 Mh(){return new Ih}const Nh=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Rh=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Qo=new WeakSet,Ah=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Ah.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Nh.includes(r)&&Qo.add(this)}};const Oh=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Oh.call(this,s,e,t)};function En(){document.querySelectorAll("*").forEach(e=>{Rh.forEach(t=>{e.hasAttribute(t)&&Qo.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?En():document.addEventListener("DOMContentLoaded",En);function Th(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Dh(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 pi={exports:{}},j=String,qo=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};pi.exports=qo();pi.exports.createColors=qo;var _h=pi.exports;const kh={},$h=Object.freeze(Object.defineProperty({__proto__:null,default:kh},Symbol.toStringTag,{value:"Module"})),pe=Dh($h);let xn=_h,In=pe,Ds=class ea extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),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,ea)}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=xn.isColorSupported),In&&e&&(t=In(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=xn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
41
+ `+g+a("^")}return" "+l(f)+u}).join(`
42
42
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
43
43
 
44
44
  `+e+`
45
- `),this.name+": "+this.message+e}};var fi=Rs;Rs.default=Rs;var Mt={};Mt.isClean=Symbol("isClean");Mt.my=Symbol("my");const Cn={after:`
45
+ `),this.name+": "+this.message+e}};var mi=Ds;Ds.default=Ds;var Rt={};Rt.isClean=Symbol("isClean");Rt.my=Symbol("my");const Mn={after:`
46
46
  `,beforeClose:`
47
47
  `,beforeComment:`
48
48
  `,beforeDecl:`
49
49
  `,beforeOpen:" ",beforeRule:`
50
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Dh(s){return s[0].toUpperCase()+s.slice(1)}let As=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 o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,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,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
51
- `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}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 o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,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 o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Cn[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Dh(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Cn[r]),n.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(`
50
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Lh(s){return s[0].toUpperCase()+s.slice(1)}let _s=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 o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,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,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
51
+ `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}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 o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,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 o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Mn[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Lh(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Mn[r]),n.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(`
52
52
  `)&&(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(`
53
53
  `)&&(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(`
54
54
  `)&&(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(`
55
55
  `)&&(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 o=r.raws.before.split(`
56
- `);return t=o[o.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 ea=As;As.default=As;let Th=ea;function Os(s,e){new Th(e).stringify(s)}var Lr=Os;Os.default=Os;let{isClean:Gt,my:_h}=Mt,kh=fi,$h=ea,Lh=Lr;function Ds(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],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>Ds(n,t)):(o==="object"&&i!==null&&(i=Ds(i)),t[r]=i)}return t}let Ts=class{constructor(e={}){this.raws={},this[Gt]=!1,this[_h]=!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=Ds(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 kh(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Gt]){this[Gt]=!1;let e=this;for(;e=e.parent;)e[Gt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
57
- `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new $h().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 o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Lh){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var Pr=Ts;Ts.default=Ts;let Ph=Pr,_s=class extends Ph{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(N({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Fr=_s;_s.default=_s;let Fh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Bh=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Uh=(s=21)=>{let e="",t=s;for(;t--;)e+=Fh[Math.random()*64|0];return e};var Wh={nanoid:Uh,customAlphabet:Bh};let{SourceMapConsumer:En,SourceMapGenerator:In}=pe,{existsSync:Vh,readFileSync:zh}=pe,{dirname:ts,join:Gh}=pe;function jh(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ks=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=ts(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new En(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,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return jh(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=ts(e),Vh(e))return this.mapFile=e,zh(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 En)return In.fromSourceMap(t).toString();if(t instanceof In)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=Gh(ts(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 ta=ks;ks.default=ks;let{SourceMapConsumer:Hh,SourceMapGenerator:Yh}=pe,{fileURLToPath:xn,pathToFileURL:jt}=pe,{isAbsolute:$s,resolve:Ls}=pe,{nanoid:Zh}=Wh,rs=pe,Mn=fi,Xh=ta,ss=Symbol("fromOffsetCache"),Jh=!!(Hh&&Yh),Nn=!!(Ls&&$s),br=class{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,t.from&&(!Nn||/^\w+:\/\//.test(t.from)||$s(t.from)?this.file=t.from:this.file=Ls(t.from)),Nn&&Jh){let r=new Xh(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 "+Zh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new Mn(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new Mn(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(jt&&(o.input.url=jt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[ss])r=this[ss];else{let o=this.css.split(`
58
- `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[ss]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ls(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;$s(n.source)?l=jt(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||jt(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(xn)u.file=xn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=N({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Br=br;br.default=br;rs&&rs.registerInput&&rs.registerInput(br);let{SourceMapConsumer:ra,SourceMapGenerator:or}=pe,{dirname:ar,relative:sa,resolve:ia,sep:na}=pe,{pathToFileURL:Rn}=pe,Kh=Br,Qh=!!(ra&&or),qh=!!(ar&&ia&&sa&&na),ef=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=`
56
+ `);return t=o[o.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 ta=_s;_s.default=_s;let Ph=ta;function ks(s,e){new Ph(e).stringify(s)}var Fr=ks;ks.default=ks;let{isClean:Ht,my:Fh}=Rt,Bh=mi,Uh=ta,Vh=Fr;function $s(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],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>$s(n,t)):(o==="object"&&i!==null&&(i=$s(i)),t[r]=i)}return t}let Ls=class{constructor(e={}){this.raws={},this[Ht]=!1,this[Fh]=!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=$s(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 Bh(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ht]){this[Ht]=!1;let e=this;for(;e=e.parent;)e[Ht]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
57
+ `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Uh().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 o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Vh){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var Br=Ls;Ls.default=Ls;let Wh=Br,Ps=class extends Wh{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=Q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ur=Ps;Ps.default=Ps;let zh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Gh=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},jh=(s=21)=>{let e="",t=s;for(;t--;)e+=zh[Math.random()*64|0];return e};var Hh={nanoid:jh,customAlphabet:Gh};let{SourceMapConsumer:Nn,SourceMapGenerator:Rn}=pe,{existsSync:Yh,readFileSync:Zh}=pe,{dirname:ss,join:Xh}=pe;function Jh(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=ss(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Nn(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,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Jh(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=ss(e),Yh(e))return this.mapFile=e,Zh(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 Nn)return Rn.fromSourceMap(t).toString();if(t instanceof Rn)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=Xh(ss(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 ra=Fs;Fs.default=Fs;let{SourceMapConsumer:Kh,SourceMapGenerator:Qh}=pe,{fileURLToPath:An,pathToFileURL:Yt}=pe,{isAbsolute:Bs,resolve:Us}=pe,{nanoid:qh}=Hh,is=pe,On=mi,ef=ra,ns=Symbol("fromOffsetCache"),tf=!!(Kh&&Qh),Tn=!!(Us&&Bs),Sr=class{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,t.from&&(!Tn||/^\w+:\/\//.test(t.from)||Bs(t.from)?this.file=t.from:this.file=Us(t.from)),Tn&&tf){let r=new ef(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 "+qh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new On(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new On(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(Yt&&(o.input.url=Yt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[ns])r=this[ns];else{let o=this.css.split(`
58
+ `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[ns]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Us(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;Bs(n.source)?l=Yt(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||Yt(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(An)u.file=An(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Vr=Sr;Sr.default=Sr;is&&is.registerInput&&is.registerInput(Sr);let{SourceMapConsumer:sa,SourceMapGenerator:lr}=pe,{dirname:ur,relative:ia,resolve:na,sep:oa}=pe,{pathToFileURL:Dn}=pe,rf=Vr,sf=!!(sa&&lr),nf=!!(ur&&na&&ia&&oa),of=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=`
59
59
  `;this.css.includes(`\r
60
60
  `)&&(t=`\r
61
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ar(e.file),i;this.mapOpts.sourcesContent===!1?(i=new ra(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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),qh&&Qh&&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=or.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new or({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 or({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:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
62
- `),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?ar(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ar(ia(r,this.mapOpts.annotation)));let i=sa(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 Kh(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(Rn){let r=Rn(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;na==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var oa=ef;let tf=Pr,Ps=class extends tf{constructor(e){super(e),this.type="comment"}};var Ur=Ps;Ps.default=Ps;let{isClean:aa,my:la}=Mt,ua=Fr,ca=Ur,rf=Pr,ha,di,pi,fa;function da(s){return s.map(e=>(e.nodes&&(e.nodes=da(e.nodes)),delete e.source,e))}function pa(s){if(s[aa]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)pa(e)}let Ie=class ma extends rf{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"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=da(ha(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 ua(e)]}else if(e.selector)e=[new di(e)];else if(e.name)e=[new pi(e)];else if(e.text)e=[new ca(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[la]||ma.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[aa]&&pa(i),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(o){throw t.addToError(o)}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)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ie.registerParse=s=>{ha=s};Ie.registerRule=s=>{di=s};Ie.registerAtRule=s=>{pi=s};Ie.registerRoot=s=>{fa=s};var Fe=Ie;Ie.default=Ie;Ie.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,pi.prototype):s.type==="rule"?Object.setPrototypeOf(s,di.prototype):s.type==="decl"?Object.setPrototypeOf(s,ua.prototype):s.type==="comment"?Object.setPrototypeOf(s,ca.prototype):s.type==="root"&&Object.setPrototypeOf(s,fa.prototype),s[la]=!0,s.nodes&&s.nodes.forEach(e=>{Ie.rebuild(e)})};let sf=Fe,ga,ya,vt=class extends sf{constructor(e){super(N({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ga(new ya,this,e).stringify()}};vt.registerLazyResult=s=>{ga=s};vt.registerProcessor=s=>{ya=s};var mi=vt;vt.default=vt;let Fs=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 wa=Fs;Fs.default=Fs;let nf=wa,Bs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new nf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var gi=Bs;Bs.default=Bs;const is=39,An=34,Ht=92,On=47,Yt=10,at=32,Zt=12,Xt=9,Jt=13,of=91,af=93,lf=40,uf=41,cf=123,hf=125,ff=59,df=42,pf=58,mf=64,Kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gf=/.[\r\n"'(/\\]/,Dn=/[\da-f]/i;var yf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,m,d,p=r.length,g=0,y=[],v=[];function w(){return g}function C(S){throw e.error("Unclosed "+S,g)}function x(){return v.length===0&&g>=p}function T(S){if(v.length)return v.pop();if(g>=p)return;let R=S?S.ignoreUnclosed:!1;switch(o=r.charCodeAt(g),o){case Yt:case at:case Xt:case Jt:case Zt:{n=g;do n+=1,o=r.charCodeAt(n);while(o===at||o===Yt||o===Xt||o===Jt||o===Zt);d=["space",r.slice(g,n)],g=n-1;break}case of:case af:case cf:case hf:case pf:case ff:case uf:{let z=String.fromCharCode(o);d=[z,z,g];break}case lf:{if(f=y.length?y.pop()[1]:"",m=r.charCodeAt(g+1),f==="url"&&m!==is&&m!==An&&m!==at&&m!==Yt&&m!==Xt&&m!==Zt&&m!==Jt){n=g;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||R){n=g;break}else C("bracket");for(h=n;r.charCodeAt(h-1)===Ht;)h-=1,c=!c}while(c);d=["brackets",r.slice(g,n+1),g,n],g=n}else n=r.indexOf(")",g+1),l=r.slice(g,n+1),n===-1||gf.test(l)?d=["(","(",g]:(d=["brackets",l,g,n],g=n);break}case is:case An:{a=o===is?"'":'"',n=g;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||R){n=g+1;break}else C("string");for(h=n;r.charCodeAt(h-1)===Ht;)h-=1,c=!c}while(c);d=["string",r.slice(g,n+1),g,n],g=n;break}case mf:{Kt.lastIndex=g+1,Kt.test(r),Kt.lastIndex===0?n=r.length-1:n=Kt.lastIndex-2,d=["at-word",r.slice(g,n+1),g,n],g=n;break}case Ht:{for(n=g,u=!0;r.charCodeAt(n+1)===Ht;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==On&&o!==at&&o!==Yt&&o!==Xt&&o!==Jt&&o!==Zt&&(n+=1,Dn.test(r.charAt(n)))){for(;Dn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===at&&(n+=1)}d=["word",r.slice(g,n+1),g,n],g=n;break}default:{o===On&&r.charCodeAt(g+1)===df?(n=r.indexOf("*/",g+2)+1,n===0&&(i||R?n=r.length:C("comment")),d=["comment",r.slice(g,n+1),g,n],g=n):(Qt.lastIndex=g+1,Qt.test(r),Qt.lastIndex===0?n=r.length-1:n=Qt.lastIndex-2,d=["word",r.slice(g,n+1),g,n],y.push(d),g=n);break}}return g++,d}function P(S){v.push(S)}return{back:P,endOfFile:x,nextToken:T,position:w}};let ba=Fe,vr=class extends ba{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 yi=vr;vr.default=vr;ba.registerAtRule(vr);let va=Fe,Sa,Ca,et=class extends va{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 o of i)o.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 Sa(new Ca,this,e).stringify()}};et.registerLazyResult=s=>{Sa=s};et.registerProcessor=s=>{Ca=s};var Nt=et;et.default=et;va.registerRoot(et);let St={comma(s){return St.split(s,[","],!0)},space(s){let e=[" ",`
63
- `," "];return St.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Ea=St;St.default=St;let Ia=Fe,wf=Ea,Sr=class extends Ia{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return wf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var wi=Sr;Sr.default=Sr;Ia.registerRule(Sr);let bf=Fr,vf=yf,Sf=Ur,Cf=yi,Ef=Nt,Tn=wi;const _n={empty:!0,space:!0};function If(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let xf=class{constructor(e){this.input=e,this.root=new Ef,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 Cf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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 o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new Sf;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=vf(this.input)}decl(e,t){let r=new bf;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]||If(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Tn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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 o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!_n[h]&&!_n[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,d)=>m+d[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Tn;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",{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 Mf=xf;let Nf=Fe,Rf=Mf,Af=Br;function Cr(s,e){let t=new Af(s,e),r=new Rf(t);try{r.parse()}catch(i){throw i}return r.root}var bi=Cr;Cr.default=Cr;Nf.registerParse(Cr);let{isClean:be,my:Of}=Mt,Df=oa,Tf=Lr,_f=Fe,kf=mi;let kn=gi,$f=bi,Lf=Nt;const Pf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ff={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},Bf={Once:!0,postcssPlugin:!0,prepare:!0},tt=0;function lt(s){return typeof s=="object"&&typeof s.then=="function"}function xa(s){let e=!1,t=Pf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,tt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,tt,t+"Exit"]:[t,t+"Exit"]}function $n(s){let e;return s.type==="document"?e=["Document",tt,"DocumentExit"]:s.type==="root"?e=["Root",tt,"RootExit"]:e=xa(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Us(s){return s[be]=!1,s.nodes&&s.nodes.forEach(e=>Us(e)),s}let Ws={},rt=class Ma{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=Us(t);else if(t instanceof Ma||t instanceof kn)i=Us(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=$f;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[Of]&&_f.rebuild(i)}this.result=new kn(e,i,r),this.helpers=ee(N({},Ws),{postcss:Ws,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?N(N({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(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(!Ff[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Bf[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(lt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];){e[be]=!0;let t=[$n(e)];for(;t.length>0;){let r=this.visitTick(t);if(lt(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}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(o=>r(o,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 lt(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=Tf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Df(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(lt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];)e[be]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(lt(o))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[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[be]){a[be]=!0,e.push($n(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===tt){r.nodes&&r.nodes.length&&(r[be]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[be]=!0;let t=xa(e);for(let r of t)if(r===tt)e.nodes&&e.each(i=>{i[be]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};rt.registerPostcss=s=>{Ws=s};var Na=rt;rt.default=rt;Lf.registerLazyResult(rt);kf.registerLazyResult(rt);let Uf=oa,Wf=Lr;let Vf=bi;const zf=gi;let Vs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=Wf;this.result=new zf(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Uf(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}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[]}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=Vf;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Gf=Vs;Vs.default=Vs;let jf=Gf,Hf=Na,Yf=mi,Zf=Nt,Ct=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new jf(this,e,t):new Hf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Xf=Ct;Ct.default=Ct;Zf.registerProcessor(Ct);Yf.registerProcessor(Ct);let Jf=Fr,Kf=ta,Qf=Ur,qf=yi,ed=Br,td=Nt,rd=wi;function Et(s,e){if(Array.isArray(s))return s.map(n=>Et(n));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let n of t){let a=ee(N({},n),{__proto__:ed.prototype});a.map&&(a.map=ee(N({},a.map),{__proto__:Kf.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>Et(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ue(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new td(r);if(r.type==="decl")return new Jf(r);if(r.type==="rule")return new rd(r);if(r.type==="comment")return new Qf(r);if(r.type==="atrule")return new qf(r);throw new Error("Unknown node type: "+s.type)}var sd=Et;Et.default=Et;let id=fi,Ra=Fr,nd=Na,od=Fe,vi=Xf,ad=Lr,ld=sd,Aa=mi,ud=wa,Oa=Ur,Da=yi,cd=gi,hd=Br,fd=bi,dd=Ea,Ta=wi,_a=Nt,pd=Pr;function U(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new vi(s)}U.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
61
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ur(e.file),i;this.mapOpts.sourcesContent===!1?(i=new sa(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.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),nf&&sf&&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=lr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new lr({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 lr({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:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
62
+ `),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?ur(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ur(na(r,this.mapOpts.annotation)));let i=ia(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 rf(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(Dn){let r=Dn(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;oa==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var aa=of;let af=Br,Vs=class extends af{constructor(e){super(e),this.type="comment"}};var Wr=Vs;Vs.default=Vs;let{isClean:la,my:ua}=Rt,ca=Ur,ha=Wr,lf=Br,fa,gi,yi,da;function pa(s){return s.map(e=>(e.nodes&&(e.nodes=pa(e.nodes)),delete e.source,e))}function ma(s){if(s[la]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ma(e)}let Ee=class ga extends lf{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"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=pa(fa(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 ca(e)]}else if(e.selector)e=[new gi(e)];else if(e.name)e=[new yi(e)];else if(e.text)e=[new ha(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ua]||ga.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[la]&&ma(i),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(o){throw t.addToError(o)}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)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ee.registerParse=s=>{fa=s};Ee.registerRule=s=>{gi=s};Ee.registerAtRule=s=>{yi=s};Ee.registerRoot=s=>{da=s};var Fe=Ee;Ee.default=Ee;Ee.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,yi.prototype):s.type==="rule"?Object.setPrototypeOf(s,gi.prototype):s.type==="decl"?Object.setPrototypeOf(s,ca.prototype):s.type==="comment"?Object.setPrototypeOf(s,ha.prototype):s.type==="root"&&Object.setPrototypeOf(s,da.prototype),s[ua]=!0,s.nodes&&s.nodes.forEach(e=>{Ee.rebuild(e)})};let uf=Fe,ya,ba,Ct=class extends uf{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ya(new ba,this,e).stringify()}};Ct.registerLazyResult=s=>{ya=s};Ct.registerProcessor=s=>{ba=s};var bi=Ct;Ct.default=Ct;let Ws=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 wa=Ws;Ws.default=Ws;let cf=wa,zs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new cf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var wi=zs;zs.default=zs;const os=39,_n=34,Zt=92,kn=47,Xt=10,lt=32,Jt=12,Kt=9,Qt=13,hf=91,ff=93,df=40,pf=41,mf=123,gf=125,yf=59,bf=42,wf=58,vf=64,qt=/[\t\n\f\r "#'()/;[\\\]{}]/g,er=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Sf=/.[\r\n"'(/\\]/,$n=/[\da-f]/i;var Cf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,g,p,y=r.length,d=0,m=[],v=[];function S(){return d}function w(D){throw e.error("Unclosed "+D,d)}function C(){return v.length===0&&d>=y}function N(D){if(v.length)return v.pop();if(d>=y)return;let X=D?D.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Xt:case lt:case Kt:case Qt:case Jt:{n=d;do n+=1,o=r.charCodeAt(n);while(o===lt||o===Xt||o===Kt||o===Qt||o===Jt);p=["space",r.slice(d,n)],d=n-1;break}case hf:case ff:case mf:case gf:case wf:case yf:case pf:{let z=String.fromCharCode(o);p=[z,z,d];break}case df:{if(f=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==os&&g!==_n&&g!==lt&&g!==Xt&&g!==Kt&&g!==Jt&&g!==Qt){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||X){n=d;break}else w("bracket");for(h=n;r.charCodeAt(h-1)===Zt;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||Sf.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case os:case _n:{a=o===os?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||X){n=d+1;break}else w("string");for(h=n;r.charCodeAt(h-1)===Zt;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case vf:{qt.lastIndex=d+1,qt.test(r),qt.lastIndex===0?n=r.length-1:n=qt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Zt:{for(n=d,u=!0;r.charCodeAt(n+1)===Zt;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==kn&&o!==lt&&o!==Xt&&o!==Kt&&o!==Qt&&o!==Jt&&(n+=1,$n.test(r.charAt(n)))){for(;$n.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===lt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===kn&&r.charCodeAt(d+1)===bf?(n=r.indexOf("*/",d+2)+1,n===0&&(i||X?n=r.length:w("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(er.lastIndex=d+1,er.test(r),er.lastIndex===0?n=r.length-1:n=er.lastIndex-2,p=["word",r.slice(d,n+1),d,n],m.push(p),d=n);break}}return d++,p}function T(D){v.push(D)}return{back:T,endOfFile:C,nextToken:N,position:S}};let va=Fe,Cr=class extends va{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 vi=Cr;Cr.default=Cr;va.registerAtRule(Cr);let Sa=Fe,Ca,Ea,tt=class extends Sa{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 o of i)o.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 Ca(new Ea,this,e).stringify()}};tt.registerLazyResult=s=>{Ca=s};tt.registerProcessor=s=>{Ea=s};var At=tt;tt.default=tt;Sa.registerRoot(tt);let Et={comma(s){return Et.split(s,[","],!0)},space(s){let e=[" ",`
63
+ `," "];return Et.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var xa=Et;Et.default=Et;let Ia=Fe,Ef=xa,Er=class extends Ia{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ef.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Si=Er;Er.default=Er;Ia.registerRule(Er);let xf=Ur,If=Cf,Mf=Wr,Nf=vi,Rf=At,Ln=Si;const Pn={empty:!0,space:!0};function Af(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Of=class{constructor(e){this.input=e,this.root=new Rf,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 Nf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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 o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new Mf;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=If(this.input)}decl(e,t){let r=new xf;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]||Af(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Ln;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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 o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Pn[h]&&!Pn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Ln;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",{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 Tf=Of;let Df=Fe,_f=Tf,kf=Vr;function xr(s,e){let t=new kf(s,e),r=new _f(t);try{r.parse()}catch(i){throw i}return r.root}var Ci=xr;xr.default=xr;Df.registerParse(xr);let{isClean:be,my:$f}=Rt,Lf=aa,Pf=Fr,Ff=Fe,Bf=bi;let Fn=wi,Uf=Ci,Vf=At;const Wf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zf={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},Gf={Once:!0,postcssPlugin:!0,prepare:!0},rt=0;function ut(s){return typeof s=="object"&&typeof s.then=="function"}function Ma(s){let e=!1,t=Wf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,rt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,rt,t+"Exit"]:[t,t+"Exit"]}function Bn(s){let e;return s.type==="document"?e=["Document",rt,"DocumentExit"]:s.type==="root"?e=["Root",rt,"RootExit"]:e=Ma(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Gs(s){return s[be]=!1,s.nodes&&s.nodes.forEach(e=>Gs(e)),s}let js={},st=class Na{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=Gs(t);else if(t instanceof Na||t instanceof Fn)i=Gs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Uf;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[$f]&&Ff.rebuild(i)}this.result=new Fn(e,i,r),this.helpers=Q(M({},js),{postcss:js,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(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(!zf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Gf[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(ut(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];){e[be]=!0;let t=[Bn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ut(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}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(o=>r(o,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 ut(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=Pf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Lf(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(ut(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];)e[be]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ut(o))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[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[be]){a[be]=!0,e.push(Bn(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===rt){r.nodes&&r.nodes.length&&(r[be]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[be]=!0;let t=Ma(e);for(let r of t)if(r===rt)e.nodes&&e.each(i=>{i[be]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};st.registerPostcss=s=>{js=s};var Ra=st;st.default=st;Vf.registerLazyResult(st);Bf.registerLazyResult(st);let jf=aa,Hf=Fr;let Yf=Ci;const Zf=wi;let Hs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=Hf;this.result=new Zf(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new jf(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}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[]}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=Yf;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Xf=Hs;Hs.default=Hs;let Jf=Xf,Kf=Ra,Qf=bi,qf=At,xt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Jf(this,e,t):new Kf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ed=xt;xt.default=xt;qf.registerProcessor(xt);Qf.registerProcessor(xt);let td=Ur,rd=ra,sd=Wr,id=vi,nd=Vr,od=At,ad=Si;function It(s,e){if(Array.isArray(s))return s.map(n=>It(n));let i=s,{inputs:t}=i,r=Ve(i,["inputs"]);if(t){e=[];for(let n of t){let a=Q(M({},n),{__proto__:nd.prototype});a.map&&(a.map=Q(M({},a.map),{__proto__:rd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>It(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ve(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new od(r);if(r.type==="decl")return new td(r);if(r.type==="rule")return new ad(r);if(r.type==="comment")return new sd(r);if(r.type==="atrule")return new id(r);throw new Error("Unknown node type: "+s.type)}var ld=It;It.default=It;let ud=mi,Aa=Ur,cd=Ra,hd=Fe,Ei=ed,fd=Fr,dd=ld,Oa=bi,pd=wa,Ta=Wr,Da=vi,md=wi,gd=Vr,yd=Ci,bd=xa,_a=Si,ka=At,wd=Br;function U(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ei(s)}U.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
64
64
  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:
65
- https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new vi().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return U([i(l)]).process(n,a)},i};U.stringify=ad;U.parse=fd;U.fromJSON=ld;U.list=dd;U.comment=s=>new Oa(s);U.atRule=s=>new Da(s);U.decl=s=>new Ra(s);U.rule=s=>new Ta(s);U.root=s=>new _a(s);U.document=s=>new Aa(s);U.CssSyntaxError=id;U.Declaration=Ra;U.Container=od;U.Processor=vi;U.Document=Aa;U.Comment=Oa;U.Warning=ud;U.AtRule=Da;U.Result=cd;U.Input=hd;U.Rule=Ta;U.Root=_a;U.Node=pd;nd.registerPostcss(U);var md=U;U.default=U;const Y=Mh(md);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;var _=(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))(_||{});function gd(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(o){if(o){const n=o.split(r);n.length>1&&(e[zs(n[0].trim())]=n[1].trim())}}),e}function Ln(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=vd(t);e.push(`${i}: ${r};`)}return e.join(" ")}const yd=/-([a-z])/g,wd=/^--[a-zA-Z0-9-]+$/,zs=s=>wd.test(s)?s:s.replace(yd,(e,t)=>t?t.toUpperCase():""),bd=/\B([A-Z])/g,vd=s=>s.replace(bd,"-$1").toLowerCase();class me{constructor(...e){E(this,"parentElement",null),E(this,"parentNode",null),E(this,"ownerDocument"),E(this,"firstChild",null),E(this,"lastChild",null),E(this,"previousSibling",null),E(this,"nextSibling",null),E(this,"ELEMENT_NODE",1),E(this,"TEXT_NODE",3),E(this,"nodeType"),E(this,"nodeName"),E(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 me){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"}}class Si extends me{constructor(...e){super(e),E(this,"nodeType",9),E(this,"nodeName","#document"),E(this,"compatMode","CSS1Compat"),E(this,"RRNodeType",_.Document),E(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===_.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===_.Element||t===_.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Ci(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===_.Element||r===_.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Fa(this,e,t);return i.parentElement=null,i}removeChild(e){return Ba(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new Si}createDocumentType(e,t,r){const i=new ka(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new Wr(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new $a(e);return t.ownerDocument=this,t}createComment(e){const t=new La(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Pa(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class ka extends me{constructor(e,t,r){super(),E(this,"nodeType",10),E(this,"RRNodeType",_.DocumentType),E(this,"name"),E(this,"publicId"),E(this,"systemId"),E(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Wr extends me{constructor(e){super(),E(this,"nodeType",1),E(this,"RRNodeType",_.Element),E(this,"tagName"),E(this,"attributes",{}),E(this,"shadowRoot",null),E(this,"scrollLeft"),E(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Ed(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?gd(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;const n=zs(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=Ln(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=zs(r),o=e[i]||"";return delete e[i],this.attributes.style=Ln(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Ci(this,e)}insertBefore(e,t){return Fa(this,e,t)}removeChild(e){return Ba(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class Sd extends Wr{constructor(){super(...arguments),E(this,"currentTime"),E(this,"volume"),E(this,"paused"),E(this,"muted"),E(this,"playbackRate"),E(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Cd extends Wr{constructor(){super(...arguments),E(this,"tagName","DIALOG"),E(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class $a extends me{constructor(e){super(),E(this,"nodeType",3),E(this,"nodeName","#text"),E(this,"RRNodeType",_.Text),E(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class La extends me{constructor(e){super(),E(this,"nodeType",8),E(this,"nodeName","#comment"),E(this,"RRNodeType",_.Comment),E(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Pa extends me{constructor(e){super(),E(this,"nodeName","#cdata-section"),E(this,"nodeType",4),E(this,"RRNodeType",_.CDATA),E(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Ed{constructor(e,t){if(E(this,"onChange"),E(this,"classes",[]),E(this,"add",(...r)=>{for(const i of r){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),E(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function Ci(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function Fa(s,e,t){if(!t)return Ci(s,e);if(t.parentNode!==s)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function Ba(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var ae=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(ae||{});const Gs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Id={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let ve=null;function Er(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=xd(s,e,t,r),Ua(s,e,t,r),Md(s,e,t)}function xd(s,e,t,r){var i;if(t.afterAppend&&!ve&&(ve=new WeakSet,setTimeout(()=>{ve=null},0)),!Ei(s,e)){const o=Ir(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case _.Document:{if(!Ve(s,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),ve==null||ve.add(s))}break}case _.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Er(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Ua(o.shadowRoot,n.shadowRoot,t,r)),Nd(o,n,r);break}}return s}function Md(s,e,t){var r;switch(e.RRNodeType){case _.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case _.Element:{const i=s,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=s,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const n=i.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=i,a=o,l=n.open,u=n.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,m=l!==c;if((f||l&&m)&&n.close(),c&&(m||f))try{h?n.showModal():n.show()}catch(d){console.warn(d)}break}}break}case _.Text:case _.Comment:case _.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ve!=null&&ve.has(s)&&(ve.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Nd(s,e,t){const r=s.attributes,i=e.attributes;for(const o in i){const n=i[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&Gs[o])s.setAttributeNS(Gs[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{s.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(r))o in i||s.removeAttribute(o);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function Ua(s,e,t,r){const i=Array.from(s.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let n=0,a=i.length-1,l=0,u=o.length-1,c=i[n],h=i[a],f=o[l],m=o[u],d,p;for(;n<=a&&l<=u;)if(c===void 0)c=i[++n];else if(h===void 0)h=i[--a];else if(Ve(c,f,t.mirror,r))c=i[++n],f=o[++l];else if(Ve(h,m,t.mirror,r))h=i[--a],m=o[--u];else if(Ve(c,m,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(v){console.warn(v)}c=i[++n],m=o[--u]}else if(Ve(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(v){console.warn(v)}h=i[--a],f=o[++l]}else{if(!d){d={};for(let w=n;w<=a;w++){const C=i[w];C&&t.mirror.hasNode(C)&&(d[t.mirror.getId(C)]=w)}}p=d[r.getId(f)];const v=i[p];if(p!==void 0&&v&&Ve(v,f,t.mirror,r)){try{s.insertBefore(v,c)}catch(w){console.warn(w)}i[p]=void 0}else{const w=Ir(f,t.mirror,r);s.nodeName==="#document"&&c&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++n]);try{s.insertBefore(w,c||null)}catch(C){console.warn(C)}}f=o[++l]}if(n>a){const v=o[u+1];let w=null;for(v&&(w=t.mirror.getNode(r.getId(v)));l<=u;++l){const C=Ir(o[l],t.mirror,r);try{s.insertBefore(C,w)}catch(x){console.warn(x)}}}else if(l>u)for(;n<=a;n++){const v=i[n];if(!(!v||v.parentNode!==s))try{s.removeChild(v),t.mirror.removeNodeFromMap(v)}catch(w){console.warn(w)}}let g=s.firstChild,y=e.firstChild;for(;g!==null&&y!==null;)Er(g,y,t,r),g=g.nextSibling,y=y.nextSibling}function Ir(s,e,t){const r=t.getId(s),i=t.getMeta(s);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&Ei(o,s))return o;switch(s.RRNodeType){case _.Document:o=new Document;break;case _.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case _.Element:{let n=s.tagName.toLowerCase();n=Id[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(Gs.svg,n):o=document.createElement(s.tagName);break}case _.Text:o=document.createTextNode(s.data);break;case _.Comment:o=document.createComment(s.data);break;case _.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,N({},i));try{ve==null||ve.add(o)}catch(n){}return o}function Ei(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ve(s,e,t,r){const i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:Ei(s,e)}class it extends Si{constructor(e){super(),E(this,"UNSERIALIZED_STARTING_ID",-2),E(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),E(this,"mirror",Bd()),E(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new it}createDocumentType(e,t,r){const i=new Rd(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new Ad(t);break;case"IFRAME":r=new _d(t,this.mirror);break;case"CANVAS":r=new Dd(t);break;case"STYLE":r=new Td(t);break;case"DIALOG":r=new Od(t);break;default:r=new Vr(t);break}return r.ownerDocument=this,r}createComment(e){const t=new $d(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ld(e);return t.ownerDocument=this,t}createTextNode(e){const t=new kd(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Rd=ka;class Vr extends Wr{constructor(){super(...arguments),E(this,"inputData",null),E(this,"scrollData",null)}}class Ad extends Sd{}class Od extends Cd{}class Dd extends Vr{constructor(){super(...arguments),E(this,"rr_dataURL",null),E(this,"canvasMutations",[])}getContext(){return null}}class Td extends Vr{constructor(){super(...arguments),E(this,"rules",[])}}class _d extends Vr{constructor(e,t){super(e),E(this,"contentDocument",new it),this.contentDocument.mirror=t}}const kd=$a,$d=La,Ld=Pa;function Pd(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function Wa(s,e,t,r){let i;switch(s.nodeType){case ae.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ae.DOCUMENT_TYPE_NODE:{const n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case ae.ELEMENT_NODE:{const n=s,a=Pd(n);i=e.createElement(a);const l=i;for(const{name:u,value:c}of Array.from(n.attributes))l.attributes[u]=c;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case ae.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ae.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ae.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ae.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof it&&(o||(o=Va(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,N({},o))),i}function Fd(s,e=Sh(),t=new it){function r(i,o){const n=Wa(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==ae.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,n)}else(i.nodeType===ae.DOCUMENT_NODE||i.nodeType===ae.ELEMENT_NODE||i.nodeType===ae.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ae.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function Bd(){return new Ud}class Ud{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 Va(s,e){switch(s.RRNodeType){case _.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case _.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case _.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case _.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const Pn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Fn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qt={},Wd=()=>!!globalThis.Zone;function Ii(s){if(qt[s])return qt[s];const e=globalThis[s],t=e.prototype,r=s in Pn?Pn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Fn?Fn[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!Wd())return qt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?qt[s]=u:t}catch(a){return t}}const ns={};function Te(s,e,t){var r;const i=`${s}.${String(t)}`;if(ns[i])return ns[i].call(e);const o=Ii(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(ns[i]=n,n.call(e)):e[t]}const os={};function za(s,e,t){const r=`${s}.${String(t)}`;if(os[r])return os[r].bind(e);const o=Ii(s)[t];return typeof o!="function"?e[t]:(os[r]=o,o.bind(e))}function Vd(s){return Te("Node",s,"childNodes")}function zd(s){return Te("Node",s,"parentNode")}function Gd(s){return Te("Node",s,"parentElement")}function jd(s){return Te("Node",s,"textContent")}function Hd(s,e){return za("Node",s,"contains")(e)}function Yd(s){return za("Node",s,"getRootNode")()}function Zd(s){return!s||!("host"in s)?null:Te("ShadowRoot",s,"host")}function Xd(s){return s.styleSheets}function Jd(s){return!s||!("shadowRoot"in s)?null:Te("Element",s,"shadowRoot")}function Kd(s,e){return Te("Element",s,"querySelector")(e)}function Qd(s,e){return Te("Element",s,"querySelectorAll")(e)}function Ga(){return Ii("MutationObserver").constructor}function Be(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 D={childNodes:Vd,parentNode:zd,parentElement:Gd,textContent:jd,contains:Hd,getRootNode:Yd,host:Zd,styleSheets:Xd,shadowRoot:Jd,querySelector:Kd,querySelectorAll:Qd,mutationObserver:Ga,patch:Be};function re(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const ze=`Please stop import mirror directly. Instead of that,\r
65
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new Ei().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return U([i(l)]).process(n,a)},i};U.stringify=fd;U.parse=yd;U.fromJSON=dd;U.list=bd;U.comment=s=>new Ta(s);U.atRule=s=>new Da(s);U.decl=s=>new Aa(s);U.rule=s=>new _a(s);U.root=s=>new ka(s);U.document=s=>new Oa(s);U.CssSyntaxError=ud;U.Declaration=Aa;U.Container=hd;U.Processor=Ei;U.Document=Oa;U.Comment=Ta;U.Warning=pd;U.AtRule=Da;U.Result=md;U.Input=gd;U.Rule=_a;U.Root=ka;U.Node=wd;cd.registerPostcss(U);var vd=U;U.default=U;const Z=Th(vd);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var $=(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))($||{});function Sd(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(o){if(o){const n=o.split(r);n.length>1&&(e[Ys(n[0].trim())]=n[1].trim())}}),e}function Un(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=Id(t);e.push(`${i}: ${r};`)}return e.join(" ")}const Cd=/-([a-z])/g,Ed=/^--[a-zA-Z0-9-]+$/,Ys=s=>Ed.test(s)?s:s.replace(Cd,(e,t)=>t?t.toUpperCase():""),xd=/\B([A-Z])/g,Id=s=>s.replace(xd,"-$1").toLowerCase();class me{constructor(...e){x(this,"parentElement",null),x(this,"parentNode",null),x(this,"ownerDocument"),x(this,"firstChild",null),x(this,"lastChild",null),x(this,"previousSibling",null),x(this,"nextSibling",null),x(this,"ELEMENT_NODE",1),x(this,"TEXT_NODE",3),x(this,"nodeType"),x(this,"nodeName"),x(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 me){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"}}class xi extends me{constructor(...e){super(e),x(this,"nodeType",9),x(this,"nodeName","#document"),x(this,"compatMode","CSS1Compat"),x(this,"RRNodeType",$.Document),x(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===$.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===$.Element||t===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Ii(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Ba(this,e,t);return i.parentElement=null,i}removeChild(e){return Ua(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new xi}createDocumentType(e,t,r){const i=new $a(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new zr(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new La(e);return t.ownerDocument=this,t}createComment(e){const t=new Pa(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Fa(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class $a extends me{constructor(e,t,r){super(),x(this,"nodeType",10),x(this,"RRNodeType",$.DocumentType),x(this,"name"),x(this,"publicId"),x(this,"systemId"),x(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class zr extends me{constructor(e){super(),x(this,"nodeType",1),x(this,"RRNodeType",$.Element),x(this,"tagName"),x(this,"attributes",{}),x(this,"shadowRoot",null),x(this,"scrollLeft"),x(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Rd(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Sd(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;const n=Ys(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=Un(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=Ys(r),o=e[i]||"";return delete e[i],this.attributes.style=Un(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Ii(this,e)}insertBefore(e,t){return Ba(this,e,t)}removeChild(e){return Ua(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class Md extends zr{constructor(){super(...arguments),x(this,"currentTime"),x(this,"volume"),x(this,"paused"),x(this,"muted"),x(this,"playbackRate"),x(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Nd extends zr{constructor(){super(...arguments),x(this,"tagName","DIALOG"),x(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class La extends me{constructor(e){super(),x(this,"nodeType",3),x(this,"nodeName","#text"),x(this,"RRNodeType",$.Text),x(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Pa extends me{constructor(e){super(),x(this,"nodeType",8),x(this,"nodeName","#comment"),x(this,"RRNodeType",$.Comment),x(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Fa extends me{constructor(e){super(),x(this,"nodeName","#cdata-section"),x(this,"nodeType",4),x(this,"RRNodeType",$.CDATA),x(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Rd{constructor(e,t){if(x(this,"onChange"),x(this,"classes",[]),x(this,"add",(...r)=>{for(const i of r){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),x(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function Ii(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function Ba(s,e,t){if(!t)return Ii(s,e);if(t.parentNode!==s)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function Ua(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var oe=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(oe||{});const Zs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ad={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function Ir(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Od(s,e,t,r),Va(s,e,t,r),Td(s,e,t)}function Od(s,e,t,r){var i;if(t.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Mi(s,e)){const o=Mr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case $.Document:{if(!ze(s,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),we==null||we.add(s))}break}case $.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Ir(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Va(o.shadowRoot,n.shadowRoot,t,r)),Dd(o,n,r);break}}return s}function Td(s,e,t){var r;switch(e.RRNodeType){case $.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case $.Element:{const i=s,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=s,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const n=i.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=i,a=o,l=n.open,u=n.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,g=l!==c;if((f||l&&g)&&n.close(),c&&(g||f))try{h?n.showModal():n.show()}catch(p){console.warn(p)}break}}break}case $.Text:case $.Comment:case $.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}we!=null&&we.has(s)&&(we.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Dd(s,e,t){const r=s.attributes,i=e.attributes;for(const o in i){const n=i[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&Zs[o])s.setAttributeNS(Zs[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{s.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(r))o in i||s.removeAttribute(o);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function Va(s,e,t,r){const i=Array.from(s.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let n=0,a=i.length-1,l=0,u=o.length-1,c=i[n],h=i[a],f=o[l],g=o[u],p,y;for(;n<=a&&l<=u;)if(c===void 0)c=i[++n];else if(h===void 0)h=i[--a];else if(ze(c,f,t.mirror,r))c=i[++n],f=o[++l];else if(ze(h,g,t.mirror,r))h=i[--a],g=o[--u];else if(ze(c,g,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(v){console.warn(v)}c=i[++n],g=o[--u]}else if(ze(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(v){console.warn(v)}h=i[--a],f=o[++l]}else{if(!p){p={};for(let S=n;S<=a;S++){const w=i[S];w&&t.mirror.hasNode(w)&&(p[t.mirror.getId(w)]=S)}}y=p[r.getId(f)];const v=i[y];if(y!==void 0&&v&&ze(v,f,t.mirror,r)){try{s.insertBefore(v,c)}catch(S){console.warn(S)}i[y]=void 0}else{const S=Mr(f,t.mirror,r);s.nodeName==="#document"&&c&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++n]);try{s.insertBefore(S,c||null)}catch(w){console.warn(w)}}f=o[++l]}if(n>a){const v=o[u+1];let S=null;for(v&&(S=t.mirror.getNode(r.getId(v)));l<=u;++l){const w=Mr(o[l],t.mirror,r);try{s.insertBefore(w,S)}catch(C){console.warn(C)}}}else if(l>u)for(;n<=a;n++){const v=i[n];if(!(!v||v.parentNode!==s))try{s.removeChild(v),t.mirror.removeNodeFromMap(v)}catch(S){console.warn(S)}}let d=s.firstChild,m=e.firstChild;for(;d!==null&&m!==null;)Ir(d,m,t,r),d=d.nextSibling,m=m.nextSibling}function Mr(s,e,t){const r=t.getId(s),i=t.getMeta(s);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&Mi(o,s))return o;switch(s.RRNodeType){case $.Document:o=new Document;break;case $.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case $.Element:{let n=s.tagName.toLowerCase();n=Ad[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(Zs.svg,n):o=document.createElement(s.tagName);break}case $.Text:o=document.createTextNode(s.data);break;case $.Comment:o=document.createComment(s.data);break;case $.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,M({},i));try{we==null||we.add(o)}catch(n){}return o}function Mi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function ze(s,e,t,r){const i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:Mi(s,e)}class nt extends xi{constructor(e){super(),x(this,"UNSERIALIZED_STARTING_ID",-2),x(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),x(this,"mirror",Gd()),x(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new nt}createDocumentType(e,t,r){const i=new _d(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new kd(t);break;case"IFRAME":r=new Fd(t,this.mirror);break;case"CANVAS":r=new Ld(t);break;case"STYLE":r=new Pd(t);break;case"DIALOG":r=new $d(t);break;default:r=new Gr(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Ud(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Vd(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Bd(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const _d=$a;class Gr extends zr{constructor(){super(...arguments),x(this,"inputData",null),x(this,"scrollData",null)}}class kd extends Md{}class $d extends Nd{}class Ld extends Gr{constructor(){super(...arguments),x(this,"rr_dataURL",null),x(this,"canvasMutations",[])}getContext(){return null}}class Pd extends Gr{constructor(){super(...arguments),x(this,"rules",[])}}class Fd extends Gr{constructor(e,t){super(e),x(this,"contentDocument",new nt),this.contentDocument.mirror=t}}const Bd=La,Ud=Pa,Vd=Fa;function Wd(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function Wa(s,e,t,r){let i;switch(s.nodeType){case oe.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case oe.DOCUMENT_TYPE_NODE:{const n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case oe.ELEMENT_NODE:{const n=s,a=Wd(n);i=e.createElement(a);const l=i;for(const{name:u,value:c}of Array.from(n.attributes))l.attributes[u]=c;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case oe.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case oe.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case oe.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case oe.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof nt&&(o||(o=za(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,M({},o))),i}function zd(s,e=Mh(),t=new nt){function r(i,o){const n=Wa(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==oe.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,n)}else(i.nodeType===oe.DOCUMENT_NODE||i.nodeType===oe.ELEMENT_NODE||i.nodeType===oe.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===oe.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function Gd(){return new jd}class jd{constructor(){x(this,"idNodeMap",new Map),x(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 za(s,e){switch(s.RRNodeType){case $.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case $.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case $.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case $.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case $.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const Vn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tr={},Hd=()=>!!globalThis.Zone;function Ni(s){if(tr[s])return tr[s];const e=globalThis[s],t=e.prototype,r=s in Vn?Vn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Wn?Wn[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!Hd())return tr[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?tr[s]=u:t}catch(a){return t}}const as={};function De(s,e,t){var r;const i=`${s}.${String(t)}`;if(as[i])return as[i].call(e);const o=Ni(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(as[i]=n,n.call(e)):e[t]}const ls={};function Ga(s,e,t){const r=`${s}.${String(t)}`;if(ls[r])return ls[r].bind(e);const o=Ni(s)[t];return typeof o!="function"?e[t]:(ls[r]=o,o.bind(e))}function Yd(s){return De("Node",s,"childNodes")}function Zd(s){return De("Node",s,"parentNode")}function Xd(s){return De("Node",s,"parentElement")}function Jd(s){return De("Node",s,"textContent")}function Kd(s,e){return Ga("Node",s,"contains")(e)}function Qd(s){return Ga("Node",s,"getRootNode")()}function qd(s){return!s||!("host"in s)?null:De("ShadowRoot",s,"host")}function ep(s){return s.styleSheets}function tp(s){return!s||!("shadowRoot"in s)?null:De("Element",s,"shadowRoot")}function rp(s,e){return De("Element",s,"querySelector")(e)}function sp(s,e){return De("Element",s,"querySelectorAll")(e)}function ja(){return Ni("MutationObserver").constructor}function Be(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()=>{}}}function ip(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function np(s){var f;var e,t;const r=(f=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const g=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),y=g*p,d=i.width*i.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const O={childNodes:Yd,parentNode:Zd,parentElement:Xd,textContent:Jd,contains:Kd,getRootNode:Qd,host:qd,styleSheets:ep,shadowRoot:tp,querySelector:rp,querySelectorAll:sp,mutationObserver:ja,patch:Be,describeNode:ip,getElementVisibility:np};function ee(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Ge=`Please stop import mirror directly. Instead of that,\r
66
66
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
67
- or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(ze),-1},getNode(){return console.error(ze),null},removeNodeFromMap(){console.error(ze)},has(){return console.error(ze),!1},reset(){console.error(ze)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(ze),Reflect.get(s,e,t)}}));function st(s,e,t={}){let r=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const a=e-(n-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,o)},a))}}function Rt(s,e,t,r,i=window){const o=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>Rt(s,e,o||{},!0)}function xr(){return Math.round(performance.timeOrigin+performance.now())}function xi(s=window){var e,t,r,i;const o=s.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=D.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=D.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Mi(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Ni(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Ri(s){return s?s.nodeType===s.ELEMENT_NODE?s:D.parentElement(s):null}function se(s,e,t,r){if(!s)return!1;const i=Ri(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(pr(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function ja(s,e){return e.getId(s)!==-1}function lr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===mt}function Ai(s,e){if(ht(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=D.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ai(r,e):!0}function Mr(s){return!!s.changedTouches}function Oi(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 Ha(s){const e={},t=(i,o)=>{const n={value:i,parent:o,children:[]};return e[i.node.id]=n,n},r=[];for(const i of s){const{nextId:o,parentId:n}=i;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(n in e){const a=e[n];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function Di(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)Di(s.children[t],e)}function Je(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Ti(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function _i(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),n=_i(i,e),a=o.height/i.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Re(s){return s?s instanceof me&&"shadowRoot"in s?!!s.shadowRoot:!!D.shadowRoot(s):!1}function Ye(s,e){const t=s[e[0]];return e.length===1?t:Ye(t.cssRules[e[1]].cssRules,e.slice(2))}function js(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function Ya(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class ki{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(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 $i(s){var e;let t=null;return"getRootNode"in s&&((e=D.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&D.host(D.getRootNode(s))&&(t=D.host(D.getRootNode(s))),t}function Za(s){let e=s,t;for(;t=$i(e);)e=t;return e}function Xa(s){const e=s.ownerDocument;if(!e)return!1;const t=Za(s);return D.contains(e,t)}function Li(s){const e=s.ownerDocument;return e?D.contains(e,s)||Xa(s):!1}const qd=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:ki,get _mirror(){return exports.mirror},closestElementOfNode:Ri,getBaseDimension:_i,getNestedRule:Ye,getPositionsAndIndex:js,getRootShadowHost:Za,getShadowHost:$i,getWindowHeight:Mi,getWindowScroll:xi,getWindowWidth:Ni,hasShadowRoot:Re,hookSetter:Rt,inDom:Li,isAncestorRemoved:Ai,isBlocked:se,isIgnored:lr,isSerialized:ja,isSerializedIframe:Je,isSerializedStylesheet:Ti,iterateResolveTree:Di,legacy_isTouchEvent:Mr,nowTimestamp:xr,on:re,polyfill:Oi,queueToResolveTrees:Ha,shadowHostInDom:Xa,throttle:st,uniqueTextMutations:Ya},Symbol.toStringTag,{value:"Module"}));var M=(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))(M||{}),I=(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))(I||{}),L=(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))(L||{}),Se=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Se||{}),xe=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(xe||{}),Ne=(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))(Ne||{}),$=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))($||{}),Ce=(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))(Ce||{});function Bn(s){return"__ln"in s}class ep{constructor(){b(this,"length",0),b(this,"head",null),b(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&&Bn(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&&Bn(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 Un=(s,e)=>`${s}@${e}`;class tp{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"excludeAttribute"),b(this,"includeAttribute"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new ep,i=l=>{let u=l,c=mt;for(;c===mt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=D.parentNode(l);if(!u||!Li(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const d=u.tagName;if(d==="TEXTAREA")return;d==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=ht(u)?this.mirror.getId($i(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const m=He(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,includeAttribute:this.includeAttribute,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:d=>{Je(d,this.mirror)&&this.iframeManager.addIframe(d),Ti(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Re(l)&&this.shadowDomManager.addShadowRoot(D.shadowRoot(l),this.doc)},onIframeLoad:(d,p)=>{this.iframeManager.attachIframe(d,p),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,p)=>{this.stylesheetManager.attachLinkElement(d,p)},cssCaptured:c});m&&(e.push({parentId:h,nextId:f,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)Wn(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(D.parentNode(l))||o(l);for(const l of this.addedSet)!Vn(this.droppedSet,l)&&!Wn(this.removesSubTreeCache,l,this.mirror)||Vn(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){const u=this.mirror.getId(D.parentNode(n.value)),c=i(n.value);u!==-1&&c!==-1&&(l=n)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(D.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const m=c.value,d=D.parentNode(m);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=D.host(d);if(this.mirror.getId(p)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=D.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),b(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(D.childNodes(e),i=>D.textContent(i)||"").join("");t.attributes.value=hr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:fr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!lr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=D.textContent(e.target);!se(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:po(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ri(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);const o=t[r];if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")||fo(r,this.excludeAttribute))return;if(r==="value"){const l=fr(t);i=hr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(se(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let a=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!ho(t.tagName,r)){if(a.attributes[r]=co(this.doc,Oe(t.tagName),Oe(r),i),i===a.attributes[r]){console.debug("[rrweb-record] A questionable mutation that needs to be investigated in the future.");return}if(r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const u of Array.from(t.style)){const c=t.style.getPropertyValue(u),h=t.style.getPropertyPriority(u);c!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?a.styleDiff[u]=c:a.styleDiff[u]=[c,h]:a._unchangedStyles[u]=[c,h]}for(const u of Array.from(l.style))t.style.getPropertyValue(u)===""&&(a.styleDiff[u]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal")}break}case"childList":{if(se(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=ht(e.target)?this.mirror.getId(D.host(e.target)):this.mirror.getId(e.target);se(e.target,this.blockClass,this.blockSelector,!1)||lr(t,this.mirror,this.slimDOMOptions)||!ja(t,this.mirror)||(this.addedSet.has(t)?(Hs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ai(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Un(r,i)]?Hs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:ht(e.target)&&ft(e.target)?!0:void 0}),rp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(lr(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[Un(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);se(e,this.blockClass,this.blockSelector,!1)||(D.childNodes(e).forEach(r=>this.genAdds(r)),Re(e)&&D.childNodes(D.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","includeAttribute","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 Hs(s,e){s.delete(e),D.childNodes(e).forEach(t=>Hs(s,t))}function rp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),D.childNodes(r).forEach(i=>t.push(i)))}}function Wn(s,e,t){return s.size===0?!1:sp(s,e)}function sp(s,e,t){const r=D.parentNode(e);return r?s.has(r):!1}function Vn(s,e){return s.size===0?!1:Ja(s,e)}function Ja(s,e){const t=D.parentNode(e);return t?s.has(t)?!0:Ja(s,t):!1}let pt;function ip(s){pt=s}function np(){pt=void 0}const k=s=>pt?(...t)=>{try{return s(...t)}catch(r){if(pt&&pt(r)===!0)return;throw r}}:s,Le=[];function At(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 Ka(s,e){const t=new tp;Le.push(t),t.init(s);const r=new(Ga())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function op({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],a;const l=st(k(h=>{const f=Date.now()-a;s(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),u=k(st(k(h=>{const f=At(h),{clientX:m,clientY:d}=Mr(h)?h.changedTouches[0]:h;a||(a=xr()),n.push({x:m,y:d,id:r.getId(f),timeOffset:xr()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove)}),i,{trailing:!1})),c=[re("mousemove",u,t),re("touchmove",u,t),re("drag",u,t)];return k(()=>{c.forEach(h=>h())})}function ap({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=At(h);if(se(f,r,i,!0))return;let m=null,d=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=Se.Mouse;break;case"touch":m=Se.Touch;break;case"pen":m=Se.Pen;break}m===Se.Touch?L[c]===L.MouseDown?d="TouchStart":L[c]===L.MouseUp&&(d="TouchEnd"):Se.Pen}else Mr(h)&&(m=Se.Touch);m!==null?(l=m,(d.startsWith("Touch")&&m===Se.Touch||d.startsWith("Mouse")&&m===Se.Mouse)&&(m=null)):L[c]===L.Click&&(m=l,l=null);const p=Mr(h)?h.changedTouches[0]:h;if(!p)return;const g=t.getId(f),{clientX:y,clientY:v}=p;k(s)(N({type:L[d],id:g,x:y,y:v},m!==null&&{pointerType:m}))};return Object.keys(L).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=Oe(c);const f=u(c);if(window.PointerEvent)switch(L[c]){case L.MouseDown:case L.MouseUp:h=h.replace("mouse","pointer");break;case L.TouchStart:case L.TouchEnd:return}a.push(re(h,f,e))}),k(()=>{a.forEach(c=>c())})}function Qa({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=k(st(k(a=>{const l=At(a);if(!l||se(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=xi(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return re("scroll",n,e)}function lp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=k(st(k(()=>{const o=Mi(),n=Ni();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return re("resize",i,e)}const as=["INPUT","TEXTAREA","SELECT"],zn=new WeakMap;function up({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(v){let w=At(v);const C=v.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=D.parentElement(w)),!w||!x||as.indexOf(x)<0||se(w,r,i,!0)||w.classList.contains(o)||n&&w.matches(n))return;let T=w.value,P=!1;const S=fr(w)||"";S==="radio"||S==="checkbox"?P=w.checked:(a[x.toLowerCase()]||a[S])&&(T=hr({element:w,maskInputOptions:a,tagName:x,type:S,value:T,maskInputFn:l})),f(w,c?{text:T,isChecked:P,userTriggered:C}:{text:T,isChecked:P});const R=w.name;S==="radio"&&R&&P&&e.querySelectorAll(`input[type="radio"][name="${R}"]`).forEach(z=>{if(z!==w){const Z=z.value;f(z,c?{text:Z,isChecked:!P,userTriggered:!1}:{text:Z,isChecked:!P})}})}function f(v,w){const C=zn.get(v),x=v,T=x.hasAttribute("placeholder"),P=x.value==="",S=typeof x.defaultValue=="string"?x.defaultValue==="":!0,R=!w.userTriggered,z=!C||C.text==="",Z=T&&P&&S&&z&&R&&!w.isChecked&&x.type!=="hidden"&&as.includes(x.tagName),ie=x.tagName==="INPUT"&&x.type==="text"&&!w.userTriggered&&w.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),le=!w.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!w.isChecked&&x.type!=="hidden"&&as.includes(x.tagName),oe=x.type==="checkbox"&&!w.userTriggered&&!w.isChecked&&!C,O=x.type==="radio"&&!w.userTriggered&&!w.isChecked&&!C;if(!(Z||ie||le||oe||O)&&(!C||C.text!==w.text||C.isChecked!==w.isChecked)){zn.set(v,w);const ue=t.getId(v);k(s)(ee(N({},w),{id:ue}))}}const d=(u.input==="last"?["change"]:["input","change"]).map(v=>re(v,k(h),e)),p=e.defaultView;if(!p)return()=>{d.forEach(v=>v())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&d.push(...y.map(v=>Rt(v[0],v[1],{set(){k(h)({target:this,isTrusted:!1})}},!1,p))),k(()=>{d.forEach(v=>v())})}function Nr(s){const e=[];function t(r,i){if(er("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||er("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||er("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||er("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(n)}return i}return t(s,e)}function Me(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function cp({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:k((c,h,f)=>{const[m,d]=f,{id:p,styleId:g}=Me(h,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,adds:[{rule:m,index:d}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:k((c,h,f)=>{const[m]=f,{id:d,styleId:p}=Me(h,e,t.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,removes:[{index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:k((c,h,f)=>{const[m]=f,{id:d,styleId:p}=Me(h,e,t.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,replace:m}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:k((c,h,f)=>{const[m]=f,{id:d,styleId:p}=Me(h,e,t.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,replaceSync:m}),c.apply(h,f)})}));const l={};tr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(tr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),tr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),tr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:k((f,m,d)=>{const[p,g]=d,{id:y,styleId:v}=Me(m.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||v&&v!==-1)&&s({id:y,styleId:v,adds:[{rule:p,index:[...Nr(m),g||0]}]}),f.apply(m,d)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:k((f,m,d)=>{const[p]=d,{id:g,styleId:y}=Me(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||y&&y!==-1)&&s({id:g,styleId:y,removes:[{index:[...Nr(m),p]}]}),f.apply(m,d)})})}),k(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function qa({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(D.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=l.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(f){}return h}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function hp({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:k((a,l,u)=>{var c;const[h,f,m]=u;if(t.has(h))return o.apply(l,[h,f,m]);const{id:d,styleId:p}=Me((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,set:{property:h,value:f,priority:m},index:Nr(l.parentRule)}),a.apply(l,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:k((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=Me((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&s({id:f,styleId:m,remove:{property:h},index:Nr(l.parentRule)}),a.apply(l,u)})}),k(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function fp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=k(l=>st(k(u=>{const c=At(u);if(!c||se(c,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:d,loop:p}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:m,playbackRate:d,loop:p})}),i.media||500)),a=[re("play",n(Ne.Play),o),re("pause",n(Ne.Pause),o),re("seeked",n(Ne.Seeked),o),re("volumechange",n(Ne.VolumeChange),o),re("ratechange",n(Ne.RateChange),o)];return k(()=>{a.forEach(l=>l())})}function dp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const n=Be(e.fonts,"add",function(a){return function(l){return setTimeout(k(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),k(()=>{r.forEach(a=>a())})}function pp(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const a=k(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:m,startOffset:d,endContainer:p,endOffset:g}=f;se(m,r,i,!0)||se(p,r,i,!0)||u.push({start:t.getId(m),startOffset:d,end:t.getId(p),endOffset:g})}o({ranges:u})});return a(),re("selectionchange",a)}function mp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Be(t.customElements,"define",function(i){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,a])}})}function gp(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:m,customElementCb:d}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),o(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),n(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),l(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),d(...p)}}function yp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};gp(s,e);let r;s.recordDOM&&(r=Ka(s,s.doc));const i=op(s),o=ap(s),n=Qa(s),a=lp(s,{win:t}),l=up(s),u=fp(s);let c=()=>{},h=()=>{},f=()=>{},m=()=>{};s.recordDOM&&(c=cp(s,{win:t}),h=qa(s,s.doc),f=hp(s,{win:t}),s.collectFonts&&(m=dp(s)));const d=pp(s),p=mp(s),g=[];for(const y of s.plugins)g.push(y.observer(y.callback,t,y.options));return k(()=>{Le.forEach(y=>y.reset()),r==null||r.disconnect(),i(),o(),n(),a(),l(),u(),c(),h(),f(),m(),d(),p(),g.forEach(y=>y())})}function er(s){return typeof window[s]!="undefined"}function tr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Gn{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=i.get(t);return o||-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 wp{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Gn(uo)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Gn(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 o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case M.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:M.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return t;case M.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case M.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),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 I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case I.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 o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));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!==Ce.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class bp{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(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(!ft(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ka(ee(N({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Qa(ee(N({},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(D.host(e))),this.restoreHandlers.push(qa({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(Be(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=D.shadowRoot(this);return a&&Li(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var rr=0;rr<Ze.length;rr++)ct[Ze.charCodeAt(rr)]=rr;var vp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ze[e[t]>>2],i+=Ze[(e[t]&3)<<4|e[t+1]>>4],i+=Ze[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ze[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},Sp=function(s){var e=s.length*.75,t=s.length,r,i=0,o,n,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=ct[s.charCodeAt(r)],n=ct[s.charCodeAt(r+1)],a=ct[s.charCodeAt(r+2)],l=ct[s.charCodeAt(r+3)],c[i++]=o<<2|n>>4,c[i++]=(n&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const jn=new Map;function Cp(s,e){let t=jn.get(s);return t||(t=new Map,jn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const el=(s,e,t)=>{if(!s||!(rl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Cp(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function ur(s,e,t){if(s instanceof Array)return s.map(r=>ur(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=vp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[ur(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:[ur(s.data,e,t),s.width,s.height]};if(rl(s,e)||typeof s=="object"){const r=s.constructor.name,i=el(s,e,t);return{rr_type:r,index:i}}}}return s}const tl=(s,e,t)=>s.map(r=>ur(r,e,t)),rl=(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 Ep(s,e,t,r){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const a=Be(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return se(this.canvas,t,r,!0)||setTimeout(()=>{const c=tl(u,e,this);s(this.canvas,{type:xe["2D"],property:n,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Rt(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:xe["2D"],property:n,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function Ip(s){return s==="experimental-webgl"?"webgl":s}function Hn(s,e,t,r){const i=[];try{const o=Be(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!se(this,e,t,!0)){const u=Ip(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[a,...l])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Yn(s,e,t,r,i,o){const n=[],a=Object.getOwnPropertyNames(s);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;const u=Be(s,l,function(c){return function(...h){const f=c.apply(this,h);if(el(f,o,this),"tagName"in this.canvas&&!se(this.canvas,r,i,!0)){const m=tl(h,o,this),d={type:e,property:l,args:m};t(this.canvas,d)}return f}});n.push(u)}catch(u){const c=Rt(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function xp(s,e,t,r){const i=[];return i.push(...Yn(e.WebGLRenderingContext.prototype,xe.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Yn(e.WebGL2RenderingContext.prototype,xe.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const sl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Mp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Zn=typeof window!="undefined"&&window.Blob&&new Blob([Mp(sl)],{type:"text/javascript;charset=utf-8"});function Np(s){let e;try{if(e=Zn&&(window.URL||window.webkitURL).createObjectURL(Zn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+sl,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Rp{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{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,o){const n=Hn(t,r,i,!0),a=new Map,l=new Np;l.onmessage=d=>{const{id:p}=d.data;if(a.set(p,!1),!("base64"in d.data))return;const{base64:g,type:y,width:v,height:w}=d.data;this.mutationCb({id:p,type:xe["2D"],commands:[{property:"clearRect",args:[0,0,v,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:y}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const d=[];return t.document.querySelectorAll("canvas").forEach(p=>{se(p,r,i,!0)||d.push(p)}),d},m=d=>{if(c&&d-c<u){h=requestAnimationFrame(m);return}c=d,f().forEach(async p=>{var g;const y=this.mirror.getId(p);if(a.get(y)||p.width===0||p.height===0)return;if(a.set(y,!0),["webgl","webgl2"].includes(p.__context)){const w=p.getContext(p.__context);((g=w==null?void 0:w.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}const v=await createImageBitmap(p);l.postMessage({id:y,bitmap:v,width:p.width,height:p.height,dataURLOptions:o.dataURLOptions},[v])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Hn(e,t,r,!1),o=Ep(this.processMutation.bind(this),e,t,r),n=xp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}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(n=>{const u=n,{type:a}=u;return Ue(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Ap{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new ki),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 o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:no(a,o.href),index:l}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Op{constructor(){b(this,"nodeMap",new WeakMap),b(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(){}}let X,cr,ls,Rr=!1;const Ys=[];try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Gi=s.contentWindow)==null?void 0:Gi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const fe=oo();function _e(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:n="rr-ignore",ignoreSelector:a=null,excludeAttribute:l,includeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:d,slimDOMOptions:p,maskInputFn:g,maskTextFn:y,hooks:v,packFn:w,sampling:C={},dataURLOptions:x={},mousemoveWait:T,recordDOM:P=!0,recordCanvas:S=!1,recordCrossOriginIframes:R=!1,recordAfter:z=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomQueue:Z=s.flushCustomQueue!==void 0?s.flushCustomQueue:"after",userTriggeredOnInput:ie=!1,collectFonts:le=!1,inlineImages:oe=!1,plugins:O,keepIframeSrcFn:ue=()=>!1,ignoreCSSAttributes:J=new Set([]),errorHandler:q}=s;ip(q);const ne=R?window.parent===window:!0;let ce=!1;if(!ne)try{window.parent.document&&(ce=!1)}catch(F){ce=!0}if(ne&&!e)throw new Error("emit function is required");if(!ne&&!ce)return()=>{};T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),fe.reset();const ge=l===void 0?/^$a/:l,zr=u===void 0?/.+/i:u,Gr=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},jr=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:p==="all",headMetaDescKeywords:p==="all",headTitleMutations:p==="all"}:p||{};Oi();let Pi,Hr=0;const Fi=F=>{for(const he of O||[])he.eventProcessor&&(F=he.eventProcessor(F));return w&&!ce&&(F=w(F)),F};X=(F,he)=>{var K;const Q=F;if(Q.timestamp=xr(),(K=Le[0])!=null&&K.isFrozen()&&Q.type!==M.FullSnapshot&&!(Q.type===M.IncrementalSnapshot&&Q.data.source===I.Mutation)&&Le.forEach(ye=>ye.unfreeze()),ne)e==null||e(Fi(Q),he);else if(ce){const ye={type:"rrweb",event:Fi(Q),origin:window.location.origin,isCheckout:he};window.parent.postMessage(ye,"*")}if(Q.type===M.FullSnapshot)Pi=Q,Hr=0;else if(Q.type===M.IncrementalSnapshot){if(Q.data.source===I.Mutation&&Q.data.isAttachIframe)return;Hr++;const ye=r&&Hr>=r,W=t&&Q.timestamp-Pi.timestamp>t;(ye||W)&&cr(!0)}};const Ot=F=>{X({type:M.IncrementalSnapshot,data:N({source:I.Mutation},F)})},Bi=F=>X({type:M.IncrementalSnapshot,data:N({source:I.Scroll},F)}),Ui=F=>X({type:M.IncrementalSnapshot,data:N({source:I.CanvasMutation},F)}),cl=F=>X({type:M.IncrementalSnapshot,data:N({source:I.AdoptedStyleSheet},F)}),ke=new Ap({mutationCb:Ot,adoptedStyleSheetCb:cl}),$e=new wp({mirror:fe,mutationCb:Ot,stylesheetManager:ke,recordCrossOriginIframes:R,wrappedEmit:X});for(const F of O||[])F.getMirror&&F.getMirror({nodeMirror:fe,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});const Yr=new Op;ls=new Rp({recordCanvas:S,mutationCb:Ui,win:window,blockClass:i,blockSelector:o,mirror:fe,sampling:C.canvas,dataURLOptions:x});const Dt=new bp({mutationCb:Ot,scrollCb:Bi,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:c,maskTextSelector:h,excludeAttribute:ge,includeAttribute:zr,inlineStylesheet:f,maskInputOptions:Gr,dataURLOptions:x,maskTextFn:y,maskInputFn:g,recordCanvas:S,inlineImages:oe,sampling:C,slimDOMOptions:jr,iframeManager:$e,stylesheetManager:ke,canvasManager:ls,keepIframeSrcFn:ue,processedNodeManager:Yr},mirror:fe});cr=(F=!1)=>{if(!P)return;X({type:M.Meta,data:{href:window.location.href,width:Ni(),height:Mi()}},F),ke.reset(),Dt.init(),Le.forEach(K=>K.lock());const he=gu(document,{mirror:fe,blockClass:i,blockSelector:o,maskTextClass:c,maskTextSelector:h,excludeAttribute:ge,includeAttribute:zr,inlineStylesheet:f,maskAllInputs:Gr,maskTextFn:y,maskInputFn:g,slimDOM:jr,dataURLOptions:x,recordCanvas:S,inlineImages:oe,onSerialize:K=>{Je(K,fe)&&$e.addIframe(K),Ti(K,fe)&&ke.trackLinkElement(K),Re(K)&&Dt.addShadowRoot(D.shadowRoot(K),document)},onIframeLoad:(K,Q)=>{$e.attachIframe(K,Q),Dt.observeAttachShadow(K)},onStylesheetLoad:(K,Q)=>{ke.attachLinkElement(K,Q)},keepIframeSrcFn:ue});if(!he)return console.warn("Failed to snapshot the document");X({type:M.FullSnapshot,data:{node:he,initialOffset:xi(window)}},F),Le.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ke.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{const F=[],he=Q=>{var ye;return k(yp)({mutationCb:Ot,mousemoveCb:(W,Zr)=>X({type:M.IncrementalSnapshot,data:{source:Zr,positions:W}}),mouseInteractionCb:W=>X({type:M.IncrementalSnapshot,data:N({source:I.MouseInteraction},W)}),scrollCb:Bi,viewportResizeCb:W=>X({type:M.IncrementalSnapshot,data:N({source:I.ViewportResize},W)}),inputCb:W=>X({type:M.IncrementalSnapshot,data:N({source:I.Input},W)}),mediaInteractionCb:W=>X({type:M.IncrementalSnapshot,data:N({source:I.MediaInteraction},W)}),styleSheetRuleCb:W=>X({type:M.IncrementalSnapshot,data:N({source:I.StyleSheetRule},W)}),styleDeclarationCb:W=>X({type:M.IncrementalSnapshot,data:N({source:I.StyleDeclaration},W)}),canvasMutationCb:Ui,fontCb:W=>X({type:M.IncrementalSnapshot,data:N({source:I.Font},W)}),selectionCb:W=>{X({type:M.IncrementalSnapshot,data:N({source:I.Selection},W)})},customElementCb:W=>{X({type:M.IncrementalSnapshot,data:N({source:I.CustomElement},W)})},blockClass:i,ignoreClass:n,ignoreSelector:a,maskTextClass:c,maskTextSelector:h,excludeAttribute:ge,includeAttribute:zr,maskInputOptions:Gr,inlineStylesheet:f,sampling:C,recordDOM:P,recordCanvas:S,inlineImages:oe,userTriggeredOnInput:ie,collectFonts:le,doc:Q,maskInputFn:g,maskTextFn:y,keepIframeSrcFn:ue,blockSelector:o,slimDOMOptions:jr,dataURLOptions:x,mirror:fe,iframeManager:$e,stylesheetManager:ke,shadowDomManager:Dt,processedNodeManager:Yr,canvasManager:ls,ignoreCSSAttributes:J,plugins:((ye=O==null?void 0:O.filter(W=>W.observer))==null?void 0:ye.map(W=>({observer:W.observer,options:W.options,callback:Zr=>X({type:M.Plugin,data:{plugin:W.name,payload:Zr}})})))||[]},v)};$e.addLoadListener(Q=>{try{F.push(he(Q.contentDocument))}catch(ye){console.warn(ye)}});const K=()=>{Z==="before"&&us(),cr(),F.push(he(document)),Rr=!0,Z==="after"&&us()};return document.readyState==="interactive"||document.readyState==="complete"?K():(F.push(re("DOMContentLoaded",()=>{X({type:M.DomContentLoaded,data:{}}),z==="DOMContentLoaded"&&K()})),F.push(re("load",()=>{X({type:M.Load,data:{}}),z==="load"&&K()},window))),()=>{us(),F.forEach(Q=>Q()),Yr.destroy(),Rr=!1,np()}}catch(F){console.warn(F)}}function us(){for(const s of Ys)X(s);Ys.length=0}_e.addCustomEvent=(s,e)=>{const t={type:M.Custom,data:{tag:s,payload:e}};if(!Rr){console.warn(`[rrweb] CustomEvent buffered before recording start: ${s}`),Ys.push(t);return}X(t)};_e.freezePage=()=>{Le.forEach(s=>s.freeze())};_e.takeFullSnapshot=s=>{if(!Rr)throw new Error("please take full snapshot after start recording");cr(s)};_e.mirror=fe;function il(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const Dp=Object.freeze(Object.defineProperty({__proto__:null,default:il},Symbol.toStringTag,{value:"Module"}));function Tp(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function n(y){const v=["MSIE ","Trident/","Edge/"];return new RegExp(v.join("|")).test(y)}const a=n(s.navigator.userAgent)?1:0;function l(y,v){this.scrollLeft=y,this.scrollTop=v}function u(y){return .5*(1-Math.cos(Math.PI*y))}function c(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(y,v){if(v==="Y")return y.clientHeight+a<y.scrollHeight;if(v==="X")return y.clientWidth+a<y.scrollWidth}function f(y,v){const w=s.getComputedStyle(y,null)["overflow"+v];return w==="auto"||w==="scroll"}function m(y){const v=h(y,"Y")&&f(y,"Y"),w=h(y,"X")&&f(y,"X");return v||w}function d(y){for(;y!==e.body&&m(y)===!1;)y=y.parentNode||y.host;return y}function p(y){const v=o();let w,C,x,T=(v-y.startTime)/r;T=T>1?1:T,w=u(T),C=y.startX+(y.x-y.startX)*w,x=y.startY+(y.y-y.startY)*w,y.method.call(y.scrollable,C,x),(C!==y.x||x!==y.y)&&s.requestAnimationFrame(p.bind(s,y))}function g(y,v,w){let C,x,T,P;const S=o();y===e.body?(C=s,x=s.scrollX||s.pageXOffset,T=s.scrollY||s.pageYOffset,P=i.scroll):(C=y,x=y.scrollLeft,T=y.scrollTop,P=l),p({scrollable:C,method:P,startTime:S,startX:x,startY:T,x:v,y:w})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}g.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const y=arguments[0].left,v=arguments[0].top;g.call(this,this,typeof y=="undefined"?this.scrollLeft:~~y,typeof v=="undefined"?this.scrollTop:~~v)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const y=d(this),v=y.getBoundingClientRect(),w=this.getBoundingClientRect();y!==e.body?(g.call(this,y,y.scrollLeft+w.left-v.left,y.scrollTop+w.top-v.top),s.getComputedStyle(y).position!=="fixed"&&s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})):s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class _p{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function Xn(s,e){if(s.type===M.IncrementalSnapshot&&s.data.source===I.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************
67
+ or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(Ge),-1},getNode(){return console.error(Ge),null},removeNodeFromMap(){console.error(Ge)},has(){return console.error(Ge),!1},reset(){console.error(Ge)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(Ge),Reflect.get(s,e,t)}}));function it(s,e,t={}){let r=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const a=e-(n-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,o)},a))}}function Ot(s,e,t,r,i=window){const o=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>Ot(s,e,o||{},!0)}function Le(){return Math.round(performance.timeOrigin+performance.now())}function Ri(s=window){var e,t,r,i;const o=s.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=O.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=O.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Ai(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Oi(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Ti(s){return s?s.nodeType===s.ELEMENT_NODE?s:O.parentElement(s):null}function te(s,e,t,r){if(!s)return!1;const i=Ti(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(gr(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Ha(s,e){return e.getId(s)!==-1}function cr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===yt}function Di(s,e){if(dt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=O.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Di(r,e):!0}function Nr(s){return!!s.changedTouches}function _i(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 Ya(s){const e={},t=(i,o)=>{const n={value:i,parent:o,children:[]};return e[i.node.id]=n,n},r=[];for(const i of s){const{nextId:o,parentId:n}=i;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(n in e){const a=e[n];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function ki(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)ki(s.children[t],e)}function Ke(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function $i(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Li(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),n=Li(i,e),a=o.height/i.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Re(s){return s?s instanceof me&&"shadowRoot"in s?!!s.shadowRoot:!!O.shadowRoot(s):!1}function Ze(s,e){const t=s[e[0]];return e.length===1?t:Ze(t.cssRules[e[1]].cssRules,e.slice(2))}function Xs(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function Za(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class Pi{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(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 Fi(s){var e;let t=null;return"getRootNode"in s&&((e=O.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&O.host(O.getRootNode(s))&&(t=O.host(O.getRootNode(s))),t}function Xa(s){let e=s,t;for(;t=Fi(e);)e=t;return e}function Ja(s){const e=s.ownerDocument;if(!e)return!1;const t=Xa(s);return O.contains(e,t)}function Bi(s){const e=s.ownerDocument;return e?O.contains(e,s)||Ja(s):!1}const op=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Pi,get _mirror(){return exports.mirror},closestElementOfNode:Ti,getBaseDimension:Li,getNestedRule:Ze,getPositionsAndIndex:Xs,getRootShadowHost:Xa,getShadowHost:Fi,getWindowHeight:Ai,getWindowScroll:Ri,getWindowWidth:Oi,hasShadowRoot:Re,hookSetter:Ot,inDom:Bi,isAncestorRemoved:Di,isBlocked:te,isIgnored:cr,isSerialized:Ha,isSerializedIframe:Ke,isSerializedStylesheet:$i,iterateResolveTree:ki,legacy_isTouchEvent:Nr,nowTimestamp:Le,on:ee,polyfill:_i,queueToResolveTrees:Ya,shadowHostInDom:Ja,throttle:it,uniqueTextMutations:Za},Symbol.toStringTag,{value:"Module"}));var I=(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))(I||{}),E=(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[s.VisibilityMutation=17]="VisibilityMutation",s))(E||{}),F=(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))(F||{}),ve=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(ve||{}),xe=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(xe||{}),Ne=(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))(Ne||{}),P=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(P||{}),Se=(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))(Se||{});function zn(s){return"__ln"in s}class ap{constructor(){b(this,"length",0),b(this,"head",null),b(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&&zn(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&&zn(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 Gn=(s,e)=>`${s}@${e}`;class lp{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"excludeAttribute"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"visibilityManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new ap,i=l=>{let u=l,c=yt;for(;c===yt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=O.parentNode(l);if(!u||!Bi(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=dt(u)?this.mirror.getId(Fi(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const g=Ye(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,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:p=>{Ke(p,this.mirror)&&this.iframeManager.addIframe(p),$i(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Re(l)&&this.shadowDomManager.addShadowRoot(O.shadowRoot(l),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:c});g&&(e.push({parentId:h,nextId:f,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)jn(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(O.parentNode(l))||o(l);for(const l of this.addedSet)!Hn(this.droppedSet,l)&&!jn(this.removesSubTreeCache,l,this.mirror)||Hn(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){const u=this.mirror.getId(O.parentNode(n.value)),c=i(n.value);u!==-1&&c!==-1&&(l=n)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(O.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const g=c.value,p=O.parentNode(g);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=O.host(p);if(this.mirror.getId(y)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=O.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),b(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(O.childNodes(e),i=>O.textContent(i)||"").join("");t.attributes.value=dr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:pr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!cr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=O.textContent(e.target);!te(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:mo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ti(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);const n=t[r],a=typeof n=="boolean",l=document.contains(t),u=ti(t),c=gs(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${Le()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:O.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(gs(r,this.excludeAttribute)){console.debug(`[${Le()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:O.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const g=pr(t);i=dr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:g,value:i,maskInputFn:this.maskInputFn})}if(te(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let f=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(f||(f={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(e.target,f)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!po(t.tagName,r))if(f.attributes[r]=fo(this.doc,Oe(t.tagName),Oe(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${Le()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===n?"mirrored in DOM property":null,i===f.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:O.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:f.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const d=t.style.getPropertyValue(y),m=t.style.getPropertyPriority(y);d!==p.style.getPropertyValue(y)||m!==p.style.getPropertyPriority(y)?m===""?f.styleDiff[y]=d:f.styleDiff[y]=[d,m]:f._unchangedStyles[y]=[d,m]}for(const y of Array.from(p.style))t.style.getPropertyValue(y)===""&&(f.styleDiff[y]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.attributes.rr_open_mode="non-modal");break}case"childList":{if(te(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=dt(e.target)?this.mirror.getId(O.host(e.target)):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,!1)||cr(t,this.mirror,this.slimDOMOptions)||!Ha(t,this.mirror)||(this.addedSet.has(t)?(Js(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Di(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Gn(r,i)]?Js(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:dt(e.target)&&pt(e.target)?!0:void 0}),up(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(cr(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[Gn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,!1)||(O.childNodes(e).forEach(r=>this.genAdds(r)),Re(e)&&O.childNodes(O.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","visibilityManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze(),this.visibilityManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.visibilityManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock(),this.visibilityManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.visibilityManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset(),this.visibilityManager.reset()}}function Js(s,e){s.delete(e),O.childNodes(e).forEach(t=>Js(s,t))}function up(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),O.childNodes(r).forEach(i=>t.push(i)))}}function jn(s,e,t){return s.size===0?!1:cp(s,e)}function cp(s,e,t){const r=O.parentNode(e);return r?s.has(r):!1}function Hn(s,e){return s.size===0?!1:Ka(s,e)}function Ka(s,e){const t=O.parentNode(e);return t?s.has(t)?!0:Ka(s,t):!1}let gt;function hp(s){gt=s}function fp(){gt=void 0}const L=s=>gt?(...t)=>{try{return s(...t)}catch(r){if(gt&&gt(r)===!0)return;throw r}}:s,$e=[];function Tt(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 Qa(s,e){const t=new lp;$e.push(t),t.init(s);const r=new(ja())(L(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function dp({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],a;const l=it(L(h=>{const f=Date.now()-a;s(n.map(g=>(g.timeOffset-=f,g)),h),n=[],a=null}),o),u=L(it(L(h=>{const f=Tt(h),{clientX:g,clientY:p}=Nr(h)?h.changedTouches[0]:h;a||(a=Le()),n.push({x:g,y:p,id:r.getId(f),timeOffset:Le()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return L(()=>{c.forEach(h=>h())})}function pp({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Tt(h);if(te(f,r,i,!0))return;let g=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":g=ve.Mouse;break;case"touch":g=ve.Touch;break;case"pen":g=ve.Pen;break}g===ve.Touch?F[c]===F.MouseDown?p="TouchStart":F[c]===F.MouseUp&&(p="TouchEnd"):ve.Pen}else Nr(h)&&(g=ve.Touch);g!==null?(l=g,(p.startsWith("Touch")&&g===ve.Touch||p.startsWith("Mouse")&&g===ve.Mouse)&&(g=null)):F[c]===F.Click&&(g=l,l=null);const y=Nr(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:m,clientY:v}=y;L(s)(M({type:F[p],id:d,x:m,y:v},g!==null&&{pointerType:g}))};return Object.keys(F).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=Oe(c);const f=u(c);if(window.PointerEvent)switch(F[c]){case F.MouseDown:case F.MouseUp:h=h.replace("mouse","pointer");break;case F.TouchStart:case F.TouchEnd:return}a.push(ee(h,f,e))}),L(()=>{a.forEach(c=>c())})}function qa({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=L(it(L(a=>{const l=Tt(a);if(!l||te(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=Ri(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return ee("scroll",n,e)}function mp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=L(it(L(()=>{const o=Ai(),n=Oi();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return ee("resize",i,e)}const us=["INPUT","TEXTAREA","SELECT"],Yn=new WeakMap;function gp({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(v){let S=Tt(v);const w=v.isTrusted,C=S&&S.tagName;if(S&&C==="OPTION"&&(S=O.parentElement(S)),!S||!C||us.indexOf(C)<0||te(S,r,i,!0)||S.classList.contains(o)||n&&S.matches(n))return;let N=S.value,T=!1;const D=pr(S)||"";D==="radio"||D==="checkbox"?T=S.checked:(a[C.toLowerCase()]||a[D])&&(N=dr({element:S,maskInputOptions:a,tagName:C,type:D,value:N,maskInputFn:l})),f(S,c?{text:N,isChecked:T,userTriggered:w}:{text:N,isChecked:T});const X=S.name;D==="radio"&&X&&T&&e.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(z=>{if(z!==S){const re=z.value;f(z,c?{text:re,isChecked:!T,userTriggered:!1}:{text:re,isChecked:!T})}})}function f(v,S){const w=Yn.get(v),C=v,N=C.hasAttribute("placeholder"),T=C.value==="",D=typeof C.defaultValue=="string"?C.defaultValue==="":!0,X=!S.userTriggered,z=!w||w.text==="",re=N&&T&&D&&z&&X&&!S.isChecked&&C.type!=="hidden"&&us.includes(C.tagName),ne=C.tagName==="INPUT"&&C.type==="text"&&!S.userTriggered&&S.text===C.defaultValue&&!w&&C.hasAttribute("placeholder"),ae=!S.userTriggered&&C.value===C.defaultValue&&!w&&C.hasAttribute("placeholder")&&!S.isChecked&&C.type!=="hidden"&&us.includes(C.tagName),R=C.type==="checkbox"&&!S.userTriggered&&!S.isChecked&&!w,le=C.type==="radio"&&!S.userTriggered&&!S.isChecked&&!w;if(!(re||ne||ae||R||le)&&(!w||w.text!==S.text||w.isChecked!==S.isChecked)){Yn.set(v,S);const ue=t.getId(v);L(s)(Q(M({},S),{id:ue}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(v=>ee(v,L(h),e)),y=e.defaultView;if(!y)return()=>{p.forEach(v=>v())};const d=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),m=[[y.HTMLInputElement.prototype,"value"],[y.HTMLInputElement.prototype,"checked"],[y.HTMLSelectElement.prototype,"value"],[y.HTMLTextAreaElement.prototype,"value"],[y.HTMLSelectElement.prototype,"selectedIndex"],[y.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&p.push(...m.map(v=>Ot(v[0],v[1],{set(){L(h)({target:this,isTrusted:!1})}},!1,y))),L(()=>{p.forEach(v=>v())})}function Rr(s){const e=[];function t(r,i){if(rr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||rr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||rr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||rr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(n)}return i}return t(s,e)}function Me(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function yp({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:L((c,h,f)=>{const[g,p]=f,{id:y,styleId:d}=Me(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&s({id:y,styleId:d,adds:[{rule:g,index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:L((c,h,f)=>{const[g]=f,{id:p,styleId:y}=Me(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,removes:[{index:g}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:L((c,h,f)=>{const[g]=f,{id:p,styleId:y}=Me(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,replace:g}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:L((c,h,f)=>{const[g]=f,{id:p,styleId:y}=Me(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,replaceSync:g}),c.apply(h,f)})}));const l={};sr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(sr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),sr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),sr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:L((f,g,p)=>{const[y,d]=p,{id:m,styleId:v}=Me(g.parentStyleSheet,e,t.styleMirror);return(m&&m!==-1||v&&v!==-1)&&s({id:m,styleId:v,adds:[{rule:y,index:[...Rr(g),d||0]}]}),f.apply(g,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:L((f,g,p)=>{const[y]=p,{id:d,styleId:m}=Me(g.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,removes:[{index:[...Rr(g),y]}]}),f.apply(g,p)})})}),L(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function el({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(O.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=l.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(f){}return h}}),L(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function bp({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:L((a,l,u)=>{var c;const[h,f,g]=u;if(t.has(h))return o.apply(l,[h,f,g]);const{id:p,styleId:y}=Me((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,set:{property:h,value:f,priority:g},index:Rr(l.parentRule)}),a.apply(l,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:L((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:g}=Me((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&s({id:f,styleId:g,remove:{property:h},index:Rr(l.parentRule)}),a.apply(l,u)})}),L(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function wp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=L(l=>it(L(u=>{const c=Tt(u);if(!c||te(c,e,t,!0))return;const{currentTime:h,volume:f,muted:g,playbackRate:p,loop:y}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:g,playbackRate:p,loop:y})}),i.media||500)),a=[ee("play",n(Ne.Play),o),ee("pause",n(Ne.Pause),o),ee("seeked",n(Ne.Seeked),o),ee("volumechange",n(Ne.VolumeChange),o),ee("ratechange",n(Ne.RateChange),o)];return L(()=>{a.forEach(l=>l())})}function vp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const n=Be(e.fonts,"add",function(a){return function(l){return setTimeout(L(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),L(()=>{r.forEach(a=>a())})}function Sp(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const a=L(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:g,startOffset:p,endContainer:y,endOffset:d}=f;te(g,r,i,!0)||te(y,r,i,!0)||u.push({start:t.getId(g),startOffset:p,end:t.getId(y),endOffset:d})}o({ranges:u})});return a(),ee("selectionchange",a)}function Cp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Be(t.customElements,"define",function(i){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,a])}})}function Ep(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,visibilityMutationCb:f,fontCb:g,selectionCb:p,customElementCb:y}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),n(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),l(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},s.visibilityMutationCb=(...d)=>{e.visibilityMutation&&e.visibilityMutation(...d),f(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),g(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),p(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function xp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Ep(s,e);let r;s.recordDOM&&(r=Qa(s,s.doc));const i=dp(s),o=pp(s),n=qa(s),a=mp(s,{win:t}),l=gp(s),u=wp(s);let c=()=>{},h=()=>{},f=()=>{},g=()=>{};s.recordDOM&&(c=yp(s,{win:t}),h=el(s,s.doc),f=bp(s,{win:t}),s.collectFonts&&(g=vp(s)));const p=Sp(s),y=Cp(s),d=[];for(const m of s.plugins)d.push(m.observer(m.callback,t,m.options));return L(()=>{$e.forEach(m=>m.reset()),r==null||r.disconnect(),i(),o(),n(),a(),l(),u(),c(),h(),f(),g(),p(),y(),d.forEach(m=>m())})}function rr(s){return typeof window[s]!="undefined"}function sr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Zn{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=i.get(t);return o||-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 Ip{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Zn(ho)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Zn(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 o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case I.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:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),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 E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.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 o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));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!==Se.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Mp{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(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(!pt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Qa(Q(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(qa(Q(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(O.host(e))),this.restoreHandlers.push(el({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(Be(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=O.shadowRoot(this);return a&&Bi(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var ir=0;ir<Xe.length;ir++)ct[Xe.charCodeAt(ir)]=ir;var Np=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Xe[e[t]>>2],i+=Xe[(e[t]&3)<<4|e[t+1]>>4],i+=Xe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Xe[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},Rp=function(s){var e=s.length*.75,t=s.length,r,i=0,o,n,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=ct[s.charCodeAt(r)],n=ct[s.charCodeAt(r+1)],a=ct[s.charCodeAt(r+2)],l=ct[s.charCodeAt(r+3)],c[i++]=o<<2|n>>4,c[i++]=(n&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const Xn=new Map;function Ap(s,e){let t=Xn.get(s);return t||(t=new Map,Xn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const tl=(s,e,t)=>{if(!s||!(sl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Ap(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function hr(s,e,t){if(s instanceof Array)return s.map(r=>hr(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=Np(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[hr(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:[hr(s.data,e,t),s.width,s.height]};if(sl(s,e)||typeof s=="object"){const r=s.constructor.name,i=tl(s,e,t);return{rr_type:r,index:i}}}}return s}const rl=(s,e,t)=>s.map(r=>hr(r,e,t)),sl=(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 Op(s,e,t,r){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const a=Be(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return te(this.canvas,t,r,!0)||setTimeout(()=>{const c=rl(u,e,this);s(this.canvas,{type:xe["2D"],property:n,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Ot(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:xe["2D"],property:n,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function Tp(s){return s==="experimental-webgl"?"webgl":s}function Jn(s,e,t,r){const i=[];try{const o=Be(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!te(this,e,t,!0)){const u=Tp(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[a,...l])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Kn(s,e,t,r,i,o){const n=[],a=Object.getOwnPropertyNames(s);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;const u=Be(s,l,function(c){return function(...h){const f=c.apply(this,h);if(tl(f,o,this),"tagName"in this.canvas&&!te(this.canvas,r,i,!0)){const g=rl(h,o,this),p={type:e,property:l,args:g};t(this.canvas,p)}return f}});n.push(u)}catch(u){const c=Ot(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function Dp(s,e,t,r){const i=[];return i.push(...Kn(e.WebGLRenderingContext.prototype,xe.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Kn(e.WebGL2RenderingContext.prototype,xe.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const il="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",_p=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Qn=typeof window!="undefined"&&window.Blob&&new Blob([_p(il)],{type:"text/javascript;charset=utf-8"});function kp(s){let e;try{if(e=Qn&&(window.URL||window.webkitURL).createObjectURL(Qn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+il,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class $p{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{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,o){const n=Jn(t,r,i,!0),a=new Map,l=new kp;l.onmessage=p=>{const{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;const{base64:d,type:m,width:v,height:S}=p.data;this.mutationCb({id:y,type:xe["2D"],commands:[{property:"clearRect",args:[0,0,v,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:m}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(y=>{te(y,r,i,!0)||p.push(y)}),p},g=p=>{if(c&&p-c<u){h=requestAnimationFrame(g);return}c=p,f().forEach(async y=>{var d;const m=this.mirror.getId(y);if(a.get(m)||y.width===0||y.height===0)return;if(a.set(m,!0),["webgl","webgl2"].includes(y.__context)){const S=y.getContext(y.__context);((d=S==null?void 0:S.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&S.clear(S.COLOR_BUFFER_BIT)}const v=await createImageBitmap(y);l.postMessage({id:m,bitmap:v,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[v])}),h=requestAnimationFrame(g)};h=requestAnimationFrame(g),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Jn(e,t,r,!1),o=Op(this.processMutation.bind(this),e,t,r),n=Dp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}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(n=>{const u=n,{type:a}=u;return Ve(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Lp{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Pi),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 o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:uo(a,o.href),index:l}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Pp{constructor(){b(this,"nodeMap",new WeakMap),b(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(){}}function Fp(s,e,t){var c,h,f,g,p,y;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,o=(f=t==null?void 0:t.sensitivity)!=null?f:.05,n=Bp((g=t==null?void 0:t.rootMargin)!=null?g:"0px"),a=new Map,l=Up(r),u=Vp(l,n);for(const d of s){const m=d.getBoundingClientRect();let v=Gp(),S=0;m.width>0&&m.height>0&&(v=Wp(m,u),S=zp(m,v),S=Math.round(S*100)/100);const w=jp(d),C=(p=e.get(d))!=null?p:null,N=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,T=S,D=(C==null?void 0:C.isStyleVisible)&&N>i,X=w&&T>i;!C||D!==X||D!==X&&Math.abs(T-N)>o?a.set(d,{target:d,isVisible:X,isStyleVisible:w,intersectionRatio:T,intersectionRect:v,oldValue:C}):a.set(d,C)}return a}function Bp(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),o=t(e[1]||e[0]||"0px",r.width),n=t(e[2]||e[0]||"0px",r.height),a=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:o,bottom:n,left:a,width:0,height:0}}}function Up(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Vp(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Wp(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),o=Math.min(s.right,e.right),n=Math.max(0,o-r),a=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:o,width:n,height:a}}function zp(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Gp(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function jp(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Hp{constructor(e){var u,c,h,f,g,p;b(this,"frozen",!1),b(this,"locked",!1),b(this,"pending",new Map),b(this,"mirror"),b(this,"mutationCb"),b(this,"rafId",null),b(this,"rafThrottle"),b(this,"lastFlushTime",0),b(this,"elements",new Set),b(this,"previousState",new Map),b(this,"root",null),b(this,"threshold"),b(this,"sensitivity"),b(this,"rootMargin"),b(this,"hasInitialized",!1),b(this,"mode","none"),b(this,"debounce",50),b(this,"throttle",100),b(this,"buffer",new Map),b(this,"debounceTimer",null),b(this,"lastThrottleTime",0),b(this,"disabled",!1),b(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:o,notifyActivity:n}=e;if(this.mirror=r,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",i===!1){this.disabled=!0;return}const a=typeof i=="object"&&i!==null?i:{};this.mode=(u=a==null?void 0:a.mode)!=null?u:"none",this.debounce=Number((c=a==null?void 0:a.debounce)!=null?c:100),this.throttle=Number((h=a==null?void 0:a.throttle)!=null?h:100),this.threshold=Number((f=a==null?void 0:a.threshold)!=null?f:.5),this.sensitivity=Number((g=a==null?void 0:a.sensitivity)!=null?g:.05),this.rafThrottle=Number((p=a==null?void 0:a.rafThrottle)!=null?p:100),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(d=>{d.addedNodes.forEach(m=>{m.nodeType===Node.ELEMENT_NODE&&(this.observe(m),m.querySelectorAll("*").forEach(v=>this.observe(v)))}),d.removedNodes.forEach(m=>{m.nodeType===Node.ELEMENT_NODE&&this.unobserve(m)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(this.disabled)return;const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Fp(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const n=this.mirror.getId(t);n!==-1&&this.buffer.set(t,{id:n,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&cancelAnimationFrame(this.rafId)}}let Y,fr,cs,hs,Ar=!1;const Or=[];let ht;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Zi=s.contentWindow)==null?void 0:Zi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const he=co();function Ie(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:g,maskInputOptions:p,slimDOMOptions:y,maskInputFn:d,maskTextFn:m,hooks:v,packFn:S,sampling:w={},dataURLOptions:C={},mousemoveWait:N,recordDOM:T=!0,recordCanvas:D=!1,recordCrossOriginIframes:X=!1,recordAfter:z=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:re=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:ne=!1,collectFonts:ae=!1,inlineImages:R=!1,plugins:le,keepIframeSrcFn:ue=()=>!1,ignoreCSSAttributes:k=new Set([]),errorHandler:ce}=s;hp(ce);const fe=X?window.parent===window:!0;let se=!1;if(!fe)try{window.parent.document&&(se=!1)}catch(_){se=!0}if(fe&&!e)throw new Error("emit function is required");if(!fe&&!se)return()=>{};N!==void 0&&w.mousemove===void 0&&(w.mousemove=N),he.reset();const jr=u===void 0?/.^/:u,Hr=g===!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},Yr=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all",headTitleMutations:y==="all"}:y||{};_i();let Ui,Zr=0,Xr=0;const hl=_=>{Xr+=_},Vi=_=>{for(const ie of le||[])ie.eventProcessor&&(_=ie.eventProcessor(_));return S&&!se&&(_=S(_)),_};Y=(_,ie)=>{var J;const K=_;if(K.timestamp=Le(),(J=$e[0])!=null&&J.isFrozen()&&K.type!==I.FullSnapshot&&!(K.type===I.IncrementalSnapshot&&K.data.source===E.Mutation)&&$e.forEach(ge=>ge.unfreeze()),fe)e==null||e(Vi(K),ie);else if(se){const ge={type:"rrweb",event:Vi(K),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(ge,"*")}if(K.type===I.FullSnapshot)Ui=K,Zr=0;else if(K.type===I.IncrementalSnapshot){if(K.data.source===E.Mutation&&K.data.isAttachIframe)return;Zr++;const ge=r&&Zr>=r,V=t&&K.timestamp-Ui.timestamp>t,Ue=i&&Xr>=i;(ge||V||Ue)&&(Ue&&(Xr=0),fr(!0))}};const Dt=_=>{Y({type:I.IncrementalSnapshot,data:M({source:E.Mutation},_)})},Wi=_=>Y({type:I.IncrementalSnapshot,data:M({source:E.Scroll},_)}),zi=_=>Y({type:I.IncrementalSnapshot,data:M({source:E.CanvasMutation},_)}),Gi=_=>{var ie;(ie=v==null?void 0:v.visibilityMutation)==null||ie.call(v,_),Y({type:I.IncrementalSnapshot,data:M({source:E.VisibilityMutation},_)})},fl=_=>Y({type:I.IncrementalSnapshot,data:M({source:E.AdoptedStyleSheet},_)}),_e=new Lp({mutationCb:Dt,adoptedStyleSheetCb:fl}),ke=new Ip({mirror:he,mutationCb:Dt,stylesheetManager:_e,recordCrossOriginIframes:X,wrappedEmit:Y});for(const _ of le||[])_.getMirror&&_.getMirror({nodeMirror:he,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror});const Jr=new Pp;cs=new $p({recordCanvas:D,mutationCb:zi,win:window,blockClass:o,blockSelector:n,mirror:he,sampling:w.canvas,dataURLOptions:C}),hs=new Hp({doc:window.document,mirror:he,sampling:w.visibility,mutationCb:Gi,notifyActivity:hl});const _t=new Mp({mutationCb:Dt,scrollCb:Wi,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:jr,inlineStylesheet:f,maskInputOptions:Hr,dataURLOptions:C,maskTextFn:m,maskInputFn:d,recordCanvas:D,inlineImages:R,sampling:w,slimDOMOptions:Yr,iframeManager:ke,stylesheetManager:_e,canvasManager:cs,visibilityManager:hs,keepIframeSrcFn:ue,processedNodeManager:Jr},mirror:he});fr=(_=!1)=>{if(!T)return;Y({type:I.Meta,data:{href:window.location.href,width:Oi(),height:Ai()}},_),_e.reset(),_t.init(),$e.forEach(J=>J.lock());const ie=Su(document,{mirror:he,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:jr,inlineStylesheet:f,maskAllInputs:Hr,maskTextFn:m,maskInputFn:d,slimDOM:Yr,dataURLOptions:C,recordCanvas:D,inlineImages:R,onSerialize:J=>{Ke(J,he)&&ke.addIframe(J),$i(J,he)&&_e.trackLinkElement(J),Re(J)&&_t.addShadowRoot(O.shadowRoot(J),document)},onIframeLoad:(J,K)=>{ke.attachIframe(J,K),_t.observeAttachShadow(J)},onStylesheetLoad:(J,K)=>{_e.attachLinkElement(J,K)},keepIframeSrcFn:ue});if(!ie)return console.warn("Failed to snapshot the document");Y({type:I.FullSnapshot,data:{node:ie,initialOffset:Ri(window)}},_),$e.forEach(J=>J.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&_e.adoptStyleSheets(document.adoptedStyleSheets,he.getId(document))},ht=()=>{for(const _ of Or)Y(_);Or.length=0};try{const _=[],ie=K=>{var ge;return L(xp)({mutationCb:Dt,mousemoveCb:(V,Ue)=>Y({type:I.IncrementalSnapshot,data:{source:Ue,positions:V}}),mouseInteractionCb:V=>Y({type:I.IncrementalSnapshot,data:M({source:E.MouseInteraction},V)}),scrollCb:Wi,viewportResizeCb:V=>Y({type:I.IncrementalSnapshot,data:M({source:E.ViewportResize},V)}),inputCb:V=>Y({type:I.IncrementalSnapshot,data:M({source:E.Input},V)}),mediaInteractionCb:V=>Y({type:I.IncrementalSnapshot,data:M({source:E.MediaInteraction},V)}),styleSheetRuleCb:V=>Y({type:I.IncrementalSnapshot,data:M({source:E.StyleSheetRule},V)}),styleDeclarationCb:V=>Y({type:I.IncrementalSnapshot,data:M({source:E.StyleDeclaration},V)}),canvasMutationCb:zi,visibilityMutationCb:Gi,fontCb:V=>Y({type:I.IncrementalSnapshot,data:M({source:E.Font},V)}),selectionCb:V=>{Y({type:I.IncrementalSnapshot,data:M({source:E.Selection},V)})},customElementCb:V=>{Y({type:I.IncrementalSnapshot,data:M({source:E.CustomElement},V)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:h,excludeAttribute:jr,maskInputOptions:Hr,inlineStylesheet:f,sampling:w,recordDOM:T,recordCanvas:D,inlineImages:R,userTriggeredOnInput:ne,collectFonts:ae,doc:K,maskInputFn:d,maskTextFn:m,keepIframeSrcFn:ue,blockSelector:n,slimDOMOptions:Yr,dataURLOptions:C,mirror:he,iframeManager:ke,stylesheetManager:_e,shadowDomManager:_t,processedNodeManager:Jr,canvasManager:cs,visibilityManager:hs,ignoreCSSAttributes:k,plugins:((ge=le==null?void 0:le.filter(V=>V.observer))==null?void 0:ge.map(V=>({observer:V.observer,options:V.options,callback:Ue=>Y({type:I.Plugin,data:{plugin:V.name,payload:Ue}})})))||[]},v)};ke.addLoadListener(K=>{try{_.push(ie(K.contentDocument))}catch(ge){console.warn(ge)}});const J=()=>{re==="before"&&ht(),fr(),_.push(ie(document)),Ar=!0,re==="after"&&ht()};return document.readyState==="interactive"||document.readyState==="complete"?J():(_.push(ee("DOMContentLoaded",()=>{Y({type:I.DomContentLoaded,data:{}}),z==="DOMContentLoaded"&&J()})),_.push(ee("load",()=>{Y({type:I.Load,data:{}}),z==="load"&&J()},window))),()=>{ht(),_.forEach(K=>K()),Jr.destroy(),Ar=!1,fp()}}catch(_){console.warn(_)}}Ie.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Or.length} events`),ht()};Ie.addCustomEvent=(s,e)=>{const t={type:I.Custom,data:{tag:s,payload:e}};if(!Ar){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),Or.push(t);return}Y(t)};Ie.freezePage=()=>{$e.forEach(s=>s.freeze())};Ie.takeFullSnapshot=s=>{if(!Ar)throw new Error("please take full snapshot after start recording");fr(s)};Ie.mirror=he;function nl(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const Yp=Object.freeze(Object.defineProperty({__proto__:null,default:nl},Symbol.toStringTag,{value:"Module"}));function Zp(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function n(m){const v=["MSIE ","Trident/","Edge/"];return new RegExp(v.join("|")).test(m)}const a=n(s.navigator.userAgent)?1:0;function l(m,v){this.scrollLeft=m,this.scrollTop=v}function u(m){return .5*(1-Math.cos(Math.PI*m))}function c(m){if(m===null||typeof m!="object"||m.behavior===void 0||m.behavior==="auto"||m.behavior==="instant")return!0;if(typeof m=="object"&&m.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+m.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(m,v){if(v==="Y")return m.clientHeight+a<m.scrollHeight;if(v==="X")return m.clientWidth+a<m.scrollWidth}function f(m,v){const S=s.getComputedStyle(m,null)["overflow"+v];return S==="auto"||S==="scroll"}function g(m){const v=h(m,"Y")&&f(m,"Y"),S=h(m,"X")&&f(m,"X");return v||S}function p(m){for(;m!==e.body&&g(m)===!1;)m=m.parentNode||m.host;return m}function y(m){const v=o();let S,w,C,N=(v-m.startTime)/r;N=N>1?1:N,S=u(N),w=m.startX+(m.x-m.startX)*S,C=m.startY+(m.y-m.startY)*S,m.method.call(m.scrollable,w,C),(w!==m.x||C!==m.y)&&s.requestAnimationFrame(y.bind(s,m))}function d(m,v,S){let w,C,N,T;const D=o();m===e.body?(w=s,C=s.scrollX||s.pageXOffset,N=s.scrollY||s.pageYOffset,T=i.scroll):(w=m,C=m.scrollLeft,N=m.scrollTop,T=l),y({scrollable:w,method:T,startTime:D,startX:C,startY:N,x:v,y:S})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}d.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}d.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const m=arguments[0].left,v=arguments[0].top;d.call(this,this,typeof m=="undefined"?this.scrollLeft:~~m,typeof v=="undefined"?this.scrollTop:~~v)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const m=p(this),v=m.getBoundingClientRect(),S=this.getBoundingClientRect();m!==e.body?(d.call(this,m,m.scrollLeft+S.left-v.left,m.scrollTop+S.top-v.top),s.getComputedStyle(m).position!=="fixed"&&s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})):s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class Xp{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function qn(s,e){if(s.type===I.IncrementalSnapshot&&s.data.source===E.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************
68
68
  Copyright (c) Microsoft Corporation.
69
69
 
70
70
  Permission to use, copy, modify, and/or distribute this software for any
@@ -77,7 +77,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
77
77
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
78
78
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
79
79
  PERFORMANCE OF THIS SOFTWARE.
80
- ***************************************************************************** */function Jn(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,o=t.call(s),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return n}var Xe;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Xe||(Xe={}));var nl={type:"xstate.init"};function cs(s){return s===void 0?[]:[].concat(s)}function Ge(s){return{type:"xstate.assign",assignment:s}}function Kn(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Ar(s){return function(e){return s===e}}function ol(s){return typeof s=="string"?{type:s}:s}function Qn(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Ar(s)}}function qn(s,e,t){var r=e,i=!1;return[s.filter(function(o){if(o.type==="xstate.assign"){i=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,i]}function al(s,e){e===void 0&&(e={});var t=Jn(qn(cs(s.states[s.initial].entry).map(function(n){return Kn(n,e.actions)}),s.context,nl),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Ar(s.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:s.context}:n,h=c.value,f=c.context,m=ol(a),d=s.states[h];if(d.on){var p=cs(d.on[m.type]);try{for(var g=function(J){var q=typeof Symbol=="function"&&Symbol.iterator,ne=q&&J[q],ce=0;if(ne)return ne.call(J);if(J&&typeof J.length=="number")return{next:function(){return J&&ce>=J.length&&(J=void 0),{value:J&&J[ce++],done:!J}}};throw new TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),y=g.next();!y.done;y=g.next()){var v=y.value;if(v===void 0)return Qn(h,f);var w=typeof v=="string"?{target:v}:v,C=w.target,x=w.actions,T=x===void 0?[]:x,P=w.cond,S=P===void 0?function(){return!0}:P,R=C===void 0,z=C!=null?C:h,Z=s.states[z];if(S(f,m)){var ie=Jn(qn((R?cs(T):[].concat(d.exit,T,Z.entry).filter(function(J){return J})).map(function(J){return Kn(J,o._options.actions)}),f,m),3),le=ie[0],oe=ie[1],O=ie[2],ue=C!=null?C:h;return{value:ue,context:oe,actions:le,changed:C!==h||le.length>0||O,matches:Ar(ue)}}}}catch(J){l={error:J}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}}return Qn(h,f)}};return o}var eo=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function ll(s){var e=s.initialState,t=Xe.NotStarted,r=new Set,i={_machine:s,send:function(o){t===Xe.Running&&(e=s.transition(e,o),eo(e,ol(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:s.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:Ar(n.value)}}return t=Xe.Running,eo(e,nl),i},stop:function(){return t=Xe.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function kp(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===M.Meta&&r.timestamp<=e)return s.slice(t)}return s}function $p(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=al({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ge({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:Ge((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),ee(N({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=o;a.clear();for(const d of l)Xn(d,u);const h=kp(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===M.IncrementalSnapshot&&c.data.source===I.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit($.PlayBack);const m=new Array;for(const d of h)if(!(f&&f<u&&(d.timestamp<=f||d===c)))if(d.timestamp<u)m.push(d);else{const p=e(d,!1);a.addAction({doAction:()=>{p()},delay:d.delay})}t(m),r.emit($.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:Ge(o=>ee(N({},o),{lastPlayedEvent:null})),startLive:Ge({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:Ge((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;Xn(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let d=-1,p=0;for(;p<=h;){const g=Math.floor((p+h)/2);u[g].timestamp<=c.timestamp?p=g+1:h=g-1}d===-1&&(d=p),u.splice(d,0,c)}const f=c.timestamp<a,m=e(c,f);f?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:c.delay})}return ee(N({},o),{events:u})})}});return ll(i)}function Lp(s){const e=al({id:"speed",context:s,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:Ge({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return ll(e)}const Pp=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],to=new Map;function ul(s,e){let t=to.get(s);return t||(t=new Map,to.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Ae(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await Ae(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:o}=r;return ul(e,i)[o]}else if("args"in r){const{rr_type:i,args:o}=r,n=window[i];return new n(...await Promise.all(o.map(Ae(s,e,t))))}else{if("base64"in r)return Sp(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const o=new Image;return o.src=r.src,s.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(Ae(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Ae(s,e,t)));return r}}function Fp(s,e){try{return e===xe.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const Bp=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Up(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Bp.includes(t))return;const r=ul(s,t);r.includes(e)||r.push(e)}async function Wp({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const o=Fp(e,t);if(!o)return;if(s.setter){o[s.property]=s.args[0];return}const n=o[s.property],a=await Promise.all(s.args.map(Ae(r,o))),l=n.apply(o,a);Up(o,l);const u=!1}catch(o){i(s,o)}}async function Vp({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(Ae(r,o))));(await Promise.all(n)).forEach((l,u)=>{const c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}const h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(o,c.args)):h.apply(o,l)}catch(h){i(c,h)}})}async function Zs({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{const n=i.get(s)||e,a="commands"in n?n.commands:[n];if([xe.WebGL,xe.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Wp({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await Vp({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class zp{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on($.Start,this.start.bind(this)),this.emitter.on($.SkipStart,this.start.bind(this)),this.emitter.on($.Pause,this.pause.bind(this)),this.emitter.on($.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var m,d,p,g,y;const i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===Ne.Play||o!==Ne.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(m=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?m:0,lastInteractionTimeOffset:t,playbackRate:(d=n!=null?n:i==null?void 0:i.playbackRate)!=null?d:1,volume:(p=u!=null?u:i==null?void 0:i.volume)!=null?p:1,muted:(g=l!=null?l:i==null?void 0:i.muted)!=null?g:e.getAttribute("muted")===null,loop:(y=c!=null?c:i==null?void 0:i.loop)!=null?y:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:o,isPlaying:n}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),n&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&n&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let m=0;typeof a.rr_mediaCurrentTime=="number"&&(m=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function sr(s,e){if(s.nodeName!=="DIALOG"||s instanceof me)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function Gp(s,e){if(s.nodeName!=="DIALOG"||s instanceof me)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const jp=5*1e3,Hp=il||Dp,ro="[replayer]",hs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function so(s){return s.type==M.IncrementalSnapshot&&(s.data.source==I.TouchMove||s.data.source==I.MouseInteraction&&s.data.type==L.TouchStart)}class Yp{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new it),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Hp()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",yn()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",oo()),b(this,"styleMirror",new ki),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),b(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case M.DomContentLoaded:case M.Load:case M.Custom:continue;case M.FullSnapshot:case M.Meta:case M.Plugin:case M.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case M.DomContentLoaded:case M.Load:break;case M.Custom:u=()=>{this.emitter.emit($.CustomEvent,a)};break;case M.Meta:u=()=>this.emitter.emit($.Resize,{width:a.data.width,height:a.data.height});break;case M.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case M.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/jp),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit($.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit($.Finish))};let m=50;a.type===M.IncrementalSnapshot&&a.data.source===I.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit($.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:hs,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on($.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on($.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Zs({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===I.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===I.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Er(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],c=Ir(u.node,this.mirror,this.virtualDom.mirror);Er(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on($.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new _p([],{speed:this.config.speed});this.service=$p({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit($.StateChange,{player:a})}),this.speedService=Lp({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit($.StateChange,{speed:a})}),this.mediaManager=new zp({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===M.Meta),n=this.service.state.context.events.find(a=>a.type===M.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit($.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(so)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit($.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit($.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit($.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit($.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;so(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=yn()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Tp(this.iframe.contentWindow,this.iframe.contentDocument),Oi(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],i=new Set,o=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),mh(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),i.forEach(l=>sr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit($.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=Pp(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Va(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:I.StyleSheetRule,adds:i.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<i.length;n++)(r=o.sheet)==null||r.insertRule(i[n],n)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(i,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===Ce.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};dt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);o.forEach(a=>sr(a))}collectIframeAndAttachDocument(e,t){if(Je(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on($.Start,n),this.emitter.on($.Pause,n);const a=()=>{this.emitter.off($.Start,n),this.emitter.off($.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit($.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit($.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===M.IncrementalSnapshot&&t.data.source===I.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),o=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(Ae(this.imageMap,null,r)));return ee(N({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ee(N({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Ae(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ee(N({},e),{args:i}))}}}applyIncremental(e,t){var r,i,o;const{data:n}=e;switch(n.source){case I.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case I.Drag:case I.TouchMove:case I.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case I.MouseInteraction:{if(n.id===-1)break;const a=new Event(Oe(L[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit($.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case L.Blur:"blur"in l&&l.blur();break;case L.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case L.Click:case L.TouchStart:case L.TouchEnd:case L.MouseDown:case L.MouseUp:t?(n.type===L.TouchStart?this.touchActive=!0:n.type===L.TouchEnd&&(this.touchActive=!1),n.type===L.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===L.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===L.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===L.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===L.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===L.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case L.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case I.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case I.ViewportResize:this.emitter.emit($.Resize,{width:n.width,height:n.height});break;case I.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case I.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case I.StyleSheetRule:case I.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((i=this.virtualDom.mirror.getNode(n.id))==null||i.rules.push(n)):this.applyStyleSheetMutation(n);break}case I.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Zs({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case I.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case I.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case I.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Fd(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=Wa(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Re(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw m}});const i=N({},this.legacy_missingNodeRetryMap),o=[],n=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===Ce.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Re(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let m=null,d=null;if(u.previousId&&(m=r.getNode(u.previousId)),u.nextId&&(d=r.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const p=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Je(f,r)){this.attachDocumentToIframe(u,f);return}const g=(w,C)=>{if(!this.usingVirtualDom){sr(w);for(const x of this.config.plugins||[])x.onBuild&&x.onBuild(w,{id:C,replayer:this})}},y=dt(u.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}const v=r.getMeta(f);if(v&&v.type===Ce.Element&&u.node.type===Ce.Text){const w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(v.tagName==="textarea")for(const C of w)C.nodeType===f.TEXT_NODE&&f.removeChild(C);else if(v.tagName==="style"&&w.length===1)for(const C of w)C.nodeType===f.TEXT_NODE&&!r.hasNode(C)&&(y.textContent=C.textContent,f.removeChild(C))}else if((v==null?void 0:v.type)===Ce.Document){const w=f;u.node.type===Ce.DocumentType&&((c=w.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),y.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?f.insertBefore(y,m.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(y,d):f.insertBefore(y,null):f.appendChild(y),g(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),Je(y,this.mirror)){const w=this.mirror.getId(y),C=this.newDocumentQueue.find(x=>x.parentId===w);C&&(this.attachDocumentToIframe(C,y),this.newDocumentQueue=this.newDocumentQueue.filter(x=>x!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,y,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=Ha(o);if(o.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)r.getNode(c.value.parentId)?Di(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Ya(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(m=>m.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=$r(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const m=h.parentNode;((c=m==null?void 0:m.rules)==null?void 0:c.length)>0&&(m.rules=[])}}),e.attributes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const m=u.attributes[f];if(m===null)h.removeAttribute(f),f==="open"&&Gp(h,u);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const d=r.getMeta(h),p=dt(ee(N({},d),{attributes:N(N({},d.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(d.attributes,u.attributes);const g=h.nextSibling,y=h.parentNode;if(p&&y){y.removeChild(h),y.insertBefore(p,g),r.replace(u.id,p);break}}catch(d){}if(f==="value"&&h.nodeName==="TEXTAREA"){const d=h;d.childNodes.forEach(g=>d.removeChild(g));const p=(c=h.ownerDocument)==null?void 0:c.createTextNode(m);p&&d.appendChild(p)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&sr(h,u)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){const d=m,p=h;for(const g in d)if(d[g]===!1)p.style.removeProperty(g);else if(d[g]instanceof Array){const y=d[g];p.style.setProperty(g,y[0],y[1])}else{const y=d[g];p.style.setProperty(g,y)}}}})}applyScroll(e,t){var r,i;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===Ce.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(i),u=this.mirror.getNode(n);if(!l||!u)return;const c=new Range;c.setStart(l,o),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===I.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===I.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=js(l);Ye(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=js(a);Ye(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&Ye(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Ye(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Re(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:I.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let o=0;const n=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Re(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&o<i&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:o,nextId:n}=i,a=o&&e[o],l=n&&e[n];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=_i(n,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?hs:Object.assign({},hs,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==M.IncrementalSnapshot?!1:e.data.source>I.Mutation&&e.data.source<=I.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit($.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(ro,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ro,...e)}}const{addCustomEvent:Zp}=_e,{freezePage:Xp}=_e,{takeFullSnapshot:Jp}=_e;exports.EventType=M;exports.IncrementalSource=I;exports.MouseInteractions=L;exports.Replayer=Yp;exports.ReplayerEvents=$;exports.addCustomEvent=Zp;exports.canvasMutation=Zs;exports.freezePage=Xp;exports.record=_e;exports.takeFullSnapshot=Jp;exports.utils=qd;
80
+ ***************************************************************************** */function eo(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,o=t.call(s),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return n}var Je;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Je||(Je={}));var ol={type:"xstate.init"};function fs(s){return s===void 0?[]:[].concat(s)}function je(s){return{type:"xstate.assign",assignment:s}}function to(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Tr(s){return function(e){return s===e}}function al(s){return typeof s=="string"?{type:s}:s}function ro(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Tr(s)}}function so(s,e,t){var r=e,i=!1;return[s.filter(function(o){if(o.type==="xstate.assign"){i=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,i]}function ll(s,e){e===void 0&&(e={});var t=eo(so(fs(s.states[s.initial].entry).map(function(n){return to(n,e.actions)}),s.context,ol),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Tr(s.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:s.context}:n,h=c.value,f=c.context,g=al(a),p=s.states[h];if(p.on){var y=fs(p.on[g.type]);try{for(var d=function(k){var ce=typeof Symbol=="function"&&Symbol.iterator,fe=ce&&k[ce],se=0;if(fe)return fe.call(k);if(k&&typeof k.length=="number")return{next:function(){return k&&se>=k.length&&(k=void 0),{value:k&&k[se++],done:!k}}};throw new TypeError(ce?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),m=d.next();!m.done;m=d.next()){var v=m.value;if(v===void 0)return ro(h,f);var S=typeof v=="string"?{target:v}:v,w=S.target,C=S.actions,N=C===void 0?[]:C,T=S.cond,D=T===void 0?function(){return!0}:T,X=w===void 0,z=w!=null?w:h,re=s.states[z];if(D(f,g)){var ne=eo(so((X?fs(N):[].concat(p.exit,N,re.entry).filter(function(k){return k})).map(function(k){return to(k,o._options.actions)}),f,g),3),ae=ne[0],R=ne[1],le=ne[2],ue=w!=null?w:h;return{value:ue,context:R,actions:ae,changed:w!==h||ae.length>0||le,matches:Tr(ue)}}}}catch(k){l={error:k}}finally{try{m&&!m.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return ro(h,f)}};return o}var io=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function ul(s){var e=s.initialState,t=Je.NotStarted,r=new Set,i={_machine:s,send:function(o){t===Je.Running&&(e=s.transition(e,o),io(e,al(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:s.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:Tr(n.value)}}return t=Je.Running,io(e,ol),i},stop:function(){return t=Je.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Jp(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===I.Meta&&r.timestamp<=e)return s.slice(t)}return s}function Kp(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=ll({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:je({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:je((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),Q(M({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=o;a.clear();for(const p of l)qn(p,u);const h=Jp(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===I.IncrementalSnapshot&&c.data.source===E.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(P.PlayBack);const g=new Array;for(const p of h)if(!(f&&f<u&&(p.timestamp<=f||p===c)))if(p.timestamp<u)g.push(p);else{const y=e(p,!1);a.addAction({doAction:()=>{y()},delay:p.delay})}t(g),r.emit(P.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:je(o=>Q(M({},o),{lastPlayedEvent:null})),startLive:je({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:je((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;qn(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);u[d].timestamp<=c.timestamp?y=d+1:h=d-1}p===-1&&(p=y),u.splice(p,0,c)}const f=c.timestamp<a,g=e(c,f);f?g():l.isActive()&&l.addAction({doAction:()=>{g()},delay:c.delay})}return Q(M({},o),{events:u})})}});return ul(i)}function Qp(s){const e=ll({id:"speed",context:s,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:je({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return ul(e)}const qp=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],no=new Map;function cl(s,e){let t=no.get(s);return t||(t=new Map,no.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Ae(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await Ae(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:o}=r;return cl(e,i)[o]}else if("args"in r){const{rr_type:i,args:o}=r,n=window[i];return new n(...await Promise.all(o.map(Ae(s,e,t))))}else{if("base64"in r)return Rp(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const o=new Image;return o.src=r.src,s.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(Ae(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Ae(s,e,t)));return r}}function em(s,e){try{return e===xe.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const tm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function rm(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!tm.includes(t))return;const r=cl(s,t);r.includes(e)||r.push(e)}async function sm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const o=em(e,t);if(!o)return;if(s.setter){o[s.property]=s.args[0];return}const n=o[s.property],a=await Promise.all(s.args.map(Ae(r,o))),l=n.apply(o,a);rm(o,l);const u=!1}catch(o){i(s,o)}}async function im({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(Ae(r,o))));(await Promise.all(n)).forEach((l,u)=>{const c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}const h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(o,c.args)):h.apply(o,l)}catch(h){i(c,h)}})}async function Ks({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{const n=i.get(s)||e,a="commands"in n?n.commands:[n];if([xe.WebGL,xe.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await sm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await im({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class nm{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(P.Start,this.start.bind(this)),this.emitter.on(P.SkipStart,this.start.bind(this)),this.emitter.on(P.Pause,this.pause.bind(this)),this.emitter.on(P.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var g,p,y,d,m;const i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===Ne.Play||o!==Ne.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(g=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?g:0,lastInteractionTimeOffset:t,playbackRate:(p=n!=null?n:i==null?void 0:i.playbackRate)!=null?p:1,volume:(y=u!=null?u:i==null?void 0:i.volume)!=null?y:1,muted:(d=l!=null?l:i==null?void 0:i.muted)!=null?d:e.getAttribute("muted")===null,loop:(m=c!=null?c:i==null?void 0:i.loop)!=null?m:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:o,isPlaying:n}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),n&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&n&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let g=0;typeof a.rr_mediaCurrentTime=="number"&&(g=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:g,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function nr(s,e){if(s.nodeName!=="DIALOG"||s instanceof me)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function om(s,e){if(s.nodeName!=="DIALOG"||s instanceof me)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const am=5*1e3,lm=nl||Yp,oo="[replayer]",ds={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ao(s){return s.type==I.IncrementalSnapshot&&(s.data.source==E.TouchMove||s.data.source==E.MouseInteraction&&s.data.type==F.TouchStart)}class um{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new nt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",lm()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",Sn()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",co()),b(this,"styleMirror",new Pi),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),b(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:u=()=>{this.emitter.emit(P.CustomEvent,a)};break;case I.Meta:u=()=>this.emitter.emit(P.Resize,{width:a.data.width,height:a.data.height});break;case I.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case I.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/am),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(P.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(P.Finish))};let g=50;a.type===I.IncrementalSnapshot&&a.data.source===E.MouseMove&&a.data.positions.length&&(g+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,g)}this.emitter.emit(P.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ds,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(P.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(P.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Ks({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===E.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===E.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Ir(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],c=Mr(u.node,this.mirror,this.virtualDom.mirror);Ir(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(P.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Xp([],{speed:this.config.speed});this.service=Kp({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(P.StateChange,{player:a})}),this.speedService=Qp({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(P.StateChange,{speed:a})}),this.mediaManager=new nm({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===I.Meta),n=this.service.state.context.events.find(a=>a.type===I.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(P.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(ao)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(P.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(P.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(P.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(P.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;ao(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Sn()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Zp(this.iframe.contentWindow,this.iframe.contentDocument),_i(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],i=new Set,o=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),vh(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),i.forEach(l=>nr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(P.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=qp(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,za(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:E.StyleSheetRule,adds:i.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<i.length;n++)(r=o.sheet)==null||r.insertRule(i[n],n)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(i,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===Se.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};mt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);o.forEach(a=>nr(a))}collectIframeAndAttachDocument(e,t){if(Ke(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(P.Start,n),this.emitter.on(P.Pause,n);const a=()=>{this.emitter.off(P.Start,n),this.emitter.off(P.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(P.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(P.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),o=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(Ae(this.imageMap,null,r)));return Q(M({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,Q(M({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Ae(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,Q(M({},e),{args:i}))}}}applyIncremental(e,t){var r,i,o;const{data:n}=e;switch(n.source){case E.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case E.MouseInteraction:{if(n.id===-1)break;const a=new Event(Oe(F[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(P.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case F.Blur:"blur"in l&&l.blur();break;case F.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case F.Click:case F.TouchStart:case F.TouchEnd:case F.MouseDown:case F.MouseUp:t?(n.type===F.TouchStart?this.touchActive=!0:n.type===F.TouchEnd&&(this.touchActive=!1),n.type===F.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===F.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===F.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===F.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===F.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===F.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case F.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case E.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case E.ViewportResize:this.emitter.emit(P.Resize,{width:n.width,height:n.height});break;case E.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case E.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((i=this.virtualDom.mirror.getNode(n.id))==null||i.rules.push(n)):this.applyStyleSheetMutation(n);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Ks({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case E.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,zd(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=Wa(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Re(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(g){if(g instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw g}});const i=M({},this.legacy_missingNodeRetryMap),o=[],n=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===Se.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Re(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let g=null,p=null;if(u.previousId&&(g=r.getNode(u.previousId)),u.nextId&&(p=r.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const y=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ke(f,r)){this.attachDocumentToIframe(u,f);return}const d=(S,w)=>{if(!this.usingVirtualDom){nr(S);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(S,{id:w,replayer:this})}},m=mt(u.node,{doc:y,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:m,mutation:u};return}const v=r.getMeta(f);if(v&&v.type===Se.Element&&u.node.type===Se.Text){const S=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(v.tagName==="textarea")for(const w of S)w.nodeType===f.TEXT_NODE&&f.removeChild(w);else if(v.tagName==="style"&&S.length===1)for(const w of S)w.nodeType===f.TEXT_NODE&&!r.hasNode(w)&&(m.textContent=w.textContent,f.removeChild(w))}else if((v==null?void 0:v.type)===Se.Document){const S=f;u.node.type===Se.DocumentType&&((c=S.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&S.removeChild(S.childNodes[0]),m.nodeName==="HTML"&&S.documentElement&&S.removeChild(S.documentElement)}if(g&&g.nextSibling&&g.nextSibling.parentNode?f.insertBefore(m,g.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(m,p):f.insertBefore(m,null):f.appendChild(m),d(m,u.node.id),this.usingVirtualDom&&m.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),Ke(m,this.mirror)){const S=this.mirror.getId(m),w=this.newDocumentQueue.find(C=>C.parentId===S);w&&(this.attachDocumentToIframe(w,m),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,m,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=Ya(o);if(o.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)r.getNode(c.value.parentId)?ki(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Za(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(g=>g.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Pr(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const g=h.parentNode;((c=g==null?void 0:g.rules)==null?void 0:c.length)>0&&(g.rules=[])}}),e.attributes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const g=u.attributes[f];if(g===null)h.removeAttribute(f),f==="open"&&om(h,u);else if(typeof g=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),y=mt(Q(M({},p),{attributes:M(M({},p.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,u.attributes);const d=h.nextSibling,m=h.parentNode;if(y&&m){m.removeChild(h),m.insertBefore(y,d),r.replace(u.id,y);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const y=(c=h.ownerDocument)==null?void 0:c.createTextNode(g);y&&p.appendChild(y)}else h.setAttribute(f,g);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&nr(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=g,y=h;for(const d in p)if(p[d]===!1)y.style.removeProperty(d);else if(p[d]instanceof Array){const m=p[d];y.style.setProperty(d,m[0],m[1])}else{const m=p[d];y.style.setProperty(d,m)}}}})}applyScroll(e,t){var r,i;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===Se.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(i),u=this.mirror.getNode(n);if(!l||!u)return;const c=new Range;c.setStart(l,o),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=Xs(l);Ze(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=Xs(a);Ze(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&Ze(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Ze(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Re(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let o=0;const n=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Re(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&o<i&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:o,nextId:n}=i,a=o&&e[o],l=n&&e[n];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=Li(n,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?ds:Object.assign({},ds,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(P.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(oo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(oo,...e)}}const{addCustomEvent:cm}=Ie,{freezePage:hm}=Ie,{takeFullSnapshot:fm}=Ie;exports.EventType=I;exports.IncrementalSource=E;exports.MouseInteractions=F;exports.Replayer=um;exports.ReplayerEvents=P;exports.addCustomEvent=cm;exports.canvasMutation=Ks;exports.freezePage=hm;exports.record=Ie;exports.takeFullSnapshot=fm;exports.utils=op;
81
81
  if (typeof module.exports == "object" && typeof exports == "object") {
82
82
  var __cp = (to, from, except, desc) => {
83
83
  if ((from && typeof from === "object") || typeof from === "function") {