@posthog/rrweb 0.0.26 → 0.0.28

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,64 +11,64 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var qo=Object.defineProperty,Vo=Object.defineProperties;var jo=Object.getOwnPropertyDescriptors;var ht=Object.getOwnPropertySymbols;var js=Object.prototype.hasOwnProperty,Gs=Object.prototype.propertyIsEnumerable;var Vs=(e,t,r)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))js.call(t,r)&&Vs(e,r,t[r]);if(ht)for(var r of ht(t))Gs.call(t,r)&&Vs(e,r,t[r]);return e},se=(e,t)=>Vo(e,jo(t));var Be=(e,t)=>{var r={};for(var s in e)js.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ht)for(var s of ht(e))t.indexOf(s)<0&&Gs.call(e,s)&&(r[s]=e[s]);return r};var Go=Object.defineProperty,Ho=(e,t,r)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>Ho(e,typeof t!="symbol"?t+"":t,r),Hs;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Yo=Object.defineProperty,Jo=(e,t,r)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ys=(e,t,r)=>Jo(e,typeof t!="symbol"?t+"":t,r),B=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(B||{});const Js={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};function Xo(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function as(e){if(ft[e])return ft[e];const t=Xo(e)||globalThis[e],r=t.prototype,s=e in Js?Js[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),a=e in Xs?Xs[e]:void 0,o=!!(a&&a.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?ft[e]=l:r}catch(u){return r}}const jt={};function Ae(e,t,r){var s;const i=`${e}.${String(r)}`;if(jt[i])return jt[i].call(t);const a=as(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(jt[i]=o,o.call(t)):t[r]}const Gt={};function Fn(e,t,r){const s=`${e}.${String(r)}`;if(Gt[s])return Gt[s].bind(t);const a=as(e)[r];return typeof a!="function"?t[r]:(Gt[s]=a,a.bind(t))}function Qo(e){return Ae("Node",e,"childNodes")}function Ko(e){return Ae("Node",e,"parentNode")}function Zo(e){return Ae("Node",e,"parentElement")}function ea(e){return Ae("Node",e,"textContent")}function ta(e,t){return Fn("Node",e,"contains")(t)}function ra(e){return Fn("Node",e,"getRootNode")()}function sa(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function ia(e){return e.styleSheets}function na(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function oa(e,t){return Ae("Element",e,"querySelector")(t)}function aa(e,t){return Ae("Element",e,"querySelectorAll")(t)}function la(){return as("MutationObserver").constructor}function ua(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const ne={childNodes:Qo,parentNode:Ko,parentElement:Zo,textContent:ea,contains:ta,getRootNode:ra,host:sa,styleSheets:ia,shadowRoot:na,querySelector:oa,querySelectorAll:aa,mutationObserver:la,patch:ua};function ls(e){return e.nodeType===e.ELEMENT_NODE}function Ze(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function et(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ca(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ha(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function xt(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const s=Array.from(t,i=>Bn(i,r)).join("");return ca(s)}catch(t){return null}}function Bn(e,t){var r;if(da(e)){let s;try{s=xt(e.styleSheet)||ha(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Mt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return pa(e)&&e.selectorText.includes(":")&&(s=fa(s)),t?Mt(s,t):s}}function fa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function da(e){return"styleSheet"in e}function pa(e){return"selectorText"in e}class us{constructor(){Ys(this,"idNodeMap",new Map),Ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Un(){return new us}function cs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let o=i||"";const u=s&&De(s);return(t[r.toLowerCase()]||u&&t[u])&&(a?o=a(o,e):o="*".repeat(o.length)),o}function De(e){return e.toLowerCase()}const Qs="__rrweb_original__";function ma(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const a=t.getImageData,o=Qs in a?a[Qs]:a;if(new Uint32Array(o.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}function ga(e,t){return!e||!t||e.type!==t.type?!1:e.type===B.Document?e.compatMode===t.compatMode:e.type===B.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===B.Comment||e.type===B.Text||e.type===B.CDATA?e.textContent===t.textContent:e.type===B.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function hs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?De(t):null}function fs(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}function ya(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ba=/^(?:[a-z+]+:)?\/\//i,va=/^www\..*/i,Sa=/^(data:)([^,]*),(.*)/i;function Mt(e,t){return(e||"").replace(wa,(r,s,i,a,o,u)=>{const f=i||o||u,l=s||a||"";if(!f)return r;if(ba.test(f)||va.test(f))return`url(${l}${f}${l})`;if(Sa.test(f))return`url(${l}${f}${l})`;if(f[0]==="/")return`url(${l}${ya(t)+f}${l})`;const n=t.split("/"),c=f.split("/");n.pop();for(const d of c)d!=="."&&(d===".."?n.pop():n.push(d));return`url(${l}${n.join("/")}${l})`})}let Ca=1;const Ea=new RegExp("[^a-z0-9-_:]"),st=-2;function $n(){return Ca++}function Ra(e){if(e instanceof HTMLFormElement)return"form";const t=De(e.tagName);return Ea.test(t)?"div":t}let Ue,Ks;const xa=/^[^ \t\n\r\u000c]+/,Ma=/^[, \t\n\r\u000c]+/;function Oa(e,t){if(t.trim()==="")return t;let r=0;function s(a){let o;const u=a.exec(t.substring(r));return u?(o=u[0],r+=o.length,o):""}const i=[];for(;s(Ma),!(r>=t.length);){let a=s(xa);if(a.slice(-1)===",")a=qe(e,a.substring(0,a.length-1)),i.push(a);else{let o="";a=qe(e,a);let u=!1;for(;;){const f=t.charAt(r);if(f===""){i.push((a+o).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){r+=1,i.push((a+o).trim());break}else f==="("&&(u=!0);o+=f,r+=1}}}return i.join(", ")}const Zs=new WeakMap;function qe(e,t){return!t||t.trim()===""?t:ds(e,t)}function Na(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ds(e,t){let r=Zs.get(e);if(r||(r=e.createElement("a"),Zs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Wn(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?qe(e,s):r==="srcset"?Oa(e,s):r==="style"?Mt(s,ds(e)):t==="object"&&r==="data"?qe(e,s):s)}function zn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ia(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Ot(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ot(ne.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Ot(ne.parentNode(e),t,r):!1}function qn(e,t,r,s){let i;if(ls(e)){if(i=e,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(e)===null)return!1;i=ne.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ot(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function Da(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(u){return}if(a!=="complete"){const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}const o="about:blank";if(s.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Aa(e,t,r){let s=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function Ta(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:l,maskInputFn:n,dataURLOptions:c={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=_a(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:B.Document,childNodes:[],compatMode:e.compatMode}:{type:B.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:B.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return La(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:u,maskInputOptions:f,maskInputFn:n,dataURLOptions:c,inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return Pa(e,{doc:r,needsMask:o,maskTextFn:l,rootId:g});case e.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:B.Comment,textContent:ne.textContent(e)||"",rootId:g};default:return!1}}function _a(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Pa(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:a}=t,o=ne.parentNode(e),u=o&&o.tagName;let f=ne.textContent(e);const l=u==="STYLE"?!0:void 0,n=u==="SCRIPT"?!0:void 0;if(l&&f){try{e.nextSibling||e.previousSibling||(r=o.sheet)!=null&&r.cssRules&&(f=xt(o.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}f=Mt(f,ds(t.doc))}return n&&(f="SCRIPT_PLACEHOLDER"),!l&&!n&&f&&s&&(f=i?i(f,ne.parentElement(e)):f.replace(/[\S]/g,"*")),{type:B.Text,textContent:f||"",isStyle:l,rootId:a}}function ei(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function ka(e){return e.href}function La(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:n,keepIframeSrcFn:c,newlyAddedElement:d=!1,rootId:h}=t,m=Ia(e,s,i),p=Ra(e);let g={};const b=e.attributes.length;for(let w=0;w<b;w++){const C=e.attributes[w];zn(p,C.name,C.value)||(g[C.name]=Wn(r,p,De(C.name),C.value))}if(p==="link"&&a){const w=ka(e);if(w){let C=ei(r,w);if(!C&&w.includes(".css")){const S=window.location.origin,E=w.replace(window.location.href,""),R=S+"/"+E;C=ei(r,R)}let v=null;C&&(v=xt(C)),v&&(delete g.rel,delete g.href,g._cssText=v)}}if(p==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const w=xt(e.sheet);w&&(g._cssText=w)}if(p==="input"||p==="textarea"||p==="select"){const w=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=cs({element:e,type:hs(e),tagName:p,value:w,maskInputOptions:o,maskInputFn:u}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!o.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&n){if(e.__context==="2d")ma(e)||(g.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const w=e.toDataURL(f.type,f.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const v=C.toDataURL(f.type,f.quality);w!==v&&(g.rr_dataURL=w)}}if(p==="img"&&l){Ue||(Ue=r.createElement("canvas"),Ks=Ue.getContext("2d"));const w=e,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",v=w.crossOrigin,S=()=>{w.removeEventListener("load",S);try{Ue.width=w.naturalWidth,Ue.height=w.naturalHeight,Ks.drawImage(w,0,0),g.rr_dataURL=Ue.toDataURL(f.type,f.quality)}catch(E){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}w.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S)}if(p==="audio"||p==="video"){const w=g;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:w,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!c(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(w){}return{type:B.Element,tagName:p,attributes:g,childNodes:[],isSVG:Na(e)||void 0,needBlock:m,rootId:h,isCustom:y}}function H(e){return e==null?"":e.toLowerCase()}function Fa(e,t){if(t.comment&&e.type===B.Comment)return!0;if(e.type===B.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||H(e.attributes.name)==="application-name"||H(e.attributes.rel)==="icon"||H(e.attributes.rel)==="apple-touch-icon"||H(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||H(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(H(e.attributes.name)==="robots"||H(e.attributes.name)==="googlebot"||H(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(H(e.attributes.name)==="author"||H(e.attributes.name)==="generator"||H(e.attributes.name)==="framework"||H(e.attributes.name)==="publisher"||H(e.attributes.name)==="progid"||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(H(e.attributes.name)==="google-site-verification"||H(e.attributes.name)==="yandex-verification"||H(e.attributes.name)==="csrf-token"||H(e.attributes.name)==="p:domain_verify"||H(e.attributes.name)==="verify-v1"||H(e.attributes.name)==="verification"||H(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:l=!0,maskInputOptions:n={},maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=qn(e,o,u,R===void 0));const O=Ta(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E});if(!O)return console.warn(e,"not serialized"),null;let F;s.hasNode(e)?F=s.getId(e):Fa(O,h)||!I&&O.type===B.Text&&!O.isStyle&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?F=st:F=$n();const D=Object.assign(O,{id:F});if(s.add(e,D),F===st)return null;b&&b(e);let re=!f;if(D.type===B.Element){re=re&&!D.needBlock,delete D.needBlock;const x=ne.shadowRoot(e);x&&et(x)&&(D.isShadowHost=!0)}if((D.type===B.Document||D.type===B.Element)&&re){h.headWhitespace&&D.type===B.Element&&D.tagName==="head"&&(I=!1);const x={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:u,skipChild:f,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S};if(!(D.type===B.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(ne.childNodes(e))){const V=Ve(P,x);V&&D.childNodes.push(V)}let Z=null;if(ls(e)&&(Z=ne.shadowRoot(e)))for(const P of Array.from(ne.childNodes(Z))){const V=Ve(P,x);V&&(et(Z)&&(V.isShadow=!0),D.childNodes.push(V))}}const ie=ne.parentNode(e);return ie&&Ze(ie)&&et(ie)&&(D.isShadow=!0),D.type===B.Element&&D.tagName==="iframe"&&Da(e,()=>{const x=e.contentDocument;if(x&&y){const Z=Ve(x,{doc:x,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});Z&&y(e,Z)}},w),D.type===B.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&fs(D.attributes.href)==="css")&&Aa(e,()=>{if(C){const x=Ve(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});x&&C(e,x)}},v),D}function Ba(e,t){const{mirror:r=new us,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:o=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:l=!1,maskAllInputs:n=!1,maskTextFn:c,maskInputFn:d,slimDOM:h=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v=()=>!1}=t||{};return Ve(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:u,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:m,inlineImages:f,recordCanvas:l,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v,newlyAddedElement:!1})}const Ua=/(max|min)-device-(width|height)/,ti=new RegExp(Ua.source,"g"),$a={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ti)&&(e.params=e.params.replace(ti,"$1-$2"))}}}},Wa={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
15
- `+r.replace(/:hover/g,".\\:hover"))}))}}}};function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function za(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var dt={exports:{}},ri;function qa(){if(ri)return dt.exports;ri=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return dt.exports=t(),dt.exports.createColors=t,dt.exports}const Va={},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),de=za(ja);var Ht,si;function ps(){if(si)return Ht;si=1;let e=qa(),t=de;class r extends Error{constructor(i,a,o,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),o=g=>m(g),t&&(f=g=>t(g))}let l=a.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(w,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+o(g)+f(v)+`
16
- `+S+u("^")}let b=o(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+o(g)+f(h)+`
17
- `+b+u("^")}return" "+o(g)+f(h)}).join(`
14
+ "use strict";var Vo=Object.defineProperty,jo=Object.defineProperties;var Go=Object.getOwnPropertyDescriptors;var ft=Object.getOwnPropertySymbols;var Gs=Object.prototype.hasOwnProperty,Hs=Object.prototype.propertyIsEnumerable;var js=(e,t,r)=>t in e?Vo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))Gs.call(t,r)&&js(e,r,t[r]);if(ft)for(var r of ft(t))Hs.call(t,r)&&js(e,r,t[r]);return e},se=(e,t)=>jo(e,Go(t));var Ue=(e,t)=>{var r={};for(var s in e)Gs.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ft)for(var s of ft(e))t.indexOf(s)<0&&Hs.call(e,s)&&(r[s]=e[s]);return r};var Ho=Object.defineProperty,Yo=(e,t,r)=>t in e?Ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>Yo(e,typeof t!="symbol"?t+"":t,r),Ys;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Jo=Object.defineProperty,Xo=(e,t,r)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Js=(e,t,r)=>Xo(e,typeof t!="symbol"?t+"":t,r),B=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(B||{});const Xs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},dt={};function Qo(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function ls(e){if(dt[e])return dt[e];const t=Qo(e)||globalThis[e],r=t.prototype,s=e in Xs?Xs[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),o=e in Qs?Qs[e]:void 0,a=!!(o&&o.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a)return dt[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?dt[e]=l:r}catch(u){return r}}const Gt={};function Ae(e,t,r){var s;const i=`${e}.${String(r)}`;if(Gt[i])return Gt[i].call(t);const o=ls(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Gt[i]=a,a.call(t)):t[r]}const Ht={};function Bn(e,t,r){const s=`${e}.${String(r)}`;if(Ht[s])return Ht[s].bind(t);const o=ls(e)[r];return typeof o!="function"?t[r]:(Ht[s]=o,o.bind(t))}function Ko(e){return Ae("Node",e,"childNodes")}function Zo(e){return Ae("Node",e,"parentNode")}function ea(e){return Ae("Node",e,"parentElement")}function ta(e){return Ae("Node",e,"textContent")}function ra(e,t){return Bn("Node",e,"contains")(t)}function sa(e){return Bn("Node",e,"getRootNode")()}function ia(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function na(e){return e.styleSheets}function oa(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function aa(e,t){return Ae("Element",e,"querySelector")(t)}function la(e,t){return Ae("Element",e,"querySelectorAll")(t)}function ua(){return ls("MutationObserver").constructor}function ca(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const ne={childNodes:Ko,parentNode:Zo,parentElement:ea,textContent:ta,contains:ra,getRootNode:sa,host:ia,styleSheets:na,shadowRoot:oa,querySelector:aa,querySelectorAll:la,mutationObserver:ua,patch:ca};function us(e){return e.nodeType===e.ELEMENT_NODE}function et(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function tt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}class cs{constructor(){Js(this,"idNodeMap",new Map),Js(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Un(){return new cs}function hs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:o}){let a=i||"";const u=s&&De(s);return(t[r.toLowerCase()]||u&&t[u])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function De(e){return e.toLowerCase()}const Ks="__rrweb_original__";function ha(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const o=t.getImageData,a=Ks in o?o[Ks]:o;if(new Uint32Array(a.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}function fa(e,t){return!e||!t||e.type!==t.type?!1:e.type===B.Document?e.compatMode===t.compatMode:e.type===B.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===B.Comment||e.type===B.Text||e.type===B.CDATA?e.textContent===t.textContent:e.type===B.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function fs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?De(t):null}function ds(e,t){var o;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(a){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(o=i==null?void 0:i[1])!=null?o:null}function da(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function pa(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Mt(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const s=Array.from(t,i=>$n(i,r)).join("");return da(s)}catch(t){return null}}function $n(e,t){var r;if(ga(e)){let s;try{s=Mt(e.styleSheet)||pa(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Nt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return ya(e)&&e.selectorText.includes(":")&&(s=ma(s)),t?Nt(s,t):s}}function ma(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ga(e){return"styleSheet"in e}function ya(e){return"selectorText"in e}function wa(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const va=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ba=/^(?:[a-z+]+:)?\/\//i,Sa=/^www\..*/i,Ca=/^(data:)([^,]*),(.*)/i;function Nt(e,t){return(e||"").replace(va,(r,s,i,o,a,u)=>{const f=i||a||u,l=s||o||"";if(!f)return r;if(ba.test(f)||Sa.test(f))return`url(${l}${f}${l})`;if(Ca.test(f))return`url(${l}${f}${l})`;if(f[0]==="/")return`url(${l}${wa(t)+f}${l})`;const n=t.split("/"),c=f.split("/");n.pop();for(const d of c)d!=="."&&(d===".."?n.pop():n.push(d));return`url(${l}${n.join("/")}${l})`})}let Ea=1;const Ra=new RegExp("[^a-z0-9-_:]"),it=-2;function Wn(){return Ea++}function xa(e){if(e instanceof HTMLFormElement)return"form";const t=De(e.tagName);return Ra.test(t)?"div":t}let $e,Zs;const Ma=/^[^ \t\n\r\u000c]+/,Na=/^[, \t\n\r\u000c]+/;function Oa(e,t){if(t.trim()==="")return t;let r=0;function s(o){let a;const u=o.exec(t.substring(r));return u?(a=u[0],r+=a.length,a):""}const i=[];for(;s(Na),!(r>=t.length);){let o=s(Ma);if(o.slice(-1)===",")o=Ve(e,o.substring(0,o.length-1)),i.push(o);else{let a="";o=Ve(e,o);let u=!1;for(;;){const f=t.charAt(r);if(f===""){i.push((o+a).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){r+=1,i.push((o+a).trim());break}else f==="("&&(u=!0);a+=f,r+=1}}}return i.join(", ")}const ei=new WeakMap;function Ve(e,t){return!t||t.trim()===""?t:ps(e,t)}function Ia(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ps(e,t){let r=ei.get(e);if(r||(r=e.createElement("a"),ei.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function zn(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Ve(e,s):r==="srcset"?Oa(e,s):r==="style"?Nt(s,ps(e)):t==="object"&&r==="data"?Ve(e,s):s)}function qn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Da(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Ot(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ot(ne.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Ot(ne.parentNode(e),t,r):!1}function Vn(e,t,r,s){let i;if(us(e)){if(i=e,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(e)===null)return!1;i=ne.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ot(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(o){}return!1}function Aa(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,o;try{o=s.document.readyState}catch(u){return}if(o!=="complete"){const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}const a="about:blank";if(s.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Ta(e,t,r){let s=!1,i;try{i=e.sheet}catch(a){return}if(i)return;const o=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),s=!0,t()})}function _a(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:l,maskInputFn:n,dataURLOptions:c={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=Pa(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:B.Document,childNodes:[],compatMode:e.compatMode}:{type:B.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:B.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return Fa(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:n,dataURLOptions:c,inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return ka(e,{doc:r,needsMask:a,maskTextFn:l,rootId:g});case e.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:B.Comment,textContent:ne.textContent(e)||"",rootId:g};default:return!1}}function Pa(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function ka(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:o}=t,a=ne.parentNode(e),u=a&&a.tagName;let f=ne.textContent(e);const l=u==="STYLE"?!0:void 0,n=u==="SCRIPT"?!0:void 0;if(l&&f){try{e.nextSibling||e.previousSibling||(r=a.sheet)!=null&&r.cssRules&&(f=Mt(a.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}f=Nt(f,ps(t.doc))}return n&&(f="SCRIPT_PLACEHOLDER"),!l&&!n&&f&&s&&(f=i?i(f,ne.parentElement(e)):f.replace(/[\S]/g,"*")),{type:B.Text,textContent:f||"",isStyle:l,rootId:o}}function ti(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function La(e){return e.href}function Fa(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:n,keepIframeSrcFn:c,newlyAddedElement:d=!1,rootId:h}=t,m=Da(e,s,i),p=xa(e);let g={};const v=e.attributes.length;for(let w=0;w<v;w++){const C=e.attributes[w];qn(p,C.name,C.value)||(g[C.name]=zn(r,p,De(C.name),C.value))}if(p==="link"&&o){const w=La(e);if(w){let C=ti(r,w);if(!C&&w.includes(".css")){const S=window.location.origin,E=w.replace(window.location.href,""),R=S+"/"+E;C=ti(r,R)}let b=null;C&&(b=Mt(C)),b&&(delete g.rel,delete g.href,g._cssText=b)}}if(p==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const w=Mt(e.sheet);w&&(g._cssText=w)}if(p==="input"||p==="textarea"||p==="select"){const w=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=hs({element:e,type:fs(e),tagName:p,value:w,maskInputOptions:a,maskInputFn:u}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!a.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&n){if(e.__context==="2d")ha(e)||(g.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const w=e.toDataURL(f.type,f.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const b=C.toDataURL(f.type,f.quality);w!==b&&(g.rr_dataURL=w)}}if(p==="img"&&l){$e||($e=r.createElement("canvas"),Zs=$e.getContext("2d"));const w=e,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",b=w.crossOrigin,S=()=>{w.removeEventListener("load",S);try{$e.width=w.naturalWidth,$e.height=w.naturalHeight,Zs.drawImage(w,0,0),g.rr_dataURL=$e.toDataURL(f.type,f.quality)}catch(E){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}w.crossOrigin==="anonymous"&&(b?g.crossOrigin=b:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S)}if(p==="audio"||p==="video"){const w=g;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:w,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!c(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(w){}return{type:B.Element,tagName:p,attributes:g,childNodes:[],isSVG:Ia(e)||void 0,needBlock:m,rootId:h,isCustom:y}}function G(e){return e==null?"":e.toLowerCase()}function Ba(e,t){if(t.comment&&e.type===B.Comment)return!0;if(e.type===B.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ds(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(G(e.attributes.name).match(/^msapplication-tile(image|color)$/)||G(e.attributes.name)==="application-name"||G(e.attributes.rel)==="icon"||G(e.attributes.rel)==="apple-touch-icon"||G(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&G(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(G(e.attributes.property).match(/^(og|twitter|fb):/)||G(e.attributes.name).match(/^(og|twitter):/)||G(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(G(e.attributes.name)==="robots"||G(e.attributes.name)==="googlebot"||G(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(G(e.attributes.name)==="author"||G(e.attributes.name)==="generator"||G(e.attributes.name)==="framework"||G(e.attributes.name)==="publisher"||G(e.attributes.name)==="progid"||G(e.attributes.property).match(/^article:/)||G(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(G(e.attributes.name)==="google-site-verification"||G(e.attributes.name)==="yandex-verification"||G(e.attributes.name)==="csrf-token"||G(e.attributes.name)==="p:domain_verify"||G(e.attributes.name)==="verify-v1"||G(e.attributes.name)==="verification"||G(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function je(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:l=!0,maskInputOptions:n={},maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=Vn(e,a,u,R===void 0));const N=_a(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:R,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E});if(!N)return console.warn(e,"not serialized"),null;let F;s.hasNode(e)?F=s.getId(e):Ba(N,h)||!I&&N.type===B.Text&&!N.isStyle&&!N.textContent.replace(/^\s+|\s+$/gm,"").length?F=it:F=Wn();const D=Object.assign(N,{id:F});if(s.add(e,D),F===it)return null;v&&v(e);let re=!f;if(D.type===B.Element){re=re&&!D.needBlock,delete D.needBlock;const x=ne.shadowRoot(e);x&&tt(x)&&(D.isShadowHost=!0)}if((D.type===B.Document||D.type===B.Element)&&re){h.headWhitespace&&D.type===B.Element&&D.tagName==="head"&&(I=!1);const x={doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:R,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:S};if(!(D.type===B.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(ne.childNodes(e))){const V=je(P,x);V&&D.childNodes.push(V)}let K=null;if(us(e)&&(K=ne.shadowRoot(e)))for(const P of Array.from(ne.childNodes(K))){const V=je(P,x);V&&(tt(K)&&(V.isShadow=!0),D.childNodes.push(V))}}const ie=ne.parentNode(e);return ie&&et(ie)&&tt(ie)&&(D.isShadow=!0),D.type===B.Element&&D.tagName==="iframe"&&Aa(e,()=>{const x=e.contentDocument;if(x&&y){const K=je(x,{doc:x,mirror:s,blockClass:i,blockSelector:o,needsMask:R,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:S});K&&y(e,K)}},w),D.type===B.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&ds(D.attributes.href)==="css")&&Ta(e,()=>{if(C){const x=je(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:R,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:S});x&&C(e,x)}},b),D}function Ua(e,t){const{mirror:r=new cs,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:l=!1,maskAllInputs:n=!1,maskTextFn:c,maskInputFn:d,slimDOM:h=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:b=()=>!1}=t||{};return je(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:m,inlineImages:f,recordCanvas:l,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:b,newlyAddedElement:!1})}const $a=/(max|min)-device-(width|height)/,ri=new RegExp($a.source,"g"),Wa={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ri)&&(e.params=e.params.replace(ri,"$1-$2"))}}}},za={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
15
+ `+r.replace(/:hover/g,".\\:hover"))}))}}}};function jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var pt={exports:{}},si;function Va(){if(si)return pt.exports;si=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return pt.exports=t(),pt.exports.createColors=t,pt.exports}const ja={},Ga=Object.freeze(Object.defineProperty({__proto__:null,default:ja},Symbol.toStringTag,{value:"Module"})),pe=qa(Ga);var Yt,ii;function ms(){if(ii)return Yt;ii=1;let e=Va(),t=pe;class r extends Error{constructor(i,o,a,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof o!="undefined"&&typeof a!="undefined"&&(typeof o=="number"?(this.line=o,this.column=a):(this.line=o.line,this.column=o.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported);let a=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),a=g=>m(g),t&&(f=g=>t(g))}let l=o.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),b=h.slice(w,C),S=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(b)+`
16
+ `+S+u("^")}let v=a(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+a(g)+f(h)+`
17
+ `+v+u("^")}return" "+a(g)+f(h)}).join(`
18
18
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
19
19
 
20
20
  `+i+`
21
- `),this.name+": "+this.message+i}}return Ht=r,r.default=r,Ht}var Yt,ii;function jn(){if(ii)return Yt;ii=1;const e={after:`
21
+ `),this.name+": "+this.message+i}}return Yt=r,r.default=r,Yt}var Jt,ni;function Gn(){if(ni)return Jt;ni=1;const e={after:`
22
22
  `,beforeClose:`
23
23
  `,beforeComment:`
24
24
  `,beforeDecl:`
25
25
  `,beforeOpen:" ",beforeRule:`
26
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:u&&(o+=" "),i.nodes)this.block(i,o+u);else{let f=(i.raws.between||"")+(a?";":"");this.builder(o+u+f,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let u=i.parent,f=0;for(;u&&u.type!=="root";)f+=1,u=u.parent;if(o.includes(`
27
- `)){let l=this.raw(i,null,"indent");if(l.length)for(let n=0;n<f;n++)o+=l}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let f=i.nodes[u],l=this.raw(f,"before");l&&this.builder(l),this.stringify(f,a!==u||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),u=i.prop+o+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),a&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,a,o){let u;if(o||(o=a),a&&(u=i.raws[a],typeof u!="undefined"))return u;let f=i.parent;if(o==="before"&&(!f||f.type==="root"&&f.first===i||f&&f.type==="document"))return"";if(!f)return e[o];let l=i.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[o]!="undefined")return l.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?u=this[n](l,i):l.walk(c=>{if(u=c.raws[a],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=e[o]),l.rawCache[o]=u,u}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
28
- `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(u=>{if(typeof u.raws.before!="undefined")return o=u.raws.before,o.includes(`
29
- `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return o=u.raws.before,o.includes(`
30
- `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
31
- `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let u=o.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof o.raws.before!="undefined"){let f=o.raws.before.split(`
32
- `);return a=f[f.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],u=i.raws[a];return u&&u.value===o?u.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Yt=r,r.default=r,Yt}var Jt,ni;function Pt(){if(ni)return Jt;ni=1;let e=jn();function t(r,s){new e(s).stringify(r)}return Jt=t,t.default=t,Jt}var pt={},oi;function ms(){return oi||(oi=1,pt.isClean=Symbol("isClean"),pt.my=Symbol("my")),pt}var Xt,ai;function kt(){if(ai)return Xt;ai=1;let e=ps(),t=jn(),r=Pt(),{isClean:s,my:i}=ms();function a(f,l){let n=new f.constructor;for(let c in f){if(!Object.prototype.hasOwnProperty.call(f,c)||c==="proxyCache")continue;let d=f[c],h=typeof d;c==="parent"&&h==="object"?l&&(n[c]=l):c==="source"?n[c]=d:Array.isArray(d)?n[c]=d.map(m=>a(m,n)):(h==="object"&&d!==null&&(d=a(d)),n[c]=d)}return n}function o(f,l){if(l&&typeof l.offset!="undefined")return l.offset;let n=1,c=1,d=0;for(let h=0;h<f.length;h++){if(c===l.line&&n===l.column){d=h;break}f[h]===`
33
- `?(n=1,c+=1):n+=1}return d}class u{constructor(l={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in l)if(n==="nodes"){this.nodes=[];for(let c of l[n])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[n]=l[n]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let n=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let n in l)this[n]=l[n];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let n=a(this);for(let c in l)n[c]=l[c];return n}cloneAfter(l={}){let n=this.clone(l);return this.parent.insertAfter(this,n),n}cloneBefore(l={}){let n=this.clone(l);return this.parent.insertBefore(this,n),n}error(l,n={}){if(this.source){let{end:c,start:d}=this.rangeBy(n);return this.source.input.error(l,{column:d.column,line:d.line},{column:c.column,line:c.line},n)}return new e(l)}getProxyProcessor(){return{get(l,n){return n==="proxyOf"?l:n==="root"?()=>l.root().toProxy():l[n]},set(l,n,c){return l[n]===c||(l[n]=c,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&l.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let l=this;for(;l=l.parent;)l[s]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l){let n=this.source.start;if(l.index)n=this.positionInside(l.index);else if(l.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,h=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(l.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(l){let n=this.source.start.column,c=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,h=o(d,this.source.start),m=h+l;for(let p=h;p<m;p++)d[p]===`
34
- `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(o(d,this.source.start),o(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return Xt=u,u.default=u,Xt}var Qt,li;function nt(){if(li)return Qt;li=1;let e=kt();class t extends e{constructor(s){super(s),this.type="comment"}}return Qt=t,t.default=t,Qt}var Kt,ui;function Lt(){if(ui)return Kt;ui=1;let e=kt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Kt=t,t.default=t,Kt}var Zt,ci;function ke(){if(ci)return Zt;ci=1;let e=nt(),t=Lt(),r=kt(),{isClean:s,my:i}=ms(),a,o,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...b)=>p(g.toProxy(),...b)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,b=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let w of b)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+b.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(o(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new a(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(b){throw m.addToError(b)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{o=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{a=d},c.registerRoot=d=>{u=d},Zt=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,a.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},Zt}var er,hi;function gs(){if(hi)return er;hi=1;let e=ke();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return er=t,t.default=t,e.registerAtRule(t),er}var tr,fi;function ys(){if(fi)return tr;fi=1;let e=ke(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},tr=s,s.default=s,tr}var rr,di;function Ga(){if(di)return rr;di=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return rr={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",u=a|0;for(;u--;)o+=s[Math.random()*s.length|0];return o}},rr}var sr,pi;function Gn(){if(pi)return sr;pi=1;let{existsSync:e,readFileSync:t}=de,{dirname:r,join:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de;function o(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return o(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return sr=u,u.default=u,sr}var ir,mi;function Ft(){if(mi)return ir;mi=1;let{nanoid:e}=Ga(),{isAbsolute:t,resolve:r}=de,{SourceMapConsumer:s,SourceMapGenerator:i}=de,{fileURLToPath:a,pathToFileURL:o}=de,u=ps(),f=Gn(),l=de,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let b=new f(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,b,y={}){let w,C,v;if(g&&typeof g=="object"){let E=g,R=b;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,b=I.col}else g=E.line,b=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,w=I.col}else C=R.line,w=R.column}else if(!b){let E=this.fromOffset(g);g=E.line,b=E.col}let S=this.origin(g,b,C,w);return S?v=new u(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new u(p,C===void 0?g:{column:b,line:g},C===void 0?b:{column:w,line:C},this.css,this.file,y.plugin),v.input={column:b,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,b;if(this[n])b=this[n];else{let w=this.css.split(`
35
- `);b=new Array(w.length);let C=0;for(let v=0,S=w.length;v<S;v++)b[v]=C,C+=w[v].length+1;this[n]=b}g=b[b.length-1];let y=0;if(p>=g)y=b.length-1;else{let w=b.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<b[C])w=C-1;else if(p>=b[C+1])y=C+1;else{y=C;break}}return{col:p-b[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,b,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof b=="number"&&(v=w.originalPositionFor({column:y,line:b}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=w.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return ir=h,h.default=h,l&&l.registerInput&&l.registerInput(h),ir}var nr,gi;function ot(){if(gi)return nr;gi=1;let e=ke(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,u){let f=super.normalize(a);if(o){if(u==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let l of f)l.raws.before=o.raws.before}return f}removeChild(a,o){let u=this.index(a);return!o&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},nr=s,s.default=s,e.registerRoot(s),nr}var or,yi;function Hn(){if(yi)return or;yi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
36
- `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,u=0,f=!1,l="",n=!1;for(let c of t)n?n=!1:c==="\\"?n=!0:f?c===l&&(f=!1):c==='"'||c==="'"?(f=!0,l=c):c==="("?u+=1:c===")"?u>0&&(u-=1):u===0&&r.includes(c)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=c;return(s||a!=="")&&i.push(a.trim()),i}};return or=e,e.default=e,or}var ar,wi;function ws(){if(wi)return ar;wi=1;let e=ke(),t=Hn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return ar=r,r.default=r,e.registerRule(r),ar}var lr,bi;function Ha(){if(bi)return lr;bi=1;let e=gs(),t=nt(),r=Lt(),s=Ft(),i=Gn(),a=ot(),o=ws();function u(f,l){if(Array.isArray(f))return f.map(m=>u(m));let d=f,{inputs:n}=d,c=Be(d,["inputs"]);if(n){l=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),l.push(p)}}if(c.nodes&&(c.nodes=f.nodes.map(m=>u(m,l))),c.source){let h=c.source,{inputId:m}=h,p=Be(h,["inputId"]);c.source=p,m!=null&&(c.source.input=l[m])}if(c.type==="root")return new a(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new o(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+f.type)}return lr=u,u.default=u,lr}var ur,vi;function Yn(){if(vi)return ur;vi=1;let{dirname:e,relative:t,resolve:r,sep:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de,{pathToFileURL:o}=de,u=Ft(),f=!!(i&&a),l=!!(e&&r&&t&&s);class n{constructor(d,h,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let h=`
26
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,o){let a="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?a+=i.raws.afterName:u&&(a+=" "),i.nodes)this.block(i,a+u);else{let f=(i.raws.between||"")+(o?";":"");this.builder(a+u+f,i)}}beforeAfter(i,o){let a;i.type==="decl"?a=this.raw(i,null,"beforeDecl"):i.type==="comment"?a=this.raw(i,null,"beforeComment"):o==="before"?a=this.raw(i,null,"beforeRule"):a=this.raw(i,null,"beforeClose");let u=i.parent,f=0;for(;u&&u.type!=="root";)f+=1,u=u.parent;if(a.includes(`
27
+ `)){let l=this.raw(i,null,"indent");if(l.length)for(let n=0;n<f;n++)a+=l}return a}block(i,o){let a=this.raw(i,"between","beforeOpen");this.builder(o+a+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let o=i.nodes.length-1;for(;o>0&&i.nodes[o].type==="comment";)o-=1;let a=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let f=i.nodes[u],l=this.raw(f,"before");l&&this.builder(l),this.stringify(f,o!==u||a)}}comment(i){let o=this.raw(i,"left","commentLeft"),a=this.raw(i,"right","commentRight");this.builder("/*"+o+i.text+a+"*/",i)}decl(i,o){let a=this.raw(i,"between","colon"),u=i.prop+a+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),o&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,o,a){let u;if(a||(a=o),o&&(u=i.raws[o],typeof u!="undefined"))return u;let f=i.parent;if(a==="before"&&(!f||f.type==="root"&&f.first===i||f&&f.type==="document"))return"";if(!f)return e[a];let l=i.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[a]!="undefined")return l.rawCache[a];if(a==="before"||a==="after")return this.beforeAfter(i,a);{let n="raw"+t(a);this[n]?u=this[n](l,i):l.walk(c=>{if(u=c.raws[o],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=e[a]),l.rawCache[a]=u,u}rawBeforeClose(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length>0&&typeof a.raws.after!="undefined")return o=a.raws.after,o.includes(`
28
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(i,o){let a;return i.walkComments(u=>{if(typeof u.raws.before!="undefined")return a=u.raws.before,a.includes(`
29
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a=="undefined"?a=this.raw(o,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeDecl(i,o){let a;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return a=u.raws.before,a.includes(`
30
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a=="undefined"?a=this.raw(o,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeOpen(i){let o;return i.walk(a=>{if(a.type!=="decl"&&(o=a.raws.between,typeof o!="undefined"))return!1}),o}rawBeforeRule(i){let o;return i.walk(a=>{if(a.nodes&&(a.parent!==i||i.first!==a)&&typeof a.raws.before!="undefined")return o=a.raws.before,o.includes(`
31
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(a=>{if(typeof a.raws.between!="undefined")return o=a.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length===0&&(o=a.raws.after,typeof o!="undefined"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(a=>{let u=a.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof a.raws.before!="undefined"){let f=a.raws.before.split(`
32
+ `);return o=f[f.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(o=a.raws.semicolon,typeof o!="undefined"))return!1}),o}rawValue(i,o){let a=i[o],u=i.raws[o];return u&&u.value===a?u.raw:a}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return Jt=r,r.default=r,Jt}var Xt,oi;function kt(){if(oi)return Xt;oi=1;let e=Gn();function t(r,s){new e(s).stringify(r)}return Xt=t,t.default=t,Xt}var mt={},ai;function gs(){return ai||(ai=1,mt.isClean=Symbol("isClean"),mt.my=Symbol("my")),mt}var Qt,li;function Lt(){if(li)return Qt;li=1;let e=ms(),t=Gn(),r=kt(),{isClean:s,my:i}=gs();function o(f,l){let n=new f.constructor;for(let c in f){if(!Object.prototype.hasOwnProperty.call(f,c)||c==="proxyCache")continue;let d=f[c],h=typeof d;c==="parent"&&h==="object"?l&&(n[c]=l):c==="source"?n[c]=d:Array.isArray(d)?n[c]=d.map(m=>o(m,n)):(h==="object"&&d!==null&&(d=o(d)),n[c]=d)}return n}function a(f,l){if(l&&typeof l.offset!="undefined")return l.offset;let n=1,c=1,d=0;for(let h=0;h<f.length;h++){if(c===l.line&&n===l.column){d=h;break}f[h]===`
33
+ `?(n=1,c+=1):n+=1}return d}class u{constructor(l={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in l)if(n==="nodes"){this.nodes=[];for(let c of l[n])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[n]=l[n]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let n=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let n in l)this[n]=l[n];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let n=o(this);for(let c in l)n[c]=l[c];return n}cloneAfter(l={}){let n=this.clone(l);return this.parent.insertAfter(this,n),n}cloneBefore(l={}){let n=this.clone(l);return this.parent.insertBefore(this,n),n}error(l,n={}){if(this.source){let{end:c,start:d}=this.rangeBy(n);return this.source.input.error(l,{column:d.column,line:d.line},{column:c.column,line:c.line},n)}return new e(l)}getProxyProcessor(){return{get(l,n){return n==="proxyOf"?l:n==="root"?()=>l.root().toProxy():l[n]},set(l,n,c){return l[n]===c||(l[n]=c,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&l.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let l=this;for(;l=l.parent;)l[s]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l){let n=this.source.start;if(l.index)n=this.positionInside(l.index);else if(l.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,h=c.slice(a(c,this.source.start),a(c,this.source.end)).indexOf(l.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(l){let n=this.source.start.column,c=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,h=a(d,this.source.start),m=h+l;for(let p=h;p<m;p++)d[p]===`
34
+ `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(a(d,this.source.start),a(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return Qt=u,u.default=u,Qt}var Kt,ui;function ot(){if(ui)return Kt;ui=1;let e=Lt();class t extends e{constructor(s){super(s),this.type="comment"}}return Kt=t,t.default=t,Kt}var Zt,ci;function Ft(){if(ci)return Zt;ci=1;let e=Lt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Zt=t,t.default=t,Zt}var er,hi;function ke(){if(hi)return er;hi=1;let e=ot(),t=Ft(),r=Lt(),{isClean:s,my:i}=gs(),o,a,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...v)=>p(g.toProxy(),...v)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],p<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let w of v)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new o(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(v){throw m.addToError(v)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{a=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{o=d},c.registerRoot=d=>{u=d},er=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,o.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},er}var tr,fi;function ys(){if(fi)return tr;fi=1;let e=ke();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return tr=t,t.default=t,e.registerAtRule(t),tr}var rr,di;function ws(){if(di)return rr;di=1;let e=ke(),t,r;class s extends e{constructor(o){super(L({type:"document"},o)),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},rr=s,s.default=s,rr}var sr,pi;function Ha(){if(pi)return sr;pi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return sr={nanoid:(s=21)=>{let i="",o=s|0;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(o=i)=>{let a="",u=o|0;for(;u--;)a+=s[Math.random()*s.length|0];return a}},sr}var ir,mi;function Hn(){if(mi)return ir;mi=1;let{existsSync:e,readFileSync:t}=pe,{dirname:r,join:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:o}=pe;function a(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return a(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return o.fromSourceMap(n).toString();if(n instanceof o)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ir=u,u.default=u,ir}var nr,gi;function Bt(){if(gi)return nr;gi=1;let{nanoid:e}=Ha(),{isAbsolute:t,resolve:r}=pe,{SourceMapConsumer:s,SourceMapGenerator:i}=pe,{fileURLToPath:o,pathToFileURL:a}=pe,u=ms(),f=Hn(),l=pe,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let v=new f(this.css,g);if(v.text){this.map=v;let y=v.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,v,y={}){let w,C,b;if(g&&typeof g=="object"){let E=g,R=v;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,v=I.col}else g=E.line,v=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,w=I.col}else C=R.line,w=R.column}else if(!v){let E=this.fromOffset(g);g=E.line,v=E.col}let S=this.origin(g,v,C,w);return S?b=new u(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):b=new u(p,C===void 0?g:{column:v,line:g},C===void 0?v:{column:w,line:C},this.css,this.file,y.plugin),b.input={column:v,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(a&&(b.input.url=a(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let g,v;if(this[n])v=this[n];else{let w=this.css.split(`
35
+ `);v=new Array(w.length);let C=0;for(let b=0,S=w.length;b<S;b++)v[b]=C,C+=w[b].length+1;this[n]=v}g=v[v.length-1];let y=0;if(p>=g)y=v.length-1;else{let w=v.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<v[C])w=C-1;else if(p>=v[C+1])y=C+1;else{y=C;break}}return{col:p-v[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,v,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let b;typeof v=="number"&&(b=w.originalPositionFor({column:y,line:v}));let S;t(C.source)?S=a(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let E={column:C.column,endColumn:b&&b.column,endLine:b&&b.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(o)E.file=o(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=w.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return nr=h,h.default=h,l&&l.registerInput&&l.registerInput(h),nr}var or,yi;function at(){if(yi)return or;yi=1;let e=ke(),t,r;class s extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,a,u){let f=super.normalize(o);if(a){if(u==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let l of f)l.raws.before=a.raws.before}return f}removeChild(o,a){let u=this.index(o);return!a&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},or=s,s.default=s,e.registerRoot(s),or}var ar,wi;function Yn(){if(wi)return ar;wi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
36
+ `," "];return e.split(t,r)},split(t,r,s){let i=[],o="",a=!1,u=0,f=!1,l="",n=!1;for(let c of t)n?n=!1:c==="\\"?n=!0:f?c===l&&(f=!1):c==='"'||c==="'"?(f=!0,l=c):c==="("?u+=1:c===")"?u>0&&(u-=1):u===0&&r.includes(c)&&(a=!0),a?(o!==""&&i.push(o.trim()),o="",a=!1):o+=c;return(s||o!=="")&&i.push(o.trim()),i}};return ar=e,e.default=e,ar}var lr,vi;function vs(){if(vi)return lr;vi=1;let e=ke(),t=Yn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,a=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(a)}}return lr=r,r.default=r,e.registerRule(r),lr}var ur,bi;function Ya(){if(bi)return ur;bi=1;let e=ys(),t=ot(),r=Ft(),s=Bt(),i=Hn(),o=at(),a=vs();function u(f,l){if(Array.isArray(f))return f.map(m=>u(m));let d=f,{inputs:n}=d,c=Ue(d,["inputs"]);if(n){l=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),l.push(p)}}if(c.nodes&&(c.nodes=f.nodes.map(m=>u(m,l))),c.source){let h=c.source,{inputId:m}=h,p=Ue(h,["inputId"]);c.source=p,m!=null&&(c.source.input=l[m])}if(c.type==="root")return new o(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new a(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+f.type)}return ur=u,u.default=u,ur}var cr,Si;function Jn(){if(Si)return cr;Si=1;let{dirname:e,relative:t,resolve:r,sep:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:o}=pe,{pathToFileURL:a}=pe,u=Bt(),f=!!(i&&o),l=!!(e&&r&&t&&s);class n{constructor(d,h,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let h=`
37
37
  `;this.css.includes(`\r
38
38
  `)&&(h=`\r
39
- `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=a.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=h-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),b=y.match(/\n/g),b?(d+=b.length,g=y.lastIndexOf(`
40
- `),h=y.length-g):h+=y.length,w&&C!=="start"){let v=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==v.last||v.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return ur=n,ur}var cr,Si;function Jn(){if(Si)return cr;Si=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,b=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return cr=function(R,I={}){let O=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=O.length,N=0,ge=[],ce=[];function Qe(){return N}function le(k){throw R.error("Unclosed "+k,N)}function he(){return ce.length===0&&N>=Ee}function Pe(k){if(ce.length)return ce.pop();if(N>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=O.charCodeAt(N),D){case i:case a:case u:case f:case o:{x=N;do x+=1,D=O.charCodeAt(x);while(D===a||D===i||D===u||D===f||D===o);P=["space",O.slice(N,x)],N=x-1;break}case l:case n:case h:case m:case b:case p:case d:{let j=String.fromCharCode(D);P=[j,j,N];break}case c:{if(be=ge.length?ge.pop()[1]:"",X=O.charCodeAt(N+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==u&&X!==o&&X!==f){x=N;do{if(V=!1,x=O.indexOf(")",x+1),x===-1)if(F||te){x=N;break}else le("bracket");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",O.slice(N,x+1),N,x],N=x}else x=O.indexOf(")",N+1),re=O.slice(N,x+1),x===-1||v.test(re)?P=["(","(",N]:(P=["brackets",re,N,x],N=x);break}case e:case t:{Z=D===e?"'":'"',x=N;do{if(V=!1,x=O.indexOf(Z,x+1),x===-1)if(F||te){x=N+1;break}else le("string");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",O.slice(N,x+1),N,x],N=x;break}case y:{w.lastIndex=N+1,w.test(O),w.lastIndex===0?x=O.length-1:x=w.lastIndex-2,P=["at-word",O.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,ie=!0;O.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=O.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==u&&D!==f&&D!==o&&(x+=1,S.test(O.charAt(x)))){for(;S.test(O.charAt(x+1));)x+=1;O.charCodeAt(x+1)===a&&(x+=1)}P=["word",O.slice(N,x+1),N,x],N=x;break}default:{D===s&&O.charCodeAt(N+1)===g?(x=O.indexOf("*/",N+2)+1,x===0&&(F||te?x=O.length:le("comment")),P=["comment",O.slice(N,x+1),N,x],N=x):(C.lastIndex=N+1,C.test(O),C.lastIndex===0?x=O.length-1:x=C.lastIndex-2,P=["word",O.slice(N,x+1),N,x],ge.push(P),N=x);break}}return N++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:Pe,position:Qe}},cr}var hr,Ci;function Xn(){if(Ci)return hr;Ci=1;let e=gs(),t=nt(),r=Lt(),s=ot(),i=ws(),a=Jn();const o={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(b.length>0){for(m=b.length-1,h=b[m];h&&h[0]==="space";)h=b[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(c.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(c,"params",b),p&&(n=b[b.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let v=y;v>0;v--){let S=w[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(d=y[0],b.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(b,g);return}else break;else if(d==="{"){this.rule(b);return}else if(d==="}"){this.tokenizer.back(b.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,b="",y=!0,w,C;for(let v=0;v<g;v+=1)m=d[v],p=m[0],p==="space"&&v===g-1&&!h?y=!1:p==="comment"?(C=d[v-1]?d[v-1][0]:"empty",w=d[v+1]?d[v+1][0]:"empty",!o[C]&&!o[w]?b.slice(-1)===","?y=!1:b+=m[1]:y=!1):b+=m[1];if(!y){let v=d.reduce((S,E)=>S+E[1],"");n.raws[c]={raw:v,value:b}}n[c]=b}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return hr=f,hr}var fr,Ei;function bs(){if(Ei)return fr;Ei=1;let e=ke(),t=Ft(),r=Xn();function s(i,a){let o=new t(i,a),u=new r(o);try{u.parse()}catch(f){throw f}return u.root}return fr=s,s.default=s,e.registerParse(s),fr}var dr,Ri;function Qn(){if(Ri)return dr;Ri=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return dr=e,e.default=e,dr}var pr,xi;function vs(){if(xi)return pr;xi=1;let e=Qn();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return pr=t,t.default=t,pr}var mr,Mi;function Kn(){if(Mi)return mr;Mi=1;let e={};return mr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},mr}var gr,Oi;function Zn(){if(Oi)return gr;Oi=1;let e=ke(),t=ys(),r=Yn(),s=bs(),i=vs(),a=ot(),o=Pt(),{isClean:u,my:f}=ms(),l=Kn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,h,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",h,"DocumentExit"]:C.type==="root"?v=["Root",h,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function b(C){return C[u]=!1,C.nodes&&C.nodes.forEach(v=>b(v)),C}let y={};class w{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=b(S);else if(S instanceof w||S instanceof i)R=b(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(O){this.processed=!0,this.error=O}R&&!R[f]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!c[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[u];){v[u]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[u];)v[u]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(O){throw this.handleError(O,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[O,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=O;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let O=S.iterator,F;for(;F=E.nodes[E.indexes[O]];)if(E.indexes[O]+=1,!F[u]){F[u]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[O]}let I=S.events;for(;S.eventIndex<I.length;){let O=I[S.eventIndex];if(S.eventIndex+=1,O===h){E.nodes&&E.nodes.length&&(E[u]=!0,S.iterator=E.getIterator());return}else if(this.listeners[O]){S.visitors=this.listeners[O];return}}v.pop()}walkSync(v){v[u]=!0;let S=p(v);for(let E of S)if(E===h)v.nodes&&v.each(R=>{R[u]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},gr=w,w.default=w,a.registerLazyResult(w),t.registerLazyResult(w),gr}var yr,Ni;function Ya(){if(Ni)return yr;Ni=1;let e=Yn(),t=bs();const r=vs();let s=Pt(),i=Kn();class a{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return yr=a,a.default=a,yr}var wr,Ii;function Ja(){if(Ii)return wr;Ii=1;let e=ys(),t=Zn(),r=Ya(),s=ot();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let u=[];for(let f of o)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(o,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,o,u):new t(this,o,u)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return wr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),wr}var br,Di;function eo(){if(Di)return br;Di=1;let e=gs(),t=nt(),r=ke(),s=ps(),i=Lt(),a=ys(),o=Ha(),u=Ft(),f=Zn(),l=Hn(),n=kt(),c=bs(),d=Ja(),h=vs(),m=ot(),p=ws(),g=Pt(),b=Qn();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
39
+ `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=o.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new o({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 o({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=h-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),v=y.match(/\n/g),v?(d+=v.length,g=y.lastIndexOf(`
40
+ `),h=y.length-g):h+=y.length,w&&C!=="start"){let b=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==b.last||b.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(a){let m=a(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return cr=n,cr}var hr,Ci;function Xn(){if(Ci)return hr;Ci=1;const e=39,t=34,r=92,s=47,i=10,o=32,a=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return hr=function(R,I={}){let N=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,K,P,V,Z,X,ve,Ee=N.length,O=0,ye=[],he=[];function Ke(){return O}function le(k){throw R.error("Unclosed "+k,O)}function ue(){return he.length===0&&O>=Ee}function Pe(k){if(he.length)return he.pop();if(O>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=N.charCodeAt(O),D){case i:case o:case u:case f:case a:{x=O;do x+=1,D=N.charCodeAt(x);while(D===o||D===i||D===u||D===f||D===a);P=["space",N.slice(O,x)],O=x-1;break}case l:case n:case h:case m:case v:case p:case d:{let j=String.fromCharCode(D);P=[j,j,O];break}case c:{if(ve=ye.length?ye.pop()[1]:"",X=N.charCodeAt(O+1),ve==="url"&&X!==e&&X!==t&&X!==o&&X!==i&&X!==u&&X!==a&&X!==f){x=O;do{if(V=!1,x=N.indexOf(")",x+1),x===-1)if(F||te){x=O;break}else le("bracket");for(Z=x;N.charCodeAt(Z-1)===r;)Z-=1,V=!V}while(V);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),re=N.slice(O,x+1),x===-1||b.test(re)?P=["(","(",O]:(P=["brackets",re,O,x],O=x);break}case e:case t:{K=D===e?"'":'"',x=O;do{if(V=!1,x=N.indexOf(K,x+1),x===-1)if(F||te){x=O+1;break}else le("string");for(Z=x;N.charCodeAt(Z-1)===r;)Z-=1,V=!V}while(V);P=["string",N.slice(O,x+1),O,x],O=x;break}case y:{w.lastIndex=O+1,w.test(N),w.lastIndex===0?x=N.length-1:x=w.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=N.charCodeAt(x+1),ie&&D!==s&&D!==o&&D!==i&&D!==u&&D!==f&&D!==a&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===o&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{D===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(F||te?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ye.push(P),O=x);break}}return O++,P}function Re(k){he.push(k)}return{back:Re,endOfFile:ue,nextToken:Pe,position:Ke}},hr}var fr,Ei;function Qn(){if(Ei)return fr;Ei=1;let e=ys(),t=ot(),r=Ft(),s=at(),i=vs(),o=Xn();const a={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,v=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,h=v[m];h&&h[0]==="space";)h=v[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(c.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(c,"params",v),p&&(n=v[v.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let b=y;b>0;b--){let S=w[b][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),v=[],y=n;for(;y;){if(d=y[0],v.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(v,g);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;v.length&&(y=v[v.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,v="",y=!0,w,C;for(let b=0;b<g;b+=1)m=d[b],p=m[0],p==="space"&&b===g-1&&!h?y=!1:p==="comment"?(C=d[b-1]?d[b-1][0]:"empty",w=d[b+1]?d[b+1][0]:"empty",!a[C]&&!a[w]?v.slice(-1)===","?y=!1:v+=m[1]:y=!1):v+=m[1];if(!y){let b=d.reduce((S,E)=>S+E[1],"");n.raws[c]={raw:b,value:v}}n[c]=v}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return fr=f,fr}var dr,Ri;function bs(){if(Ri)return dr;Ri=1;let e=ke(),t=Bt(),r=Qn();function s(i,o){let a=new t(i,o),u=new r(a);try{u.parse()}catch(f){throw f}return u.root}return dr=s,s.default=s,e.registerParse(s),dr}var pr,xi;function Kn(){if(xi)return pr;xi=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return pr=e,e.default=e,pr}var mr,Mi;function Ss(){if(Mi)return mr;Mi=1;let e=Kn();class t{constructor(s,i,o){this.processor=s,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(s,i);return this.messages.push(o),o}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return mr=t,t.default=t,mr}var gr,Ni;function Zn(){if(Ni)return gr;Ni=1;let e={};return gr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},gr}var yr,Oi;function eo(){if(Oi)return yr;Oi=1;let e=ke(),t=ws(),r=Jn(),s=bs(),i=Ss(),o=at(),a=kt(),{isClean:u,my:f}=gs(),l=Zn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let b=!1,S=n[C.type];return C.type==="decl"?b=C.prop.toLowerCase():C.type==="atrule"&&(b=C.name.toLowerCase()),b&&C.append?[S,S+"-"+b,h,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let b;return C.type==="document"?b=["Document",h,"DocumentExit"]:C.type==="root"?b=["Root",h,"RootExit"]:b=p(C),{eventIndex:0,events:b,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[u]=!1,C.nodes&&C.nodes.forEach(b=>v(b)),C}let y={};class w{constructor(b,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=v(S);else if(S instanceof w||S instanceof i)R=v(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[f]&&e.rebuild(R)}this.result=new i(b,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let E=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=E.postcssPlugin,b.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return b}prepareVisitors(){this.listeners={};let b=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!c[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?b(S,E,S[E][R]):b(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&b(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];){b[u]=!0;let S=[g(b)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let R=b.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(b,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>b.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=a;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 b of this.plugins){let S=this.runOnRoot(b);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];)b[u]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[E,R]of b){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){b.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let N=S.iterator,F;for(;F=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!F[u]){F[u]=!0,b.push(g(F));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===h){E.nodes&&E.nodes.length&&(E[u]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}b.pop()}walkSync(b){b[u]=!0;let S=p(b);for(let E of S)if(E===h)b.nodes&&b.each(R=>{R[u]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},yr=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),yr}var wr,Ii;function Ja(){if(Ii)return wr;Ii=1;let e=Jn(),t=bs();const r=Ss();let s=kt(),i=Zn();class o{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return wr=o,o.default=o,wr}var vr,Di;function Xa(){if(Di)return vr;Di=1;let e=ws(),t=eo(),r=Ja(),s=at();class i{constructor(a=[]){this.version="8.5.1",this.plugins=this.normalize(a)}normalize(a){let u=[];for(let f of a)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(a,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,a,u):new t(this,a,u)}use(a){return this.plugins=this.plugins.concat(this.normalize([a])),this}}return vr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),vr}var br,Ai;function to(){if(Ai)return br;Ai=1;let e=ys(),t=ot(),r=ke(),s=ms(),i=Ft(),o=ws(),a=Ya(),u=Bt(),f=eo(),l=Yn(),n=Lt(),c=bs(),d=Xa(),h=Ss(),m=at(),p=vs(),g=kt(),v=Kn();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,b){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
41
41
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
42
- https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new d().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=c,y.fromJSON=o,y.list=l,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new a(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),br=y,y.default=y,br}var vr,Ai;function Xa(){if(Ai)return vr;Ai=1;let e=nt(),t=Xn(),r=Jn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let u=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:u.col,line:u.line,offset:a[3]+1};let f=a[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))o.text="",o.raws.left=f,o.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);o.text=l[2],o.raws.left=l[1],o.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let u,f;for(u=o-1;u>=0&&a[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(a[f][0]!=="space"){f+=1;break}let l=a.slice(u),n=a.slice(f,u);a.splice(f,a.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return vr=s,vr}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let{Input:e}=eo(),t=Xa();return Sr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Sr}var Ka=Qa();const Za=Vn(Ka);var el=eo();const Y=Vn(el);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;const _i={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 tl(e){let t=_i[e.tagName]?_i[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function to(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([$a,Wa]).process(e,{parser:Za}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Pi(){return{stylesWithHoverClass:new Map}}function rl(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=to(e.textContent,t.cache)}catch(s){}return t.doc.createTextNode(r)}function sl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case B.Document:return s.implementation.createDocument(null,"",null);case B.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case B.Element:{const o=tl(e);let u;e.isSVG?u=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),u=s.createElement(o));const f={};for(const l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let n=e.attributes[l];if(o==="option"&&l==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),l.startsWith("rr_")){f[l]=n;continue}const c=o==="textarea"&&l==="value",d=o==="style"&&l==="_cssText";if(d&&i&&typeof n=="string"&&(n=to(n,a)),(c||d)&&typeof n=="string"){u.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&l==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",l,n.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")u.setAttribute("_"+l,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){u.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",e.attributes.srcset):u.setAttribute(l,n.toString()))}catch(h){}}for(const l in f){const n=f[l];if(o==="canvas"&&l==="rr_dataURL"){const c=s.createElement("img");c.onload=()=>{const d=u.getContext("2d");d&&d.drawImage(c,0,0,c.width,c.height)},c.src=n.toString(),u.RRNodeType&&(u.rr_dataURL=n.toString())}else if(o==="img"&&l==="rr_dataURL"){const c=u;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=n.toString())}if(l==="rr_width")u.style.setProperty("width",n.toString());else if(l==="rr_height")u.style.setProperty("height",n.toString());else if(l==="rr_mediaCurrentTime"&&typeof n=="number")u.currentTime=n;else if(l==="rr_mediaState")switch(n){case"played":u.play().catch(c=>console.warn("media playback error",c));break;case"paused":u.pause();break}else l==="rr_mediaPlaybackRate"&&typeof n=="number"?u.playbackRate=n:l==="rr_mediaMuted"&&typeof n=="boolean"?u.muted=n:l==="rr_mediaLoop"&&typeof n=="boolean"?u.loop=n:l==="rr_mediaVolume"&&typeof n=="number"?u.volume=n:l==="rr_open_mode"&&u.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case B.Text:return rl(e,{cache:a,doc:s,hackCss:i});case B.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case B.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:u}=t;if(s.has(e.id)){const l=s.getNode(e.id),n=s.getMeta(l);if(ga(n,e))return s.getNode(e.id)}let f=sl(e,{doc:r,hackCss:a,cache:u});if(!f)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===B.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==B.DocumentType&&(e.childNodes[0].type===B.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=r),s.add(f,e),(e.type===B.Document||e.type===B.Element)&&!i)for(const l of e.childNodes){const n=tt(l,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:u});if(!n){console.warn("Failed to rebuild",l);continue}if(l.isShadow&&ls(f)&&f.shadowRoot)f.shadowRoot.appendChild(n);else if(e.type===B.Document&&l.type==B.Element){const c=n;let d=null;c.childNodes.forEach(h=>{h.nodeName==="BODY"&&(d=h)}),d?(c.removeChild(d),f.appendChild(n),c.appendChild(d)):f.appendChild(n)}else e.type===B.Document&&l.type===B.DocumentType&&f.firstChild&&f.firstChild.nodeType===1?f.insertBefore(n,f.firstChild):f.appendChild(n);o&&o(n,l.id)}return f}function il(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function nl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==B.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function ol(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:u=new us}=t,f=tt(e,{doc:r,mirror:u,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return il(u,l=>{s&&s(l),nl(l,u)}),f}var al=Object.defineProperty,ll=(e,t,r)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>ll(e,typeof t!="symbol"?t+"":t,r),ul=Object.defineProperty,cl=(e,t,r)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>cl(e,typeof t!="symbol"?t+"":t,r);let hl=class{constructor(){ki(this,"idNodeMap",new Map),ki(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fl(){return new hl}function dl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},Li;function ml(){if(Li)return mt.exports;Li=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const gl={},yl=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),pe=pl(yl);var Cr,Fi;function Ss(){if(Fi)return Cr;Fi=1;let e=ml(),t=pe;class r extends Error{constructor(i,a,o,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),o=g=>m(g),t&&(f=g=>t(g))}let l=a.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(w,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+o(g)+f(v)+`
43
- `+S+u("^")}let b=o(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+o(g)+f(h)+`
44
- `+b+u("^")}return" "+o(g)+f(h)}).join(`
42
+ https://www.w3ctech.com/topic/2226`));let N=b(...I);return N.postcssPlugin=C,N.postcssVersion=new d().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,F){return y([E(F)]).process(I,N)},E},y.stringify=g,y.parse=c,y.fromJSON=a,y.list=l,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new o(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=o,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),br=y,y.default=y,br}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let e=ot(),t=Qn(),r=Xn();class s extends t{checkMissedSemicolon(){}comment(o){let a=new e;this.init(a,o[2]);let u=this.input.fromOffset(o[3])||this.input.fromOffset(this.input.css.length-1);a.source.end={column:u.col,line:u.line,offset:o[3]+1};let f=o[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))a.text="",a.raws.left=f,a.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);a.text=l[2],a.raws.left=l[1],a.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(o){o.length>1&&o.some(a=>a[0]==="word")&&super.decl(o)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let u,f;for(u=a-1;u>=0&&o[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(o[f][0]!=="space"){f+=1;break}let l=o.slice(u),n=o.slice(f,u);o.splice(f,o.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(o){this.spaces+=o.map(a=>a[1]).join("")}unnamedAtrule(o){o.name=""}}return Sr=s,Sr}var Cr,_i;function Ka(){if(_i)return Cr;_i=1;let{Input:e}=to(),t=Qa();return Cr=function(s,i){let o=new e(s,i),a=new t(o);return a.parse(),a.root},Cr}var Za=Ka();const el=jn(Za);var tl=to();const Y=jn(tl);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;function ro(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([Wa,za]).process(e,{parser:el}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}const Pi={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 rl(e){let t=Pi[e.tagName]?Pi[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function ki(){return{stylesWithHoverClass:new Map}}function sl(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=ro(e.textContent,t.cache)}catch(s){}return t.doc.createTextNode(r)}function il(e,t){var r;const{doc:s,hackCss:i,cache:o}=t;switch(e.type){case B.Document:return s.implementation.createDocument(null,"",null);case B.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case B.Element:{const a=rl(e);let u;e.isSVG?u=s.createElementNS("http://www.w3.org/2000/svg",a):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),u=s.createElement(a));const f={};for(const l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let n=e.attributes[l];if(a==="option"&&l==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),l.startsWith("rr_")){f[l]=n;continue}const c=a==="textarea"&&l==="value",d=a==="style"&&l==="_cssText";if(d&&i&&typeof n=="string"&&(n=ro(n,o)),(c||d)&&typeof n=="string"){u.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&l==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",l,n.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")u.setAttribute("_"+l,n.toString());else if(a==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){u.setAttribute("csp-content",n.toString());continue}else a==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||a==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ds(e.attributes.href)==="js"||(a==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",e.attributes.srcset):u.setAttribute(l,n.toString()))}catch(h){}}for(const l in f){const n=f[l];if(a==="canvas"&&l==="rr_dataURL"){const c=s.createElement("img");c.onload=()=>{const d=u.getContext("2d");d&&d.drawImage(c,0,0,c.width,c.height)},c.src=n.toString(),u.RRNodeType&&(u.rr_dataURL=n.toString())}else if(a==="img"&&l==="rr_dataURL"){const c=u;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=n.toString())}if(l==="rr_width")u.style.setProperty("width",n.toString());else if(l==="rr_height")u.style.setProperty("height",n.toString());else if(l==="rr_mediaCurrentTime"&&typeof n=="number")u.currentTime=n;else if(l==="rr_mediaState")switch(n){case"played":u.play().catch(c=>console.warn("media playback error",c));break;case"paused":u.pause();break}else l==="rr_mediaPlaybackRate"&&typeof n=="number"?u.playbackRate=n:l==="rr_mediaMuted"&&typeof n=="boolean"?u.muted=n:l==="rr_mediaLoop"&&typeof n=="boolean"?u.loop=n:l==="rr_mediaVolume"&&typeof n=="number"?u.volume=n:l==="rr_open_mode"&&u.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case B.Text:return sl(e,{cache:o,doc:s,hackCss:i});case B.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case B.Comment:return s.createComment(e.textContent);default:return null}}function rt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:o=!0,afterAppend:a,cache:u}=t;if(s.has(e.id)){const l=s.getNode(e.id),n=s.getMeta(l);if(fa(n,e))return s.getNode(e.id)}let f=il(e,{doc:r,hackCss:o,cache:u});if(!f)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===B.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==B.DocumentType&&(e.childNodes[0].type===B.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=r),s.add(f,e),(e.type===B.Document||e.type===B.Element)&&!i)for(const l of e.childNodes){const n=rt(l,{doc:r,mirror:s,skipChild:!1,hackCss:o,afterAppend:a,cache:u});if(!n){console.warn("Failed to rebuild",l);continue}if(l.isShadow&&us(f)&&f.shadowRoot)f.shadowRoot.appendChild(n);else if(e.type===B.Document&&l.type==B.Element){const c=n;let d=null;c.childNodes.forEach(h=>{h.nodeName==="BODY"&&(d=h)}),d?(c.removeChild(d),f.appendChild(n),c.appendChild(d)):f.appendChild(n)}else e.type===B.Document&&l.type===B.DocumentType&&f.firstChild&&f.firstChild.nodeType===1?f.insertBefore(n,f.firstChild):f.appendChild(n);a&&a(n,l.id)}return f}function nl(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function ol(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==B.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const o=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=o),i==="rr_scrollTop"&&(s.scrollTop=o)}}function al(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:o,cache:a,mirror:u=new cs}=t,f=rt(e,{doc:r,mirror:u,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return nl(u,l=>{s&&s(l),ol(l,u)}),f}var ll=Object.defineProperty,ul=(e,t,r)=>t in e?ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>ul(e,typeof t!="symbol"?t+"":t,r),cl=Object.defineProperty,hl=(e,t,r)=>t in e?cl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Li=(e,t,r)=>hl(e,typeof t!="symbol"?t+"":t,r);let fl=class{constructor(){Li(this,"idNodeMap",new Map),Li(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function dl(){return new fl}function pl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ml(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var gt={exports:{}},Fi;function gl(){if(Fi)return gt.exports;Fi=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return gt.exports=t(),gt.exports.createColors=t,gt.exports}const yl={},wl=Object.freeze(Object.defineProperty({__proto__:null,default:yl},Symbol.toStringTag,{value:"Module"})),me=ml(wl);var Er,Bi;function Cs(){if(Bi)return Er;Bi=1;let e=gl(),t=me;class r extends Error{constructor(i,o,a,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof o!="undefined"&&typeof a!="undefined"&&(typeof o=="number"?(this.line=o,this.column=a):(this.line=o.line,this.column=o.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported);let a=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),a=g=>m(g),t&&(f=g=>t(g))}let l=o.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),b=h.slice(w,C),S=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(b)+`
43
+ `+S+u("^")}let v=a(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+a(g)+f(h)+`
44
+ `+v+u("^")}return" "+a(g)+f(h)}).join(`
45
45
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
46
46
 
47
47
  `+i+`
48
- `),this.name+": "+this.message+i}}return Cr=r,r.default=r,Cr}var Er,Bi;function ro(){if(Bi)return Er;Bi=1;const e={after:`
48
+ `),this.name+": "+this.message+i}}return Er=r,r.default=r,Er}var Rr,Ui;function so(){if(Ui)return Rr;Ui=1;const e={after:`
49
49
  `,beforeClose:`
50
50
  `,beforeComment:`
51
51
  `,beforeDecl:`
52
52
  `,beforeOpen:" ",beforeRule:`
53
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:u&&(o+=" "),i.nodes)this.block(i,o+u);else{let f=(i.raws.between||"")+(a?";":"");this.builder(o+u+f,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let u=i.parent,f=0;for(;u&&u.type!=="root";)f+=1,u=u.parent;if(o.includes(`
54
- `)){let l=this.raw(i,null,"indent");if(l.length)for(let n=0;n<f;n++)o+=l}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let f=i.nodes[u],l=this.raw(f,"before");l&&this.builder(l),this.stringify(f,a!==u||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),u=i.prop+o+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),a&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,a,o){let u;if(o||(o=a),a&&(u=i.raws[a],typeof u!="undefined"))return u;let f=i.parent;if(o==="before"&&(!f||f.type==="root"&&f.first===i||f&&f.type==="document"))return"";if(!f)return e[o];let l=i.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[o]!="undefined")return l.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?u=this[n](l,i):l.walk(c=>{if(u=c.raws[a],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=e[o]),l.rawCache[o]=u,u}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
55
- `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(u=>{if(typeof u.raws.before!="undefined")return o=u.raws.before,o.includes(`
56
- `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return o=u.raws.before,o.includes(`
57
- `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
58
- `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let u=o.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof o.raws.before!="undefined"){let f=o.raws.before.split(`
59
- `);return a=f[f.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],u=i.raws[a];return u&&u.value===o?u.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Er=r,r.default=r,Er}var Rr,Ui;function Bt(){if(Ui)return Rr;Ui=1;let e=ro();function t(r,s){new e(s).stringify(r)}return Rr=t,t.default=t,Rr}var gt={},$i;function Cs(){return $i||($i=1,gt.isClean=Symbol("isClean"),gt.my=Symbol("my")),gt}var xr,Wi;function Ut(){if(Wi)return xr;Wi=1;let e=Ss(),t=ro(),r=Bt(),{isClean:s,my:i}=Cs();function a(f,l){let n=new f.constructor;for(let c in f){if(!Object.prototype.hasOwnProperty.call(f,c)||c==="proxyCache")continue;let d=f[c],h=typeof d;c==="parent"&&h==="object"?l&&(n[c]=l):c==="source"?n[c]=d:Array.isArray(d)?n[c]=d.map(m=>a(m,n)):(h==="object"&&d!==null&&(d=a(d)),n[c]=d)}return n}function o(f,l){if(l&&typeof l.offset!="undefined")return l.offset;let n=1,c=1,d=0;for(let h=0;h<f.length;h++){if(c===l.line&&n===l.column){d=h;break}f[h]===`
60
- `?(n=1,c+=1):n+=1}return d}class u{constructor(l={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in l)if(n==="nodes"){this.nodes=[];for(let c of l[n])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[n]=l[n]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let n=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let n in l)this[n]=l[n];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let n=a(this);for(let c in l)n[c]=l[c];return n}cloneAfter(l={}){let n=this.clone(l);return this.parent.insertAfter(this,n),n}cloneBefore(l={}){let n=this.clone(l);return this.parent.insertBefore(this,n),n}error(l,n={}){if(this.source){let{end:c,start:d}=this.rangeBy(n);return this.source.input.error(l,{column:d.column,line:d.line},{column:c.column,line:c.line},n)}return new e(l)}getProxyProcessor(){return{get(l,n){return n==="proxyOf"?l:n==="root"?()=>l.root().toProxy():l[n]},set(l,n,c){return l[n]===c||(l[n]=c,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&l.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let l=this;for(;l=l.parent;)l[s]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l){let n=this.source.start;if(l.index)n=this.positionInside(l.index);else if(l.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,h=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(l.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(l){let n=this.source.start.column,c=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,h=o(d,this.source.start),m=h+l;for(let p=h;p<m;p++)d[p]===`
61
- `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(o(d,this.source.start),o(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return xr=u,u.default=u,xr}var Mr,zi;function at(){if(zi)return Mr;zi=1;let e=Ut();class t extends e{constructor(s){super(s),this.type="comment"}}return Mr=t,t.default=t,Mr}var Or,qi;function $t(){if(qi)return Or;qi=1;let e=Ut();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Or=t,t.default=t,Or}var Nr,Vi;function Le(){if(Vi)return Nr;Vi=1;let e=at(),t=$t(),r=Ut(),{isClean:s,my:i}=Cs(),a,o,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...b)=>p(g.toProxy(),...b)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,b=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let w of b)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+b.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(o(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new a(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(b){throw m.addToError(b)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{o=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{a=d},c.registerRoot=d=>{u=d},Nr=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,a.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},Nr}var Ir,ji;function Es(){if(ji)return Ir;ji=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Ir=t,t.default=t,e.registerAtRule(t),Ir}var Dr,Gi;function Rs(){if(Gi)return Dr;Gi=1;let e=Le(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Dr=s,s.default=s,Dr}var Ar,Hi;function wl(){if(Hi)return Ar;Hi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ar={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",u=a|0;for(;u--;)o+=s[Math.random()*s.length|0];return o}},Ar}var Tr,Yi;function so(){if(Yi)return Tr;Yi=1;let{existsSync:e,readFileSync:t}=pe,{dirname:r,join:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe;function o(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return o(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Tr=u,u.default=u,Tr}var _r,Ji;function Wt(){if(Ji)return _r;Ji=1;let{nanoid:e}=wl(),{isAbsolute:t,resolve:r}=pe,{SourceMapConsumer:s,SourceMapGenerator:i}=pe,{fileURLToPath:a,pathToFileURL:o}=pe,u=Ss(),f=so(),l=pe,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let b=new f(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,b,y={}){let w,C,v;if(g&&typeof g=="object"){let E=g,R=b;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,b=I.col}else g=E.line,b=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,w=I.col}else C=R.line,w=R.column}else if(!b){let E=this.fromOffset(g);g=E.line,b=E.col}let S=this.origin(g,b,C,w);return S?v=new u(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new u(p,C===void 0?g:{column:b,line:g},C===void 0?b:{column:w,line:C},this.css,this.file,y.plugin),v.input={column:b,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,b;if(this[n])b=this[n];else{let w=this.css.split(`
62
- `);b=new Array(w.length);let C=0;for(let v=0,S=w.length;v<S;v++)b[v]=C,C+=w[v].length+1;this[n]=b}g=b[b.length-1];let y=0;if(p>=g)y=b.length-1;else{let w=b.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<b[C])w=C-1;else if(p>=b[C+1])y=C+1;else{y=C;break}}return{col:p-b[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,b,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof b=="number"&&(v=w.originalPositionFor({column:y,line:b}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=w.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return _r=h,h.default=h,l&&l.registerInput&&l.registerInput(h),_r}var Pr,Xi;function lt(){if(Xi)return Pr;Xi=1;let e=Le(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,u){let f=super.normalize(a);if(o){if(u==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let l of f)l.raws.before=o.raws.before}return f}removeChild(a,o){let u=this.index(a);return!o&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Pr=s,s.default=s,e.registerRoot(s),Pr}var kr,Qi;function io(){if(Qi)return kr;Qi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
63
- `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,u=0,f=!1,l="",n=!1;for(let c of t)n?n=!1:c==="\\"?n=!0:f?c===l&&(f=!1):c==='"'||c==="'"?(f=!0,l=c):c==="("?u+=1:c===")"?u>0&&(u-=1):u===0&&r.includes(c)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=c;return(s||a!=="")&&i.push(a.trim()),i}};return kr=e,e.default=e,kr}var Lr,Ki;function xs(){if(Ki)return Lr;Ki=1;let e=Le(),t=io();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Lr=r,r.default=r,e.registerRule(r),Lr}var Fr,Zi;function bl(){if(Zi)return Fr;Zi=1;let e=Es(),t=at(),r=$t(),s=Wt(),i=so(),a=lt(),o=xs();function u(f,l){if(Array.isArray(f))return f.map(m=>u(m));let d=f,{inputs:n}=d,c=Be(d,["inputs"]);if(n){l=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),l.push(p)}}if(c.nodes&&(c.nodes=f.nodes.map(m=>u(m,l))),c.source){let h=c.source,{inputId:m}=h,p=Be(h,["inputId"]);c.source=p,m!=null&&(c.source.input=l[m])}if(c.type==="root")return new a(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new o(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+f.type)}return Fr=u,u.default=u,Fr}var Br,en;function no(){if(en)return Br;en=1;let{dirname:e,relative:t,resolve:r,sep:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe,{pathToFileURL:o}=pe,u=Wt(),f=!!(i&&a),l=!!(e&&r&&t&&s);class n{constructor(d,h,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let h=`
53
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,o){let a="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?a+=i.raws.afterName:u&&(a+=" "),i.nodes)this.block(i,a+u);else{let f=(i.raws.between||"")+(o?";":"");this.builder(a+u+f,i)}}beforeAfter(i,o){let a;i.type==="decl"?a=this.raw(i,null,"beforeDecl"):i.type==="comment"?a=this.raw(i,null,"beforeComment"):o==="before"?a=this.raw(i,null,"beforeRule"):a=this.raw(i,null,"beforeClose");let u=i.parent,f=0;for(;u&&u.type!=="root";)f+=1,u=u.parent;if(a.includes(`
54
+ `)){let l=this.raw(i,null,"indent");if(l.length)for(let n=0;n<f;n++)a+=l}return a}block(i,o){let a=this.raw(i,"between","beforeOpen");this.builder(o+a+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let o=i.nodes.length-1;for(;o>0&&i.nodes[o].type==="comment";)o-=1;let a=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let f=i.nodes[u],l=this.raw(f,"before");l&&this.builder(l),this.stringify(f,o!==u||a)}}comment(i){let o=this.raw(i,"left","commentLeft"),a=this.raw(i,"right","commentRight");this.builder("/*"+o+i.text+a+"*/",i)}decl(i,o){let a=this.raw(i,"between","colon"),u=i.prop+a+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),o&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,o,a){let u;if(a||(a=o),o&&(u=i.raws[o],typeof u!="undefined"))return u;let f=i.parent;if(a==="before"&&(!f||f.type==="root"&&f.first===i||f&&f.type==="document"))return"";if(!f)return e[a];let l=i.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[a]!="undefined")return l.rawCache[a];if(a==="before"||a==="after")return this.beforeAfter(i,a);{let n="raw"+t(a);this[n]?u=this[n](l,i):l.walk(c=>{if(u=c.raws[o],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=e[a]),l.rawCache[a]=u,u}rawBeforeClose(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length>0&&typeof a.raws.after!="undefined")return o=a.raws.after,o.includes(`
55
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(i,o){let a;return i.walkComments(u=>{if(typeof u.raws.before!="undefined")return a=u.raws.before,a.includes(`
56
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a=="undefined"?a=this.raw(o,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeDecl(i,o){let a;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return a=u.raws.before,a.includes(`
57
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a=="undefined"?a=this.raw(o,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeOpen(i){let o;return i.walk(a=>{if(a.type!=="decl"&&(o=a.raws.between,typeof o!="undefined"))return!1}),o}rawBeforeRule(i){let o;return i.walk(a=>{if(a.nodes&&(a.parent!==i||i.first!==a)&&typeof a.raws.before!="undefined")return o=a.raws.before,o.includes(`
58
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(a=>{if(typeof a.raws.between!="undefined")return o=a.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length===0&&(o=a.raws.after,typeof o!="undefined"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(a=>{let u=a.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof a.raws.before!="undefined"){let f=a.raws.before.split(`
59
+ `);return o=f[f.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(o=a.raws.semicolon,typeof o!="undefined"))return!1}),o}rawValue(i,o){let a=i[o],u=i.raws[o];return u&&u.value===a?u.raw:a}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return Rr=r,r.default=r,Rr}var xr,$i;function Ut(){if($i)return xr;$i=1;let e=so();function t(r,s){new e(s).stringify(r)}return xr=t,t.default=t,xr}var yt={},Wi;function Es(){return Wi||(Wi=1,yt.isClean=Symbol("isClean"),yt.my=Symbol("my")),yt}var Mr,zi;function $t(){if(zi)return Mr;zi=1;let e=Cs(),t=so(),r=Ut(),{isClean:s,my:i}=Es();function o(f,l){let n=new f.constructor;for(let c in f){if(!Object.prototype.hasOwnProperty.call(f,c)||c==="proxyCache")continue;let d=f[c],h=typeof d;c==="parent"&&h==="object"?l&&(n[c]=l):c==="source"?n[c]=d:Array.isArray(d)?n[c]=d.map(m=>o(m,n)):(h==="object"&&d!==null&&(d=o(d)),n[c]=d)}return n}function a(f,l){if(l&&typeof l.offset!="undefined")return l.offset;let n=1,c=1,d=0;for(let h=0;h<f.length;h++){if(c===l.line&&n===l.column){d=h;break}f[h]===`
60
+ `?(n=1,c+=1):n+=1}return d}class u{constructor(l={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in l)if(n==="nodes"){this.nodes=[];for(let c of l[n])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[n]=l[n]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let n=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let n in l)this[n]=l[n];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let n=o(this);for(let c in l)n[c]=l[c];return n}cloneAfter(l={}){let n=this.clone(l);return this.parent.insertAfter(this,n),n}cloneBefore(l={}){let n=this.clone(l);return this.parent.insertBefore(this,n),n}error(l,n={}){if(this.source){let{end:c,start:d}=this.rangeBy(n);return this.source.input.error(l,{column:d.column,line:d.line},{column:c.column,line:c.line},n)}return new e(l)}getProxyProcessor(){return{get(l,n){return n==="proxyOf"?l:n==="root"?()=>l.root().toProxy():l[n]},set(l,n,c){return l[n]===c||(l[n]=c,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&l.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let l=this;for(;l=l.parent;)l[s]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l){let n=this.source.start;if(l.index)n=this.positionInside(l.index);else if(l.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,h=c.slice(a(c,this.source.start),a(c,this.source.end)).indexOf(l.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(l){let n=this.source.start.column,c=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,h=a(d,this.source.start),m=h+l;for(let p=h;p<m;p++)d[p]===`
61
+ `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(a(d,this.source.start),a(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return Mr=u,u.default=u,Mr}var Nr,qi;function lt(){if(qi)return Nr;qi=1;let e=$t();class t extends e{constructor(s){super(s),this.type="comment"}}return Nr=t,t.default=t,Nr}var Or,Vi;function Wt(){if(Vi)return Or;Vi=1;let e=$t();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Or=t,t.default=t,Or}var Ir,ji;function Le(){if(ji)return Ir;ji=1;let e=lt(),t=Wt(),r=$t(),{isClean:s,my:i}=Es(),o,a,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...v)=>p(g.toProxy(),...v)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],p<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let w of v)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new o(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(v){throw m.addToError(v)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{a=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{o=d},c.registerRoot=d=>{u=d},Ir=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,o.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},Ir}var Dr,Gi;function Rs(){if(Gi)return Dr;Gi=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Dr=t,t.default=t,e.registerAtRule(t),Dr}var Ar,Hi;function xs(){if(Hi)return Ar;Hi=1;let e=Le(),t,r;class s extends e{constructor(o){super(L({type:"document"},o)),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Ar=s,s.default=s,Ar}var Tr,Yi;function vl(){if(Yi)return Tr;Yi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Tr={nanoid:(s=21)=>{let i="",o=s|0;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(o=i)=>{let a="",u=o|0;for(;u--;)a+=s[Math.random()*s.length|0];return a}},Tr}var _r,Ji;function io(){if(Ji)return _r;Ji=1;let{existsSync:e,readFileSync:t}=me,{dirname:r,join:s}=me,{SourceMapConsumer:i,SourceMapGenerator:o}=me;function a(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return a(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return o.fromSourceMap(n).toString();if(n instanceof o)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return _r=u,u.default=u,_r}var Pr,Xi;function zt(){if(Xi)return Pr;Xi=1;let{nanoid:e}=vl(),{isAbsolute:t,resolve:r}=me,{SourceMapConsumer:s,SourceMapGenerator:i}=me,{fileURLToPath:o,pathToFileURL:a}=me,u=Cs(),f=io(),l=me,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let v=new f(this.css,g);if(v.text){this.map=v;let y=v.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,v,y={}){let w,C,b;if(g&&typeof g=="object"){let E=g,R=v;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,v=I.col}else g=E.line,v=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,w=I.col}else C=R.line,w=R.column}else if(!v){let E=this.fromOffset(g);g=E.line,v=E.col}let S=this.origin(g,v,C,w);return S?b=new u(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):b=new u(p,C===void 0?g:{column:v,line:g},C===void 0?v:{column:w,line:C},this.css,this.file,y.plugin),b.input={column:v,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(a&&(b.input.url=a(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let g,v;if(this[n])v=this[n];else{let w=this.css.split(`
62
+ `);v=new Array(w.length);let C=0;for(let b=0,S=w.length;b<S;b++)v[b]=C,C+=w[b].length+1;this[n]=v}g=v[v.length-1];let y=0;if(p>=g)y=v.length-1;else{let w=v.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<v[C])w=C-1;else if(p>=v[C+1])y=C+1;else{y=C;break}}return{col:p-v[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,v,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let b;typeof v=="number"&&(b=w.originalPositionFor({column:y,line:v}));let S;t(C.source)?S=a(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let E={column:C.column,endColumn:b&&b.column,endLine:b&&b.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(o)E.file=o(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=w.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Pr=h,h.default=h,l&&l.registerInput&&l.registerInput(h),Pr}var kr,Qi;function ut(){if(Qi)return kr;Qi=1;let e=Le(),t,r;class s extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,a,u){let f=super.normalize(o);if(a){if(u==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let l of f)l.raws.before=a.raws.before}return f}removeChild(o,a){let u=this.index(o);return!a&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},kr=s,s.default=s,e.registerRoot(s),kr}var Lr,Ki;function no(){if(Ki)return Lr;Ki=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
63
+ `," "];return e.split(t,r)},split(t,r,s){let i=[],o="",a=!1,u=0,f=!1,l="",n=!1;for(let c of t)n?n=!1:c==="\\"?n=!0:f?c===l&&(f=!1):c==='"'||c==="'"?(f=!0,l=c):c==="("?u+=1:c===")"?u>0&&(u-=1):u===0&&r.includes(c)&&(a=!0),a?(o!==""&&i.push(o.trim()),o="",a=!1):o+=c;return(s||o!=="")&&i.push(o.trim()),i}};return Lr=e,e.default=e,Lr}var Fr,Zi;function Ms(){if(Zi)return Fr;Zi=1;let e=Le(),t=no();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,a=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(a)}}return Fr=r,r.default=r,e.registerRule(r),Fr}var Br,en;function bl(){if(en)return Br;en=1;let e=Rs(),t=lt(),r=Wt(),s=zt(),i=io(),o=ut(),a=Ms();function u(f,l){if(Array.isArray(f))return f.map(m=>u(m));let d=f,{inputs:n}=d,c=Ue(d,["inputs"]);if(n){l=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),l.push(p)}}if(c.nodes&&(c.nodes=f.nodes.map(m=>u(m,l))),c.source){let h=c.source,{inputId:m}=h,p=Ue(h,["inputId"]);c.source=p,m!=null&&(c.source.input=l[m])}if(c.type==="root")return new o(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new a(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+f.type)}return Br=u,u.default=u,Br}var Ur,tn;function oo(){if(tn)return Ur;tn=1;let{dirname:e,relative:t,resolve:r,sep:s}=me,{SourceMapConsumer:i,SourceMapGenerator:o}=me,{pathToFileURL:a}=me,u=zt(),f=!!(i&&o),l=!!(e&&r&&t&&s);class n{constructor(d,h,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let h=`
64
64
  `;this.css.includes(`\r
65
65
  `)&&(h=`\r
66
- `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=a.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=h-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),b=y.match(/\n/g),b?(d+=b.length,g=y.lastIndexOf(`
67
- `),h=y.length-g):h+=y.length,w&&C!=="start"){let v=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==v.last||v.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Br=n,Br}var Ur,tn;function oo(){if(tn)return Ur;tn=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,b=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Ur=function(R,I={}){let O=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=O.length,N=0,ge=[],ce=[];function Qe(){return N}function le(k){throw R.error("Unclosed "+k,N)}function he(){return ce.length===0&&N>=Ee}function Pe(k){if(ce.length)return ce.pop();if(N>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=O.charCodeAt(N),D){case i:case a:case u:case f:case o:{x=N;do x+=1,D=O.charCodeAt(x);while(D===a||D===i||D===u||D===f||D===o);P=["space",O.slice(N,x)],N=x-1;break}case l:case n:case h:case m:case b:case p:case d:{let j=String.fromCharCode(D);P=[j,j,N];break}case c:{if(be=ge.length?ge.pop()[1]:"",X=O.charCodeAt(N+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==u&&X!==o&&X!==f){x=N;do{if(V=!1,x=O.indexOf(")",x+1),x===-1)if(F||te){x=N;break}else le("bracket");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",O.slice(N,x+1),N,x],N=x}else x=O.indexOf(")",N+1),re=O.slice(N,x+1),x===-1||v.test(re)?P=["(","(",N]:(P=["brackets",re,N,x],N=x);break}case e:case t:{Z=D===e?"'":'"',x=N;do{if(V=!1,x=O.indexOf(Z,x+1),x===-1)if(F||te){x=N+1;break}else le("string");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",O.slice(N,x+1),N,x],N=x;break}case y:{w.lastIndex=N+1,w.test(O),w.lastIndex===0?x=O.length-1:x=w.lastIndex-2,P=["at-word",O.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,ie=!0;O.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=O.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==u&&D!==f&&D!==o&&(x+=1,S.test(O.charAt(x)))){for(;S.test(O.charAt(x+1));)x+=1;O.charCodeAt(x+1)===a&&(x+=1)}P=["word",O.slice(N,x+1),N,x],N=x;break}default:{D===s&&O.charCodeAt(N+1)===g?(x=O.indexOf("*/",N+2)+1,x===0&&(F||te?x=O.length:le("comment")),P=["comment",O.slice(N,x+1),N,x],N=x):(C.lastIndex=N+1,C.test(O),C.lastIndex===0?x=O.length-1:x=C.lastIndex-2,P=["word",O.slice(N,x+1),N,x],ge.push(P),N=x);break}}return N++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:Pe,position:Qe}},Ur}var $r,rn;function ao(){if(rn)return $r;rn=1;let e=Es(),t=at(),r=$t(),s=lt(),i=xs(),a=oo();const o={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(b.length>0){for(m=b.length-1,h=b[m];h&&h[0]==="space";)h=b[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(c.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(c,"params",b),p&&(n=b[b.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let v=y;v>0;v--){let S=w[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(d=y[0],b.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(b,g);return}else break;else if(d==="{"){this.rule(b);return}else if(d==="}"){this.tokenizer.back(b.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,b="",y=!0,w,C;for(let v=0;v<g;v+=1)m=d[v],p=m[0],p==="space"&&v===g-1&&!h?y=!1:p==="comment"?(C=d[v-1]?d[v-1][0]:"empty",w=d[v+1]?d[v+1][0]:"empty",!o[C]&&!o[w]?b.slice(-1)===","?y=!1:b+=m[1]:y=!1):b+=m[1];if(!y){let v=d.reduce((S,E)=>S+E[1],"");n.raws[c]={raw:v,value:b}}n[c]=b}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return $r=f,$r}var Wr,sn;function Ms(){if(sn)return Wr;sn=1;let e=Le(),t=Wt(),r=ao();function s(i,a){let o=new t(i,a),u=new r(o);try{u.parse()}catch(f){throw f}return u.root}return Wr=s,s.default=s,e.registerParse(s),Wr}var zr,nn;function lo(){if(nn)return zr;nn=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return zr=e,e.default=e,zr}var qr,on;function Os(){if(on)return qr;on=1;let e=lo();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return qr=t,t.default=t,qr}var Vr,an;function uo(){if(an)return Vr;an=1;let e={};return Vr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Vr}var jr,ln;function co(){if(ln)return jr;ln=1;let e=Le(),t=Rs(),r=no(),s=Ms(),i=Os(),a=lt(),o=Bt(),{isClean:u,my:f}=Cs(),l=uo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,h,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",h,"DocumentExit"]:C.type==="root"?v=["Root",h,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function b(C){return C[u]=!1,C.nodes&&C.nodes.forEach(v=>b(v)),C}let y={};class w{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=b(S);else if(S instanceof w||S instanceof i)R=b(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(O){this.processed=!0,this.error=O}R&&!R[f]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!c[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[u];){v[u]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[u];)v[u]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(O){throw this.handleError(O,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[O,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=O;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let O=S.iterator,F;for(;F=E.nodes[E.indexes[O]];)if(E.indexes[O]+=1,!F[u]){F[u]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[O]}let I=S.events;for(;S.eventIndex<I.length;){let O=I[S.eventIndex];if(S.eventIndex+=1,O===h){E.nodes&&E.nodes.length&&(E[u]=!0,S.iterator=E.getIterator());return}else if(this.listeners[O]){S.visitors=this.listeners[O];return}}v.pop()}walkSync(v){v[u]=!0;let S=p(v);for(let E of S)if(E===h)v.nodes&&v.each(R=>{R[u]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},jr=w,w.default=w,a.registerLazyResult(w),t.registerLazyResult(w),jr}var Gr,un;function vl(){if(un)return Gr;un=1;let e=no(),t=Ms();const r=Os();let s=Bt(),i=uo();class a{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return Gr=a,a.default=a,Gr}var Hr,cn;function Sl(){if(cn)return Hr;cn=1;let e=Rs(),t=co(),r=vl(),s=lt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let u=[];for(let f of o)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(o,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,o,u):new t(this,o,u)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Hr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Hr}var Yr,hn;function ho(){if(hn)return Yr;hn=1;let e=Es(),t=at(),r=Le(),s=Ss(),i=$t(),a=Rs(),o=bl(),u=Wt(),f=co(),l=io(),n=Ut(),c=Ms(),d=Sl(),h=Os(),m=lt(),p=xs(),g=Bt(),b=lo();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
66
+ `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=o.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new o({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 o({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=h-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),v=y.match(/\n/g),v?(d+=v.length,g=y.lastIndexOf(`
67
+ `),h=y.length-g):h+=y.length,w&&C!=="start"){let b=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==b.last||b.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(a){let m=a(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Ur=n,Ur}var $r,rn;function ao(){if(rn)return $r;rn=1;const e=39,t=34,r=92,s=47,i=10,o=32,a=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return $r=function(R,I={}){let N=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,K,P,V,Z,X,ve,Ee=N.length,O=0,ye=[],he=[];function Ke(){return O}function le(k){throw R.error("Unclosed "+k,O)}function ue(){return he.length===0&&O>=Ee}function Pe(k){if(he.length)return he.pop();if(O>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=N.charCodeAt(O),D){case i:case o:case u:case f:case a:{x=O;do x+=1,D=N.charCodeAt(x);while(D===o||D===i||D===u||D===f||D===a);P=["space",N.slice(O,x)],O=x-1;break}case l:case n:case h:case m:case v:case p:case d:{let j=String.fromCharCode(D);P=[j,j,O];break}case c:{if(ve=ye.length?ye.pop()[1]:"",X=N.charCodeAt(O+1),ve==="url"&&X!==e&&X!==t&&X!==o&&X!==i&&X!==u&&X!==a&&X!==f){x=O;do{if(V=!1,x=N.indexOf(")",x+1),x===-1)if(F||te){x=O;break}else le("bracket");for(Z=x;N.charCodeAt(Z-1)===r;)Z-=1,V=!V}while(V);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),re=N.slice(O,x+1),x===-1||b.test(re)?P=["(","(",O]:(P=["brackets",re,O,x],O=x);break}case e:case t:{K=D===e?"'":'"',x=O;do{if(V=!1,x=N.indexOf(K,x+1),x===-1)if(F||te){x=O+1;break}else le("string");for(Z=x;N.charCodeAt(Z-1)===r;)Z-=1,V=!V}while(V);P=["string",N.slice(O,x+1),O,x],O=x;break}case y:{w.lastIndex=O+1,w.test(N),w.lastIndex===0?x=N.length-1:x=w.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=N.charCodeAt(x+1),ie&&D!==s&&D!==o&&D!==i&&D!==u&&D!==f&&D!==a&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===o&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{D===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(F||te?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ye.push(P),O=x);break}}return O++,P}function Re(k){he.push(k)}return{back:Re,endOfFile:ue,nextToken:Pe,position:Ke}},$r}var Wr,sn;function lo(){if(sn)return Wr;sn=1;let e=Rs(),t=lt(),r=Wt(),s=ut(),i=Ms(),o=ao();const a={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,v=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,h=v[m];h&&h[0]==="space";)h=v[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(c.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(c,"params",v),p&&(n=v[v.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let b=y;b>0;b--){let S=w[b][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),v=[],y=n;for(;y;){if(d=y[0],v.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(v,g);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;v.length&&(y=v[v.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,v="",y=!0,w,C;for(let b=0;b<g;b+=1)m=d[b],p=m[0],p==="space"&&b===g-1&&!h?y=!1:p==="comment"?(C=d[b-1]?d[b-1][0]:"empty",w=d[b+1]?d[b+1][0]:"empty",!a[C]&&!a[w]?v.slice(-1)===","?y=!1:v+=m[1]:y=!1):v+=m[1];if(!y){let b=d.reduce((S,E)=>S+E[1],"");n.raws[c]={raw:b,value:v}}n[c]=v}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return Wr=f,Wr}var zr,nn;function Ns(){if(nn)return zr;nn=1;let e=Le(),t=zt(),r=lo();function s(i,o){let a=new t(i,o),u=new r(a);try{u.parse()}catch(f){throw f}return u.root}return zr=s,s.default=s,e.registerParse(s),zr}var qr,on;function uo(){if(on)return qr;on=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return qr=e,e.default=e,qr}var Vr,an;function Os(){if(an)return Vr;an=1;let e=uo();class t{constructor(s,i,o){this.processor=s,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(s,i);return this.messages.push(o),o}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return Vr=t,t.default=t,Vr}var jr,ln;function co(){if(ln)return jr;ln=1;let e={};return jr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},jr}var Gr,un;function ho(){if(un)return Gr;un=1;let e=Le(),t=xs(),r=oo(),s=Ns(),i=Os(),o=ut(),a=Ut(),{isClean:u,my:f}=Es(),l=co();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let b=!1,S=n[C.type];return C.type==="decl"?b=C.prop.toLowerCase():C.type==="atrule"&&(b=C.name.toLowerCase()),b&&C.append?[S,S+"-"+b,h,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let b;return C.type==="document"?b=["Document",h,"DocumentExit"]:C.type==="root"?b=["Root",h,"RootExit"]:b=p(C),{eventIndex:0,events:b,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[u]=!1,C.nodes&&C.nodes.forEach(b=>v(b)),C}let y={};class w{constructor(b,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=v(S);else if(S instanceof w||S instanceof i)R=v(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[f]&&e.rebuild(R)}this.result=new i(b,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let E=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=E.postcssPlugin,b.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return b}prepareVisitors(){this.listeners={};let b=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!c[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?b(S,E,S[E][R]):b(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&b(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];){b[u]=!0;let S=[g(b)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let R=b.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(b,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>b.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=a;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 b of this.plugins){let S=this.runOnRoot(b);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];)b[u]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[E,R]of b){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){b.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let N=S.iterator,F;for(;F=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!F[u]){F[u]=!0,b.push(g(F));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===h){E.nodes&&E.nodes.length&&(E[u]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}b.pop()}walkSync(b){b[u]=!0;let S=p(b);for(let E of S)if(E===h)b.nodes&&b.each(R=>{R[u]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},Gr=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),Gr}var Hr,cn;function Sl(){if(cn)return Hr;cn=1;let e=oo(),t=Ns();const r=Os();let s=Ut(),i=co();class o{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return Hr=o,o.default=o,Hr}var Yr,hn;function Cl(){if(hn)return Yr;hn=1;let e=xs(),t=ho(),r=Sl(),s=ut();class i{constructor(a=[]){this.version="8.5.1",this.plugins=this.normalize(a)}normalize(a){let u=[];for(let f of a)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(a,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,a,u):new t(this,a,u)}use(a){return this.plugins=this.plugins.concat(this.normalize([a])),this}}return Yr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Yr}var Jr,fn;function fo(){if(fn)return Jr;fn=1;let e=Rs(),t=lt(),r=Le(),s=Cs(),i=Wt(),o=xs(),a=bl(),u=zt(),f=ho(),l=no(),n=$t(),c=Ns(),d=Cl(),h=Os(),m=ut(),p=Ms(),g=Ut(),v=uo();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,b){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
68
68
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
69
- https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new d().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=c,y.fromJSON=o,y.list=l,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new a(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),Yr=y,y.default=y,Yr}var Jr,fn;function Cl(){if(fn)return Jr;fn=1;let e=at(),t=ao(),r=oo();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let u=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:u.col,line:u.line,offset:a[3]+1};let f=a[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))o.text="",o.raws.left=f,o.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);o.text=l[2],o.raws.left=l[1],o.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let u,f;for(u=o-1;u>=0&&a[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(a[f][0]!=="space"){f+=1;break}let l=a.slice(u),n=a.slice(f,u);a.splice(f,a.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Jr=s,Jr}var Xr,dn;function El(){if(dn)return Xr;dn=1;let{Input:e}=ho(),t=Cl();return Xr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Xr}El();var Rl=ho();const J=dl(Rl);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var $=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function xl(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(s);o.length>1&&(t[rs(o[0].trim())]=o[1].trim())}}),t}function pn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Il(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Ml=/-([a-z])/g,Ol=/^--[a-zA-Z0-9-]+$/,rs=e=>Ol.test(e)?e:e.replace(Ml,(t,r)=>r?r.toUpperCase():""),Nl=/\B([A-Z])/g,Il=e=>e.replace(Nl,"-$1").toLowerCase();class me{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof me){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Ns extends me{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",$.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Is(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=yo(this,t,r);return i.parentElement=null,i}removeChild(t){return wo(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Ns}createDocumentType(t,r,s){const i=new fo(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new zt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new po(t);return r.ownerDocument=this,r}createComment(t){const r=new mo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new go(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class fo extends me{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",$.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class zt extends me{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",$.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Tl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?xl(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const o=rs(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=pn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=rs(s),a=t[i]||"";return delete t[i],this.attributes.style=pn(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Is(this,t)}insertBefore(t,r){return yo(this,t,r)}removeChild(t){return wo(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Dl extends zt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Al extends zt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(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 po extends me{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",$.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class mo extends me{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",$.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class go extends me{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",$.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Tl{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function Is(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function yo(e,t,r){if(!r)return Is(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function wo(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ue=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ue||{});const ss={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},_l={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function Nt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=Pl(e,t,r,s),bo(e,t,r,s),kl(e,t,r)}function Pl(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ds(e,t)){const a=It(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case $.Document:{if(!$e(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case $.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const u=e.contentDocument;if(!u)break;Nt(u,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),bo(a.shadowRoot,o.shadowRoot,r,s)),Ll(a,o,s);break}}return e}function kl(e,t,r){var s;switch(t.RRNodeType){case $.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case $.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,u=a;u.paused!==void 0&&(u.paused?o.pause():o.play()),u.muted!==void 0&&(o.muted=u.muted),u.volume!==void 0&&(o.volume=u.volume),u.currentTime!==void 0&&(o.currentTime=u.currentTime),u.playbackRate!==void 0&&(o.playbackRate=u.playbackRate),u.loop!==void 0&&(o.loop=u.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const u=document.createElement("img");u.onload=()=>{const f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=o.rr_dataURL}o.canvasMutations.forEach(u=>r.applyCanvas(u.event,u.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(u=>r.applyStyleSheetMutation(u,o));break}case"DIALOG":{const o=i,u=a,f=o.open,l=o.matches("dialog:modal"),n=u.open,c=u.isModal,d=l!==c,h=f!==n;if((d||f&&h)&&o.close(),n&&(h||d))try{c?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case $.Text:case $.Comment:case $.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function Ll(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const o=i[a],u=r.getMeta(t);if(u!=null&&u.isSVG&&ss[a])e.setAttributeNS(ss[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const f=document.createElement("img");f.src=o,f.onload=()=>{const l=e.getContext("2d");l&&l.drawImage(f,0,0,f.width,f.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(f){console.warn(f)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function bo(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,u=i.length-1,f=0,l=a.length-1,n=i[o],c=i[u],d=a[f],h=a[l],m,p;for(;o<=u&&f<=l;)if(n===void 0)n=i[++o];else if(c===void 0)c=i[--u];else if($e(n,d,r.mirror,s))n=i[++o],d=a[++f];else if($e(c,h,r.mirror,s))c=i[--u],h=a[--l];else if($e(n,h,r.mirror,s)){try{e.insertBefore(n,c.nextSibling)}catch(y){console.warn(y)}n=i[++o],h=a[--l]}else if($e(c,d,r.mirror,s)){try{e.insertBefore(c,n)}catch(y){console.warn(y)}c=i[--u],d=a[++f]}else{if(!m){m={};for(let w=o;w<=u;w++){const C=i[w];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=w)}}p=m[s.getId(d)];const y=i[p];if(p!==void 0&&y&&$e(y,d,r.mirror,s)){try{e.insertBefore(y,n)}catch(w){console.warn(w)}i[p]=void 0}else{const w=It(d,r.mirror,s);e.nodeName==="#document"&&n&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(w,n||null)}catch(C){console.warn(C)}}d=a[++f]}if(o>u){const y=a[l+1];let w=null;for(y&&(w=r.mirror.getNode(s.getId(y)));f<=l;++f){const C=It(a[f],r.mirror,s);try{e.insertBefore(C,w)}catch(v){console.warn(v)}}}else if(f>l)for(;o<=u;o++){const y=i[o];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(w){console.warn(w)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)Nt(g,b,r,s),g=g.nextSibling,b=b.nextSibling}function It(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ds(a,e))return a;switch(e.RRNodeType){case $.Document:a=new Document;break;case $.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let o=e.tagName.toLowerCase();o=_l[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(ss.svg,o):a=document.createElement(e.tagName);break}case $.Text:a=document.createTextNode(e.data);break;case $.Comment:a=document.createComment(e.data);break;case $.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,L({},i));try{we==null||we.add(a)}catch(o){}return a}function Ds(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function $e(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ds(e,t)}class Xe extends Ns{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Yl()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Xe}createDocumentType(t,r,s){const i=new Fl(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new Bl(r);break;case"IFRAME":s=new zl(r,this.mirror);break;case"CANVAS":s=new $l(r);break;case"STYLE":s=new Wl(r);break;case"DIALOG":s=new Ul(r);break;default:s=new qt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new Vl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new jl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new ql(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Fl=fo;class qt extends zt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Bl extends Dl{}class Ul extends Al{}class $l extends qt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Wl extends qt{constructor(){super(...arguments),A(this,"rules",[])}}class zl extends qt{constructor(t,r){super(t),A(this,"contentDocument",new Xe),this.contentDocument.mirror=r}}const ql=po,Vl=mo,jl=go;function Gl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function vo(e,t,r,s){let i;switch(e.nodeType){case ue.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ue.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case ue.ELEMENT_NODE:{const o=e,u=Gl(o);i=t.createElement(u);const f=i;for(const{name:l,value:n}of Array.from(o.attributes))f.attributes[l]=n;o.scrollLeft&&(f.scrollLeft=o.scrollLeft),o.scrollTop&&(f.scrollTop=o.scrollTop);break}case ue.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ue.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ue.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ue.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof Xe&&(a||(a=So(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,L({},a))),i}function Hl(e,t=fl(),r=new Xe){function s(i,a){const o=vo(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==ue.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const u=i.contentDocument;u&&s(u,o)}else(i.nodeType===ue.DOCUMENT_NODE||i.nodeType===ue.ELEMENT_NODE||i.nodeType===ue.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ue.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(u=>s(u,o)))}return s(e,null),r}function Yl(){return new Jl}class Jl{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function So(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const mn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},gn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function Xl(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function As(e){if(yt[e])return yt[e];const t=Xl(e)||globalThis[e],r=t.prototype,s=e in mn?mn[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),a=e in gn?gn[e]:void 0,o=!!(a&&a.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&o)return yt[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?yt[e]=l:r}catch(u){return r}}const Qr={};function Te(e,t,r){var s;const i=`${e}.${String(r)}`;if(Qr[i])return Qr[i].call(t);const a=As(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(Qr[i]=o,o.call(t)):t[r]}const Kr={};function Co(e,t,r){const s=`${e}.${String(r)}`;if(Kr[s])return Kr[s].bind(t);const a=As(e)[r];return typeof a!="function"?t[r]:(Kr[s]=a,a.bind(t))}function Ql(e){return Te("Node",e,"childNodes")}function Kl(e){return Te("Node",e,"parentNode")}function Zl(e){return Te("Node",e,"parentElement")}function eu(e){return Te("Node",e,"textContent")}function tu(e,t){return Co("Node",e,"contains")(t)}function ru(e){return Co("Node",e,"getRootNode")()}function su(e){return!e||!("host"in e)?null:Te("ShadowRoot",e,"host")}function iu(e){return e.styleSheets}function nu(e){return!e||!("shadowRoot"in e)?null:Te("Element",e,"shadowRoot")}function ou(e,t){return Te("Element",e,"querySelector")(t)}function au(e,t){return Te("Element",e,"querySelectorAll")(t)}function Eo(){return As("MutationObserver").constructor}function Fe(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const U={childNodes:Ql,parentNode:Kl,parentElement:Zl,textContent:eu,contains:tu,getRootNode:ru,host:su,styleSheets:iu,shadowRoot:nu,querySelector:ou,querySelectorAll:au,mutationObserver:Eo,patch:Fe};function oe(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const We=`Please stop import mirror directly. Instead of that,\r
69
+ https://www.w3ctech.com/topic/2226`));let N=b(...I);return N.postcssPlugin=C,N.postcssVersion=new d().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,F){return y([E(F)]).process(I,N)},E},y.stringify=g,y.parse=c,y.fromJSON=a,y.list=l,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new o(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=o,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),Jr=y,y.default=y,Jr}var Xr,dn;function El(){if(dn)return Xr;dn=1;let e=lt(),t=lo(),r=ao();class s extends t{checkMissedSemicolon(){}comment(o){let a=new e;this.init(a,o[2]);let u=this.input.fromOffset(o[3])||this.input.fromOffset(this.input.css.length-1);a.source.end={column:u.col,line:u.line,offset:o[3]+1};let f=o[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))a.text="",a.raws.left=f,a.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);a.text=l[2],a.raws.left=l[1],a.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(o){o.length>1&&o.some(a=>a[0]==="word")&&super.decl(o)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let u,f;for(u=a-1;u>=0&&o[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(o[f][0]!=="space"){f+=1;break}let l=o.slice(u),n=o.slice(f,u);o.splice(f,o.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(o){this.spaces+=o.map(a=>a[1]).join("")}unnamedAtrule(o){o.name=""}}return Xr=s,Xr}var Qr,pn;function Rl(){if(pn)return Qr;pn=1;let{Input:e}=fo(),t=El();return Qr=function(s,i){let o=new e(s,i),a=new t(o);return a.parse(),a.root},Qr}Rl();var xl=fo();const J=pl(xl);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var $=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function Ml(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(o){if(o){const a=o.split(s);a.length>1&&(t[ss(a[0].trim())]=a[1].trim())}}),t}function mn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Dl(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Nl=/-([a-z])/g,Ol=/^--[a-zA-Z0-9-]+$/,ss=e=>Ol.test(e)?e:e.replace(Nl,(t,r)=>r?r.toUpperCase():""),Il=/\B([A-Z])/g,Dl=e=>e.replace(Il,"-$1").toLowerCase();class ge{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof ge){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Is extends ge{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",$.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Ds(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=wo(this,t,r);return i.parentElement=null,i}removeChild(t){return vo(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Is}createDocumentType(t,r,s){const i=new po(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new qt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new mo(t);return r.ownerDocument=this,r}createComment(t){const r=new go(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new yo(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class po extends ge{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",$.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class qt extends ge{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",$.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new _l(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Ml(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,o)=>{if(r.test(s))return;const a=ss(s);i?t[a]=i:delete t[a],o==="important"&&(t[a]+=" !important"),this.attributes.style=mn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=ss(s),o=t[i]||"";return delete t[i],this.attributes.style=mn(t),o},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Ds(this,t)}insertBefore(t,r){return wo(this,t,r)}removeChild(t){return vo(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Al extends qt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Tl extends qt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(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 mo extends ge{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",$.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class go extends ge{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",$.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class yo extends ge{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",$.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class _l{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function Ds(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function wo(e,t,r){if(!r)return Ds(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function vo(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ce=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ce||{});const is={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Pl={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function It(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=kl(e,t,r,s),bo(e,t,r,s),Ll(e,t,r)}function kl(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!As(e,t)){const o=Dt(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case $.Document:{if(!We(e,t,r.mirror,s)){const o=s.getMeta(t);o&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,o),we==null||we.add(e))}break}case $.Element:{const o=e,a=t;switch(a.tagName){case"IFRAME":{const u=e.contentDocument;if(!u)break;It(u,t.contentDocument,r,s);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),bo(o.shadowRoot,a.shadowRoot,r,s)),Fl(o,a,s);break}}return e}function Ll(e,t,r){var s;switch(t.RRNodeType){case $.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case $.Element:{const i=e,o=t;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const a=e,u=o;u.paused!==void 0&&(u.paused?a.pause():a.play()),u.muted!==void 0&&(a.muted=u.muted),u.volume!==void 0&&(a.volume=u.volume),u.currentTime!==void 0&&(a.currentTime=u.currentTime),u.playbackRate!==void 0&&(a.playbackRate=u.playbackRate),u.loop!==void 0&&(a.loop=u.loop);break}case"CANVAS":{const a=t;if(a.rr_dataURL!==null){const u=document.createElement("img");u.onload=()=>{const f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=a.rr_dataURL}a.canvasMutations.forEach(u=>r.applyCanvas(u.event,u.mutation,e));break}case"STYLE":{const a=i.sheet;a&&t.rules.forEach(u=>r.applyStyleSheetMutation(u,a));break}case"DIALOG":{const a=i,u=o,f=a.open,l=a.matches("dialog:modal"),n=u.open,c=u.isModal,d=l!==c,h=f!==n;if((d||f&&h)&&a.close(),n&&(h||d))try{c?a.showModal():a.show()}catch(m){console.warn(m)}break}}break}case $.Text:case $.Comment:case $.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function Fl(e,t,r){const s=e.attributes,i=t.attributes;for(const o in i){const a=i[o],u=r.getMeta(t);if(u!=null&&u.isSVG&&is[o])e.setAttributeNS(is[o],o,a);else if(t.tagName==="CANVAS"&&o==="rr_dataURL"){const f=document.createElement("img");f.src=a,f.onload=()=>{const l=e.getContext("2d");l&&l.drawImage(f,0,0,f.width,f.height)}}else{if(t.tagName==="IFRAME"&&o==="srcdoc")continue;try{e.setAttribute(o,a)}catch(f){console.warn(f)}}}for(const{name:o}of Array.from(s))o in i||e.removeAttribute(o);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function bo(e,t,r,s){const i=Array.from(e.childNodes),o=t.childNodes;if(i.length===0&&o.length===0)return;let a=0,u=i.length-1,f=0,l=o.length-1,n=i[a],c=i[u],d=o[f],h=o[l],m,p;for(;a<=u&&f<=l;)if(n===void 0)n=i[++a];else if(c===void 0)c=i[--u];else if(We(n,d,r.mirror,s))n=i[++a],d=o[++f];else if(We(c,h,r.mirror,s))c=i[--u],h=o[--l];else if(We(n,h,r.mirror,s)){try{e.insertBefore(n,c.nextSibling)}catch(y){console.warn(y)}n=i[++a],h=o[--l]}else if(We(c,d,r.mirror,s)){try{e.insertBefore(c,n)}catch(y){console.warn(y)}c=i[--u],d=o[++f]}else{if(!m){m={};for(let w=a;w<=u;w++){const C=i[w];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=w)}}p=m[s.getId(d)];const y=i[p];if(p!==void 0&&y&&We(y,d,r.mirror,s)){try{e.insertBefore(y,n)}catch(w){console.warn(w)}i[p]=void 0}else{const w=Dt(d,r.mirror,s);e.nodeName==="#document"&&n&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++a]);try{e.insertBefore(w,n||null)}catch(C){console.warn(C)}}d=o[++f]}if(a>u){const y=o[l+1];let w=null;for(y&&(w=r.mirror.getNode(s.getId(y)));f<=l;++f){const C=Dt(o[f],r.mirror,s);try{e.insertBefore(C,w)}catch(b){console.warn(b)}}}else if(f>l)for(;a<=u;a++){const y=i[a];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(w){console.warn(w)}}let g=e.firstChild,v=t.firstChild;for(;g!==null&&v!==null;)It(g,v,r,s),g=g.nextSibling,v=v.nextSibling}function Dt(e,t,r){const s=r.getId(e),i=r.getMeta(e);let o=null;if(s>-1&&(o=t.getNode(s)),o!==null&&As(o,e))return o;switch(e.RRNodeType){case $.Document:o=new Document;break;case $.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let a=e.tagName.toLowerCase();a=Pl[a]||a,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(is.svg,a):o=document.createElement(e.tagName);break}case $.Text:o=document.createTextNode(e.data);break;case $.Comment:o=document.createComment(e.data);break;case $.CDATA:o=document.createCDATASection(e.data);break}i&&t.add(o,L({},i));try{we==null||we.add(o)}catch(a){}return o}function As(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function We(e,t,r,s){const i=r.getId(e),o=s.getId(t);return i===-1||i!==o?!1:As(e,t)}class Qe extends Is{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Jl()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Qe}createDocumentType(t,r,s){const i=new Bl(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new Ul(r);break;case"IFRAME":s=new ql(r,this.mirror);break;case"CANVAS":s=new Wl(r);break;case"STYLE":s=new zl(r);break;case"DIALOG":s=new $l(r);break;default:s=new Vt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new jl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Gl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new Vl(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Bl=po;class Vt extends qt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Ul extends Al{}class $l extends Tl{}class Wl extends Vt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class zl extends Vt{constructor(){super(...arguments),A(this,"rules",[])}}class ql extends Vt{constructor(t,r){super(t),A(this,"contentDocument",new Qe),this.contentDocument.mirror=r}}const Vl=mo,jl=go,Gl=yo;function Hl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function So(e,t,r,s){let i;switch(e.nodeType){case ce.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ce.DOCUMENT_TYPE_NODE:{const a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break}case ce.ELEMENT_NODE:{const a=e,u=Hl(a);i=t.createElement(u);const f=i;for(const{name:l,value:n}of Array.from(a.attributes))f.attributes[l]=n;a.scrollLeft&&(f.scrollLeft=a.scrollLeft),a.scrollTop&&(f.scrollTop=a.scrollTop);break}case ce.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ce.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ce.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ce.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let o=r.getMeta(e);return t instanceof Qe&&(o||(o=Co(i,t.unserializedId),r.add(e,o)),t.mirror.add(i,L({},o))),i}function Yl(e,t=dl(),r=new Qe){function s(i,o){const a=So(i,r,t,o);if(a!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==ce.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(a),a.parentNode=o,a.parentElement=o),i.nodeName==="IFRAME"){const u=i.contentDocument;u&&s(u,a)}else(i.nodeType===ce.DOCUMENT_NODE||i.nodeType===ce.ELEMENT_NODE||i.nodeType===ce.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ce.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,a),i.childNodes.forEach(u=>s(u,a)))}return s(e,null),r}function Jl(){return new Xl}class Xl{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Co(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const gn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},yn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},wt={};function Ql(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function Ts(e){if(wt[e])return wt[e];const t=Ql(e)||globalThis[e],r=t.prototype,s=e in gn?gn[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),o=e in yn?yn[e]:void 0,a=!!(o&&o.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a)return wt[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?wt[e]=l:r}catch(u){return r}}const Kr={};function Te(e,t,r){var s;const i=`${e}.${String(r)}`;if(Kr[i])return Kr[i].call(t);const o=Ts(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Kr[i]=a,a.call(t)):t[r]}const Zr={};function Eo(e,t,r){const s=`${e}.${String(r)}`;if(Zr[s])return Zr[s].bind(t);const o=Ts(e)[r];return typeof o!="function"?t[r]:(Zr[s]=o,o.bind(t))}function Kl(e){return Te("Node",e,"childNodes")}function Zl(e){return Te("Node",e,"parentNode")}function eu(e){return Te("Node",e,"parentElement")}function tu(e){return Te("Node",e,"textContent")}function ru(e,t){return Eo("Node",e,"contains")(t)}function su(e){return Eo("Node",e,"getRootNode")()}function iu(e){return!e||!("host"in e)?null:Te("ShadowRoot",e,"host")}function nu(e){return e.styleSheets}function ou(e){return!e||!("shadowRoot"in e)?null:Te("Element",e,"shadowRoot")}function au(e,t){return Te("Element",e,"querySelector")(t)}function lu(e,t){return Te("Element",e,"querySelectorAll")(t)}function Ro(){return Ts("MutationObserver").constructor}function Fe(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const U={childNodes:Kl,parentNode:Zl,parentElement:eu,textContent:tu,contains:ru,getRootNode:su,host:iu,styleSheets:nu,shadowRoot:ou,querySelector:au,querySelectorAll:lu,mutationObserver:Ro,patch:Fe};function oe(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const ze=`Please stop import mirror directly. Instead of that,\r
70
70
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
71
- or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function Je(e,t,r={}){let s=null,i=0;return function(...a){const o=Date.now();!i&&r.leading===!1&&(i=o);const u=t-(o-i),f=this;u<=0||u>t?(s&&(clearTimeout(s),s=null),i=o,e.apply(f,a)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(f,a)},u))}}function ut(e,t,r,s,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),a&&a.set&&a.set.call(this,o)}}),()=>ut(e,t,a||{},!0)}let it=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>new Date().getTime());function Ts(e){var t,r,s,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=U.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a==null?void 0:a.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((s=U.parentElement(a.body))==null?void 0:s.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function _s(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ks(e){return e?e.nodeType===e.ELEMENT_NODE?e:U.parentElement(e):null}function ae(e,t,r,s){if(!e)return!1;const i=ks(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Ot(i,t,s))return!0}catch(a){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Ro(e,t){return t.getId(e)!==-1}function Ct(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===st}function Ls(e,t){if(Ze(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=U.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Ls(s,t):!0}function Dt(e){return!!e.changedTouches}function Fs(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function xo(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const u=t[a];if(u.parent){const f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,r(i,u.parent))}else{const f=s.indexOf(u);s.splice(f,0,r(i,null))}continue}if(o in t){const u=t[o];u.children.push(r(i,u));continue}s.push(r(i,null))}return s}function Bs(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Bs(e.children[r],t)}function Ye(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Us(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $s(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=i.getBoundingClientRect(),o=$s(i,t),u=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:u,absoluteScale:o.absoluteScale*u}}function Oe(e){return e?e instanceof me&&"shadowRoot"in e?!!e.shadowRoot:!!U.shadowRoot(e):!1}function je(e,t){const r=e[t[0]];return t.length===1?r:je(r.cssRules[t[1]].cssRules,t.slice(2))}function is(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Mo(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Ws{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zs(e){var t;let r=null;return"getRootNode"in e&&((t=U.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&U.host(U.getRootNode(e))&&(r=U.host(U.getRootNode(e))),r}function Oo(e){let t=e,r;for(;r=zs(t);)t=r;return t}function No(e){const t=e.ownerDocument;if(!t)return!1;const r=Oo(e);return U.contains(t,r)}function qs(e){const t=e.ownerDocument;return t?U.contains(t,e)||No(e):!1}const lu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ws,get _mirror(){return exports.mirror},closestElementOfNode:ks,getBaseDimension:$s,getNestedRule:je,getPositionsAndIndex:is,getRootShadowHost:Oo,getShadowHost:zs,getWindowHeight:_s,getWindowScroll:Ts,getWindowWidth:Ps,hasShadowRoot:Oe,hookSetter:ut,inDom:qs,isAncestorRemoved:Ls,isBlocked:ae,isIgnored:Ct,isSerialized:Ro,isSerializedIframe:Ye,isSerializedStylesheet:Us,iterateResolveTree:Bs,legacy_isTouchEvent:Dt,get nowTimestamp(){return it},on:oe,polyfill:Fs,queueToResolveTrees:xo,shadowHostInDom:No,throttle:Je,uniqueTextMutations:Mo},Symbol.toStringTag,{value:"Module"}));var _=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(q||{}),ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ve||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{}),Me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Me||{}),z=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(z||{}),Se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Se||{});function yn(e){return"__ln"in e}class uu{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&yn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&yn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const wn=(e,t)=>`${e}@${t}`;class cu{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new uu,i=f=>{let l=f,n=st;for(;n===st;)l=l&&l.nextSibling,n=l&&this.mirror.getId(l);return n},a=f=>{const l=U.parentNode(f);if(!l||!qs(f)||l.tagName==="TEXTAREA")return;const n=Ze(l)?this.mirror.getId(zs(f)):this.mirror.getId(l),c=i(f);if(n===-1||c===-1)return s.addNode(f);const d=Ve(f,{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:h=>{Ye(h,this.mirror)&&this.iframeManager.addIframe(h),Us(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Oe(f)&&this.shadowDomManager.addShadowRoot(U.shadowRoot(f),this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});d&&(t.push({parentId:n,nextId:c,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const f of this.movedSet)bn(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(U.parentNode(f))||a(f);for(const f of this.addedSet)!vn(this.droppedSet,f)&&!bn(this.removesSubTreeCache,f,this.mirror)||vn(this.movedSet,f)?a(f):this.droppedSet.add(f);let o=null;for(;s.length;){let f=null;if(o){const l=this.mirror.getId(U.parentNode(o.value)),n=i(o.value);l!==-1&&n!==-1&&(f=o)}if(!f){let l=s.tail;for(;l;){const n=l;if(l=l.previous,n){const c=this.mirror.getId(U.parentNode(n.value));if(i(n.value)===-1)continue;if(c!==-1){f=n;break}else{const h=n.value,m=U.parentNode(h);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=U.host(m);if(this.mirror.getId(p)!==-1){f=n;break}}}}}}if(!f){for(;s.head;)s.removeNode(s.head.value);break}o=f.previous,s.removeNode(f.value),a(f.value)}const u={texts:this.texts.map(f=>{const l=f.node,n=U.parentNode(l);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(l),value:f.value}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{const{attributes:l}=f;if(typeof l.style=="string"){const n=JSON.stringify(f.styleDiff),c=JSON.stringify(f._unchangedStyles);n.length<l.style.length&&(n+c).split("var(").length===l.style.split("var(").length&&(l.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:l}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.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(u))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(U.childNodes(t),s=>U.textContent(s)||"").join("")}),M(this,"processMutation",t=>{if(!Ct(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=U.textContent(t.target);!ae(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:qn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,ks(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const o=hs(r);i=cs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ae(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!zn(r.tagName,s))if(a.attributes[s]=Wn(this.doc,De(r.tagName),De(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const f=r.style.getPropertyValue(u),l=r.style.getPropertyPriority(u);f!==o.style.getPropertyValue(u)||l!==o.style.getPropertyPriority(u)?l===""?a.styleDiff[u]=f:a.styleDiff[u]=[f,l]:a._unchangedStyles[u]=[f,l]}for(const u of Array.from(o.style))r.style.getPropertyValue(u)===""&&(a.styleDiff[u]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=Ze(t.target)?this.mirror.getId(U.host(t.target)):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||Ct(r,this.mirror,this.slimDOMOptions)||!Ro(r,this.mirror)||(this.addedSet.has(r)?(ns(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Ls(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[wn(s,i)]?ns(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:Ze(t.target)&&et(t.target)?!0:void 0}),hu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ct(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[wn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||(U.childNodes(t).forEach(s=>this.genAdds(s)),Oe(t)&&U.childNodes(U.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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 ns(e,t){e.delete(t),U.childNodes(t).forEach(r=>ns(e,r))}function hu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),U.childNodes(s).forEach(i=>r.push(i)))}}function bn(e,t,r){return e.size===0?!1:fu(e,t)}function fu(e,t,r){const s=U.parentNode(t);return s?e.has(s):!1}function vn(e,t){return e.size===0?!1:Io(e,t)}function Io(e,t){const r=U.parentNode(t);return r?e.has(r)?!0:Io(e,r):!1}let rt;function du(e){rt=e}function pu(){rt=void 0}const W=e=>rt?(...r)=>{try{return e(...r)}catch(s){if(rt&&rt(s)===!0)return;throw s}}:e,Ne=[];function ct(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Do(e,t){const r=new cu;Ne.push(r),r.init(e);const s=new(Eo())(W(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function mu({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],u;const f=Je(W(c=>{const d=Date.now()-u;e(o.map(h=>(h.timeOffset-=d,h)),c),o=[],u=null}),a),l=W(Je(W(c=>{const d=ct(c),{clientX:h,clientY:m}=Dt(c)?c.changedTouches[0]:c;u||(u=it()),o.push({x:h,y:m,id:s.getId(d),timeOffset:it()-u}),f(typeof DragEvent!="undefined"&&c instanceof DragEvent?T.Drag:c instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[oe("mousemove",l,r),oe("touchmove",l,r),oe("drag",l,r)];return W(()=>{n.forEach(c=>c())})}function gu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,u=[];let f=null;const l=n=>c=>{const d=ct(c);if(ae(d,s,i,!0))return;let h=null,m=n;if("pointerType"in c){switch(c.pointerType){case"mouse":h=ve.Mouse;break;case"touch":h=ve.Touch;break;case"pen":h=ve.Pen;break}h===ve.Touch?q[n]===q.MouseDown?m="TouchStart":q[n]===q.MouseUp&&(m="TouchEnd"):ve.Pen}else Dt(c)&&(h=ve.Touch);h!==null?(f=h,(m.startsWith("Touch")&&h===ve.Touch||m.startsWith("Mouse")&&h===ve.Mouse)&&(h=null)):q[n]===q.Click&&(h=f,f=null);const p=Dt(c)?c.changedTouches[0]:c;if(!p)return;const g=r.getId(d),{clientX:b,clientY:y}=p;W(e)(L({type:q[m],id:g,x:b,y},h!==null&&{pointerType:h}))};return Object.keys(q).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&o[n]!==!1).forEach(n=>{let c=De(n);const d=l(n);if(window.PointerEvent)switch(q[n]){case q.MouseDown:case q.MouseUp:c=c.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}u.push(oe(c,d,t))}),W(()=>{u.forEach(n=>n())})}function Ao({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){const o=W(Je(W(u=>{const f=ct(u);if(!f||ae(f,s,i,!0))return;const l=r.getId(f);if(f===t&&t.defaultView){const n=Ts(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:f.scrollLeft,y:f.scrollTop})}),a.scroll||100));return oe("scroll",o,t)}function yu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=W(Je(W(()=>{const a=_s(),o=Ps();(r!==a||s!==o)&&(e({width:Number(o),height:Number(a)}),r=a,s=o)}),200));return oe("resize",i,t)}const wu=["INPUT","TEXTAREA","SELECT"],Sn=new WeakMap;function bu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:u,maskInputFn:f,sampling:l,userTriggeredOnInput:n}){function c(y){let w=ct(y);const C=y.isTrusted,v=w&&w.tagName;if(w&&v==="OPTION"&&(w=U.parentElement(w)),!w||!v||wu.indexOf(v)<0||ae(w,s,i,!0)||w.classList.contains(a)||o&&w.matches(o))return;let S=w.value,E=!1;const R=hs(w)||"";R==="radio"||R==="checkbox"?E=w.checked:(u[v.toLowerCase()]||u[R])&&(S=cs({element:w,maskInputOptions:u,tagName:v,type:R,value:S,maskInputFn:f})),d(w,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const I=w.name;R==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(O=>{if(O!==w){const F=O.value;d(O,n?{text:F,isChecked:!E,userTriggered:!1}:{text:F,isChecked:!E})}})}function d(y,w){const C=Sn.get(y);if(!C||C.text!==w.text||C.isChecked!==w.isChecked){Sn.set(y,w);const v=r.getId(y);W(e)(se(L({},w),{id:v}))}}const m=(l.input==="last"?["change"]:["input","change"]).map(y=>oe(y,W(c),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...b.map(y=>ut(y[0],y[1],{set(){W(c)({target:this,isTrusted:!1})}},!1,p))),W(()=>{m.forEach(y=>y())})}function At(e){const t=[];function r(s,i){if(wt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||wt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||wt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||wt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return r(e,t)}function xe(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function vu({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:W((n,c,d)=>{const[h,m]=d,{id:p,styleId:g}=xe(c,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:h,index:m}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.addRule=function(n,c,d=this.cssRules.length){const h=`${n} { ${c} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[h,d])};const a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:W((n,c,d)=>{const[h]=d,{id:m,styleId:p}=xe(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:h}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:W((n,c,d)=>{const[h]=d,{id:m,styleId:p}=xe(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:h}),n.apply(c,d)})}));let u;s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:W((n,c,d)=>{const[h]=d,{id:m,styleId:p}=xe(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:h}),n.apply(c,d)})}));const f={};bt("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(bt("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),bt("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),bt("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));const l={};return Object.entries(f).forEach(([n,c])=>{l[n]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(l[n].insertRule,{apply:W((d,h,m)=>{const[p,g]=m,{id:b,styleId:y}=xe(h.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||y&&y!==-1)&&e({id:b,styleId:y,adds:[{rule:p,index:[...At(h),g||0]}]}),d.apply(h,m)})}),c.prototype.deleteRule=new Proxy(l[n].deleteRule,{apply:W((d,h,m)=>{const[p]=m,{id:g,styleId:b}=xe(h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,removes:[{index:[...At(h),p]}]}),d.apply(h,m)})})}),W(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=a,o&&(s.CSSStyleSheet.prototype.replace=o),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([n,c])=>{c.prototype.insertRule=l[n].insertRule,c.prototype.deleteRule=l[n].deleteRule})})}function To({mirror:e,stylesheetManager:t},r){var s,i,a;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(U.host(r));const u=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,f=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!u||!f?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var l;return(l=f.get)==null?void 0:l.call(this)},set(l){var n;const c=(n=f.set)==null?void 0:n.call(this,l);if(o!==null&&o!==-1)try{t.adoptStyleSheets(l,o)}catch(d){}return c}}),W(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}function Su({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:W((u,f,l)=>{var n;const[c,d,h]=l;if(r.has(c))return a.apply(f,[c,d,h]);const{id:m,styleId:p}=xe((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:c,value:d,priority:h},index:At(f.parentRule)}),u.apply(f,l)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:W((u,f,l)=>{var n;const[c]=l;if(r.has(c))return o.apply(f,[c]);const{id:d,styleId:h}=xe((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(d&&d!==-1||h&&h!==-1)&&e({id:d,styleId:h,remove:{property:c},index:At(f.parentRule)}),u.apply(f,l)})}),W(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Cu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:a}){const o=W(f=>Je(W(l=>{const n=ct(l);if(!n||ae(n,t,r,!0))return;const{currentTime:c,volume:d,muted:h,playbackRate:m,loop:p}=n;e({type:f,id:s.getId(n),currentTime:c,volume:d,muted:h,playbackRate:m,loop:p})}),i.media||500)),u=[oe("play",o(Me.Play),a),oe("pause",o(Me.Pause),a),oe("seeked",o(Me.Seeked),a),oe("volumechange",o(Me.VolumeChange),a),oe("ratechange",o(Me.RateChange),a)];return W(()=>{u.forEach(f=>f())})}function Eu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(f,l,n){const c=new a(f,l,n);return i.set(c,{family:f,buffer:typeof l!="string",descriptors:n,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),c};const o=Fe(t.fonts,"add",function(u){return function(f){return setTimeout(W(()=>{const l=i.get(f);l&&(e(l),i.delete(f))}),0),u.apply(this,[f])}});return s.push(()=>{r.FontFace=a}),s.push(o),W(()=>{s.forEach(u=>u())})}function Ru(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:a}=e;let o=!0;const u=W(()=>{const f=t.getSelection();if(!f||o&&(f!=null&&f.isCollapsed))return;o=f.isCollapsed||!1;const l=[],n=f.rangeCount||0;for(let c=0;c<n;c++){const d=f.getRangeAt(c),{startContainer:h,startOffset:m,endContainer:p,endOffset:g}=d;ae(h,s,i,!0)||ae(p,s,i,!0)||l.push({start:r.getId(h),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:l})});return u(),oe("selectionchange",u)}function xu({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(i){return function(a,o,u){try{t({define:{name:a}})}catch(f){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,o,u])}})}function Mu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:l,styleDeclarationCb:n,canvasMutationCb:c,fontCb:d,selectionCb:h,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),a(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),o(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),u(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),f(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),l(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),c(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),d(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),h(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function Ou(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Mu(e,t);let s;e.recordDOM&&(s=Do(e,e.doc));const i=mu(e),a=gu(e),o=Ao(e),u=yu(e,{win:r}),f=bu(e),l=Cu(e);let n=()=>{},c=()=>{},d=()=>{},h=()=>{};e.recordDOM&&(n=vu(e,{win:r}),c=To(e,e.doc),d=Su(e,{win:r}),e.collectFonts&&(h=Eu(e)));const m=Ru(e),p=xu(e),g=[];for(const b of e.plugins)g.push(b.observer(b.callback,r,b.options));return W(()=>{Ne.forEach(b=>b.reset()),s==null||s.disconnect(),i(),a(),o(),u(),f(),l(),n(),c(),d(),h(),m(),p(),g.forEach(b=>b()),Ne.length=0})}function wt(e){return typeof window[e]!="undefined"}function bt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Cn{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const a=s||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let u=a.get(r);return u||(u=this.generateIdFn(),a.set(r,u),o.set(u,r)),u}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const a=i.get(r);return a||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Nu{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new Cn($n)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),M(this,"messageHandler"),M(this,"nestedIframeListeners",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Cn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){const a=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,a),i.addEventListener("message",a)}(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(s,r[a]):r[a]=t.getId(s,r[a]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear()}}class Iu{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!et(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=Do(se(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Ao(se(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(U.host(t))),this.restoreHandlers.push(To({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Fe(t.prototype,"attachShadow",function(i){return function(a){const o=i.call(this,a),u=U.shadowRoot(this);return u&&qs(this)&&s.addShadowRoot(u,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ke=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vt=0;vt<Ge.length;vt++)Ke[Ge.charCodeAt(vt)]=vt;var Du=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Ge[t[r]>>2],i+=Ge[(t[r]&3)<<4|t[r+1]>>4],i+=Ge[(t[r+1]&15)<<2|t[r+2]>>6],i+=Ge[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Au=function(e){var t=e.length*.75,r=e.length,s,i=0,a,o,u,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var l=new ArrayBuffer(t),n=new Uint8Array(l);for(s=0;s<r;s+=4)a=Ke[e.charCodeAt(s)],o=Ke[e.charCodeAt(s+1)],u=Ke[e.charCodeAt(s+2)],f=Ke[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|u>>2,n[i++]=(u&3)<<6|f&63;return l};const En=new Map;function Tu(e,t){let r=En.get(e);return r||(r=new Map,En.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const _o=(e,t,r)=>{if(!e||!(ko(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Tu(r,s);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function Et(e,t,r){if(e instanceof Array)return e.map(s=>Et(s,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const s=e.constructor.name,i=Du(e);return{rr_type:s,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Et(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const s=e.constructor.name,{src:i}=e;return{rr_type:s,src:i}}else if(e instanceof HTMLCanvasElement){const s="HTMLImageElement",i=e.toDataURL();return{rr_type:s,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Et(e.data,t,r),e.width,e.height]};if(ko(e,t)||typeof e=="object"){const s=e.constructor.name,i=_o(e,t,r);return{rr_type:s,index:i}}}}return e}const Po=(e,t,r)=>e.map(s=>Et(s,t,r)),ko=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function _u(e,t,r,s){const i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const u=Fe(t.CanvasRenderingContext2D.prototype,o,function(f){return function(...l){return ae(this.canvas,r,s,!0)||setTimeout(()=>{const n=Po(l,t,this);e(this.canvas,{type:Ce["2D"],property:o,args:n})},0),f.apply(this,l)}});i.push(u)}catch(u){const f=ut(t.CanvasRenderingContext2D.prototype,o,{set(l){e(this.canvas,{type:Ce["2D"],property:o,args:[l],setter:!0})}});i.push(f)}return()=>{i.forEach(o=>o())}}function Pu(e){return e==="experimental-webgl"?"webgl":e}function Rn(e,t,r,s){const i=[];try{const a=Fe(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(u,...f){if(!ae(this,t,r,!0)){const l=Pu(u);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(f[0]&&typeof f[0]=="object"){const n=f[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[u,...f])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function xn(e,t,r,s,i,a){const o=[],u=Object.getOwnPropertyNames(e);for(const f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const l=Fe(e,f,function(n){return function(...c){const d=n.apply(this,c);if(_o(d,a,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const h=Po(c,a,this),m={type:t,property:f,args:h};r(this.canvas,m)}return d}});o.push(l)}catch(l){const n=ut(e,f,{set(c){r(this.canvas,{type:t,property:f,args:[c],setter:!0})}});o.push(n)}return o}function ku(e,t,r,s){const i=[];return i.push(...xn(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...xn(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,s,t)),()=>{i.forEach(a=>a())}}const Lo=`(function() {
71
+ or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(ze),-1},getNode(){return console.error(ze),null},removeNodeFromMap(){console.error(ze)},has(){return console.error(ze),!1},reset(){console.error(ze)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(ze),Reflect.get(e,t,r)}}));function Xe(e,t,r={}){let s=null,i=0;return function(...o){const a=Date.now();!i&&r.leading===!1&&(i=a);const u=t-(a-i),f=this;u<=0||u>t?(s&&(clearTimeout(s),s=null),i=a,e.apply(f,o)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(f,o)},u))}}function ct(e,t,r,s,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>ct(e,t,o||{},!0)}let nt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(nt=()=>new Date().getTime());function _s(e){var t,r,s,i;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((t=U.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o==null?void 0:o.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((s=U.parentElement(o.body))==null?void 0:s.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Ps(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ks(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ls(e){return e?e.nodeType===e.ELEMENT_NODE?e:U.parentElement(e):null}function ae(e,t,r,s){if(!e)return!1;const i=Ls(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Ot(i,t,s))return!0}catch(o){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function xo(e,t){return t.getId(e)!==-1}function Et(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===it}function Fs(e,t){if(et(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=U.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Fs(s,t):!0}function At(e){return!!e.changedTouches}function Bs(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Mo(e){const t={},r=(i,o)=>{const a={value:i,parent:o,children:[]};return t[i.node.id]=a,a},s=[];for(const i of e){const{nextId:o,parentId:a}=i;if(o&&o in t){const u=t[o];if(u.parent){const f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,r(i,u.parent))}else{const f=s.indexOf(u);s.splice(f,0,r(i,null))}continue}if(a in t){const u=t[a];u.children.push(r(i,u));continue}s.push(r(i,null))}return s}function Us(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Us(e.children[r],t)}function Je(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $s(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ws(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=Ws(i,t),u=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:u,absoluteScale:a.absoluteScale*u}}function Ne(e){return e?e instanceof ge&&"shadowRoot"in e?!!e.shadowRoot:!!U.shadowRoot(e):!1}function Ge(e,t){const r=e[t[0]];return t.length===1?r:Ge(r.cssRules[t[1]].cssRules,t.slice(2))}function ns(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function No(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class zs{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function qs(e){var t;let r=null;return"getRootNode"in e&&((t=U.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&U.host(U.getRootNode(e))&&(r=U.host(U.getRootNode(e))),r}function Oo(e){let t=e,r;for(;r=qs(t);)t=r;return t}function Io(e){const t=e.ownerDocument;if(!t)return!1;const r=Oo(e);return U.contains(t,r)}function Vs(e){const t=e.ownerDocument;return t?U.contains(t,e)||Io(e):!1}const uu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:zs,get _mirror(){return exports.mirror},closestElementOfNode:Ls,getBaseDimension:Ws,getNestedRule:Ge,getPositionsAndIndex:ns,getRootShadowHost:Oo,getShadowHost:qs,getWindowHeight:Ps,getWindowScroll:_s,getWindowWidth:ks,hasShadowRoot:Ne,hookSetter:ct,inDom:Vs,isAncestorRemoved:Fs,isBlocked:ae,isIgnored:Et,isSerialized:xo,isSerializedIframe:Je,isSerializedStylesheet:$s,iterateResolveTree:Us,legacy_isTouchEvent:At,get nowTimestamp(){return nt},on:oe,polyfill:Bs,queueToResolveTrees:Mo,shadowHostInDom:Io,throttle:Xe,uniqueTextMutations:No},Symbol.toStringTag,{value:"Module"}));var _=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(q||{}),be=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(be||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{}),Me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Me||{}),z=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(z||{}),Se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Se||{});function wn(e){return"__ln"in e}class cu{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&wn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&wn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const vn=(e,t)=>`${e}@${t}`;class hu{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new cu,i=f=>{let l=f,n=it;for(;n===it;)l=l&&l.nextSibling,n=l&&this.mirror.getId(l);return n},o=f=>{const l=U.parentNode(f);if(!l||!Vs(f)||l.tagName==="TEXTAREA")return;const n=et(l)?this.mirror.getId(qs(f)):this.mirror.getId(l),c=i(f);if(n===-1||c===-1)return s.addNode(f);const d=je(f,{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:h=>{Je(h,this.mirror)&&this.iframeManager.addIframe(h),$s(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Ne(f)&&this.shadowDomManager.addShadowRoot(U.shadowRoot(f),this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});d&&(t.push({parentId:n,nextId:c,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const f of this.movedSet)bn(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(U.parentNode(f))||o(f);for(const f of this.addedSet)!Sn(this.droppedSet,f)&&!bn(this.removesSubTreeCache,f,this.mirror)||Sn(this.movedSet,f)?o(f):this.droppedSet.add(f);let a=null;for(;s.length;){let f=null;if(a){const l=this.mirror.getId(U.parentNode(a.value)),n=i(a.value);l!==-1&&n!==-1&&(f=a)}if(!f){let l=s.tail;for(;l;){const n=l;if(l=l.previous,n){const c=this.mirror.getId(U.parentNode(n.value));if(i(n.value)===-1)continue;if(c!==-1){f=n;break}else{const h=n.value,m=U.parentNode(h);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=U.host(m);if(this.mirror.getId(p)!==-1){f=n;break}}}}}}if(!f){for(;s.head;)s.removeNode(s.head.value);break}a=f.previous,s.removeNode(f.value),o(f.value)}const u={texts:this.texts.map(f=>{const l=f.node,n=U.parentNode(l);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(l),value:f.value}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{const{attributes:l}=f;if(typeof l.style=="string"){const n=JSON.stringify(f.styleDiff),c=JSON.stringify(f._unchangedStyles);n.length<l.style.length&&(n+c).split("var(").length===l.style.split("var(").length&&(l.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:l}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.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(u))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(U.childNodes(t),s=>U.textContent(s)||"").join("")}),M(this,"processMutation",t=>{if(!Et(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=U.textContent(t.target);!ae(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Vn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Ls(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const a=fs(r);i=hs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(ae(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!qn(r.tagName,s))if(o.attributes[s]=zn(this.doc,De(r.tagName),De(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const f=r.style.getPropertyValue(u),l=r.style.getPropertyPriority(u);f!==a.style.getPropertyValue(u)||l!==a.style.getPropertyPriority(u)?l===""?o.styleDiff[u]=f:o.styleDiff[u]=[f,l]:o._unchangedStyles[u]=[f,l]}for(const u of Array.from(a.style))r.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=et(t.target)?this.mirror.getId(U.host(t.target)):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||Et(r,this.mirror,this.slimDOMOptions)||!xo(r,this.mirror)||(this.addedSet.has(r)?(os(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Fs(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[vn(s,i)]?os(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:et(t.target)&&tt(t.target)?!0:void 0}),fu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Et(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[vn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||(U.childNodes(t).forEach(s=>this.genAdds(s)),Ne(t)&&U.childNodes(U.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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 os(e,t){e.delete(t),U.childNodes(t).forEach(r=>os(e,r))}function fu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),U.childNodes(s).forEach(i=>r.push(i)))}}function bn(e,t,r){return e.size===0?!1:du(e,t)}function du(e,t,r){const s=U.parentNode(t);return s?e.has(s):!1}function Sn(e,t){return e.size===0?!1:Do(e,t)}function Do(e,t){const r=U.parentNode(t);return r?e.has(r)?!0:Do(e,r):!1}let st;function pu(e){st=e}function mu(){st=void 0}const W=e=>st?(...r)=>{try{return e(...r)}catch(s){if(st&&st(s)===!0)return;throw s}}:e,Oe=[];function ht(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Ao(e,t){const r=new hu;Oe.push(r),r.init(e);const s=new(Ro())(W(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function gu({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],u;const f=Xe(W(c=>{const d=Date.now()-u;e(a.map(h=>(h.timeOffset-=d,h)),c),a=[],u=null}),o),l=W(Xe(W(c=>{const d=ht(c),{clientX:h,clientY:m}=At(c)?c.changedTouches[0]:c;u||(u=nt()),a.push({x:h,y:m,id:s.getId(d),timeOffset:nt()-u}),f(typeof DragEvent!="undefined"&&c instanceof DragEvent?T.Drag:c instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[oe("mousemove",l,r),oe("touchmove",l,r),oe("drag",l,r)];return W(()=>{n.forEach(c=>c())})}function yu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let f=null;const l=n=>c=>{const d=ht(c);if(ae(d,s,i,!0))return;let h=null,m=n;if("pointerType"in c){switch(c.pointerType){case"mouse":h=be.Mouse;break;case"touch":h=be.Touch;break;case"pen":h=be.Pen;break}h===be.Touch?q[n]===q.MouseDown?m="TouchStart":q[n]===q.MouseUp&&(m="TouchEnd"):be.Pen}else At(c)&&(h=be.Touch);h!==null?(f=h,(m.startsWith("Touch")&&h===be.Touch||m.startsWith("Mouse")&&h===be.Mouse)&&(h=null)):q[n]===q.Click&&(h=f,f=null);const p=At(c)?c.changedTouches[0]:c;if(!p)return;const g=r.getId(d),{clientX:v,clientY:y}=p;W(e)(L({type:q[m],id:g,x:v,y},h!==null&&{pointerType:h}))};return Object.keys(q).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&a[n]!==!1).forEach(n=>{let c=De(n);const d=l(n);if(window.PointerEvent)switch(q[n]){case q.MouseDown:case q.MouseUp:c=c.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}u.push(oe(c,d,t))}),W(()=>{u.forEach(n=>n())})}function To({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:o}){const a=W(Xe(W(u=>{const f=ht(u);if(!f||ae(f,s,i,!0))return;const l=r.getId(f);if(f===t&&t.defaultView){const n=_s(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:f.scrollLeft,y:f.scrollTop})}),o.scroll||100));return oe("scroll",a,t)}function wu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=W(Xe(W(()=>{const o=Ps(),a=ks();(r!==o||s!==a)&&(e({width:Number(a),height:Number(o)}),r=o,s=a)}),200));return oe("resize",i,t)}const vu=["INPUT","TEXTAREA","SELECT"],Cn=new WeakMap;function bu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:f,sampling:l,userTriggeredOnInput:n}){function c(y){let w=ht(y);const C=y.isTrusted,b=w&&w.tagName;if(w&&b==="OPTION"&&(w=U.parentElement(w)),!w||!b||vu.indexOf(b)<0||ae(w,s,i,!0)||w.classList.contains(o)||a&&w.matches(a))return;let S=w.value,E=!1;const R=fs(w)||"";R==="radio"||R==="checkbox"?E=w.checked:(u[b.toLowerCase()]||u[R])&&(S=hs({element:w,maskInputOptions:u,tagName:b,type:R,value:S,maskInputFn:f})),d(w,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const I=w.name;R==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(N=>{if(N!==w){const F=N.value;d(N,n?{text:F,isChecked:!E,userTriggered:!1}:{text:F,isChecked:!E})}})}function d(y,w){const C=Cn.get(y);if(!C||C.text!==w.text||C.isChecked!==w.isChecked){Cn.set(y,w);const b=r.getId(y);W(e)(se(L({},w),{id:b}))}}const m=(l.input==="last"?["change"]:["input","change"]).map(y=>oe(y,W(c),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),v=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...v.map(y=>ct(y[0],y[1],{set(){W(c)({target:this,isTrusted:!1})}},!1,p))),W(()=>{m.forEach(y=>y())})}function Tt(e){const t=[];function r(s,i){if(vt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||vt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||vt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||vt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const a=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(a)}else if(s.parentStyleSheet){const a=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(a)}return i}return r(e,t)}function xe(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function Su({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:W((n,c,d)=>{const[h,m]=d,{id:p,styleId:g}=xe(c,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:h,index:m}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.addRule=function(n,c,d=this.cssRules.length){const h=`${n} { ${c} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[h,d])};const o=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:W((n,c,d)=>{const[h]=d,{id:m,styleId:p}=xe(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:h}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let a;s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:W((n,c,d)=>{const[h]=d,{id:m,styleId:p}=xe(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:h}),n.apply(c,d)})}));let u;s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:W((n,c,d)=>{const[h]=d,{id:m,styleId:p}=xe(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:h}),n.apply(c,d)})}));const f={};bt("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(bt("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),bt("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),bt("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));const l={};return Object.entries(f).forEach(([n,c])=>{l[n]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(l[n].insertRule,{apply:W((d,h,m)=>{const[p,g]=m,{id:v,styleId:y}=xe(h.parentStyleSheet,t,r.styleMirror);return(v&&v!==-1||y&&y!==-1)&&e({id:v,styleId:y,adds:[{rule:p,index:[...Tt(h),g||0]}]}),d.apply(h,m)})}),c.prototype.deleteRule=new Proxy(l[n].deleteRule,{apply:W((d,h,m)=>{const[p]=m,{id:g,styleId:v}=xe(h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...Tt(h),p]}]}),d.apply(h,m)})})}),W(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=o,a&&(s.CSSStyleSheet.prototype.replace=a),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([n,c])=>{c.prototype.insertRule=l[n].insertRule,c.prototype.deleteRule=l[n].deleteRule})})}function _o({mirror:e,stylesheetManager:t},r){var s,i,o;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(U.host(r));const u=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(o=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,f=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!f?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var l;return(l=f.get)==null?void 0:l.call(this)},set(l){var n;const c=(n=f.set)==null?void 0:n.call(this,l);if(a!==null&&a!==-1)try{t.adoptStyleSheets(l,a)}catch(d){}return c}}),W(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}function Cu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:W((u,f,l)=>{var n;const[c,d,h]=l;if(r.has(c))return o.apply(f,[c,d,h]);const{id:m,styleId:p}=xe((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:c,value:d,priority:h},index:Tt(f.parentRule)}),u.apply(f,l)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:W((u,f,l)=>{var n;const[c]=l;if(r.has(c))return a.apply(f,[c]);const{id:d,styleId:h}=xe((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(d&&d!==-1||h&&h!==-1)&&e({id:d,styleId:h,remove:{property:c},index:Tt(f.parentRule)}),u.apply(f,l)})}),W(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Eu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:o}){const a=W(f=>Xe(W(l=>{const n=ht(l);if(!n||ae(n,t,r,!0))return;const{currentTime:c,volume:d,muted:h,playbackRate:m,loop:p}=n;e({type:f,id:s.getId(n),currentTime:c,volume:d,muted:h,playbackRate:m,loop:p})}),i.media||500)),u=[oe("play",a(Me.Play),o),oe("pause",a(Me.Pause),o),oe("seeked",a(Me.Seeked),o),oe("volumechange",a(Me.VolumeChange),o),oe("ratechange",a(Me.RateChange),o)];return W(()=>{u.forEach(f=>f())})}function Ru({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(f,l,n){const c=new o(f,l,n);return i.set(c,{family:f,buffer:typeof l!="string",descriptors:n,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),c};const a=Fe(t.fonts,"add",function(u){return function(f){return setTimeout(W(()=>{const l=i.get(f);l&&(e(l),i.delete(f))}),0),u.apply(this,[f])}});return s.push(()=>{r.FontFace=o}),s.push(a),W(()=>{s.forEach(u=>u())})}function xu(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:o}=e;let a=!0;const u=W(()=>{const f=t.getSelection();if(!f||a&&(f!=null&&f.isCollapsed))return;a=f.isCollapsed||!1;const l=[],n=f.rangeCount||0;for(let c=0;c<n;c++){const d=f.getRangeAt(c),{startContainer:h,startOffset:m,endContainer:p,endOffset:g}=d;ae(h,s,i,!0)||ae(p,s,i,!0)||l.push({start:r.getId(h),startOffset:m,end:r.getId(p),endOffset:g})}o({ranges:l})});return u(),oe("selectionchange",u)}function Mu({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(i){return function(o,a,u){try{t({define:{name:o}})}catch(f){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,a,u])}})}function Nu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:l,styleDeclarationCb:n,canvasMutationCb:c,fontCb:d,selectionCb:h,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),o(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),a(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),u(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),f(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),l(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),c(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),d(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),h(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function Ou(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Nu(e,t);let s;e.recordDOM&&(s=Ao(e,e.doc));const i=gu(e),o=yu(e),a=To(e),u=wu(e,{win:r}),f=bu(e),l=Eu(e);let n=()=>{},c=()=>{},d=()=>{},h=()=>{};e.recordDOM&&(n=Su(e,{win:r}),c=_o(e,e.doc),d=Cu(e,{win:r}),e.collectFonts&&(h=Ru(e)));const m=xu(e),p=Mu(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,r,v.options));return W(()=>{Oe.forEach(v=>v.reset()),s==null||s.disconnect(),i(),o(),a(),u(),f(),l(),n(),c(),d(),h(),m(),p(),g.forEach(v=>v()),Oe.length=0})}function vt(e){return typeof window[e]!="undefined"}function bt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class En{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const o=s||this.getIdToRemoteIdMap(t),a=i||this.getRemoteIdToIdMap(t);let u=o.get(r);return u||(u=this.generateIdFn(),o.set(r,u),a.set(u,r)),u}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const o=i.get(r);return o||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Iu{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new En(Wn)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),M(this,"messageHandler"),M(this,"nestedIframeListeners",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new En(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,r){var s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){const o=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,o),i.addEventListener("message",o)}(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(i.node,o)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const o of i)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(s,r[o]):r[o]=t.getId(s,r[o]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear()}}class Du{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!tt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=Ao(se(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(To(se(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(U.host(t))),this.restoreHandlers.push(_o({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Fe(t.prototype,"attachShadow",function(i){return function(o){const a=i.call(this,o),u=U.shadowRoot(this);return u&&Vs(this)&&s.addShadowRoot(u,r),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var He="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ze=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var St=0;St<He.length;St++)Ze[He.charCodeAt(St)]=St;var Au=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=He[t[r]>>2],i+=He[(t[r]&3)<<4|t[r+1]>>4],i+=He[(t[r+1]&15)<<2|t[r+2]>>6],i+=He[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Tu=function(e){var t=e.length*.75,r=e.length,s,i=0,o,a,u,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var l=new ArrayBuffer(t),n=new Uint8Array(l);for(s=0;s<r;s+=4)o=Ze[e.charCodeAt(s)],a=Ze[e.charCodeAt(s+1)],u=Ze[e.charCodeAt(s+2)],f=Ze[e.charCodeAt(s+3)],n[i++]=o<<2|a>>4,n[i++]=(a&15)<<4|u>>2,n[i++]=(u&3)<<6|f&63;return l};const Rn=new Map;function _u(e,t){let r=Rn.get(e);return r||(r=new Map,Rn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Po=(e,t,r)=>{if(!e||!(Lo(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=_u(r,s);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Rt(e,t,r,s){if(e instanceof Array)return e.map(i=>Rt(i,t,r,s));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,o=Au(e);return{rr_type:i,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Rt(e.buffer,t,r,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:o}=e;return{rr_type:i,src:o}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",o=e.toDataURL(s.type,s.quality);return{rr_type:i,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Rt(e.data,t,r,s),e.width,e.height]};if(Lo(e,t)||typeof e=="object"){const i=e.constructor.name,o=Po(e,t,r);return{rr_type:i,index:o}}}}return e}const ko=(e,t,r,s)=>e.map(i=>Rt(i,t,r,s)),Lo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Pu(e,t,r,s,i){const o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const u of a)try{if(typeof t.CanvasRenderingContext2D.prototype[u]!="function")continue;const f=Fe(t.CanvasRenderingContext2D.prototype,u,function(l){return function(...n){return ae(this.canvas,r,s,!0)||setTimeout(()=>{const c=ko(n,t,this,i);e(this.canvas,{type:Ce["2D"],property:u,args:c})},0),l.apply(this,n)}});o.push(f)}catch(f){const l=ct(t.CanvasRenderingContext2D.prototype,u,{set(n){e(this.canvas,{type:Ce["2D"],property:u,args:[n],setter:!0})}});o.push(l)}return()=>{o.forEach(u=>u())}}function ku(e){return e==="experimental-webgl"?"webgl":e}function xn(e,t,r,s){const i=[];try{const o=Fe(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...f){if(!ae(this,t,r,!0)){const l=ku(u);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(f[0]&&typeof f[0]=="object"){const n=f[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...f])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Mn(e,t,r,s,i,o,a){const u=[],f=Object.getOwnPropertyNames(e);for(const l of f)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const n=Fe(e,l,function(c){return function(...d){const h=c.apply(this,d);if(Po(h,o,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const m=ko(d,o,this,a),p={type:t,property:l,args:m};r(this.canvas,p)}return h}});u.push(n)}catch(n){const c=ct(e,l,{set(d){r(this.canvas,{type:t,property:l,args:[d],setter:!0})}});u.push(c)}return u}function Lu(e,t,r,s,i){const o=[];return o.push(...Mn(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,s,t,i)),typeof t.WebGL2RenderingContext!="undefined"&&o.push(...Mn(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,s,t,i)),()=>{o.forEach(a=>a())}}const Fo=`(function() {
72
72
  "use strict";
73
73
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
74
74
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -143,7 +143,7 @@ or you can use record.mirror to access the mirror instance during recording.`;ex
143
143
  };
144
144
  })();
145
145
  //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
146
- `,Mn=typeof self!="undefined"&&self.Blob&&new Blob([Lo],{type:"text/javascript;charset=utf-8"});function Lu(e){let t;try{if(t=Mn&&(self.URL||self.webkitURL).createObjectURL(Mn),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Lo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Fu{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(f,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(l)});const{sampling:r="all",win:s,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&r==="all"&&this.initCanvasMutationObserver(s,i,a),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,a,{dataURLOptions:u})}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(t,r,s,i,a){const o=Rn(r,s,i,!0),u=new Map,f=new Lu;f.onmessage=m=>{const{id:p}=m.data;if(u.set(p,!1),!("base64"in m.data))return;const{base64:g,type:b,width:y,height:w}=m.data;this.mutationCb({id:p,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,y,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:b}]},0,0]}]})};const l=1e3/t;let n=0,c;const d=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(b=>{ae(b,s,i,!0)||m.push(b)}),g.querySelectorAll("*").forEach(b=>{b.shadowRoot&&p(b.shadowRoot)})};return p(r.document),m},h=m=>{if(n&&m-n<l){c=requestAnimationFrame(h);return}n=m,d().forEach(async p=>{var g;const b=this.mirror.getId(p);if(u.get(b)||p.width===0||p.height===0)return;if(u.set(b,!0),["webgl","webgl2"].includes(p.__context)){const v=p.getContext(p.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,w=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:y,resizeHeight:w});f.postMessage({id:b,bitmap:C,width:y,height:w,dataURLOptions:a.dataURLOptions},[C])}),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Rn(t,r,s,!1),a=_u(this.processMutation.bind(this),t,r,s),o=ku(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{i(),a(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(o=>{const l=o,{type:u}=l;return Be(l,["type"])}),{type:a}=s[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Bu{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new Ws),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const s={id:r,styleIds:[]},i=[];for(const a of t){let o;this.styleMirror.has(a)?o=this.styleMirror.getId(a):(o=this.styleMirror.add(a),i.push({styleId:o,rules:Array.from(a.rules||CSSRule,(u,f)=>({rule:Bn(u,a.href),index:f}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Uu{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let K,Rt,Zr,Tt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Hs=e.contentWindow)==null?void 0:Hs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const fe=Un();function _e(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:l=null,inlineStylesheet:n=!0,maskAllInputs:c,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:p,hooks:g,packFn:b,sampling:y={},dataURLOptions:w={},mousemoveWait:C,recordDOM:v=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:O=!1,inlineImages:F=!1,plugins:D,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:x}=e;du(x);const Z=E?window.parent===window:!0;let P=!1;if(!Z)try{window.parent.document&&(P=!1)}catch(k){P=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!P)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),fe.reset();const V=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}:d!==void 0?d:{password:!0},ee=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all",headTitleMutations:h==="all"}:h||{};Fs();let X,be=0;const Ee=k=>{for(const te of D||[])te.eventProcessor&&(k=te.eventProcessor(k));return b&&!P&&(k=b(k)),k};K=(k,te)=>{var j;const Q=k;if(Q.timestamp=it(),(j=Ne[0])!=null&&j.isFrozen()&&Q.type!==_.FullSnapshot&&!(Q.type===_.IncrementalSnapshot&&Q.data.source===T.Mutation)&&Ne.forEach(ye=>ye.unfreeze()),Z)t==null||t(Ee(Q),te);else if(P){const ye={type:"rrweb",event:Ee(Q),origin:window.location.origin,isCheckout:te};window.parent.postMessage(ye,"*")}if(Q.type===_.FullSnapshot)X=Q,be=0;else if(Q.type===_.IncrementalSnapshot){if(Q.data.source===T.Mutation&&Q.data.isAttachIframe)return;be++;const ye=s&&be>=s,G=r&&Q.timestamp-X.timestamp>r;(ye||G)&&Rt(!0)}};const N=k=>{K({type:_.IncrementalSnapshot,data:L({source:T.Mutation},k)})},ge=k=>K({type:_.IncrementalSnapshot,data:L({source:T.Scroll},k)}),ce=k=>K({type:_.IncrementalSnapshot,data:L({source:T.CanvasMutation},k)}),Qe=k=>K({type:_.IncrementalSnapshot,data:L({source:T.AdoptedStyleSheet},k)}),le=new Bu({mutationCb:N,adoptedStyleSheetCb:Qe}),he=new Nu({mirror:fe,mutationCb:N,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:K});for(const k of D||[])k.getMirror&&k.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const Pe=new Uu;Zr=new Fu({recordCanvas:S,mutationCb:ce,win:window,blockClass:i,blockSelector:a,mirror:fe,sampling:y.canvas,dataURLOptions:w});const Re=new Iu({mutationCb:N,scrollCb:ge,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskInputOptions:V,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:F,sampling:y,slimDOMOptions:ee,iframeManager:he,stylesheetManager:le,canvasManager:Zr,keepIframeSrcFn:re,processedNodeManager:Pe},mirror:fe});Rt=(k=!1)=>{if(!v)return;K({type:_.Meta,data:{href:window.location.href,width:Ps(),height:_s()}},k),le.reset(),Re.init(),Ne.forEach(j=>j.lock());const te=Ba(document,{mirror:fe,blockClass:i,blockSelector:a,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskAllInputs:V,maskTextFn:p,maskInputFn:m,slimDOM:ee,dataURLOptions:w,recordCanvas:S,inlineImages:F,onSerialize:j=>{Ye(j,fe)&&he.addIframe(j),Us(j,fe)&&le.trackLinkElement(j),Oe(j)&&Re.addShadowRoot(U.shadowRoot(j),document)},onIframeLoad:(j,Q)=>{he.attachIframe(j,Q),Re.observeAttachShadow(j)},onStylesheetLoad:(j,Q)=>{le.attachLinkElement(j,Q)},keepIframeSrcFn:re});if(!te)return console.warn("Failed to snapshot the document");K({type:_.FullSnapshot,data:{node:te,initialOffset:Ts(window)}},k),Ne.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{const k=[],te=Q=>{var ye;return W(Ou)({mutationCb:N,mousemoveCb:(G,Vt)=>K({type:_.IncrementalSnapshot,data:{source:Vt,positions:G}}),mouseInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MouseInteraction},G)}),scrollCb:ge,viewportResizeCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.ViewportResize},G)}),inputCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Input},G)}),mediaInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MediaInteraction},G)}),styleSheetRuleCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleSheetRule},G)}),styleDeclarationCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleDeclaration},G)}),canvasMutationCb:ce,fontCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Font},G)}),selectionCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.Selection},G)})},customElementCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.CustomElement},G)})},blockClass:i,ignoreClass:o,ignoreSelector:u,maskTextClass:f,maskTextSelector:l,maskInputOptions:V,inlineStylesheet:n,sampling:y,recordDOM:v,recordCanvas:S,inlineImages:F,userTriggeredOnInput:I,collectFonts:O,doc:Q,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:re,blockSelector:a,slimDOMOptions:ee,dataURLOptions:w,mirror:fe,iframeManager:he,stylesheetManager:le,shadowDomManager:Re,processedNodeManager:Pe,canvasManager:Zr,ignoreCSSAttributes:ie,plugins:((ye=D==null?void 0:D.filter(G=>G.observer))==null?void 0:ye.map(G=>({observer:G.observer,options:G.options,callback:Vt=>K({type:_.Plugin,data:{plugin:G.name,payload:Vt}})})))||[]},g)};he.addLoadListener(Q=>{try{k.push(te(Q.contentDocument))}catch(ye){console.warn(ye)}});const j=()=>{Rt(),k.push(te(document)),Tt=!0};return document.readyState==="interactive"||document.readyState==="complete"?j():(k.push(oe("DOMContentLoaded",()=>{K({type:_.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&j()})),k.push(oe("load",()=>{K({type:_.Load,data:{}}),R==="load"&&j()},window))),()=>{k.forEach(Q=>Q()),Pe.destroy(),he.destroy(),Tt=!1,pu()}}catch(k){console.warn(k)}}_e.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");K({type:_.Custom,data:{tag:e,payload:t}})};_e.freezePage=()=>{Ne.forEach(e=>e.freeze())};_e.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");Rt(e)};_e.mirror=fe;function Fo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"}));function Wu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||f,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(b){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(b)}const u=o(e.navigator.userAgent)?1:0;function f(b,y){this.scrollLeft=b,this.scrollTop=y}function l(b){return .5*(1-Math.cos(Math.PI*b))}function n(b){if(b===null||typeof b!="object"||b.behavior===void 0||b.behavior==="auto"||b.behavior==="instant")return!0;if(typeof b=="object"&&b.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+b.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(b,y){if(y==="Y")return b.clientHeight+u<b.scrollHeight;if(y==="X")return b.clientWidth+u<b.scrollWidth}function d(b,y){const w=e.getComputedStyle(b,null)["overflow"+y];return w==="auto"||w==="scroll"}function h(b){const y=c(b,"Y")&&d(b,"Y"),w=c(b,"X")&&d(b,"X");return y||w}function m(b){for(;b!==t.body&&h(b)===!1;)b=b.parentNode||b.host;return b}function p(b){const y=a();let w,C,v,S=(y-b.startTime)/s;S=S>1?1:S,w=l(S),C=b.startX+(b.x-b.startX)*w,v=b.startY+(b.y-b.startY)*w,b.method.call(b.scrollable,C,v),(C!==b.x||v!==b.y)&&e.requestAnimationFrame(p.bind(e,b))}function g(b,y,w){let C,v,S,E;const R=a();b===t.body?(C=e,v=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=b,v=b.scrollLeft,S=b.scrollTop,E=f),p({scrollable:C,method:E,startTime:R,startX:v,startY:S,x:y,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const b=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof b=="undefined"?this.scrollLeft:~~b,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const b=m(this),y=b.getBoundingClientRect(),w=this.getBoundingClientRect();b!==t.body?(g.call(this,b,b.scrollLeft+w.left-y.left,b.scrollTop+w.top-y.top),e.getComputedStyle(b).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class zu{constructor(t=[],r){M(this,"timeOffset",0),M(this,"speed"),M(this,"actions"),M(this,"raf",null),M(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function On(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
146
+ `,Nn=typeof self!="undefined"&&self.Blob&&new Blob([Fo],{type:"text/javascript;charset=utf-8"});function Fu(e){let t;try{if(t=Nn&&(self.URL||self.webkitURL).createObjectURL(Nn),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Fo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Bu{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(f,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(l)});const{sampling:r="all",win:s,blockClass:i,blockSelector:o,recordCanvas:a,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&r==="all"&&this.initCanvasMutationObserver(s,i,o,u),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,o,{dataURLOptions:u})}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(t,r,s,i,o){const a=xn(r,s,i,!0),u=new Map,f=new Fu;f.onmessage=m=>{const{id:p}=m.data;if(u.set(p,!1),!("base64"in m.data))return;const{base64:g,type:v,width:y,height:w}=m.data;this.mutationCb({id:p,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,y,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const l=1e3/t;let n=0,c;const d=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(v=>{ae(v,s,i,!0)||m.push(v)}),g.querySelectorAll("*").forEach(v=>{v.shadowRoot&&p(v.shadowRoot)})};return p(r.document),m},h=m=>{if(n&&m-n<l){c=requestAnimationFrame(h);return}n=m,d().forEach(async p=>{var g;const v=this.mirror.getId(p);if(u.get(v)||p.width===0||p.height===0)return;if(u.set(v,!0),["webgl","webgl2"].includes(p.__context)){const b=p.getContext(p.__context);((g=b==null?void 0:b.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,w=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:y,resizeHeight:w});f.postMessage({id:v,bitmap:C,width:y,height:w,dataURLOptions:o.dataURLOptions},[C])}),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{a(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,r,s,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=xn(t,r,s,!1),a=Pu(this.processMutation.bind(this),t,r,s,i),u=Lu(this.processMutation.bind(this),t,r,s,i);this.resetObservers=()=>{o(),a(),u()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(a=>{const l=a,{type:u}=l;return Ue(l,["type"])}),{type:o}=s[0];this.mutationCb({id:r,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}class Uu{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new zs),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const s={id:r,styleIds:[]},i=[];for(const o of t){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),i.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,f)=>({rule:$n(u,o.href),index:f}))})),s.styleIds.push(a)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class $u{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let Q,xt,es,_t=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Ys=e.contentWindow)==null?void 0:Ys.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const de=Un();function _e(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:l=null,inlineStylesheet:n=!0,maskAllInputs:c,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:p,hooks:g,packFn:v,sampling:y={},dataURLOptions:w={},mousemoveWait:C,recordDOM:b=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:N=!1,inlineImages:F=!1,plugins:D,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:x}=e;pu(x);const K=E?window.parent===window:!0;let P=!1;if(!K)try{window.parent.document&&(P=!1)}catch(k){P=!0}if(K&&!t)throw new Error("emit function is required");if(!K&&!P)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),de.reset();const V=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}:d!==void 0?d:{password:!0},Z=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all",headTitleMutations:h==="all"}:h||{};Bs();let X,ve=0;const Ee=k=>{for(const te of D||[])te.eventProcessor&&(k=te.eventProcessor(k));return v&&!P&&(k=v(k)),k};Q=(k,te)=>{var j;const ee=k;if(ee.timestamp=nt(),(j=Oe[0])!=null&&j.isFrozen()&&ee.type!==_.FullSnapshot&&!(ee.type===_.IncrementalSnapshot&&ee.data.source===T.Mutation)&&Oe.forEach(fe=>fe.unfreeze()),K)t==null||t(Ee(ee),te);else if(P){const fe={type:"rrweb",event:Ee(ee),origin:window.location.origin,isCheckout:te};window.parent.postMessage(fe,"*")}if(ee.type===_.FullSnapshot)X=ee,ve=0;else if(ee.type===_.IncrementalSnapshot){if(ee.data.source===T.Mutation&&ee.data.isAttachIframe)return;ve++;const fe=s&&ve>=s,Be=r&&ee.timestamp-X.timestamp>r;(fe||Be)&&xt(!0)}};const O=k=>{Q({type:_.IncrementalSnapshot,data:L({source:T.Mutation},k)})},ye=k=>Q({type:_.IncrementalSnapshot,data:L({source:T.Scroll},k)}),he=k=>Q({type:_.IncrementalSnapshot,data:L({source:T.CanvasMutation},k)}),Ke=k=>Q({type:_.IncrementalSnapshot,data:L({source:T.AdoptedStyleSheet},k)}),le=new Uu({mutationCb:O,adoptedStyleSheetCb:Ke}),ue=new Iu({mirror:de,mutationCb:O,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:Q});for(const k of D||[])k.getMirror&&k.getMirror({nodeMirror:de,crossOriginIframeMirror:ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:ue.crossOriginIframeStyleMirror});const Pe=new $u;es=new Bu({recordCanvas:S,mutationCb:he,win:window,blockClass:i,blockSelector:o,mirror:de,sampling:y.canvas,dataURLOptions:w});const Re=new Du({mutationCb:O,scrollCb:ye,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskInputOptions:V,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:F,sampling:y,slimDOMOptions:Z,iframeManager:ue,stylesheetManager:le,canvasManager:es,keepIframeSrcFn:re,processedNodeManager:Pe},mirror:de});xt=(k=!1)=>{if(!b)return;Q({type:_.Meta,data:{href:window.location.href,width:ks(),height:Ps()}},k),le.reset(),Re.init(),Oe.forEach(j=>j.lock());const te=Ua(document,{mirror:de,blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskAllInputs:V,maskTextFn:p,maskInputFn:m,slimDOM:Z,dataURLOptions:w,recordCanvas:S,inlineImages:F,onSerialize:j=>{Je(j,de)&&ue.addIframe(j),$s(j,de)&&le.trackLinkElement(j),Ne(j)&&Re.addShadowRoot(U.shadowRoot(j),document)},onIframeLoad:(j,ee)=>{ue.attachIframe(j,ee),Re.observeAttachShadow(j)},onStylesheetLoad:(j,ee)=>{le.attachLinkElement(j,ee)},keepIframeSrcFn:re});if(!te)return console.warn("Failed to snapshot the document");Q({type:_.FullSnapshot,data:{node:te,initialOffset:_s(window)}},k),Oe.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};try{const k=[],te=fe=>{var Be;return W(Ou)({mutationCb:O,mousemoveCb:(H,jt)=>Q({type:_.IncrementalSnapshot,data:{source:jt,positions:H}}),mouseInteractionCb:H=>Q({type:_.IncrementalSnapshot,data:L({source:T.MouseInteraction},H)}),scrollCb:ye,viewportResizeCb:H=>Q({type:_.IncrementalSnapshot,data:L({source:T.ViewportResize},H)}),inputCb:H=>Q({type:_.IncrementalSnapshot,data:L({source:T.Input},H)}),mediaInteractionCb:H=>Q({type:_.IncrementalSnapshot,data:L({source:T.MediaInteraction},H)}),styleSheetRuleCb:H=>Q({type:_.IncrementalSnapshot,data:L({source:T.StyleSheetRule},H)}),styleDeclarationCb:H=>Q({type:_.IncrementalSnapshot,data:L({source:T.StyleDeclaration},H)}),canvasMutationCb:he,fontCb:H=>Q({type:_.IncrementalSnapshot,data:L({source:T.Font},H)}),selectionCb:H=>{Q({type:_.IncrementalSnapshot,data:L({source:T.Selection},H)})},customElementCb:H=>{Q({type:_.IncrementalSnapshot,data:L({source:T.CustomElement},H)})},blockClass:i,ignoreClass:a,ignoreSelector:u,maskTextClass:f,maskTextSelector:l,maskInputOptions:V,inlineStylesheet:n,sampling:y,recordDOM:b,recordCanvas:S,inlineImages:F,userTriggeredOnInput:I,collectFonts:N,doc:fe,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:re,blockSelector:o,slimDOMOptions:Z,dataURLOptions:w,mirror:de,iframeManager:ue,stylesheetManager:le,shadowDomManager:Re,processedNodeManager:Pe,canvasManager:es,ignoreCSSAttributes:ie,plugins:((Be=D==null?void 0:D.filter(H=>H.observer))==null?void 0:Be.map(H=>({observer:H.observer,options:H.options,callback:jt=>Q({type:_.Plugin,data:{plugin:H.name,payload:jt}})})))||[]},g)},j=fe=>{try{k.push(te(fe.contentDocument))}catch(Be){console.warn(Be)}};ue.addLoadListener(j);const ee=()=>{xt(),k.push(te(document)),_t=!0};return document.readyState==="interactive"||document.readyState==="complete"?ee():(k.push(oe("DOMContentLoaded",()=>{Q({type:_.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&ee()})),k.push(oe("load",()=>{Q({type:_.Load,data:{}}),R==="load"&&ee()},window))),()=>{k.forEach(fe=>fe()),Pe.destroy(),ue.removeLoadListener(),ue.destroy(),_t=!1,mu()}}catch(k){console.warn(k)}}_e.addCustomEvent=(e,t)=>{if(!_t)throw new Error("please add custom event after start recording");Q({type:_.Custom,data:{tag:e,payload:t}})};_e.freezePage=()=>{Oe.forEach(e=>e.freeze())};_e.takeFullSnapshot=e=>{if(!_t)throw new Error("please take full snapshot after start recording");xt(e)};_e.mirror=de;function Bo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const Wu=Object.freeze(Object.defineProperty({__proto__:null,default:Bo},Symbol.toStringTag,{value:"Module"}));function zu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||f,scrollIntoView:r.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(v){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(v)}const u=a(e.navigator.userAgent)?1:0;function f(v,y){this.scrollLeft=v,this.scrollTop=y}function l(v){return .5*(1-Math.cos(Math.PI*v))}function n(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(v,y){if(y==="Y")return v.clientHeight+u<v.scrollHeight;if(y==="X")return v.clientWidth+u<v.scrollWidth}function d(v,y){const w=e.getComputedStyle(v,null)["overflow"+y];return w==="auto"||w==="scroll"}function h(v){const y=c(v,"Y")&&d(v,"Y"),w=c(v,"X")&&d(v,"X");return y||w}function m(v){for(;v!==t.body&&h(v)===!1;)v=v.parentNode||v.host;return v}function p(v){const y=o();let w,C,b,S=(y-v.startTime)/s;S=S>1?1:S,w=l(S),C=v.startX+(v.x-v.startX)*w,b=v.startY+(v.y-v.startY)*w,v.method.call(v.scrollable,C,b),(C!==v.x||b!==v.y)&&e.requestAnimationFrame(p.bind(e,v))}function g(v,y,w){let C,b,S,E;const R=o();v===t.body?(C=e,b=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=v,b=v.scrollLeft,S=v.scrollTop,E=f),p({scrollable:C,method:E,startTime:R,startX:b,startY:S,x:y,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const v=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof v=="undefined"?this.scrollLeft:~~v,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const v=m(this),y=v.getBoundingClientRect(),w=this.getBoundingClientRect();v!==t.body?(g.call(this,v,v.scrollLeft+w.left-y.left,v.scrollTop+w.top-y.top),e.getComputedStyle(v).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class qu{constructor(t=[],r){M(this,"timeOffset",0),M(this,"speed"),M(this,"actions"),M(this,"raf",null),M(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function On(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
147
147
  Copyright (c) Microsoft Corporation.
148
148
 
149
149
  Permission to use, copy, modify, and/or distribute this software for any
@@ -156,7 +156,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
156
156
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
157
157
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
158
158
  PERFORMANCE OF THIS SOFTWARE.
159
- ***************************************************************************** */function Nn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(u){i={error:u}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var He;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(He||(He={}));var Bo={type:"xstate.init"};function es(e){return e===void 0?[]:[].concat(e)}function ze(e){return{type:"xstate.assign",assignment:e}}function In(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function _t(e){return function(t){return e===t}}function Uo(e){return typeof e=="string"?{type:e}:e}function Dn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_t(e)}}function An(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(u){o[u]=typeof a.assignment[u]=="function"?a.assignment[u](s,r):a.assignment[u]}),s=o,!1}return!0}),s,i]}function $o(e,t){t===void 0&&(t={});var r=Nn(An(es(e.states[e.initial].entry).map(function(o){return In(o,t.actions)}),e.context,Bo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:_t(e.initial)},transition:function(o,u){var f,l,n=typeof o=="string"?{value:o,context:e.context}:o,c=n.value,d=n.context,h=Uo(u),m=e.states[c];if(m.on){var p=es(m.on[h.type]);try{for(var g=function(P){var V=typeof Symbol=="function"&&Symbol.iterator,ee=V&&P[V],X=0;if(ee)return ee.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&X>=P.length&&(P=void 0),{value:P&&P[X++],done:!P}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return Dn(c,d);var w=typeof y=="string"?{target:y}:y,C=w.target,v=w.actions,S=v===void 0?[]:v,E=w.cond,R=E===void 0?function(){return!0}:E,I=C===void 0,O=C!=null?C:c,F=e.states[O];if(R(d,h)){var D=Nn(An((I?es(S):[].concat(m.exit,S,F.entry).filter(function(P){return P})).map(function(P){return In(P,a._options.actions)}),d,h),3),re=D[0],ie=D[1],x=D[2],Z=C!=null?C:c;return{value:Z,context:ie,actions:re,changed:C!==c||re.length>0||x,matches:_t(Z)}}}}catch(P){f={error:P}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(f)throw f.error}}}return Dn(c,d)}};return a}var Tn=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Wo(e){var t=e.initialState,r=He.NotStarted,s=new Set,i={_machine:e,send:function(a){r===He.Running&&(t=e.transition(t,a),Tn(t,Uo(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:_t(o.value)}}return r=He.Running,Tn(t,Bo),i},stop:function(){return r=He.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function qu(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Vu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=$o({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ze({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:ze((a,o)=>{let u=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(u=o.payload.timeOffset),se(L({},a),{timeOffset:u,baselineTime:a.events[0].timestamp+u})}),play(a){var o;const{timer:u,events:f,baselineTime:l,lastPlayedEvent:n}=a;u.clear();for(const m of f)On(m,l);const c=qu(f,l);let d=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(d=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),l<(d||0)&&s.emit(z.PlayBack);const h=new Array;for(const m of c)if(!(d&&d<l&&(m.timestamp<=d||m===n)))if(m.timestamp<l)h.push(m);else{const p=t(m,!1);u.addAction({doAction:()=>{p()},delay:m.delay})}r(h),s.emit(z.Flush),u.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:ze(a=>se(L({},a),{lastPlayedEvent:null})),startLive:ze({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ze((a,o)=>{const{baselineTime:u,timer:f,events:l}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;On(n,u);let c=l.length-1;if(!l[c]||l[c].timestamp<=n.timestamp)l.push(n);else{let m=-1,p=0;for(;p<=c;){const g=Math.floor((p+c)/2);l[g].timestamp<=n.timestamp?p=g+1:c=g-1}m===-1&&(m=p),l.splice(m,0,n)}const d=n.timestamp<u,h=t(n,d);d?h():f.isActive()&&f.addAction({doAction:()=>{h()},delay:n.delay})}return se(L({},a),{events:l})})}});return Wo(i)}function ju(e){const t=$o({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:ze({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Wo(t)}const Gu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],_n=new Map;function zo(e,t){let r=_n.get(e);return r||(r=new Map,_n.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Ie(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Ie(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:a}=s;return zo(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Ie(e,t,r))))}else{if("base64"in s)return Au(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Ie(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Ie(e,t,r)));return s}}function Hu(e,t){try{return t===Ce.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Yu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ju(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Yu.includes(r))return;const s=zo(e,r);s.includes(t)||s.push(t)}async function Xu({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=Hu(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],u=await Promise.all(e.args.map(Ie(s,a))),f=o.apply(a,u);Ju(a,f);const l=!1}catch(a){i(e,a)}}async function Qu({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async f=>Promise.all(f.args.map(Ie(s,a))));(await Promise.all(o)).forEach((f,l)=>{const n=t[l];try{if(n.setter){a[n.property]=n.args[0];return}const c=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),c.apply(a,n.args)):c.apply(a,f)}catch(c){i(n,c)}})}async function os({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,u="commands"in o?o.commands:[o];if([Ce.WebGL,Ce.WebGL2].includes(t.type)){for(let f=0;f<u.length;f++){const l=u[f];await Xu({mutation:l,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await Qu({event:e,mutations:u,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}const Pn=["AUDIO","VIDEO"];class Ku{constructor(t){M(this,"mediaMap",new Map),M(this,"warn"),M(this,"service"),M(this,"speedService"),M(this,"emitter"),M(this,"getCurrentTime"),M(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(z.Start,this.start.bind(this)),this.emitter.on(z.SkipStart,this.start.bind(this)),this.emitter.on(z.Pause,this.pause.bind(this)),this.emitter.on(z.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let u=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(u=u%o),r.currentTime=u}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var h,m,p,g,b;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:u,muted:f,volume:l,loop:n}=s;return{isPlaying:a===Me.Play||a!==Me.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=u!=null?u:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=l!=null?l:i==null?void 0:i.volume)!=null?p:1,muted:(g=f!=null?f:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=n!=null?n:i==null?void 0:i.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,u=this.service.state.matches("paused"),f=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==f&&(t.playbackRate=f),o&&!u?t.play():t.pause()}catch(l){this.warn(`Failed to replay media interactions: ${l.message||l}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),u=a.attributes;let f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&o&&i.pause();let l=1;typeof u.rr_mediaPlaybackRate=="number"&&(l=u.rr_mediaPlaybackRate);let n=!1;typeof u.rr_mediaMuted=="boolean"?n=u.rr_mediaMuted:n=i.getAttribute("muted")!==null;let c=!1;typeof u.rr_mediaLoop=="boolean"?c=u.rr_mediaLoop:c=i.getAttribute("loop")!==null;let d=1;typeof u.rr_mediaVolume=="number"&&(d=u.rr_mediaVolume);let h=0;typeof u.rr_mediaCurrentTime=="number"&&(h=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:l,volume:d,muted:n,loop:c}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){Pn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Pn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function St(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",u=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&u))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(u?r.showModal():r.show())}}function Zu(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const ec=5*1e3,tc=Fo||$u,kn="[replayer]",ts={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ln(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==q.TouchStart)}class rc{constructor(t,r){if(M(this,"wrapper"),M(this,"iframe"),M(this,"service"),M(this,"speedService"),M(this,"config"),M(this,"usingVirtualDom",!1),M(this,"virtualDom",new Xe),M(this,"mouse"),M(this,"mouseTail",null),M(this,"tailPositions",[]),M(this,"emitter",tc()),M(this,"nextUserInteractionEvent"),M(this,"legacy_missingNodeRetryMap",{}),M(this,"cache",Pi()),M(this,"imageMap",new Map),M(this,"canvasEventMap",new Map),M(this,"mirror",Un()),M(this,"styleMirror",new Ws),M(this,"mediaManager"),M(this,"firstFullSnapshot",null),M(this,"newDocumentQueue",[]),M(this,"mousePos",null),M(this,"touchActive",null),M(this,"lastMouseDownEvent",null),M(this,"lastHoveredRootNode"),M(this,"lastSelectionData",null),M(this,"constructedStyleMutations",[]),M(this,"adoptedStyleSheets",[]),M(this,"emitterHandlers",[]),M(this,"serviceSubscription"),M(this,"speedServiceSubscription"),M(this,"timeouts",new Set),M(this,"styleSheetLoadListeners",new Map),M(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const n of[this.mouseTail,this.iframe])n&&(n.setAttribute("width",String(l.width)),n.setAttribute("height",String(l.height)))}),M(this,"applyEventsSynchronously",l=>{for(const n of l){switch(n.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(n,!0)()}}),M(this,"getCastFn",(l,n=!1)=>{let c;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:c=()=>{this.emitter.emit(z.CustomEvent,l)};break;case _.Meta:c=()=>this.emitter.emit(z.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,n),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,n),!n&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,m={speed:Math.min(Math.round(h/ec),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:m}),this.emitter.emit(z.SkipStart,m)}}};break}return()=>{c&&c();for(const m of this.config.plugins||[])m.handler&&m.handler(l,n,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const m=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(z.Finish))};let p=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(p+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(m,p)}this.emitter.emit(z.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ts,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.addEmitterHandler(z.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});const i=()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(n,c,d)=>{os({event:n,mutation:c,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(n,c)=>{n.source===T.StyleSheetRule?this.applyStyleSheetRule(n,c):n.source===T.StyleDeclaration&&this.applyStyleDeclaration(n,c)},afterAppend:(n,c)=>{for(const d of this.config.plugins||[])d.onBuild&&d.onBuild(n,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{Nt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(n){this.warn(n)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const n in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[n],d=It(c.node,this.mirror,this.virtualDom.mirror);Nt(d,c.node,l,this.virtualDom.mirror),c.node=d}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(n=>{this.applyStyleSheetMutation(n)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(n=>{this.applyAdoptedStyleSheet(n)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,n]=this.lastMouseDownEvent;l.dispatchEvent(n)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)};this.addEmitterHandler(z.Flush,i);const a=()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()};this.addEmitterHandler(z.PlayBack,a);const o=new zu([],{speed:this.config.speed});this.service=Vu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,n)=>l.timestamp-n.timestamp),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe(l=>{this.emitter.emit(z.StateChange,{player:l})}),this.speedService=ju({normalSpeed:-1,timer:o}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(l=>{this.emitter.emit(z.StateChange,{speed:l})}),this.mediaManager=new Ku({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const u=this.service.state.context.events.find(l=>l.type===_.Meta),f=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(u){const{width:l,height:n}=u.data;this.addTimeout(()=>{this.emitter.emit(z.Resize,{width:l,height:n})},0)}f&&this.addTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=f,this.rebuildFullSnapshot(f),(l=this.iframe.contentWindow)==null||l.scrollTo(f.data.initialOffset))},1),this.service.state.context.events.find(Ln)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}addEmitterHandler(t,r){this.emitter.on(t,r),this.emitterHandlers.push({event:t,handler:r})}addTimeout(t,r){const s=setTimeout(()=>{this.timeouts.delete(s),t()},r);return this.timeouts.add(s),s}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(z.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(z.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(z.Resume)}destroy(){var t,r;!this.wrapper||!this.wrapper.parentNode||(this.pause(),this.emitterHandlers.forEach(({event:s,handler:i})=>{this.emitter.off(s,i)}),this.emitterHandlers=[],(t=this.serviceSubscription)==null||t.unsubscribe(),(r=this.speedServiceSubscription)==null||r.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.timeouts.forEach(s=>clearTimeout(s)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((s,i)=>{i.removeEventListener("load",s)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(z.Destroy))}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Ln(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Pi()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Wu(this.iframe.contentWindow,this.iframe.contentDocument),Fs(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,a=(f,l)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(s,f),this.mediaManager.isSupportedMediaElement(f)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(f,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(f,{id:l,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ol(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:f,builtNode:l}of s)this.attachDocumentToIframe(f,l),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==f);const{documentElement:o,head:u}=this.iframe.contentDocument;this.insertStyleRules(o,u),i.forEach(f=>St(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(z.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=Gu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,So(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:T.StyleSheetRule,adds:i.map((o,u)=>({rule:o,index:u}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(u,f)=>{u.nodeName==="DIALOG"&&a.add(u),this.collectIframeAndAttachDocument(i,u);const l=s.getMeta(u);if((l==null?void 0:l.type)===Se.Element&&(l==null?void 0:l.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:c}=r.contentDocument;this.insertStyleRules(n,c)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:f,replayer:this})};tt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==u);a.forEach(u=>St(u))}collectIframeAndAttachDocument(t,r){if(Ye(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(z.Start,o),this.emitter.on(z.Pause,o);const u=()=>{this.emitter.off(z.Start,o),this.emitter.off(z.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(s.add(f),f.addEventListener("load",()=>{s.delete(f),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(z.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(z.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(Ie(this.imageMap,null,s)));return se(L({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Ie(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case T.Mutation:{try{this.applyMutation(o,r)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,o)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const u=o.positions[o.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:o}}else o.positions.forEach(u=>{const f={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,r,o)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(o.id===-1)break;const u=new Event(De(q[o.type])),f=this.mirror.getNode(o.id);if(!f)return this.debugNodeNotFound(o,o.id);this.emitter.emit(z.MouseInteraction,{type:o.type,target:f});const{triggerFocus:l}=this.config;switch(o.type){case q.Blur:"blur"in f&&f.blur();break;case q.Focus:l&&f.focus&&f.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(o.type===q.TouchStart?this.touchActive=!0:o.type===q.TouchEnd&&(this.touchActive=!1),o.type===q.MouseDown?this.lastMouseDownEvent=[f,u]:o.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case T.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);u.scrollData=o;break}this.applyScroll(o,r);break}case T.ViewportResize:this.emitter.emit(z.Resize,{width:o.width,height:o.height});break;case T.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);u.inputData=o;break}this.applyInput(o);break}case T.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);const f=u,{events:l}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:t.timestamp-l[0].timestamp,mutation:o});break}case T.StyleSheetRule:case T.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 T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);u.canvasMutations.push({event:t,mutation:o})}else{const u=this.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);os({event:t,mutation:o,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const u=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(u)}catch(u){this.warn(u)}break}case T.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Hl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const f in this.legacy_missingNodeRetryMap)try{const l=this.legacy_missingNodeRetryMap[f],n=vo(l.node,this.virtualDom,this.mirror);n&&(l.node=n)}catch(l){this.warn(l)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(f=>s.getNode(f.id)?!0:(this.warnNodeNotFound(t,f.id),!1)),t.removes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return;let c=s.getNode(f.parentId);if(!c)return this.warnNodeNotFound(t,f.parentId);if(f.isShadow&&Oe(c)&&(c=c.shadowRoot),s.removeNodeFromMap(n),c)try{c.removeChild(n),this.usingVirtualDom&&n.nodeName==="#text"&&c.nodeName==="STYLE"&&((l=c.rules)==null?void 0:l.length)>0&&(c.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",c,n,t);else throw d}});const i=L({},this.legacy_missingNodeRetryMap),a=[],o=f=>{var l,n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=s.getNode(f.parentId);if(!c)return f.node.type===Se.Document?this.newDocumentQueue.push(f):t.adds.some(w=>w.node.id===f.parentId)?a.push(f):void 0;f.node.isShadow&&(Oe(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let d=null,h=null;if(f.previousId&&(d=s.getNode(f.previousId)),f.nextId&&(h=s.getNode(f.nextId)),f.node.rootId&&!s.getNode(f.node.rootId))return;const m=f.node.rootId?s.getNode(f.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ye(c,s)){this.attachDocumentToIframe(f,c);return}const p=(y,w)=>{if(!this.usingVirtualDom){St(y);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(y,{id:w,replayer:this})}},g=tt(f.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(f.previousId===-1||f.nextId===-1){i[f.node.id]={node:g,mutation:f};return}const b=s.getMeta(c);if(b&&b.type===Se.Element&&f.node.type===Se.Text){const y=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(b.tagName==="textarea")for(const w of y)w.nodeType===c.TEXT_NODE&&c.removeChild(w);else if(b.tagName==="style"&&y.length===1)for(const w of y)w.nodeType===c.TEXT_NODE&&!s.hasNode(w)&&(g.textContent=w.textContent,c.removeChild(w))}else if((b==null?void 0:b.type)===Se.Document){const y=c;f.node.type===Se.DocumentType&&((l=y.childNodes[0])==null?void 0:l.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?c.insertBefore(g,d.nextSibling):h&&h.parentNode?c.contains(h)?c.insertBefore(g,h):c.insertBefore(g,null):c.appendChild(g),p(g,f.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&c.nodeName==="STYLE"&&((n=c.rules)==null?void 0:n.length)>0&&(c.rules=[]),Ye(g,this.mirror)){const y=this.mirror.getId(g),w=this.newDocumentQueue.find(C=>C.parentId===y);w&&(this.attachDocumentToIframe(w,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(i,c,g,f)};t.adds.forEach(f=>{o(f)});const u=performance.now();for(;a.length;){const f=xo(a);if(a.length=0,performance.now()-u>150){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}for(const l of f)s.getNode(l.value.parentId)?Bs(l,c=>{o(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",l)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Mo(t.texts).forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);if(n.textContent=f.value,this.usingVirtualDom){const c=n.parentNode;((l=c==null?void 0:c.rules)==null?void 0:l.length)>0&&(c.rules=[])}}),t.attributes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);for(const c in f.attributes)if(typeof c=="string"){const d=f.attributes[c];if(d===null)n.removeAttribute(c),c==="open"&&Zu(n,f);else if(typeof d=="string")try{if(c==="_cssText"&&(n.nodeName==="LINK"||n.nodeName==="STYLE"))try{const h=s.getMeta(n);Object.assign(h.attributes,f.attributes);const m=tt(h,{doc:n.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),p=n.nextSibling,g=n.parentNode;if(m&&g){g.removeChild(n),g.insertBefore(m,p),s.replace(f.id,m);break}}catch(h){}if(c==="value"&&n.nodeName==="TEXTAREA"){const h=n;h.childNodes.forEach(p=>h.removeChild(p));const m=(l=n.ownerDocument)==null?void 0:l.createTextNode(d);m&&h.appendChild(m)}else n.setAttribute(c,d);c==="rr_open_mode"&&n.nodeName==="DIALOG"&&St(n,f)}catch(h){this.warn("An error occurred may due to the checkout feature.",h)}else if(c==="style"){const h=d,m=n;for(const p in h)if(h[p]===!1)m.style.removeProperty(p);else if(h[p]instanceof Array){const g=h[p];m.style.setProperty(p,g[0],g[1])}else{const g=h[p];m.style.setProperty(p,g)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Se.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(u){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:u})=>{const f=this.mirror.getNode(i),l=this.mirror.getNode(o);if(!f||!l)return;const n=new Range;n.setStart(f,a),n.setEnd(l,u);const c=f.ownerDocument,d=c==null?void 0:c.getSelection();return d&&r.add(d),{range:n,selection:d}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){const{positions:l,index:n}=is(f);je(r.cssRules,l).insertRule(u,n)}else{const l=f===void 0?void 0:Math.min(f,r.cssRules.length);r==null||r.insertRule(u,l)}}catch(l){}}),(i=t.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){const{positions:f,index:l}=is(u);je(r.cssRules,f).deleteRule(l||0)}else r==null||r.deleteRule(u)}catch(f){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(u){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(u){}}applyStyleDeclaration(t,r){var s,i;if(t.set){const a=je(r.rules,t.index);(s=a==null?void 0:a.style)==null||s.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const a=je(r.rules,t.index);(i=a==null?void 0:a.style)==null||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(u=>{var f;let l=null,n=null;if(Oe(s)?n=((f=s.ownerDocument)==null?void 0:f.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{l=new n.CSSStyleSheet,this.styleMirror.add(l,u.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:u.rules},l)}catch(c){}});const i=10;let a=0;const o=(u,f)=>{const l=f.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Oe(u)?u.shadowRoot.adoptedStyleSheets=l:u.nodeName==="#document"&&(u.adoptedStyleSheets=l),l.length!==f.length&&a<i&&(setTimeout(()=>o(u,f),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,u=a&&t[a],f=o&&t[o];if(u){const{node:l,mutation:n}=u;r.insertBefore(l,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}if(f){const{node:l,mutation:n}=f;r.insertBefore(l,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const u=$s(o,this.iframe),f=t*u.absoluteScale+u.x,l=r*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${l}px`,i||this.drawMouseTail({x:f,y:l}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?ts:Object.assign({},ts,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=s,u.lineCap=r,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(z.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(kn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(kn,...t)}}const{addCustomEvent:sc}=_e,{freezePage:ic}=_e,{takeFullSnapshot:nc}=_e;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=q;exports.Replayer=rc;exports.ReplayerEvents=z;exports.addCustomEvent=sc;exports.canvasMutation=os;exports.freezePage=ic;exports.record=_e;exports.takeFullSnapshot=nc;exports.utils=lu;
159
+ ***************************************************************************** */function In(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(u){i={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var Ye;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ye||(Ye={}));var Uo={type:"xstate.init"};function ts(e){return e===void 0?[]:[].concat(e)}function qe(e){return{type:"xstate.assign",assignment:e}}function Dn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Pt(e){return function(t){return e===t}}function $o(e){return typeof e=="string"?{type:e}:e}function An(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Pt(e)}}function Tn(e,t,r){var s=t,i=!1;return[e.filter(function(o){if(o.type==="xstate.assign"){i=!0;var a=Object.assign({},s);return typeof o.assignment=="function"?a=o.assignment(s,r):Object.keys(o.assignment).forEach(function(u){a[u]=typeof o.assignment[u]=="function"?o.assignment[u](s,r):o.assignment[u]}),s=a,!1}return!0}),s,i]}function Wo(e,t){t===void 0&&(t={});var r=In(Tn(ts(e.states[e.initial].entry).map(function(a){return Dn(a,t.actions)}),e.context,Uo),2),s=r[0],i=r[1],o={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:Pt(e.initial)},transition:function(a,u){var f,l,n=typeof a=="string"?{value:a,context:e.context}:a,c=n.value,d=n.context,h=$o(u),m=e.states[c];if(m.on){var p=ts(m.on[h.type]);try{for(var g=function(P){var V=typeof Symbol=="function"&&Symbol.iterator,Z=V&&P[V],X=0;if(Z)return Z.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&X>=P.length&&(P=void 0),{value:P&&P[X++],done:!P}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),v=g.next();!v.done;v=g.next()){var y=v.value;if(y===void 0)return An(c,d);var w=typeof y=="string"?{target:y}:y,C=w.target,b=w.actions,S=b===void 0?[]:b,E=w.cond,R=E===void 0?function(){return!0}:E,I=C===void 0,N=C!=null?C:c,F=e.states[N];if(R(d,h)){var D=In(Tn((I?ts(S):[].concat(m.exit,S,F.entry).filter(function(P){return P})).map(function(P){return Dn(P,o._options.actions)}),d,h),3),re=D[0],ie=D[1],x=D[2],K=C!=null?C:c;return{value:K,context:ie,actions:re,changed:C!==c||re.length>0||x,matches:Pt(K)}}}}catch(P){f={error:P}}finally{try{v&&!v.done&&(l=g.return)&&l.call(g)}finally{if(f)throw f.error}}}return An(c,d)}};return o}var _n=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function zo(e){var t=e.initialState,r=Ye.NotStarted,s=new Set,i={_machine:e,send:function(o){r===Ye.Running&&(t=e.transition(t,o),_n(t,$o(o)),s.forEach(function(a){return a(t)}))},subscribe:function(o){return s.add(o),o(t),{unsubscribe:function(){return s.delete(o)}}},start:function(o){if(o){var a=typeof o=="object"?o:{context:e.config.context,value:o};t={value:a.value,actions:[],context:a.context,matches:Pt(a.value)}}return r=Ye.Running,_n(t,Uo),i},stop:function(){return r=Ye.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function Vu(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function ju(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=Wo({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:qe({lastPlayedEvent:(o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent}),recordTimeOffset:qe((o,a)=>{let u=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(u=a.payload.timeOffset),se(L({},o),{timeOffset:u,baselineTime:o.events[0].timestamp+u})}),play(o){var a;const{timer:u,events:f,baselineTime:l,lastPlayedEvent:n}=o;u.clear();for(const m of f)On(m,l);const c=Vu(f,l);let d=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(d=n.timestamp+((a=n.data.positions[0])==null?void 0:a.timeOffset)),l<(d||0)&&s.emit(z.PlayBack);const h=new Array;for(const m of c)if(!(d&&d<l&&(m.timestamp<=d||m===n)))if(m.timestamp<l)h.push(m);else{const p=t(m,!1);u.addAction({doAction:()=>{p()},delay:m.delay})}r(h),s.emit(z.Flush),u.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:qe(o=>se(L({},o),{lastPlayedEvent:null})),startLive:qe({baselineTime:(o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:qe((o,a)=>{const{baselineTime:u,timer:f,events:l}=o;if(a.type==="ADD_EVENT"){const{event:n}=a.payload;On(n,u);let c=l.length-1;if(!l[c]||l[c].timestamp<=n.timestamp)l.push(n);else{let m=-1,p=0;for(;p<=c;){const g=Math.floor((p+c)/2);l[g].timestamp<=n.timestamp?p=g+1:c=g-1}m===-1&&(m=p),l.splice(m,0,n)}const d=n.timestamp<u,h=t(n,d);d?h():f.isActive()&&f.addAction({doAction:()=>{h()},delay:n.delay})}return se(L({},o),{events:l})})}});return zo(i)}function Gu(e){const t=Wo({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:qe({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return zo(t)}const Hu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Pn=new Map;function qo(e,t){let r=Pn.get(e);return r||(r=new Map,Pn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Ie(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Ie(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:o}=s;return qo(t,i)[o]}else if("args"in s){const{rr_type:i,args:o}=s,a=window[i];return new a(...await Promise.all(o.map(Ie(e,t,r))))}else{if("base64"in s)return Tu(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const o=new Image;return o.src=s.src,e.set(s.src,o),o}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Ie(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Ie(e,t,r)));return s}}function Yu(e,t){try{return t===Ce.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Ju=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Xu(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Ju.includes(r))return;const s=qo(e,r);s.includes(t)||s.push(t)}async function Qu({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const o=Yu(t,r);if(!o)return;if(e.setter){o[e.property]=e.args[0];return}const a=o[e.property],u=await Promise.all(e.args.map(Ie(s,o))),f=a.apply(o,u);Xu(o,f);const l=!1}catch(o){i(e,o)}}async function Ku({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const o=r.getContext("2d");if(!o){i(t[0],new Error("Canvas context is null"));return}const a=t.map(async f=>Promise.all(f.args.map(Ie(s,o))));(await Promise.all(a)).forEach((f,l)=>{const n=t[l];try{if(n.setter){o[n.property]=n.args[0];return}const c=o[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),c.apply(o,n.args)):c.apply(o,f)}catch(c){i(n,c)}})}async function as({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:o}){try{const a=i.get(e)||t,u="commands"in a?a.commands:[a];if([Ce.WebGL,Ce.WebGL2].includes(t.type)){for(let f=0;f<u.length;f++){const l=u[f];await Qu({mutation:l,type:t.type,target:r,imageMap:s,errorHandler:o})}return}await Ku({event:e,mutations:u,target:r,imageMap:s,errorHandler:o})}catch(a){o(t,a)}}const kn=["AUDIO","VIDEO"];class Zu{constructor(t){M(this,"mediaMap",new Map),M(this,"warn"),M(this,"service"),M(this,"speedService"),M(this,"emitter"),M(this,"getCurrentTime"),M(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(z.Start,this.start.bind(this)),this.emitter.on(z.SkipStart,this.start.bind(this)),this.emitter.on(z.Pause,this.pause.bind(this)),this.emitter.on(z.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const o=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,a="duration"in r&&r.duration;if(Number.isNaN(a)){this.waitForMetadata(r);return}let u=s.currentTimeAtLastInteraction+o;r.loop&&a!==!1&&(u=u%a),r.currentTime=u}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var h,m,p,g,v;const i=this.mediaMap.get(t),{type:o,playbackRate:a,currentTime:u,muted:f,volume:l,loop:n}=s;return{isPlaying:o===Me.Play||o!==Me.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=u!=null?u:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(m=a!=null?a:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=l!=null?l:i==null?void 0:i.volume)!=null?p:1,muted:(g=f!=null?f:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(v=n!=null?n:i==null?void 0:i.loop)!=null?v:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:o,isPlaying:a}=r,u=this.service.state.matches("paused"),f=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==o&&(t.volume=o),t.muted=s,t.loop=i,t.playbackRate!==f&&(t.playbackRate=f),a&&!u?t.play():t.pause()}catch(l){this.warn(`Failed to replay media interactions: ${l.message||l}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,o=s.getMeta(i);if(!o||!("attributes"in o))return;const a=this.service.state.matches("paused"),u=o.attributes;let f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&a&&i.pause();let l=1;typeof u.rr_mediaPlaybackRate=="number"&&(l=u.rr_mediaPlaybackRate);let n=!1;typeof u.rr_mediaMuted=="boolean"?n=u.rr_mediaMuted:n=i.getAttribute("muted")!==null;let c=!1;typeof u.rr_mediaLoop=="boolean"?c=u.rr_mediaLoop:c=i.getAttribute("loop")!==null;let d=1;typeof u.rr_mediaVolume=="number"&&(d=u.rr_mediaVolume);let h=0;typeof u.rr_mediaCurrentTime=="number"&&(h=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:l,volume:d,muted:n,loop:c}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){kn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return kn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Ct(e,t){if(e.nodeName!=="DIALOG"||e instanceof ge)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),o=r.getAttribute("rr_open_mode"),a=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",u=o==="modal";if(!(s&&!(i&&o==="non-modal"||!i&&u))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),a&&(u?r.showModal():r.show())}}function ec(e,t){if(e.nodeName!=="DIALOG"||e instanceof ge)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const tc=5*1e3,rc=Bo||Wu,Ln="[replayer]",rs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Fn(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==q.TouchStart)}class sc{constructor(t,r){if(M(this,"wrapper"),M(this,"iframe"),M(this,"service"),M(this,"speedService"),M(this,"config"),M(this,"usingVirtualDom",!1),M(this,"virtualDom",new Qe),M(this,"mouse"),M(this,"mouseTail",null),M(this,"tailPositions",[]),M(this,"emitter",rc()),M(this,"nextUserInteractionEvent"),M(this,"legacy_missingNodeRetryMap",{}),M(this,"cache",ki()),M(this,"imageMap",new Map),M(this,"canvasEventMap",new Map),M(this,"mirror",Un()),M(this,"styleMirror",new zs),M(this,"mediaManager"),M(this,"firstFullSnapshot",null),M(this,"newDocumentQueue",[]),M(this,"mousePos",null),M(this,"touchActive",null),M(this,"lastMouseDownEvent",null),M(this,"lastHoveredRootNode"),M(this,"lastSelectionData",null),M(this,"constructedStyleMutations",[]),M(this,"adoptedStyleSheets",[]),M(this,"emitterHandlers",[]),M(this,"serviceSubscription"),M(this,"speedServiceSubscription"),M(this,"timeouts",new Set),M(this,"styleSheetLoadListeners",new Map),M(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const n of[this.mouseTail,this.iframe])n&&(n.setAttribute("width",String(l.width)),n.setAttribute("height",String(l.height)))}),M(this,"applyEventsSynchronously",l=>{for(const n of l){switch(n.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(n,!0)()}}),M(this,"getCastFn",(l,n=!1)=>{let c;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:c=()=>{this.emitter.emit(z.CustomEvent,l)};break;case _.Meta:c=()=>this.emitter.emit(z.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,n),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,n),!n&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,m={speed:Math.min(Math.round(h/tc),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:m}),this.emitter.emit(z.SkipStart,m)}}};break}return()=>{c&&c();for(const m of this.config.plugins||[])m.handler&&m.handler(l,n,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const m=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(z.Finish))};let p=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(p+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(m,p)}this.emitter.emit(z.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:rs,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.addEmitterHandler(z.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});const i=()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(n,c,d)=>{as({event:n,mutation:c,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(n,c)=>{n.source===T.StyleSheetRule?this.applyStyleSheetRule(n,c):n.source===T.StyleDeclaration&&this.applyStyleDeclaration(n,c)},afterAppend:(n,c)=>{for(const d of this.config.plugins||[])d.onBuild&&d.onBuild(n,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{It(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(n){this.warn(n)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const n in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[n],d=Dt(c.node,this.mirror,this.virtualDom.mirror);It(d,c.node,l,this.virtualDom.mirror),c.node=d}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(n=>{this.applyStyleSheetMutation(n)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(n=>{this.applyAdoptedStyleSheet(n)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,n]=this.lastMouseDownEvent;l.dispatchEvent(n)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)};this.addEmitterHandler(z.Flush,i);const o=()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()};this.addEmitterHandler(z.PlayBack,o);const a=new qu([],{speed:this.config.speed});this.service=ju({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,n)=>l.timestamp-n.timestamp),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe(l=>{this.emitter.emit(z.StateChange,{player:l})}),this.speedService=Gu({normalSpeed:-1,timer:a}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(l=>{this.emitter.emit(z.StateChange,{speed:l})}),this.mediaManager=new Zu({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const u=this.service.state.context.events.find(l=>l.type===_.Meta),f=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(u){const{width:l,height:n}=u.data;this.addTimeout(()=>{this.emitter.emit(z.Resize,{width:l,height:n})},0)}f&&this.addTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=f,this.rebuildFullSnapshot(f),(l=this.iframe.contentWindow)==null||l.scrollTo(f.data.initialOffset))},1),this.service.state.context.events.find(Fn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}addEmitterHandler(t,r){this.emitter.on(t,r),this.emitterHandlers.push({event:t,handler:r})}addTimeout(t,r){const s=setTimeout(()=>{this.timeouts.delete(s),t()},r);return this.timeouts.add(s),s}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(z.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(z.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(z.Resume)}destroy(){var t,r;!this.wrapper||!this.wrapper.parentNode||(this.pause(),this.emitterHandlers.forEach(({event:s,handler:i})=>{this.emitter.off(s,i)}),this.emitterHandlers=[],(t=this.serviceSubscription)==null||t.unsubscribe(),(r=this.speedServiceSubscription)==null||r.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.timeouts.forEach(s=>clearTimeout(s)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((s,i)=>{i.removeEventListener("load",s)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(z.Destroy))}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Fn(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=ki()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(zu(this.iframe.contentWindow,this.iframe.contentDocument),Bs(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,o=(f,l)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(s,f),this.mediaManager.isSupportedMediaElement(f)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(f,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(f,{id:l,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),al(t.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:f,builtNode:l}of s)this.attachDocumentToIframe(f,l),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==f);const{documentElement:a,head:u}=this.iframe.contentDocument;this.insertStyleRules(a,u),i.forEach(f=>Ct(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(z.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=Hu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Co(o,this.virtualDom.unserializedId)),t.insertBefore(o,r),o.rules.push({source:T.StyleSheetRule,adds:i.map((a,u)=>({rule:a,index:u}))})}else{const o=document.createElement("style");t.insertBefore(o,r);for(let a=0;a<i.length;a++)(s=o.sheet)==null||s.insertRule(i[a],a)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,a=(u,f)=>{u.nodeName==="DIALOG"&&o.add(u),this.collectIframeAndAttachDocument(i,u);const l=s.getMeta(u);if((l==null?void 0:l.type)===Se.Element&&(l==null?void 0:l.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:c}=r.contentDocument;this.insertStyleRules(n,c)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:f,replayer:this})};rt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(r.contentDocument,t.node.id);for(const{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==u);o.forEach(u=>Ct(u))}collectIframeAndAttachDocument(t,r){if(Je(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,o=this.service.state;const a=()=>{o=this.service.state};this.emitter.on(z.Start,a),this.emitter.on(z.Pause,a);const u=()=>{this.emitter.off(z.Start,a),this.emitter.off(z.Pause,a)};r.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(s.add(f),f.addEventListener("load",()=>{s.delete(f),s.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(z.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(z.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),o=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async o=>{const a=await Promise.all(o.args.map(Ie(this.imageMap,null,s)));return se(L({},o),{args:a})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Ie(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{args:i}))}}}applyIncremental(t,r){var s,i,o;const{data:a}=t;switch(a.source){case T.Mutation:{try{this.applyMutation(a,r)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,a)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const u=a.positions[a.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:a}}else a.positions.forEach(u=>{const f={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,r,a)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:t.delay-((s=a.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(a.id===-1)break;const u=new Event(De(q[a.type])),f=this.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);this.emitter.emit(z.MouseInteraction,{type:a.type,target:f});const{triggerFocus:l}=this.config;switch(a.type){case q.Blur:"blur"in f&&f.blur();break;case q.Focus:l&&f.focus&&f.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(a.type===q.TouchStart?this.touchActive=!0:a.type===q.TouchEnd&&(this.touchActive=!1),a.type===q.MouseDown?this.lastMouseDownEvent=[f,u]:a.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,r,a),a.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case T.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.scrollData=a;break}this.applyScroll(a,r);break}case T.ViewportResize:this.emitter.emit(z.Resize,{width:a.width,height:a.height});break;case T.Input:{if(a.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.inputData=a;break}this.applyInput(a);break}case T.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);const f=u,{events:l}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:t.timestamp-l[0].timestamp,mutation:a});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.canvasMutations.push({event:t,mutation:a})}else{const u=this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);as({event:t,mutation:a,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const u=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(u)}catch(u){this.warn(u)}break}case T.Selection:{if(r){this.lastSelectionData=a;break}this.applySelection(a);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Yl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const f in this.legacy_missingNodeRetryMap)try{const l=this.legacy_missingNodeRetryMap[f],n=So(l.node,this.virtualDom,this.mirror);n&&(l.node=n)}catch(l){this.warn(l)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(f=>s.getNode(f.id)?!0:(this.warnNodeNotFound(t,f.id),!1)),t.removes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return;let c=s.getNode(f.parentId);if(!c)return this.warnNodeNotFound(t,f.parentId);if(f.isShadow&&Ne(c)&&(c=c.shadowRoot),s.removeNodeFromMap(n),c)try{c.removeChild(n),this.usingVirtualDom&&n.nodeName==="#text"&&c.nodeName==="STYLE"&&((l=c.rules)==null?void 0:l.length)>0&&(c.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",c,n,t);else throw d}});const i=L({},this.legacy_missingNodeRetryMap),o=[],a=f=>{var l,n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=s.getNode(f.parentId);if(!c)return f.node.type===Se.Document?this.newDocumentQueue.push(f):t.adds.some(w=>w.node.id===f.parentId)?o.push(f):void 0;f.node.isShadow&&(Ne(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let d=null,h=null;if(f.previousId&&(d=s.getNode(f.previousId)),f.nextId&&(h=s.getNode(f.nextId)),f.node.rootId&&!s.getNode(f.node.rootId))return;const m=f.node.rootId?s.getNode(f.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Je(c,s)){this.attachDocumentToIframe(f,c);return}const p=(y,w)=>{if(!this.usingVirtualDom){Ct(y);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(y,{id:w,replayer:this})}},g=rt(f.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(f.previousId===-1||f.nextId===-1){i[f.node.id]={node:g,mutation:f};return}const v=s.getMeta(c);if(v&&v.type===Se.Element&&f.node.type===Se.Text){const y=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(v.tagName==="textarea")for(const w of y)w.nodeType===c.TEXT_NODE&&c.removeChild(w);else if(v.tagName==="style"&&y.length===1)for(const w of y)w.nodeType===c.TEXT_NODE&&!s.hasNode(w)&&(g.textContent=w.textContent,c.removeChild(w))}else if((v==null?void 0:v.type)===Se.Document){const y=c;f.node.type===Se.DocumentType&&((l=y.childNodes[0])==null?void 0:l.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?c.insertBefore(g,d.nextSibling):h&&h.parentNode?c.contains(h)?c.insertBefore(g,h):c.insertBefore(g,null):c.appendChild(g),p(g,f.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&c.nodeName==="STYLE"&&((n=c.rules)==null?void 0:n.length)>0&&(c.rules=[]),Je(g,this.mirror)){const y=this.mirror.getId(g),w=this.newDocumentQueue.find(C=>C.parentId===y);w&&(this.attachDocumentToIframe(w,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(i,c,g,f)};t.adds.forEach(f=>{a(f)});const u=performance.now();for(;o.length;){const f=Mo(o);if(o.length=0,performance.now()-u>150){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}for(const l of f)s.getNode(l.value.parentId)?Us(l,c=>{a(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",l)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),No(t.texts).forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);if(n.textContent=f.value,this.usingVirtualDom){const c=n.parentNode;((l=c==null?void 0:c.rules)==null?void 0:l.length)>0&&(c.rules=[])}}),t.attributes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);for(const c in f.attributes)if(typeof c=="string"){const d=f.attributes[c];if(d===null)n.removeAttribute(c),c==="open"&&ec(n,f);else if(typeof d=="string")try{if(c==="_cssText"&&(n.nodeName==="LINK"||n.nodeName==="STYLE"))try{const h=s.getMeta(n);Object.assign(h.attributes,f.attributes);const m=rt(h,{doc:n.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),p=n.nextSibling,g=n.parentNode;if(m&&g){g.removeChild(n),g.insertBefore(m,p),s.replace(f.id,m);break}}catch(h){}if(c==="value"&&n.nodeName==="TEXTAREA"){const h=n;h.childNodes.forEach(p=>h.removeChild(p));const m=(l=n.ownerDocument)==null?void 0:l.createTextNode(d);m&&h.appendChild(m)}else n.setAttribute(c,d);c==="rr_open_mode"&&n.nodeName==="DIALOG"&&Ct(n,f)}catch(h){this.warn("An error occurred may due to the checkout feature.",h)}else if(c==="style"){const h=d,m=n;for(const p in h)if(h[p]===!1)m.style.removeProperty(p);else if(h[p]instanceof Array){const g=h[p];m.style.setProperty(p,g[0],g[1])}else{const g=h[p];m.style.setProperty(p,g)}}}})}applyScroll(t,r){var s,i;const o=this.mirror.getNode(t.id);if(!o)return this.debugNodeNotFound(t,t.id);const a=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((a==null?void 0:a.type)===Se.Document)(i=o.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{o.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(u){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:o,end:a,endOffset:u})=>{const f=this.mirror.getNode(i),l=this.mirror.getNode(a);if(!f||!l)return;const n=new Range;n.setStart(f,o),n.setEnd(l,u);const c=f.ownerDocument,d=c==null?void 0:c.getSelection();return d&&r.add(d),{range:n,selection:d}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,o,a;if((s=t.adds)==null||s.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){const{positions:l,index:n}=ns(f);Ge(r.cssRules,l).insertRule(u,n)}else{const l=f===void 0?void 0:Math.min(f,r.cssRules.length);r==null||r.insertRule(u,l)}}catch(l){}}),(i=t.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){const{positions:f,index:l}=ns(u);Ge(r.cssRules,f).deleteRule(l||0)}else r==null||r.deleteRule(u)}catch(f){}}),t.replace)try{(o=r.replace)==null||o.call(r,t.replace)}catch(u){}if(t.replaceSync)try{(a=r.replaceSync)==null||a.call(r,t.replaceSync)}catch(u){}}applyStyleDeclaration(t,r){var s,i;if(t.set){const o=Ge(r.rules,t.index);(s=o==null?void 0:o.style)==null||s.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const o=Ge(r.rules,t.index);(i=o==null?void 0:o.style)==null||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(u=>{var f;let l=null,n=null;if(Ne(s)?n=((f=s.ownerDocument)==null?void 0:f.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{l=new n.CSSStyleSheet,this.styleMirror.add(l,u.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:u.rules},l)}catch(c){}});const i=10;let o=0;const a=(u,f)=>{const l=f.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Ne(u)?u.shadowRoot.adoptedStyleSheets=l:u.nodeName==="#document"&&(u.adoptedStyleSheets=l),l.length!==f.length&&o<i&&(setTimeout(()=>a(u,f),0+100*o),o++)};a(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:o,nextId:a}=i,u=o&&t[o],f=a&&t[a];if(u){const{node:l,mutation:n}=u;r.insertBefore(l,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}if(f){const{node:l,mutation:n}=f;r.insertBefore(l,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}}moveAndHover(t,r,s,i,o){const a=this.mirror.getNode(s);if(!a)return this.debugNodeNotFound(o,s);const u=Ws(a,this.iframe),f=t*u.absoluteScale+u.x,l=r*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${l}px`,i||this.drawMouseTail({x:f,y:l}),this.hoverElements(a)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:o}=this.config.mouseTail===!0?rs:Object.assign({},rs,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=s,u.lineCap=r,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())};this.tailPositions.push(t),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==t),a()},o/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(z.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Ln,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Ln,...t)}}const{addCustomEvent:ic}=_e,{freezePage:nc}=_e,{takeFullSnapshot:oc}=_e;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=q;exports.Replayer=sc;exports.ReplayerEvents=z;exports.addCustomEvent=ic;exports.canvasMutation=as;exports.freezePage=nc;exports.record=_e;exports.takeFullSnapshot=oc;exports.utils=uu;
160
160
  if (typeof module.exports == "object" && typeof exports == "object") {
161
161
  var __cp = (to, from, except, desc) => {
162
162
  if ((from && typeof from === "object") || typeof from === "function") {