@posthog/rrweb 0.0.47 → 0.0.48

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.
@@ -1,6 +1,6 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
- "use strict";var ia=Object.defineProperty,na=Object.defineProperties;var oa=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var ri=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable;var ti=(e,t,r)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))ri.call(t,r)&&ti(e,r,t[r]);if(gt)for(var r of gt(t))si.call(t,r)&&ti(e,r,t[r]);return e},ie=(e,t)=>na(e,oa(t));var qe=(e,t)=>{var r={};for(var s in e)ri.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&gt)for(var s of gt(e))t.indexOf(s)<0&&si.call(e,s)&&(r[s]=e[s]);return r};var aa=Object.defineProperty,la=(e,t,r)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t,r)=>la(e,typeof t!="symbol"?t+"":t,r),ii;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ua=Object.defineProperty,ca=(e,t,r)=>t in e?ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ni=(e,t,r)=>ca(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 oi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ai={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function ha(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 ys(e){if(yt[e])return yt[e];const t=ha(e)||globalThis[e],r=t.prototype,s=e in oi?oi[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 ai?ai[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 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 Qt={};function ke(e,t,r){var s;const i=`${e}.${String(r)}`;if(Qt[i])return Qt[i].call(t);const o=ys(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Qt[i]=a,a.call(t)):t[r]}const Kt={};function Zn(e,t,r){const s=`${e}.${String(r)}`;if(Kt[s])return Kt[s].bind(t);const o=ys(e)[r];return typeof o!="function"?t[r]:(Kt[s]=o,o.bind(t))}function fa(e){return ke("Node",e,"childNodes")}function da(e){return ke("Node",e,"parentNode")}function pa(e){return ke("Node",e,"parentElement")}function ma(e){return ke("Node",e,"textContent")}function ga(e,t){return Zn("Node",e,"contains")(t)}function ya(e){return Zn("Node",e,"getRootNode")()}function wa(e){return!e||!("host"in e)?null:ke("ShadowRoot",e,"host")}function va(e){return e.styleSheets}function ba(e){return!e||!("shadowRoot"in e)?null:ke("Element",e,"shadowRoot")}function Sa(e,t){return ke("Element",e,"querySelector")(t)}function Ca(e,t){return ke("Element",e,"querySelectorAll")(t)}function Ea(){return ys("MutationObserver").constructor}function xa(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:fa,parentNode:da,parentElement:pa,textContent:ma,contains:ga,getRootNode:ya,host:wa,styleSheets:va,shadowRoot:ba,querySelector:Sa,querySelectorAll:Ca,mutationObserver:Ea,patch:xa};function $t(e){return e.nodeType===e.ELEMENT_NODE}function it(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function nt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ma(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 Ra(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 At(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=>Qn(i,r)).join("");return Ma(s)}catch(t){return null}}function Qn(e,t){var r;if(Na(e)){let s;try{s=At(e.styleSheet)||Ra(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Tt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return Oa(e)&&e.selectorText.includes(":")&&(s=Ia(s)),t?Tt(s,t):s}}function Ia(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Na(e){return"styleSheet"in e}function Oa(e){return"selectorText"in e}class ws{constructor(){ni(this,"idNodeMap",new Map),ni(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);if(this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s)),$t(t)){const s=ne.shadowRoot(t);s&&this.removeNodeFromMap(s),t.nodeName==="IFRAME"&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}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 Kn(){return new ws}function vs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:o}){let a=i||"";const u=s&&Pe(s);return(t[r.toLowerCase()]||u&&t[u])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Pe(e){return e.toLowerCase()}const li="__rrweb_original__";function Da(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=li in o?o[li]: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 Aa(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 bs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Pe(t):null}function Ss(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 Ta(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const _a=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pa=/^(?:[a-z+]+:)?\/\//i,ka=/^www\..*/i,La=/^(data:)([^,]*),(.*)/i;function Tt(e,t){return(e||"").replace(_a,(r,s,i,o,a,u)=>{const f=i||a||u,l=s||o||"";if(!f)return r;if(Pa.test(f)||ka.test(f))return`url(${l}${f}${l})`;if(La.test(f))return`url(${l}${f}${l})`;if(f[0]==="/")return`url(${l}${Ta(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})`})}const Fa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",ui=4096;function Ba(e,t,r,s){if(!e.complete||e.naturalWidth===0||e.naturalWidth>ui||e.naturalHeight>ui)return t;try{const i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;const o=i.getContext("2d");return o?(o.drawImage(e,0,0),i.toDataURL(r||"image/webp",s!=null?s:.4)):t}catch(i){return t}}function Ua(e,t){return!t||e.length<=t?e:Fa}let $a=1;const Wa=new RegExp("[^a-z0-9-_:]"),lt=-2;function eo(){return $a++}function za(e){if(e instanceof HTMLFormElement)return"form";const t=Pe(e.tagName);return Wa.test(t)?"div":t}let Ve,ci;const qa=/^[^ \t\n\r\u000c]+/,Va=/^[, \t\n\r\u000c]+/;function ja(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(Va),!(r>=t.length);){let o=s(qa);if(o.slice(-1)===",")o=Ye(e,o.substring(0,o.length-1)),i.push(o);else{let a="";o=Ye(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 hi=new WeakMap;function Ye(e,t){return!t||t.trim()===""?t:Cs(e,t)}function Ha(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Cs(e,t){let r=hi.get(e);if(r||(r=e.createElement("a"),hi.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function to(e,t,r,s,i,o){if(!s)return s;if(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")){const a=Ye(e,s);if(t==="img"&&a.startsWith("data:")&&i){const u=i;let f=a;return(o!=null&&o.type||(o==null?void 0:o.quality)!==void 0)&&(f=Ba(u,a,o.type,o.quality)),o!=null&&o.maxBase64ImageLength&&(f=Ua(f,o.maxBase64ImageLength)),f}return a}else{if(r==="xlink:href"&&s[0]!=="#")return Ye(e,s);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Ye(e,s);if(r==="srcset")return ja(e,s);if(r==="style")return Tt(s,Cs(e));if(t==="object"&&r==="data")return Ye(e,s)}return s}function ro(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ga(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 _t(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?_t(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?_t(ne.parentNode(e),t,r):!1}function so(e,t,r,s){let i;if($t(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(_t(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 Ya(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 Xa(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 Ja(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:p,newlyAddedElement:m=!1}=t,g=Za(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 el(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:n,dataURLOptions:c,inlineImages:d,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case e.TEXT_NODE:return Qa(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 Za(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Qa(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=At(a.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}f=Tt(f,Cs(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 fi(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function Ka(e){return e.href}function el(e,t){var r,s;const{doc:i,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:f={},maskInputFn:l,dataURLOptions:n={},inlineImages:c,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m}=t,g=Ga(e,o,a),v=za(e);let y={};const S=e.attributes.length;for(let w=0;w<S;w++){const b=e.attributes[w];ro(v,b.name,b.value)||(y[b.name]=to(i,v,Pe(b.name),b.value,e,n))}if(v==="link"&&u){const w=Ka(e);if(w){let b=fi(i,w);if(!b&&w.includes(".css")){const x=window.location.origin,N=w.replace(window.location.href,""),M=x+"/"+N;b=fi(i,M)}let C=null;b&&(C=At(b)),C&&(delete y.rel,delete y.href,y._cssText=C)}}if(v==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const w=At(e.sheet);w&&(y._cssText=w)}if(v==="input"||v==="textarea"||v==="select"){const w=e.value,b=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&w?y.value=vs({element:e,type:bs(e),tagName:v,value:w,maskInputOptions:f,maskInputFn:l}):b&&(y.checked=b)}if(v==="option"&&(e.selected&&!f.select?y.selected=!0:delete y.selected),v==="dialog"&&e.open)try{y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){y.rr_open_mode="modal",y.ph_rr_could_not_detect_modal=!0}if(v==="canvas"&&d){if(e.__context==="2d")Da(e)||(y.rr_dataURL=e.toDataURL(n.type,n.quality));else if(!("__context"in e)){const w=e.toDataURL(n.type,n.quality),b=i.createElement("canvas");b.width=e.width,b.height=e.height;const C=b.toDataURL(n.type,n.quality);w!==C&&(y.rr_dataURL=w)}}if(v==="img"&&c){Ve||(Ve=i.createElement("canvas"),ci=Ve.getContext("2d"));const w=e,b=w.currentSrc||w.getAttribute("src")||"<unknown-src>",C=w.crossOrigin,x=()=>{w.removeEventListener("load",x);try{Ve.width=w.naturalWidth,Ve.height=w.naturalHeight,ci.drawImage(w,0,0),y.rr_dataURL=Ve.toDataURL(n.type,n.quality)}catch(N){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${b}! Error: ${N}`)}w.crossOrigin==="anonymous"&&(C?y.crossOrigin=C:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x)}if(v==="audio"||v==="video"){const w=y;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(p||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),g){const{width:w,height:b,left:C,top:x}=e.getBoundingClientRect();y={class:y.class,rr_width:`${w}px`,rr_height:`${b}px`,rr_left:`${Math.floor(C+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(x+(((s=i.defaultView)==null?void 0:s.scrollY)||0))}px`}}v==="iframe"&&!h(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let E;try{customElements.get(v)&&(E=!0)}catch(w){}return{type:B.Element,tagName:v,attributes:y,childNodes:[],isSVG:Ha(e)||void 0,needBlock:g,rootId:m,isCustom:E}}function X(e){return e==null?"":e.toLowerCase()}function tl(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"&&Ss(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(X(e.attributes.name).match(/^msapplication-tile(image|color)$/)||X(e.attributes.name)==="application-name"||X(e.attributes.rel)==="icon"||X(e.attributes.rel)==="apple-touch-icon"||X(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&X(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(X(e.attributes.property).match(/^(og|twitter|fb):/)||X(e.attributes.name).match(/^(og|twitter):/)||X(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(X(e.attributes.name)==="robots"||X(e.attributes.name)==="googlebot"||X(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(X(e.attributes.name)==="author"||X(e.attributes.name)==="generator"||X(e.attributes.name)==="framework"||X(e.attributes.name)==="publisher"||X(e.attributes.name)==="progid"||X(e.attributes.property).match(/^article:/)||X(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(X(e.attributes.name)==="google-site-verification"||X(e.attributes.name)==="yandex-verification"||X(e.attributes.name)==="csrf-token"||X(e.attributes.name)==="p:domain_verify"||X(e.attributes.name)==="verify-v1"||X(e.attributes.name)==="verification"||X(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}const rl=50;let hs=!1,Es=!1;function sl(){return Es}function il(){Es=!1,hs=!1}function Xe(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:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:C=!1,depth:x=0,maxDepth:N=rl}=t;let{needsMask:M}=t,{preserveWhiteSpace:P=!0}=t;if(x>=N)return Es=!0,hs||(hs=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${N}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;M||(M=so(e,a,u,M===void 0));const D=Ja(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:b,newlyAddedElement:C});if(!D)return console.warn(e,"not serialized"),null;let re;s.hasNode(e)?re=s.getId(e):tl(D,h)||!P&&D.type===B.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?re=lt:re=eo();const U=Object.assign(D,{id:re});if(s.add(e,U),re===lt)return null;v&&v(e);let I=!f;if(U.type===B.Element){I=I&&!U.needBlock,delete U.needBlock;const _=ne.shadowRoot(e);_&&nt(_)&&(U.isShadowHost=!0)}if((U.type===B.Document||U.type===B.Element)&&I){h.headWhitespace&&U.type===B.Element&&U.tagName==="head"&&(P=!1);const _={doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b,depth:x+1,maxDepth:N};if(!(U.type===B.Element&&U.tagName==="textarea"&&U.attributes.value!==void 0))for(const Q of Array.from(ne.childNodes(e))){const H=Xe(Q,_);H&&U.childNodes.push(H)}let z=null;if($t(e)&&(z=ne.shadowRoot(e)))for(const Q of Array.from(ne.childNodes(z))){const H=Xe(Q,_);H&&(nt(z)&&(H.isShadow=!0),U.childNodes.push(H))}}const oe=ne.parentNode(e);return oe&&it(oe)&&nt(oe)&&(U.isShadow=!0),U.type===B.Element&&U.tagName==="iframe"&&Ya(e,()=>{const _=e.contentDocument;if(_&&y){const z=Xe(_,{doc:_,mirror:s,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b,depth:x+1,maxDepth:N});z&&y(e,z)}},S),U.type===B.Element&&U.tagName==="link"&&typeof U.attributes.rel=="string"&&(U.attributes.rel==="stylesheet"||U.attributes.rel==="preload"&&typeof U.attributes.href=="string"&&Ss(U.attributes.href)==="css")&&Xa(e,()=>{if(E){const _=Xe(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b,depth:x,maxDepth:N});_&&E(e,_)}},w),U}function nl(e,t){const{mirror:r=new ws,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:p,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w=()=>!1,maxDepth:b}=t||{};return Xe(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:p,inlineImages:f,recordCanvas:l,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w,newlyAddedElement:!1,maxDepth:b})}const ol=/(max|min)-device-(width|height)/,di=new RegExp(ol.source,"g"),al={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(di)&&(e.params=e.params.replace(di,"$1-$2"))}}}},ll={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+=`,
3
- `+r.replace(/:hover/g,".\\:hover"))}))}}}};function io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ul(e){if(Object.prototype.hasOwnProperty.call(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 wt={exports:{}},pi;function cl(){if(pi)return wt.exports;pi=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 wt.exports=t(),wt.exports.createColors=t,wt.exports}const hl={},fl=Object.freeze(Object.defineProperty({__proto__:null,default:hl},Symbol.toStringTag,{value:"Module"})),me=ul(fl);var er,mi;function xs(){if(mi)return er;mi=1;let e=cl(),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:p,red:m}=e.createColors(!0);u=g=>h(m(g)),a=g=>p(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,p)=>{let m=n+1+p,g=" "+(" "+m).slice(-d)+" | ";if(m===this.line){if(h.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=h.slice(S,E),b=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(w)+`
2
+ "use strict";var ia=Object.defineProperty,na=Object.defineProperties;var oa=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var ri=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable;var ti=(e,t,r)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))ri.call(t,r)&&ti(e,r,t[r]);if(gt)for(var r of gt(t))si.call(t,r)&&ti(e,r,t[r]);return e},ie=(e,t)=>na(e,oa(t));var qe=(e,t)=>{var r={};for(var s in e)ri.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&gt)for(var s of gt(e))t.indexOf(s)<0&&si.call(e,s)&&(r[s]=e[s]);return r};var aa=Object.defineProperty,la=(e,t,r)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t,r)=>la(e,typeof t!="symbol"?t+"":t,r),ii;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ua=Object.defineProperty,ca=(e,t,r)=>t in e?ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ni=(e,t,r)=>ca(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 oi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ai={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function ha(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 ys(e){if(yt[e])return yt[e];const t=ha(e)||globalThis[e],r=t.prototype,s=e in oi?oi[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 ai?ai[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 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 Qt={};function ke(e,t,r){var s;const i=`${e}.${String(r)}`;if(Qt[i])return Qt[i].call(t);const o=ys(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Qt[i]=a,a.call(t)):t[r]}const Kt={};function Zn(e,t,r){const s=`${e}.${String(r)}`;if(Kt[s])return Kt[s].bind(t);const o=ys(e)[r];return typeof o!="function"?t[r]:(Kt[s]=o,o.bind(t))}function fa(e){return ke("Node",e,"childNodes")}function da(e){return ke("Node",e,"parentNode")}function pa(e){return ke("Node",e,"parentElement")}function ma(e){return ke("Node",e,"textContent")}function ga(e,t){return Zn("Node",e,"contains")(t)}function ya(e){return Zn("Node",e,"getRootNode")()}function wa(e){return!e||!("host"in e)?null:ke("ShadowRoot",e,"host")}function va(e){return e.styleSheets}function ba(e){return!e||!("shadowRoot"in e)?null:ke("Element",e,"shadowRoot")}function Sa(e,t){return ke("Element",e,"querySelector")(t)}function Ca(e,t){return ke("Element",e,"querySelectorAll")(t)}function Ea(){return ys("MutationObserver").constructor}function xa(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:fa,parentNode:da,parentElement:pa,textContent:ma,contains:ga,getRootNode:ya,host:wa,styleSheets:va,shadowRoot:ba,querySelector:Sa,querySelectorAll:Ca,mutationObserver:Ea,patch:xa};function $t(e){return e.nodeType===e.ELEMENT_NODE}function it(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function nt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ma(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 Ra(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 At(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=>Qn(i,r)).join("");return Ma(s)}catch(t){return null}}function Qn(e,t){var r;if(Na(e)){let s;try{s=At(e.styleSheet)||Ra(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Tt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return Oa(e)&&e.selectorText.includes(":")&&(s=Ia(s)),t?Tt(s,t):s}}function Ia(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Na(e){return"styleSheet"in e}function Oa(e){return"selectorText"in e}class ws{constructor(){ni(this,"idNodeMap",new Map),ni(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);if(this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s)),$t(t)){const s=ne.shadowRoot(t);s&&this.removeNodeFromMap(s),t.nodeName==="IFRAME"&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}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 Kn(){return new ws}function vs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:o}){let a=i||"";const u=s&&Pe(s);return(t[r.toLowerCase()]||u&&t[u])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Pe(e){return e.toLowerCase()}const li="__rrweb_original__";function Da(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=li in o?o[li]: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 Aa(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 bs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Pe(t):null}function Ss(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 Ta(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const _a=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pa=/^(?:[a-z+]+:)?\/\//i,ka=/^www\..*/i,La=/^(data:)([^,]*),(.*)/i;function Tt(e,t){return(e||"").replace(_a,(r,s,i,o,a,u)=>{const f=i||a||u,l=s||o||"";if(!f)return r;if(Pa.test(f)||ka.test(f))return`url(${l}${f}${l})`;if(La.test(f))return`url(${l}${f}${l})`;if(f[0]==="/")return`url(${l}${Ta(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})`})}const Fa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",ui=4096;function Ba(e,t,r,s){if(!e.complete||e.naturalWidth===0||e.naturalWidth>ui||e.naturalHeight>ui)return t;try{const i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;const o=i.getContext("2d");return o?(o.drawImage(e,0,0),i.toDataURL(r||"image/webp",s!=null?s:.4)):t}catch(i){return t}}function Ua(e,t){return!t||e.length<=t?e:Fa}let $a=1;const Wa=new RegExp("[^a-z0-9-_:]"),lt=-2;function eo(){return $a++}function za(e){if(e instanceof HTMLFormElement)return"form";const t=Pe(e.tagName);return Wa.test(t)?"div":t}let Ve,ci;const qa=/^[^ \t\n\r\u000c]+/,Va=/^[, \t\n\r\u000c]+/;function ja(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(Va),!(r>=t.length);){let o=s(qa);if(o.slice(-1)===",")o=Ye(e,o.substring(0,o.length-1)),i.push(o);else{let a="";o=Ye(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 hi=new WeakMap;function Ye(e,t){return!t||t.trim()===""?t:Cs(e,t)}function Ha(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Cs(e,t){let r=hi.get(e);if(r||(r=e.createElement("a"),hi.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function to(e,t,r,s,i,o){if(!s)return s;if(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")){const a=Ye(e,s);if(t==="img"&&a.startsWith("data:")&&i){const u=i;let f=a;return(o!=null&&o.type||(o==null?void 0:o.quality)!==void 0)&&(f=Ba(u,a,o.type,o.quality)),o!=null&&o.maxBase64ImageLength&&(f=Ua(f,o.maxBase64ImageLength)),f}return a}else{if(r==="xlink:href"&&s[0]!=="#")return Ye(e,s);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Ye(e,s);if(r==="srcset")return ja(e,s);if(r==="style")return Tt(s,Cs(e));if(t==="object"&&r==="data")return Ye(e,s)}return s}function ro(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ga(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 _t(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?_t(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?_t(ne.parentNode(e),t,r):!1}function so(e,t,r,s){let i;if($t(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(_t(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 Ya(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 Xa(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 Ja(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:p,newlyAddedElement:m=!1}=t,g=Za(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 el(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:n,dataURLOptions:c,inlineImages:d,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case e.TEXT_NODE:return Qa(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 Za(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Qa(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=At(a.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}f=Tt(f,Cs(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 fi(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function Ka(e){return e.href}function el(e,t){var r,s;const{doc:i,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:f={},maskInputFn:l,dataURLOptions:n={},inlineImages:c,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m}=t,g=Ga(e,o,a),v=za(e);let y={};const S=e.attributes.length;for(let w=0;w<S;w++){const b=e.attributes[w];ro(v,b.name,b.value)||(y[b.name]=to(i,v,Pe(b.name),b.value,e,n))}if(v==="link"&&u){const w=Ka(e);if(w){let b=fi(i,w);if(!b&&w.includes(".css")){const x=window.location.origin,N=w.replace(window.location.href,""),M=x+"/"+N;b=fi(i,M)}let C=null;b&&(C=At(b)),C&&(delete y.rel,delete y.href,y._cssText=C)}}if(v==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const w=At(e.sheet);w&&(y._cssText=w)}if(v==="input"||v==="textarea"||v==="select"){const w=e.value,b=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&w?y.value=vs({element:e,type:bs(e),tagName:v,value:w,maskInputOptions:f,maskInputFn:l}):b&&(y.checked=b)}if(v==="option"&&(e.selected&&!f.select?y.selected=!0:delete y.selected),v==="dialog"&&e.open)try{y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){y.rr_open_mode="modal",y.ph_rr_could_not_detect_modal=!0}if(v==="canvas"&&d){if(e.__context==="2d")Da(e)||(y.rr_dataURL=e.toDataURL(n.type,n.quality));else if(!("__context"in e)){const w=e.toDataURL(n.type,n.quality),b=i.createElement("canvas");b.width=e.width,b.height=e.height;const C=b.toDataURL(n.type,n.quality);w!==C&&(y.rr_dataURL=w)}}if(v==="img"&&c){Ve||(Ve=i.createElement("canvas"),ci=Ve.getContext("2d"));const w=e,b=w.currentSrc||w.getAttribute("src")||"<unknown-src>",C=w.crossOrigin,x=()=>{w.removeEventListener("load",x);try{Ve.width=w.naturalWidth,Ve.height=w.naturalHeight,ci.drawImage(w,0,0),y.rr_dataURL=Ve.toDataURL(n.type,n.quality)}catch(N){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${b}! Error: ${N}`)}w.crossOrigin==="anonymous"&&(C?y.crossOrigin=C:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x)}if(v==="audio"||v==="video"){const w=y;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(p||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),g){const{width:w,height:b,left:C,top:x}=e.getBoundingClientRect();y={class:y.class,rr_width:`${w}px`,rr_height:`${b}px`,rr_left:`${Math.floor(C+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(x+(((s=i.defaultView)==null?void 0:s.scrollY)||0))}px`}}v==="iframe"&&!h(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let E;try{customElements.get(v)&&(E=!0)}catch(w){}return{type:B.Element,tagName:v,attributes:y,childNodes:[],isSVG:Ha(e)||void 0,needBlock:g,rootId:m,isCustom:E}}function X(e){return e==null?"":e.toLowerCase()}function tl(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"&&Ss(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(X(e.attributes.name).match(/^msapplication-tile(image|color)$/)||X(e.attributes.name)==="application-name"||X(e.attributes.rel)==="icon"||X(e.attributes.rel)==="apple-touch-icon"||X(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&X(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(X(e.attributes.property).match(/^(og|twitter|fb):/)||X(e.attributes.name).match(/^(og|twitter):/)||X(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(X(e.attributes.name)==="robots"||X(e.attributes.name)==="googlebot"||X(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(X(e.attributes.name)==="author"||X(e.attributes.name)==="generator"||X(e.attributes.name)==="framework"||X(e.attributes.name)==="publisher"||X(e.attributes.name)==="progid"||X(e.attributes.property).match(/^article:/)||X(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(X(e.attributes.name)==="google-site-verification"||X(e.attributes.name)==="yandex-verification"||X(e.attributes.name)==="csrf-token"||X(e.attributes.name)==="p:domain_verify"||X(e.attributes.name)==="verify-v1"||X(e.attributes.name)==="verification"||X(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}const rl=50;let hs=!1,Es=!1;function sl(){return Es}function il(){Es=!1,hs=!1}function Xe(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:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:C=!1,depth:x=0,maxDepth:N=rl}=t;let{needsMask:M}=t,{preserveWhiteSpace:P=!0}=t;if(x>=N)return Es=!0,hs||(hs=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${N}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;M||(M=so(e,a,u,M===void 0));const D=Ja(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:b,newlyAddedElement:C});if(!D)return console.warn(e,"not serialized"),null;let re;s.hasNode(e)?re=s.getId(e):tl(D,h)||!P&&D.type===B.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?re=lt:re=eo();const U=Object.assign(D,{id:re});if(s.add(e,U),re===lt)return null;v&&v(e);let I=!f;if(U.type===B.Element){I=I&&!U.needBlock,delete U.needBlock;const _=ne.shadowRoot(e);_&&nt(_)&&(U.isShadowHost=!0)}if((U.type===B.Document||U.type===B.Element)&&I){h.headWhitespace&&U.type===B.Element&&U.tagName==="head"&&(P=!1);const _={doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b,depth:x+1,maxDepth:N};if(!(U.type===B.Element&&U.tagName==="textarea"&&U.attributes.value!==void 0))for(const Q of Array.from(ne.childNodes(e))){const H=Xe(Q,_);H&&U.childNodes.push(H)}let z=null;if($t(e)&&(z=ne.shadowRoot(e)))for(const Q of Array.from(ne.childNodes(z))){const H=Xe(Q,_);H&&(nt(z)&&(H.isShadow=!0),U.childNodes.push(H))}}const oe=ne.parentNode(e);return oe&&it(oe)&&nt(oe)&&(U.isShadow=!0),U.type===B.Element&&U.tagName==="iframe"&&Ya(e,()=>{const _=e.contentDocument;if(_&&y){const z=Xe(_,{doc:_,mirror:s,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b,depth:x+1,maxDepth:N});z&&y(e,z)}},S),U.type===B.Element&&U.tagName==="link"&&typeof U.attributes.rel=="string"&&(U.attributes.rel==="stylesheet"||U.attributes.rel==="preload"&&typeof U.attributes.href=="string"&&Ss(U.attributes.href)==="css")&&Xa(e,()=>{if(E){const _=Xe(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:P,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b,depth:x,maxDepth:N});_&&E(e,_)}},w),U}function nl(e,t){const{mirror:r=new ws,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:p,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w=()=>!1,maxDepth:b}=t||{};return Xe(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:p,inlineImages:f,recordCanvas:l,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w,newlyAddedElement:!1,maxDepth:b})}const ol=/(max|min)-device-(width|height)/,di=new RegExp(ol.source,"g"),al={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(di)&&(e.params=e.params.replace(di,"$1-$2"))}}}},ll={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){if(r.includes(":hover")){const s=r.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");s!==r&&(t.selector+=`,
3
+ `+s)}}))}}}};function io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ul(e){if(Object.prototype.hasOwnProperty.call(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 wt={exports:{}},pi;function cl(){if(pi)return wt.exports;pi=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 wt.exports=t(),wt.exports.createColors=t,wt.exports}const hl={},fl=Object.freeze(Object.defineProperty({__proto__:null,default:hl},Symbol.toStringTag,{value:"Module"})),me=ul(fl);var er,mi;function xs(){if(mi)return er;mi=1;let e=cl(),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:p,red:m}=e.createColors(!0);u=g=>h(m(g)),a=g=>p(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,p)=>{let m=n+1+p,g=" "+(" "+m).slice(-d)+" | ";if(m===this.line){if(h.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=h.slice(S,E),b=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(w)+`
4
4
  `+b+u("^")}let v=a(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+a(g)+f(h)+`
5
5
  `+v+u("^")}return" "+a(g)+f(h)}).join(`
6
6
  `)}toString(){let i=this.showSourceCode();return i&&(i=`