@screeb/rrweb 1.0.7 → 1.0.8

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,7 +11,7 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var Ka=Object.defineProperty,Qa=Object.defineProperties;var qa=Object.getOwnPropertyDescriptors;var Dt=Object.getOwnPropertySymbols;var _i=Object.prototype.hasOwnProperty,ki=Object.prototype.propertyIsEnumerable;var Ti=(s,e,t)=>e in s?Ka(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))_i.call(e,t)&&Ti(s,t,e[t]);if(Dt)for(var t of Dt(e))ki.call(e,t)&&Ti(s,t,e[t]);return s},q=(s,e)=>Qa(s,qa(e));var Be=(s,e)=>{var t={};for(var r in s)_i.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Dt)for(var r of Dt(s))e.indexOf(r)<0&&ki.call(s,r)&&(t[r]=s[r]);return t};var el=Object.defineProperty,tl=(s,e,t)=>e in s?el(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>tl(s,typeof e!="symbol"?e+"":e,t),$i;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var rl=Object.defineProperty,sl=(s,e,t)=>e in s?rl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Pi=(s,e,t)=>sl(s,typeof e!="symbol"?e+"":e,t),N=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(N||{});const Li={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Fi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Tt={},il=()=>!!globalThis.Zone;function Us(s){if(Tt[s])return Tt[s];const e=globalThis[s],t=e.prototype,r=s in Li?Li[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Fi?Fi[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!il())return Tt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Tt[s]=u:t}catch(a){return t}}const zr={};function Ne(s,e,t){var r;const i=`${s}.${String(t)}`;if(zr[i])return zr[i].call(e);const o=Us(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(zr[i]=n,n.call(e)):e[t]}const Vr={};function Hn(s,e,t){const r=`${s}.${String(t)}`;if(Vr[r])return Vr[r].bind(e);const o=Us(s)[t];return typeof o!="function"?e[t]:(Vr[r]=o,o.bind(e))}function nl(s){return Ne("Node",s,"childNodes")}function ol(s){return Ne("Node",s,"parentNode")}function al(s){return Ne("Node",s,"parentElement")}function ll(s){return Ne("Node",s,"textContent")}function ul(s,e){return Hn("Node",s,"contains")(e)}function cl(s){return Hn("Node",s,"getRootNode")()}function hl(s){return!s||!("host"in s)?null:Ne("ShadowRoot",s,"host")}function fl(s){return s.styleSheets}function dl(s){return!s||!("shadowRoot"in s)?null:Ne("Element",s,"shadowRoot")}function pl(s,e){return Ne("Element",s,"querySelector")(e)}function ml(s,e){return Ne("Element",s,"querySelectorAll")(e)}function gl(){return Us("MutationObserver").constructor}const ee={childNodes:nl,parentNode:ol,parentElement:al,textContent:ll,contains:ul,getRootNode:cl,host:hl,styleSheets:fl,shadowRoot:dl,querySelector:pl,querySelectorAll:ml,mutationObserver:gl};function Ws(s){return s.nodeType===s.ELEMENT_NODE}function ut(s){const e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function ct(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function yl(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function wl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function is(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Zn(i,t)).join("");return yl(r)}catch(e){return null}}function Zn(s,e){if(Sl(s)){let t;try{t=is(s.styleSheet)||wl(s)}catch(r){t=s.cssText}return s.styleSheet.href?ur(t,s.styleSheet.href):t}else{let t=s.cssText;return vl(s)&&s.selectorText.includes(":")&&(t=bl(t)),e?ur(t,e):t}}function bl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Sl(s){return"styleSheet"in s}function vl(s){return"selectorText"in s}class zs{constructor(){Pi(this,"idNodeMap",new Map),Pi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Xn(){return new zs}function Vs({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Re(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Re(s){return s.toLowerCase()}const Bi="__rrweb_original__";function Cl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const o=e.getImageData,n=Bi in o?o[Bi]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function El(s,e){return!s||!e||s.type!==e.type?!1:s.type===N.Document?s.compatMode===e.compatMode:s.type===N.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===N.Comment||s.type===N.Text||s.type===N.CDATA?s.textContent===e.textContent:s.type===N.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Gs(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function Jn(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o:null}function Il(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const xl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ml=/^(?:[a-z+]+:)?\/\//i,Rl=/^www\..*/i,Nl=/^(data:)([^,]*),(.*)/i;function ur(s,e){return(s||"").replace(xl,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(Ml.test(l)||Rl.test(l))return`url(${u}${l}${u})`;if(Nl.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Il(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Gr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Al(s,e){const t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){const i=Gr(s);for(let o=1;o<t.length;o++)if(t[o].textContent&&typeof t[o].textContent=="string"){const n=Gr(t[o].textContent);for(let a=3;a<n.length;a++){const l=n.substring(0,a);if(i.split(l).length===2){const u=i.indexOf(l);for(let c=u;c<s.length;c++)if(Gr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function Ol(s,e){return Al(s,e).join("/* rr_split */")}let Dl=1;const Tl=new RegExp("[^a-z0-9-_:]"),dt=-2;function Kn(){return Dl++}function _l(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return Tl.test(e)?"div":e}let Ue,Ui;const kl=/^[^ \t\n\r\u000c]+/,$l=/^[, \t\n\r\u000c]+/;function Pl(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r($l),!(t>=e.length);){let o=r(kl);if(o.slice(-1)===",")o=Ge(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Ge(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const Wi=new WeakMap;function Ge(s,e){return!e||e.trim()===""?e:js(s,e)}function Ll(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function js(s,e){let t=Wi.get(s);if(t||(t=s.createElement("a"),Wi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Qn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ge(s,r):t==="srcset"?Pl(s,r):t==="style"?ur(r,js(s)):e==="object"&&t==="data"?Ge(s,r):r)}function qn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Fl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function cr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?cr(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?cr(ee.parentNode(s),e,t):!1}function eo(s,e,t,r){let i;if(Ws(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(i.tagName==="INPUT"){const o=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(o))return!0}if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(cr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function Bl(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Ul(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function Wl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:d=!1}=e,y=zl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:s.compatMode}:{type:N.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Gl(s,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case s.TEXT_NODE:return Vl(s,{doc:t,needsMask:n,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:N.Comment,textContent:ee.textContent(s)||"",rootId:y};default:return!1}}function zl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Vl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=ee.parentNode(s),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=ee.textContent(s),u&&l&&(l=ur(l,js(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:N.Text,textContent:l||"",rootId:i}}function Gl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,p=Fl(s,r,i),m=_l(s);let d={};const y=s.attributes.length;for(let w=0;w<y;w++){const v=s.attributes[w];qn(m,v.name,v.value)||(d[v.name]=Qn(t,m,Re(v.name),v.value))}if(m==="link"&&o){const w=Array.from(t.styleSheets).find(x=>x.href===s.href);let v=null;w&&(v=is(w)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(m==="style"&&s.sheet){let w=is(s.sheet);w&&(s.childNodes.length>1&&(w=Ol(w,s)),d._cssText=w)}if(m==="input"||m==="textarea"||m==="select"){const w=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=Vs({element:s,type:Gs(s),tagName:m,value:w,maskInputOptions:n,maskInputFn:a}):v&&(d.checked=v)}if(m==="option"&&(s.selected&&!n.select?d.selected=!0:delete d.selected),m==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(s.__context==="2d")Cl(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const w=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;const x=v.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(m==="img"&&u){Ue||(Ue=t.createElement("canvas"),Ui=Ue.getContext("2d"));const w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,A=()=>{w.removeEventListener("load",A);try{Ue.width=w.naturalWidth,Ue.height=w.naturalHeight,Ui.drawImage(w,0,0),d.rr_dataURL=Ue.toDataURL(l.type,l.quality)}catch(z){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${v}! Error: ${z}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A)}if(m==="audio"||m==="video"){const w=d;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),p){const{width:w,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${v}px`}}m==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(m)&&(S=!0)}catch(w){}return{type:N.Element,tagName:m,attributes:d,childNodes:[],isSVG:Ll(s)||void 0,needBlock:p,rootId:g,isCustom:S}}function W(s){return s==null?"":s.toLowerCase()}function jl(s,e){if(e.comment&&s.type===N.Comment)return!0;if(s.type===N.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Jn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(W(s.attributes.name).match(/^msapplication-tile(image|color)$/)||W(s.attributes.name)==="application-name"||W(s.attributes.rel)==="icon"||W(s.attributes.rel)==="apple-touch-icon"||W(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&W(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(W(s.attributes.property).match(/^(og|twitter|fb):/)||W(s.attributes.name).match(/^(og|twitter):/)||W(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(W(s.attributes.name)==="robots"||W(s.attributes.name)==="googlebot"||W(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(W(s.attributes.name)==="author"||W(s.attributes.name)==="generator"||W(s.attributes.name)==="framework"||W(s.attributes.name)==="publisher"||W(s.attributes.name)==="progid"||W(s.attributes.property).match(/^article:/)||W(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(W(s.attributes.name)==="google-site-verification"||W(s.attributes.name)==="yandex-verification"||W(s.attributes.name)==="csrf-token"||W(s.attributes.name)==="p:domain_verify"||W(s.attributes.name)==="verify-v1"||W(s.attributes.name)==="verification"||W(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function je(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:z=!1,cssCaptured:B=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:K=!0}=e;H||(H=eo(s,n,a,H===void 0));const ie=Wl(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:d,keepIframeSrcFn:A,newlyAddedElement:z,cssCaptured:B});if(!ie)return console.warn(s,"not serialized"),null;let ae;r.hasNode(s)?ae=r.getId(s):jl(ie,g)||!K&&ie.type===N.Text&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?ae=dt:ae=Kn();const O=Object.assign(ie,{id:ae});if(r.add(s,O),ae===dt)return null;y&&y(s);let ye=!l;if(O.type===N.Element){ye=ye&&!O.needBlock,delete O.needBlock;const Q=ee.shadowRoot(s);Q&&ct(Q)&&(O.isShadowHost=!0)}if((O.type===N.Document||O.type===N.Element)&&ye){g.headWhitespace&&O.type===N.Element&&O.tagName==="head"&&(K=!1);const Q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A,cssCaptured:!1};if(!(O.type===N.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===N.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(Q.cssCaptured=!0);for(const oe of Array.from(ee.childNodes(s))){const se=je(oe,Q);se&&O.childNodes.push(se)}}let M=null;if(Ws(s)&&(M=ee.shadowRoot(s)))for(const oe of Array.from(ee.childNodes(M))){const se=je(oe,Q);se&&(ct(M)&&(se.isShadow=!0),O.childNodes.push(se))}}const De=ee.parentNode(s);return De&&ut(De)&&ct(De)&&(O.isShadow=!0),O.type===N.Element&&O.tagName==="iframe"&&Bl(s,()=>{const Q=s.contentDocument;if(Q&&S){const M=je(Q,{doc:Q,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});M&&S(s,M)}},w),O.type===N.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Jn(O.attributes.href)==="css")&&Ul(s,()=>{if(v){const Q=je(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});Q&&v(s,Q)}},x),O}function Yl(s,e){const{mirror:t=new zs,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{};return je(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:g==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:g===!1?{}:g,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}const Hl=/(max|min)-device-(width|height)/,zi=new RegExp(Hl.source,"g"),Zl={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(zi)&&(s.params=s.params.replace(zi,"$1-$2"))}}}},Xl={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
14
+ "use strict";var Ka=Object.defineProperty,Qa=Object.defineProperties;var qa=Object.getOwnPropertyDescriptors;var Dt=Object.getOwnPropertySymbols;var _i=Object.prototype.hasOwnProperty,ki=Object.prototype.propertyIsEnumerable;var Ti=(s,e,t)=>e in s?Ka(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))_i.call(e,t)&&Ti(s,t,e[t]);if(Dt)for(var t of Dt(e))ki.call(e,t)&&Ti(s,t,e[t]);return s},q=(s,e)=>Qa(s,qa(e));var Be=(s,e)=>{var t={};for(var r in s)_i.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Dt)for(var r of Dt(s))e.indexOf(r)<0&&ki.call(s,r)&&(t[r]=s[r]);return t};var el=Object.defineProperty,tl=(s,e,t)=>e in s?el(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>tl(s,typeof e!="symbol"?e+"":e,t),$i;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var rl=Object.defineProperty,sl=(s,e,t)=>e in s?rl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Pi=(s,e,t)=>sl(s,typeof e!="symbol"?e+"":e,t),N=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(N||{});const Li={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Fi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Tt={},il=()=>!!globalThis.Zone;function Us(s){if(Tt[s])return Tt[s];const e=globalThis[s],t=e.prototype,r=s in Li?Li[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Fi?Fi[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!il())return Tt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Tt[s]=u:t}catch(a){return t}}const zr={};function Ne(s,e,t){var r;const i=`${s}.${String(t)}`;if(zr[i])return zr[i].call(e);const o=Us(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(zr[i]=n,n.call(e)):e[t]}const Vr={};function Hn(s,e,t){const r=`${s}.${String(t)}`;if(Vr[r])return Vr[r].bind(e);const o=Us(s)[t];return typeof o!="function"?e[t]:(Vr[r]=o,o.bind(e))}function nl(s){return Ne("Node",s,"childNodes")}function ol(s){return Ne("Node",s,"parentNode")}function al(s){return Ne("Node",s,"parentElement")}function ll(s){return Ne("Node",s,"textContent")}function ul(s,e){return Hn("Node",s,"contains")(e)}function cl(s){return Hn("Node",s,"getRootNode")()}function hl(s){return!s||!("host"in s)?null:Ne("ShadowRoot",s,"host")}function fl(s){return s.styleSheets}function dl(s){return!s||!("shadowRoot"in s)?null:Ne("Element",s,"shadowRoot")}function pl(s,e){return Ne("Element",s,"querySelector")(e)}function ml(s,e){return Ne("Element",s,"querySelectorAll")(e)}function gl(){return Us("MutationObserver").constructor}const ee={childNodes:nl,parentNode:ol,parentElement:al,textContent:ll,contains:ul,getRootNode:cl,host:hl,styleSheets:fl,shadowRoot:dl,querySelector:pl,querySelectorAll:ml,mutationObserver:gl};function Ws(s){return s.nodeType===s.ELEMENT_NODE}function ut(s){const e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function ct(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function yl(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function wl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function is(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Zn(i,t)).join("");return yl(r)}catch(e){return null}}function Zn(s,e){if(Sl(s)){let t;try{t=is(s.styleSheet)||wl(s)}catch(r){t=s.cssText}return s.styleSheet.href?ur(t,s.styleSheet.href):t}else{let t=s.cssText;return vl(s)&&s.selectorText.includes(":")&&(t=bl(t)),e?ur(t,e):t}}function bl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Sl(s){return"styleSheet"in s}function vl(s){return"selectorText"in s}class zs{constructor(){Pi(this,"idNodeMap",new Map),Pi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Xn(){return new zs}function Vs({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Re(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Re(s){return s.toLowerCase()}const Bi="__rrweb_original__";function Cl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const o=e.getImageData,n=Bi in o?o[Bi]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function El(s,e){return!s||!e||s.type!==e.type?!1:s.type===N.Document?s.compatMode===e.compatMode:s.type===N.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===N.Comment||s.type===N.Text||s.type===N.CDATA?s.textContent===e.textContent:s.type===N.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Gs(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function Jn(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o:null}function Il(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const xl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ml=/^(?:[a-z+]+:)?\/\//i,Rl=/^www\..*/i,Nl=/^(data:)([^,]*),(.*)/i;function ur(s,e){return(s||"").replace(xl,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(Ml.test(l)||Rl.test(l))return`url(${u}${l}${u})`;if(Nl.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Il(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Gr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Al(s,e){const t=Array.from(e.childNodes),r=[];let i=0;if(t.length>1&&s&&typeof s=="string"){let o=Gr(s);const n=o.length/s.length;for(let a=1;a<t.length;a++)if(t[a].textContent&&typeof t[a].textContent=="string"){const l=Gr(t[a].textContent);let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,u),1)!==-1);u++);for(;u<l.length;u++){const c=l.substring(0,u),h=o.split(c);let f=-1;if(h.length===2?f=o.indexOf(c):h.length>2&&h[0]===""&&t[a-1].textContent!==""&&(f=o.indexOf(c,1)),f!==-1){let g=Math.floor(f/n);for(;g>0&&g<s.length;){if(i+=1,i>50*t.length)return r.push(s),r;const p=Gr(s.substring(0,g));if(p.length===f){r.push(s.substring(0,g)),s=s.substring(g),o=o.substring(f);break}else p.length<f?g+=Math.max(1,Math.floor((f-p.length)/n)):g-=Math.max(1,Math.floor((p.length-f)*n))}break}}}}return r.push(s),r}function Ol(s,e){return Al(s,e).join("/* rr_split */")}let Dl=1;const Tl=new RegExp("[^a-z0-9-_:]"),dt=-2;function Kn(){return Dl++}function _l(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return Tl.test(e)?"div":e}let Ue,Ui;const kl=/^[^ \t\n\r\u000c]+/,$l=/^[, \t\n\r\u000c]+/;function Pl(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r($l),!(t>=e.length);){let o=r(kl);if(o.slice(-1)===",")o=Ge(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Ge(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const Wi=new WeakMap;function Ge(s,e){return!e||e.trim()===""?e:js(s,e)}function Ll(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function js(s,e){let t=Wi.get(s);if(t||(t=s.createElement("a"),Wi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Qn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ge(s,r):t==="srcset"?Pl(s,r):t==="style"?ur(r,js(s)):e==="object"&&t==="data"?Ge(s,r):r)}function qn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Fl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function cr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?cr(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?cr(ee.parentNode(s),e,t):!1}function eo(s,e,t,r){let i;if(Ws(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(i.tagName==="INPUT"){const o=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(o))return!0}if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(cr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function Bl(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Ul(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function Wl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:d=!1}=e,y=zl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:s.compatMode}:{type:N.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Gl(s,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case s.TEXT_NODE:return Vl(s,{doc:t,needsMask:n,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:N.Comment,textContent:ee.textContent(s)||"",rootId:y};default:return!1}}function zl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Vl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=ee.parentNode(s),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=ee.textContent(s),u&&l&&(l=ur(l,js(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:N.Text,textContent:l||"",rootId:i}}function Gl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,p=Fl(s,r,i),m=_l(s);let d={};const y=s.attributes.length;for(let w=0;w<y;w++){const v=s.attributes[w];qn(m,v.name,v.value)||(d[v.name]=Qn(t,m,Re(v.name),v.value))}if(m==="link"&&o){const w=Array.from(t.styleSheets).find(x=>x.href===s.href);let v=null;w&&(v=is(w)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(m==="style"&&s.sheet){let w=is(s.sheet);w&&(s.childNodes.length>1&&(w=Ol(w,s)),d._cssText=w)}if(m==="input"||m==="textarea"||m==="select"){const w=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=Vs({element:s,type:Gs(s),tagName:m,value:w,maskInputOptions:n,maskInputFn:a}):v&&(d.checked=v)}if(m==="option"&&(s.selected&&!n.select?d.selected=!0:delete d.selected),m==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(s.__context==="2d")Cl(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const w=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;const x=v.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(m==="img"&&u){Ue||(Ue=t.createElement("canvas"),Ui=Ue.getContext("2d"));const w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,A=()=>{w.removeEventListener("load",A);try{Ue.width=w.naturalWidth,Ue.height=w.naturalHeight,Ui.drawImage(w,0,0),d.rr_dataURL=Ue.toDataURL(l.type,l.quality)}catch(z){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${v}! Error: ${z}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A)}if(m==="audio"||m==="video"){const w=d;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),p){const{width:w,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${v}px`}}m==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(m)&&(S=!0)}catch(w){}return{type:N.Element,tagName:m,attributes:d,childNodes:[],isSVG:Ll(s)||void 0,needBlock:p,rootId:g,isCustom:S}}function W(s){return s==null?"":s.toLowerCase()}function jl(s,e){if(e.comment&&s.type===N.Comment)return!0;if(s.type===N.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Jn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(W(s.attributes.name).match(/^msapplication-tile(image|color)$/)||W(s.attributes.name)==="application-name"||W(s.attributes.rel)==="icon"||W(s.attributes.rel)==="apple-touch-icon"||W(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&W(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(W(s.attributes.property).match(/^(og|twitter|fb):/)||W(s.attributes.name).match(/^(og|twitter):/)||W(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(W(s.attributes.name)==="robots"||W(s.attributes.name)==="googlebot"||W(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(W(s.attributes.name)==="author"||W(s.attributes.name)==="generator"||W(s.attributes.name)==="framework"||W(s.attributes.name)==="publisher"||W(s.attributes.name)==="progid"||W(s.attributes.property).match(/^article:/)||W(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(W(s.attributes.name)==="google-site-verification"||W(s.attributes.name)==="yandex-verification"||W(s.attributes.name)==="csrf-token"||W(s.attributes.name)==="p:domain_verify"||W(s.attributes.name)==="verify-v1"||W(s.attributes.name)==="verification"||W(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function je(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:z=!1,cssCaptured:B=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:K=!0}=e;H||(H=eo(s,n,a,H===void 0));const ie=Wl(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:d,keepIframeSrcFn:A,newlyAddedElement:z,cssCaptured:B});if(!ie)return console.warn(s,"not serialized"),null;let ae;r.hasNode(s)?ae=r.getId(s):jl(ie,g)||!K&&ie.type===N.Text&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?ae=dt:ae=Kn();const O=Object.assign(ie,{id:ae});if(r.add(s,O),ae===dt)return null;y&&y(s);let ye=!l;if(O.type===N.Element){ye=ye&&!O.needBlock,delete O.needBlock;const Q=ee.shadowRoot(s);Q&&ct(Q)&&(O.isShadowHost=!0)}if((O.type===N.Document||O.type===N.Element)&&ye){g.headWhitespace&&O.type===N.Element&&O.tagName==="head"&&(K=!1);const Q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A,cssCaptured:!1};if(!(O.type===N.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===N.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(Q.cssCaptured=!0);for(const oe of Array.from(ee.childNodes(s))){const se=je(oe,Q);se&&O.childNodes.push(se)}}let M=null;if(Ws(s)&&(M=ee.shadowRoot(s)))for(const oe of Array.from(ee.childNodes(M))){const se=je(oe,Q);se&&(ct(M)&&(se.isShadow=!0),O.childNodes.push(se))}}const De=ee.parentNode(s);return De&&ut(De)&&ct(De)&&(O.isShadow=!0),O.type===N.Element&&O.tagName==="iframe"&&Bl(s,()=>{const Q=s.contentDocument;if(Q&&S){const M=je(Q,{doc:Q,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});M&&S(s,M)}},w),O.type===N.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Jn(O.attributes.href)==="css")&&Ul(s,()=>{if(v){const Q=je(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});Q&&v(s,Q)}},x),O}function Yl(s,e){const{mirror:t=new zs,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{};return je(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:g==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:g===!1?{}:g,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}const Hl=/(max|min)-device-(width|height)/,zi=new RegExp(Hl.source,"g"),Zl={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(zi)&&(s.params=s.params.replace(zi,"$1-$2"))}}}},Xl={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
15
  `+t.replace(/:hover/g,".\\:hover"))}))}}}};function Jl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Kl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Ys={exports:{}},V=String,to=function(){return{isColorSupported:!1,reset:V,bold:V,dim:V,italic:V,underline:V,inverse:V,hidden:V,strikethrough:V,black:V,red:V,green:V,yellow:V,blue:V,magenta:V,cyan:V,white:V,gray:V,bgBlack:V,bgRed:V,bgGreen:V,bgYellow:V,bgBlue:V,bgMagenta:V,bgCyan:V,bgWhite:V}};Ys.exports=to();Ys.exports.createColors=to;var Ql=Ys.exports;const ql={},eu=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"})),ce=Kl(eu);let Vi=Ql,Gi=ce,ns=class ro extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ro)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Vi.isColorSupported),Gi&&e&&(t=Gi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=Vi.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
16
  `+g+a("^")}return" "+l(f)+u}).join(`
17
17
  `)}toString(){let e=this.showSourceCode();return e&&(e=`