2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
"use strict";var rrwebSnapshotBundle=(()=>{var g;(function(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"})(g||(g={}));function ue(e){return e.nodeType===e.ELEMENT_NODE}function fe(e){var t=e?.host;return t?.shadowRoot===e}function Q(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function de(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Z(e){try{var t=e.rules||e.cssRules;return t?de(Array.from(t).map(me).join("")):null}catch{return null}}function me(e){var t=e.cssText;if(pe(e))try{t=Z(e.styleSheet)||t}catch{}return t}function pe(e){return"styleSheet"in e}var he=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var a=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return a??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var r=this,a=this.getId(t);this.idNodeMap.delete(a),t.childNodes&&t.childNodes.forEach(function(i){return r.removeNodeFromMap(i)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,r){var a=r.id;this.idNodeMap.set(a,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){var a=this.getNode(t);if(a){var i=this.nodeMetaMap.get(a);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function ve(e){var t=e.maskInputOptions,r=e.tagName,a=e.type,i=e.value,n=e.maskInputFn,l=i||"";return(t[r.toLowerCase()]||t[a])&&(n?l=n(l):l="*".repeat(l.length)),l}var oe="__rrweb_original__";function ge(e){var t=e.getContext("2d");if(!t)return!0;for(var r=50,a=0;a<e.width;a+=r)for(var i=0;i<e.height;i+=r){var n=t.getImageData,l=oe in n?n[oe]:n,u=new Uint32Array(l.call(t,a,i,Math.min(r,e.width-a),Math.min(r,e.height-i)).data.buffer);if(u.some(function(o){return o!==0}))return!1}return!0}var ye=1,ke=new RegExp("[^a-z0-9-_:]"),se=-2;function Se(){return ye++}function be(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return ke.test(t)?"div":t}function Ce(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function we(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var H,le,Te=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ie=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Ee=/^(data:)([^,]*),(.*)/i;function $(e,t){return(e||"").replace(Te,function(r,a,i,n,l,u){var o=i||l||u,f=a||n||"";if(!o)return r;if(!Ie.test(o)||Ee.test(o))return"url(".concat(f).concat(o).concat(f,")");if(o[0]==="/")return"url(".concat(f).concat(we(t)+o).concat(f,")");var c=t.split("/"),p=o.split("/");c.pop();for(var C=0,k=p;C<k.length;C++){var S=k[C];S!=="."&&(S===".."?c.pop():c.push(S))}return"url(".concat(f).concat(c.join("/")).concat(f,")")})}var Le=/^[^ \t\n\r\u000c]+/,xe=/^[, \t\n\r\u000c]+/;function Ne(e,t){if(t.trim()==="")return t;var r=0;function a(f){var c,p=f.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}for(var i=[];a(xe),!(r>=t.length);){var n=a(Le);if(n.slice(-1)===",")n=j(e,n.substring(0,n.length-1)),i.push(n);else{var l="";n=j(e,n);for(var u=!1;;){var o=t.charAt(r);if(o===""){i.push((n+l).trim());break}else if(u)o===")"&&(u=!1);else if(o===","){r+=1,i.push((n+l).trim());break}else o==="("&&(u=!0);l+=o,r+=1}}}return i.join(", ")}function j(e,t){if(!t||t.trim()==="")return t;var r=e.createElement("a");return r.href=t,r.href}function Me(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ee(){var e=document.createElement("a");return e.href="",e.href}function Oe(e,t,r,a){return r==="src"||r==="href"&&a&&!(t==="use"&&a[0]==="#")||r==="xlink:href"&&a&&a[0]!=="#"||r==="background"&&a&&(t==="table"||t==="td"||t==="th")?j(e,a):r==="srcset"&&a?Ne(e,a):r==="style"&&a?$(a,ee()):t==="object"&&r==="data"&&a?j(e,a):a}function Re(e,t,r){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var a=e.classList.length;a--;){var i=e.classList[a];if(t.test(i))return!0}return r?e.matches(r):!1}function J(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?J(e.parentNode,t,r):!1;for(var a=e.classList.length;a--;){var i=e.classList[a];if(t.test(i))return!0}return r?J(e.parentNode,t,r):!1}function Ae(e,t,r){var a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(a===null)return!1;if(typeof t=="string"){if(a.classList.contains(t)||a.closest(".".concat(t)))return!0}else if(J(a,t,!0))return!0;return!!(r&&(a.matches(r)||a.closest(r)))}function De(e,t,r){var a=e.contentWindow;if(a){var i=!1,n;try{n=a.document.readyState}catch{return}if(n!=="complete"){var l=setTimeout(function(){i||(t(),i=!0)},r);e.addEventListener("load",function(){clearTimeout(l),i=!0,t()});return}var u="about:blank";if(a.location.href!==u||e.src===u||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function Fe(e,t,r){var a=!1,i;try{i=e.sheet}catch{return}if(!i){var n=setTimeout(function(){a||(t(),a=!0)},r);e.addEventListener("load",function(){clearTimeout(n),a=!0,t()})}}function Ue(e,t){var r=t.doc,a=t.mirror,i=t.blockClass,n=t.blockSelector,l=t.maskTextClass,u=t.maskTextSelector,o=t.inlineStylesheet,f=t.maskInputOptions,c=f===void 0?{}:f,p=t.maskTextFn,C=t.maskInputFn,k=t.dataURLOptions,S=k===void 0?{}:k,T=t.inlineImages,I=t.recordCanvas,E=t.keepIframeSrcFn,m=t.newlyAddedElement,s=m===void 0?!1:m,y=We(r,a);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:g.Document,childNodes:[],compatMode:e.compatMode}:{type:g.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:g.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return _e(e,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:c,maskInputFn:C,dataURLOptions:S,inlineImages:T,recordCanvas:I,keepIframeSrcFn:E,newlyAddedElement:s,rootId:y});case e.TEXT_NODE:return Pe(e,{maskTextClass:l,maskTextSelector:u,maskTextFn:p,rootId:y});case e.CDATA_SECTION_NODE:return{type:g.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:g.Comment,textContent:e.textContent||"",rootId:y};default:return!1}}function We(e,t){if(t.hasNode(e)){var r=t.getId(e);return r===1?void 0:r}}function Pe(e,t){var r,a=t.maskTextClass,i=t.maskTextSelector,n=t.maskTextFn,l=t.rootId,u=e.parentNode&&e.parentNode.tagName,o=e.textContent,f=u==="STYLE"?!0:void 0,c=u==="SCRIPT"?!0:void 0;if(f&&o){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(o=Ce(e.parentNode.sheet))}catch(p){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(p),e)}o=$(o,ee())}return c&&(o=""),!f&&!c&&o&&Ae(e,a,i)&&(o=n?n(o):o.replace(/[\S]/g,"*")),{type:g.Text,textContent:o||"",isStyle:f,rootId:l}}function _e(e,t){for(var r=t.doc,a=t.blockClass,i=t.blockSelector,n=t.inlineStylesheet,l=t.maskInputOptions,u=l===void 0?{}:l,o=t.maskInputFn,f=t.dataURLOptions,c=f===void 0?{}:f,p=t.inlineImages,C=t.recordCanvas,k=t.keepIframeSrcFn,S=t.newlyAddedElement,T=S===void 0?!1:S,I=t.rootId,E=Re(e,a,i),m=be(e),s={},y=e.attributes.length,A=0;A<y;A++){var L=e.attributes[A];s[L.name]=Oe(r,m,L.name,L.value)}if(m==="link"&&n){var w=Array.from(r.styleSheets).find(function(N){return N.href===e.href}),h=null;w&&(h=Z(w)),h&&(delete s.rel,delete s.href,s._cssText=$(h,w.href))}if(m==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var h=Z(e.sheet);h&&(s._cssText=$(h,ee()))}if(m==="input"||m==="textarea"||m==="select"){var W=e.value,M=e.checked;s.type!=="radio"&&s.type!=="checkbox"&&s.type!=="submit"&&s.type!=="button"&&W?s.value=ve({type:s.type,tagName:m,value:W,maskInputOptions:u,maskInputFn:o}):M&&(s.checked=M)}if(m==="option"&&(e.selected&&!u.select?s.selected=!0:delete s.selected),m==="canvas"&&C){if(e.__context==="2d")ge(e)||(s.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var x=e.toDataURL(c.type,c.quality),D=document.createElement("canvas");D.width=e.width,D.height=e.height;var F=D.toDataURL(c.type,c.quality);x!==F&&(s.rr_dataURL=x)}}if(m==="img"&&p){H||(H=r.createElement("canvas"),le=H.getContext("2d"));var b=e,O=b.crossOrigin;b.crossOrigin="anonymous";var U=function(){try{H.width=b.naturalWidth,H.height=b.naturalHeight,le.drawImage(b,0,0),s.rr_dataURL=H.toDataURL(c.type,c.quality)}catch(N){console.warn("Cannot inline img src=".concat(b.currentSrc,"! Error: ").concat(N))}O?s.crossOrigin=O:b.removeAttribute("crossorigin")};b.complete&&b.naturalWidth!==0?U():b.onload=U}if((m==="audio"||m==="video")&&(s.rr_mediaState=e.paused?"paused":"played",s.rr_mediaCurrentTime=e.currentTime),T||(e.scrollLeft&&(s.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(s.rr_scrollTop=e.scrollTop)),E){var P=e.getBoundingClientRect(),_=P.width,R=P.height;s={class:s.class,rr_width:"".concat(_,"px"),rr_height:"".concat(R,"px")}}return m==="iframe"&&!k(s.src)&&(e.contentDocument||(s.rr_src=s.src),delete s.src),{type:g.Element,tagName:m,attributes:s,childNodes:[],isSVG:Me(e)||void 0,needBlock:E,rootId:I}}function d(e){return e===void 0?"":e.toLowerCase()}function ze(e,t){if(t.comment&&e.type===g.Comment)return!0;if(e.type===g.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(d(e.attributes.name).match(/^msapplication-tile(image|color)$/)||d(e.attributes.name)==="application-name"||d(e.attributes.rel)==="icon"||d(e.attributes.rel)==="apple-touch-icon"||d(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&d(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(d(e.attributes.property).match(/^(og|twitter|fb):/)||d(e.attributes.name).match(/^(og|twitter):/)||d(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(d(e.attributes.name)==="robots"||d(e.attributes.name)==="googlebot"||d(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(d(e.attributes.name)==="author"||d(e.attributes.name)==="generator"||d(e.attributes.name)==="framework"||d(e.attributes.name)==="publisher"||d(e.attributes.name)==="progid"||d(e.attributes.property).match(/^article:/)||d(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(d(e.attributes.name)==="google-site-verification"||d(e.attributes.name)==="yandex-verification"||d(e.attributes.name)==="csrf-token"||d(e.attributes.name)==="p:domain_verify"||d(e.attributes.name)==="verify-v1"||d(e.attributes.name)==="verification"||d(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function q(e,t){var r=t.doc,a=t.mirror,i=t.blockClass,n=t.blockSelector,l=t.maskTextClass,u=t.maskTextSelector,o=t.skipChild,f=o===void 0?!1:o,c=t.inlineStylesheet,p=c===void 0?!0:c,C=t.maskInputOptions,k=C===void 0?{}:C,S=t.maskTextFn,T=t.maskInputFn,I=t.slimDOMOptions,E=t.dataURLOptions,m=E===void 0?{}:E,s=t.inlineImages,y=s===void 0?!1:s,A=t.recordCanvas,L=A===void 0?!1:A,w=t.onSerialize,h=t.onIframeLoad,W=t.iframeLoadTimeout,M=W===void 0?5e3:W,x=t.onStylesheetLoad,D=t.stylesheetLoadTimeout,F=D===void 0?5e3:D,b=t.keepIframeSrcFn,O=b===void 0?function(){return!1}:b,U=t.newlyAddedElement,P=U===void 0?!1:U,_=t.preserveWhiteSpace,R=_===void 0?!0:_,N=Ue(e,{doc:r,mirror:a,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:p,maskInputOptions:k,maskTextFn:S,maskInputFn:T,dataURLOptions:m,inlineImages:y,recordCanvas:L,keepIframeSrcFn:O,newlyAddedElement:P});if(!N)return console.warn(e,"not serialized"),null;var G;a.hasNode(e)?G=a.getId(e):ze(N,I)||!R&&N.type===g.Text&&!N.isStyle&&!N.textContent.replace(/^\s+|\s+$/gm,"").length?G=se:G=Se();var v=Object.assign(N,{id:G});if(a.add(e,v),G===se)return null;w&&w(e);var V=!f;if(v.type===g.Element){V=V&&!v.needBlock,delete v.needBlock;var te=e.shadowRoot;te&&Q(te)&&(v.isShadowHost=!0)}if((v.type===g.Document||v.type===g.Element)&&V){I.headWhitespace&&v.type===g.Element&&v.tagName==="head"&&(R=!1);for(var re={doc:r,mirror:a,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,skipChild:f,inlineStylesheet:p,maskInputOptions:k,maskTextFn:S,maskInputFn:T,slimDOMOptions:I,dataURLOptions:m,inlineImages:y,recordCanvas:L,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:h,iframeLoadTimeout:M,onStylesheetLoad:x,stylesheetLoadTimeout:F,keepIframeSrcFn:O},Y=0,ae=Array.from(e.childNodes);Y<ae.length;Y++){var X=ae[Y],z=q(X,re);z&&v.childNodes.push(z)}if(ue(e)&&e.shadowRoot)for(var K=0,ie=Array.from(e.shadowRoot.childNodes);K<ie.length;K++){var X=ie[K],z=q(X,re);z&&(Q(e.shadowRoot)&&(z.isShadow=!0),v.childNodes.push(z))}}return e.parentNode&&fe(e.parentNode)&&Q(e.parentNode)&&(v.isShadow=!0),v.type===g.Element&&v.tagName==="iframe"&&De(e,function(){var B=e.contentDocument;if(B&&h){var ne=q(B,{doc:B,mirror:a,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:k,maskTextFn:S,maskInputFn:T,slimDOMOptions:I,dataURLOptions:m,inlineImages:y,recordCanvas:L,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:h,iframeLoadTimeout:M,onStylesheetLoad:x,stylesheetLoadTimeout:F,keepIframeSrcFn:O});ne&&h(e,ne)}},M),v.type===g.Element&&v.tagName==="link"&&v.attributes.rel==="stylesheet"&&Fe(e,function(){if(x){var B=q(e,{doc:r,mirror:a,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:k,maskTextFn:S,maskInputFn:T,slimDOMOptions:I,dataURLOptions:m,inlineImages:y,recordCanvas:L,preserveWhiteSpace:R,onSerialize:w,onIframeLoad:h,iframeLoadTimeout:M,onStylesheetLoad:x,stylesheetLoadTimeout:F,keepIframeSrcFn:O});B&&x(e,B)}},F),v}function ce(e,t){var r=t||{},a=r.mirror,i=a===void 0?new he:a,n=r.blockClass,l=n===void 0?"rr-block":n,u=r.blockSelector,o=u===void 0?null:u,f=r.maskTextClass,c=f===void 0?"rr-mask":f,p=r.maskTextSelector,C=p===void 0?null:p,k=r.inlineStylesheet,S=k===void 0?!0:k,T=r.inlineImages,I=T===void 0?!1:T,E=r.recordCanvas,m=E===void 0?!1:E,s=r.maskAllInputs,y=s===void 0?!1:s,A=r.maskTextFn,L=r.maskInputFn,w=r.slimDOM,h=w===void 0?!1:w,W=r.dataURLOptions,M=r.preserveWhiteSpace,x=r.onSerialize,D=r.onIframeLoad,F=r.iframeLoadTimeout,b=r.onStylesheetLoad,O=r.stylesheetLoadTimeout,U=r.keepIframeSrcFn,P=U===void 0?function(){return!1}:U,_=y===!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}:y===!1?{password:!0}:y,R=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;return q(e,{doc:e,mirror:i,blockClass:l,blockSelector:o,maskTextClass:c,maskTextSelector:C,skipChild:!1,inlineStylesheet:S,maskInputOptions:_,maskTextFn:A,maskInputFn:L,slimDOMOptions:R,dataURLOptions:W,inlineImages:I,recordCanvas:m,preserveWhiteSpace:M,onSerialize:x,onIframeLoad:D,iframeLoadTimeout:F,onStylesheetLoad:b,stylesheetLoadTimeout:O,keepIframeSrcFn:P,newlyAddedElement:!1})}var Be=/([^\\]):hover/,He=new RegExp(Be.source,"g");window.rrwebSnapshot={snapshot:ce};})();
|