@appsurify-testmap/rrweb-all 2.0.0-alpha.24 → 2.0.0-alpha.25

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 Pl=Object.defineProperty,Ll=Object.defineProperties;var Fl=Object.getOwnPropertyDescriptors;var qt=Object.getOwnPropertySymbols;var un=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable;var ln=(s,e,t)=>e in s?Pl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,D=(s,e)=>{for(var t in e||(e={}))un.call(e,t)&&ln(s,t,e[t]);if(qt)for(var t of qt(e))cn.call(e,t)&&ln(s,t,e[t]);return s},ne=(s,e)=>Ll(s,Fl(e));var st=(s,e)=>{var t={};for(var r in s)un.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&qt)for(var r of qt(s))e.indexOf(r)<0&&cn.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Bl=Object.defineProperty,Ul=(s,e,t)=>e in s?Bl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,v=(s,e,t)=>Ul(s,typeof e!="symbol"?e+"":e,t),hn,Wl=Object.defineProperty,zl=(s,e,t)=>e in s?Wl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,fn=(s,e,t)=>zl(s,typeof e!="symbol"?e+"":e,t),Io=(s=>(s[s.Change=0]="Change",s[s.Submit=1]="Submit",s[s.DragStart=2]="DragStart",s[s.Drop=3]="Drop",s[s.PointerDown=4]="PointerDown",s[s.PointerUp=5]="PointerUp",s[s.Input=6]="Input",s[s.KeyDown=7]="KeyDown",s[s.KeyUp=8]="KeyUp",s[s.KeyPress=9]="KeyPress",s[s.MouseEnter=10]="MouseEnter",s[s.MouseLeave=11]="MouseLeave",s[s.MouseUp=12]="MouseUp",s[s.MouseDown=13]="MouseDown",s[s.Click=14]="Click",s[s.ContextMenu=15]="ContextMenu",s[s.DblClick=16]="DblClick",s[s.Focus=17]="Focus",s[s.Blur=18]="Blur",s[s.TouchStart=19]="TouchStart",s[s.TouchMove=20]="TouchMove",s[s.TouchEnd=21]="TouchEnd",s[s.TouchCancel=22]="TouchCancel",s))(Io||{}),No=(s=>(s[s.Input=0]="Input",s[s.Button=1]="Button",s[s.A=2]="A",s[s.Select=3]="Select",s[s.Textarea=4]="Textarea",s[s.Label=5]="Label",s[s.Details=6]="Details",s[s.Summary=7]="Summary",s[s.Dialog=8]="Dialog",s[s.Video=9]="Video",s[s.Audio=10]="Audio",s))(No||{}),_=(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))(_||{});const dn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},er={},Vl=()=>!!globalThis.Zone;function mi(s){if(er[s])return er[s];const e=globalThis[s],t=e.prototype,r=s in dn?dn[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 pn?pn[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 er[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?er[s]=u:t}catch(a){return t}}const ls={};function je(s,e,t){var r;const i=`${s}.${String(t)}`;if(ls[i])return ls[i].call(e);const o=mi(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(ls[i]=n,n.call(e)):e[t]}const us={};function Ro(s,e,t){const r=`${s}.${String(t)}`;if(us[r])return us[r].bind(e);const o=mi(s)[t];return typeof o!="function"?e[t]:(us[r]=o,o.bind(e))}function Gl(s){return je("Node",s,"childNodes")}function jl(s){return je("Node",s,"parentNode")}function Hl(s){return je("Node",s,"parentElement")}function Yl(s){return je("Node",s,"textContent")}function Zl(s,e){return Ro("Node",s,"contains")(e)}function Xl(s){return Ro("Node",s,"getRootNode")()}function Jl(s){return!s||!("host"in s)?null:je("ShadowRoot",s,"host")}function Kl(s){return s.styleSheets}function Ql(s){return!s||!("shadowRoot"in s)?null:je("Element",s,"shadowRoot")}function ql(s,e){return je("Element",s,"querySelector")(e)}function eu(s,e){return je("Element",s,"querySelectorAll")(e)}function tu(){return mi("MutationObserver").constructor}const ce={childNodes:Gl,parentNode:jl,parentElement:Hl,textContent:Yl,contains:Zl,getRootNode:Xl,host:Jl,styleSheets:Kl,shadowRoot:Ql,querySelector:ql,querySelectorAll:eu,mutationObserver:tu};function Ot(s){const e=s&&"host"in s&&"mode"in s&&ce.host(s)||null;return!!(e&&"shadowRoot"in e&&ce.shadowRoot(e)===s)}function Dt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ru(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 su(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 Ns(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=>Ao(i,t)).join("");return ru(r)}catch(e){return null}}function Ao(s,e){if(nu(s)){let t;try{t=Ns(s.styleSheet)||su(s)}catch(r){t=s.cssText}return s.styleSheet.href?Or(t,s.styleSheet.href):t}else{let t=s.cssText;return ou(s)&&s.selectorText.includes(":")&&(t=iu(t)),e?Or(t,e):t}}function iu(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function nu(s){return"styleSheet"in s}function ou(s){return"selectorText"in s}class gi{constructor(){fn(this,"idNodeMap",new Map),fn(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 gi}function yi({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Ve(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Ve(s){return s.toLowerCase()}const mn="__rrweb_original__";function au(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=mn in o?o[mn]: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 lu(s,e){return!s||!e||s.type!==e.type?!1:s.type===_.Document?s.compatMode===e.compatMode:s.type===_.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===_.Comment||s.type===_.Text||s.type===_.CDATA?s.textContent===e.textContent:s.type===_.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function wi(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ve(e):null}function Do(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 uu(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const cu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hu=/^(?:[a-z+]+:)?\/\//i,fu=/^www\..*/i,du=/^(data:)([^,]*),(.*)/i;function Or(s,e){return(s||"").replace(cu,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(hu.test(l)||fu.test(l))return`url(${u}${l}${u})`;if(du.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${uu(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 cs(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function pu(s,e){const t=Array.from(e.childNodes),r=[];let i=0;if(t.length>1&&s&&typeof s=="string"){let o=cs(s);const n=o.length/s.length;for(let a=1;a<t.length;a++)if(t[a].textContent&&typeof t[a].textContent=="string"){const l=cs(t[a].textContent);let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,u),1)!==-1);u++);for(;u<l.length;u++){const c=l.substring(0,u),h=o.split(c);let f=-1;if(h.length===2?f=o.indexOf(c):h.length>2&&h[0]===""&&t[a-1].textContent!==""&&(f=o.indexOf(c,1)),f!==-1){let p=Math.floor(f/n);for(;p>0&&p<s.length;){if(i+=1,i>50*t.length)return r.push(s),r;const m=cs(s.substring(0,p));if(m.length===f){r.push(s.substring(0,p)),s=s.substring(p),o=o.substring(f);break}else m.length<f?p+=Math.max(1,Math.floor((f-m.length)/n)):p-=Math.max(1,Math.floor((m.length-f)*n))}break}}}}return r.push(s),r}function mu(s,e){return pu(s,e).join("/* rr_split */")}function Nt(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||!(t instanceof Element))return"";const r=Array.from(t.children).filter(o=>o.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${Nt(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`${Nt(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`${Nt(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`${Nt(e)}/comment()${r}`}return""}function vi(s){return s.nodeType===s.ELEMENT_NODE}function gu(s){var e;const t=ce.parentNode(s),r=t&&t;return!r||!bi(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function bi(s){return yu(s)&&wu(s.getBoundingClientRect())}function yu(s){const e=window.getComputedStyle(s);return e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity)!==0}function wu(s){return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&s.right<=(window.innerWidth||document.documentElement.clientWidth)}function vu(){return Object.keys(Io).filter(s=>isNaN(Number(s))).map(s=>s.toLowerCase().replace(/_/g,"-"))}function bu(){return Object.keys(No).filter(s=>isNaN(Number(s))).map(s=>s.toLowerCase().replace(/_/g,"-"))}function Su(s){return vu().some(e=>{let t=!1;const r=()=>{t=!0};return s.addEventListener(e,r),s.dispatchEvent(new Event(e)),s.removeEventListener(e,r),t})}function Si(s){var e;const t=bu();if(s.nodeType===Node.ELEMENT_NODE){const r=s,i=r.tagName.toLowerCase();if(!t.includes(i))return!1;const o=r.hasAttribute("tabindex")&&r.getAttribute("tabindex")!=="-1",n=["button","link","checkbox","switch","menuitem"].includes(r.getAttribute("role")||"");return Su(r)||o||n||r instanceof HTMLAnchorElement&&r.hasAttribute("href")||r instanceof HTMLButtonElement&&!r.disabled}if(s.nodeType===Node.TEXT_NODE){const r=s,i=r.parentElement;return i!==null&&t.includes(i.tagName.toLowerCase())&&bi(i)&&((e=r.textContent)==null?void 0:e.trim().length)!==0&&Si(i)}return!1}let Cu=1;const Eu=new RegExp("[^a-z0-9-_:]"),kt=-2;function To(){return Cu++}function xu(s){if(s instanceof HTMLFormElement)return"form";const e=Ve(s.tagName);return Eu.test(e)?"div":e}let it,gn;const Mu=/^[^ \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(Mu);if(o.slice(-1)===",")o=lt(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=lt(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 yn=new WeakMap;function lt(s,e){return!e||e.trim()===""?e:Ci(s,e)}function Ru(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ci(s,e){let t=yn.get(s);if(t||(t=s.createElement("a"),yn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function _o(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")?lt(s,r):t==="srcset"?Nu(s,r):t==="style"?Or(r,Ci(s)):e==="object"&&t==="data"?lt(s,r):r)}function ko(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Au(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 Dr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Dr(ce.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?Dr(ce.parentNode(s),e,t):!1}function $o(s,e,t,r){let i;if(vi(s)){if(i=s,!ce.childNodes(i).length)return!1}else{if(ce.parentElement(s)===null)return!1;i=ce.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(Dr(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 Ou(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 Du(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 Tu(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:y=!1,cssCaptured:d=!1}=e,g=_u(t,r),w=Nt(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:_.Document,childNodes:[],xPath:w,compatMode:s.compatMode}:{type:_.Document,childNodes:[],xPath:w};case s.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:g,xPath:w};case s.ELEMENT_NODE:return $u(s,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:y,rootId:g,xPath:w});case s.TEXT_NODE:return ku(s,{doc:t,needsMask:n,maskTextFn:u,rootId:g,cssCaptured:d,xPath:w});case s.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:g,xPath:w};case s.COMMENT_NODE:return{type:_.Comment,textContent:ce.textContent(s)||"",rootId:g,xPath:w};default:return!1}}function _u(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function ku(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o,xPath:n}=e,a=ce.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=ce.textContent(s),c&&u&&(u=Or(u,Ci(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,ce.parentElement(s)):u.replace(/[\S]/g,"*"));const f=gu(s),p=Si(s);return{type:_.Text,textContent:u||"",rootId:i,isVisible:f,isInteractive:p,xPath:n}}function $u(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:p,xPath:m}=e,y=Au(s,r,i),d=xu(s);let g={};const w=s.attributes.length;for(let S=0;S<w;S++){const x=s.attributes[S];ko(d,x.name,x.value)||(g[x.name]=_o(t,d,Ve(x.name),x.value))}if(d==="link"&&o){const S=Array.from(t.styleSheets).find(C=>C.href===s.href);let x=null;S&&(x=Ns(S)),x&&(delete g.rel,delete g.href,g._cssText=x)}if(d==="style"&&s.sheet){let S=Ns(s.sheet);S&&(s.childNodes.length>1&&(S=mu(S,s)),g._cssText=S)}if(d==="input"||d==="textarea"||d==="select"){const S=s.value,x=s.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=yi({element:s,type:wi(s),tagName:d,value:S,maskInputOptions:n,maskInputFn:a}):x&&(g.checked=x)}if(d==="option"&&(s.selected&&!n.select?g.selected=!0:delete g.selected),d==="dialog"&&s.open&&(g.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&c){if(s.__context==="2d")au(s)||(g.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const S=s.toDataURL(l.type,l.quality),x=t.createElement("canvas");x.width=s.width,x.height=s.height;const C=x.toDataURL(l.type,l.quality);S!==C&&(g.rr_dataURL=S)}}if(d==="img"&&u){it||(it=t.createElement("canvas"),gn=it.getContext("2d"));const S=s,x=S.currentSrc||S.getAttribute("src")||"<unknown-src>",C=S.crossOrigin,T=()=>{S.removeEventListener("load",T);try{it.width=S.naturalWidth,it.height=S.naturalHeight,gn.drawImage(S,0,0),g.rr_dataURL=it.toDataURL(l.type,l.quality)}catch($){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?T():S.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${x}! Error: ${$}`)}S.crossOrigin==="anonymous"&&(C?g.crossOrigin=C:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?T():S.addEventListener("load",T)}if(d==="audio"||d==="video"){const S=g;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(f||(s.scrollLeft&&(g.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(g.rr_scrollTop=s.scrollTop)),y){const{width:S,height:x}=s.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${x}px`}}d==="iframe"&&!h(g.src)&&(s.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(d)&&(b=!0)}catch(S){}const E=bi(s),N=Si(s);return{type:_.Element,tagName:d,attributes:g,childNodes:[],isSVG:Ru(s)||void 0,needBlock:y,rootId:p,isCustom:b,isVisible:E,isInteractive:N,xPath:m}}function Z(s){return s==null?"":s.toLowerCase()}function Pu(s,e){if(e.comment&&s.type===_.Comment)return!0;if(s.type===_.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Do(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(Z(s.attributes.name).match(/^msapplication-tile(image|color)$/)||Z(s.attributes.name)==="application-name"||Z(s.attributes.rel)==="icon"||Z(s.attributes.rel)==="apple-touch-icon"||Z(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&Z(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Z(s.attributes.property).match(/^(og|twitter|fb):/)||Z(s.attributes.name).match(/^(og|twitter):/)||Z(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Z(s.attributes.name)==="robots"||Z(s.attributes.name)==="googlebot"||Z(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Z(s.attributes.name)==="author"||Z(s.attributes.name)==="generator"||Z(s.attributes.name)==="framework"||Z(s.attributes.name)==="publisher"||Z(s.attributes.name)==="progid"||Z(s.attributes.property).match(/^article:/)||Z(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Z(s.attributes.name)==="google-site-verification"||Z(s.attributes.name)==="yandex-verification"||Z(s.attributes.name)==="csrf-token"||Z(s.attributes.name)==="p:domain_verify"||Z(s.attributes.name)==="verify-v1"||Z(s.attributes.name)==="verification"||Z(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ut(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m={},inlineImages:y=!1,recordCanvas:d=!1,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:x=!1,cssCaptured:C=!1}=e;let{needsMask:T}=e,{preserveWhiteSpace:$=!0}=e;T||(T=$o(s,n,a,T===void 0));const oe=Tu(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:T,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:y,recordCanvas:d,keepIframeSrcFn:S,newlyAddedElement:x,cssCaptured:C});if(!oe)return console.warn(s,"not serialized"),null;let W;r.hasNode(s)?W=r.getId(s):Pu(oe,p)||!$&&oe.type===_.Text&&!oe.textContent.replace(/^\s+|\s+$/gm,"").length?W=kt:W=To();const A=Object.assign(oe,{id:W});if(r.add(s,A),W===kt)return null;g&&g(s);let Y=!l;if(A.type===_.Element){Y=Y&&!A.needBlock,delete A.needBlock;const k=ce.shadowRoot(s);k&&Dt(k)&&(A.isShadowHost=!0)}if((A.type===_.Document||A.type===_.Element)&&Y){p.headWhitespace&&A.type===_.Element&&A.tagName==="head"&&($=!1);const k={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:T,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:y,recordCanvas:d,preserveWhiteSpace:$,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:N,keepIframeSrcFn:S,cssCaptured:!1};if(!(A.type===_.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0)){A.type===_.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText=="string"&&(k.cssCaptured=!0);for(const H of Array.from(ce.childNodes(s))){const q=ut(H,k);q&&A.childNodes.push(q)}}let O=null;if(vi(s)&&(O=ce.shadowRoot(s)))for(const H of Array.from(ce.childNodes(O))){const q=ut(H,k);q&&(Dt(O)&&(q.isShadow=!0),A.childNodes.push(q))}}const re=ce.parentNode(s);return re&&Ot(re)&&Dt(re)&&(A.isShadow=!0),A.type===_.Element&&A.tagName==="iframe"&&Ou(s,()=>{const k=s.contentDocument;if(k&&w){const O=ut(k,{doc:k,mirror:r,blockClass:i,blockSelector:o,needsMask:T,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:y,recordCanvas:d,preserveWhiteSpace:$,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:N,keepIframeSrcFn:S});O&&w(s,O)}},b),A.type===_.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&Do(A.attributes.href)==="css")&&Du(s,()=>{if(E){const k=ut(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:T,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:y,recordCanvas:d,preserveWhiteSpace:$,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:N,keepIframeSrcFn:S});k&&E(s,k)}},N),A}function Lu(s,e){const{mirror:t=new gi,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:y,onSerialize:d,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:E,keepIframeSrcFn:N=()=>!1}=e||{};return ut(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!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}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:f,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:m,inlineImages:l,recordCanvas:u,preserveWhiteSpace:y,onSerialize:d,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:E,keepIframeSrcFn:N,newlyAddedElement:!1})}const Fu=/(max|min)-device-(width|height)/,wn=new RegExp(Fu.source,"g"),Bu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(wn)&&(s.params=s.params.replace(wn,"$1-$2"))}}}},Uu={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 Wu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function zu(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 Ei={exports:{}},X=String,Po=function(){return{isColorSupported:!1,reset:X,bold:X,dim:X,italic:X,underline:X,inverse:X,hidden:X,strikethrough:X,black:X,red:X,green:X,yellow:X,blue:X,magenta:X,cyan:X,white:X,gray:X,bgBlack:X,bgRed:X,bgGreen:X,bgYellow:X,bgBlue:X,bgMagenta:X,bgCyan:X,bgWhite:X}};Ei.exports=Po();Ei.exports.createColors=Po;var Vu=Ei.exports;const Gu={},ju=Object.freeze(Object.defineProperty({__proto__:null,default:Gu},Symbol.toStringTag,{value:"Module"})),Ee=zu(ju);let vn=Vu,bn=Ee,Rs=class Lo 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,Lo)}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),bn&&e&&(t=bn(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 p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
14
+ "use strict";var $l=Object.defineProperty,Pl=Object.defineProperties;var Ll=Object.getOwnPropertyDescriptors;var Qt=Object.getOwnPropertySymbols;var ln=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable;var an=(s,e,t)=>e in s?$l(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,D=(s,e)=>{for(var t in e||(e={}))ln.call(e,t)&&an(s,t,e[t]);if(Qt)for(var t of Qt(e))un.call(e,t)&&an(s,t,e[t]);return s},ne=(s,e)=>Pl(s,Ll(e));var st=(s,e)=>{var t={};for(var r in s)ln.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Qt)for(var r of Qt(s))e.indexOf(r)<0&&un.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Fl=Object.defineProperty,Bl=(s,e,t)=>e in s?Fl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>Bl(s,typeof e!="symbol"?e+"":e,t),cn,Ul=Object.defineProperty,Wl=(s,e,t)=>e in s?Ul(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,hn=(s,e,t)=>Wl(s,typeof e!="symbol"?e+"":e,t),Io=(s=>(s[s.Change=0]="Change",s[s.Submit=1]="Submit",s[s.DragStart=2]="DragStart",s[s.Drop=3]="Drop",s[s.PointerDown=4]="PointerDown",s[s.PointerUp=5]="PointerUp",s[s.Input=6]="Input",s[s.KeyDown=7]="KeyDown",s[s.KeyUp=8]="KeyUp",s[s.KeyPress=9]="KeyPress",s[s.MouseEnter=10]="MouseEnter",s[s.MouseLeave=11]="MouseLeave",s[s.MouseUp=12]="MouseUp",s[s.MouseDown=13]="MouseDown",s[s.Click=14]="Click",s[s.ContextMenu=15]="ContextMenu",s[s.DblClick=16]="DblClick",s[s.Focus=17]="Focus",s[s.Blur=18]="Blur",s[s.TouchStart=19]="TouchStart",s[s.TouchMove=20]="TouchMove",s[s.TouchEnd=21]="TouchEnd",s[s.TouchCancel=22]="TouchCancel",s))(Io||{}),Mo=(s=>(s[s.Input=0]="Input",s[s.Button=1]="Button",s[s.A=2]="A",s[s.Select=3]="Select",s[s.Textarea=4]="Textarea",s[s.Label=5]="Label",s[s.Details=6]="Details",s[s.Summary=7]="Summary",s[s.Dialog=8]="Dialog",s[s.Video=9]="Video",s[s.Audio=10]="Audio",s))(Mo||{}),_=(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))(_||{});const fn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},dn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qt={},zl=()=>!!globalThis.Zone;function pi(s){if(qt[s])return qt[s];const e=globalThis[s],t=e.prototype,r=s in fn?fn[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]"))})),n=s in dn?dn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!zl())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 as={};function je(s,e,t){var r;const i=`${s}.${String(t)}`;if(as[i])return as[i].call(e);const n=pi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(as[i]=o,o.call(e)):e[t]}const ls={};function No(s,e,t){const r=`${s}.${String(t)}`;if(ls[r])return ls[r].bind(e);const n=pi(s)[t];return typeof n!="function"?e[t]:(ls[r]=n,n.bind(e))}function Vl(s){return je("Node",s,"childNodes")}function Gl(s){return je("Node",s,"parentNode")}function jl(s){return je("Node",s,"parentElement")}function Hl(s){return je("Node",s,"textContent")}function Yl(s,e){return No("Node",s,"contains")(e)}function Zl(s){return No("Node",s,"getRootNode")()}function Xl(s){return!s||!("host"in s)?null:je("ShadowRoot",s,"host")}function Jl(s){return s.styleSheets}function Kl(s){return!s||!("shadowRoot"in s)?null:je("Element",s,"shadowRoot")}function Ql(s,e){return je("Element",s,"querySelector")(e)}function ql(s,e){return je("Element",s,"querySelectorAll")(e)}function eu(){return pi("MutationObserver").constructor}const ce={childNodes:Vl,parentNode:Gl,parentElement:jl,textContent:Hl,contains:Yl,getRootNode:Zl,host:Xl,styleSheets:Jl,shadowRoot:Kl,querySelector:Ql,querySelectorAll:ql,mutationObserver:eu};function Ot(s){const e=s&&"host"in s&&"mode"in s&&ce.host(s)||null;return!!(e&&"shadowRoot"in e&&ce.shadowRoot(e)===s)}function Dt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function tu(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 ru(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 Ms(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=>Ro(i,t)).join("");return tu(r)}catch(e){return null}}function Ro(s,e){if(iu(s)){let t;try{t=Ms(s.styleSheet)||ru(s)}catch(r){t=s.cssText}return s.styleSheet.href?Or(t,s.styleSheet.href):t}else{let t=s.cssText;return nu(s)&&s.selectorText.includes(":")&&(t=su(t)),e?Or(t,e):t}}function su(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function iu(s){return"styleSheet"in s}function nu(s){return"selectorText"in s}class mi{constructor(){hn(this,"idNodeMap",new Map),hn(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 Ao(){return new mi}function gi({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const a=r&&Ve(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ve(s){return s.toLowerCase()}const pn="__rrweb_original__";function ou(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 n=e.getImageData,o=pn in n?n[pn]:n;if(new Uint32Array(o.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 au(s,e){return!s||!e||s.type!==e.type?!1:s.type===_.Document?s.compatMode===e.compatMode:s.type===_.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===_.Comment||s.type===_.Text||s.type===_.CDATA?s.textContent===e.textContent:s.type===_.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function yi(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ve(e):null}function Oo(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function lu(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const uu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,cu=/^(?:[a-z+]+:)?\/\//i,hu=/^www\..*/i,fu=/^(data:)([^,]*),(.*)/i;function Or(s,e){return(s||"").replace(uu,(t,r,i,n,o,a)=>{const l=i||o||a,u=r||n||"";if(!l)return t;if(cu.test(l)||hu.test(l))return`url(${u}${l}${u})`;if(fu.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${lu(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 us(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function du(s,e){const t=Array.from(e.childNodes),r=[];let i=0;if(t.length>1&&s&&typeof s=="string"){let n=us(s);const o=n.length/s.length;for(let a=1;a<t.length;a++)if(t[a].textContent&&typeof t[a].textContent=="string"){const l=us(t[a].textContent);let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,u),1)!==-1);u++);for(;u<l.length;u++){const c=l.substring(0,u),h=n.split(c);let f=-1;if(h.length===2?f=n.indexOf(c):h.length>2&&h[0]===""&&t[a-1].textContent!==""&&(f=n.indexOf(c,1)),f!==-1){let p=Math.floor(f/o);for(;p>0&&p<s.length;){if(i+=1,i>50*t.length)return r.push(s),r;const m=us(s.substring(0,p));if(m.length===f){r.push(s.substring(0,p)),s=s.substring(p),n=n.substring(f);break}else m.length<f?p+=Math.max(1,Math.floor((f-m.length)/o)):p-=Math.max(1,Math.floor((m.length-f)*o))}break}}}}return r.push(s),r}function pu(s,e){return du(s,e).join("/* rr_split */")}function Rt(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||!(t instanceof Element))return"";const r=Array.from(t.children).filter(n=>n.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${Rt(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`${Rt(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`${Rt(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`${Rt(e)}/comment()${r}`}return""}function wi(s){return s.nodeType===s.ELEMENT_NODE}function mu(s){var e;const t=ce.parentNode(s),r=t&&t;return!r||!bi(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function bi(s){return gu(s)&&yu(s.getBoundingClientRect())}function gu(s){const e=window.getComputedStyle(s);return e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity)!==0}function yu(s){return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&s.right<=(window.innerWidth||document.documentElement.clientWidth)}function wu(){return Object.keys(Io).filter(s=>isNaN(Number(s))).map(s=>s.toLowerCase().replace(/_/g,"-"))}function bu(){return Object.keys(Mo).filter(s=>isNaN(Number(s))).map(s=>s.toLowerCase().replace(/_/g,"-"))}function vu(s){return wu().some(e=>{let t=!1;const r=()=>{t=!0};return s.addEventListener(e,r),s.dispatchEvent(new Event(e)),s.removeEventListener(e,r),t})}function vi(s){var e;const t=bu();if(s.nodeType===Node.ELEMENT_NODE){const r=s,i=r.tagName.toLowerCase();if(!t.includes(i))return!1;const n=r.hasAttribute("tabindex")&&r.getAttribute("tabindex")!=="-1",o=["button","link","checkbox","switch","menuitem"].includes(r.getAttribute("role")||"");return vu(r)||n||o||r instanceof HTMLAnchorElement&&r.hasAttribute("href")||r instanceof HTMLButtonElement&&!r.disabled}if(s.nodeType===Node.TEXT_NODE){const r=s,i=r.parentElement;return i!==null&&t.includes(i.tagName.toLowerCase())&&bi(i)&&((e=r.textContent)==null?void 0:e.trim().length)!==0&&vi(i)}return!1}let Su=1;const Cu=new RegExp("[^a-z0-9-_:]"),kt=-2;function Do(){return Su++}function Eu(s){if(s instanceof HTMLFormElement)return"form";const e=Ve(s.tagName);return Cu.test(e)?"div":e}let it,mn;const xu=/^[^ \t\n\r\u000c]+/,Iu=/^[, \t\n\r\u000c]+/;function Mu(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const a=n.exec(e.substring(t));return a?(o=a[0],t+=o.length,o):""}const i=[];for(;r(Iu),!(t>=e.length);){let n=r(xu);if(n.slice(-1)===",")n=lt(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=lt(s,n);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((n+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((n+o).trim());break}else l==="("&&(a=!0);o+=l,t+=1}}}return i.join(", ")}const gn=new WeakMap;function lt(s,e){return!e||e.trim()===""?e:Si(s,e)}function Nu(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Si(s,e){let t=gn.get(s);if(t||(t=s.createElement("a"),gn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function To(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")?lt(s,r):t==="srcset"?Mu(s,r):t==="style"?Or(r,Si(s)):e==="object"&&t==="data"?lt(s,r):r)}function _o(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Ru(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 Dr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Dr(ce.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?Dr(ce.parentNode(s),e,t):!1}function ko(s,e,t,r){let i;if(wi(s)){if(i=s,!ce.childNodes(i).length)return!1}else{if(ce.parentElement(s)===null)return!1;i=ce.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(Dr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Au(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(a){return}if(n!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Ou(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Du(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:y=!1,cssCaptured:d=!1}=e,g=Tu(t,r),w=Rt(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:_.Document,childNodes:[],xPath:w,compatMode:s.compatMode}:{type:_.Document,childNodes:[],xPath:w};case s.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:g,xPath:w};case s.ELEMENT_NODE:return ku(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:y,rootId:g,xPath:w});case s.TEXT_NODE:return _u(s,{doc:t,needsMask:o,maskTextFn:u,rootId:g,cssCaptured:d,xPath:w});case s.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:g,xPath:w};case s.COMMENT_NODE:return{type:_.Comment,textContent:ce.textContent(s)||"",rootId:g,xPath:w};default:return!1}}function Tu(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function _u(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n,xPath:o}=e,a=ce.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":n||(u=ce.textContent(s),c&&u&&(u=Or(u,Si(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,ce.parentElement(s)):u.replace(/[\S]/g,"*"));const f=mu(s),p=vi(s);return{type:_.Text,textContent:u||"",rootId:i,isVisible:f,isInteractive:p,xPath:o}}function ku(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:p,xPath:m}=e,y=Ru(s,r,i),d=Eu(s);let g={};const w=s.attributes.length;for(let S=0;S<w;S++){const I=s.attributes[S];_o(d,I.name,I.value)||(g[I.name]=To(t,d,Ve(I.name),I.value))}if(d==="link"&&n){const S=Array.from(t.styleSheets).find(C=>C.href===s.href);let I=null;S&&(I=Ms(S)),I&&(delete g.rel,delete g.href,g._cssText=I)}if(d==="style"&&s.sheet){let S=Ms(s.sheet);S&&(s.childNodes.length>1&&(S=pu(S,s)),g._cssText=S)}if(d==="input"||d==="textarea"||d==="select"){const S=s.value,I=s.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=gi({element:s,type:yi(s),tagName:d,value:S,maskInputOptions:o,maskInputFn:a}):I&&(g.checked=I)}if(d==="option"&&(s.selected&&!o.select?g.selected=!0:delete g.selected),d==="dialog"&&s.open&&(g.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&c){if(s.__context==="2d")ou(s)||(g.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const S=s.toDataURL(l.type,l.quality),I=t.createElement("canvas");I.width=s.width,I.height=s.height;const C=I.toDataURL(l.type,l.quality);S!==C&&(g.rr_dataURL=S)}}if(d==="img"&&u){it||(it=t.createElement("canvas"),mn=it.getContext("2d"));const S=s,I=S.currentSrc||S.getAttribute("src")||"<unknown-src>",C=S.crossOrigin,T=()=>{S.removeEventListener("load",T);try{it.width=S.naturalWidth,it.height=S.naturalHeight,mn.drawImage(S,0,0),g.rr_dataURL=it.toDataURL(l.type,l.quality)}catch($){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?T():S.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${I}! Error: ${$}`)}S.crossOrigin==="anonymous"&&(C?g.crossOrigin=C:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?T():S.addEventListener("load",T)}if(d==="audio"||d==="video"){const S=g;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(f||(s.scrollLeft&&(g.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(g.rr_scrollTop=s.scrollTop)),y){const{width:S,height:I}=s.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${I}px`}}d==="iframe"&&!h(g.src)&&(s.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(d)&&(v=!0)}catch(S){}const E=bi(s),N=vi(s);return{type:_.Element,tagName:d,attributes:g,childNodes:[],isSVG:Nu(s)||void 0,needBlock:y,rootId:p,isCustom:v,isVisible:E,isInteractive:N,xPath:m}}function X(s){return s==null?"":s.toLowerCase()}function $u(s,e){if(e.comment&&s.type===_.Comment)return!0;if(s.type===_.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Oo(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(X(s.attributes.name).match(/^msapplication-tile(image|color)$/)||X(s.attributes.name)==="application-name"||X(s.attributes.rel)==="icon"||X(s.attributes.rel)==="apple-touch-icon"||X(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&X(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(X(s.attributes.property).match(/^(og|twitter|fb):/)||X(s.attributes.name).match(/^(og|twitter):/)||X(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(X(s.attributes.name)==="robots"||X(s.attributes.name)==="googlebot"||X(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(X(s.attributes.name)==="author"||X(s.attributes.name)==="generator"||X(s.attributes.name)==="framework"||X(s.attributes.name)==="publisher"||X(s.attributes.name)==="progid"||X(s.attributes.property).match(/^article:/)||X(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(X(s.attributes.name)==="google-site-verification"||X(s.attributes.name)==="yandex-verification"||X(s.attributes.name)==="csrf-token"||X(s.attributes.name)==="p:domain_verify"||X(s.attributes.name)==="verify-v1"||X(s.attributes.name)==="verification"||X(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ut(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m={},inlineImages:y=!1,recordCanvas:d=!1,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:v=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:I=!1,cssCaptured:C=!1}=e;let{needsMask:T}=e,{preserveWhiteSpace:$=!0}=e;T||(T=ko(s,o,a,T===void 0));const oe=Du(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:T,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:y,recordCanvas:d,keepIframeSrcFn:S,newlyAddedElement:I,cssCaptured:C});if(!oe)return console.warn(s,"not serialized"),null;let z;r.hasNode(s)?z=r.getId(s):$u(oe,p)||!$&&oe.type===_.Text&&!oe.textContent.replace(/^\s+|\s+$/gm,"").length?z=kt:z=Do();const A=Object.assign(oe,{id:z});if(r.add(s,A),z===kt)return null;g&&g(s);let Y=!l;if(A.type===_.Element){Y=Y&&!A.needBlock,delete A.needBlock;const k=ce.shadowRoot(s);k&&Dt(k)&&(A.isShadowHost=!0)}if((A.type===_.Document||A.type===_.Element)&&Y){p.headWhitespace&&A.type===_.Element&&A.tagName==="head"&&($=!1);const k={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:T,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:y,recordCanvas:d,preserveWhiteSpace:$,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:N,keepIframeSrcFn:S,cssCaptured:!1};if(!(A.type===_.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0)){A.type===_.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText=="string"&&(k.cssCaptured=!0);for(const H of Array.from(ce.childNodes(s))){const ee=ut(H,k);ee&&A.childNodes.push(ee)}}let O=null;if(wi(s)&&(O=ce.shadowRoot(s)))for(const H of Array.from(ce.childNodes(O))){const ee=ut(H,k);ee&&(Dt(O)&&(ee.isShadow=!0),A.childNodes.push(ee))}}const ie=ce.parentNode(s);return ie&&Ot(ie)&&Dt(ie)&&(A.isShadow=!0),A.type===_.Element&&A.tagName==="iframe"&&Au(s,()=>{const k=s.contentDocument;if(k&&w){const O=ut(k,{doc:k,mirror:r,blockClass:i,blockSelector:n,needsMask:T,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:y,recordCanvas:d,preserveWhiteSpace:$,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:N,keepIframeSrcFn:S});O&&w(s,O)}},v),A.type===_.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&Oo(A.attributes.href)==="css")&&Ou(s,()=>{if(E){const k=ut(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:T,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:y,recordCanvas:d,preserveWhiteSpace:$,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:N,keepIframeSrcFn:S});k&&E(s,k)}},N),A}function Pu(s,e){const{mirror:t=new mi,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:y,onSerialize:d,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:N=()=>!1}=e||{};return ut(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!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}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:f,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:m,inlineImages:l,recordCanvas:u,preserveWhiteSpace:y,onSerialize:d,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:N,newlyAddedElement:!1})}const Lu=/(max|min)-device-(width|height)/,yn=new RegExp(Lu.source,"g"),Fu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(yn)&&(s.params=s.params.replace(yn,"$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 Uu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Wu(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 Ci={exports:{}},J=String,$o=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}};Ci.exports=$o();Ci.exports.createColors=$o;var zu=Ci.exports;const Vu={},Gu=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"})),Ee=Wu(Gu);let wn=zu,bn=Ee,Ns=class Po extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),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,Po)}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=wn.isColorSupported),bn&&e&&(t=bn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=wn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
16
  `+p+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 xi=Rs;Rs.default=Rs;var Ht={};Ht.isClean=Symbol("isClean");Ht.my=Symbol("my");const Sn={after:`
20
+ `),this.name+": "+this.message+e}};var Ei=Ns;Ns.default=Ns;var Ht={};Ht.isClean=Symbol("isClean");Ht.my=Symbol("my");const vn={after:`
21
21
  `,beforeClose:`
22
22
  `,beforeComment:`
23
23
  `,beforeDecl:`
24
24
  `,beforeOpen:" ",beforeRule:`
25
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Hu(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(`
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 Sn[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"+Hu(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=Sn[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 ju(s){return s[0].toUpperCase()+s.slice(1)}let Rs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
26
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<n;a++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return vn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+ju(r);this[a]?i=this[a](o,e):o.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=vn[r]),o.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
- `)&&(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 Fo=As;As.default=As;let Yu=Fo;function Os(s,e){new Yu(e).stringify(s)}var Hr=Os;Os.default=Os;let{isClean:tr,my:Zu}=Ht,Xu=xi,Ju=Fo,Ku=Hr;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[tr]=!1,this[Zu]=!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 Xu(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[tr]){this[tr]=!1;let e=this;for(;e=e.parent;)e[tr]=!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 Ju().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=Ku){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 Yr=Ts;Ts.default=Ts;let Qu=Yr,_s=class extends Qu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Zr=_s;_s.default=_s;let qu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ec=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},tc=(s=21)=>{let e="",t=s;for(;t--;)e+=qu[Math.random()*64|0];return e};var rc={nanoid:tc,customAlphabet:ec};let{SourceMapConsumer:Cn,SourceMapGenerator:En}=Ee,{existsSync:sc,readFileSync:ic}=Ee,{dirname:hs,join:nc}=Ee;function oc(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=hs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Cn(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 oc(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=hs(e),sc(e))return this.mapFile=e,ic(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 Cn)return En.fromSourceMap(t).toString();if(t instanceof En)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=nc(hs(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 Bo=ks;ks.default=ks;let{SourceMapConsumer:ac,SourceMapGenerator:lc}=Ee,{fileURLToPath:xn,pathToFileURL:rr}=Ee,{isAbsolute:$s,resolve:Ps}=Ee,{nanoid:uc}=rc,fs=Ee,Mn=xi,cc=Bo,ds=Symbol("fromOffsetCache"),hc=!!(ac&&lc),In=!!(Ps&&$s),Tr=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&&(!In||/^\w+:\/\//.test(t.from)||$s(t.from)?this.file=t.from:this.file=Ps(t.from)),In&&hc){let r=new cc(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 "+uc(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&&(rr&&(o.input.url=rr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[ds])r=this[ds];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[ds]=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:Ps(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=rr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||rr(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=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Xr=Tr;Tr.default=Tr;fs&&fs.registerInput&&fs.registerInput(Tr);let{SourceMapConsumer:Uo,SourceMapGenerator:xr}=Ee,{dirname:Mr,relative:Wo,resolve:zo,sep:Vo}=Ee,{pathToFileURL:Nn}=Ee,fc=Xr,dc=!!(Uo&&xr),pc=!!(Mr&&zo&&Wo&&Vo),mc=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=`
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 n=r.raws.before.split(`
31
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Lo=Rs;Rs.default=Rs;let Hu=Lo;function As(s,e){new Hu(e).stringify(s)}var Hr=As;As.default=As;let{isClean:er,my:Yu}=Ht,Zu=Ei,Xu=Lo,Ju=Hr;function Os(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Os(o,t)):(n==="object"&&i!==null&&(i=Os(i)),t[r]=i)}return t}let Ds=class{constructor(e={}){this.raws={},this[er]=!1,this[Yu]=!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=Os(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 Zu(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[er]){this[er]=!1;let e=this;for(;e=e.parent;)e[er]=!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,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
32
+ `?(i=1,n+=1):i+=1;return{column:i,line:n}}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(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+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 Xu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ju){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var Yr=Ds;Ds.default=Ds;let Ku=Yr,Ts=class extends Ku{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Zr=Ts;Ts.default=Ts;let Qu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",qu=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},ec=(s=21)=>{let e="",t=s;for(;t--;)e+=Qu[Math.random()*64|0];return e};var tc={nanoid:ec,customAlphabet:qu};let{SourceMapConsumer:Sn,SourceMapGenerator:Cn}=Ee,{existsSync:rc,readFileSync:sc}=Ee,{dirname:cs,join:ic}=Ee;function nc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let _s=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=cs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Sn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return nc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/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=cs(e),rc(e))return this.mapFile=e,sc(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 Sn)return Cn.fromSourceMap(t).toString();if(t instanceof Cn)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=ic(cs(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 Fo=_s;_s.default=_s;let{SourceMapConsumer:oc,SourceMapGenerator:ac}=Ee,{fileURLToPath:En,pathToFileURL:tr}=Ee,{isAbsolute:ks,resolve:$s}=Ee,{nanoid:lc}=tc,hs=Ee,xn=Ei,uc=Fo,fs=Symbol("fromOffsetCache"),cc=!!(oc&&ac),In=!!($s&&ks),Tr=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&&(!In||/^\w+:\/\//.test(t.from)||ks(t.from)?this.file=t.from:this.file=$s(t.from)),In&&cc){let r=new uc(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 "+lc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,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);o=h.line,a=h.col}else o=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,o,a);return l?n=new xn(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):n=new xn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(tr&&(n.input.url=tr(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[fs])r=this[fs];else{let n=this.css.split(`
33
+ `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[fs]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:$s(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;ks(o.source)?l=tr(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||tr(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(En)u.file=En(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.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=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Xr=Tr;Tr.default=Tr;hs&&hs.registerInput&&hs.registerInput(Tr);let{SourceMapConsumer:Bo,SourceMapGenerator:Er}=Ee,{dirname:xr,relative:Uo,resolve:Wo,sep:zo}=Ee,{pathToFileURL:Mn}=Ee,hc=Xr,fc=!!(Bo&&Er),dc=!!(xr&&Wo&&Uo&&zo),pc=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||Mr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Uo(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(),pc&&dc&&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=xr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new xr({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 xr({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?Mr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Mr(zo(r,this.mapOpts.annotation)));let i=Wo(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 fc(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(Nn){let r=Nn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Vo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Go=mc;let gc=Yr,Ls=class extends gc{constructor(e){super(e),this.type="comment"}};var Jr=Ls;Ls.default=Ls;let{isClean:jo,my:Ho}=Ht,Yo=Zr,Zo=Jr,yc=Yr,Xo,Mi,Ii,Jo;function Ko(s){return s.map(e=>(e.nodes&&(e.nodes=Ko(e.nodes)),delete e.source,e))}function Qo(s){if(s[jo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Qo(e)}let $e=class qo extends yc{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=Ko(Xo(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 Yo(e)]}else if(e.selector)e=[new Mi(e)];else if(e.name)e=[new Ii(e)];else if(e.text)e=[new Zo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ho]||qo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[jo]&&Qo(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]}};$e.registerParse=s=>{Xo=s};$e.registerRule=s=>{Mi=s};$e.registerAtRule=s=>{Ii=s};$e.registerRoot=s=>{Jo=s};var qe=$e;$e.default=$e;$e.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ii.prototype):s.type==="rule"?Object.setPrototypeOf(s,Mi.prototype):s.type==="decl"?Object.setPrototypeOf(s,Yo.prototype):s.type==="comment"?Object.setPrototypeOf(s,Zo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Jo.prototype),s[Ho]=!0,s.nodes&&s.nodes.forEach(e=>{$e.rebuild(e)})};let wc=qe,ea,ta,$t=class extends wc{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ea(new ta,this,e).stringify()}};$t.registerLazyResult=s=>{ea=s};$t.registerProcessor=s=>{ta=s};var Ni=$t;$t.default=$t;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 ra=Fs;Fs.default=Fs;let vc=ra,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 vc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ri=Bs;Bs.default=Bs;const ps=39,Rn=34,sr=92,An=47,ir=10,St=32,nr=12,or=9,ar=13,bc=91,Sc=93,Cc=40,Ec=41,xc=123,Mc=125,Ic=59,Nc=42,Rc=58,Ac=64,lr=/[\t\n\f\r "#'()/;[\\\]{}]/g,ur=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Oc=/.[\r\n"'(/\\]/,On=/[\da-f]/i;var Dc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,p,m,y=r.length,d=0,g=[],w=[];function b(){return d}function E(C){throw e.error("Unclosed "+C,d)}function N(){return w.length===0&&d>=y}function S(C){if(w.length)return w.pop();if(d>=y)return;let T=C?C.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case ir:case St:case or:case ar:case nr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===St||o===ir||o===or||o===ar||o===nr);m=["space",r.slice(d,n)],d=n-1;break}case bc:case Sc:case xc:case Mc:case Rc:case Ic:case Ec:{let $=String.fromCharCode(o);m=[$,$,d];break}case Cc:{if(f=g.length?g.pop()[1]:"",p=r.charCodeAt(d+1),f==="url"&&p!==ps&&p!==Rn&&p!==St&&p!==ir&&p!==or&&p!==nr&&p!==ar){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||T){n=d;break}else E("bracket");for(h=n;r.charCodeAt(h-1)===sr;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||Oc.test(l)?m=["(","(",d]:(m=["brackets",l,d,n],d=n);break}case ps:case Rn:{a=o===ps?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||T){n=d+1;break}else E("string");for(h=n;r.charCodeAt(h-1)===sr;)h-=1,c=!c}while(c);m=["string",r.slice(d,n+1),d,n],d=n;break}case Ac:{lr.lastIndex=d+1,lr.test(r),lr.lastIndex===0?n=r.length-1:n=lr.lastIndex-2,m=["at-word",r.slice(d,n+1),d,n],d=n;break}case sr:{for(n=d,u=!0;r.charCodeAt(n+1)===sr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==An&&o!==St&&o!==ir&&o!==or&&o!==ar&&o!==nr&&(n+=1,On.test(r.charAt(n)))){for(;On.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===St&&(n+=1)}m=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===An&&r.charCodeAt(d+1)===Nc?(n=r.indexOf("*/",d+2)+1,n===0&&(i||T?n=r.length:E("comment")),m=["comment",r.slice(d,n+1),d,n],d=n):(ur.lastIndex=d+1,ur.test(r),ur.lastIndex===0?n=r.length-1:n=ur.lastIndex-2,m=["word",r.slice(d,n+1),d,n],g.push(m),d=n);break}}return d++,m}function x(C){w.push(C)}return{back:x,endOfFile:N,nextToken:S,position:b}};let sa=qe,_r=class extends sa{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=_r;_r.default=_r;sa.registerAtRule(_r);let ia=qe,na,oa,pt=class extends ia{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 na(new oa,this,e).stringify()}};pt.registerLazyResult=s=>{na=s};pt.registerProcessor=s=>{oa=s};var Yt=pt;pt.default=pt;ia.registerRoot(pt);let Pt={comma(s){return Pt.split(s,[","],!0)},space(s){let e=[" ",`
38
- `," "];return Pt.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 aa=Pt;Pt.default=Pt;let la=qe,Tc=aa,kr=class extends la{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Tc.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 Oi=kr;kr.default=kr;la.registerRule(kr);let _c=Zr,kc=Dc,$c=Jr,Pc=Ai,Lc=Yt,Dn=Oi;const Tn={empty:!0,space:!0};function Fc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Bc=class{constructor(e){this.input=e,this.root=new Lc,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 Pc;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 $c;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=kc(this.input)}decl(e,t){let r=new _c;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]||Fc(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 p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="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 Dn;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",!Tn[h]&&!Tn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Dn;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 Uc=Bc;let Wc=qe,zc=Uc,Vc=Xr;function $r(s,e){let t=new Vc(s,e),r=new zc(t);try{r.parse()}catch(i){throw i}return r.root}var Di=$r;$r.default=$r;Wc.registerParse($r);let{isClean:Ne,my:Gc}=Ht,jc=Go,Hc=Hr,Yc=qe,Zc=Ni;let _n=Ri,Xc=Di,Jc=Yt;const Kc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Qc={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},qc={Once:!0,postcssPlugin:!0,prepare:!0},mt=0;function Ct(s){return typeof s=="object"&&typeof s.then=="function"}function ua(s){let e=!1,t=Kc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,mt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,mt,t+"Exit"]:[t,t+"Exit"]}function kn(s){let e;return s.type==="document"?e=["Document",mt,"DocumentExit"]:s.type==="root"?e=["Root",mt,"RootExit"]:e=ua(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Us(s){return s[Ne]=!1,s.nodes&&s.nodes.forEach(e=>Us(e)),s}let Ws={},gt=class ca{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 ca||t instanceof _n)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=Xc;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[Gc]&&Yc.rebuild(i)}this.result=new _n(e,i,r),this.helpers=ne(D({},Ws),{postcss:Ws,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?D(D({},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(!Qc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qc[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(Ct(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];){e[Ne]=!0;let t=[kn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ct(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 Ct(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=Hc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new jc(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(Ct(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];)e[Ne]=!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(Ct(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[Ne]){a[Ne]=!0,e.push(kn(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===mt){r.nodes&&r.nodes.length&&(r[Ne]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Ne]=!0;let t=ua(e);for(let r of t)if(r===mt)e.nodes&&e.each(i=>{i[Ne]||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"}};gt.registerPostcss=s=>{Ws=s};var ha=gt;gt.default=gt;Jc.registerLazyResult(gt);Zc.registerLazyResult(gt);let eh=Go,th=Hr;let rh=Di;const sh=Ri;let zs=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=th;this.result=new sh(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new eh(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=rh;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 ih=zs;zs.default=zs;let nh=ih,oh=ha,ah=Ni,lh=Yt,Lt=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 nh(this,e,t):new oh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var uh=Lt;Lt.default=Lt;lh.registerProcessor(Lt);ah.registerProcessor(Lt);let ch=Zr,hh=Bo,fh=Jr,dh=Ai,ph=Xr,mh=Yt,gh=Oi;function Ft(s,e){if(Array.isArray(s))return s.map(n=>Ft(n));let i=s,{inputs:t}=i,r=st(i,["inputs"]);if(t){e=[];for(let n of t){let a=ne(D({},n),{__proto__:ph.prototype});a.map&&(a.map=ne(D({},a.map),{__proto__:hh.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>Ft(n,e))),r.source){let o=r.source,{inputId:n}=o,a=st(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new mh(r);if(r.type==="decl")return new ch(r);if(r.type==="rule")return new gh(r);if(r.type==="comment")return new fh(r);if(r.type==="atrule")return new dh(r);throw new Error("Unknown node type: "+s.type)}var yh=Ft;Ft.default=Ft;let wh=xi,fa=Zr,vh=ha,bh=qe,Ti=uh,Sh=Hr,Ch=yh,da=Ni,Eh=ra,pa=Jr,ma=Ai,xh=Ri,Mh=Xr,Ih=Di,Nh=aa,ga=Oi,ya=Yt,Rh=Yr;function G(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ti(s)}G.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||xr(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(),dc&&fc&&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=Er.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Er({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 Er({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;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))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
37
+ `),t=a.length-o):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?xr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=xr(Wo(r,this.mapOpts.annotation)));let i=Uo(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 hc(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(Mn){let r=Mn(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;zo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Vo=pc;let mc=Yr,Ps=class extends mc{constructor(e){super(e),this.type="comment"}};var Jr=Ps;Ps.default=Ps;let{isClean:Go,my:jo}=Ht,Ho=Zr,Yo=Jr,gc=Yr,Zo,xi,Ii,Xo;function Jo(s){return s.map(e=>(e.nodes&&(e.nodes=Jo(e.nodes)),delete e.source,e))}function Ko(s){if(s[Go]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Ko(e)}let $e=class Qo extends gc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Jo(Zo(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 Ho(e)]}else if(e.selector)e=[new xi(e)];else if(e.name)e=[new Ii(e)];else if(e.text)e=[new Yo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[jo]||Qo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Go]&&Ko(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(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};$e.registerParse=s=>{Zo=s};$e.registerRule=s=>{xi=s};$e.registerAtRule=s=>{Ii=s};$e.registerRoot=s=>{Xo=s};var qe=$e;$e.default=$e;$e.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ii.prototype):s.type==="rule"?Object.setPrototypeOf(s,xi.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ho.prototype):s.type==="comment"?Object.setPrototypeOf(s,Yo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Xo.prototype),s[jo]=!0,s.nodes&&s.nodes.forEach(e=>{$e.rebuild(e)})};let yc=qe,qo,ea,$t=class extends yc{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new qo(new ea,this,e).stringify()}};$t.registerLazyResult=s=>{qo=s};$t.registerProcessor=s=>{ea=s};var Mi=$t;$t.default=$t;let Ls=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 ta=Ls;Ls.default=Ls;let wc=ta,Fs=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 wc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ni=Fs;Fs.default=Fs;const ds=39,Nn=34,rr=92,Rn=47,sr=10,Ct=32,ir=12,nr=9,or=13,bc=91,vc=93,Sc=40,Cc=41,Ec=123,xc=125,Ic=59,Mc=42,Nc=58,Rc=64,ar=/[\t\n\f\r "#'()/;[\\\]{}]/g,lr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ac=/.[\r\n"'(/\\]/,An=/[\da-f]/i;var Oc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,p,m,y=r.length,d=0,g=[],w=[];function v(){return d}function E(C){throw e.error("Unclosed "+C,d)}function N(){return w.length===0&&d>=y}function S(C){if(w.length)return w.pop();if(d>=y)return;let T=C?C.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case sr:case Ct:case nr:case or:case ir:{o=d;do o+=1,n=r.charCodeAt(o);while(n===Ct||n===sr||n===nr||n===or||n===ir);m=["space",r.slice(d,o)],d=o-1;break}case bc:case vc:case Ec:case xc:case Nc:case Ic:case Cc:{let $=String.fromCharCode(n);m=[$,$,d];break}case Sc:{if(f=g.length?g.pop()[1]:"",p=r.charCodeAt(d+1),f==="url"&&p!==ds&&p!==Nn&&p!==Ct&&p!==sr&&p!==nr&&p!==ir&&p!==or){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||T){o=d;break}else E("bracket");for(h=o;r.charCodeAt(h-1)===rr;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||Ac.test(l)?m=["(","(",d]:(m=["brackets",l,d,o],d=o);break}case ds:case Nn:{a=n===ds?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||T){o=d+1;break}else E("string");for(h=o;r.charCodeAt(h-1)===rr;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Rc:{ar.lastIndex=d+1,ar.test(r),ar.lastIndex===0?o=r.length-1:o=ar.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case rr:{for(o=d,u=!0;r.charCodeAt(o+1)===rr;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Rn&&n!==Ct&&n!==sr&&n!==nr&&n!==or&&n!==ir&&(o+=1,An.test(r.charAt(o)))){for(;An.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ct&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===Rn&&r.charCodeAt(d+1)===Mc?(o=r.indexOf("*/",d+2)+1,o===0&&(i||T?o=r.length:E("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(lr.lastIndex=d+1,lr.test(r),lr.lastIndex===0?o=r.length-1:o=lr.lastIndex-2,m=["word",r.slice(d,o+1),d,o],g.push(m),d=o);break}}return d++,m}function I(C){w.push(C)}return{back:I,endOfFile:N,nextToken:S,position:v}};let ra=qe,_r=class extends ra{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 Ri=_r;_r.default=_r;ra.registerAtRule(_r);let sa=qe,ia,na,pt=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 n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ia(new na,this,e).stringify()}};pt.registerLazyResult=s=>{ia=s};pt.registerProcessor=s=>{na=s};var Yt=pt;pt.default=pt;sa.registerRoot(pt);let Pt={comma(s){return Pt.split(s,[","],!0)},space(s){let e=[" ",`
38
+ `," "];return Pt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=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==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var oa=Pt;Pt.default=Pt;let aa=qe,Dc=oa,kr=class extends aa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Dc.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 Ai=kr;kr.default=kr;aa.registerRule(kr);let Tc=Zr,_c=Oc,kc=Jr,$c=Ri,Pc=Yt,On=Ai;const Dn={empty:!0,space:!0};function Lc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Fc=class{constructor(e){this.input=e,this.root=new Pc,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 $c;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!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(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];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()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(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 n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new kc;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=_c(this.input)}decl(e,t){let r=new Tc;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]||Lc(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 n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[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(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 On;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,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.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===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),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 n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="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+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new On;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=Fc;let Uc=qe,Wc=Bc,zc=Xr;function $r(s,e){let t=new zc(s,e),r=new Wc(t);try{r.parse()}catch(i){throw i}return r.root}var Oi=$r;$r.default=$r;Uc.registerParse($r);let{isClean:Ne,my:Vc}=Ht,Gc=Vo,jc=Hr,Hc=qe,Yc=Mi;let Tn=Ni,Zc=Oi,Xc=Yt;const Jc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Kc={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},Qc={Once:!0,postcssPlugin:!0,prepare:!0},mt=0;function Et(s){return typeof s=="object"&&typeof s.then=="function"}function la(s){let e=!1,t=Jc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,mt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,mt,t+"Exit"]:[t,t+"Exit"]}function _n(s){let e;return s.type==="document"?e=["Document",mt,"DocumentExit"]:s.type==="root"?e=["Root",mt,"RootExit"]:e=la(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Bs(s){return s[Ne]=!1,s.nodes&&s.nodes.forEach(e=>Bs(e)),s}let Us={},gt=class ua{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=Bs(t);else if(t instanceof ua||t instanceof Tn)i=Bs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Zc;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Vc]&&Hc.rebuild(i)}this.result=new Tn(e,i,r),this.helpers=ne(D({},Us),{postcss:Us,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?D(D({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Kc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Qc[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(Et(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];){e[Ne]=!0;let t=[_n(e)];for(;t.length>0;){let r=this.visitTick(t);if(Et(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Et(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=jc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Gc(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(Et(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];)e[Ne]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Et(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Ne]){a[Ne]=!0,e.push(_n(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===mt){r.nodes&&r.nodes.length&&(r[Ne]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ne]=!0;let t=la(e);for(let r of t)if(r===mt)e.nodes&&e.each(i=>{i[Ne]||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"}};gt.registerPostcss=s=>{Us=s};var ca=gt;gt.default=gt;Xc.registerLazyResult(gt);Yc.registerLazyResult(gt);let qc=Vo,eh=Hr;let th=Oi;const rh=Ni;let Ws=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,n=eh;this.result=new rh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new qc(n,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=th;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 sh=Ws;Ws.default=Ws;let ih=sh,nh=ca,oh=Mi,ah=Yt,Lt=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 ih(this,e,t):new nh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var lh=Lt;Lt.default=Lt;ah.registerProcessor(Lt);oh.registerProcessor(Lt);let uh=Zr,ch=Fo,hh=Jr,fh=Ri,dh=Xr,ph=Yt,mh=Ai;function Ft(s,e){if(Array.isArray(s))return s.map(o=>Ft(o));let i=s,{inputs:t}=i,r=st(i,["inputs"]);if(t){e=[];for(let o of t){let a=ne(D({},o),{__proto__:dh.prototype});a.map&&(a.map=ne(D({},a.map),{__proto__:ch.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>Ft(o,e))),r.source){let n=r.source,{inputId:o}=n,a=st(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new ph(r);if(r.type==="decl")return new uh(r);if(r.type==="rule")return new mh(r);if(r.type==="comment")return new hh(r);if(r.type==="atrule")return new fh(r);throw new Error("Unknown node type: "+s.type)}var gh=Ft;Ft.default=Ft;let yh=Ei,ha=Zr,wh=ca,bh=qe,Di=lh,vh=Hr,Sh=gh,fa=Mi,Ch=ta,da=Jr,pa=Ri,Eh=Ni,xh=Xr,Ih=Oi,Mh=oa,ma=Ai,ga=Yt,Nh=Yr;function G(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Di(s)}G.plugin=function(e,t){let r=!1;function i(...o){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 Ti().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return G([i(l)]).process(n,a)},i};G.stringify=Sh;G.parse=Ih;G.fromJSON=Ch;G.list=Nh;G.comment=s=>new pa(s);G.atRule=s=>new ma(s);G.decl=s=>new fa(s);G.rule=s=>new ga(s);G.root=s=>new ya(s);G.document=s=>new da(s);G.CssSyntaxError=wh;G.Declaration=fa;G.Container=bh;G.Processor=Ti;G.Document=da;G.Comment=pa;G.Warning=Eh;G.AtRule=ma;G.Result=xh;G.Input=Mh;G.Rule=ga;G.Root=ya;G.Node=Rh;vh.registerPostcss(G);var Ah=G;G.default=G;const Q=Wu(Ah);Q.stringify;Q.fromJSON;Q.plugin;Q.parse;Q.list;Q.document;Q.comment;Q.atRule;Q.rule;Q.decl;Q.root;Q.CssSyntaxError;Q.Declaration;Q.Container;Q.Processor;Q.Document;Q.Comment;Q.Warning;Q.AtRule;Q.Result;Q.Input;Q.Rule;Q.Root;Q.Node;const $n={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 Oh(s){let e=$n[s.tagName]?$n[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function Kr(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;const i=Q([Bu,Uu]).process(s).css;return e==null||e.stylesWithHoverClass.set(s,i),i}function Pn(){return{stylesWithHoverClass:new Map}}function Dh(s,e,t,r){const i=[];for(const n of s.childNodes)n.type===_.Text&&i.push(n);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));for(let n=0;n<i.length;n++){const a=i[n],l=o[n];a&&l&&(a.textContent=t?Kr(l,r):l)}}function Th(s,e,t,r){const{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?Dh(s,t,o,n):(o&&(t=Kr(t,n)),e.appendChild(i.createTextNode(t)))}function _h(s,e){var t;const{doc:r,hackCss:i,cache:o}=e;switch(s.type){case _.Document:return r.implementation.createDocument(null,"",null);case _.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case _.Element:{const n=Oh(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"){Th(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.rel==="modulepreload")&&s.attributes.as==="script"||n==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&s.attributes.href.endsWith(".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 _.Text:return s.isStyle&&i?r.createTextNode(Kr(s.textContent,o)):r.createTextNode(s.textContent);case _.CDATA:return r.createCDATASection(s.textContent);case _.Comment:return r.createComment(s.textContent);default:return null}}function Tt(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(lu(c,s))return r.getNode(s.id)}let l=_h(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===_.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==_.DocumentType&&(s.childNodes[0].type===_.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===_.Document||s.type===_.Element)&&!i)for(const u of s.childNodes){const c=Tt(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&&vi(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===_.Document&&u.type==_.Element){const h=c;let f=null;h.childNodes.forEach(p=>{p.nodeName==="BODY"&&(f=p)}),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 kh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function $h(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==_.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 Ph(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new gi}=e,l=Tt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return kh(a,u=>{r&&r(u),$h(u,a)}),l}var Lh=Object.defineProperty,Fh=(s,e,t)=>e in s?Lh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,I=(s,e,t)=>Fh(s,typeof e!="symbol"?e+"":e,t),Bh=Object.defineProperty,Uh=(s,e,t)=>e in s?Bh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Ln=(s,e,t)=>Uh(s,typeof e!="symbol"?e+"":e,t);let Wh=class{constructor(){Ln(this,"idNodeMap",new Map),Ln(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 zh(){return new Wh}function Vh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Gh(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 _i={exports:{}},J=String,wa=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}};_i.exports=wa();_i.exports.createColors=wa;var jh=_i.exports;const Hh={},Yh=Object.freeze(Object.defineProperty({__proto__:null,default:Hh},Symbol.toStringTag,{value:"Module"})),xe=Gh(Yh);let Fn=jh,Bn=xe,Vs=class va 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,va)}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=Fn.isColorSupported),Bn&&e&&(t=Bn(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}=Fn.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 p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
40
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Di().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return G([i(l)]).process(o,a)},i};G.stringify=vh;G.parse=Ih;G.fromJSON=Sh;G.list=Mh;G.comment=s=>new da(s);G.atRule=s=>new pa(s);G.decl=s=>new ha(s);G.rule=s=>new ma(s);G.root=s=>new ga(s);G.document=s=>new fa(s);G.CssSyntaxError=yh;G.Declaration=ha;G.Container=bh;G.Processor=Di;G.Document=fa;G.Comment=da;G.Warning=Ch;G.AtRule=pa;G.Result=Eh;G.Input=xh;G.Rule=ma;G.Root=ga;G.Node=Nh;wh.registerPostcss(G);var Rh=G;G.default=G;const q=Uu(Rh);q.stringify;q.fromJSON;q.plugin;q.parse;q.list;q.document;q.comment;q.atRule;q.rule;q.decl;q.root;q.CssSyntaxError;q.Declaration;q.Container;q.Processor;q.Document;q.Comment;q.Warning;q.AtRule;q.Result;q.Input;q.Rule;q.Root;q.Node;const kn={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 Ah(s){let e=kn[s.tagName]?kn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function Kr(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;const i=q([Fu,Bu]).process(s).css;return e==null||e.stylesWithHoverClass.set(s,i),i}function $n(){return{stylesWithHoverClass:new Map}}function Oh(s,e,t,r){const i=[];for(const o of s.childNodes)o.type===_.Text&&i.push(o);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));for(let o=0;o<i.length;o++){const a=i[o],l=n[o];a&&l&&(a.textContent=t?Kr(l,r):l)}}function Dh(s,e,t,r){const{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?Oh(s,t,n,o):(n&&(t=Kr(t,o)),e.appendChild(i.createTextNode(t)))}function Th(s,e){var t;const{doc:r,hackCss:i,cache:n}=e;switch(s.type){case _.Document:return r.implementation.createDocument(null,"",null);case _.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case _.Element:{const o=Ah(s);let a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",o):(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(o));const l={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){Dh(s,a,c,e);continue}else if(o==="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(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&s.attributes.href.endsWith(".js")||(o==="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(o==="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(o==="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 _.Text:return s.isStyle&&i?r.createTextNode(Kr(s.textContent,n)):r.createTextNode(s.textContent);case _.CDATA:return r.createCDATASection(s.textContent);case _.Comment:return r.createComment(s.textContent);default:return null}}function Tt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(au(c,s))return r.getNode(s.id)}let l=Th(s,{doc:t,hackCss:n,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===_.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==_.DocumentType&&(s.childNodes[0].type===_.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===_.Document||s.type===_.Element)&&!i)for(const u of s.childNodes){const c=Tt(u,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&wi(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===_.Document&&u.type==_.Element){const h=c;let f=null;h.childNodes.forEach(p=>{p.nodeName==="BODY"&&(f=p)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function _h(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function kh(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==_.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function $h(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:a=new mi}=e,l=Tt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return _h(a,u=>{r&&r(u),kh(u,a)}),l}var Ph=Object.defineProperty,Lh=(s,e,t)=>e in s?Ph(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e,t)=>Lh(s,typeof e!="symbol"?e+"":e,t),Fh=Object.defineProperty,Bh=(s,e,t)=>e in s?Fh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Pn=(s,e,t)=>Bh(s,typeof e!="symbol"?e+"":e,t);let Uh=class{constructor(){Pn(this,"idNodeMap",new Map),Pn(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 Wh(){return new Uh}function zh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Vh(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:{}},K=String,ya=function(){return{isColorSupported:!1,reset:K,bold:K,dim:K,italic:K,underline:K,inverse:K,hidden:K,strikethrough:K,black:K,red:K,green:K,yellow:K,blue:K,magenta:K,cyan:K,white:K,gray:K,bgBlack:K,bgRed:K,bgGreen:K,bgYellow:K,bgBlue:K,bgMagenta:K,bgCyan:K,bgWhite:K}};Ti.exports=ya();Ti.exports.createColors=ya;var Gh=Ti.exports;const jh={},Hh=Object.freeze(Object.defineProperty({__proto__:null,default:jh},Symbol.toStringTag,{value:"Module"})),xe=Vh(Hh);let Ln=Gh,Fn=xe,zs=class wa extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),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,wa)}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=Ln.isColorSupported),Fn&&e&&(t=Fn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=Ln.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let p=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
41
41
  `+p+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 ki=Vs;Vs.default=Vs;var Zt={};Zt.isClean=Symbol("isClean");Zt.my=Symbol("my");const Un={after:`
45
+ `),this.name+": "+this.message+e}};var _i=zs;zs.default=zs;var Zt={};Zt.isClean=Symbol("isClean");Zt.my=Symbol("my");const Bn={after:`
46
46
  `,beforeClose:`
47
47
  `,beforeComment:`
48
48
  `,beforeDecl:`
49
49
  `,beforeOpen:" ",beforeRule:`
50
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Zh(s){return s[0].toUpperCase()+s.slice(1)}let Gs=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 Un[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"+Zh(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=Un[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 Yh(s){return s[0].toUpperCase()+s.slice(1)}let Vs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
51
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<n;a++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Bn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Yh(r);this[a]?i=this[a](o,e):o.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Bn[r]),o.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
- `)&&(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 ba=Gs;Gs.default=Gs;let Xh=ba;function js(s,e){new Xh(e).stringify(s)}var Qr=js;js.default=js;let{isClean:cr,my:Jh}=Zt,Kh=ki,Qh=ba,qh=Qr;function Hs(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=>Hs(n,t)):(o==="object"&&i!==null&&(i=Hs(i)),t[r]=i)}return t}let Ys=class{constructor(e={}){this.raws={},this[cr]=!1,this[Jh]=!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=Hs(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[cr]){this[cr]=!1;let e=this;for(;e=e.parent;)e[cr]=!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 Qh().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=qh){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 qr=Ys;Ys.default=Ys;let ef=qr,Zs=class extends ef{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var es=Zs;Zs.default=Zs;let tf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",rf=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},sf=(s=21)=>{let e="",t=s;for(;t--;)e+=tf[Math.random()*64|0];return e};var nf={nanoid:sf,customAlphabet:rf};let{SourceMapConsumer:Wn,SourceMapGenerator:zn}=xe,{existsSync:of,readFileSync:af}=xe,{dirname:ms,join:lf}=xe;function uf(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Xs=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=ms(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Wn(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 uf(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=ms(e),of(e))return this.mapFile=e,af(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 Wn)return zn.fromSourceMap(t).toString();if(t instanceof zn)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=lf(ms(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 Sa=Xs;Xs.default=Xs;let{SourceMapConsumer:cf,SourceMapGenerator:hf}=xe,{fileURLToPath:Vn,pathToFileURL:hr}=xe,{isAbsolute:Js,resolve:Ks}=xe,{nanoid:ff}=nf,gs=xe,Gn=ki,df=Sa,ys=Symbol("fromOffsetCache"),pf=!!(cf&&hf),jn=!!(Ks&&Js),Pr=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&&(!jn||/^\w+:\/\//.test(t.from)||Js(t.from)?this.file=t.from:this.file=Ks(t.from)),jn&&pf){let r=new df(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 "+ff(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 Gn(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 Gn(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&&(hr&&(o.input.url=hr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[ys])r=this[ys];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[ys]=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:Ks(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;Js(n.source)?l=hr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||hr(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(Vn)u.file=Vn(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=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ts=Pr;Pr.default=Pr;gs&&gs.registerInput&&gs.registerInput(Pr);let{SourceMapConsumer:Ca,SourceMapGenerator:Ir}=xe,{dirname:Nr,relative:Ea,resolve:xa,sep:Ma}=xe,{pathToFileURL:Hn}=xe,mf=ts,gf=!!(Ca&&Ir),yf=!!(Nr&&xa&&Ea&&Ma),wf=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=`
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 n=r.raws.before.split(`
56
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ba=Vs;Vs.default=Vs;let Zh=ba;function Gs(s,e){new Zh(e).stringify(s)}var Qr=Gs;Gs.default=Gs;let{isClean:ur,my:Xh}=Zt,Jh=_i,Kh=ba,Qh=Qr;function js(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>js(o,t)):(n==="object"&&i!==null&&(i=js(i)),t[r]=i)}return t}let Hs=class{constructor(e={}){this.raws={},this[ur]=!1,this[Xh]=!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=js(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 Jh(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[ur]){this[ur]=!1;let e=this;for(;e=e.parent;)e[ur]=!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,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
57
+ `?(i=1,n+=1):i+=1;return{column:i,line:n}}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(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+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 Kh().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Qh){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var qr=Hs;Hs.default=Hs;let qh=qr,Ys=class extends qh{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(D({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var es=Ys;Ys.default=Ys;let ef="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",tf=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},rf=(s=21)=>{let e="",t=s;for(;t--;)e+=ef[Math.random()*64|0];return e};var sf={nanoid:rf,customAlphabet:tf};let{SourceMapConsumer:Un,SourceMapGenerator:Wn}=xe,{existsSync:nf,readFileSync:of}=xe,{dirname:ps,join:af}=xe;function lf(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Zs=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=ps(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Un(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return lf(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/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=ps(e),nf(e))return this.mapFile=e,of(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 Un)return Wn.fromSourceMap(t).toString();if(t instanceof Wn)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=af(ps(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 va=Zs;Zs.default=Zs;let{SourceMapConsumer:uf,SourceMapGenerator:cf}=xe,{fileURLToPath:zn,pathToFileURL:cr}=xe,{isAbsolute:Xs,resolve:Js}=xe,{nanoid:hf}=sf,ms=xe,Vn=_i,ff=va,gs=Symbol("fromOffsetCache"),df=!!(uf&&cf),Gn=!!(Js&&Xs),Pr=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&&(!Gn||/^\w+:\/\//.test(t.from)||Xs(t.from)?this.file=t.from:this.file=Js(t.from)),Gn&&df){let r=new ff(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 "+hf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,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);o=h.line,a=h.col}else o=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,o,a);return l?n=new Vn(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):n=new Vn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(cr&&(n.input.url=cr(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[gs])r=this[gs];else{let n=this.css.split(`
58
+ `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[gs]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Js(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;Xs(o.source)?l=cr(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||cr(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(zn)u.file=zn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.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=D({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ts=Pr;Pr.default=Pr;ms&&ms.registerInput&&ms.registerInput(Pr);let{SourceMapConsumer:Sa,SourceMapGenerator:Ir}=xe,{dirname:Mr,relative:Ca,resolve:Ea,sep:xa}=xe,{pathToFileURL:jn}=xe,pf=ts,mf=!!(Sa&&Ir),gf=!!(Mr&&Ea&&Ca&&xa),yf=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||Nr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ca(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(),yf&&gf&&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(`
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?Nr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Nr(xa(r,this.mapOpts.annotation)));let i=Ea(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 mf(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(Hn){let r=Hn(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;Ma==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Ia=wf;let vf=qr,Qs=class extends vf{constructor(e){super(e),this.type="comment"}};var rs=Qs;Qs.default=Qs;let{isClean:Na,my:Ra}=Zt,Aa=es,Oa=rs,bf=qr,Da,$i,Pi,Ta;function _a(s){return s.map(e=>(e.nodes&&(e.nodes=_a(e.nodes)),delete e.source,e))}function ka(s){if(s[Na]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ka(e)}let Pe=class $a extends bf{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=_a(Da(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 Aa(e)]}else if(e.selector)e=[new $i(e)];else if(e.name)e=[new Pi(e)];else if(e.text)e=[new Oa(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ra]||$a.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Na]&&ka(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]}};Pe.registerParse=s=>{Da=s};Pe.registerRule=s=>{$i=s};Pe.registerAtRule=s=>{Pi=s};Pe.registerRoot=s=>{Ta=s};var et=Pe;Pe.default=Pe;Pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Pi.prototype):s.type==="rule"?Object.setPrototypeOf(s,$i.prototype):s.type==="decl"?Object.setPrototypeOf(s,Aa.prototype):s.type==="comment"?Object.setPrototypeOf(s,Oa.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ta.prototype),s[Ra]=!0,s.nodes&&s.nodes.forEach(e=>{Pe.rebuild(e)})};let Sf=et,Pa,La,Bt=class extends Sf{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Pa(new La,this,e).stringify()}};Bt.registerLazyResult=s=>{Pa=s};Bt.registerProcessor=s=>{La=s};var Li=Bt;Bt.default=Bt;let qs=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 Fa=qs;qs.default=qs;let Cf=Fa,ei=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 Fi=ei;ei.default=ei;const ws=39,Yn=34,fr=92,Zn=47,dr=10,Et=32,pr=12,mr=9,gr=13,Ef=91,xf=93,Mf=40,If=41,Nf=123,Rf=125,Af=59,Of=42,Df=58,Tf=64,yr=/[\t\n\f\r "#'()/;[\\\]{}]/g,wr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_f=/.[\r\n"'(/\\]/,Xn=/[\da-f]/i;var kf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,p,m,y=r.length,d=0,g=[],w=[];function b(){return d}function E(C){throw e.error("Unclosed "+C,d)}function N(){return w.length===0&&d>=y}function S(C){if(w.length)return w.pop();if(d>=y)return;let T=C?C.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case dr:case Et:case mr:case gr:case pr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Et||o===dr||o===mr||o===gr||o===pr);m=["space",r.slice(d,n)],d=n-1;break}case Ef:case xf:case Nf:case Rf:case Df:case Af:case If:{let $=String.fromCharCode(o);m=[$,$,d];break}case Mf:{if(f=g.length?g.pop()[1]:"",p=r.charCodeAt(d+1),f==="url"&&p!==ws&&p!==Yn&&p!==Et&&p!==dr&&p!==mr&&p!==pr&&p!==gr){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||T){n=d;break}else E("bracket");for(h=n;r.charCodeAt(h-1)===fr;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||_f.test(l)?m=["(","(",d]:(m=["brackets",l,d,n],d=n);break}case ws:case Yn:{a=o===ws?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||T){n=d+1;break}else E("string");for(h=n;r.charCodeAt(h-1)===fr;)h-=1,c=!c}while(c);m=["string",r.slice(d,n+1),d,n],d=n;break}case Tf:{yr.lastIndex=d+1,yr.test(r),yr.lastIndex===0?n=r.length-1:n=yr.lastIndex-2,m=["at-word",r.slice(d,n+1),d,n],d=n;break}case fr:{for(n=d,u=!0;r.charCodeAt(n+1)===fr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Zn&&o!==Et&&o!==dr&&o!==mr&&o!==gr&&o!==pr&&(n+=1,Xn.test(r.charAt(n)))){for(;Xn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Et&&(n+=1)}m=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===Zn&&r.charCodeAt(d+1)===Of?(n=r.indexOf("*/",d+2)+1,n===0&&(i||T?n=r.length:E("comment")),m=["comment",r.slice(d,n+1),d,n],d=n):(wr.lastIndex=d+1,wr.test(r),wr.lastIndex===0?n=r.length-1:n=wr.lastIndex-2,m=["word",r.slice(d,n+1),d,n],g.push(m),d=n);break}}return d++,m}function x(C){w.push(C)}return{back:x,endOfFile:N,nextToken:S,position:b}};let Ba=et,Lr=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 Bi=Lr;Lr.default=Lr;Ba.registerAtRule(Lr);let Ua=et,Wa,za,yt=class extends Ua{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 Wa(new za,this,e).stringify()}};yt.registerLazyResult=s=>{Wa=s};yt.registerProcessor=s=>{za=s};var Xt=yt;yt.default=yt;Ua.registerRoot(yt);let Ut={comma(s){return Ut.split(s,[","],!0)},space(s){let e=[" ",`
63
- `," "];return Ut.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 Va=Ut;Ut.default=Ut;let Ga=et,$f=Va,Fr=class extends Ga{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return $f.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 Ui=Fr;Fr.default=Fr;Ga.registerRule(Fr);let Pf=es,Lf=kf,Ff=rs,Bf=Bi,Uf=Xt,Jn=Ui;const Kn={empty:!0,space:!0};function Wf(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let zf=class{constructor(e){this.input=e,this.root=new Uf,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 Bf;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 Ff;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=Lf(this.input)}decl(e,t){let r=new Pf;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]||Wf(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 p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="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 Jn;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",!Kn[h]&&!Kn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Jn;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 Vf=zf;let Gf=et,jf=Vf,Hf=ts;function Br(s,e){let t=new Hf(s,e),r=new jf(t);try{r.parse()}catch(i){throw i}return r.root}var Wi=Br;Br.default=Br;Gf.registerParse(Br);let{isClean:Re,my:Yf}=Zt,Zf=Ia,Xf=Qr,Jf=et,Kf=Li;let Qn=Fi,Qf=Wi,qf=Xt;const ed={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},td={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},rd={Once:!0,postcssPlugin:!0,prepare:!0},wt=0;function xt(s){return typeof s=="object"&&typeof s.then=="function"}function ja(s){let e=!1,t=ed[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,wt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,wt,t+"Exit"]:[t,t+"Exit"]}function qn(s){let e;return s.type==="document"?e=["Document",wt,"DocumentExit"]:s.type==="root"?e=["Root",wt,"RootExit"]:e=ja(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ti(s){return s[Re]=!1,s.nodes&&s.nodes.forEach(e=>ti(e)),s}let ri={},vt=class Ha{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=ti(t);else if(t instanceof Ha||t instanceof Qn)i=ti(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=Qf;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[Yf]&&Jf.rebuild(i)}this.result=new Qn(e,i,r),this.helpers=ne(D({},ri),{postcss:ri,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?D(D({},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(!td[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!rd[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(xt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];){e[Re]=!0;let t=[qn(e)];for(;t.length>0;){let r=this.visitTick(t);if(xt(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 xt(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=Xf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Zf(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(xt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];)e[Re]=!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(xt(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[Re]){a[Re]=!0,e.push(qn(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===wt){r.nodes&&r.nodes.length&&(r[Re]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Re]=!0;let t=ja(e);for(let r of t)if(r===wt)e.nodes&&e.each(i=>{i[Re]||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"}};vt.registerPostcss=s=>{ri=s};var Ya=vt;vt.default=vt;qf.registerLazyResult(vt);Kf.registerLazyResult(vt);let sd=Ia,id=Qr;let nd=Wi;const od=Fi;let si=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=id;this.result=new od(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new sd(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=nd;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 ad=si;si.default=si;let ld=ad,ud=Ya,cd=Li,hd=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 ld(this,e,t):new ud(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var fd=Wt;Wt.default=Wt;hd.registerProcessor(Wt);cd.registerProcessor(Wt);let dd=es,pd=Sa,md=rs,gd=Bi,yd=ts,wd=Xt,vd=Ui;function zt(s,e){if(Array.isArray(s))return s.map(n=>zt(n));let i=s,{inputs:t}=i,r=st(i,["inputs"]);if(t){e=[];for(let n of t){let a=ne(D({},n),{__proto__:yd.prototype});a.map&&(a.map=ne(D({},a.map),{__proto__:pd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>zt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=st(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new wd(r);if(r.type==="decl")return new dd(r);if(r.type==="rule")return new vd(r);if(r.type==="comment")return new md(r);if(r.type==="atrule")return new gd(r);throw new Error("Unknown node type: "+s.type)}var bd=zt;zt.default=zt;let Sd=ki,Za=es,Cd=Ya,Ed=et,zi=fd,xd=Qr,Md=bd,Xa=Li,Id=Fa,Ja=rs,Ka=Bi,Nd=Fi,Rd=ts,Ad=Wi,Od=Va,Qa=Ui,qa=Xt,Dd=qr;function j(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new zi(s)}j.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||Mr(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(),gf&&mf&&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:""},n,o;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))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
62
+ `),t=a.length-o):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?Mr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Mr(Ea(r,this.mapOpts.annotation)));let i=Ca(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 pf(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(jn){let r=jn(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;xa==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Ia=yf;let wf=qr,Ks=class extends wf{constructor(e){super(e),this.type="comment"}};var rs=Ks;Ks.default=Ks;let{isClean:Ma,my:Na}=Zt,Ra=es,Aa=rs,bf=qr,Oa,ki,$i,Da;function Ta(s){return s.map(e=>(e.nodes&&(e.nodes=Ta(e.nodes)),delete e.source,e))}function _a(s){if(s[Ma]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)_a(e)}let Pe=class ka extends bf{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ta(Oa(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 Ra(e)]}else if(e.selector)e=[new ki(e)];else if(e.name)e=[new $i(e)];else if(e.text)e=[new Aa(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Na]||ka.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ma]&&_a(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(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Pe.registerParse=s=>{Oa=s};Pe.registerRule=s=>{ki=s};Pe.registerAtRule=s=>{$i=s};Pe.registerRoot=s=>{Da=s};var et=Pe;Pe.default=Pe;Pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,$i.prototype):s.type==="rule"?Object.setPrototypeOf(s,ki.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ra.prototype):s.type==="comment"?Object.setPrototypeOf(s,Aa.prototype):s.type==="root"&&Object.setPrototypeOf(s,Da.prototype),s[Na]=!0,s.nodes&&s.nodes.forEach(e=>{Pe.rebuild(e)})};let vf=et,$a,Pa,Bt=class extends vf{constructor(e){super(D({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new $a(new Pa,this,e).stringify()}};Bt.registerLazyResult=s=>{$a=s};Bt.registerProcessor=s=>{Pa=s};var Pi=Bt;Bt.default=Bt;let Qs=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 La=Qs;Qs.default=Qs;let Sf=La,qs=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 Sf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Li=qs;qs.default=qs;const ys=39,Hn=34,hr=92,Yn=47,fr=10,xt=32,dr=12,pr=9,mr=13,Cf=91,Ef=93,xf=40,If=41,Mf=123,Nf=125,Rf=59,Af=42,Of=58,Df=64,gr=/[\t\n\f\r "#'()/;[\\\]{}]/g,yr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Tf=/.[\r\n"'(/\\]/,Zn=/[\da-f]/i;var _f=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,p,m,y=r.length,d=0,g=[],w=[];function v(){return d}function E(C){throw e.error("Unclosed "+C,d)}function N(){return w.length===0&&d>=y}function S(C){if(w.length)return w.pop();if(d>=y)return;let T=C?C.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case fr:case xt:case pr:case mr:case dr:{o=d;do o+=1,n=r.charCodeAt(o);while(n===xt||n===fr||n===pr||n===mr||n===dr);m=["space",r.slice(d,o)],d=o-1;break}case Cf:case Ef:case Mf:case Nf:case Of:case Rf:case If:{let $=String.fromCharCode(n);m=[$,$,d];break}case xf:{if(f=g.length?g.pop()[1]:"",p=r.charCodeAt(d+1),f==="url"&&p!==ys&&p!==Hn&&p!==xt&&p!==fr&&p!==pr&&p!==dr&&p!==mr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||T){o=d;break}else E("bracket");for(h=o;r.charCodeAt(h-1)===hr;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||Tf.test(l)?m=["(","(",d]:(m=["brackets",l,d,o],d=o);break}case ys:case Hn:{a=n===ys?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||T){o=d+1;break}else E("string");for(h=o;r.charCodeAt(h-1)===hr;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Df:{gr.lastIndex=d+1,gr.test(r),gr.lastIndex===0?o=r.length-1:o=gr.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case hr:{for(o=d,u=!0;r.charCodeAt(o+1)===hr;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Yn&&n!==xt&&n!==fr&&n!==pr&&n!==mr&&n!==dr&&(o+=1,Zn.test(r.charAt(o)))){for(;Zn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===xt&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===Yn&&r.charCodeAt(d+1)===Af?(o=r.indexOf("*/",d+2)+1,o===0&&(i||T?o=r.length:E("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(yr.lastIndex=d+1,yr.test(r),yr.lastIndex===0?o=r.length-1:o=yr.lastIndex-2,m=["word",r.slice(d,o+1),d,o],g.push(m),d=o);break}}return d++,m}function I(C){w.push(C)}return{back:I,endOfFile:N,nextToken:S,position:v}};let Fa=et,Lr=class extends Fa{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 Fi=Lr;Lr.default=Lr;Fa.registerAtRule(Lr);let Ba=et,Ua,Wa,yt=class extends Ba{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ua(new Wa,this,e).stringify()}};yt.registerLazyResult=s=>{Ua=s};yt.registerProcessor=s=>{Wa=s};var Xt=yt;yt.default=yt;Ba.registerRoot(yt);let Ut={comma(s){return Ut.split(s,[","],!0)},space(s){let e=[" ",`
63
+ `," "];return Ut.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=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==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var za=Ut;Ut.default=Ut;let Va=et,kf=za,Fr=class extends Va{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return kf.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 Bi=Fr;Fr.default=Fr;Va.registerRule(Fr);let $f=es,Pf=_f,Lf=rs,Ff=Fi,Bf=Xt,Xn=Bi;const Jn={empty:!0,space:!0};function Uf(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Wf=class{constructor(e){this.input=e,this.root=new Bf,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 Ff;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!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(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];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()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(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 n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Lf;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=Pf(this.input)}decl(e,t){let r=new $f;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]||Uf(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 n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[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(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let p=c[f][0];if(h.trim().indexOf("!")===0&&p!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 Xn;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,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.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===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),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 n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Jn[h]&&!Jn[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Xn;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 zf=Wf;let Vf=et,Gf=zf,jf=ts;function Br(s,e){let t=new jf(s,e),r=new Gf(t);try{r.parse()}catch(i){throw i}return r.root}var Ui=Br;Br.default=Br;Vf.registerParse(Br);let{isClean:Re,my:Hf}=Zt,Yf=Ia,Zf=Qr,Xf=et,Jf=Pi;let Kn=Li,Kf=Ui,Qf=Xt;const qf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ed={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},td={Once:!0,postcssPlugin:!0,prepare:!0},wt=0;function It(s){return typeof s=="object"&&typeof s.then=="function"}function Ga(s){let e=!1,t=qf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,wt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,wt,t+"Exit"]:[t,t+"Exit"]}function Qn(s){let e;return s.type==="document"?e=["Document",wt,"DocumentExit"]:s.type==="root"?e=["Root",wt,"RootExit"]:e=Ga(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ei(s){return s[Re]=!1,s.nodes&&s.nodes.forEach(e=>ei(e)),s}let ti={},bt=class ja{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=ei(t);else if(t instanceof ja||t instanceof Kn)i=ei(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Kf;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Hf]&&Xf.rebuild(i)}this.result=new Kn(e,i,r),this.helpers=ne(D({},ti),{postcss:ti,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?D(D({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!ed[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!td[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(It(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];){e[Re]=!0;let t=[Qn(e)];for(;t.length>0;){let r=this.visitTick(t);if(It(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return It(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=Zf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Yf(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(It(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];)e[Re]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(It(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Re]){a[Re]=!0,e.push(Qn(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===wt){r.nodes&&r.nodes.length&&(r[Re]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Re]=!0;let t=Ga(e);for(let r of t)if(r===wt)e.nodes&&e.each(i=>{i[Re]||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"}};bt.registerPostcss=s=>{ti=s};var Ha=bt;bt.default=bt;Qf.registerLazyResult(bt);Jf.registerLazyResult(bt);let rd=Ia,sd=Qr;let id=Ui;const nd=Li;let ri=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,n=sd;this.result=new nd(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new rd(n,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=id;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 od=ri;ri.default=ri;let ad=od,ld=Ha,ud=Pi,cd=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 ad(this,e,t):new ld(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var hd=Wt;Wt.default=Wt;cd.registerProcessor(Wt);ud.registerProcessor(Wt);let fd=es,dd=va,pd=rs,md=Fi,gd=ts,yd=Xt,wd=Bi;function zt(s,e){if(Array.isArray(s))return s.map(o=>zt(o));let i=s,{inputs:t}=i,r=st(i,["inputs"]);if(t){e=[];for(let o of t){let a=ne(D({},o),{__proto__:gd.prototype});a.map&&(a.map=ne(D({},a.map),{__proto__:dd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>zt(o,e))),r.source){let n=r.source,{inputId:o}=n,a=st(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new yd(r);if(r.type==="decl")return new fd(r);if(r.type==="rule")return new wd(r);if(r.type==="comment")return new pd(r);if(r.type==="atrule")return new md(r);throw new Error("Unknown node type: "+s.type)}var bd=zt;zt.default=zt;let vd=_i,Ya=es,Sd=Ha,Cd=et,Wi=hd,Ed=Qr,xd=bd,Za=Pi,Id=La,Xa=rs,Ja=Fi,Md=Li,Nd=ts,Rd=Ui,Ad=za,Ka=Bi,Qa=Xt,Od=qr;function j(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Wi(s)}j.plugin=function(e,t){let r=!1;function i(...o){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 zi().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return j([i(l)]).process(n,a)},i};j.stringify=xd;j.parse=Ad;j.fromJSON=Md;j.list=Od;j.comment=s=>new Ja(s);j.atRule=s=>new Ka(s);j.decl=s=>new Za(s);j.rule=s=>new Qa(s);j.root=s=>new qa(s);j.document=s=>new Xa(s);j.CssSyntaxError=Sd;j.Declaration=Za;j.Container=Ed;j.Processor=zi;j.Document=Xa;j.Comment=Ja;j.Warning=Id;j.AtRule=Ka;j.Result=Nd;j.Input=Rd;j.Rule=Qa;j.Root=qa;j.Node=Dd;Cd.registerPostcss(j);var Td=j;j.default=j;const ee=Vh(Td);ee.stringify;ee.fromJSON;ee.plugin;ee.parse;ee.list;ee.document;ee.comment;ee.atRule;ee.rule;ee.decl;ee.root;ee.CssSyntaxError;ee.Declaration;ee.Container;ee.Processor;ee.Document;ee.Comment;ee.Warning;ee.AtRule;ee.Result;ee.Input;ee.Rule;ee.Root;ee.Node;var L=(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))(L||{});function _d(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[ii(n[0].trim())]=n[1].trim())}}),e}function eo(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=Ld(t);e.push(`${i}: ${r};`)}return e.join(" ")}const kd=/-([a-z])/g,$d=/^--[a-zA-Z0-9-]+$/,ii=s=>$d.test(s)?s:s.replace(kd,(e,t)=>t?t.toUpperCase():""),Pd=/\B([A-Z])/g,Ld=s=>s.replace(Pd,"-$1").toLowerCase();class Me{constructor(...e){I(this,"parentElement",null),I(this,"parentNode",null),I(this,"ownerDocument"),I(this,"firstChild",null),I(this,"lastChild",null),I(this,"previousSibling",null),I(this,"nextSibling",null),I(this,"ELEMENT_NODE",1),I(this,"TEXT_NODE",3),I(this,"nodeType"),I(this,"nodeName"),I(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 Vi extends Me{constructor(...e){super(e),I(this,"nodeType",9),I(this,"nodeName","#document"),I(this,"compatMode","CSS1Compat"),I(this,"RRNodeType",L.Document),I(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===L.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===L.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===L.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===L.Element||t===L.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===L.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Gi(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===L.Element||r===L.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===L.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=il(this,e,t);return i.parentElement=null,i}removeChild(e){return nl(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 Vi}createDocumentType(e,t,r){const i=new el(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new ss(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new tl(e);return t.ownerDocument=this,t}createComment(e){const t=new rl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new sl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class el extends Me{constructor(e,t,r){super(),I(this,"nodeType",10),I(this,"RRNodeType",L.DocumentType),I(this,"name"),I(this,"publicId"),I(this,"systemId"),I(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class ss extends Me{constructor(e){super(),I(this,"nodeType",1),I(this,"RRNodeType",L.Element),I(this,"tagName"),I(this,"attributes",{}),I(this,"shadowRoot",null),I(this,"scrollLeft"),I(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 Ud(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?_d(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;const n=ii(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=eo(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=ii(r),o=e[i]||"";return delete e[i],this.attributes.style=eo(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 Gi(this,e)}insertBefore(e,t){return il(this,e,t)}removeChild(e){return nl(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 Fd extends ss{constructor(){super(...arguments),I(this,"currentTime"),I(this,"volume"),I(this,"paused"),I(this,"muted"),I(this,"playbackRate"),I(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 Bd extends ss{constructor(){super(...arguments),I(this,"tagName","DIALOG"),I(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 tl extends Me{constructor(e){super(),I(this,"nodeType",3),I(this,"nodeName","#text"),I(this,"RRNodeType",L.Text),I(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 rl extends Me{constructor(e){super(),I(this,"nodeType",8),I(this,"nodeName","#comment"),I(this,"RRNodeType",L.Comment),I(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 sl extends Me{constructor(e){super(),I(this,"nodeName","#cdata-section"),I(this,"nodeType",4),I(this,"RRNodeType",L.CDATA),I(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 Ud{constructor(e,t){if(I(this,"onChange"),I(this,"classes",[]),I(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(" "))}),I(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 Gi(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 il(s,e,t){if(!t)return Gi(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 nl(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 be=(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))(be||{});const ni={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Wd={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 Ae=null;function Ur(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=zd(s,e,t,r),ol(s,e,t,r),Vd(s,e,t)}function zd(s,e,t,r){var i;if(t.afterAppend&&!Ae&&(Ae=new WeakSet,setTimeout(()=>{Ae=null},0)),!ji(s,e)){const o=Wr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case L.Document:{if(!nt(s,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),Ae==null||Ae.add(s))}break}case L.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Ur(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),ol(o.shadowRoot,n.shadowRoot,t,r)),Gd(o,n,r);break}}return s}function Vd(s,e,t){var r;switch(e.RRNodeType){case L.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case L.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,p=l!==c;if((f||l&&p)&&n.close(),c&&(p||f))try{h?n.showModal():n.show()}catch(m){console.warn(m)}break}}break}case L.Text:case L.Comment:case L.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}Ae!=null&&Ae.has(s)&&(Ae.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Gd(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&&ni[o])s.setAttributeNS(ni[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 ol(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],p=o[u],m,y;for(;n<=a&&l<=u;)if(c===void 0)c=i[++n];else if(h===void 0)h=i[--a];else if(nt(c,f,t.mirror,r))c=i[++n],f=o[++l];else if(nt(h,p,t.mirror,r))h=i[--a],p=o[--u];else if(nt(c,p,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(w){console.warn(w)}c=i[++n],p=o[--u]}else if(nt(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(w){console.warn(w)}h=i[--a],f=o[++l]}else{if(!m){m={};for(let b=n;b<=a;b++){const E=i[b];E&&t.mirror.hasNode(E)&&(m[t.mirror.getId(E)]=b)}}y=m[r.getId(f)];const w=i[y];if(y!==void 0&&w&&nt(w,f,t.mirror,r)){try{s.insertBefore(w,c)}catch(b){console.warn(b)}i[y]=void 0}else{const b=Wr(f,t.mirror,r);s.nodeName==="#document"&&c&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++n]);try{s.insertBefore(b,c||null)}catch(E){console.warn(E)}}f=o[++l]}if(n>a){const w=o[u+1];let b=null;for(w&&(b=t.mirror.getNode(r.getId(w)));l<=u;++l){const E=Wr(o[l],t.mirror,r);try{s.insertBefore(E,b)}catch(N){console.warn(N)}}}else if(l>u)for(;n<=a;n++){const w=i[n];if(!(!w||w.parentNode!==s))try{s.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(b){console.warn(b)}}let d=s.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)Ur(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function Wr(s,e,t){const r=t.getId(s),i=t.getMeta(s);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&ji(o,s))return o;switch(s.RRNodeType){case L.Document:o=new Document;break;case L.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case L.Element:{let n=s.tagName.toLowerCase();n=Wd[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(ni.svg,n):o=document.createElement(s.tagName);break}case L.Text:o=document.createTextNode(s.data);break;case L.Comment:o=document.createComment(s.data);break;case L.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,D({},i));try{Ae==null||Ae.add(o)}catch(n){}return o}function ji(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function nt(s,e,t,r){const i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:ji(s,e)}class bt extends Vi{constructor(e){super(),I(this,"UNSERIALIZED_STARTING_ID",-2),I(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),I(this,"mirror",rp()),I(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new bt}createDocumentType(e,t,r){const i=new jd(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new Hd(t);break;case"IFRAME":r=new Jd(t,this.mirror);break;case"CANVAS":r=new Zd(t);break;case"STYLE":r=new Xd(t);break;case"DIALOG":r=new Yd(t);break;default:r=new is(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Qd(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new qd(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 jd=el;class is extends ss{constructor(){super(...arguments),I(this,"inputData",null),I(this,"scrollData",null)}}class Hd extends Fd{}class Yd extends Bd{}class Zd extends is{constructor(){super(...arguments),I(this,"rr_dataURL",null),I(this,"canvasMutations",[])}getContext(){return null}}class Xd extends is{constructor(){super(...arguments),I(this,"rules",[])}}class Jd extends is{constructor(e,t){super(e),I(this,"contentDocument",new bt),this.contentDocument.mirror=t}}const Kd=tl,Qd=rl,qd=sl;function ep(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function al(s,e,t,r){let i;switch(s.nodeType){case be.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case be.DOCUMENT_TYPE_NODE:{const n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case be.ELEMENT_NODE:{const n=s,a=ep(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 be.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case be.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case be.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case be.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof bt&&(o||(o=ll(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,D({},o))),i}function tp(s,e=zh(),t=new bt){function r(i,o){const n=al(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==be.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===be.DOCUMENT_NODE||i.nodeType===be.ELEMENT_NODE||i.nodeType===be.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===be.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function rp(){return new sp}class sp{constructor(){I(this,"idNodeMap",new Map),I(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 ll(s,e){switch(s.RRNodeType){case L.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case L.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case L.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case L.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case L.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case L.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const to={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ro={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vr={},ip=()=>!!globalThis.Zone;function Hi(s){if(vr[s])return vr[s];const e=globalThis[s],t=e.prototype,r=s in to?to[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 ro?ro[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&&!ip())return vr[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?vr[s]=u:t}catch(a){return t}}const vs={};function He(s,e,t){var r;const i=`${s}.${String(t)}`;if(vs[i])return vs[i].call(e);const o=Hi(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(vs[i]=n,n.call(e)):e[t]}const bs={};function ul(s,e,t){const r=`${s}.${String(t)}`;if(bs[r])return bs[r].bind(e);const o=Hi(s)[t];return typeof o!="function"?e[t]:(bs[r]=o,o.bind(e))}function np(s){return He("Node",s,"childNodes")}function op(s){return He("Node",s,"parentNode")}function ap(s){return He("Node",s,"parentElement")}function lp(s){return He("Node",s,"textContent")}function up(s,e){return ul("Node",s,"contains")(e)}function cp(s){return ul("Node",s,"getRootNode")()}function hp(s){return!s||!("host"in s)?null:He("ShadowRoot",s,"host")}function fp(s){return s.styleSheets}function dp(s){return!s||!("shadowRoot"in s)?null:He("Element",s,"shadowRoot")}function pp(s,e){return He("Element",s,"querySelector")(e)}function mp(s,e){return He("Element",s,"querySelectorAll")(e)}function cl(){return Hi("MutationObserver").constructor}const P={childNodes:np,parentNode:op,parentElement:ap,textContent:lp,contains:up,getRootNode:cp,host:hp,styleSheets:fp,shadowRoot:dp,querySelector:pp,querySelectorAll:mp,mutationObserver:cl};function fe(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const ot=`Please stop import mirror directly. Instead of that,\r
65
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Wi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return j([i(l)]).process(o,a)},i};j.stringify=Ed;j.parse=Rd;j.fromJSON=xd;j.list=Ad;j.comment=s=>new Xa(s);j.atRule=s=>new Ja(s);j.decl=s=>new Ya(s);j.rule=s=>new Ka(s);j.root=s=>new Qa(s);j.document=s=>new Za(s);j.CssSyntaxError=vd;j.Declaration=Ya;j.Container=Cd;j.Processor=Wi;j.Document=Za;j.Comment=Xa;j.Warning=Id;j.AtRule=Ja;j.Result=Md;j.Input=Nd;j.Rule=Ka;j.Root=Qa;j.Node=Od;Sd.registerPostcss(j);var Dd=j;j.default=j;const re=zh(Dd);re.stringify;re.fromJSON;re.plugin;re.parse;re.list;re.document;re.comment;re.atRule;re.rule;re.decl;re.root;re.CssSyntaxError;re.Declaration;re.Container;re.Processor;re.Document;re.Comment;re.Warning;re.AtRule;re.Result;re.Input;re.Rule;re.Root;re.Node;var L=(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))(L||{});function Td(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){const o=n.split(r);o.length>1&&(e[si(o[0].trim())]=o[1].trim())}}),e}function qn(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=Pd(t);e.push(`${i}: ${r};`)}return e.join(" ")}const _d=/-([a-z])/g,kd=/^--[a-zA-Z0-9-]+$/,si=s=>kd.test(s)?s:s.replace(_d,(e,t)=>t?t.toUpperCase():""),$d=/\B([A-Z])/g,Pd=s=>s.replace($d,"-$1").toLowerCase();class Ie{constructor(...e){M(this,"parentElement",null),M(this,"parentNode",null),M(this,"ownerDocument"),M(this,"firstChild",null),M(this,"lastChild",null),M(this,"previousSibling",null),M(this,"nextSibling",null),M(this,"ELEMENT_NODE",1),M(this,"TEXT_NODE",3),M(this,"nodeType"),M(this,"nodeName"),M(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 Ie){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 zi extends Ie{constructor(...e){super(e),M(this,"nodeType",9),M(this,"nodeName","#document"),M(this,"compatMode","CSS1Compat"),M(this,"RRNodeType",L.Document),M(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===L.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===L.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===L.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===L.Element||t===L.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===L.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Vi(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===L.Element||r===L.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===L.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=sl(this,e,t);return i.parentElement=null,i}removeChild(e){return il(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 zi}createDocumentType(e,t,r){const i=new qa(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new ss(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new el(e);return t.ownerDocument=this,t}createComment(e){const t=new tl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new rl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class qa extends Ie{constructor(e,t,r){super(),M(this,"nodeType",10),M(this,"RRNodeType",L.DocumentType),M(this,"name"),M(this,"publicId"),M(this,"systemId"),M(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class ss extends Ie{constructor(e){super(),M(this,"nodeType",1),M(this,"RRNodeType",L.Element),M(this,"tagName"),M(this,"attributes",{}),M(this,"shadowRoot",null),M(this,"scrollLeft"),M(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 Bd(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?Td(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;const o=si(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=qn(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=si(r),n=e[i]||"";return delete e[i],this.attributes.style=qn(e),n},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 Vi(this,e)}insertBefore(e,t){return sl(this,e,t)}removeChild(e){return il(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 Ld extends ss{constructor(){super(...arguments),M(this,"currentTime"),M(this,"volume"),M(this,"paused"),M(this,"muted"),M(this,"playbackRate"),M(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 Fd extends ss{constructor(){super(...arguments),M(this,"tagName","DIALOG"),M(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 el extends Ie{constructor(e){super(),M(this,"nodeType",3),M(this,"nodeName","#text"),M(this,"RRNodeType",L.Text),M(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 tl extends Ie{constructor(e){super(),M(this,"nodeType",8),M(this,"nodeName","#comment"),M(this,"RRNodeType",L.Comment),M(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 rl extends Ie{constructor(e){super(),M(this,"nodeName","#cdata-section"),M(this,"nodeType",4),M(this,"RRNodeType",L.CDATA),M(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 Bd{constructor(e,t){if(M(this,"onChange"),M(this,"classes",[]),M(this,"add",(...r)=>{for(const i of r){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),M(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 Vi(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 sl(s,e,t){if(!t)return Vi(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 il(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 be=(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))(be||{});const ii={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ud={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 Ae=null;function Ur(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Wd(s,e,t,r),nl(s,e,t,r),zd(s,e,t)}function Wd(s,e,t,r){var i;if(t.afterAppend&&!Ae&&(Ae=new WeakSet,setTimeout(()=>{Ae=null},0)),!Gi(s,e)){const n=Wr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case L.Document:{if(!nt(s,e,t.mirror,r)){const n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),Ae==null||Ae.add(s))}break}case L.Element:{const n=s,o=e;switch(o.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Ur(a,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),nl(n.shadowRoot,o.shadowRoot,t,r)),Vd(n,o,r);break}}return s}function zd(s,e,t){var r;switch(e.RRNodeType){case L.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case L.Element:{const i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=s,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{const o=e;if(o.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=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{const o=i,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,p=l!==c;if((f||l&&p)&&o.close(),c&&(p||f))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case L.Text:case L.Comment:case L.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}Ae!=null&&Ae.has(s)&&(Ae.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Vd(s,e,t){const r=s.attributes,i=e.attributes;for(const n in i){const o=i[n],a=t.getMeta(e);if(a!=null&&a.isSVG&&ii[n])s.setAttributeNS(ii[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const l=document.createElement("img");l.src=o,l.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(l){console.warn(l)}}}for(const{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function nl(s,e,t,r){const i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,a=i.length-1,l=0,u=n.length-1,c=i[o],h=i[a],f=n[l],p=n[u],m,y;for(;o<=a&&l<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--a];else if(nt(c,f,t.mirror,r))c=i[++o],f=n[++l];else if(nt(h,p,t.mirror,r))h=i[--a],p=n[--u];else if(nt(c,p,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(w){console.warn(w)}c=i[++o],p=n[--u]}else if(nt(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(w){console.warn(w)}h=i[--a],f=n[++l]}else{if(!m){m={};for(let v=o;v<=a;v++){const E=i[v];E&&t.mirror.hasNode(E)&&(m[t.mirror.getId(E)]=v)}}y=m[r.getId(f)];const w=i[y];if(y!==void 0&&w&&nt(w,f,t.mirror,r)){try{s.insertBefore(w,c)}catch(v){console.warn(v)}i[y]=void 0}else{const v=Wr(f,t.mirror,r);s.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++o]);try{s.insertBefore(v,c||null)}catch(E){console.warn(E)}}f=n[++l]}if(o>a){const w=n[u+1];let v=null;for(w&&(v=t.mirror.getNode(r.getId(w)));l<=u;++l){const E=Wr(n[l],t.mirror,r);try{s.insertBefore(E,v)}catch(N){console.warn(N)}}}else if(l>u)for(;o<=a;o++){const w=i[o];if(!(!w||w.parentNode!==s))try{s.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(v){console.warn(v)}}let d=s.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)Ur(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function Wr(s,e,t){const r=t.getId(s),i=t.getMeta(s);let n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&Gi(n,s))return n;switch(s.RRNodeType){case L.Document:n=new Document;break;case L.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case L.Element:{let o=s.tagName.toLowerCase();o=Ud[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(ii.svg,o):n=document.createElement(s.tagName);break}case L.Text:n=document.createTextNode(s.data);break;case L.Comment:n=document.createComment(s.data);break;case L.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,D({},i));try{Ae==null||Ae.add(n)}catch(o){}return n}function Gi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function nt(s,e,t,r){const i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:Gi(s,e)}class vt extends zi{constructor(e){super(),M(this,"UNSERIALIZED_STARTING_ID",-2),M(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),M(this,"mirror",tp()),M(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new vt}createDocumentType(e,t,r){const i=new Gd(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new jd(t);break;case"IFRAME":r=new Xd(t,this.mirror);break;case"CANVAS":r=new Yd(t);break;case"STYLE":r=new Zd(t);break;case"DIALOG":r=new Hd(t);break;default:r=new is(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Kd(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Qd(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Jd(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 Gd=qa;class is extends ss{constructor(){super(...arguments),M(this,"inputData",null),M(this,"scrollData",null)}}class jd extends Ld{}class Hd extends Fd{}class Yd extends is{constructor(){super(...arguments),M(this,"rr_dataURL",null),M(this,"canvasMutations",[])}getContext(){return null}}class Zd extends is{constructor(){super(...arguments),M(this,"rules",[])}}class Xd extends is{constructor(e,t){super(e),M(this,"contentDocument",new vt),this.contentDocument.mirror=t}}const Jd=el,Kd=tl,Qd=rl;function qd(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function ol(s,e,t,r){let i;switch(s.nodeType){case be.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case be.DOCUMENT_TYPE_NODE:{const o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case be.ELEMENT_NODE:{const o=s,a=qd(o);i=e.createElement(a);const l=i;for(const{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case be.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case be.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case be.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case be.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof vt&&(n||(n=al(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,D({},n))),i}function ep(s,e=Wh(),t=new vt){function r(i,n){const o=ol(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==be.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,o)}else(i.nodeType===be.DOCUMENT_NODE||i.nodeType===be.ELEMENT_NODE||i.nodeType===be.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===be.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(s,null),t}function tp(){return new rp}class rp{constructor(){M(this,"idNodeMap",new Map),M(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 al(s,e){switch(s.RRNodeType){case L.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case L.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case L.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case L.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case L.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case L.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const eo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},to={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},wr={},sp=()=>!!globalThis.Zone;function ji(s){if(wr[s])return wr[s];const e=globalThis[s],t=e.prototype,r=s in eo?eo[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]"))})),n=s in to?to[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!sp())return wr[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?wr[s]=u:t}catch(a){return t}}const ws={};function He(s,e,t){var r;const i=`${s}.${String(t)}`;if(ws[i])return ws[i].call(e);const n=ji(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(ws[i]=o,o.call(e)):e[t]}const bs={};function ll(s,e,t){const r=`${s}.${String(t)}`;if(bs[r])return bs[r].bind(e);const n=ji(s)[t];return typeof n!="function"?e[t]:(bs[r]=n,n.bind(e))}function ip(s){return He("Node",s,"childNodes")}function np(s){return He("Node",s,"parentNode")}function op(s){return He("Node",s,"parentElement")}function ap(s){return He("Node",s,"textContent")}function lp(s,e){return ll("Node",s,"contains")(e)}function up(s){return ll("Node",s,"getRootNode")()}function cp(s){return!s||!("host"in s)?null:He("ShadowRoot",s,"host")}function hp(s){return s.styleSheets}function fp(s){return!s||!("shadowRoot"in s)?null:He("Element",s,"shadowRoot")}function dp(s,e){return He("Element",s,"querySelector")(e)}function pp(s,e){return He("Element",s,"querySelectorAll")(e)}function ul(){return ji("MutationObserver").constructor}const P={childNodes:ip,parentNode:np,parentElement:op,textContent:ap,contains:lp,getRootNode:up,host:cp,styleSheets:hp,shadowRoot:fp,querySelector:dp,querySelectorAll:pp,mutationObserver:ul};function fe(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const ot=`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(ot),-1},getNode(){return console.error(ot),null},removeNodeFromMap(){console.error(ot)},has(){return console.error(ot),!1},reset(){console.error(ot)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(ot),Reflect.get(s,e,t)}}));function Qe(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 Jt(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)}}),()=>Jt(s,e,o||{},!0)}function tt(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()=>{}}}let Vt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Vt=()=>new Date().getTime());function Yi(s){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=P.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=P.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Zi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Xi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ji(s){return s?s.nodeType===s.ELEMENT_NODE?s:P.parentElement(s):null}function de(s,e,t,r){if(!s)return!1;const i=Ji(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Dr(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function hl(s,e){return e.getId(s)!==-1}function Rr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===kt}function Ki(s,e){if(Ot(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=P.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ki(r,e):!0}function zr(s){return!!s.changedTouches}function Qi(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 fl(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 qi(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)qi(s.children[t],e)}function dt(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function en(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function tn(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=tn(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 We(s){return s?s instanceof Me&&"shadowRoot"in s?!!s.shadowRoot:!!P.shadowRoot(s):!1}function ct(s,e){const t=s[e[0]];return e.length===1?t:ct(t.cssRules[e[1]].cssRules,e.slice(2))}function oi(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function dl(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 rn{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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 sn(s){var e;let t=null;return"getRootNode"in s&&((e=P.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&P.host(P.getRootNode(s))&&(t=P.host(P.getRootNode(s))),t}function pl(s){let e=s,t;for(;t=sn(e);)e=t;return e}function ml(s){const e=s.ownerDocument;if(!e)return!1;const t=pl(s);return P.contains(e,t)}function nn(s){const e=s.ownerDocument;return e?P.contains(e,s)||ml(s):!1}const gp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:rn,get _mirror(){return exports.mirror},closestElementOfNode:Ji,getBaseDimension:tn,getNestedRule:ct,getPositionsAndIndex:oi,getRootShadowHost:pl,getShadowHost:sn,getWindowHeight:Zi,getWindowScroll:Yi,getWindowWidth:Xi,hasShadowRoot:We,hookSetter:Jt,inDom:nn,isAncestorRemoved:Ki,isBlocked:de,isIgnored:Rr,isSerialized:hl,isSerializedIframe:dt,isSerializedStylesheet:en,iterateResolveTree:qi,legacy_isTouchEvent:zr,get nowTimestamp(){return Vt},on:fe,patch:tt,polyfill:Qi,queueToResolveTrees:fl,shadowHostInDom:ml,throttle:Qe,uniqueTextMutations:dl},Symbol.toStringTag,{value:"Module"}));var R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),M=(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.VisibilityChange=17]="VisibilityChange",s))(M||{}),U=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.DblClick=3]="DblClick",s[s.Focus=4]="Focus",s[s.Blur=5]="Blur",s[s.TouchStart=6]="TouchStart",s[s.TouchMove_Departed=7]="TouchMove_Departed",s[s.TouchEnd=8]="TouchEnd",s[s.TouchCancel=9]="TouchCancel",s))(U||{}),_e=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(_e||{}),Le=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Le||{}),Ue=(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))(Ue||{}),B=(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))(B||{}),ke=(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))(ke||{});function so(s){return"__ln"in s}class yp{constructor(){v(this,"length",0),v(this,"head",null),v(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&&so(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&&so(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 io=(s,e)=>`${s}@${e}`;class wp{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new yp,i=l=>{let u=l,c=kt;for(;c===kt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=P.parentNode(l);if(!u||!nn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Ot(u)?this.mirror.getId(sn(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const p=ut(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{dt(m,this.mirror)&&this.iframeManager.addIframe(m),en(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),We(l)&&this.shadowDomManager.addShadowRoot(P.shadowRoot(l),this.doc)},onIframeLoad:(m,y)=>{this.iframeManager.attachIframe(m,y),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,y)=>{this.stylesheetManager.attachLinkElement(m,y)},cssCaptured:c});p&&(e.push({parentId:h,nextId:f,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)no(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(P.parentNode(l))||o(l);for(const l of this.addedSet)!oo(this.droppedSet,l)&&!no(this.removesSubTreeCache,l,this.mirror)||oo(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(P.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(P.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const p=c.value,m=P.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=P.host(m);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=P.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))}),v(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)),t.attributes.value=Array.from(P.childNodes(e),r=>P.textContent(r)||"").join("")}),v(this,"processMutation",e=>{if(!Rr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=P.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:$o(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ji(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const n=wi(t);i=yi({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:n,value:i,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!ko(t.tagName,r))if(o.attributes[r]=_o(this.doc,Ve(t.tagName),Ve(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==n.style.getPropertyValue(a)||u!==n.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,u]:o._unchangedStyles[a]=[l,u]}for(const a of Array.from(n.style))t.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(de(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=Ot(e.target)?this.mirror.getId(P.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||Rr(t,this.mirror,this.slimDOMOptions)||!hl(t,this.mirror)||(this.addedSet.has(t)?(ai(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ki(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[io(r,i)]?ai(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Ot(e.target)&&Dt(e.target)?!0:void 0}),vp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Rr(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[io(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(P.childNodes(e).forEach(r=>this.genAdds(r)),We(e)&&P.childNodes(P.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ai(s,e){s.delete(e),P.childNodes(e).forEach(t=>ai(s,t))}function vp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),P.childNodes(r).forEach(i=>t.push(i)))}}function no(s,e,t){return s.size===0?!1:bp(s,e)}function bp(s,e,t){const r=P.parentNode(e);return r?s.has(r):!1}function oo(s,e){return s.size===0?!1:gl(s,e)}function gl(s,e){const t=P.parentNode(e);return t?s.has(t)?!0:gl(s,t):!1}let _t;function Sp(s){_t=s}function Cp(){_t=void 0}const F=s=>_t?(...t)=>{try{return s(...t)}catch(r){if(_t&&_t(r)===!0)return;throw r}}:s,Ke=[];function Kt(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 yl(s,e){const t=new wp;Ke.push(t),t.init(s);const r=new(cl())(F(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Ep({visibilityChangeCb:s,doc:e,mirror:t}){if(!s)return()=>{};const r=new WeakMap,i=new IntersectionObserver(n=>{n.forEach(a=>{const l=a.target,u=t.getId(l),c=a.isIntersecting||a.intersectionRatio>0;u!==-1&&(r.has(l)?s({id:u,isVisible:c,visibilityRatio:a.intersectionRatio,boundingRect:a.boundingClientRect}):r.set(l,!0))})},{root:null,threshold:[.1,.9]});e.querySelectorAll("*").forEach(n=>i.observe(n));const o=new MutationObserver(n=>{n.forEach(a=>{a.addedNodes.forEach(l=>{l instanceof Element&&i.observe(l)})})});return o.observe(e,{childList:!0,subtree:!0}),()=>{i.disconnect(),o.disconnect()}}function xp({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=Qe(F(h=>{const f=Date.now()-a;s(n.map(p=>(p.timeOffset-=f,p)),h),n=[],a=null}),o),u=F(Qe(F(h=>{const f=Kt(h),{clientX:p,clientY:m}=zr(h)?h.changedTouches[0]:h;a||(a=Vt()),n.push({x:p,y:m,id:r.getId(f),timeOffset:Vt()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?M.Drag:h instanceof MouseEvent?M.MouseMove:M.TouchMove)}),i,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return F(()=>{c.forEach(h=>h())})}function Mp({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Kt(h);if(de(f,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=_e.Mouse;break;case"touch":p=_e.Touch;break;case"pen":p=_e.Pen;break}p===_e.Touch?U[c]===U.MouseDown?m="TouchStart":U[c]===U.MouseUp&&(m="TouchEnd"):_e.Pen}else zr(h)&&(p=_e.Touch);p!==null?(l=p,(m.startsWith("Touch")&&p===_e.Touch||m.startsWith("Mouse")&&p===_e.Mouse)&&(p=null)):U[c]===U.Click&&(p=l,l=null);const y=zr(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:w}=y;F(s)(D({type:U[m],id:d,x:g,y:w},p!==null&&{pointerType:p}))};return Object.keys(U).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=Ve(c);const f=u(c);if(window.PointerEvent)switch(U[c]){case U.MouseDown:case U.MouseUp:h=h.replace("mouse","pointer");break;case U.TouchStart:case U.TouchEnd:return}a.push(fe(h,f,e))}),F(()=>{a.forEach(c=>c())})}function wl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=F(Qe(F(a=>{const l=Kt(a);if(!l||de(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=Yi(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 fe("scroll",n,e)}function Ip({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=F(Qe(F(()=>{const o=Zi(),n=Xi();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return fe("resize",i,e)}const Np=["INPUT","TEXTAREA","SELECT"],ao=new WeakMap;function Rp({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(w){let b=Kt(w);const E=w.isTrusted,N=b&&b.tagName;if(b&&N==="OPTION"&&(b=P.parentElement(b)),!b||!N||Np.indexOf(N)<0||de(b,r,i,!0)||b.classList.contains(o)||n&&b.matches(n))return;let S=b.value,x=!1;const C=wi(b)||"";C==="radio"||C==="checkbox"?x=b.checked:(a[N.toLowerCase()]||a[C])&&(S=yi({element:b,maskInputOptions:a,tagName:N,type:C,value:S,maskInputFn:l})),f(b,c?{text:S,isChecked:x,userTriggered:E}:{text:S,isChecked:x});const T=b.name;C==="radio"&&T&&x&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach($=>{if($!==b){const oe=$.value;f($,c?{text:oe,isChecked:!x,userTriggered:!1}:{text:oe,isChecked:!x})}})}function f(w,b){const E=ao.get(w);if(!E||E.text!==b.text||E.isChecked!==b.isChecked){ao.set(w,b);const N=t.getId(w);F(s)(ne(D({},b),{id:N}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(w=>fe(w,F(h),e)),y=e.defaultView;if(!y)return()=>{m.forEach(w=>w())};const d=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),g=[[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&&m.push(...g.map(w=>Jt(w[0],w[1],{set(){F(h)({target:this,isTrusted:!1})}},!1,y))),F(()=>{m.forEach(w=>w())})}function Vr(s){const e=[];function t(r,i){if(br("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||br("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||br("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||br("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 Be(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Ap({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:F((c,h,f)=>{const[p,m]=f,{id:y,styleId:d}=Be(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&s({id:y,styleId:d,adds:[{rule:p,index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:F((c,h,f)=>{const[p]=f,{id:m,styleId:y}=Be(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,removes:[{index:p}]}),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:F((c,h,f)=>{const[p]=f,{id:m,styleId:y}=Be(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,replace:p}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:F((c,h,f)=>{const[p]=f,{id:m,styleId:y}=Be(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,replaceSync:p}),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:F((f,p,m)=>{const[y,d]=m,{id:g,styleId:w}=Be(p.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||w&&w!==-1)&&s({id:g,styleId:w,adds:[{rule:y,index:[...Vr(p),d||0]}]}),f.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:F((f,p,m)=>{const[y]=m,{id:d,styleId:g}=Be(p.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&s({id:d,styleId:g,removes:[{index:[...Vr(p),y]}]}),f.apply(p,m)})})}),F(()=>{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 vl({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(P.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}}),F(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function Op({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:F((a,l,u)=>{var c;const[h,f,p]=u;if(t.has(h))return o.apply(l,[h,f,p]);const{id:m,styleId:y}=Be((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,set:{property:h,value:f,priority:p},index:Vr(l.parentRule)}),a.apply(l,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:F((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:p}=Be((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&s({id:f,styleId:p,remove:{property:h},index:Vr(l.parentRule)}),a.apply(l,u)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function Dp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=F(l=>Qe(F(u=>{const c=Kt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:p,playbackRate:m,loop:y}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:p,playbackRate:m,loop:y})}),i.media||500)),a=[fe("play",n(Ue.Play),o),fe("pause",n(Ue.Pause),o),fe("seeked",n(Ue.Seeked),o),fe("volumechange",n(Ue.VolumeChange),o),fe("ratechange",n(Ue.RateChange),o)];return F(()=>{a.forEach(l=>l())})}function Tp({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=tt(e.fonts,"add",function(a){return function(l){return setTimeout(F(()=>{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),F(()=>{r.forEach(a=>a())})}function _p(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const a=F(()=>{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:p,startOffset:m,endContainer:y,endOffset:d}=f;de(p,r,i,!0)||de(y,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(y),endOffset:d})}o({ranges:u})});return a(),fe("selectionchange",a)}function kp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:tt(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 $p(s,e){const{mutationCb:t,visibilityChangeCb:r,mousemoveCb:i,mouseInteractionCb:o,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:f,fontCb:p,selectionCb:m,customElementCb:y}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.visibilityChangeCb=(...d)=>{e.visibilityChange&&e.visibilityChange(...d),r(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),i(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),o(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),a(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),u(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),h(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),f(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),m(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function Pp(s,e={}){console.info("initObservers",s);const t=s.doc.defaultView;if(!t)return()=>{};$p(s,e);let r;s.recordDOM&&(r=yl(s,s.doc));const i=xp(s),o=Mp(s),n=wl(s),a=Ip(s,{win:t}),l=Rp(s),u=Dp(s),c=Ep(s);let h=()=>{},f=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=Ap(s,{win:t}),f=vl(s,s.doc),p=Op(s,{win:t}),s.collectFonts&&(m=Tp(s)));const y=_p(s),d=kp(s),g=[];for(const w of s.plugins)g.push(w.observer(w.callback,t,w.options));return F(()=>{Ke.forEach(w=>w.reset()),r==null||r.disconnect(),c(),i(),o(),n(),a(),l(),u(),h(),f(),p(),m(),y(),d(),g.forEach(w=>w())})}function br(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 lo{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(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 Lp{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new lo(To)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new lo(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 R.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:R.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case M.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 M.Drag:case M.TouchMove:case M.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case M.ViewportResize:return!1;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(t.data,e,["id"]),t;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case M.Font:return t;case M.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case M.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!==ke.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Fp{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!Dt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=yl(ne(D({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(wl(ne(D({},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(P.host(e))),this.restoreHandlers.push(vl({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(tt(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=P.shadowRoot(this);return a&&nn(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Cr=0;Cr<ht.length;Cr++)Rt[ht.charCodeAt(Cr)]=Cr;var Bp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=ht[e[t]>>2],i+=ht[(e[t]&3)<<4|e[t+1]>>4],i+=ht[(e[t+1]&15)<<2|e[t+2]>>6],i+=ht[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},Up=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=Rt[s.charCodeAt(r)],n=Rt[s.charCodeAt(r+1)],a=Rt[s.charCodeAt(r+2)],l=Rt[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 uo=new Map;function Wp(s,e){let t=uo.get(s);return t||(t=new Map,uo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const bl=(s,e,t)=>{if(!s||!(Cl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Wp(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function Ar(s,e,t){if(s instanceof Array)return s.map(r=>Ar(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=Bp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Ar(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:[Ar(s.data,e,t),s.width,s.height]};if(Cl(s,e)||typeof s=="object"){const r=s.constructor.name,i=bl(s,e,t);return{rr_type:r,index:i}}}}return s}const Sl=(s,e,t)=>s.map(r=>Ar(r,e,t)),Cl=(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 zp(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=tt(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=Sl(u,e,this);s(this.canvas,{type:Le["2D"],property:n,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Jt(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:Le["2D"],property:n,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function Vp(s){return s==="experimental-webgl"?"webgl":s}function co(s,e,t,r){const i=[];try{const o=tt(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!de(this,e,t,!0)){const u=Vp(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 ho(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=tt(s,l,function(c){return function(...h){const f=c.apply(this,h);if(bl(f,o,this),"tagName"in this.canvas&&!de(this.canvas,r,i,!0)){const p=Sl(h,o,this),m={type:e,property:l,args:p};t(this.canvas,m)}return f}});n.push(u)}catch(u){const c=Jt(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function Gp(s,e,t,r){const i=[];return i.push(...ho(e.WebGLRenderingContext.prototype,Le.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...ho(e.WebGL2RenderingContext.prototype,Le.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const El="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",jp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),fo=typeof window!="undefined"&&window.Blob&&new Blob([jp(El)],{type:"text/javascript;charset=utf-8"});function Hp(s){let e;try{if(e=fo&&(window.URL||window.webkitURL).createObjectURL(fo),!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,"+El,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Yp{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(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=co(t,r,i,!0),a=new Map,l=new Hp;l.onmessage=m=>{const{id:y}=m.data;if(a.set(y,!1),!("base64"in m.data))return;const{base64:d,type:g,width:w,height:b}=m.data;this.mutationCb({id:y,type:Le["2D"],commands:[{property:"clearRect",args:[0,0,w,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:g}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(y=>{de(y,r,i,!0)||m.push(y)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,f().forEach(async y=>{var d;const g=this.mirror.getId(y);if(a.get(g)||y.width===0||y.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(y.__context)){const b=y.getContext(y.__context);((d=b==null?void 0:b.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const w=await createImageBitmap(y);l.postMessage({id:g,bitmap:w,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[w])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=co(e,t,r,!1),o=zp(this.processMutation.bind(this),e,t,r),n=Gp(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 st(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Zp{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new rn),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:Ao(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 Xp{constructor(){v(this,"nodeMap",new WeakMap),v(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 te,At,Ss,Gr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((hn=s.contentWindow)==null?void 0:hn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const Ce=Oo();function Ye(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryEvc:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:f,maskInputOptions:p,slimDOMOptions:m,maskInputFn:y,maskTextFn:d,hooks:g,packFn:w,sampling:b={},dataURLOptions:E={},mousemoveWait:N,recordDOM:S=!0,recordCanvas:x=!1,recordCrossOriginIframes:C=!1,recordAfter:T=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:$=!1,collectFonts:oe=!1,inlineImages:W=!1,plugins:A,keepIframeSrcFn:Y=()=>!1,ignoreCSSAttributes:re=new Set([]),errorHandler:k}=s;Sp(k);const O=C?window.parent===window:!0;let H=!1;if(!O)try{window.parent.document&&(H=!1)}catch(z){H=!0}if(O&&!e)throw new Error("emit function is required");if(!O&&!H)return()=>{};N!==void 0&&b.mousemove===void 0&&(b.mousemove=N),Ce.reset();const q=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}:p!==void 0?p:{password:!0},ue=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};Qi();let he,me=0;const ve=z=>{for(const ge of A||[])ge.eventProcessor&&(z=ge.eventProcessor(z));return w&&!H&&(z=w(z)),z};te=(z,ge)=>{var se;const ie=z;if(ie.timestamp=Vt(),(se=Ke[0])!=null&&se.isFrozen()&&ie.type!==R.FullSnapshot&&!(ie.type===R.IncrementalSnapshot&&ie.data.source===M.Mutation)&&Ke.forEach(Ie=>Ie.unfreeze()),O)e==null||e(ve(ie),ge);else if(H){const Ie={type:"rrweb",event:ve(ie),origin:window.location.origin,isCheckout:ge};window.parent.postMessage(Ie,"*")}if(ie.type===R.FullSnapshot)he=ie,me=0;else if(ie.type===R.IncrementalSnapshot){if(ie.data.source===M.Mutation&&ie.data.isAttachIframe)return;me++;const Ie=r&&me>=r,V=t&&ie.timestamp-he.timestamp>t;(Ie||V)&&At(!0)}};const ae=z=>{te({type:R.IncrementalSnapshot,data:D({source:M.Mutation},z)})},le=z=>te({type:R.IncrementalSnapshot,data:D({source:M.Scroll},z)}),Ze=z=>te({type:R.IncrementalSnapshot,data:D({source:M.CanvasMutation},z)}),Xe=z=>te({type:R.IncrementalSnapshot,data:D({source:M.AdoptedStyleSheet},z)}),we=new Zp({mutationCb:ae,adoptedStyleSheetCb:Xe}),De=new Lp({mirror:Ce,mutationCb:ae,stylesheetManager:we,recordCrossOriginIframes:C,wrappedEmit:te});for(const z of A||[])z.getMirror&&z.getMirror({nodeMirror:Ce,crossOriginIframeMirror:De.crossOriginIframeMirror,crossOriginIframeStyleMirror:De.crossOriginIframeStyleMirror});const rt=new Xp;Ss=new Yp({recordCanvas:x,mutationCb:Ze,win:window,blockClass:o,blockSelector:n,mirror:Ce,sampling:b.canvas,dataURLOptions:E});const Je=new Fp({mutationCb:ae,scrollCb:le,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:u,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:q,dataURLOptions:E,maskTextFn:d,maskInputFn:y,recordCanvas:x,inlineImages:W,sampling:b,slimDOMOptions:ue,iframeManager:De,stylesheetManager:we,canvasManager:Ss,keepIframeSrcFn:Y,processedNodeManager:rt},mirror:Ce});At=(z=!1)=>{if(!S)return;te({type:R.Meta,data:{href:window.location.href,width:Xi(),height:Zi()}},z),we.reset(),Je.init(),Ke.forEach(se=>se.lock());const ge=Lu(document,{mirror:Ce,blockClass:o,blockSelector:n,maskTextClass:u,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:q,maskTextFn:d,maskInputFn:y,slimDOM:ue,dataURLOptions:E,recordCanvas:x,inlineImages:W,onSerialize:se=>{dt(se,Ce)&&De.addIframe(se),en(se,Ce)&&we.trackLinkElement(se),We(se)&&Je.addShadowRoot(P.shadowRoot(se),document)},onIframeLoad:(se,ie)=>{De.attachIframe(se,ie),Je.observeAttachShadow(se)},onStylesheetLoad:(se,ie)=>{we.attachLinkElement(se,ie)},keepIframeSrcFn:Y});if(!ge)return console.warn("Failed to snapshot the document");te({type:R.FullSnapshot,data:{node:ge,initialOffset:Yi(window)}},z),Ke.forEach(se=>se.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,Ce.getId(document))};const Qt=Qe(()=>{i&&At(!0)},100,{leading:!1,trailing:!0});try{const z=[],ge=ie=>{var Ie;return F(Pp)({mutationCb:ae,visibilityChangeCb:V=>{if(Qt(),b.visibility)return te({type:R.IncrementalSnapshot,data:D({source:M.VisibilityChange},V)})},mousemoveCb:(V,as)=>te({type:R.IncrementalSnapshot,data:{source:as,positions:V}}),mouseInteractionCb:V=>te({type:R.IncrementalSnapshot,data:D({source:M.MouseInteraction},V)}),scrollCb:le,viewportResizeCb:V=>te({type:R.IncrementalSnapshot,data:D({source:M.ViewportResize},V)}),inputCb:V=>te({type:R.IncrementalSnapshot,data:D({source:M.Input},V)}),mediaInteractionCb:V=>te({type:R.IncrementalSnapshot,data:D({source:M.MediaInteraction},V)}),styleSheetRuleCb:V=>te({type:R.IncrementalSnapshot,data:D({source:M.StyleSheetRule},V)}),styleDeclarationCb:V=>te({type:R.IncrementalSnapshot,data:D({source:M.StyleDeclaration},V)}),canvasMutationCb:Ze,fontCb:V=>te({type:R.IncrementalSnapshot,data:D({source:M.Font},V)}),selectionCb:V=>{te({type:R.IncrementalSnapshot,data:D({source:M.Selection},V)})},customElementCb:V=>{te({type:R.IncrementalSnapshot,data:D({source:M.CustomElement},V)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:u,maskTextSelector:c,maskInputOptions:q,inlineStylesheet:h,sampling:b,recordDOM:S,recordCanvas:x,inlineImages:W,userTriggeredOnInput:$,collectFonts:oe,doc:ie,maskInputFn:y,maskTextFn:d,keepIframeSrcFn:Y,blockSelector:n,slimDOMOptions:ue,dataURLOptions:E,mirror:Ce,iframeManager:De,stylesheetManager:we,shadowDomManager:Je,processedNodeManager:rt,canvasManager:Ss,ignoreCSSAttributes:re,plugins:((Ie=A==null?void 0:A.filter(V=>V.observer))==null?void 0:Ie.map(V=>({observer:V.observer,options:V.options,callback:as=>te({type:R.Plugin,data:{plugin:V.name,payload:as}})})))||[]},g)};De.addLoadListener(ie=>{try{z.push(ge(ie.contentDocument))}catch(Ie){console.warn(Ie)}});const se=()=>{At(),z.push(ge(document)),Gr=!0};return document.readyState==="interactive"||document.readyState==="complete"?se():(z.push(fe("DOMContentLoaded",()=>{te({type:R.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&se()})),z.push(fe("load",()=>{te({type:R.Load,data:{}}),T==="load"&&se()},window))),()=>{z.forEach(ie=>ie()),rt.destroy(),Gr=!1,Cp()}}catch(z){console.warn(z)}}Ye.addCustomEvent=(s,e)=>{if(!Gr)throw new Error("please add custom event after start recording");te({type:R.Custom,data:{tag:s,payload:e}})};Ye.freezePage=()=>{Ke.forEach(s=>s.freeze())};Ye.takeFullSnapshot=s=>{if(!Gr)throw new Error("please take full snapshot after start recording");At(s)};Ye.mirror=Ce;function xl(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 Jp=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"}));function Kp(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(g){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(g)}const a=n(s.navigator.userAgent)?1:0;function l(g,w){this.scrollLeft=g,this.scrollTop=w}function u(g){return .5*(1-Math.cos(Math.PI*g))}function c(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,w){if(w==="Y")return g.clientHeight+a<g.scrollHeight;if(w==="X")return g.clientWidth+a<g.scrollWidth}function f(g,w){const b=s.getComputedStyle(g,null)["overflow"+w];return b==="auto"||b==="scroll"}function p(g){const w=h(g,"Y")&&f(g,"Y"),b=h(g,"X")&&f(g,"X");return w||b}function m(g){for(;g!==e.body&&p(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const w=o();let b,E,N,S=(w-g.startTime)/r;S=S>1?1:S,b=u(S),E=g.startX+(g.x-g.startX)*b,N=g.startY+(g.y-g.startY)*b,g.method.call(g.scrollable,E,N),(E!==g.x||N!==g.y)&&s.requestAnimationFrame(y.bind(s,g))}function d(g,w,b){let E,N,S,x;const C=o();g===e.body?(E=s,N=s.scrollX||s.pageXOffset,S=s.scrollY||s.pageYOffset,x=i.scroll):(E=g,N=g.scrollLeft,S=g.scrollTop,x=l),y({scrollable:E,method:x,startTime:C,startX:N,startY:S,x:w,y:b})}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 g=arguments[0].left,w=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof w=="undefined"?this.scrollTop:~~w)},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 g=m(this),w=g.getBoundingClientRect(),b=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+b.left-w.left,g.scrollTop+b.top-w.top),s.getComputedStyle(g).position!=="fixed"&&s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):s.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class Qp{constructor(e=[],t){v(this,"timeOffset",0),v(this,"speed"),v(this,"actions"),v(this,"raf",null),v(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 po(s,e){if(s.type===R.IncrementalSnapshot&&s.data.source===M.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(ot),-1},getNode(){return console.error(ot),null},removeNodeFromMap(){console.error(ot)},has(){return console.error(ot),!1},reset(){console.error(ot)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(ot),Reflect.get(s,e,t)}}));function Qe(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const a=e-(o-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(l,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,n)},a))}}function Jt(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Jt(s,e,n||{},!0)}function tt(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()=>{}}}let Vt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Vt=()=>new Date().getTime());function Hi(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=P.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=P.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Yi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Xi(s){return s?s.nodeType===s.ELEMENT_NODE?s:P.parentElement(s):null}function de(s,e,t,r){if(!s)return!1;const i=Xi(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Dr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function cl(s,e){return e.getId(s)!==-1}function Nr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===kt}function Ji(s,e){if(Ot(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=P.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ji(r,e):!0}function zr(s){return!!s.changedTouches}function Ki(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 hl(s){const e={},t=(i,n)=>{const o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(const i of s){const{nextId:n,parentId:o}=i;if(n&&n in e){const a=e[n];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(o in e){const a=e[o];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function Qi(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)Qi(s.children[t],e)}function dt(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function qi(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function en(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 n=i.getBoundingClientRect(),o=en(i,e),a=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function We(s){return s?s instanceof Ie&&"shadowRoot"in s?!!s.shadowRoot:!!P.shadowRoot(s):!1}function ct(s,e){const t=s[e[0]];return e.length===1?t:ct(t.cssRules[e[1]].cssRules,e.slice(2))}function ni(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function fl(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 tn{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 rn(s){var e;let t=null;return"getRootNode"in s&&((e=P.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&P.host(P.getRootNode(s))&&(t=P.host(P.getRootNode(s))),t}function dl(s){let e=s,t;for(;t=rn(e);)e=t;return e}function pl(s){const e=s.ownerDocument;if(!e)return!1;const t=dl(s);return P.contains(e,t)}function sn(s){const e=s.ownerDocument;return e?P.contains(e,s)||pl(s):!1}const mp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:tn,get _mirror(){return exports.mirror},closestElementOfNode:Xi,getBaseDimension:en,getNestedRule:ct,getPositionsAndIndex:ni,getRootShadowHost:dl,getShadowHost:rn,getWindowHeight:Yi,getWindowScroll:Hi,getWindowWidth:Zi,hasShadowRoot:We,hookSetter:Jt,inDom:sn,isAncestorRemoved:Ji,isBlocked:de,isIgnored:Nr,isSerialized:cl,isSerializedIframe:dt,isSerializedStylesheet:qi,iterateResolveTree:Qi,legacy_isTouchEvent:zr,get nowTimestamp(){return Vt},on:fe,patch:tt,polyfill:Ki,queueToResolveTrees:hl,shadowHostInDom:pl,throttle:Qe,uniqueTextMutations:fl},Symbol.toStringTag,{value:"Module"}));var R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),x=(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.VisibilityChange=17]="VisibilityChange",s))(x||{}),W=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.DblClick=3]="DblClick",s[s.Focus=4]="Focus",s[s.Blur=5]="Blur",s[s.TouchStart=6]="TouchStart",s[s.TouchMove_Departed=7]="TouchMove_Departed",s[s.TouchEnd=8]="TouchEnd",s[s.TouchCancel=9]="TouchCancel",s))(W||{}),_e=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(_e||{}),Le=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Le||{}),Ue=(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))(Ue||{}),U=(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))(U||{}),ke=(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))(ke||{});function ro(s){return"__ln"in s}class gp{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&&ro(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&&ro(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 so=(s,e)=>`${s}@${e}`;class yp{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,"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 gp,i=l=>{let u=l,c=kt;for(;c===kt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=l=>{const u=P.parentNode(l);if(!u||!sn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Ot(u)?this.mirror.getId(rn(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const p=ut(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{dt(m,this.mirror)&&this.iframeManager.addIframe(m),qi(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),We(l)&&this.shadowDomManager.addShadowRoot(P.shadowRoot(l),this.doc)},onIframeLoad:(m,y)=>{this.iframeManager.attachIframe(m,y),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,y)=>{this.stylesheetManager.attachLinkElement(m,y)},cssCaptured:c});p&&(e.push({parentId:h,nextId:f,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)io(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(P.parentNode(l))||n(l);for(const l of this.addedSet)!no(this.droppedSet,l)&&!io(this.removesSubTreeCache,l,this.mirror)||no(this.movedSet,l)?n(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(P.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(P.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const p=c.value,m=P.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=P.host(m);if(this.mirror.getId(y)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),n(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=P.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)),t.attributes.value=Array.from(P.childNodes(e),r=>P.textContent(r)||"").join("")}),b(this,"processMutation",e=>{if(!Nr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=P.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ko(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Xi(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=yi(t);i=gi({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!_o(t.tagName,r))if(n.attributes[r]=To(this.doc,Ve(t.tagName),Ve(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?n.styleDiff[a]=l:n.styleDiff[a]=[l,u]:n._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))t.style.getPropertyValue(a)===""&&(n.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(de(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=Ot(e.target)?this.mirror.getId(P.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||Nr(t,this.mirror,this.slimDOMOptions)||!cl(t,this.mirror)||(this.addedSet.has(t)?(oi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ji(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[so(r,i)]?oi(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Ot(e.target)&&Dt(e.target)?!0:void 0}),wp(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(Nr(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[so(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(P.childNodes(e).forEach(r=>this.genAdds(r)),We(e)&&P.childNodes(P.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function oi(s,e){s.delete(e),P.childNodes(e).forEach(t=>oi(s,t))}function wp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),P.childNodes(r).forEach(i=>t.push(i)))}}function io(s,e,t){return s.size===0?!1:bp(s,e)}function bp(s,e,t){const r=P.parentNode(e);return r?s.has(r):!1}function no(s,e){return s.size===0?!1:ml(s,e)}function ml(s,e){const t=P.parentNode(e);return t?s.has(t)?!0:ml(s,t):!1}let _t;function vp(s){_t=s}function Sp(){_t=void 0}const F=s=>_t?(...t)=>{try{return s(...t)}catch(r){if(_t&&_t(r)===!0)return;throw r}}:s,Ke=[];function Kt(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 gl(s,e){const t=new yp;Ke.push(t),t.init(s);const r=new(ul())(F(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Cp({visibilityChangeCb:s,doc:e,mirror:t,sampling:r}){if(!s)return()=>{};const i=new WeakMap,n=typeof r.visibility=="number"?r.visibility:50,o=Qe(F(u=>{const c=u.target,h=t.getId(c),f=u.isIntersecting||u.intersectionRatio>0;h!==-1&&s({id:h,isVisible:f,visibilityRatio:u.intersectionRatio})}),n,{leading:r.visibility!==!1,trailing:!0}),a=new IntersectionObserver(u=>{u.forEach(c=>{const h=c.target;i.has(h)?o(c):i.set(h,!0)})},{root:null,threshold:[.1,.9]});e.querySelectorAll("*").forEach(u=>a.observe(u));const l=new MutationObserver(u=>{u.forEach(c=>{c.addedNodes.forEach(h=>{h instanceof Element&&a.observe(h)})})});return l.observe(e,{childList:!0,subtree:!0}),()=>{a.disconnect(),l.disconnect()}}function Ep({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],a;const l=Qe(F(h=>{const f=Date.now()-a;s(o.map(p=>(p.timeOffset-=f,p)),h),o=[],a=null}),n),u=F(Qe(F(h=>{const f=Kt(h),{clientX:p,clientY:m}=zr(h)?h.changedTouches[0]:h;a||(a=Vt()),o.push({x:p,y:m,id:r.getId(f),timeOffset:Vt()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return F(()=>{c.forEach(h=>h())})}function xp({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Kt(h);if(de(f,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=_e.Mouse;break;case"touch":p=_e.Touch;break;case"pen":p=_e.Pen;break}p===_e.Touch?W[c]===W.MouseDown?m="TouchStart":W[c]===W.MouseUp&&(m="TouchEnd"):_e.Pen}else zr(h)&&(p=_e.Touch);p!==null?(l=p,(m.startsWith("Touch")&&p===_e.Touch||m.startsWith("Mouse")&&p===_e.Mouse)&&(p=null)):W[c]===W.Click&&(p=l,l=null);const y=zr(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:w}=y;F(s)(D({type:W[m],id:d,x:g,y:w},p!==null&&{pointerType:p}))};return Object.keys(W).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Ve(c);const f=u(c);if(window.PointerEvent)switch(W[c]){case W.MouseDown:case W.MouseUp:h=h.replace("mouse","pointer");break;case W.TouchStart:case W.TouchEnd:return}a.push(fe(h,f,e))}),F(()=>{a.forEach(c=>c())})}function yl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=F(Qe(F(a=>{const l=Kt(a);if(!l||de(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=Hi(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),n.scroll||100));return fe("scroll",o,e)}function Ip({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=F(Qe(F(()=>{const n=Yi(),o=Zi();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return fe("resize",i,e)}const Mp=["INPUT","TEXTAREA","SELECT"],oo=new WeakMap;function Np({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(w){let v=Kt(w);const E=w.isTrusted,N=v&&v.tagName;if(v&&N==="OPTION"&&(v=P.parentElement(v)),!v||!N||Mp.indexOf(N)<0||de(v,r,i,!0)||v.classList.contains(n)||o&&v.matches(o))return;let S=v.value,I=!1;const C=yi(v)||"";C==="radio"||C==="checkbox"?I=v.checked:(a[N.toLowerCase()]||a[C])&&(S=gi({element:v,maskInputOptions:a,tagName:N,type:C,value:S,maskInputFn:l})),f(v,c?{text:S,isChecked:I,userTriggered:E}:{text:S,isChecked:I});const T=v.name;C==="radio"&&T&&I&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach($=>{if($!==v){const oe=$.value;f($,c?{text:oe,isChecked:!I,userTriggered:!1}:{text:oe,isChecked:!I})}})}function f(w,v){const E=oo.get(w);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){oo.set(w,v);const N=t.getId(w);F(s)(ne(D({},v),{id:N}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(w=>fe(w,F(h),e)),y=e.defaultView;if(!y)return()=>{m.forEach(w=>w())};const d=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),g=[[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&&m.push(...g.map(w=>Jt(w[0],w[1],{set(){F(h)({target:this,isTrusted:!1})}},!1,y))),F(()=>{m.forEach(w=>w())})}function Vr(s){const e=[];function t(r,i){if(br("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||br("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||br("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||br("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Be(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Rp({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:F((c,h,f)=>{const[p,m]=f,{id:y,styleId:d}=Be(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&s({id:y,styleId:d,adds:[{rule:p,index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,f])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:F((c,h,f)=>{const[p]=f,{id:m,styleId:y}=Be(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,removes:[{index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:F((c,h,f)=>{const[p]=f,{id:m,styleId:y}=Be(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,replace:p}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:F((c,h,f)=>{const[p]=f,{id:m,styleId:y}=Be(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,replaceSync:p}),c.apply(h,f)})}));const l={};vr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(vr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),vr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),vr("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:F((f,p,m)=>{const[y,d]=m,{id:g,styleId:w}=Be(p.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||w&&w!==-1)&&s({id:g,styleId:w,adds:[{rule:y,index:[...Vr(p),d||0]}]}),f.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:F((f,p,m)=>{const[y]=m,{id:d,styleId:g}=Be(p.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&s({id:d,styleId:g,removes:[{index:[...Vr(p),y]}]}),f.apply(p,m)})})}),F(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),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 wl({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(P.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-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(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(f){}return h}}),F(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function Ap({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:F((a,l,u)=>{var c;const[h,f,p]=u;if(t.has(h))return n.apply(l,[h,f,p]);const{id:m,styleId:y}=Be((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,set:{property:h,value:f,priority:p},index:Vr(l.parentRule)}),a.apply(l,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:F((a,l,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(l,[h]);const{id:f,styleId:p}=Be((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&s({id:f,styleId:p,remove:{property:h},index:Vr(l.parentRule)}),a.apply(l,u)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Op({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=F(l=>Qe(F(u=>{const c=Kt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:p,playbackRate:m,loop:y}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:p,playbackRate:m,loop:y})}),i.media||500)),a=[fe("play",o(Ue.Play),n),fe("pause",o(Ue.Pause),n),fe("seeked",o(Ue.Seeked),n),fe("volumechange",o(Ue.VolumeChange),n),fe("ratechange",o(Ue.RateChange),n)];return F(()=>{a.forEach(l=>l())})}function Dp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(l,u,c){const h=new n(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 o=tt(e.fonts,"add",function(a){return function(l){return setTimeout(F(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=n}),r.push(o),F(()=>{r.forEach(a=>a())})}function Tp(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const a=F(()=>{const l=e.getSelection();if(!l||o&&(l!=null&&l.isCollapsed))return;o=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:p,startOffset:m,endContainer:y,endOffset:d}=f;de(p,r,i,!0)||de(y,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(y),endOffset:d})}n({ranges:u})});return a(),fe("selectionchange",a)}function _p({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:tt(t.customElements,"define",function(i){return function(n,o,a){try{e({define:{name:n}})}catch(l){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,a])}})}function kp(s,e){const{mutationCb:t,visibilityChangeCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:a,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:f,fontCb:p,selectionCb:m,customElementCb:y}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.visibilityChangeCb=(...d)=>{e.visibilityChange&&e.visibilityChange(...d),r(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),i(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),n(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),a(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),u(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),h(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),f(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),m(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function $p(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};kp(s,e);let r;s.recordDOM&&(r=gl(s,s.doc));const i=Ep(s),n=xp(s),o=yl(s),a=Ip(s,{win:t}),l=Np(s),u=Op(s),c=Cp(s);let h=()=>{},f=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=Rp(s,{win:t}),f=wl(s,s.doc),p=Ap(s,{win:t}),s.collectFonts&&(m=Dp(s)));const y=Tp(s),d=_p(s),g=[];for(const w of s.plugins)g.push(w.observer(w.callback,t,w.options));return F(()=>{Ke.forEach(w=>w.reset()),r==null||r.disconnect(),c(),i(),n(),o(),a(),l(),u(),h(),f(),p(),m(),y(),d(),g.forEach(w=>w())})}function br(s){return typeof window[s]!="undefined"}function vr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class ao{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),o.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Pp{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new ao(Do)),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 ao(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.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:R.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==ke.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Lp{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(!Dt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=gl(ne(D({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(yl(ne(D({},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(P.host(e))),this.restoreHandlers.push(wl({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(tt(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),a=P.shadowRoot(this);return a&&sn(this)&&r.addShadowRoot(a,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",At=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Sr=0;Sr<ht.length;Sr++)At[ht.charCodeAt(Sr)]=Sr;var Fp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=ht[e[t]>>2],i+=ht[(e[t]&3)<<4|e[t+1]>>4],i+=ht[(e[t+1]&15)<<2|e[t+2]>>6],i+=ht[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},Bp=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,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)n=At[s.charCodeAt(r)],o=At[s.charCodeAt(r+1)],a=At[s.charCodeAt(r+2)],l=At[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const lo=new Map;function Up(s,e){let t=lo.get(s);return t||(t=new Map,lo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const bl=(s,e,t)=>{if(!s||!(Sl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Up(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Rr(s,e,t){if(s instanceof Array)return s.map(r=>Rr(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=Fp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Rr(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:[Rr(s.data,e,t),s.width,s.height]};if(Sl(s,e)||typeof s=="object"){const r=s.constructor.name,i=bl(s,e,t);return{rr_type:r,index:i}}}}return s}const vl=(s,e,t)=>s.map(r=>Rr(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 Wp(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const a=tt(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=vl(u,e,this);s(this.canvas,{type:Le["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Jt(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:Le["2D"],property:o,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function zp(s){return s==="experimental-webgl"?"webgl":s}function uo(s,e,t,r){const i=[];try{const n=tt(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!de(this,e,t,!0)){const u=zp(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 o.apply(this,[a,...l])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function co(s,e,t,r,i,n){const o=[],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=tt(s,l,function(c){return function(...h){const f=c.apply(this,h);if(bl(f,n,this),"tagName"in this.canvas&&!de(this.canvas,r,i,!0)){const p=vl(h,n,this),m={type:e,property:l,args:p};t(this.canvas,m)}return f}});o.push(u)}catch(u){const c=Jt(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});o.push(c)}return o}function Vp(s,e,t,r){const i=[];return i.push(...co(e.WebGLRenderingContext.prototype,Le.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...co(e.WebGL2RenderingContext.prototype,Le.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Cl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Gp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),ho=typeof window!="undefined"&&window.Blob&&new Blob([Gp(Cl)],{type:"text/javascript;charset=utf-8"});function jp(s){let e;try{if(e=ho&&(window.URL||window.webkitURL).createObjectURL(ho),!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,"+Cl,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Hp{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:n,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=uo(t,r,i,!0),a=new Map,l=new jp;l.onmessage=m=>{const{id:y}=m.data;if(a.set(y,!1),!("base64"in m.data))return;const{base64:d,type:g,width:w,height:v}=m.data;this.mutationCb({id:y,type:Le["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:g}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(y=>{de(y,r,i,!0)||m.push(y)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,f().forEach(async y=>{var d;const g=this.mirror.getId(y);if(a.get(g)||y.width===0||y.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(y.__context)){const v=y.getContext(y.__context);((d=v==null?void 0:v.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const w=await createImageBitmap(y);l.postMessage({id:g,bitmap:w,width:y.width,height:y.height,dataURLOptions:n.dataURLOptions},[w])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=uo(e,t,r,!1),n=Wp(this.processMutation.bind(this),e,t,r),o=Vp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}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(o=>{const u=o,{type:a}=u;return st(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Yp{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new tn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(a,l)=>({rule:Ro(a,n.href),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Zp{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 se,Ar,vs,Gr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((cn=s.contentWindow)==null?void 0:cn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const Ce=Ao();function Ye(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryEvc:i,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:f,maskInputOptions:p,slimDOMOptions:m,maskInputFn:y,maskTextFn:d,hooks:g,packFn:w,sampling:v={},dataURLOptions:E={},mousemoveWait:N,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:C=!1,recordAfter:T=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:$=!1,collectFonts:oe=!1,inlineImages:z=!1,plugins:A,keepIframeSrcFn:Y=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:k}=s;vp(k);const O=C?window.parent===window:!0;let H=!1;if(!O)try{window.parent.document&&(H=!1)}catch(B){H=!0}if(O&&!e)throw new Error("emit function is required");if(!O&&!H)return()=>{};N!==void 0&&v.mousemove===void 0&&(v.mousemove=N),Ce.reset();const ee=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}:p!==void 0?p:{password:!0},ue=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};Ki();let he,me=0;const we=B=>{for(const ve of A||[])ve.eventProcessor&&(B=ve.eventProcessor(B));return w&&!H&&(B=w(B)),B};se=(B,ve)=>{var Z;const te=B;if(te.timestamp=Vt(),(Z=Ke[0])!=null&&Z.isFrozen()&&te.type!==R.FullSnapshot&&!(te.type===R.IncrementalSnapshot&&te.data.source===x.Mutation)&&Ke.forEach(Me=>Me.unfreeze()),O)e==null||e(we(te),ve);else if(H){const Me={type:"rrweb",event:we(te),origin:window.location.origin,isCheckout:ve};window.parent.postMessage(Me,"*")}if(te.type===R.FullSnapshot)he=te,me=0;else if(te.type===R.IncrementalSnapshot){if(te.data.source===x.Mutation&&te.data.isAttachIframe)return;me++;const Me=r&&me>=r,V=t&&te.timestamp-he.timestamp>t,St=i&&te.type===R.IncrementalSnapshot&&te.data.source===x.VisibilityChange;(Me||V||St)&&Ar(!0)}};const ae=B=>{se({type:R.IncrementalSnapshot,data:D({source:x.Mutation},B)})},le=B=>se({type:R.IncrementalSnapshot,data:D({source:x.Scroll},B)}),Ze=B=>se({type:R.IncrementalSnapshot,data:D({source:x.CanvasMutation},B)}),Xe=B=>se({type:R.IncrementalSnapshot,data:D({source:x.AdoptedStyleSheet},B)}),ye=new Yp({mutationCb:ae,adoptedStyleSheetCb:Xe}),De=new Pp({mirror:Ce,mutationCb:ae,stylesheetManager:ye,recordCrossOriginIframes:C,wrappedEmit:se});for(const B of A||[])B.getMirror&&B.getMirror({nodeMirror:Ce,crossOriginIframeMirror:De.crossOriginIframeMirror,crossOriginIframeStyleMirror:De.crossOriginIframeStyleMirror});const rt=new Zp;vs=new Hp({recordCanvas:I,mutationCb:Ze,win:window,blockClass:n,blockSelector:o,mirror:Ce,sampling:v.canvas,dataURLOptions:E});const Je=new Lp({mutationCb:ae,scrollCb:le,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:u,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:ee,dataURLOptions:E,maskTextFn:d,maskInputFn:y,recordCanvas:I,inlineImages:z,sampling:v,slimDOMOptions:ue,iframeManager:De,stylesheetManager:ye,canvasManager:vs,keepIframeSrcFn:Y,processedNodeManager:rt},mirror:Ce});Ar=(B=!1)=>{if(!S)return;se({type:R.Meta,data:{href:window.location.href,width:Zi(),height:Yi()}},B),ye.reset(),Je.init(),Ke.forEach(Z=>Z.lock());const ve=Pu(document,{mirror:Ce,blockClass:n,blockSelector:o,maskTextClass:u,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:ee,maskTextFn:d,maskInputFn:y,slimDOM:ue,dataURLOptions:E,recordCanvas:I,inlineImages:z,onSerialize:Z=>{dt(Z,Ce)&&De.addIframe(Z),qi(Z,Ce)&&ye.trackLinkElement(Z),We(Z)&&Je.addShadowRoot(P.shadowRoot(Z),document)},onIframeLoad:(Z,te)=>{De.attachIframe(Z,te),Je.observeAttachShadow(Z)},onStylesheetLoad:(Z,te)=>{ye.attachLinkElement(Z,te)},keepIframeSrcFn:Y});if(!ve)return console.warn("Failed to snapshot the document");se({type:R.FullSnapshot,data:{node:ve,initialOffset:Hi(window)}},B),Ke.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ye.adoptStyleSheets(document.adoptedStyleSheets,Ce.getId(document))};try{const B=[],ve=te=>{var Me;return F($p)({mutationCb:ae,visibilityChangeCb:V=>{se({type:R.IncrementalSnapshot,data:D({source:x.VisibilityChange},V)})},mousemoveCb:(V,St)=>se({type:R.IncrementalSnapshot,data:{source:St,positions:V}}),mouseInteractionCb:V=>se({type:R.IncrementalSnapshot,data:D({source:x.MouseInteraction},V)}),scrollCb:le,viewportResizeCb:V=>se({type:R.IncrementalSnapshot,data:D({source:x.ViewportResize},V)}),inputCb:V=>se({type:R.IncrementalSnapshot,data:D({source:x.Input},V)}),mediaInteractionCb:V=>se({type:R.IncrementalSnapshot,data:D({source:x.MediaInteraction},V)}),styleSheetRuleCb:V=>se({type:R.IncrementalSnapshot,data:D({source:x.StyleSheetRule},V)}),styleDeclarationCb:V=>se({type:R.IncrementalSnapshot,data:D({source:x.StyleDeclaration},V)}),canvasMutationCb:Ze,fontCb:V=>se({type:R.IncrementalSnapshot,data:D({source:x.Font},V)}),selectionCb:V=>{se({type:R.IncrementalSnapshot,data:D({source:x.Selection},V)})},customElementCb:V=>{se({type:R.IncrementalSnapshot,data:D({source:x.CustomElement},V)})},blockClass:n,ignoreClass:a,ignoreSelector:l,maskTextClass:u,maskTextSelector:c,maskInputOptions:ee,inlineStylesheet:h,sampling:v,recordDOM:S,recordCanvas:I,inlineImages:z,userTriggeredOnInput:$,collectFonts:oe,doc:te,maskInputFn:y,maskTextFn:d,keepIframeSrcFn:Y,blockSelector:o,slimDOMOptions:ue,dataURLOptions:E,mirror:Ce,iframeManager:De,stylesheetManager:ye,shadowDomManager:Je,processedNodeManager:rt,canvasManager:vs,ignoreCSSAttributes:ie,plugins:((Me=A==null?void 0:A.filter(V=>V.observer))==null?void 0:Me.map(V=>({observer:V.observer,options:V.options,callback:St=>se({type:R.Plugin,data:{plugin:V.name,payload:St}})})))||[]},g)};De.addLoadListener(te=>{try{B.push(ve(te.contentDocument))}catch(Me){console.warn(Me)}});const Z=()=>{Ar(),B.push(ve(document)),Gr=!0};return document.readyState==="interactive"||document.readyState==="complete"?Z():(B.push(fe("DOMContentLoaded",()=>{se({type:R.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&Z()})),B.push(fe("load",()=>{se({type:R.Load,data:{}}),T==="load"&&Z()},window))),()=>{B.forEach(te=>te()),rt.destroy(),Gr=!1,Sp()}}catch(B){console.warn(B)}}Ye.addCustomEvent=(s,e)=>{if(!Gr)throw new Error("please add custom event after start recording");se({type:R.Custom,data:{tag:s,payload:e}})};Ye.freezePage=()=>{Ke.forEach(s=>s.freeze())};Ye.takeFullSnapshot=s=>{if(!Gr)throw new Error("please take full snapshot after start recording");Ar(s)};Ye.mirror=Ce;function El(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 Xp=Object.freeze(Object.defineProperty({__proto__:null,default:El},Symbol.toStringTag,{value:"Module"}));function Jp(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},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(g){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(g)}const a=o(s.navigator.userAgent)?1:0;function l(g,w){this.scrollLeft=g,this.scrollTop=w}function u(g){return .5*(1-Math.cos(Math.PI*g))}function c(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,w){if(w==="Y")return g.clientHeight+a<g.scrollHeight;if(w==="X")return g.clientWidth+a<g.scrollWidth}function f(g,w){const v=s.getComputedStyle(g,null)["overflow"+w];return v==="auto"||v==="scroll"}function p(g){const w=h(g,"Y")&&f(g,"Y"),v=h(g,"X")&&f(g,"X");return w||v}function m(g){for(;g!==e.body&&p(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const w=n();let v,E,N,S=(w-g.startTime)/r;S=S>1?1:S,v=u(S),E=g.startX+(g.x-g.startX)*v,N=g.startY+(g.y-g.startY)*v,g.method.call(g.scrollable,E,N),(E!==g.x||N!==g.y)&&s.requestAnimationFrame(y.bind(s,g))}function d(g,w,v){let E,N,S,I;const C=n();g===e.body?(E=s,N=s.scrollX||s.pageXOffset,S=s.scrollY||s.pageYOffset,I=i.scroll):(E=g,N=g.scrollLeft,S=g.scrollTop,I=l),y({scrollable:E,method:I,startTime:C,startX:N,startY:S,x:w,y:v})}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 g=arguments[0].left,w=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof w=="undefined"?this.scrollTop:~~w)},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 g=m(this),w=g.getBoundingClientRect(),v=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+v.left-w.left,g.scrollTop+v.top-w.top),s.getComputedStyle(g).position!=="fixed"&&s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Kp{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 fo(s,e){if(s.type===R.IncrementalSnapshot&&s.data.source===x.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 mo(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 ft;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(ft||(ft={}));var Ml={type:"xstate.init"};function Cs(s){return s===void 0?[]:[].concat(s)}function at(s){return{type:"xstate.assign",assignment:s}}function go(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 jr(s){return function(e){return s===e}}function Il(s){return typeof s=="string"?{type:s}:s}function yo(s,e){return{value:s,context:e,actions:[],changed:!1,matches:jr(s)}}function wo(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 Nl(s,e){e===void 0&&(e={});var t=mo(wo(Cs(s.states[s.initial].entry).map(function(n){return go(n,e.actions)}),s.context,Ml),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:jr(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,p=Il(a),m=s.states[h];if(m.on){var y=Cs(m.on[p.type]);try{for(var d=function(O){var H=typeof Symbol=="function"&&Symbol.iterator,q=H&&O[H],ue=0;if(q)return q.call(O);if(O&&typeof O.length=="number")return{next:function(){return O&&ue>=O.length&&(O=void 0),{value:O&&O[ue++],done:!O}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var w=g.value;if(w===void 0)return yo(h,f);var b=typeof w=="string"?{target:w}:w,E=b.target,N=b.actions,S=N===void 0?[]:N,x=b.cond,C=x===void 0?function(){return!0}:x,T=E===void 0,$=E!=null?E:h,oe=s.states[$];if(C(f,p)){var W=mo(wo((T?Cs(S):[].concat(m.exit,S,oe.entry).filter(function(O){return O})).map(function(O){return go(O,o._options.actions)}),f,p),3),A=W[0],Y=W[1],re=W[2],k=E!=null?E:h;return{value:k,context:Y,actions:A,changed:E!==h||A.length>0||re,matches:jr(k)}}}}catch(O){l={error:O}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return yo(h,f)}};return o}var vo=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function Rl(s){var e=s.initialState,t=ft.NotStarted,r=new Set,i={_machine:s,send:function(o){t===ft.Running&&(e=s.transition(e,o),vo(e,Il(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:jr(n.value)}}return t=ft.Running,vo(e,Ml),i},stop:function(){return t=ft.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function qp(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===R.Meta&&r.timestamp<=e)return s.slice(t)}return s}function em(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=Nl({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:at({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:at((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),ne(D({},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 m of l)po(m,u);const h=qp(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===R.IncrementalSnapshot&&c.data.source===M.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(B.PlayBack);const p=new Array;for(const m of h)if(!(f&&f<u&&(m.timestamp<=f||m===c)))if(m.timestamp<u)p.push(m);else{const y=e(m,!1);a.addAction({doAction:()=>{y()},delay:m.delay})}t(p),r.emit(B.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:at(o=>ne(D({},o),{lastPlayedEvent:null})),startLive:at({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:at((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;po(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let m=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);u[d].timestamp<=c.timestamp?y=d+1:h=d-1}m===-1&&(m=y),u.splice(m,0,c)}const f=c.timestamp<a,p=e(c,f);f?p():l.isActive()&&l.addAction({doAction:()=>{p()},delay:c.delay})}return ne(D({},o),{events:u})})}});return Rl(i)}function tm(s){const e=Nl({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:at({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Rl(e)}const rm=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],bo=new Map;function Al(s,e){let t=bo.get(s);return t||(t=new Map,bo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function ze(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 ze(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 Al(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(ze(s,e,t))))}else{if("base64"in r)return Up(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(ze(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(ze(s,e,t)));return r}}function sm(s,e){try{return e===Le.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const im=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function nm(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!im.includes(t))return;const r=Al(s,t);r.includes(e)||r.push(e)}async function om({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const o=sm(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(ze(r,o))),l=n.apply(o,a);nm(o,l);const u=!1}catch(o){i(s,o)}}async function am({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(ze(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 li({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([Le.WebGL,Le.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await om({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await am({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class lm{constructor(e){v(this,"mediaMap",new Map),v(this,"warn"),v(this,"service"),v(this,"speedService"),v(this,"emitter"),v(this,"getCurrentTime"),v(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(B.Start,this.start.bind(this)),this.emitter.on(B.SkipStart,this.start.bind(this)),this.emitter.on(B.Pause,this.pause.bind(this)),this.emitter.on(B.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 p,m,y,d,g;const i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===Ue.Play||o!==Ue.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(p=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?p:0,lastInteractionTimeOffset:t,playbackRate:(m=n!=null?n:i==null?void 0:i.playbackRate)!=null?m: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:(g=c!=null?c:i==null?void 0:i.loop)!=null?g: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 p=0;typeof a.rr_mediaCurrentTime=="number"&&(p=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:p,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 Er(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 um(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 cm=5*1e3,hm=xl||Jp,So="[replayer]",Es={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Co(s){return s.type==R.IncrementalSnapshot&&(s.data.source==M.TouchMove||s.data.source==M.MouseInteraction&&s.data.type==U.TouchStart)}class fm{constructor(e,t){if(v(this,"wrapper"),v(this,"iframe"),v(this,"service"),v(this,"speedService"),v(this,"config"),v(this,"usingVirtualDom",!1),v(this,"virtualDom",new bt),v(this,"mouse"),v(this,"mouseTail",null),v(this,"tailPositions",[]),v(this,"emitter",hm()),v(this,"nextUserInteractionEvent"),v(this,"legacy_missingNodeRetryMap",{}),v(this,"cache",Pn()),v(this,"imageMap",new Map),v(this,"canvasEventMap",new Map),v(this,"mirror",Oo()),v(this,"styleMirror",new rn),v(this,"mediaManager"),v(this,"firstFullSnapshot",null),v(this,"newDocumentQueue",[]),v(this,"mousePos",null),v(this,"touchActive",null),v(this,"lastMouseDownEvent",null),v(this,"lastHoveredRootNode"),v(this,"lastSelectionData",null),v(this,"constructedStyleMutations",[]),v(this,"adoptedStyleSheets",[]),v(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)))}),v(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case R.DomContentLoaded:case R.Load:case R.Custom:continue;case R.FullSnapshot:case R.Meta:case R.Plugin:case R.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),v(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case R.DomContentLoaded:case R.Load:break;case R.Custom:u=()=>{this.emitter.emit(B.CustomEvent,a)};break;case R.Meta:u=()=>this.emitter.emit(B.Resize,{width:a.data.width,height:a.data.height});break;case R.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 R.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/cm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(B.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(B.Finish))};let p=50;a.type===R.IncrementalSnapshot&&a.data.source===M.MouseMove&&a.data.positions.length&&(p+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,p)}this.emitter.emit(B.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:Es,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(B.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(B.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{li({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===M.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===M.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{Ur(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=Wr(u.node,this.mirror,this.virtualDom.mirror);Ur(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(B.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Qp([],{speed:this.config.speed});this.service=em({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(B.StateChange,{player:a})}),this.speedService=tm({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(B.StateChange,{speed:a})}),this.mediaManager=new lm({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===R.Meta),n=this.service.state.context.events.find(a=>a.type===R.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(B.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(Co)&&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(B.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(B.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(B.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(B.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Co(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=Pn()}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&&(Kp(this.iframe.contentWindow,this.iframe.contentDocument),Qi(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(),Ph(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=>Er(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(B.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=rm(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,ll(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:M.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)===ke.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})};Tt(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=>Er(a))}collectIframeAndAttachDocument(e,t){if(dt(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(B.Start,n),this.emitter.on(B.Pause,n);const a=()=>{this.emitter.off(B.Start,n),this.emitter.off(B.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(B.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(B.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===R.IncrementalSnapshot&&t.data.source===M.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(ze(this.imageMap,null,r)));return ne(D({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ne(D({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(ze(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ne(D({},e),{args:i}))}}}applyIncremental(e,t){var r,i,o;const{data:n}=e;switch(n.source){case M.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case M.Drag:case M.TouchMove:case M.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 M.MouseInteraction:{if(n.id===-1)break;const a=new Event(Ve(U[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(B.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case U.Blur:"blur"in l&&l.blur();break;case U.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case U.Click:case U.TouchStart:case U.TouchEnd:case U.MouseDown:case U.MouseUp:t?(n.type===U.TouchStart?this.touchActive=!0:n.type===U.TouchEnd&&(this.touchActive=!1),n.type===U.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===U.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===U.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===U.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===U.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===U.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case U.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case M.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 M.ViewportResize:this.emitter.emit(B.Resize,{width:n.width,height:n.height});break;case M.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 M.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 M.StyleSheetRule:case M.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 M.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);li({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case M.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 M.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case M.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,tp(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=al(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&&We(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(p){if(p instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw p}});const i=D({},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===ke.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(We(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let p=null,m=null;if(u.previousId&&(p=r.getNode(u.previousId)),u.nextId&&(m=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(dt(f,r)){this.attachDocumentToIframe(u,f);return}const d=(b,E)=>{if(!this.usingVirtualDom){Er(b);for(const N of this.config.plugins||[])N.onBuild&&N.onBuild(b,{id:E,replayer:this})}},g=Tt(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:g,mutation:u};return}const w=r.getMeta(f);if(w&&w.type===ke.Element&&u.node.type===ke.Text){const b=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const E of b)E.nodeType===f.TEXT_NODE&&f.removeChild(E);else if(w.tagName==="style"&&b.length===1)for(const E of b)E.nodeType===f.TEXT_NODE&&!r.hasNode(E)&&(g.textContent=E.textContent,f.removeChild(E))}else if((w==null?void 0:w.type)===ke.Document){const b=f;u.node.type===ke.DocumentType&&((c=b.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),g.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(p&&p.nextSibling&&p.nextSibling.parentNode?f.insertBefore(g,p.nextSibling):m&&m.parentNode?f.contains(m)?f.insertBefore(g,m):f.insertBefore(g,null):f.appendChild(g),d(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),dt(g,this.mirror)){const b=this.mirror.getId(g),E=this.newDocumentQueue.find(N=>N.parentId===b);E&&(this.attachDocumentToIframe(E,g),this.newDocumentQueue=this.newDocumentQueue.filter(N=>N!==E))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,g,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=fl(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)?qi(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),dl(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(p=>p.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Kr(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const p=h.parentNode;((c=p==null?void 0:p.rules)==null?void 0:c.length)>0&&(p.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 p=u.attributes[f];if(p===null)h.removeAttribute(f),f==="open"&&um(h,u);else if(typeof p=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=r.getMeta(h),y=Tt(ne(D({},m),{attributes:D(D({},m.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,u.attributes);const d=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,d),r.replace(u.id,y);break}}catch(m){}if(f==="value"&&h.nodeName==="TEXTAREA"){const m=h;m.childNodes.forEach(d=>m.removeChild(d));const y=(c=h.ownerDocument)==null?void 0:c.createTextNode(p);y&&m.appendChild(y)}else h.setAttribute(f,p);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Er(h,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(f==="style"){const m=p,y=h;for(const d in m)if(m[d]===!1)y.style.removeProperty(d);else if(m[d]instanceof Array){const g=m[d];y.style.setProperty(d,g[0],g[1])}else{const g=m[d];y.style.setProperty(d,g)}}}})}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)===ke.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===M.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===M.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}=oi(l);ct(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}=oi(a);ct(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&&ct(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ct(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(We(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:M.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);We(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=tn(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?Es:Object.assign({},Es,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!==R.IncrementalSnapshot?!1:e.data.source>M.Mutation&&e.data.source<=M.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(B.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(So,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(So,...e)}}const{addCustomEvent:dm}=Ye,{freezePage:pm}=Ye,{takeFullSnapshot:mm}=Ye;var pe=Uint8Array,ye=Uint16Array,Gt=Uint32Array,ns=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),os=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ui=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ol=function(s,e){for(var t=new ye(31),r=0;r<31;++r)t[r]=e+=1<<s[r-1];for(var i=new Gt(t[30]),r=1;r<30;++r)for(var o=t[r];o<t[r+1];++o)i[o]=o-t[r]<<5|r;return[t,i]},Dl=Ol(ns,2),Tl=Dl[0],ci=Dl[1];Tl[28]=258,ci[258]=28;var _l=Ol(os,0),gm=_l[0],Eo=_l[1],hi=new ye(32768);for(var K=0;K<32768;++K){var Fe=(K&43690)>>>1|(K&21845)<<1;Fe=(Fe&52428)>>>2|(Fe&13107)<<2,Fe=(Fe&61680)>>>4|(Fe&3855)<<4,hi[K]=((Fe&65280)>>>8|(Fe&255)<<8)>>>1}var Oe=function(s,e,t){for(var r=s.length,i=0,o=new ye(e);i<r;++i)++o[s[i]-1];var n=new ye(e);for(i=0;i<e;++i)n[i]=n[i-1]+o[i-1]<<1;var a;if(t){a=new ye(1<<e);var l=15-e;for(i=0;i<r;++i)if(s[i])for(var u=i<<4|s[i],c=e-s[i],h=n[s[i]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[hi[h]>>>l]=u}else for(a=new ye(r),i=0;i<r;++i)a[i]=hi[n[s[i]-1]++]>>>15-s[i];return a},Ge=new pe(288);for(var K=0;K<144;++K)Ge[K]=8;for(var K=144;K<256;++K)Ge[K]=9;for(var K=256;K<280;++K)Ge[K]=7;for(var K=280;K<288;++K)Ge[K]=8;var jt=new pe(32);for(var K=0;K<32;++K)jt[K]=5;var ym=Oe(Ge,9,0),wm=Oe(Ge,9,1),vm=Oe(jt,5,0),bm=Oe(jt,5,1),xs=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},Se=function(s,e,t){var r=e/8>>0;return(s[r]|s[r+1]<<8)>>>(e&7)&t},Ms=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},on=function(s){return(s/8>>0)+(s&7&&1)},an=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var r=new(s instanceof ye?ye:s instanceof Gt?Gt:pe)(t-e);return r.set(s.subarray(e,t)),r},Sm=function(s,e,t){var r=s.length,i=!e||t,o=!t||t.i;t||(t={}),e||(e=new pe(r*3));var n=function(Ze){var Xe=e.length;if(Ze>Xe){var we=new pe(Math.max(Xe*2,Ze));we.set(e),e=we}},a=t.f||0,l=t.p||0,u=t.b||0,c=t.l,h=t.d,f=t.m,p=t.n,m=r*8;do{if(!c){t.f=a=Se(s,l,1);var y=Se(s,l+1,3);if(l+=3,y)if(y==1)c=wm,h=bm,f=9,p=5;else if(y==2){var b=Se(s,l,31)+257,E=Se(s,l+10,15)+4,N=b+Se(s,l+5,31)+1;l+=14;for(var S=new pe(N),x=new pe(19),C=0;C<E;++C)x[ui[C]]=Se(s,l+C*3,7);l+=E*3;var T=xs(x),$=(1<<T)-1;if(!o&&l+N*(T+7)>m)break;for(var oe=Oe(x,T,1),C=0;C<N;){var W=oe[Se(s,l,$)];l+=W&15;var d=W>>>4;if(d<16)S[C++]=d;else{var A=0,Y=0;for(d==16?(Y=3+Se(s,l,3),l+=2,A=S[C-1]):d==17?(Y=3+Se(s,l,7),l+=3):d==18&&(Y=11+Se(s,l,127),l+=7);Y--;)S[C++]=A}}var re=S.subarray(0,b),k=S.subarray(b);f=xs(re),p=xs(k),c=Oe(re,f,1),h=Oe(k,p,1)}else throw"invalid block type";else{var d=on(l)+4,g=s[d-4]|s[d-3]<<8,w=d+g;if(w>r){if(o)throw"unexpected EOF";break}i&&n(u+g),e.set(s.subarray(d,w),u),t.b=u+=g,t.p=l=w*8;continue}if(l>m)throw"unexpected EOF"}i&&n(u+131072);for(var O=(1<<f)-1,H=(1<<p)-1,q=f+p+18;o||l+q<m;){var A=c[Ms(s,l)&O],ue=A>>>4;if(l+=A&15,l>m)throw"unexpected EOF";if(!A)throw"invalid length/literal";if(ue<256)e[u++]=ue;else if(ue==256){c=null;break}else{var he=ue-254;if(ue>264){var C=ue-257,me=ns[C];he=Se(s,l,(1<<me)-1)+Tl[C],l+=me}var ve=h[Ms(s,l)&H],ae=ve>>>4;if(!ve)throw"invalid distance";l+=ve&15;var k=gm[ae];if(ae>3){var me=os[ae];k+=Ms(s,l)&(1<<me)-1,l+=me}if(l>m)throw"unexpected EOF";i&&n(u+131072);for(var le=u+he;u<le;u+=4)e[u]=e[u-k],e[u+1]=e[u+1-k],e[u+2]=e[u+2-k],e[u+3]=e[u+3-k];u=le}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=p)}while(!a);return u==e.length?e:an(e,0,u)},Te=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8},Mt=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8,s[r+2]|=t>>>16},Is=function(s,e){for(var t=[],r=0;r<s.length;++r)s[r]&&t.push({s:r,f:s[r]});var i=t.length,o=t.slice();if(!i)return[new pe(0),0];if(i==1){var n=new pe(t[0].s+1);return n[t[0].s]=1,[n,1]}t.sort(function(N,S){return N.f-S.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=t[t[u].f<t[h].f?u++:h++],l=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=o[0].s,r=1;r<i;++r)o[r].s>f&&(f=o[r].s);var p=new ye(f+1),m=fi(t[c-1],p,0);if(m>e){var r=0,y=0,d=m-e,g=1<<d;for(o.sort(function(S,x){return p[x.s]-p[S.s]||S.f-x.f});r<i;++r){var w=o[r].s;if(p[w]>e)y+=g-(1<<m-p[w]),p[w]=e;else break}for(y>>>=d;y>0;){var b=o[r].s;p[b]<e?y-=1<<e-p[b]++-1:++r}for(;r>=0&&y;--r){var E=o[r].s;p[E]==e&&(--p[E],++y)}m=e}return[new pe(p),m]},fi=function(s,e,t){return s.s==-1?Math.max(fi(s.l,e,t+1),fi(s.r,e,t+1)):e[s.s]=t},xo=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new ye(++e),r=0,i=s[0],o=1,n=function(l){t[r++]=l},a=1;a<=e;++a)if(s[a]==i&&a!=e)++o;else{if(!i&&o>2){for(;o>138;o-=138)n(32754);o>2&&(n(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(n(i),--o;o>6;o-=6)n(8304);o>2&&(n(o-3<<5|8208),o=0)}for(;o--;)n(i);o=1,i=s[a]}return[t.subarray(0,r),e]},It=function(s,e){for(var t=0,r=0;r<e.length;++r)t+=s[r]*e[r];return t},di=function(s,e,t){var r=t.length,i=on(e+2);s[i]=r&255,s[i+1]=r>>>8,s[i+2]=s[i]^255,s[i+3]=s[i+1]^255;for(var o=0;o<r;++o)s[i+o+4]=t[o];return(i+4+r)*8},Mo=function(s,e,t,r,i,o,n,a,l,u,c){Te(e,c++,t),++i[256];for(var h=Is(i,15),f=h[0],p=h[1],m=Is(o,15),y=m[0],d=m[1],g=xo(f),w=g[0],b=g[1],E=xo(y),N=E[0],S=E[1],x=new ye(19),C=0;C<w.length;++C)x[w[C]&31]++;for(var C=0;C<N.length;++C)x[N[C]&31]++;for(var T=Is(x,7),$=T[0],oe=T[1],W=19;W>4&&!$[ui[W-1]];--W);var A=u+5<<3,Y=It(i,Ge)+It(o,jt)+n,re=It(i,f)+It(o,y)+n+14+3*W+It(x,$)+(2*x[16]+3*x[17]+7*x[18]);if(A<=Y&&A<=re)return di(e,c,s.subarray(l,l+u));var k,O,H,q;if(Te(e,c,1+(re<Y)),c+=2,re<Y){k=Oe(f,p,0),O=f,H=Oe(y,d,0),q=y;var ue=Oe($,oe,0);Te(e,c,b-257),Te(e,c+5,S-1),Te(e,c+10,W-4),c+=14;for(var C=0;C<W;++C)Te(e,c+3*C,$[ui[C]]);c+=3*W;for(var he=[w,N],me=0;me<2;++me)for(var ve=he[me],C=0;C<ve.length;++C){var ae=ve[C]&31;Te(e,c,ue[ae]),c+=$[ae],ae>15&&(Te(e,c,ve[C]>>>5&127),c+=ve[C]>>>12)}}else k=ym,O=Ge,H=vm,q=jt;for(var C=0;C<a;++C)if(r[C]>255){var ae=r[C]>>>18&31;Mt(e,c,k[ae+257]),c+=O[ae+257],ae>7&&(Te(e,c,r[C]>>>23&31),c+=ns[ae]);var le=r[C]&31;Mt(e,c,H[le]),c+=q[le],le>3&&(Mt(e,c,r[C]>>>5&8191),c+=os[le])}else Mt(e,c,k[r[C]]),c+=O[r[C]];return Mt(e,c,k[256]),c+O[256]},Cm=new Gt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Em=function(s,e,t,r,i,o){var n=s.length,a=new pe(r+n+5*(1+Math.floor(n/7e3))+i),l=a.subarray(r,a.length-i),u=0;if(!e||n<8)for(var c=0;c<=n;c+=65535){var h=c+65535;h<n?u=di(l,u,s.subarray(c,h)):(l[c]=o,u=di(l,u,s.subarray(c,n)))}else{for(var f=Cm[e-1],p=f>>>13,m=f&8191,y=(1<<t)-1,d=new ye(32768),g=new ye(y+1),w=Math.ceil(t/3),b=2*w,E=function(ge){return(s[ge]^s[ge+1]<<w^s[ge+2]<<b)&y},N=new Gt(25e3),S=new ye(288),x=new ye(32),C=0,T=0,c=0,$=0,oe=0,W=0;c<n;++c){var A=E(c),Y=c&32767,re=g[A];if(d[Y]=re,g[A]=Y,oe<=c){var k=n-c;if((C>7e3||$>24576)&&k>423){u=Mo(s,l,0,N,S,x,T,$,W,c-W,u),$=C=T=0,W=c;for(var O=0;O<286;++O)S[O]=0;for(var O=0;O<30;++O)x[O]=0}var H=2,q=0,ue=m,he=Y-re&32767;if(k>2&&A==E(c-he))for(var me=Math.min(p,k)-1,ve=Math.min(32767,c),ae=Math.min(258,k);he<=ve&&--ue&&Y!=re;){if(s[c+H]==s[c+H-he]){for(var le=0;le<ae&&s[c+le]==s[c+le-he];++le);if(le>H){if(H=le,q=he,le>me)break;for(var Ze=Math.min(he,le-2),Xe=0,O=0;O<Ze;++O){var we=c-he+O+32768&32767,De=d[we],rt=we-De+32768&32767;rt>Xe&&(Xe=rt,re=we)}}}Y=re,re=d[Y],he+=Y-re+32768&32767}if(q){N[$++]=268435456|ci[H]<<18|Eo[q];var Je=ci[H]&31,Qt=Eo[q]&31;T+=ns[Je]+os[Qt],++S[257+Je],++x[Qt],oe=c+H,++C}else N[$++]=s[c],++S[s[c]]}}u=Mo(s,l,o,N,S,x,T,$,W,c-W,u)}return an(a,0,r+on(u)+i)},xm=function(){var s=1,e=0;return{p:function(t){for(var r=s,i=e,o=t.length,n=0;n!=o;){for(var a=Math.min(n+5552,o);n<a;++n)r+=t[n],i+=r;r%=65521,i%=65521}s=r,e=i},d:function(){return(s>>>8<<16|(e&255)<<8|e>>>8)+((s&255)<<23)*2}}},Mm=function(s,e,t,r,i){return Em(s,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(s.length)))*1.5):12+e.mem,t,r,!i)},Im=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},Nm=function(s,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;s[0]=120,s[1]=r<<6|(r?32-2*r:1)},Rm=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Am(s,e){e===void 0&&(e={});var t=xm();t.p(s);var r=Mm(s,e,2,4);return Nm(r,e),Im(r,r.length-4,t.d()),r}function Om(s,e){return Sm((Rm(s),s.subarray(2,-4)),e)}function kl(s,e){var t=s.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(s);for(var r=new pe(s.length+(s.length>>>1)),i=0,o=function(u){r[i++]=u},n=0;n<t;++n){if(i+5>r.length){var a=new pe(i+8+(t-n<<1));a.set(r),r=a}var l=s.charCodeAt(n);l<128||e?o(l):l<2048?(o(192|l>>>6),o(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|s.charCodeAt(++n)&1023,o(240|l>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|l&63)):(o(224|l>>>12),o(128|l>>>6&63),o(128|l&63))}return an(r,0,i)}function $l(s,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(s);for(var r=0;r<s.length;){var i=s[r++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|s[r++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(s[r++]&63)<<6|s[r++]&63):(i=((i&15)<<18|(s[r++]&63)<<12|(s[r++]&63)<<6|s[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const pi="v1",Dm=s=>{const e=ne(D({},s),{v:pi});return $l(Am(kl(JSON.stringify(e))),!0)},Tm=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse($l(Om(kl(s,!0))));if(e.v===pi)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${pi}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=R;exports.IncrementalSource=M;exports.MouseInteractions=U;exports.Replayer=fm;exports.ReplayerEvents=B;exports.addCustomEvent=dm;exports.canvasMutation=li;exports.freezePage=pm;exports.pack=Dm;exports.record=Ye;exports.takeFullSnapshot=mm;exports.unpack=Tm;exports.utils=gp;
80
+ ***************************************************************************** */function po(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var ft;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(ft||(ft={}));var xl={type:"xstate.init"};function Ss(s){return s===void 0?[]:[].concat(s)}function at(s){return{type:"xstate.assign",assignment:s}}function mo(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 jr(s){return function(e){return s===e}}function Il(s){return typeof s=="string"?{type:s}:s}function go(s,e){return{value:s,context:e,actions:[],changed:!1,matches:jr(s)}}function yo(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](r,t):n.assignment[a]}),r=o,!1}return!0}),r,i]}function Ml(s,e){e===void 0&&(e={});var t=po(yo(Ss(s.states[s.initial].entry).map(function(o){return mo(o,e.actions)}),s.context,xl),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:jr(s.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,p=Il(a),m=s.states[h];if(m.on){var y=Ss(m.on[p.type]);try{for(var d=function(O){var H=typeof Symbol=="function"&&Symbol.iterator,ee=H&&O[H],ue=0;if(ee)return ee.call(O);if(O&&typeof O.length=="number")return{next:function(){return O&&ue>=O.length&&(O=void 0),{value:O&&O[ue++],done:!O}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var w=g.value;if(w===void 0)return go(h,f);var v=typeof w=="string"?{target:w}:w,E=v.target,N=v.actions,S=N===void 0?[]:N,I=v.cond,C=I===void 0?function(){return!0}:I,T=E===void 0,$=E!=null?E:h,oe=s.states[$];if(C(f,p)){var z=po(yo((T?Ss(S):[].concat(m.exit,S,oe.entry).filter(function(O){return O})).map(function(O){return mo(O,n._options.actions)}),f,p),3),A=z[0],Y=z[1],ie=z[2],k=E!=null?E:h;return{value:k,context:Y,actions:A,changed:E!==h||A.length>0||ie,matches:jr(k)}}}}catch(O){l={error:O}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return go(h,f)}};return n}var wo=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function Nl(s){var e=s.initialState,t=ft.NotStarted,r=new Set,i={_machine:s,send:function(n){t===ft.Running&&(e=s.transition(e,n),wo(e,Il(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:jr(o.value)}}return t=ft.Running,wo(e,xl),i},stop:function(){return t=ft.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Qp(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===R.Meta&&r.timestamp<=e)return s.slice(t)}return s}function qp(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=Ml({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:at({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:at((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),ne(D({},n),{timeOffset:a,baselineTime:n.events[0].timestamp+a})}),play(n){var o;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(const m of l)fo(m,u);const h=Qp(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===R.IncrementalSnapshot&&c.data.source===x.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(U.PlayBack);const p=new Array;for(const m of h)if(!(f&&f<u&&(m.timestamp<=f||m===c)))if(m.timestamp<u)p.push(m);else{const y=e(m,!1);a.addAction({doAction:()=>{y()},delay:m.delay})}t(p),r.emit(U.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:at(n=>ne(D({},n),{lastPlayedEvent:null})),startLive:at({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:at((n,o)=>{const{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){const{event:c}=o.payload;fo(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let m=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);u[d].timestamp<=c.timestamp?y=d+1:h=d-1}m===-1&&(m=y),u.splice(m,0,c)}const f=c.timestamp<a,p=e(c,f);f?p():l.isActive()&&l.addAction({doAction:()=>{p()},delay:c.delay})}return ne(D({},n),{events:u})})}});return Nl(i)}function em(s){const e=Ml({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:at({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Nl(e)}const tm=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],bo=new Map;function Rl(s,e){let t=bo.get(s);return t||(t=new Map,bo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function ze(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 ze(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:n}=r;return Rl(e,i)[n]}else if("args"in r){const{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(ze(s,e,t))))}else{if("base64"in r)return Bp(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(ze(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(ze(s,e,t)));return r}}function rm(s,e){try{return e===Le.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const sm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function im(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!sm.includes(t))return;const r=Rl(s,t);r.includes(e)||r.push(e)}async function nm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const n=rm(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}const o=n[s.property],a=await Promise.all(s.args.map(ze(r,n))),l=o.apply(n,a);im(n,l);const u=!1}catch(n){i(s,n)}}async function om({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async l=>Promise.all(l.args.map(ze(r,n))));(await Promise.all(o)).forEach((l,u)=>{const c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}const h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(n,c.args)):h.apply(n,l)}catch(h){i(c,h)}})}async function ai({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{const o=i.get(s)||e,a="commands"in o?o.commands:[o];if([Le.WebGL,Le.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await nm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await om({event:s,mutations:a,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}class am{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(U.Start,this.start.bind(this)),this.emitter.on(U.SkipStart,this.start.bind(this)),this.emitter.on(U.Pause,this.pause.bind(this)),this.emitter.on(U.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 n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),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 p,m,y,d,g;const i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:n===Ue.Play||n!==Ue.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(p=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?p:0,lastInteractionTimeOffset:t,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m: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:(g=c!=null?c:i==null?void 0:i.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:n,isPlaying:o}=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!==n&&(e.volume=n),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),o&&!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,n=r.getMeta(i);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),a=n.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&o&&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 p=0;typeof a.rr_mediaCurrentTime=="number"&&(p=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:p,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 Cr(s,e){if(s.nodeName!=="DIALOG"||s instanceof Ie)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(a?t.showModal():t.show())}}function lm(s,e){if(s.nodeName!=="DIALOG"||s instanceof Ie)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 um=5*1e3,cm=El||Xp,vo="[replayer]",Cs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function So(s){return s.type==R.IncrementalSnapshot&&(s.data.source==x.TouchMove||s.data.source==x.MouseInteraction&&s.data.type==W.TouchStart)}class hm{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 vt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",cm()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",$n()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",Ao()),b(this,"styleMirror",new tn),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 R.DomContentLoaded:case R.Load:case R.Custom:continue;case R.FullSnapshot:case R.Meta:case R.Plugin:case R.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case R.DomContentLoaded:case R.Load:break;case R.Custom:u=()=>{this.emitter.emit(U.CustomEvent,a)};break;case R.Meta:u=()=>this.emitter.emit(U.Resize,{width:a.data.width,height:a.data.height});break;case R.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 R.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/um),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(U.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(U.Finish))};let p=50;a.type===R.IncrementalSnapshot&&a.data.source===x.MouseMove&&a.data.positions.length&&(p+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,p)}this.emitter.emit(U.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:Cs,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(U.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(U.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{ai({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===x.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===x.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{Ur(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=Wr(u.node,this.mirror,this.virtualDom.mirror);Ur(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(U.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Kp([],{speed:this.config.speed});this.service=qp({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(U.StateChange,{player:a})}),this.speedService=em({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(U.StateChange,{speed:a})}),this.mediaManager=new am({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(a=>a.type===R.Meta),o=this.service.state.context.events.find(a=>a.type===R.FullSnapshot);if(n){const{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(U.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.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(U.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(U.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(U.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(U.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=$n()}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&&(Jp(this.iframe.contentWindow,this.iframe.contentDocument),Ki(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,n=(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(),$h(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(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:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),i.forEach(l=>Cr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(U.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=tm(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 n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,al(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:x.StyleSheetRule,adds:i.map((o,a)=>({rule:o,index:a}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(i,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===ke.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})};Tt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(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);n.forEach(a=>Cr(a))}collectIframeAndAttachDocument(e,t){if(dt(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,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(U.Start,o),this.emitter.on(U.Pause,o);const a=()=>{this.emitter.off(U.Start,o),this.emitter.off(U.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(U.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(U.LoadStylesheetStart),i=setTimeout(()=>{n.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===R.IncrementalSnapshot&&t.data.source===x.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"),n=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(n,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 n=>{const o=await Promise.all(n.args.map(ze(this.imageMap,null,r)));return ne(D({},n),{args:o})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ne(D({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(ze(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ne(D({},e),{args:i}))}}}applyIncremental(e,t){var r,i,n;const{data:o}=e;switch(o.source){case x.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case x.Drag:case x.TouchMove:case x.MouseMove:if(t){const a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case x.MouseInteraction:{if(o.id===-1)break;const a=new Event(Ve(W[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(U.MouseInteraction,{type:o.type,target:l});const{triggerFocus:u}=this.config;switch(o.type){case W.Blur:"blur"in l&&l.blur();break;case W.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case W.Click:case W.TouchStart:case W.TouchEnd:case W.MouseDown:case W.MouseUp:t?(o.type===W.TouchStart?this.touchActive=!0:o.type===W.TouchEnd&&(this.touchActive=!1),o.type===W.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===W.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===W.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===W.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===W.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===W.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case W.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case x.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case x.ViewportResize:this.emitter.emit(U.Resize,{width:o.width,height:o.height});break;case x.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case x.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case x.StyleSheetRule:case x.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case x.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{const a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);ai({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case x.Font:{try{const a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case x.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case x.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,ep(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=ol(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&&We(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(p){if(p instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw p}});const i=D({},this.legacy_missingNodeRetryMap),n=[],o=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===ke.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(We(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let p=null,m=null;if(u.previousId&&(p=r.getNode(u.previousId)),u.nextId&&(m=r.getNode(u.nextId)),o(u))return n.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(dt(f,r)){this.attachDocumentToIframe(u,f);return}const d=(v,E)=>{if(!this.usingVirtualDom){Cr(v);for(const N of this.config.plugins||[])N.onBuild&&N.onBuild(v,{id:E,replayer:this})}},g=Tt(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:g,mutation:u};return}const w=r.getMeta(f);if(w&&w.type===ke.Element&&u.node.type===ke.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const E of v)E.nodeType===f.TEXT_NODE&&f.removeChild(E);else if(w.tagName==="style"&&v.length===1)for(const E of v)E.nodeType===f.TEXT_NODE&&!r.hasNode(E)&&(g.textContent=E.textContent,f.removeChild(E))}else if((w==null?void 0:w.type)===ke.Document){const v=f;u.node.type===ke.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),g.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(p&&p.nextSibling&&p.nextSibling.parentNode?f.insertBefore(g,p.nextSibling):m&&m.parentNode?f.contains(m)?f.insertBefore(g,m):f.insertBefore(g,null):f.appendChild(g),d(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),dt(g,this.mirror)){const v=this.mirror.getId(g),E=this.newDocumentQueue.find(N=>N.parentId===v);E&&(this.attachDocumentToIframe(E,g),this.newDocumentQueue=this.newDocumentQueue.filter(N=>N!==E))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,g,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;n.length;){const u=hl(n);if(n.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)?Qi(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),fl(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(p=>p.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Kr(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const p=h.parentNode;((c=p==null?void 0:p.rules)==null?void 0:c.length)>0&&(p.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 p=u.attributes[f];if(p===null)h.removeAttribute(f),f==="open"&&lm(h,u);else if(typeof p=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=r.getMeta(h),y=Tt(ne(D({},m),{attributes:D(D({},m.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,u.attributes);const d=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,d),r.replace(u.id,y);break}}catch(m){}if(f==="value"&&h.nodeName==="TEXTAREA"){const m=h;m.childNodes.forEach(d=>m.removeChild(d));const y=(c=h.ownerDocument)==null?void 0:c.createTextNode(p);y&&m.appendChild(y)}else h.setAttribute(f,p);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Cr(h,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(f==="style"){const m=p,y=h;for(const d in m)if(m[d]===!1)y.style.removeProperty(d);else if(m[d]instanceof Array){const g=m[d];y.style.setProperty(d,g[0],g[1])}else{const g=m[d];y.style.setProperty(d,g)}}}})}applyScroll(e,t){var r,i;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===ke.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.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:n,end:o,endOffset:a})=>{const l=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!l||!u)return;const c=new Range;c.setStart(l,n),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 n;return i&&((n=i.selection)==null?void 0:n.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===x.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===x.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=ni(l);ct(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}=ni(a);ct(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&ct(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ct(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(We(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:x.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let n=0;const o=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);We(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<i&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:n,nextId:o}=i,a=n&&e[n],l=o&&e[o];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,n){const o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);const a=en(o,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(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?Cs:Object.assign({},Cs,this.config.mouseTail),o=()=>{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),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/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!==R.IncrementalSnapshot?!1:e.data.source>x.Mutation&&e.data.source<=x.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(U.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(vo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(vo,...e)}}const{addCustomEvent:fm}=Ye,{freezePage:dm}=Ye,{takeFullSnapshot:pm}=Ye;var pe=Uint8Array,ge=Uint16Array,Gt=Uint32Array,ns=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),os=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),li=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Al=function(s,e){for(var t=new ge(31),r=0;r<31;++r)t[r]=e+=1<<s[r-1];for(var i=new Gt(t[30]),r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)i[n]=n-t[r]<<5|r;return[t,i]},Ol=Al(ns,2),Dl=Ol[0],ui=Ol[1];Dl[28]=258,ui[258]=28;var Tl=Al(os,0),mm=Tl[0],Co=Tl[1],ci=new ge(32768);for(var Q=0;Q<32768;++Q){var Fe=(Q&43690)>>>1|(Q&21845)<<1;Fe=(Fe&52428)>>>2|(Fe&13107)<<2,Fe=(Fe&61680)>>>4|(Fe&3855)<<4,ci[Q]=((Fe&65280)>>>8|(Fe&255)<<8)>>>1}var Oe=function(s,e,t){for(var r=s.length,i=0,n=new ge(e);i<r;++i)++n[s[i]-1];var o=new ge(e);for(i=0;i<e;++i)o[i]=o[i-1]+n[i-1]<<1;var a;if(t){a=new ge(1<<e);var l=15-e;for(i=0;i<r;++i)if(s[i])for(var u=i<<4|s[i],c=e-s[i],h=o[s[i]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[ci[h]>>>l]=u}else for(a=new ge(r),i=0;i<r;++i)a[i]=ci[o[s[i]-1]++]>>>15-s[i];return a},Ge=new pe(288);for(var Q=0;Q<144;++Q)Ge[Q]=8;for(var Q=144;Q<256;++Q)Ge[Q]=9;for(var Q=256;Q<280;++Q)Ge[Q]=7;for(var Q=280;Q<288;++Q)Ge[Q]=8;var jt=new pe(32);for(var Q=0;Q<32;++Q)jt[Q]=5;var gm=Oe(Ge,9,0),ym=Oe(Ge,9,1),wm=Oe(jt,5,0),bm=Oe(jt,5,1),Es=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},Se=function(s,e,t){var r=e/8>>0;return(s[r]|s[r+1]<<8)>>>(e&7)&t},xs=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},nn=function(s){return(s/8>>0)+(s&7&&1)},on=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var r=new(s instanceof ge?ge:s instanceof Gt?Gt:pe)(t-e);return r.set(s.subarray(e,t)),r},vm=function(s,e,t){var r=s.length,i=!e||t,n=!t||t.i;t||(t={}),e||(e=new pe(r*3));var o=function(Ze){var Xe=e.length;if(Ze>Xe){var ye=new pe(Math.max(Xe*2,Ze));ye.set(e),e=ye}},a=t.f||0,l=t.p||0,u=t.b||0,c=t.l,h=t.d,f=t.m,p=t.n,m=r*8;do{if(!c){t.f=a=Se(s,l,1);var y=Se(s,l+1,3);if(l+=3,y)if(y==1)c=ym,h=bm,f=9,p=5;else if(y==2){var v=Se(s,l,31)+257,E=Se(s,l+10,15)+4,N=v+Se(s,l+5,31)+1;l+=14;for(var S=new pe(N),I=new pe(19),C=0;C<E;++C)I[li[C]]=Se(s,l+C*3,7);l+=E*3;var T=Es(I),$=(1<<T)-1;if(!n&&l+N*(T+7)>m)break;for(var oe=Oe(I,T,1),C=0;C<N;){var z=oe[Se(s,l,$)];l+=z&15;var d=z>>>4;if(d<16)S[C++]=d;else{var A=0,Y=0;for(d==16?(Y=3+Se(s,l,3),l+=2,A=S[C-1]):d==17?(Y=3+Se(s,l,7),l+=3):d==18&&(Y=11+Se(s,l,127),l+=7);Y--;)S[C++]=A}}var ie=S.subarray(0,v),k=S.subarray(v);f=Es(ie),p=Es(k),c=Oe(ie,f,1),h=Oe(k,p,1)}else throw"invalid block type";else{var d=nn(l)+4,g=s[d-4]|s[d-3]<<8,w=d+g;if(w>r){if(n)throw"unexpected EOF";break}i&&o(u+g),e.set(s.subarray(d,w),u),t.b=u+=g,t.p=l=w*8;continue}if(l>m)throw"unexpected EOF"}i&&o(u+131072);for(var O=(1<<f)-1,H=(1<<p)-1,ee=f+p+18;n||l+ee<m;){var A=c[xs(s,l)&O],ue=A>>>4;if(l+=A&15,l>m)throw"unexpected EOF";if(!A)throw"invalid length/literal";if(ue<256)e[u++]=ue;else if(ue==256){c=null;break}else{var he=ue-254;if(ue>264){var C=ue-257,me=ns[C];he=Se(s,l,(1<<me)-1)+Dl[C],l+=me}var we=h[xs(s,l)&H],ae=we>>>4;if(!we)throw"invalid distance";l+=we&15;var k=mm[ae];if(ae>3){var me=os[ae];k+=xs(s,l)&(1<<me)-1,l+=me}if(l>m)throw"unexpected EOF";i&&o(u+131072);for(var le=u+he;u<le;u+=4)e[u]=e[u-k],e[u+1]=e[u+1-k],e[u+2]=e[u+2-k],e[u+3]=e[u+3-k];u=le}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=p)}while(!a);return u==e.length?e:on(e,0,u)},Te=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8},Mt=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8,s[r+2]|=t>>>16},Is=function(s,e){for(var t=[],r=0;r<s.length;++r)s[r]&&t.push({s:r,f:s[r]});var i=t.length,n=t.slice();if(!i)return[new pe(0),0];if(i==1){var o=new pe(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(N,S){return N.f-S.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=t[t[u].f<t[h].f?u++:h++],l=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=n[0].s,r=1;r<i;++r)n[r].s>f&&(f=n[r].s);var p=new ge(f+1),m=hi(t[c-1],p,0);if(m>e){var r=0,y=0,d=m-e,g=1<<d;for(n.sort(function(S,I){return p[I.s]-p[S.s]||S.f-I.f});r<i;++r){var w=n[r].s;if(p[w]>e)y+=g-(1<<m-p[w]),p[w]=e;else break}for(y>>>=d;y>0;){var v=n[r].s;p[v]<e?y-=1<<e-p[v]++-1:++r}for(;r>=0&&y;--r){var E=n[r].s;p[E]==e&&(--p[E],++y)}m=e}return[new pe(p),m]},hi=function(s,e,t){return s.s==-1?Math.max(hi(s.l,e,t+1),hi(s.r,e,t+1)):e[s.s]=t},Eo=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new ge(++e),r=0,i=s[0],n=1,o=function(l){t[r++]=l},a=1;a<=e;++a)if(s[a]==i&&a!=e)++n;else{if(!i&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(i),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(i);n=1,i=s[a]}return[t.subarray(0,r),e]},Nt=function(s,e){for(var t=0,r=0;r<e.length;++r)t+=s[r]*e[r];return t},fi=function(s,e,t){var r=t.length,i=nn(e+2);s[i]=r&255,s[i+1]=r>>>8,s[i+2]=s[i]^255,s[i+3]=s[i+1]^255;for(var n=0;n<r;++n)s[i+n+4]=t[n];return(i+4+r)*8},xo=function(s,e,t,r,i,n,o,a,l,u,c){Te(e,c++,t),++i[256];for(var h=Is(i,15),f=h[0],p=h[1],m=Is(n,15),y=m[0],d=m[1],g=Eo(f),w=g[0],v=g[1],E=Eo(y),N=E[0],S=E[1],I=new ge(19),C=0;C<w.length;++C)I[w[C]&31]++;for(var C=0;C<N.length;++C)I[N[C]&31]++;for(var T=Is(I,7),$=T[0],oe=T[1],z=19;z>4&&!$[li[z-1]];--z);var A=u+5<<3,Y=Nt(i,Ge)+Nt(n,jt)+o,ie=Nt(i,f)+Nt(n,y)+o+14+3*z+Nt(I,$)+(2*I[16]+3*I[17]+7*I[18]);if(A<=Y&&A<=ie)return fi(e,c,s.subarray(l,l+u));var k,O,H,ee;if(Te(e,c,1+(ie<Y)),c+=2,ie<Y){k=Oe(f,p,0),O=f,H=Oe(y,d,0),ee=y;var ue=Oe($,oe,0);Te(e,c,v-257),Te(e,c+5,S-1),Te(e,c+10,z-4),c+=14;for(var C=0;C<z;++C)Te(e,c+3*C,$[li[C]]);c+=3*z;for(var he=[w,N],me=0;me<2;++me)for(var we=he[me],C=0;C<we.length;++C){var ae=we[C]&31;Te(e,c,ue[ae]),c+=$[ae],ae>15&&(Te(e,c,we[C]>>>5&127),c+=we[C]>>>12)}}else k=gm,O=Ge,H=wm,ee=jt;for(var C=0;C<a;++C)if(r[C]>255){var ae=r[C]>>>18&31;Mt(e,c,k[ae+257]),c+=O[ae+257],ae>7&&(Te(e,c,r[C]>>>23&31),c+=ns[ae]);var le=r[C]&31;Mt(e,c,H[le]),c+=ee[le],le>3&&(Mt(e,c,r[C]>>>5&8191),c+=os[le])}else Mt(e,c,k[r[C]]),c+=O[r[C]];return Mt(e,c,k[256]),c+O[256]},Sm=new Gt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Cm=function(s,e,t,r,i,n){var o=s.length,a=new pe(r+o+5*(1+Math.floor(o/7e3))+i),l=a.subarray(r,a.length-i),u=0;if(!e||o<8)for(var c=0;c<=o;c+=65535){var h=c+65535;h<o?u=fi(l,u,s.subarray(c,h)):(l[c]=n,u=fi(l,u,s.subarray(c,o)))}else{for(var f=Sm[e-1],p=f>>>13,m=f&8191,y=(1<<t)-1,d=new ge(32768),g=new ge(y+1),w=Math.ceil(t/3),v=2*w,E=function(Z){return(s[Z]^s[Z+1]<<w^s[Z+2]<<v)&y},N=new Gt(25e3),S=new ge(288),I=new ge(32),C=0,T=0,c=0,$=0,oe=0,z=0;c<o;++c){var A=E(c),Y=c&32767,ie=g[A];if(d[Y]=ie,g[A]=Y,oe<=c){var k=o-c;if((C>7e3||$>24576)&&k>423){u=xo(s,l,0,N,S,I,T,$,z,c-z,u),$=C=T=0,z=c;for(var O=0;O<286;++O)S[O]=0;for(var O=0;O<30;++O)I[O]=0}var H=2,ee=0,ue=m,he=Y-ie&32767;if(k>2&&A==E(c-he))for(var me=Math.min(p,k)-1,we=Math.min(32767,c),ae=Math.min(258,k);he<=we&&--ue&&Y!=ie;){if(s[c+H]==s[c+H-he]){for(var le=0;le<ae&&s[c+le]==s[c+le-he];++le);if(le>H){if(H=le,ee=he,le>me)break;for(var Ze=Math.min(he,le-2),Xe=0,O=0;O<Ze;++O){var ye=c-he+O+32768&32767,De=d[ye],rt=ye-De+32768&32767;rt>Xe&&(Xe=rt,ie=ye)}}}Y=ie,ie=d[Y],he+=Y-ie+32768&32767}if(ee){N[$++]=268435456|ui[H]<<18|Co[ee];var Je=ui[H]&31,B=Co[ee]&31;T+=ns[Je]+os[B],++S[257+Je],++I[B],oe=c+H,++C}else N[$++]=s[c],++S[s[c]]}}u=xo(s,l,n,N,S,I,T,$,z,c-z,u)}return on(a,0,r+nn(u)+i)},Em=function(){var s=1,e=0;return{p:function(t){for(var r=s,i=e,n=t.length,o=0;o!=n;){for(var a=Math.min(o+5552,n);o<a;++o)r+=t[o],i+=r;r%=65521,i%=65521}s=r,e=i},d:function(){return(s>>>8<<16|(e&255)<<8|e>>>8)+((s&255)<<23)*2}}},xm=function(s,e,t,r,i){return Cm(s,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(s.length)))*1.5):12+e.mem,t,r,!i)},Im=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},Mm=function(s,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;s[0]=120,s[1]=r<<6|(r?32-2*r:1)},Nm=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Rm(s,e){e===void 0&&(e={});var t=Em();t.p(s);var r=xm(s,e,2,4);return Mm(r,e),Im(r,r.length-4,t.d()),r}function Am(s,e){return vm((Nm(s),s.subarray(2,-4)),e)}function _l(s,e){var t=s.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(s);for(var r=new pe(s.length+(s.length>>>1)),i=0,n=function(u){r[i++]=u},o=0;o<t;++o){if(i+5>r.length){var a=new pe(i+8+(t-o<<1));a.set(r),r=a}var l=s.charCodeAt(o);l<128||e?n(l):l<2048?(n(192|l>>>6),n(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|s.charCodeAt(++o)&1023,n(240|l>>>18),n(128|l>>>12&63),n(128|l>>>6&63),n(128|l&63)):(n(224|l>>>12),n(128|l>>>6&63),n(128|l&63))}return on(r,0,i)}function kl(s,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(s);for(var r=0;r<s.length;){var i=s[r++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|s[r++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(s[r++]&63)<<6|s[r++]&63):(i=((i&15)<<18|(s[r++]&63)<<12|(s[r++]&63)<<6|s[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const di="v1",Om=s=>{const e=ne(D({},s),{v:di});return kl(Rm(_l(JSON.stringify(e))),!0)},Dm=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(kl(Am(_l(s,!0))));if(e.v===di)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${di}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=R;exports.IncrementalSource=x;exports.MouseInteractions=W;exports.Replayer=hm;exports.ReplayerEvents=U;exports.addCustomEvent=fm;exports.canvasMutation=ai;exports.freezePage=dm;exports.pack=Om;exports.record=Ye;exports.takeFullSnapshot=pm;exports.unpack=Dm;exports.utils=mp;
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") {