@highlight-run/rrweb 2.0.0-lambda.8 → 2.0.0-lambda.9
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.
- package/dist/rrweb.cjs +326 -42
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +5 -2
- package/dist/rrweb.d.ts +5 -2
- package/dist/rrweb.js +326 -42
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +326 -42
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +46 -46
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +5 -5
- package/umd/rrweb.js +326 -42
- package/umd/rrweb.min.js +46 -46
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
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 da=Object.defineProperty,pa=Object.defineProperties;var ma=Object.getOwnPropertyDescriptors;var pt=Object.getOwnPropertySymbols;var os=Object.prototype.hasOwnProperty,as=Object.prototype.propertyIsEnumerable;var ns=(e,t,r)=>t in e?da(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))os.call(t,r)&&ns(e,r,t[r]);if(pt)for(var r of pt(t))as.call(t,r)&&ns(e,r,t[r]);return e},se=(e,t)=>pa(e,ma(t));var mt=(e,t)=>{var r={};for(var s in e)os.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&pt)for(var s of pt(e))t.indexOf(s)<0&&as.call(e,s)&&(r[s]=e[s]);return r};var ga=Object.defineProperty,ya=(e,t,r)=>t in e?ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t,r)=>ya(e,typeof t!="symbol"?t+"":t,r),ls;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var wa=Object.defineProperty,va=(e,t,r)=>t in e?wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,us=(e,t,r)=>va(e,typeof t!="symbol"?t+"":t,r),U=(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))(U||{});const gt=new Map,cs=new WeakSet;function hs(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function to(e){if(cs.has(e))return;cs.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...s){const a=gt.get(e);a&&(a.cancelled=!0);const u=()=>{s.length===2&&hs(r)&&s.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...s)};if(hs(r)&&!r.complete){const c={cancelled:!1};gt.set(e,c);const f=()=>{c.cancelled||(gt.delete(e),u())},m=()=>{if(!c.cancelled){gt.delete(e);try{u()}catch(d){}}};r.onload=f,r.onerror=m}else u()}}const fs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ds={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={},ro={},ba=()=>!!globalThis.Zone;function Ei(e){if(yt[e])return yt[e];const t=globalThis[e],r=t.prototype,s=e in fs?fs[e]:void 0,a=!!(s&&s.every(f=>{var m,d;return!!((d=(m=Object.getOwnPropertyDescriptor(r,f))==null?void 0:m.get)!=null&&d.toString().includes("[native code]"))})),u=e in ds?ds[e]:void 0,c=!!(u&&u.every(f=>{var m;return typeof r[f]=="function"&&((m=r[f])==null?void 0:m.toString().includes("[native code]"))}));if(a&&c&&!ba())return yt[e]=t.prototype,t.prototype;try{const f=document.createElement("iframe");f.style.display="none",document.body.appendChild(f);const m=f.contentWindow;if(!m)return t.prototype;const d=m[e].prototype;if(!d)return f.remove(),r;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(f.classList.add("rr-block"),f.setAttribute("__rrwebUntaintedMutationObserver",""),ro[e]=()=>f.remove()):f.remove(),yt[e]=d}catch(f){return r}}const nr={};function Ie(e,t,r){var s;const a=`${e}.${String(r)}`;if(nr[a])return nr[a].call(t);const u=Ei(e),c=(s=Object.getOwnPropertyDescriptor(u,r))==null?void 0:s.get;return c?(nr[a]=c,c.call(t)):t[r]}const or={};function io(e,t,r){const s=`${e}.${String(r)}`;if(or[s])return or[s].bind(t);const u=Ei(e)[r];return typeof u!="function"?t[r]:(or[s]=u,u.bind(t))}function Sa(e){return Ie("Node",e,"ownerDocument")}function Ca(e){return Ie("Node",e,"childNodes")}function Ea(e){return Ie("Node",e,"parentNode")}function xa(e){return Ie("Node",e,"parentElement")}function Ra(e){return Ie("Node",e,"textContent")}function Ma(e,t){return io("Node",e,"contains")(t)}function Ia(e){return io("Node",e,"getRootNode")()}function Oa(e){return!e||!("host"in e)?null:Ie("ShadowRoot",e,"host")}function Na(e){return e.styleSheets}function Ta(e){return!e||!("shadowRoot"in e)?null:Ie("Element",e,"shadowRoot")}function Da(e,t){return Ie("Element",e,"querySelector")(t)}function Aa(e,t){return Ie("Element",e,"querySelectorAll")(t)}function _a(){var e;return[Ei("MutationObserver").constructor,(e=ro.MutationObserver)!=null?e:(()=>{})]}let so=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(so=()=>new Date().getTime());function ka(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],a=r(s);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=a,()=>{e[t]=s}}catch(s){return()=>{}}}const ae={ownerDocument:Sa,childNodes:Ca,parentNode:Ea,parentElement:xa,textContent:Ra,contains:Ma,getRootNode:Ia,host:Oa,styleSheets:Na,shadowRoot:Ta,querySelector:Da,querySelectorAll:Aa,nowTimestamp:so,mutationObserverCtor:_a,patch:ka,wrapCanvasContextDrawImage:to};function xi(e){return e.nodeType===e.ELEMENT_NODE}function it(e){const t=e&&"host"in e&&"mode"in e&&ae.host(e)||null;return!!(t&&"shadowRoot"in t&&ae.shadowRoot(t)===e)}function st(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Pa(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 La(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 pi(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,a=>no(a,r)).join("");return Pa(s)}catch(t){return null}}function no(e,t){if(Ba(e)){let r;try{r=pi(e.styleSheet)||La(e)}catch(s){r=e.cssText}return e.styleSheet.href?Pt(r,e.styleSheet.href):r}else{let r=e.cssText;return Ua(e)&&e.selectorText.includes(":")&&(r=Fa(r)),t?Pt(r,t):r}}function Fa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Ba(e){return"styleSheet"in e}function Ua(e){return"selectorText"in e}class Ri{constructor(){us(this,"idNodeMap",new Map),us(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const a=this.nodeMetaMap.get(s);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function oo(){return new Ri}function _t({element:e,maskInputOptions:t,tagName:r,type:s,value:a,overwriteRecord:u,maskInputFn:c}){let f=a||"";return lo({maskInputOptions:t,tagName:r,type:s,overwriteRecord:u})&&(c?f=c(f,e):f="*".repeat(f.length)),f}function We(e){return e.toLowerCase()}const ps="__rrweb_original__";function Wa(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let a=0;a<e.height;a+=r){const u=t.getImageData,c=ps in u?u[ps]:u;if(new Uint32Array(c.call(t,s,a,Math.min(r,e.width-s),Math.min(r,e.height-a)).data.buffer).some(m=>m!==0))return!1}return!0}function $a(e,t){return!e||!t||e.type!==t.type?!1:e.type===U.Document?e.compatMode===t.compatMode:e.type===U.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===U.Comment||e.type===U.Text||e.type===U.CDATA?e.textContent===t.textContent:e.type===U.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function kt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?We(t):null}function Mi(e,t){var u;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}const s=/\.([0-9a-z]+)(?:$)/i,a=r.pathname.match(s);return(u=a==null?void 0:a[1])!=null?u:null}function za(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const ja=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Va=/^(?:[a-z+]+:)?\/\//i,qa=/^www\..*/i,Ga=/^(data:)([^,]*),(.*)/i;function Pt(e,t){return(e||"").replace(ja,(r,s,a,u,c,f)=>{const m=a||c||f,d=s||u||"";if(!m)return r;if(Va.test(m)||qa.test(m))return`url(${d}${m}${d})`;if(Ga.test(m))return`url(${d}${m}${d})`;if(m[0]==="/")return`url(${d}${za(t)+m}${d})`;const p=m.split("#")[0],o=m.substring(p.length),n=t.split("#")[0].split("/"),i=p.split("/");n.pop();for(const l of i)l!=="."&&(l===".."?n.pop():n.push(l));return`url(${d}${n.join("/")}${o}${d})`})}function wt(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ha(e,t,r=!1){const s=Array.from(t.childNodes),a=[];let u=0;if(s.length>1&&e&&typeof e=="string"){let c=wt(e,r);const f=c.length/e.length;for(let m=1;m<s.length;m++)if(s[m].textContent&&typeof s[m].textContent=="string"){const d=wt(s[m].textContent,r),p=100;let o=3;for(;o<d.length&&(d[o].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,o),1)!==-1);o++);for(;o<d.length;o++){let n=d.substring(0,o),i=c.split(n),l=-1;if(i.length===2)l=i[0].length;else if(i.length>2&&i[0]===""&&s[m-1].textContent!=="")l=c.indexOf(n,1);else if(i.length===1){if(n=n.substring(0,n.length-1),i=c.split(n),i.length<=1)return a.push(e),a;o=p+1}else o===d.length-1&&(l=c.indexOf(n));if(i.length>=2&&o>p){const h=s[m-1].textContent;if(h&&typeof h=="string"){const g=wt(h).length;l=c.indexOf(n,g)}l===-1&&(l=i[0].length)}if(l!==-1){let h=Math.floor(l/f);for(;h>0&&h<e.length;){if(u+=1,u>50*s.length)return a.push(e),a;const g=wt(e.substring(0,h),r);if(g.length===l){a.push(e.substring(0,h)),e=e.substring(h),c=c.substring(l);break}else g.length<l?h+=Math.max(1,Math.floor((l-g.length)/f)):h-=Math.max(1,Math.floor((g.length-l)*f))}break}}}}return a.push(e),a}function Ya(e,t){return Ha(e,t).join("/* rr_split */")}function Ii(e){return e=e.replace(/[^ -~]+/g,""),e=(e==null?void 0:e.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" "))||"",e}function mi(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Ja=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),Xa=new RegExp(/[0-9]{9,16}/),Qa=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),Za=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),Ka=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),el=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),tl=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),rl=[Ja,Xa,Qa,Za,Ka,el,tl];function ao(e){return e?rl.some(t=>t.test(e)):!1}const lo=({maskInputOptions:e,tagName:t,type:r,overwriteRecord:s})=>{const a=r&&r.toLowerCase();return s!=="true"&&(!!e[t.toLowerCase()]||!!(a&&e[a]))};let il=1;const sl=new RegExp("[^a-z0-9-_:]"),lt=-2;function uo(){return il++}function nl(e){if(e instanceof HTMLFormElement)return"form";const t=We(e.tagName);return sl.test(t)?"div":t}let je,ms;const ol=/^[^ \t\n\r\u000c]+/,al=/^[, \t\n\r\u000c]+/;function ll(e,t){if(t.trim()==="")return t;let r=0;function s(u){let c;const f=u.exec(t.substring(r));return f?(c=f[0],r+=c.length,c):""}const a=[];for(;s(al),!(r>=t.length);){let u=s(ol);if(u.slice(-1)===",")u=Ge(e,u.substring(0,u.length-1)),a.push(u);else{let c="";u=Ge(e,u);let f=!1;for(;;){const m=t.charAt(r);if(m===""){a.push((u+c).trim());break}else if(f)m===")"&&(f=!1);else if(m===","){r+=1,a.push((u+c).trim());break}else m==="("&&(f=!0);c+=m,r+=1}}}return a.join(", ")}const gs=new WeakMap;function Ge(e,t){return!t||t.trim()===""?t:Oi(e,t)}function ul(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Oi(e,t){let r=gs.get(e);if(r||(r=e.createElement("a"),gs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function co(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Ge(e,s):r==="srcset"?ll(e,s):r==="style"?Pt(s,Oi(e)):t==="object"&&r==="data"?Ge(e,s):s)}function ho(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function ys(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const a=e.classList[s];if(t.test(a))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Lt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Lt(ae.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const a=e.classList[s];if(t.test(a))return!0}return r?Lt(ae.parentNode(e),t,r):!1}function fo(e,t,r,s){let a;if(xi(e)){if(a=e,!ae.childNodes(a).length)return!1}else{if(ae.parentElement(e)===null)return!1;a=ae.parentElement(e)}try{if(typeof t=="string"){if(s){if(a.closest(`.${t}`))return!0}else if(a.classList.contains(t))return!0}else if(Lt(a,t,s))return!0;if(r){if(s){if(a.closest(r))return!0}else if(a.matches(r))return!0}}catch(u){}return!1}function cl(e,t,r){const s=e.contentWindow;if(!s)return;let a=!1,u;try{u=s.document.readyState}catch(f){return}if(u!=="complete"){const f=setTimeout(()=>{a||(t(),a=!0)},r);e.addEventListener("load",()=>{clearTimeout(f),a=!0,t()});return}const c="about:blank";if(s.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function hl(e,t,r){let s=!1,a;try{a=e.sheet}catch(c){return}if(a)return;const u=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),s=!0,t()})}function fl(e,t){const{doc:r,mirror:s,blockClass:a,blockSelector:u,needsMask:c,inlineStylesheet:f,maskInputOptions:m={},maskTextClass:d,maskTextFn:p,maskInputFn:o,dataURLOptions:n={},inlineImages:i,inlineVideos:l,recordCanvas:h,keepIframeSrcFn:g,newlyAddedElement:b=!1,cssCaptured:y=!1,privacySetting:v}=t,E=dl(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:U.Document,childNodes:[],compatMode:e.compatMode}:{type:U.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:U.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return ml(e,{doc:r,blockClass:a,blockSelector:u,inlineStylesheet:f,maskInputOptions:m,maskInputFn:o,maskTextClass:d,dataURLOptions:n,inlineImages:i,inlineVideos:l,recordCanvas:h,keepIframeSrcFn:g,newlyAddedElement:b,privacySetting:v,rootId:E});case e.TEXT_NODE:return pl(e,{doc:r,needsMask:c,maskTextFn:p,privacySetting:v,rootId:E,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:U.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:U.Comment,textContent:ae.textContent(e)||"",rootId:E};default:return!1}}function dl(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function pl(e,t){var r;const{needsMask:s,maskTextFn:a,privacySetting:u,rootId:c,cssCaptured:f}=t,m=ae.parentNode(e),d=m&&m.tagName;let p="";const o=d==="STYLE"?!0:void 0,n=d==="SCRIPT"?!0:void 0;n?p="SCRIPT_PLACEHOLDER":f||(p=ae.textContent(e),o&&p&&(p=Pt(p,Oi(t.doc)))),!o&&!n&&p&&s&&(p=a?a(p,ae.parentElement(e)):p.replace(/[\S]/g,"*"));const i=u==="strict",l=(r=e.parentElement)==null?void 0:r.getAttribute("data-hl-record"),h=u==="default"&&ao(p);return(i||h)&&!l&&d&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(d)&&p&&(p=Ii(p)),{type:U.Text,textContent:p||"",rootId:c}}function ml(e,t){const{doc:r,blockClass:s,blockSelector:a,inlineStylesheet:u,maskInputOptions:c={},maskInputFn:f,maskTextClass:m,dataURLOptions:d={},inlineImages:p,inlineVideos:o,recordCanvas:n,keepIframeSrcFn:i,newlyAddedElement:l=!1,privacySetting:h,rootId:g}=t;let b=ys(e,s,a);const y=ys(e,m,null),v=h==="strict";let E=nl(e),S={};const w=e.attributes.length;for(let R=0;R<w;R++){const x=e.attributes[R];ho(E,x.name,x.value)||(S[x.name]=co(r,E,We(x.name),x.value))}if(E==="link"&&u){const R=Array.from(r.styleSheets).find(D=>D.href===e.href);let x=null;R&&(x=pi(R)),x&&(delete S.rel,delete S.href,S._cssText=x)}if(E==="style"&&e.sheet){let R=pi(e.sheet);R&&(e.childNodes.length>1&&(R=Ya(R,e)),S._cssText=R)}if(["input","textarea","select"].includes(E)){const R=e.value,x=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&R?S.value=_t({element:e,type:kt(e),tagName:E,value:R,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:c,maskInputFn:f}):x&&(S.checked=x)}if(E==="option"&&(e.selected&&!c.select?S.selected=!0:delete S.selected),E==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&n){if(e.__context==="2d")Wa(e);else if(!("__context"in e)){const R=e.toDataURL(d.type,d.quality),x=r.createElement("canvas");x.width=e.width,x.height=e.height;const D=x.toDataURL(d.type,d.quality);R!==D&&(S.rr_dataURL=R)}}if(E==="img"&&p&&!b&&!y&&!v){je||(je=r.createElement("canvas"),ms=je.getContext("2d"));const R=e,x=R.currentSrc||R.getAttribute("src")||"<unknown-src>",D=R.crossOrigin,T=()=>{R.removeEventListener("load",T);try{je.width=R.naturalWidth,je.height=R.naturalHeight,ms.drawImage(R,0,0),S.rr_dataURL=je.toDataURL(d.type,d.quality)}catch(G){if(R.crossOrigin!=="anonymous"){R.crossOrigin="anonymous",R.complete&&R.naturalWidth!==0?T():R.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${x}! Error: ${G}`)}R.crossOrigin==="anonymous"&&(D?S.crossOrigin=D:R.removeAttribute("crossorigin"))};R.complete&&R.naturalWidth!==0?T():R.addEventListener("load",T)}if(["audio","video"].includes(E)){const R=S;R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime,R.rr_mediaPlaybackRate=e.playbackRate,R.rr_mediaMuted=e.muted,R.rr_mediaLoop=e.loop,R.rr_mediaVolume=e.volume}if(l||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),b||y||v&&mi(E)){const{width:R,height:x}=e.getBoundingClientRect();S={class:S.class,rr_width:`${R}px`,rr_height:`${x}px`}}v&&mi(E)&&(b=!0),E==="iframe"&&!i(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let C;try{customElements.get(E)&&(C=!0)}catch(R){}const M=R=>{const{width:x,height:D}=R.getBoundingClientRect();S={width:x,height:D,rr_width:`${x}px`,rr_height:`${D}px`,rr_inlined_video:!0,class:S.class,style:S.style},E="canvas";const T=r.createElement("canvas");T.width=e.width,T.height=e.height,S.rr_dataURL=T.toDataURL(d.type,d.quality)};if(E==="video"){const R=e;p&&(R.src===""||R.src.indexOf("blob:")!==-1)&&M(R),o&&R.src!==""&&R.src.indexOf("blob:")===-1&&M(R)}return{type:U.Element,tagName:E,attributes:S,childNodes:[],isSVG:ul(e)||void 0,needBlock:b,needMask:y,rootId:g,isCustom:C}}function J(e){return e==null?"":e.toLowerCase()}function po(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function gl(e,t){if(t.comment&&e.type===U.Comment)return!0;if(e.type===U.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"&&Mi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)==="application-name"||J(e.attributes.rel)==="icon"||J(e.attributes.rel)==="apple-touch-icon"||J(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(J(e.attributes.name)==="robots"||J(e.attributes.name)==="googlebot"||J(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(J(e.attributes.name)==="author"||J(e.attributes.name)==="generator"||J(e.attributes.name)==="framework"||J(e.attributes.name)==="publisher"||J(e.attributes.name)==="progid"||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(J(e.attributes.name)==="google-site-verification"||J(e.attributes.name)==="yandex-verification"||J(e.attributes.name)==="csrf-token"||J(e.attributes.name)==="p:domain_verify"||J(e.attributes.name)==="verify-v1"||J(e.attributes.name)==="verification"||J(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function He(e,t){const{doc:r,mirror:s,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:f,skipChild:m=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:o,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l={},inlineImages:h=!1,inlineVideos:g=!1,recordCanvas:b=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:M=!1,cssCaptured:R=!1,privacySetting:x}=t;let{needsMask:D}=t,{preserveWhiteSpace:T=!0}=t;D||(D=fo(e,c,f,D===void 0));const G=fl(e,{doc:r,mirror:s,blockClass:a,blockSelector:u,needsMask:D,inlineStylesheet:d,maskInputOptions:p,maskTextClass:c,maskTextFn:o,maskInputFn:n,dataURLOptions:l,inlineImages:h,inlineVideos:g,recordCanvas:b,keepIframeSrcFn:C,newlyAddedElement:M,cssCaptured:R,privacySetting:x});if(!G)return console.warn(e,"not serialized"),null;let X;s.hasNode(e)?X=s.getId(e):gl(G,i)||!T&&G.type===U.Text&&!G.textContent.replace(/^\s+|\s+$/gm,"").length?X=lt:X=uo();const I=Object.assign(G,{id:X});if(s.add(e,I),X===lt)return null;y&&y(e);let ne=!m,P=x,V=x==="strict";if(I.type===U.Element){if(ne=ne&&!I.needBlock,V||(V=!!I.needBlock||!!I.needMask),P=V?"strict":P,V&&mi(I.tagName)){const Z=e.cloneNode();Z.src="",s.add(Z,I)}delete I.needBlock,delete I.needMask;const F=ae.shadowRoot(e);F&&st(F)&&(I.isShadowHost=!0)}if((I.type===U.Document||I.type===U.Element)&&ne){i.headWhitespace&&I.type===U.Element&&I.tagName==="head"&&(T=!1);const F={doc:r,mirror:s,blockClass:a,blockSelector:u,needsMask:D,maskTextClass:c,maskTextSelector:f,skipChild:m,inlineStylesheet:d,maskInputOptions:p,maskTextFn:o,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l,inlineImages:h,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:C,cssCaptured:!1,privacySetting:P};if(!(I.type===U.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0)){I.type===U.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText=="string"&&(F.cssCaptured=!0);for(const ue of Array.from(ae.childNodes(e))){const N=He(ue,F);N&&I.childNodes.push(N)}}let Z=null;if(xi(e)&&(Z=ae.shadowRoot(e)))for(const ue of Array.from(ae.childNodes(Z))){const N=He(ue,F);N&&(st(Z)&&(N.isShadow=!0),I.childNodes.push(N))}}const H=ae.parentNode(e);return H&&it(H)&&st(H)&&(I.isShadow=!0),I.type===U.Element&&I.tagName==="iframe"&&cl(e,()=>{const F=e.contentDocument;if(F&&v){const Z=He(F,{doc:F,mirror:s,blockClass:a,blockSelector:u,needsMask:D,maskTextClass:c,maskTextSelector:f,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:o,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l,inlineImages:h,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:C,privacySetting:x});Z&&v(e,Z)}},E),I.type===U.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&Mi(I.attributes.href)==="css")&&hl(e,()=>{if(S){const F=He(e,{doc:r,mirror:s,blockClass:a,blockSelector:u,needsMask:D,maskTextClass:c,maskTextSelector:f,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:o,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l,inlineImages:h,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:C,privacySetting:x});F&&S(e,F)}},w),I}function yl(e,t){const{mirror:r=new Ri,blockClass:s="highlight-block",blockSelector:a=null,maskTextClass:u="highlight-mask",maskTextSelector:c=null,inlineStylesheet:f=!0,inlineImages:m=!1,inlineVideos:d=!1,recordCanvas:p=!1,maskAllInputs:o=!1,maskTextFn:n,maskInputFn:i,slimDOM:l=!1,dataURLOptions:h,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:S,keepIframeSrcFn:w=()=>!1,privacySetting:C="default"}=t||{},M=o===!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}:o===!1?{password:!0}:o,R=po(l);return He(e,{doc:e,mirror:r,blockClass:s,blockSelector:a,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:f,maskInputOptions:M,maskTextFn:n,maskInputFn:i,slimDOMOptions:R,dataURLOptions:h,inlineImages:m,inlineVideos:d,recordCanvas:p,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:S,keepIframeSrcFn:w,newlyAddedElement:!1,privacySetting:C})}const wl=/(max|min)-device-(width|height)/,ws=new RegExp(wl.source,"g"),vl={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ws)&&(e.params=e.params.replace(ws,"$1-$2"))}}}},bl={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
|
|
4
|
-
`+w+
|
|
5
|
-
`+b+
|
|
2
|
+
"use strict";var ga=Object.defineProperty,ya=Object.defineProperties;var wa=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var li=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable;var ai=(e,t,r)=>t in e?ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))li.call(t,r)&&ai(e,r,t[r]);if(gt)for(var r of gt(t))ui.call(t,r)&&ai(e,r,t[r]);return e},de=(e,t)=>ya(e,wa(t));var yt=(e,t)=>{var r={};for(var i in e)li.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&>)for(var i of gt(e))t.indexOf(i)<0&&ui.call(e,i)&&(r[i]=e[i]);return r};var va=Object.defineProperty,ba=(e,t,r)=>t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t,r)=>ba(e,typeof t!="symbol"?t+"":t,r),ci;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Sa=Object.defineProperty,Ca=(e,t,r)=>t in e?Sa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hi=(e,t,r)=>Ca(e,typeof t!="symbol"?t+"":t,r),q=(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))(q||{});const wt=new Map,fi=new WeakSet;function di(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function so(e){if(fi.has(e))return;fi.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...i){const a=wt.get(e);a&&(a.cancelled=!0);const u=()=>{i.length===2&&di(r)&&i.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...i)};if(di(r)&&!r.complete){const c={cancelled:!1};wt.set(e,c);const h=()=>{c.cancelled||(wt.delete(e),u())},m=()=>{if(!c.cancelled){wt.delete(e);try{u()}catch(d){}}};r.onload=h,r.onerror=m}else u()}}const pi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},mi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vt={},io={},Ea=()=>!!globalThis.Zone;function Rs(e){if(vt[e])return vt[e];const t=globalThis[e],r=t.prototype,i=e in pi?pi[e]:void 0,a=!!(i&&i.every(h=>{var m,d;return!!((d=(m=Object.getOwnPropertyDescriptor(r,h))==null?void 0:m.get)!=null&&d.toString().includes("[native code]"))})),u=e in mi?mi[e]:void 0,c=!!(u&&u.every(h=>{var m;return typeof r[h]=="function"&&((m=r[h])==null?void 0:m.toString().includes("[native code]"))}));if(a&&c&&!Ea())return vt[e]=t.prototype,t.prototype;try{const h=document.createElement("iframe");h.style.display="none",document.body.appendChild(h);const m=h.contentWindow;if(!m)return t.prototype;const d=m[e].prototype;if(!d)return h.remove(),r;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(h.classList.add("rr-block"),h.setAttribute("__rrwebUntaintedMutationObserver",""),io[e]=()=>h.remove()):h.remove(),vt[e]=d}catch(h){return r}}const ar={};function De(e,t,r){var i;const a=`${e}.${String(r)}`;if(ar[a])return ar[a].call(t);const u=Rs(e),c=(i=Object.getOwnPropertyDescriptor(u,r))==null?void 0:i.get;return c?(ar[a]=c,c.call(t)):t[r]}const lr={};function no(e,t,r){const i=`${e}.${String(r)}`;if(lr[i])return lr[i].bind(t);const u=Rs(e)[r];return typeof u!="function"?t[r]:(lr[i]=u,u.bind(t))}function xa(e){return De("Node",e,"ownerDocument")}function Ra(e){return De("Node",e,"childNodes")}function Ma(e){return De("Node",e,"parentNode")}function Ia(e){return De("Node",e,"parentElement")}function Oa(e){return De("Node",e,"textContent")}function Na(e,t){return no("Node",e,"contains")(t)}function Ta(e){return no("Node",e,"getRootNode")()}function Da(e){return!e||!("host"in e)?null:De("ShadowRoot",e,"host")}function Aa(e){return e.styleSheets}function _a(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function ka(e,t){return De("Element",e,"querySelector")(t)}function Pa(e,t){return De("Element",e,"querySelectorAll")(t)}function La(){var e;return[Rs("MutationObserver").constructor,(e=io.MutationObserver)!=null?e:(()=>{})]}let oo=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(oo=()=>new Date().getTime());function Fa(e,t,r){try{if(!(t in e))return()=>{};const i=e[t],a=r(i);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=a,()=>{e[t]=i}}catch(i){return()=>{}}}const ye={ownerDocument:xa,childNodes:Ra,parentNode:Ma,parentElement:Ia,textContent:Oa,contains:Na,getRootNode:Ta,host:Da,styleSheets:Aa,shadowRoot:_a,querySelector:ka,querySelectorAll:Pa,nowTimestamp:oo,mutationObserverCtor:La,patch:Fa,wrapCanvasContextDrawImage:so};function Ms(e){return e.nodeType===e.ELEMENT_NODE}function nt(e){const t=e&&"host"in e&&"mode"in e&&ye.host(e)||null;return!!(t&&"shadowRoot"in t&&ye.shadowRoot(t)===e)}function ot(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ba(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 Ua(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 gs(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const i=Array.from(t,a=>ao(a,r)).join("");return Ba(i)}catch(t){return null}}function ao(e,t){if(lo(e)){let r;try{r=gs(e.styleSheet)||Ua(e)}catch(i){r=e.cssText}return e.styleSheet.href?Ft(r,e.styleSheet.href):r}else{let r=e.cssText;return $a(e)&&e.selectorText.includes(":")&&(r=Wa(r)),t?Ft(r,t):r}}function Wa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function lo(e){return"styleSheet"in e}function $a(e){return"selectorText"in e}class Is{constructor(){hi(this,"idNodeMap",new Map),hi(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const i=(r=this.getMeta(t))==null?void 0:r.id;return i!=null?i:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const a=this.nodeMetaMap.get(i);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function uo(){return new Is}function Pt({element:e,maskInputOptions:t,tagName:r,type:i,value:a,overwriteRecord:u,maskInputFn:c}){let h=a||"";return ho({maskInputOptions:t,tagName:r,type:i,overwriteRecord:u})&&(c?h=c(h,e):h="*".repeat(h.length)),h}function Ue(e){return e.toLowerCase()}const gi="__rrweb_original__";function za(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let i=0;i<e.width;i+=r)for(let a=0;a<e.height;a+=r){const u=t.getImageData,c=gi in u?u[gi]:u;if(new Uint32Array(c.call(t,i,a,Math.min(r,e.width-i),Math.min(r,e.height-a)).data.buffer).some(m=>m!==0))return!1}return!0}function Va(e,t){return!e||!t||e.type!==t.type?!1:e.type===q.Document?e.compatMode===t.compatMode:e.type===q.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===q.Comment||e.type===q.Text||e.type===q.CDATA?e.textContent===t.textContent:e.type===q.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Lt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ue(t):null}function Os(e,t){var u;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(c){return null}const i=/\.([0-9a-z]+)(?:$)/i,a=r.pathname.match(i);return(u=a==null?void 0:a[1])!=null?u:null}function ja(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const qa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ga=/^(?:[a-z+]+:)?\/\//i,Ha=/^www\..*/i,Ya=/^(data:)([^,]*),(.*)/i;function Ft(e,t){return(e||"").replace(qa,(r,i,a,u,c,h)=>{const m=a||c||h,d=i||u||"";if(!m)return r;if(Ga.test(m)||Ha.test(m))return`url(${d}${m}${d})`;if(Ya.test(m))return`url(${d}${m}${d})`;if(m[0]==="/")return`url(${d}${ja(t)+m}${d})`;const p=m.split("#")[0],o=m.substring(p.length),n=t.split("#")[0].split("/"),s=p.split("/");n.pop();for(const l of s)l!=="."&&(l===".."?n.pop():n.push(l));return`url(${d}${n.join("/")}${o}${d})`})}function bt(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ja(e,t,r=!1){const i=Array.from(t.childNodes),a=[];let u=0;if(i.length>1&&e&&typeof e=="string"){let c=bt(e,r);const h=c.length/e.length;for(let m=1;m<i.length;m++)if(i[m].textContent&&typeof i[m].textContent=="string"){const d=bt(i[m].textContent,r),p=100;let o=3;for(;o<d.length&&(d[o].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,o),1)!==-1);o++);for(;o<d.length;o++){let n=d.substring(0,o),s=c.split(n),l=-1;if(s.length===2)l=s[0].length;else if(s.length>2&&s[0]===""&&i[m-1].textContent!=="")l=c.indexOf(n,1);else if(s.length===1){if(n=n.substring(0,n.length-1),s=c.split(n),s.length<=1)return a.push(e),a;o=p+1}else o===d.length-1&&(l=c.indexOf(n));if(s.length>=2&&o>p){const f=i[m-1].textContent;if(f&&typeof f=="string"){const g=bt(f).length;l=c.indexOf(n,g)}l===-1&&(l=s[0].length)}if(l!==-1){let f=Math.floor(l/h);for(;f>0&&f<e.length;){if(u+=1,u>50*i.length)return a.push(e),a;const g=bt(e.substring(0,f),r);if(g.length===l){a.push(e.substring(0,f)),e=e.substring(f),c=c.substring(l);break}else g.length<l?f+=Math.max(1,Math.floor((l-g.length)/h)):f-=Math.max(1,Math.floor((g.length-l)*h))}break}}}}return a.push(e),a}function Xa(e,t){return Ja(e,t).join("/* rr_split */")}function Ns(e){return e=e.replace(/[^ -~]+/g,""),e=(e==null?void 0:e.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" "))||"",e}function ys(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Qa=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),Za=new RegExp(/[0-9]{9,16}/),Ka=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),el=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),tl=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),rl=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),sl=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),il=[Qa,Za,Ka,el,tl,rl,sl];function co(e){return e?il.some(t=>t.test(e)):!1}const ho=({maskInputOptions:e,tagName:t,type:r,overwriteRecord:i})=>{const a=r&&r.toLowerCase();return i!=="true"&&(!!e[t.toLowerCase()]||!!(a&&e[a]))};let nl=1;const ol=new RegExp("[^a-z0-9-_:]"),ct=-2;function fo(){return nl++}function al(e){if(e instanceof HTMLFormElement)return"form";const t=Ue(e.tagName);return ol.test(t)?"div":t}let Ge,yi;const ll=/^[^ \t\n\r\u000c]+/,ul=/^[, \t\n\r\u000c]+/;function cl(e,t){if(t.trim()==="")return t;let r=0;function i(u){let c;const h=u.exec(t.substring(r));return h?(c=h[0],r+=c.length,c):""}const a=[];for(;i(ul),!(r>=t.length);){let u=i(ll);if(u.slice(-1)===",")u=Je(e,u.substring(0,u.length-1)),a.push(u);else{let c="";u=Je(e,u);let h=!1;for(;;){const m=t.charAt(r);if(m===""){a.push((u+c).trim());break}else if(h)m===")"&&(h=!1);else if(m===","){r+=1,a.push((u+c).trim());break}else m==="("&&(h=!0);c+=m,r+=1}}}return a.join(", ")}const wi=new WeakMap;function Je(e,t){return!t||t.trim()===""?t:Ts(e,t)}function hl(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Ts(e,t){let r=wi.get(e);if(r||(r=e.createElement("a"),wi.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function po(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Je(e,i):r==="srcset"?cl(e,i):r==="style"?Ft(i,Ts(e)):t==="object"&&r==="data"?Je(e,i):i)}function mo(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function vi(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const a=e.classList[i];if(t.test(a))return!0}if(r)return e.matches(r)}catch(i){}return!1}function Bt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Bt(ye.parentNode(e),t,r):!1;for(let i=e.classList.length;i--;){const a=e.classList[i];if(t.test(a))return!0}return r?Bt(ye.parentNode(e),t,r):!1}function go(e,t,r,i){let a;if(Ms(e)){if(a=e,!ye.childNodes(a).length)return!1}else{if(ye.parentElement(e)===null)return!1;a=ye.parentElement(e)}try{if(typeof t=="string"){if(i){if(a.closest(`.${t}`))return!0}else if(a.classList.contains(t))return!0}else if(Bt(a,t,i))return!0;if(r){if(i){if(a.closest(r))return!0}else if(a.matches(r))return!0}}catch(u){}return!1}function fl(e,t,r){const i=e.contentWindow;if(!i)return;let a=!1,u;try{u=i.document.readyState}catch(h){return}if(u!=="complete"){const h=setTimeout(()=>{a||(t(),a=!0)},r);e.addEventListener("load",()=>{clearTimeout(h),a=!0,t()});return}const c="about:blank";if(i.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function dl(e,t,r){let i=!1,a;try{a=e.sheet}catch(c){return}if(a)return;const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()})}function pl(e,t){const{doc:r,mirror:i,blockClass:a,blockSelector:u,needsMask:c,inlineStylesheet:h,maskInputOptions:m={},maskTextClass:d,maskTextFn:p,maskInputFn:o,dataURLOptions:n={},inlineImages:s,inlineVideos:l,recordCanvas:f,keepIframeSrcFn:g,newlyAddedElement:b=!1,cssCaptured:y=!1,privacySetting:v}=t,E=ml(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:q.Document,childNodes:[],compatMode:e.compatMode}:{type:q.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return yl(e,{doc:r,blockClass:a,blockSelector:u,inlineStylesheet:h,maskInputOptions:m,maskInputFn:o,maskTextClass:d,dataURLOptions:n,inlineImages:s,inlineVideos:l,recordCanvas:f,keepIframeSrcFn:g,newlyAddedElement:b,privacySetting:v,rootId:E});case e.TEXT_NODE:return gl(e,{doc:r,needsMask:c,maskTextFn:p,privacySetting:v,rootId:E,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:q.Comment,textContent:ye.textContent(e)||"",rootId:E};default:return!1}}function ml(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function gl(e,t){var r;const{needsMask:i,maskTextFn:a,privacySetting:u,rootId:c,cssCaptured:h}=t,m=ye.parentNode(e),d=m&&m.tagName;let p="";const o=d==="STYLE"?!0:void 0,n=d==="SCRIPT"?!0:void 0;n?p="SCRIPT_PLACEHOLDER":h||(p=ye.textContent(e),o&&p&&(p=Ft(p,Ts(t.doc)))),!o&&!n&&p&&i&&(p=a?a(p,ye.parentElement(e)):p.replace(/[\S]/g,"*"));const s=u==="strict",l=(r=e.parentElement)==null?void 0:r.getAttribute("data-hl-record"),f=u==="default"&&co(p);return(s||f)&&!l&&d&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(d)&&p&&(p=Ns(p)),{type:q.Text,textContent:p||"",rootId:c}}function yl(e,t){const{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:u,maskInputOptions:c={},maskInputFn:h,maskTextClass:m,dataURLOptions:d={},inlineImages:p,inlineVideos:o,recordCanvas:n,keepIframeSrcFn:s,newlyAddedElement:l=!1,privacySetting:f,rootId:g}=t;let b=vi(e,i,a);const y=vi(e,m,null),v=f==="strict";let E=al(e),S={};const w=e.attributes.length;for(let R=0;R<w;R++){const x=e.attributes[R];mo(E,x.name,x.value)||(S[x.name]=po(r,E,Ue(x.name),x.value))}if(E==="link"&&u){const R=Array.from(r.styleSheets).find(D=>D.href===e.href);let x=null;R&&(x=gs(R)),x&&(delete S.rel,delete S.href,S._cssText=x)}if(E==="style"&&e.sheet){let R=gs(e.sheet);R&&(e.childNodes.length>1&&(R=Xa(R,e)),S._cssText=R)}if(["input","textarea","select"].includes(E)){const R=e.value,x=e.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&R?S.value=Pt({element:e,type:Lt(e),tagName:E,value:R,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:c,maskInputFn:h}):x&&(S.checked=x)}if(E==="option"&&(e.selected&&!c.select?S.selected=!0:delete S.selected),E==="dialog"&&e.open&&(S.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&n){if(e.__context==="2d")za(e);else if(!("__context"in e)){const R=e.toDataURL(d.type,d.quality),x=r.createElement("canvas");x.width=e.width,x.height=e.height;const D=x.toDataURL(d.type,d.quality);R!==D&&(S.rr_dataURL=R)}}if(E==="img"&&p&&!b&&!y&&!v){Ge||(Ge=r.createElement("canvas"),yi=Ge.getContext("2d"));const R=e,x=R.currentSrc||R.getAttribute("src")||"<unknown-src>",D=R.crossOrigin,T=()=>{R.removeEventListener("load",T);try{Ge.width=R.naturalWidth,Ge.height=R.naturalHeight,yi.drawImage(R,0,0),S.rr_dataURL=Ge.toDataURL(d.type,d.quality)}catch(X){if(R.crossOrigin!=="anonymous"){R.crossOrigin="anonymous",R.complete&&R.naturalWidth!==0?T():R.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${x}! Error: ${X}`)}R.crossOrigin==="anonymous"&&(D?S.crossOrigin=D:R.removeAttribute("crossorigin"))};R.complete&&R.naturalWidth!==0?T():R.addEventListener("load",T)}if(["audio","video"].includes(E)){const R=S;R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime,R.rr_mediaPlaybackRate=e.playbackRate,R.rr_mediaMuted=e.muted,R.rr_mediaLoop=e.loop,R.rr_mediaVolume=e.volume}if(l||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),b||y||v&&ys(E)){const{width:R,height:x}=e.getBoundingClientRect();S={class:S.class,rr_width:`${R}px`,rr_height:`${x}px`}}v&&ys(E)&&(b=!0),E==="iframe"&&!s(S.src)&&(e.contentDocument||(S.rr_src=S.src),delete S.src);let C;try{customElements.get(E)&&(C=!0)}catch(R){}const M=R=>{const{width:x,height:D}=R.getBoundingClientRect();S={width:x,height:D,rr_width:`${x}px`,rr_height:`${D}px`,rr_inlined_video:!0,class:S.class,style:S.style},E="canvas";const T=r.createElement("canvas");T.width=e.width,T.height=e.height,S.rr_dataURL=T.toDataURL(d.type,d.quality)};if(E==="video"){const R=e;p&&(R.src===""||R.src.indexOf("blob:")!==-1)&&M(R),o&&R.src!==""&&R.src.indexOf("blob:")===-1&&M(R)}return{type:q.Element,tagName:E,attributes:S,childNodes:[],isSVG:hl(e)||void 0,needBlock:b,needMask:y,rootId:g,isCustom:C}}function ne(e){return e==null?"":e.toLowerCase()}function yo(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function wl(e,t){if(t.comment&&e.type===q.Comment)return!0;if(e.type===q.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"&&Os(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ne(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ne(e.attributes.name)==="application-name"||ne(e.attributes.rel)==="icon"||ne(e.attributes.rel)==="apple-touch-icon"||ne(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ne(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ne(e.attributes.property).match(/^(og|twitter|fb):/)||ne(e.attributes.name).match(/^(og|twitter):/)||ne(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ne(e.attributes.name)==="robots"||ne(e.attributes.name)==="googlebot"||ne(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ne(e.attributes.name)==="author"||ne(e.attributes.name)==="generator"||ne(e.attributes.name)==="framework"||ne(e.attributes.name)==="publisher"||ne(e.attributes.name)==="progid"||ne(e.attributes.property).match(/^article:/)||ne(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ne(e.attributes.name)==="google-site-verification"||ne(e.attributes.name)==="yandex-verification"||ne(e.attributes.name)==="csrf-token"||ne(e.attributes.name)==="p:domain_verify"||ne(e.attributes.name)==="verify-v1"||ne(e.attributes.name)==="verification"||ne(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Xe(e,t){const{doc:r,mirror:i,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:h,skipChild:m=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:o,maskInputFn:n,slimDOMOptions:s,dataURLOptions:l={},inlineImages:f=!1,inlineVideos:g=!1,recordCanvas:b=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:M=!1,cssCaptured:R=!1,privacySetting:x}=t;let{needsMask:D}=t,{preserveWhiteSpace:T=!0}=t;D||(D=go(e,c,h,D===void 0));const X=pl(e,{doc:r,mirror:i,blockClass:a,blockSelector:u,needsMask:D,inlineStylesheet:d,maskInputOptions:p,maskTextClass:c,maskTextFn:o,maskInputFn:n,dataURLOptions:l,inlineImages:f,inlineVideos:g,recordCanvas:b,keepIframeSrcFn:C,newlyAddedElement:M,cssCaptured:R,privacySetting:x});if(!X)return console.warn(e,"not serialized"),null;let te;i.hasNode(e)?te=i.getId(e):wl(X,s)||!T&&X.type===q.Text&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?te=ct:te=fo();const I=Object.assign(X,{id:te});if(i.add(e,I),te===ct)return null;y&&y(e);let le=!m,k=x,V=x==="strict";if(I.type===q.Element){if(le=le&&!I.needBlock,V||(V=!!I.needBlock||!!I.needMask),k=V?"strict":k,V&&ys(I.tagName)){const oe=e.cloneNode();oe.src="",i.add(oe,I)}delete I.needBlock,delete I.needMask;const z=ye.shadowRoot(e);z&&ot(z)&&(I.isShadowHost=!0)}if((I.type===q.Document||I.type===q.Element)&&le){s.headWhitespace&&I.type===q.Element&&I.tagName==="head"&&(T=!1);const z={doc:r,mirror:i,blockClass:a,blockSelector:u,needsMask:D,maskTextClass:c,maskTextSelector:h,skipChild:m,inlineStylesheet:d,maskInputOptions:p,maskTextFn:o,maskInputFn:n,slimDOMOptions:s,dataURLOptions:l,inlineImages:f,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:C,cssCaptured:!1,privacySetting:k};if(!(I.type===q.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0)){I.type===q.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText=="string"&&(z.cssCaptured=!0);for(const pe of Array.from(ye.childNodes(e))){const N=Xe(pe,z);N&&I.childNodes.push(N)}}let oe=null;if(Ms(e)&&(oe=ye.shadowRoot(e)))for(const pe of Array.from(ye.childNodes(oe))){const N=Xe(pe,z);N&&(ot(oe)&&(N.isShadow=!0),I.childNodes.push(N))}}const re=ye.parentNode(e);return re&&nt(re)&&ot(re)&&(I.isShadow=!0),I.type===q.Element&&I.tagName==="iframe"&&fl(e,()=>{const z=e.contentDocument;if(z&&v){const oe=Xe(z,{doc:z,mirror:i,blockClass:a,blockSelector:u,needsMask:D,maskTextClass:c,maskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:o,maskInputFn:n,slimDOMOptions:s,dataURLOptions:l,inlineImages:f,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:C,privacySetting:x});oe&&v(e,oe)}},E),I.type===q.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&Os(I.attributes.href)==="css")&&dl(e,()=>{if(S){const z=Xe(e,{doc:r,mirror:i,blockClass:a,blockSelector:u,needsMask:D,maskTextClass:c,maskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:o,maskInputFn:n,slimDOMOptions:s,dataURLOptions:l,inlineImages:f,inlineVideos:g,recordCanvas:b,preserveWhiteSpace:T,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:E,onStylesheetLoad:S,stylesheetLoadTimeout:w,keepIframeSrcFn:C,privacySetting:x});z&&S(e,z)}},w),I}function vl(e,t){const{mirror:r=new Is,blockClass:i="highlight-block",blockSelector:a=null,maskTextClass:u="highlight-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,inlineImages:m=!1,inlineVideos:d=!1,recordCanvas:p=!1,maskAllInputs:o=!1,maskTextFn:n,maskInputFn:s,slimDOM:l=!1,dataURLOptions:f,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:S,keepIframeSrcFn:w=()=>!1,privacySetting:C="default"}=t||{},M=o===!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}:o===!1?{password:!0}:o,R=yo(l);return Xe(e,{doc:e,mirror:r,blockClass:i,blockSelector:a,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:M,maskTextFn:n,maskInputFn:s,slimDOMOptions:R,dataURLOptions:f,inlineImages:m,inlineVideos:d,recordCanvas:p,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:S,keepIframeSrcFn:w,newlyAddedElement:!1,privacySetting:C})}const bl=/(max|min)-device-(width|height)/,bi=new RegExp(bl.source,"g"),Sl={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(bi)&&(e.params=e.params.replace(bi,"$1-$2"))}}}},Cl={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 El(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xl(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?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(i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}),r}var St={exports:{}},Si;function Rl(){if(Si)return St.exports;Si=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return St.exports=t(),St.exports.createColors=t,St.exports}const Ml={},Il=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"})),xe=xl(Il);var ur,Ci;function Ds(){if(Ci)return ur;Ci=1;let e=Rl(),t=xe;class r extends Error{constructor(a,u,c,h,m,d){super(a),this.name="CssSyntaxError",this.reason=a,m&&(this.file=m),h&&(this.source=h),d&&(this.plugin=d),typeof u!="undefined"&&typeof c!="undefined"&&(typeof u=="number"?(this.line=u,this.column=c):(this.line=u.line,this.column=u.column,this.endLine=c.line,this.endColumn=c.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(a){if(!this.source)return"";let u=this.source;a==null&&(a=e.isColorSupported);let c=s=>s,h=s=>s,m=s=>s;if(a){let{bold:s,gray:l,red:f}=e.createColors(!0);h=g=>s(f(g)),c=g=>l(g),t&&(m=g=>t(g))}let d=u.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,d.length),n=String(o).length;return d.slice(p,o).map((s,l)=>{let f=p+1+l,g=" "+(" "+f).slice(-n)+" | ";if(f===this.line){if(s.length>160){let y=20,v=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),S=s.slice(v,E),w=c(g.replace(/\d/g," "))+s.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return h(">")+c(g)+m(S)+`
|
|
4
|
+
`+w+h("^")}let b=c(g.replace(/\d/g," "))+s.slice(0,this.column-1).replace(/[^\t]/g," ");return h(">")+c(g)+m(s)+`
|
|
5
|
+
`+b+h("^")}return" "+c(g)+m(s)}).join(`
|
|
6
6
|
`)}toString(){let a=this.showSourceCode();return a&&(a=`
|
|
7
7
|
|
|
8
8
|
`+a+`
|
|
9
|
-
`),this.name+": "+this.message+a}}return
|
|
9
|
+
`),this.name+": "+this.message+a}}return ur=r,r.default=r,ur}var cr,Ei;function wo(){if(Ei)return cr;Ei=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(p){return typeof p!="string"||!p.includes("<")?p:p.replace(e,"\\3c $2").replace(t,"\\3c $2")}const a={after:`
|
|
10
10
|
`,beforeClose:`
|
|
11
11
|
`,beforeComment:`
|
|
12
12
|
`,beforeDecl:`
|
|
13
13
|
`,beforeOpen:" ",beforeRule:`
|
|
14
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function u(p){return p[0].toUpperCase()+p.slice(1)}function c(p,o){let n="@"+o.name,
|
|
15
|
-
`)){let g=this.raw(o,null,"indent");if(g.length)for(let b=0;b<
|
|
16
|
-
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(o,n){let
|
|
17
|
-
`)&&(
|
|
18
|
-
`)&&(
|
|
19
|
-
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(o){let n;return o.walkDecls(
|
|
20
|
-
`);return n=
|
|
21
|
-
`?(p=1,o+=1):p+=1}return n}class
|
|
22
|
-
`?(p=1,o+=1):p+=1;return{column:p,line:o,offset:l}}prev(){if(!this.parent)return;let d=this.parent.index(this);return this.parent.nodes[d-1]}rangeBy(d={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:c(p,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:c(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(d.word){let l=p.slice(c(p,this.source.start),c(p,this.source.end)).indexOf(d.word);l!==-1&&(o=this.positionInside(l),n=this.positionInside(l+d.word.length))}else d.start?o={column:d.start.column,line:d.start.line,offset:c(p,d.start)}:typeof d.index=="number"&&(o=this.positionInside(d.index)),d.end?n={column:d.end.column,line:d.end.line,offset:c(p,d.end)}:typeof d.endIndex=="number"?n=this.positionInside(d.endIndex):typeof d.index=="number"&&(n=this.positionInside(d.index+1));return(n.line<o.line||n.line===o.line&&n.column<=o.column)&&(n={column:o.column+1,line:o.line,offset:o.offset+1}),{end:n,start:o}}raw(d,p){return new t().raw(this,d,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...d){if(this.parent){let p=this,o=!1;for(let n of d)n===this?o=!0:o?(this.parent.insertAfter(p,n),p=n):this.parent.insertBefore(p,n);o||this.remove()}return this}root(){let d=this;for(;d.parent&&d.parent.type!=="document";)d=d.parent;return d}toJSON(d,p){let o=p==null;p=p||new Map;let n=[],i=[[this,n,0]];for(let h=0;h<i.length;h++){let[g,b,y]=i[h],v={};b[y]=v;for(let E in g){if(!Object.prototype.hasOwnProperty.call(g,E)||E==="parent"||E==="proxyCache")continue;let S=g[E];if(Array.isArray(S)){let w=[];v[E]=w;for(let C=0;C<S.length;C++){let M=S[C];typeof M=="object"&&M.toJSON?M.toJSON===f.prototype.toJSON?i.push([M,w,C]):w[C]=M.toJSON(null,p):w[C]=M}}else if(typeof S=="object"&&S.toJSON)S.toJSON===f.prototype.toJSON?i.push([S,v,E]):v[E]=S.toJSON(null,p);else if(E==="source"){if(S==null)continue;let w=p.get(S.input);w==null&&(w=p.size,p.set(S.input,w)),v[E]={end:S.end,inputId:w,start:S.start}}else v[E]=S}}let l=n[0];return o&&(l.inputs=[...p.keys()].map(h=>h.toJSON())),l}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(d=r){d.stringify&&(d=d.stringify);let p="";return d(this,o=>{p+=o}),p}warn(d,p,o={}){let n={node:this};for(let i in o)n[i]=o[i];return d.warn(p,n)}}return cr=f,f.default=f,cr}var hr,Rs;function Gt(){if(Rs)return hr;Rs=1;let e=qt();class t extends e{constructor(s){super(s),this.type="comment"}}return hr=t,t.default=t,hr}var fr,Ms;function Ht(){if(Ms)return fr;Ms=1;let e=qt();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}}return fr=t,t.default=t,fr}var dr,Is;function Le(){if(Is)return dr;Is=1;let e=Gt(),t=Ht(),r=qt(),{isClean:s,my:a}=Vt(),u,c,f,m;function d(n){let i=n.slice();for(;i.length>0;){let l=i.pop();if(delete l.source,l.nodes){l.nodes=l.nodes.slice();for(let h of l.nodes)i.push(h)}}return n.slice()}function p(n){let i=[n];for(;i.length>0;){let l=i.pop();if(l[s]=!1,l.proxyOf.nodes)for(let h of l.proxyOf.nodes)i.push(h)}}class o extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...i){for(let l of i){let h=this.normalize(l,this.last);for(let g of h)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(i){let l=[this];for(;l.length>0;){let h=l.pop();if(h!==this&&h.cleanRaws!==o.prototype.cleanRaws){h.cleanRaws(i);continue}if(r.prototype.cleanRaws.call(h,i),h.nodes)for(let g of h.nodes)l.push(g)}}each(i){if(!this.proxyOf.nodes)return;let l=this.getIterator(),h,g;for(;this.indexes[l]<this.proxyOf.nodes.length&&(h=this.indexes[l],g=i(this.proxyOf.nodes[h],h),g!==!1);)this.indexes[l]+=1;return delete this.indexes[l],g}every(i){return this.nodes.every(i)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let i=this.lastEach;return this.indexes[i]=0,i}getProxyProcessor(){return{get(i,l){return l==="proxyOf"?i:i[l]?l==="each"||typeof l=="string"&&l.startsWith("walk")?(...h)=>i[l](...h.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):l==="every"||l==="some"?h=>i[l]((g,...b)=>h(g.toProxy(),...b)):l==="root"?()=>i.root().toProxy():l==="nodes"?i.nodes.map(h=>h.toProxy()):l==="first"||l==="last"?i[l].toProxy():i[l]:i[l]},set(i,l,h){return i[l]===h||(i[l]=h,(l==="name"||l==="params"||l==="selector")&&i.markDirty()),!0}}}index(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))}insertAfter(i,l){let h=this.index(i),g=this.normalize(l,this.proxyOf.nodes[h]).reverse();h=this.index(i);for(let y of g)this.proxyOf.nodes.splice(h+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],h<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(i,l){let h=this.index(i),g=h===0?"prepend":!1,b=this.normalize(l,this.proxyOf.nodes[h],g).reverse();h=this.index(i);for(let v of b)this.proxyOf.nodes.splice(h,0,v);let y;for(let v in this.indexes)y=this.indexes[v],h<=y&&(this.indexes[v]=y+b.length);return this.markDirty(),this}normalize(i,l){if(typeof i=="string")i=d(c(i).nodes);else if(typeof i=="undefined")i=[];else if(Array.isArray(i)){i=i.slice(0);for(let g of i)g.parent&&g.parent.removeChild(g,"ignore")}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(let g of i)g.parent&&g.parent.removeChild(g,"ignore")}else if(i.type)i=[i];else if(i.prop){if(typeof i.value=="undefined")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new t(i)]}else if(i.selector||i.selectors)i=[new m(i)];else if(i.name)i=[new u(i)];else if(i.text)i=[new e(i)];else throw new Error("Unknown node type in node creation");return i.map(g=>(g[a]||o.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&p(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&l&&typeof l.raws.before!="undefined"&&(g.raws.before=l.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...i){i=i.reverse();for(let l of i){let h=this.normalize(l,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length}return this.markDirty(),this}push(i){return i.parent=this,this.proxyOf.nodes.push(i),this}removeAll(){for(let i of this.proxyOf.nodes)i.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);let l;for(let h in this.indexes)l=this.indexes[h],l>=i&&(this.indexes[h]=l-1);return this.markDirty(),this}replaceValues(i,l,h){return h||(h=l,l={}),this.walkDecls(g=>{l.props&&!l.props.includes(g.prop)||l.fast&&!g.value.includes(l.fast)||(g.value=g.value.replace(i,h))}),this.markDirty(),this}some(i){return this.nodes.some(i)}walk(i){if(!this.proxyOf.nodes)return;let l=[{iterator:this.getIterator(),node:this.proxyOf}];for(;l.length>0;){let{iterator:h,node:g}=l[l.length-1],b=g.indexes[h];if(b>=g.proxyOf.nodes.length){delete g.indexes[h],l.pop();let E=l[l.length-1];E&&(E.node.indexes[E.iterator]+=1);continue}let y=g.proxyOf.nodes[b],v;try{v=i(y,b)}catch(E){throw y.addToError(E)}if(v===!1){for(let E of l)delete E.node.indexes[E.iterator];return!1}y.walk&&y.proxyOf.nodes?l.push({iterator:y.getIterator(),node:y}):g.indexes[h]+=1}}walkAtRules(i,l){return l?i instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&i.test(h.name))return l(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===i)return l(h,g)}):(l=i,this.walk((h,g)=>{if(h.type==="atrule")return l(h,g)}))}walkComments(i){return this.walk((l,h)=>{if(l.type==="comment")return i(l,h)})}walkDecls(i,l){return l?i instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&i.test(h.prop))return l(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===i)return l(h,g)}):(l=i,this.walk((h,g)=>{if(h.type==="decl")return l(h,g)}))}walkRules(i,l){return l?i instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&i.test(h.selector))return l(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===i)return l(h,g)}):(l=i,this.walk((h,g)=>{if(h.type==="rule")return l(h,g)}))}}return o.registerParse=n=>{c=n},o.registerRule=n=>{m=n},o.registerAtRule=n=>{u=n},o.registerRoot=n=>{f=n},dr=o,o.default=o,o.rebuild=n=>{let i=[n];for(;i.length>0;){let l=i.pop();if(l.type==="atrule"?Object.setPrototypeOf(l,u.prototype):l.type==="rule"?Object.setPrototypeOf(l,m.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,f.prototype),l[a]=!0,l.nodes)for(let h of l.nodes)i.push(h)}},dr}var pr,Os;function Ti(){if(Os)return pr;Os=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return pr=t,t.default=t,e.registerAtRule(t),pr}var mr,Ns;function Di(){if(Ns)return mr;Ns=1;let e=Le(),t,r;class s extends e{constructor(u){super(L({type:"document"},u)),this.nodes||(this.nodes=[])}toResult(u={}){return new t(new r,this,u).stringify()}}return s.registerLazyResult=a=>{t=a},s.registerProcessor=a=>{r=a},mr=s,s.default=s,mr}var gr,Ts;function Ml(){if(Ts)return gr;Ts=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return gr={nanoid:(s=21)=>{let a="",u=s|0;for(;u-- >0;)a+=e[Math.random()*64|0];return a},customAlphabet:(s,a=21)=>(u=a)=>{let c="",f=u|0;for(;f-- >0;)c+=s[Math.random()*s.length|0];return c}},gr}var yr,Ds;function go(){if(Ds)return yr;Ds=1;let{existsSync:e,readFileSync:t}=we,{dirname:r,isAbsolute:s,join:a,relative:u,sep:c}=we,{SourceMapConsumer:f,SourceMapGenerator:m}=we;function d(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class p{constructor(n,i){if(i.map===!1)return;i.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(n),this.inline=this.startWith(this.annotation,"data:");let l=i.map?i.map.prev:void 0,h=this.loadMap(i.from,l);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=r(this.mapFile)),h&&(this.text=h)}consumer(){return this.consumerCache||(this.consumerCache=new f(this.json||this.text)),this.consumerCache}decodeInline(n){let i=/^data:application\/json;charset=utf-?8;base64,/,l=/^data:application\/json;base64,/,h=/^data:application\/json;charset=utf-?8,/,g=/^data:application\/json,/,b=n.match(h)||n.match(g);if(b)return decodeURIComponent(n.substr(b[0].length));let y=n.match(i)||n.match(l);if(y)return d(n.substr(y[0].length));let v=n.slice(22);throw v=v.slice(0,v.indexOf(",")),new Error("Unsupported source map encoding "+v)}getAnnotationURL(n){return n.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(n){return typeof n!="object"?!1:typeof n.mappings=="string"||typeof n._mappings=="string"||Array.isArray(n.sections)}loadAnnotation(n){let i=n.match(/\/\*\s*# sourceMappingURL=/g);if(!i)return;let l=n.lastIndexOf(i.pop()),h=n.indexOf("*/",l);l>-1&&h>-1&&(this.annotation=this.getAnnotationURL(n.substring(l,h)))}loadFile(n,i,l){if(!l&&!this.unsafeMap){if(!/\.map$/i.test(n)||!i)return;let h=u(r(i),n);if(h===".."||h.startsWith(".."+c)||s(h))return}if(this.root=r(n),e(n))return this.mapFile=n,t(n,"utf-8").toString().trim()}loadMap(n,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let l=i(n);if(l){let h=this.loadFile(l,n,!0);if(!h)throw new Error("Unable to load previous source map: "+l.toString());return h}}else{if(i instanceof f)return m.fromSourceMap(i).toString();if(i instanceof m)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let l=this.annotation;n&&(l=a(r(n),l));let h=this.loadFile(l,n,!1);if(h)try{this.json=JSON.parse(h.replace(/^\)]}'[^\n]*\n/,""))}catch(g){return}return h}}}startWith(n,i){return n?n.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return yr=p,p.default=p,yr}var wr,As;function Yt(){if(As)return wr;As=1;let{nanoid:e}=Ml(),{isAbsolute:t,resolve:r}=we,{SourceMapConsumer:s,SourceMapGenerator:a}=we,{fileURLToPath:u,pathToFileURL:c}=we,f=Ni(),m=go(),d=we,p=Symbol("lineToIndexCache"),o=!!(s&&a),n=!!(r&&t);function i(h){if(h[p])return h[p];let g=h.css.split(`
|
|
23
|
-
`),b=new Array(g.length),y=0;for(let v=0,E=g.length;v<E;v++)b[v]=y,y+=g[v].length+1;return
|
|
24
|
-
`," "];return e.split(t,r)},split(t,r,
|
|
14
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function u(p){return p[0].toUpperCase()+p.slice(1)}function c(p,o){let n="@"+o.name,s=o.params?p.rawValue(o,"params"):"",l=o.raws.afterName;return typeof l=="undefined"?l=s?" ":"":l===""&&s&&!r.test(s[0])&&(l=" "),n+l+s}function h(p,o,n){let s=n.nodes,l=s.length-1;for(;l>0&&s[l].type==="comment";)l-=1;let f=p.raw(n,"semicolon"),g=n.type==="document";for(let b=s.length-1;b>=0;b--){let y=s[b],v=l!==b||f;!v&&b<s.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&y.prop.startsWith("--"))&&(v=!0),o.push({document:g,node:y,semicolon:v})}}function m(p,o,n,s){let l=p.raw(n,"between","beforeOpen");p.builder(i(s+l)+"{",n,"start");let f=n.nodes&&n.nodes.length,g=()=>{let b=f?p.raw(n,"after"):p.raw(n,"after","emptyBody");b&&p.builder(i(b)),p.builder("}",n,"end"),n.type==="rule"&&n.raws.ownSemicolon&&p.builder(i(n.raws.ownSemicolon),n,"end")};f?(o.push(g),h(p,o,n)):g()}class d{constructor(o){this.builder=o}atrule(o,n){let s=c(this,o);if(o.nodes)this.block(o,s);else{let l=(o.raws.between||"")+(n?";":"");this.builder(i(s+l),o)}}beforeAfter(o,n){let s;o.type==="decl"?s=this.raw(o,null,"beforeDecl"):o.type==="comment"?s=this.raw(o,null,"beforeComment"):n==="before"?s=this.raw(o,null,"beforeRule"):s=this.raw(o,null,"beforeClose");let l=o.parent,f=0;for(;l&&l.type!=="root";)f+=1,l=l.parent;if(s.includes(`
|
|
15
|
+
`)){let g=this.raw(o,null,"indent");if(g.length)for(let b=0;b<f;b++)s+=g}return s}block(o,n){let s=this.raw(o,"between","beforeOpen");this.builder(i(n+s)+"{",o,"start");let l;o.nodes&&o.nodes.length?(this.body(o),l=this.raw(o,"after")):l=this.raw(o,"after","emptyBody"),l&&this.builder(i(l)),this.builder("}",o,"end")}body(o){let n=d.prototype,s=["atrule","block","body","rule","stringify"].every(f=>this[f]===n[f]),l=[];for(h(this,l,o);l.length>0;){let f=l.pop();if(typeof f=="function"){f();continue}let g=f.node,b=this.raw(g,"before");b&&this.builder(f.document?b:i(b)),s&&g.type==="rule"?m(this,l,g,this.rawValue(g,"selector")):s&&g.type==="atrule"&&g.nodes?m(this,l,g,c(this,g)):this.stringify(g,f.semicolon)}}comment(o){let n=this.raw(o,"left","commentLeft"),s=this.raw(o,"right","commentRight");this.builder(i("/*"+n+o.text+s+"*/"),o)}decl(o,n){let s=o.raws,l=this.raw(o,"between","colon"),f=o.prop+l+this.rawValue(o,"value");o.important&&(f+=s.important||" !important"),n&&(f+=";"),this.builder(i(f),o)}document(o){this.body(o)}raw(o,n,s){let l;if(s||(s=n),n&&(l=o.raws[n],typeof l!="undefined"))return l;let f=o.parent;if(s==="before"&&(!f||f.type==="root"&&f.first===o||f&&f.type==="document"))return"";if(!f)return a[s];let g=o.root(),b=g.rawCache||(g.rawCache={});if(typeof b[s]!="undefined")return b[s];if(s==="before"||s==="after")return this.beforeAfter(o,s);{let y="raw"+u(s);this[y]?l=this[y](g,o):g.walk(v=>{if(l=v.raws[n],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=a[s]),b[s]=l,l}rawBeforeClose(o){let n;return o.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after!="undefined")return n=s.raws.after,n.includes(`
|
|
16
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(o,n){let s;return o.walkComments(l=>{if(typeof l.raws.before!="undefined")return s=l.raws.before,s.includes(`
|
|
17
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(n,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(o,n){let s;return o.walkDecls(l=>{if(typeof l.raws.before!="undefined")return s=l.raws.before,s.includes(`
|
|
18
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(n,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(o){let n;return o.walk(s=>{if(s.type!=="decl"&&(n=s.raws.between,typeof n!="undefined"))return!1}),n}rawBeforeRule(o){let n;return o.walk(s=>{if(s.nodes&&(s.parent!==o||o.first!==s)&&typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
|
|
19
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(o){let n;return o.walkDecls(s=>{if(typeof s.raws.between!="undefined")return n=s.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(o){let n;return o.walk(s=>{if(s.nodes&&s.nodes.length===0&&(n=s.raws.after,typeof n!="undefined"))return!1}),n}rawIndent(o){if(o.raws.indent)return o.raws.indent;let n;return o.walk(s=>{let l=s.parent;if(l&&l!==o&&l.parent&&l.parent===o&&typeof s.raws.before!="undefined"){let f=s.raws.before.split(`
|
|
20
|
+
`);return n=f[f.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(o){let n;return o.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(n=s.raws.semicolon,typeof n!="undefined"))return!1}),n}rawValue(o,n){let s=o[n],l=o.raws[n];return l&&l.value===s?l.raw:s}root(o){if(o.source&&o.source.input.hasBOM&&this.builder("\uFEFF",o,"start"),this.body(o),o.raws.after){let n=o.raws.after,s=o.parent&&o.parent.type==="document";this.builder(s?n:i(n))}}rule(o){this.block(o,this.rawValue(o,"selector")),o.raws.ownSemicolon&&this.builder(i(o.raws.ownSemicolon),o,"end")}stringify(o,n){if(!this[o.type])throw new Error("Unknown AST node type "+o.type+". Maybe you need to change PostCSS stringifier.");this[o.type](o,n)}}return cr=d,d.default=d,cr}var hr,xi;function qt(){if(xi)return hr;xi=1;let e=wo();function t(r,i){new e(i).stringify(r)}return hr=t,t.default=t,hr}var Ct={},Ri;function Gt(){return Ri||(Ri=1,Ct.isClean=Symbol("isClean"),Ct.my=Symbol("my")),Ct}var fr,Mi;function Ht(){if(Mi)return fr;Mi=1;let e=Ds(),t=wo(),r=qt(),{isClean:i,my:a}=Gt();function u(m,d){let p=new m.constructor,o=[[m,p,d]];for(;o.length>0;){let[n,s,l]=o.pop();for(let f in n){if(!Object.prototype.hasOwnProperty.call(n,f)||f==="proxyCache")continue;let g=n[f],b=typeof g;if(f==="parent"&&b==="object")l&&(s[f]=l);else if(f==="source")s[f]=g;else if(Array.isArray(g)){let y=[];s[f]=y;for(let v of g){let E=new v.constructor;y.push(E),o.push([v,E,s])}}else{if(b==="object"&&g!==null){let y=new g.constructor;o.push([g,y,void 0]),g=y}s[f]=g}}}return p}function c(m,d){if(d&&typeof d.offset!="undefined")return d.offset;let p=1,o=1,n=0;for(let s=0;s<m.length;s++){if(o===d.line&&p===d.column){n=s;break}m[s]===`
|
|
21
|
+
`?(p=1,o+=1):p+=1}return n}class h{get proxyOf(){return this}constructor(d={}){this.raws={},this[i]=!1,this[a]=!0;for(let p of Object.keys(d))if(p!=="__proto__")if(p==="nodes"){this.nodes=[];for(let o of d[p])typeof o.clone=="function"&&o.parent?this.append(o.clone()):this.append(o)}else this[p]=d[p]}addToError(d){if(d.postcssNode=this,d.stack&&this.source&&/\n\s{4}at /.test(d.stack)){let p=this.source;d.stack=d.stack.replace(/\n\s{4}at /,`$&${p.input.from}:${p.start.line}:${p.start.column}$&`)}return d}after(d){return this.parent.insertAfter(this,d),this}assign(d={}){for(let p in d)this[p]=d[p];return this}before(d){return this.parent.insertBefore(this,d),this}cleanRaws(d){delete this.raws.before,delete this.raws.after,d||delete this.raws.between}clone(d={}){let p=u(this);for(let o in d)p[o]=d[o];return p}cloneAfter(d={}){let p=this.clone(d);return this.parent.insertAfter(this,p),p}cloneBefore(d={}){let p=this.clone(d);return this.parent.insertBefore(this,p),p}error(d,p={}){if(this.source){let{end:o,start:n}=this.rangeBy(p);return this.source.input.error(d,{column:n.column,line:n.line},{column:o.column,line:o.line},p)}return new e(d)}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:p==="root"?()=>d.root().toProxy():d[p]},set(d,p,o){return d[p]===o||(d[p]=o,(p==="prop"||p==="value"||p==="name"||p==="params"||p==="important"||p==="text")&&d.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;let d=this;for(;d=d.parent;)d[i]=!1}}next(){if(!this.parent)return;let d=this.parent.index(this);return this.parent.nodes[d+1]}positionBy(d={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:c(p,this.source.start)};if(d.index)o=this.positionInside(d.index);else if(d.word){let s=p.slice(c(p,this.source.start),c(p,this.source.end)).indexOf(d.word);s!==-1&&(o=this.positionInside(s))}return o}positionInside(d){let p=this.source.start.column,o=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=c(n,this.source.start),l=s+d;for(let f=s;f<l;f++)n[f]===`
|
|
22
|
+
`?(p=1,o+=1):p+=1;return{column:p,line:o,offset:l}}prev(){if(!this.parent)return;let d=this.parent.index(this);return this.parent.nodes[d-1]}rangeBy(d={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:c(p,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:c(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(d.word){let l=p.slice(c(p,this.source.start),c(p,this.source.end)).indexOf(d.word);l!==-1&&(o=this.positionInside(l),n=this.positionInside(l+d.word.length))}else d.start?o={column:d.start.column,line:d.start.line,offset:c(p,d.start)}:typeof d.index=="number"&&(o=this.positionInside(d.index)),d.end?n={column:d.end.column,line:d.end.line,offset:c(p,d.end)}:typeof d.endIndex=="number"?n=this.positionInside(d.endIndex):typeof d.index=="number"&&(n=this.positionInside(d.index+1));return(n.line<o.line||n.line===o.line&&n.column<=o.column)&&(n={column:o.column+1,line:o.line,offset:o.offset+1}),{end:n,start:o}}raw(d,p){return new t().raw(this,d,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...d){if(this.parent){let p=this,o=!1;for(let n of d)n===this?o=!0:o?(this.parent.insertAfter(p,n),p=n):this.parent.insertBefore(p,n);o||this.remove()}return this}root(){let d=this;for(;d.parent&&d.parent.type!=="document";)d=d.parent;return d}toJSON(d,p){let o=p==null;p=p||new Map;let n=[],s=[[this,n,0]];for(let f=0;f<s.length;f++){let[g,b,y]=s[f],v={};b[y]=v;for(let E in g){if(!Object.prototype.hasOwnProperty.call(g,E)||E==="parent"||E==="proxyCache")continue;let S=g[E];if(Array.isArray(S)){let w=[];v[E]=w;for(let C=0;C<S.length;C++){let M=S[C];typeof M=="object"&&M.toJSON?M.toJSON===h.prototype.toJSON?s.push([M,w,C]):w[C]=M.toJSON(null,p):w[C]=M}}else if(typeof S=="object"&&S.toJSON)S.toJSON===h.prototype.toJSON?s.push([S,v,E]):v[E]=S.toJSON(null,p);else if(E==="source"){if(S==null)continue;let w=p.get(S.input);w==null&&(w=p.size,p.set(S.input,w)),v[E]={end:S.end,inputId:w,start:S.start}}else v[E]=S}}let l=n[0];return o&&(l.inputs=[...p.keys()].map(f=>f.toJSON())),l}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(d=r){d.stringify&&(d=d.stringify);let p="";return d(this,o=>{p+=o}),p}warn(d,p,o={}){let n={node:this};for(let s in o)n[s]=o[s];return d.warn(p,n)}}return fr=h,h.default=h,fr}var dr,Ii;function Yt(){if(Ii)return dr;Ii=1;let e=Ht();class t extends e{constructor(i){super(i),this.type="comment"}}return dr=t,t.default=t,dr}var pr,Oi;function Jt(){if(Oi)return pr;Oi=1;let e=Ht();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value!="undefined"&&typeof i.value!="string"&&(i=de(B({},i),{value:String(i.value)})),super(i),this.type="decl"}}return pr=t,t.default=t,pr}var mr,Ni;function We(){if(Ni)return mr;Ni=1;let e=Yt(),t=Jt(),r=Ht(),{isClean:i,my:a}=Gt(),u,c,h,m;function d(n){let s=n.slice();for(;s.length>0;){let l=s.pop();if(delete l.source,l.nodes){l.nodes=l.nodes.slice();for(let f of l.nodes)s.push(f)}}return n.slice()}function p(n){let s=[n];for(;s.length>0;){let l=s.pop();if(l[i]=!1,l.proxyOf.nodes)for(let f of l.proxyOf.nodes)s.push(f)}}class o extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...s){for(let l of s){let f=this.normalize(l,this.last);for(let g of f)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(s){let l=[this];for(;l.length>0;){let f=l.pop();if(f!==this&&f.cleanRaws!==o.prototype.cleanRaws){f.cleanRaws(s);continue}if(r.prototype.cleanRaws.call(f,s),f.nodes)for(let g of f.nodes)l.push(g)}}each(s){if(!this.proxyOf.nodes)return;let l=this.getIterator(),f,g;for(;this.indexes[l]<this.proxyOf.nodes.length&&(f=this.indexes[l],g=s(this.proxyOf.nodes[f],f),g!==!1);)this.indexes[l]+=1;return delete this.indexes[l],g}every(s){return this.nodes.every(s)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach;return this.indexes[s]=0,s}getProxyProcessor(){return{get(s,l){return l==="proxyOf"?s:s[l]?l==="each"||typeof l=="string"&&l.startsWith("walk")?(...f)=>s[l](...f.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):l==="every"||l==="some"?f=>s[l]((g,...b)=>f(g.toProxy(),...b)):l==="root"?()=>s.root().toProxy():l==="nodes"?s.nodes.map(f=>f.toProxy()):l==="first"||l==="last"?s[l].toProxy():s[l]:s[l]},set(s,l,f){return s[l]===f||(s[l]=f,(l==="name"||l==="params"||l==="selector")&&s.markDirty()),!0}}}index(s){return typeof s=="number"?s:(s.proxyOf&&(s=s.proxyOf),this.proxyOf.nodes.indexOf(s))}insertAfter(s,l){let f=this.index(s),g=this.normalize(l,this.proxyOf.nodes[f]).reverse();f=this.index(s);for(let y of g)this.proxyOf.nodes.splice(f+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],f<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(s,l){let f=this.index(s),g=f===0?"prepend":!1,b=this.normalize(l,this.proxyOf.nodes[f],g).reverse();f=this.index(s);for(let v of b)this.proxyOf.nodes.splice(f,0,v);let y;for(let v in this.indexes)y=this.indexes[v],f<=y&&(this.indexes[v]=y+b.length);return this.markDirty(),this}normalize(s,l){if(typeof s=="string")s=d(c(s).nodes);else if(typeof s=="undefined")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let g of s)g.parent&&g.parent.removeChild(g,"ignore")}else if(s.type==="root"&&this.type!=="document"){s=s.nodes.slice(0);for(let g of s)g.parent&&g.parent.removeChild(g,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value=="undefined")throw new Error("Value field is missed in node creation");typeof s.value!="string"&&(s.value=String(s.value)),s=[new t(s)]}else if(s.selector||s.selectors)s=[new m(s)];else if(s.name)s=[new u(s)];else if(s.text)s=[new e(s)];else throw new Error("Unknown node type in node creation");return s.map(g=>(g[a]||o.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[i]&&p(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&l&&typeof l.raws.before!="undefined"&&(g.raws.before=l.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...s){s=s.reverse();for(let l of s){let f=this.normalize(l,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length}return this.markDirty(),this}push(s){return s.parent=this,this.proxyOf.nodes.push(s),this}removeAll(){for(let s of this.proxyOf.nodes)s.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(s){s=this.index(s),this.proxyOf.nodes[s].parent=void 0,this.proxyOf.nodes.splice(s,1);let l;for(let f in this.indexes)l=this.indexes[f],l>=s&&(this.indexes[f]=l-1);return this.markDirty(),this}replaceValues(s,l,f){return f||(f=l,l={}),this.walkDecls(g=>{l.props&&!l.props.includes(g.prop)||l.fast&&!g.value.includes(l.fast)||(g.value=g.value.replace(s,f))}),this.markDirty(),this}some(s){return this.nodes.some(s)}walk(s){if(!this.proxyOf.nodes)return;let l=[{iterator:this.getIterator(),node:this.proxyOf}];for(;l.length>0;){let{iterator:f,node:g}=l[l.length-1],b=g.indexes[f];if(b>=g.proxyOf.nodes.length){delete g.indexes[f],l.pop();let E=l[l.length-1];E&&(E.node.indexes[E.iterator]+=1);continue}let y=g.proxyOf.nodes[b],v;try{v=s(y,b)}catch(E){throw y.addToError(E)}if(v===!1){for(let E of l)delete E.node.indexes[E.iterator];return!1}y.walk&&y.proxyOf.nodes?l.push({iterator:y.getIterator(),node:y}):g.indexes[f]+=1}}walkAtRules(s,l){return l?s instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&s.test(f.name))return l(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===s)return l(f,g)}):(l=s,this.walk((f,g)=>{if(f.type==="atrule")return l(f,g)}))}walkComments(s){return this.walk((l,f)=>{if(l.type==="comment")return s(l,f)})}walkDecls(s,l){return l?s instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&s.test(f.prop))return l(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===s)return l(f,g)}):(l=s,this.walk((f,g)=>{if(f.type==="decl")return l(f,g)}))}walkRules(s,l){return l?s instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&s.test(f.selector))return l(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===s)return l(f,g)}):(l=s,this.walk((f,g)=>{if(f.type==="rule")return l(f,g)}))}}return o.registerParse=n=>{c=n},o.registerRule=n=>{m=n},o.registerAtRule=n=>{u=n},o.registerRoot=n=>{h=n},mr=o,o.default=o,o.rebuild=n=>{let s=[n];for(;s.length>0;){let l=s.pop();if(l.type==="atrule"?Object.setPrototypeOf(l,u.prototype):l.type==="rule"?Object.setPrototypeOf(l,m.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,h.prototype),l[a]=!0,l.nodes)for(let f of l.nodes)s.push(f)}},mr}var gr,Ti;function As(){if(Ti)return gr;Ti=1;let e=We();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return gr=t,t.default=t,e.registerAtRule(t),gr}var yr,Di;function _s(){if(Di)return yr;Di=1;let e=We(),t,r;class i extends e{constructor(u){super(B({type:"document"},u)),this.nodes||(this.nodes=[])}toResult(u={}){return new t(new r,this,u).stringify()}}return i.registerLazyResult=a=>{t=a},i.registerProcessor=a=>{r=a},yr=i,i.default=i,yr}var wr,Ai;function Ol(){if(Ai)return wr;Ai=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return wr={nanoid:(i=21)=>{let a="",u=i|0;for(;u-- >0;)a+=e[Math.random()*64|0];return a},customAlphabet:(i,a=21)=>(u=a)=>{let c="",h=u|0;for(;h-- >0;)c+=i[Math.random()*i.length|0];return c}},wr}var vr,_i;function vo(){if(_i)return vr;_i=1;let{existsSync:e,readFileSync:t}=xe,{dirname:r,isAbsolute:i,join:a,relative:u,sep:c}=xe,{SourceMapConsumer:h,SourceMapGenerator:m}=xe;function d(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class p{constructor(n,s){if(s.map===!1)return;s.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(n),this.inline=this.startWith(this.annotation,"data:");let l=s.map?s.map.prev:void 0,f=this.loadMap(s.from,l);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(n){let s=/^data:application\/json;charset=utf-?8;base64,/,l=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,g=/^data:application\/json,/,b=n.match(f)||n.match(g);if(b)return decodeURIComponent(n.substr(b[0].length));let y=n.match(s)||n.match(l);if(y)return d(n.substr(y[0].length));let v=n.slice(22);throw v=v.slice(0,v.indexOf(",")),new Error("Unsupported source map encoding "+v)}getAnnotationURL(n){return n.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(n){return typeof n!="object"?!1:typeof n.mappings=="string"||typeof n._mappings=="string"||Array.isArray(n.sections)}loadAnnotation(n){let s=n.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let l=n.lastIndexOf(s.pop()),f=n.indexOf("*/",l);l>-1&&f>-1&&(this.annotation=this.getAnnotationURL(n.substring(l,f)))}loadFile(n,s,l){if(!l&&!this.unsafeMap){if(!/\.map$/i.test(n)||!s)return;let f=u(r(s),n);if(f===".."||f.startsWith(".."+c)||i(f))return}if(this.root=r(n),e(n))return this.mapFile=n,t(n,"utf-8").toString().trim()}loadMap(n,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let l=s(n);if(l){let f=this.loadFile(l,n,!0);if(!f)throw new Error("Unable to load previous source map: "+l.toString());return f}}else{if(s instanceof h)return m.fromSourceMap(s).toString();if(s instanceof m)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let l=this.annotation;n&&(l=a(r(n),l));let f=this.loadFile(l,n,!1);if(f)try{this.json=JSON.parse(f.replace(/^\)]}'[^\n]*\n/,""))}catch(g){return}return f}}}startWith(n,s){return n?n.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return vr=p,p.default=p,vr}var br,ki;function Xt(){if(ki)return br;ki=1;let{nanoid:e}=Ol(),{isAbsolute:t,resolve:r}=xe,{SourceMapConsumer:i,SourceMapGenerator:a}=xe,{fileURLToPath:u,pathToFileURL:c}=xe,h=Ds(),m=vo(),d=xe,p=Symbol("lineToIndexCache"),o=!!(i&&a),n=!!(r&&t);function s(f){if(f[p])return f[p];let g=f.css.split(`
|
|
23
|
+
`),b=new Array(g.length),y=0;for(let v=0,E=g.length;v<E;v++)b[v]=y,y+=g[v].length+1;return f[p]=b,b}class l{get from(){return this.file||this.id}constructor(g,b={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,b.document&&(this.document=b.document.toString()),b.from&&(!n||/^\w+:\/\//.test(b.from)||t(b.from)?this.file=b.from:this.file=r(b.from)),n&&o){let y=new m(this.css,b);if(y.text){this.map=y;let v=y.consumer().file;!this.file&&v&&(this.file=this.mapResolve(v))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(g,b,y,v={}){let E,S,w,C,M;if(b&&typeof b=="object"){let x=b,D=y;if(typeof x.offset=="number"){C=x.offset;let T=this.fromOffset(C);b=T.line,y=T.col}else b=x.line,y=x.column,C=this.fromLineAndColumn(b,y);if(typeof D.offset=="number"){w=D.offset;let T=this.fromOffset(w);S=T.line,E=T.col}else S=D.line,E=D.column,w=this.fromLineAndColumn(D.line,D.column)}else if(y)C=this.fromLineAndColumn(b,y);else{C=b;let x=this.fromOffset(C);b=x.line,y=x.col}let R=this.origin(b,y,S,E);return R?M=new h(g,R.endLine===void 0?R.line:{column:R.column,line:R.line},R.endLine===void 0?R.column:{column:R.endColumn,line:R.endLine},R.source,R.file,v.plugin):M=new h(g,S===void 0?b:{column:y,line:b},S===void 0?y:{column:E,line:S},this.css,this.file,v.plugin),M.input={column:y,endColumn:E,endLine:S,endOffset:w,line:b,offset:C,source:this.css},this.file&&(c&&(M.input.url=c(this.file).toString()),M.input.file=this.file),M}fromLineAndColumn(g,b){return s(this)[g-1]+b-1}fromOffset(g){let b=s(this),y=b[b.length-1],v=0;if(g>=y)v=b.length-1;else{let E=b.length-2,S;for(;v<E;)if(S=v+(E-v>>1),g<b[S])E=S-1;else if(g>=b[S+1])v=S+1;else{v=S;break}}return{col:g-b[v]+1,line:v+1}}mapResolve(g){return/^\w+:\/\//.test(g)?g:r(this.map.consumer().sourceRoot||this.map.root||".",g)}origin(g,b,y,v){if(!this.map)return!1;let E=this.map.consumer(),S=E.originalPositionFor({column:b-1,line:g});if(!S.source)return!1;let w;if(typeof y=="number"){let x=E.originalPositionFor({column:v-1,line:y});x.source&&(w=x)}let C;t(S.source)?C=c(S.source):C=new URL(S.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let M={column:S.column+1,endColumn:w&&w.column+1,endLine:w&&w.line,line:S.line,url:C.toString()};if(C.protocol==="file:")if(u)M.file=u(C);else throw new Error("file: protocol is not available in this PostCSS build");let R=E.sourceContentFor(S.source);return R&&(M.source=R),M}toJSON(){let g={};for(let b of["hasBOM","css","file","id"])this[b]!=null&&(g[b]=this[b]);return this.map&&(g.map=B({},this.map),g.map.consumerCache&&(g.map.consumerCache=void 0)),g}}return br=l,l.default=l,d&&d.registerInput&&d.registerInput(l),br}var Sr,Pi;function ht(){if(Pi)return Sr;Pi=1;let e=We(),t,r;class i extends e{constructor(u){super(u),this.type="root",this.nodes||(this.nodes=[])}normalize(u,c,h){let m=new Set;for(let p of Array.isArray(u)?u:[u])p&&typeof p=="object"&&!p.parent&&p.raws&&typeof p.raws.before!="undefined"&&m.add(p.raws);let d=super.normalize(u);if(c){if(h==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let p of d)m.has(p.raws)||(p.raws.before=c.raws.before)}return d}removeChild(u,c){let h=this.index(u);return!c&&h===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[h].raws.before),super.removeChild(u)}toResult(u={}){return new t(new r,this,u).stringify()}}return i.registerLazyResult=a=>{t=a},i.registerProcessor=a=>{r=a},Sr=i,i.default=i,e.registerRoot(i),Sr}var Cr,Li;function bo(){if(Li)return Cr;Li=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
24
|
+
`," "];return e.split(t,r)},split(t,r,i){if(!t)return[];let a=[],u="",c=!1,h=0,m=!1,d="",p=!1;for(let o of t)p?p=!1:o==="\\"?p=!0:m?o===d&&(m=!1):o==='"'||o==="'"?(m=!0,d=o):o==="("?h+=1:o===")"?h>0&&(h-=1):h===0&&r.includes(o)&&(c=!0),c?(u!==""&&a.push(u.trim()),u="",c=!1):u+=o;return(i||u!=="")&&a.push(u.trim()),a}};return Cr=e,e.default=e,Cr}var Er,Fi;function ks(){if(Fi)return Er;Fi=1;let e=We(),t=bo();class r extends e{get selectors(){return t.comma(this.selector)}set selectors(a){let u=this.selector?this.selector.match(/,\s*/):null,c=u?u[0]:","+this.raw("between","beforeOpen");this.selector=a.join(c)}constructor(a){super(a),this.type="rule",this.nodes||(this.nodes=[])}}return Er=r,r.default=r,e.registerRule(r),Er}var xr,Bi;function Nl(){if(Bi)return xr;Bi=1;let e=As(),t=Yt(),r=Jt(),i=Xt(),a=vo(),u=ht(),c=ks();function h(p,o){return p.inputs?p.inputs.map(n=>{let s=de(B({},n),{__proto__:i.prototype});return s.map&&(s.map=de(B({},s.map),{__proto__:a.prototype})),s}):o}function m(p,o,n){let s=B({},p);if(delete s.inputs,delete s.nodes,s.source){let f=s.source,{inputId:g}=f,b=yt(f,["inputId"]);s.source=b,g!=null&&(s.source.input=o[g])}let l;if(s.type==="root")l=new u(s);else if(s.type==="decl")l=new r(s);else if(s.type==="rule")l=new c(s);else if(s.type==="comment")l=new t(s);else if(s.type==="atrule")l=new e(s);else throw new Error("Unknown node type: "+p.type);if(n){l.nodes=n;for(let g of n)g.parent=l}return l}function d(p,o){if(Array.isArray(p))return p.map(l=>d(l));let n,s=[{childIndex:0,children:[],inputs:h(p,o),json:p}];for(;s.length>0;){let l=s[s.length-1],f=l.json.nodes;if(f&&l.childIndex<f.length){let b=f[l.childIndex];l.childIndex+=1,s.push({childIndex:0,children:[],inputs:h(b,l.inputs),json:b});continue}s.pop();let g=m(l.json,l.inputs,f?l.children:void 0);s.length>0?s[s.length-1].children.push(g):n=g}return n}return xr=d,d.default=d,xr}var Rr,Ui;function So(){if(Ui)return Rr;Ui=1;let{dirname:e,relative:t,resolve:r,sep:i}=xe,{SourceMapConsumer:a,SourceMapGenerator:u}=xe,{pathToFileURL:c}=xe,h=Xt(),m=!!(a&&u),d=!!(e&&r&&t&&i);class p{constructor(n,s,l,f){this.stringify=n,this.mapOpts=l.map||{},this.root=s,this.opts=l,this.css=f,this.originalCSS=f,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let n;this.isInline()?n="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?n=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?n=this.mapOpts.annotation(this.opts.to,this.root):n=this.outputFile()+".map";let s=`
|
|
25
25
|
`;this.css.includes(`\r
|
|
26
|
-
`)&&(
|
|
27
|
-
`),this.css+=
|
|
28
|
-
`;)n--;this.css=this.css.slice(0,n)+this.css.slice(
|
|
29
|
-
`),i=y.length-g):i+=y.length,v&&E!=="start"){let S=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==S.last||S.raws.semicolon)&&(v.source&&v.source.end?(h.source=this.sourcePath(v),h.original.line=v.source.end.line,h.original.column=v.source.end.column-1,h.generated.line=n,h.generated.column=i-2,this.map.addMapping(h)):(h.source=l,h.original.line=1,h.original.column=0,h.generated.line=n,h.generated.column=i-1,this.map.addMapping(h)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(n=>n.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let n=this.mapOpts.annotation;return typeof n!="undefined"&&n!==!0?!1:this.previous().length?this.previous().some(i=>i.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(n=>n.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;let i=this.memoizedPaths.get(n);if(i)return i;let l=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(l=e(r(l,this.mapOpts.annotation)));let h=t(l,n);return this.memoizedPaths.set(n,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(n=>{if(n.source&&n.source.input.map){let i=n.source.input.map;this.previousMaps.includes(i)||this.previousMaps.push(i)}});else{let n=new f(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps}setSourcesContent(){let n={};if(this.root)this.root.walk(i=>{if(i.source){let l=i.source.input.from;if(l&&!n[l]){n[l]=!0;let h=this.usesFileUrls?this.toFileUrl(l):this.toUrl(this.path(l));this.map.setSourceContent(h,i.source.input.css)}}});else if(this.css){let i=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(i,this.css)}}sourcePath(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))}toBase64(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))}toFileUrl(n){let i=this.memoizedFileURLs.get(n);if(i)return i;if(c){let l=c(n).toString();return this.memoizedFileURLs.set(n,l),l}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(n){let i=this.memoizedURLs.get(n);if(i)return i;s==="\\"&&(n=n.replace(/\\/g,"/"));let l=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,l),l}}return Er=p,Er}var xr,Bs;function Ol(){if(Bs)return xr;Bs=1;const e=39,t=34,r=92,s=47,a=10,u=32,c=12,f=9,m=13,d=91,p=93,o=40,n=41,i=123,l=125,h=59,g=42,b=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return xr=function(M,R={}){let x=M.css.valueOf(),D=R.ignoreErrors,T,G,X,I,ne,P,V,H,F,Z,ue=x.length,N=0,Se=[],ce=[],Te=-1;function De(){return N}function Ce(ie){throw M.error("Unclosed "+ie,N)}function ze(){return ce.length===0&&N>=ue}function tt(ie){if(ce.length)return ce.pop();if(N>=ue)return;let me=ie?ie.ignoreUnclosed:!1;switch(T=x.charCodeAt(N),T){case a:case u:case f:case m:case c:{I=N;do I+=1,T=x.charCodeAt(I);while(T===u||T===a||T===f||T===m||T===c);P=["space",x.slice(N,I)],N=I-1;break}case d:case p:case i:case l:case b:case h:case n:{let de=String.fromCharCode(T);P=[de,de,N];break}case o:{if(Z=Se.length?Se.pop()[1]:"",F=x.charCodeAt(N+1),Z==="url"&&F!==e&&F!==t&&F!==u&&F!==a&&F!==f&&F!==c&&F!==m){I=N;do{if(V=!1,I=x.indexOf(")",I+1),I===-1)if(D||me){I=N;break}else Ce("bracket");for(H=I;x.charCodeAt(H-1)===r;)H-=1,V=!V}while(V);P=["brackets",x.slice(N,I+1),N,I],N=I}else N<=Te?P=["(","(",N]:(I=x.indexOf(")",N+1),G=x.slice(N,I+1),I===-1||S.test(G)?(Te=I===-1?ue:I,P=["(","(",N]):(P=["brackets",G,N,I],N=I));break}case e:case t:{ne=T===e?"'":'"',I=N;do{if(V=!1,I=x.indexOf(ne,I+1),I===-1)if(D||me){I=N+1;break}else Ce("string");for(H=I;x.charCodeAt(H-1)===r;)H-=1,V=!V}while(V);P=["string",x.slice(N,I+1),N,I],N=I;break}case y:{v.lastIndex=N+1,v.test(x),v.lastIndex===0?I=x.length-1:I=v.lastIndex-2,P=["at-word",x.slice(N,I+1),N,I],N=I;break}case r:{for(I=N,X=!0;x.charCodeAt(I+1)===r;)I+=1,X=!X;if(T=x.charCodeAt(I+1),X&&T!==s&&T!==u&&T!==a&&T!==f&&T!==m&&T!==c&&(I+=1,w.test(x.charAt(I)))){for(;w.test(x.charAt(I+1));)I+=1;x.charCodeAt(I+1)===u&&(I+=1)}P=["word",x.slice(N,I+1),N,I],N=I;break}default:{T===s&&x.charCodeAt(N+1)===g?(I=x.indexOf("*/",N+2)+1,I===0&&(D||me?I=x.length:Ce("comment")),P=["comment",x.slice(N,I+1),N,I],N=I):(E.lastIndex=N+1,E.test(x),E.lastIndex===0?I=x.length-1:I=E.lastIndex-2,P=["word",x.slice(N,I+1),N,I],Se.push(P),N=I);break}}return N++,P}function pe(ie){ce.push(ie)}return{back:pe,endOfFile:ze,nextToken:tt,position:De}},xr}var Rr,Us;function Nl(){if(Us)return Rr;Us=1;let e=Ti(),t=Gt(),r=Ht(),s=ut(),a=Ai(),u=Ol();const c={empty:!0,space:!0};function f(p){for(let o=p.length-1;o>=0;o--){let n=p[o],i=n[3]||n[2];if(i)return i}}function m(p,o,n){let i="";for(let l=o;l<n;l++)i+=p[l][1];return i}class d{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let n=new e;n.name=o[1].slice(1),n.name===""&&this.unnamedAtrule(n,o),this.init(n,o[2]);let i,l,h,g=!1,b=!1,y=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),i=o[0],i==="("||i==="["?v.push(i==="("?")":"]"):i==="{"&&v.length>0?v.push("}"):i===v[v.length-1]&&v.pop(),v.length===0)if(i===";"){n.source.end=this.getPosition(o[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){b=!0;break}else if(i==="}"){if(y.length>0){for(h=y.length-1,l=y[h];l&&l[0]==="space";)l=y[--h];l&&(n.source.end=this.getPosition(l[3]||l[2]),n.source.end.offset++)}this.end(o);break}else y.push(o);else y.push(o);if(this.tokenizer.endOfFile()){g=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(n.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(n,"params",y),g&&(o=y[y.length-1],n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),b&&(n.nodes=[],this.current=n)}checkMissedSemicolon(o){let n=this.colon(o);if(n===!1)return;let i=0,l;for(let h=n-1;h>=0&&(l=o[h],!(l[0]!=="space"&&(i+=1,i===2)));h--);throw this.input.error("Missed semicolon",l[0]==="word"?l[3]+1:l[2])}colon(o){let n=0,i,l,h;for(let[g,b]of o.entries()){if(l=b,h=l[0],h==="("&&(n+=1),h===")"&&(n-=1),n===0&&h===":")if(!i)this.doubleColon(l);else{if(i[0]==="word"&&i[1]==="progid")continue;return g}i=l}return!1}comment(o){let n=new t;this.init(n,o[2]),n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++;let i=o[1].slice(2,-2);if(!i.trim())n.text="",n.raws.left=i,n.raws.right="";else{let l=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=l[2],n.raws.left=l[1],n.raws.right=l[3]}}createTokenizer(){this.tokenizer=u(this.input)}decl(o,n){let i=new r;this.init(i,o[0][2]);let l=o[o.length-1];l[0]===";"&&(this.semicolon=!0,o.pop()),i.source.end=this.getPosition(l[3]||l[2]||f(o)),i.source.end.offset++;let h=0;for(;o[h][0]!=="word";)h===o.length-1&&this.unknownWord([o[h]]),h++;i.raws.before+=m(o,0,h),i.source.start=this.getPosition(o[h][2]);let g=h;for(;h<o.length;){let w=o[h][0];if(w===":"||w==="space"||w==="comment")break;h++}i.prop=m(o,g,h);let b=h,y;for(;h<o.length&&(y=o[h],h++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);i.raws.between=m(o,b,h),(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let v=h;for(;h<o.length;){let w=o[h][0];if(w!=="space"&&w!=="comment")break;h++}let E=o.slice(v,h);o=o.slice(h),this.precheckMissedSemicolon(o);for(let w=o.length-1;w>=0;w--){if(y=o[w],y[1].toLowerCase()==="!important"){i.important=!0;let C=this.stringFrom(o,w);C=this.spacesFromEnd(o)+C,C!==" !important"&&(i.raws.important=C);break}else if(y[1].toLowerCase()==="important"){let C=o.slice(0),M="";for(let R=w;R>0;R--){let x=C[R][0];if(M.trim().startsWith("!")&&x!=="space")break;M=C.pop()[1]+M}M.trim().startsWith("!")&&(i.important=!0,i.raws.important=M,o=C)}if(y[0]!=="space"&&y[0]!=="comment")break}o.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(i.raws.between+=E.map(w=>w[1]).join(""),E=[]),this.raw(i,"value",E.concat(o),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let n=new a;this.init(n,o[2]),n.selector="",n.raws.between="",this.current=n}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(o[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(o){let n=this.input.fromOffset(o);return{column:n.col,line:n.line,offset:o}}init(o,n){this.current.push(o),o.source={input:this.input,start:this.getPosition(n)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let n=!1,i=null,l=!1,h=null,g=[],b=o[1].startsWith("--"),y=[],v=o;for(;v;){if(i=v[0],y.push(v),i==="("||i==="[")h||(h=v),g.push(i==="("?")":"]");else if(b&&l&&i==="{")h||(h=v),g.push("}");else if(g.length===0)if(i===";")if(l){this.decl(y,b);return}else break;else if(i==="{"){this.rule(y);return}else if(i==="}"){this.tokenizer.back(y.pop()),n=!0;break}else i===":"&&(l=!0);else i===g[g.length-1]&&(g.pop(),g.length===0&&(h=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),g.length>0&&this.unclosedBracket(h),n&&l){if(!b)for(;y.length&&(v=y[y.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,b)}else this.unknownWord(y)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,n,i,l){let h,g,b=i.length,y="",v=!0,E,S;for(let w=0;w<b;w+=1)h=i[w],g=h[0],g==="space"&&w===b-1&&!l?v=!1:g==="comment"?(S=i[w-1]?i[w-1][0]:"empty",E=i[w+1]?i[w+1][0]:"empty",!c[S]&&!c[E]?y.slice(-1)===","?v=!1:y+=h[1]:v=!1):y+=h[1];if(!v){let w=i.reduce((C,M)=>C+M[1],"");o.raws[n]={raw:w,value:y}}o[n]=y}rule(o){o.pop();let n=new a;this.init(n,o[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(n,"selector",o),this.current=n}spacesAndCommentsFromEnd(o){let n,i="";for(;o.length&&(n=o[o.length-1][0],!(n!=="space"&&n!=="comment"));)i=o.pop()[1]+i;return i}spacesAndCommentsFromStart(o){let n,i="";for(;o.length&&(n=o[0][0],!(n!=="space"&&n!=="comment"));)i+=o.shift()[1];return i}spacesFromEnd(o){let n,i="";for(;o.length&&(n=o[o.length-1][0],n==="space");)i=o.pop()[1]+i;return i}stringFrom(o,n){let i="";for(let l=n;l<o.length;l++)i+=o[l][1];return o.splice(n,o.length-n),i}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}}return Rr=d,Rr}var Mr,Ws;function _i(){if(Ws)return Mr;Ws=1;let e=Le(),t=Yt(),r=Nl();function s(a,u){let c=new t(a,u),f=new r(c);try{f.parse()}catch(m){throw m}return f.root}return Mr=s,s.default=s,e.registerParse(s),Mr}var Ir,$s;function vo(){if($s)return Ir;$s=1;let e=Le(),{my:t}=Vt();class r{constructor(a,u={}){if(this.type="warning",this.text=a,u.node&&u.node.source){u.node[t]||e.rebuild(u.node);let c=u.node.rangeBy(u);this.line=c.start.line,this.column=c.start.column,this.endLine=c.end.line,this.endColumn=c.end.column}for(let c in u)this[c]=u[c]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ir=r,r.default=r,Ir}var Or,zs;function ki(){if(zs)return Or;zs=1;let e=vo();class t{get content(){return this.css}constructor(s,a,u){this.processor=s,this.messages=[],this.root=a,this.opts=u,this.css="",this.map=void 0}toString(){return this.css}warn(s,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let u=new e(s,a);return this.messages.push(u),u}warnings(){return this.messages.filter(s=>s.type==="warning")}}return Or=t,t.default=t,Or}var Nr,js;function bo(){if(js)return Nr;js=1;let e={};return Nr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Nr}var Tr,Vs;function So(){if(Vs)return Tr;Vs=1;let e=Le(),t=Di(),r=wo(),s=_i(),a=ki(),u=ut(),c=jt(),{isClean:f,my:m}=Vt(),d=bo();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},n={Once:!0,postcssPlugin:!0,prepare:!0},i=0;function l(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let S=!1,w=p[E.type];return E.type==="decl"?S=E.prop.toLowerCase():E.type==="atrule"&&(S=E.name.toLowerCase()),S&&E.append?[w,w+"-"+S,i,w+"Exit",w+"Exit-"+S]:S?[w,w+"-"+S,w+"Exit",w+"Exit-"+S]:E.append?[w,i,w+"Exit"]:[w,w+"Exit"]}function g(E){let S;return E.type==="document"?S=["Document",i,"DocumentExit"]:E.type==="root"?S=["Root",i,"RootExit"]:S=h(E),{eventIndex:0,events:S,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){let S=[E];for(;S.length>0;){let w=S.pop();if(w[f]=!1,w.nodes)for(let C of w.nodes)S.push(C)}return E}let y={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,w,C){this.stringified=!1,this.processed=!1;let M;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))M=b(w);else if(w instanceof v||w instanceof a)M=b(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let R=s;C.syntax&&(R=C.syntax.parse),C.parser&&(R=C.parser),R.parse&&(R=R.parse);try{M=R(w,C)}catch(x){this.processed=!0,this.error=x}M&&!M[m]&&e.rebuild(M)}this.result=new a(S,M,C),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(R=>typeof R=="object"&&R.prepare?L(L({},R),R.prepare(this.result)):R)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,w){let C=this.result.lastPlugin;try{w&&w.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin?(S.plugin=C.postcssPlugin,S.setMessage()):C.postcssVersion}catch(M){console&&console.error&&console.error(M)}return S}prepareVisitors(){this.listeners={};let S=(w,C,M)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,M])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!o[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!n[C])if(typeof w[C]=="object")for(let M in w[C])M==="*"?S(w,C,w[C][M]):S(w,C+"-"+M.toLowerCase(),w[C][M]);else typeof w[C]=="function"&&S(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let w=this.plugins[S],C=this.runOnRoot(w);if(l(C))try{await C}catch(M){throw this.handleError(M)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[f];){S[f]=!0;let w=[g(S)];for(;w.length>0;){let C=this.visitTick(w);if(l(C))try{await C}catch(M){let R=w[w.length-1].node;throw this.handleError(M,R)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(S.type==="document"){let M=S.nodes.map(R=>C(R,this.helpers));await Promise.all(M)}else await C(S,this.helpers)}catch(M){throw this.handleError(M)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>S.Once(C,this.helpers));return l(w[0])?Promise.all(w):w}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,w=c;S.syntax&&(w=S.syntax.stringify),S.stringifier&&(w=S.stringifier),w.stringify&&(w=w.stringify);let C=this.result.root.source;if(S.map===void 0&&!(C&&C.input&&C.input.map)){let x="";return w(this.result.root,D=>{x+=D}),this.result.css=x,this.result}let R=new r(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let w=this.runOnRoot(S);if(l(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[f];)S[f]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let w of S.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,w){return this.async().then(S,w)}toString(){return this.css}visitSync(S,w){for(let[C,M]of S){this.result.lastPlugin=C;let R;try{R=M(w,this.helpers)}catch(x){throw this.handleError(x,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(l(R))throw this.getAsyncError()}}visitTick(S){let w=S[S.length-1],{node:C,visitors:M}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){S.pop();return}if(M.length>0&&w.visitorIndex<M.length){let[x,D]=M[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===M.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=x;try{return D(C.toProxy(),this.helpers)}catch(T){throw this.handleError(T,C)}}if(w.iterator!==0){let x=w.iterator;w.descending&&(w.descending=!1,C.indexes[x]+=1);let D;for(;D=C.nodes[C.indexes[x]];){if(!D[f]){D[f]=!0,w.descending=!0,S.push(g(D));return}C.indexes[x]+=1}w.iterator=0,delete C.indexes[x]}let R=w.events;for(;w.eventIndex<R.length;){let x=R[w.eventIndex];if(w.eventIndex+=1,x===i){C.nodes&&C.nodes.length&&(C[f]=!0,w.iterator=C.getIterator());return}else if(this.listeners[x]){w.visitors=this.listeners[x];return}}S.pop()}walkSync(S){S[f]=!0;let w=[{eventIndex:0,events:h(S),iterator:0,node:S}];for(;w.length>0;){let C=w[w.length-1],M=C.node;if(C.iterator!==0){let R=C.iterator;C.descending&&(C.descending=!1,M.indexes[R]+=1);let x,D=!1;for(;x=M.nodes[M.indexes[R]];){if(!x[f]){x[f]=!0,C.descending=!0,w.push({eventIndex:0,events:h(x),iterator:0,node:x}),D=!0;break}M.indexes[R]+=1}if(D)continue;C.iterator=0,delete M.indexes[R]}if(C.eventIndex<C.events.length){let R=C.events[C.eventIndex];if(C.eventIndex+=1,R===i)M.nodes&&M.nodes.length&&(C.iterator=M.getIterator());else{let x=this.listeners[R];x&&this.visitSync(x,M.toProxy())&&w.pop()}continue}w.pop()}}warnings(){return this.sync().warnings()}}return v.registerPostcss=E=>{y=E},Tr=v,v.default=v,u.registerLazyResult(v),t.registerLazyResult(v),Tr}var Dr,qs;function Tl(){if(qs)return Dr;qs=1;let e=wo(),t=_i(),r=ki(),s=jt(),a=bo();class u{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let f,m=t;try{f=m(this._css,this._opts)}catch(d){this.error=d}if(this.error)throw this.error;return this._root=f,f}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(f,m,d){m=m.toString(),this.stringified=!1,this._processor=f,this._css=m,this._opts=d,this._map=void 0;let p=s;this.result=new r(this._processor,void 0,this._opts),this.result.css=m;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(p,void 0,this._opts,m);if(n.isMap()){let[i,l]=n.generate();i&&(this.result.css=i),l&&(this.result.map=l)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}sync(){if(this.error)throw this.error;return this.result}then(f,m){return this.async().then(f,m)}toString(){return this._css}warnings(){return[]}}return Dr=u,u.default=u,Dr}var Ar,Gs;function Dl(){if(Gs)return Ar;Gs=1;let e=Di(),t=So(),r=Tl(),s=ut();class a{constructor(c=[]){this.version="8.5.25",this.plugins=this.normalize(c)}normalize(c){let f=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))f=f.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)f.push(m);else if(typeof m=="function")f.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return f}process(c,f={}){return!this.plugins.length&&!f.parser&&!f.stringifier&&!f.syntax?new r(this,c,f):new t(this,c,f)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Ar=a,a.default=a,s.registerProcessor(a),e.registerProcessor(a),Ar}var _r,Hs;function Al(){if(Hs)return _r;Hs=1;let e=Ti(),t=Gt(),r=Le(),s=Ni(),a=Ht(),u=Di(),c=Il(),f=Yt(),m=So(),d=yo(),p=qt(),o=_i(),n=Dl(),i=ki(),l=ut(),h=Ai(),g=jt(),b=vo();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new n(v)}return y.plugin=function(E,S){let w=!1;function C(...R){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
26
|
+
`)&&(s=`\r
|
|
27
|
+
`),this.css+=s+"/*# sourceMappingURL="+n+" */"}applyPrevMaps(){for(let n of this.previous()){let s=this.toUrl(this.path(n.file)),l=n.root||e(n.file),f;this.mapOpts.sourcesContent===!1?(f=new a(n.text),f.sourcesContent&&(f.sourcesContent=null)):f=n.consumer(),this.map.applySourceMap(f,s,this.toUrl(this.path(l)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let n;for(let s=this.root.nodes.length-1;s>=0;s--)n=this.root.nodes[s],n.type==="comment"&&n.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(s)}else if(this.css){let n;for(;(n=this.css.lastIndexOf("/*#"))!==-1;){let s=this.css.indexOf("*/",n+3);if(s===-1)break;for(;n>0&&this.css[n-1]===`
|
|
28
|
+
`;)n--;this.css=this.css.slice(0,n)+this.css.slice(s+2)}}}}generate(){if(this.clearAnnotation(),d&&m&&this.isMap())return this.generateMap();{let n="";return this.stringify(this.root,s=>{n+=s}),[n]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let n=this.previous()[0].consumer();n.file=this.outputFile(),this.map=u.fromSourceMap(n,{ignoreInvalidMapping:!0})}else this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,s=1,l="<no source>",f={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,v,E)=>{if(this.css+=y,v&&E!=="end"&&(f.generated.line=n,f.generated.column=s-1,v.source&&v.source.start?(f.source=this.sourcePath(v),f.original.line=v.source.start.line,f.original.column=v.source.start.column-1,this.map.addMapping(f)):(f.source=l,f.original.line=1,f.original.column=0,this.map.addMapping(f))),b=y.match(/\n/g),b?(n+=b.length,g=y.lastIndexOf(`
|
|
29
|
+
`),s=y.length-g):s+=y.length,v&&E!=="start"){let S=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==S.last||S.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=n,f.generated.column=s-2,this.map.addMapping(f)):(f.source=l,f.original.line=1,f.original.column=0,f.generated.line=n,f.generated.column=s-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(n=>n.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let n=this.mapOpts.annotation;return typeof n!="undefined"&&n!==!0?!1:this.previous().length?this.previous().some(s=>s.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(n=>n.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;let s=this.memoizedPaths.get(n);if(s)return s;let l=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(l=e(r(l,this.mapOpts.annotation)));let f=t(l,n);return this.memoizedPaths.set(n,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(n=>{if(n.source&&n.source.input.map){let s=n.source.input.map;this.previousMaps.includes(s)||this.previousMaps.push(s)}});else{let n=new h(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps}setSourcesContent(){let n={};if(this.root)this.root.walk(s=>{if(s.source){let l=s.source.input.from;if(l&&!n[l]){n[l]=!0;let f=this.usesFileUrls?this.toFileUrl(l):this.toUrl(this.path(l));this.map.setSourceContent(f,s.source.input.css)}}});else if(this.css){let s=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(s,this.css)}}sourcePath(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))}toBase64(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))}toFileUrl(n){let s=this.memoizedFileURLs.get(n);if(s)return s;if(c){let l=c(n).toString();return this.memoizedFileURLs.set(n,l),l}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(n){let s=this.memoizedURLs.get(n);if(s)return s;i==="\\"&&(n=n.replace(/\\/g,"/"));let l=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,l),l}}return Rr=p,Rr}var Mr,Wi;function Tl(){if(Wi)return Mr;Wi=1;const e=39,t=34,r=92,i=47,a=10,u=32,c=12,h=9,m=13,d=91,p=93,o=40,n=41,s=123,l=125,f=59,g=42,b=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return Mr=function(M,R={}){let x=M.css.valueOf(),D=R.ignoreErrors,T,X,te,I,le,k,V,re,z,oe,pe=x.length,N=0,ve=[],P=[],U=-1;function F(){return N}function $(W){throw M.error("Unclosed "+W,N)}function G(){return P.length===0&&N>=pe}function Q(W){if(P.length)return P.pop();if(N>=pe)return;let K=W?W.ignoreUnclosed:!1;switch(T=x.charCodeAt(N),T){case a:case u:case h:case m:case c:{I=N;do I+=1,T=x.charCodeAt(I);while(T===u||T===a||T===h||T===m||T===c);k=["space",x.slice(N,I)],N=I-1;break}case d:case p:case s:case l:case b:case f:case n:{let me=String.fromCharCode(T);k=[me,me,N];break}case o:{if(oe=ve.length?ve.pop()[1]:"",z=x.charCodeAt(N+1),oe==="url"&&z!==e&&z!==t&&z!==u&&z!==a&&z!==h&&z!==c&&z!==m){I=N;do{if(V=!1,I=x.indexOf(")",I+1),I===-1)if(D||K){I=N;break}else $("bracket");for(re=I;x.charCodeAt(re-1)===r;)re-=1,V=!V}while(V);k=["brackets",x.slice(N,I+1),N,I],N=I}else N<=U?k=["(","(",N]:(I=x.indexOf(")",N+1),X=x.slice(N,I+1),I===-1||S.test(X)?(U=I===-1?pe:I,k=["(","(",N]):(k=["brackets",X,N,I],N=I));break}case e:case t:{le=T===e?"'":'"',I=N;do{if(V=!1,I=x.indexOf(le,I+1),I===-1)if(D||K){I=N+1;break}else $("string");for(re=I;x.charCodeAt(re-1)===r;)re-=1,V=!V}while(V);k=["string",x.slice(N,I+1),N,I],N=I;break}case y:{v.lastIndex=N+1,v.test(x),v.lastIndex===0?I=x.length-1:I=v.lastIndex-2,k=["at-word",x.slice(N,I+1),N,I],N=I;break}case r:{for(I=N,te=!0;x.charCodeAt(I+1)===r;)I+=1,te=!te;if(T=x.charCodeAt(I+1),te&&T!==i&&T!==u&&T!==a&&T!==h&&T!==m&&T!==c&&(I+=1,w.test(x.charAt(I)))){for(;w.test(x.charAt(I+1));)I+=1;x.charCodeAt(I+1)===u&&(I+=1)}k=["word",x.slice(N,I+1),N,I],N=I;break}default:{T===i&&x.charCodeAt(N+1)===g?(I=x.indexOf("*/",N+2)+1,I===0&&(D||K?I=x.length:$("comment")),k=["comment",x.slice(N,I+1),N,I],N=I):(E.lastIndex=N+1,E.test(x),E.lastIndex===0?I=x.length-1:I=E.lastIndex-2,k=["word",x.slice(N,I+1),N,I],ve.push(k),N=I);break}}return N++,k}function ie(W){P.push(W)}return{back:ie,endOfFile:G,nextToken:Q,position:F}},Mr}var Ir,$i;function Dl(){if($i)return Ir;$i=1;let e=As(),t=Yt(),r=Jt(),i=ht(),a=ks(),u=Tl();const c={empty:!0,space:!0};function h(p){for(let o=p.length-1;o>=0;o--){let n=p[o],s=n[3]||n[2];if(s)return s}}function m(p,o,n){let s="";for(let l=o;l<n;l++)s+=p[l][1];return s}class d{constructor(o){this.input=o,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let n=new e;n.name=o[1].slice(1),n.name===""&&this.unnamedAtrule(n,o),this.init(n,o[2]);let s,l,f,g=!1,b=!1,y=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),s=o[0],s==="("||s==="["?v.push(s==="("?")":"]"):s==="{"&&v.length>0?v.push("}"):s===v[v.length-1]&&v.pop(),v.length===0)if(s===";"){n.source.end=this.getPosition(o[2]),n.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){b=!0;break}else if(s==="}"){if(y.length>0){for(f=y.length-1,l=y[f];l&&l[0]==="space";)l=y[--f];l&&(n.source.end=this.getPosition(l[3]||l[2]),n.source.end.offset++)}this.end(o);break}else y.push(o);else y.push(o);if(this.tokenizer.endOfFile()){g=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(n.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(n,"params",y),g&&(o=y[y.length-1],n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),b&&(n.nodes=[],this.current=n)}checkMissedSemicolon(o){let n=this.colon(o);if(n===!1)return;let s=0,l;for(let f=n-1;f>=0&&(l=o[f],!(l[0]!=="space"&&(s+=1,s===2)));f--);throw this.input.error("Missed semicolon",l[0]==="word"?l[3]+1:l[2])}colon(o){let n=0,s,l,f;for(let[g,b]of o.entries()){if(l=b,f=l[0],f==="("&&(n+=1),f===")"&&(n-=1),n===0&&f===":")if(!s)this.doubleColon(l);else{if(s[0]==="word"&&s[1]==="progid")continue;return g}s=l}return!1}comment(o){let n=new t;this.init(n,o[2]),n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++;let s=o[1].slice(2,-2);if(!s.trim())n.text="",n.raws.left=s,n.raws.right="";else{let l=s.match(/^(\s*)([^]*\S)(\s*)$/);n.text=l[2],n.raws.left=l[1],n.raws.right=l[3]}}createTokenizer(){this.tokenizer=u(this.input)}decl(o,n){let s=new r;this.init(s,o[0][2]);let l=o[o.length-1];l[0]===";"&&(this.semicolon=!0,o.pop()),s.source.end=this.getPosition(l[3]||l[2]||h(o)),s.source.end.offset++;let f=0;for(;o[f][0]!=="word";)f===o.length-1&&this.unknownWord([o[f]]),f++;s.raws.before+=m(o,0,f),s.source.start=this.getPosition(o[f][2]);let g=f;for(;f<o.length;){let w=o[f][0];if(w===":"||w==="space"||w==="comment")break;f++}s.prop=m(o,g,f);let b=f,y;for(;f<o.length&&(y=o[f],f++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);s.raws.between=m(o,b,f),(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let v=f;for(;f<o.length;){let w=o[f][0];if(w!=="space"&&w!=="comment")break;f++}let E=o.slice(v,f);o=o.slice(f),this.precheckMissedSemicolon(o);for(let w=o.length-1;w>=0;w--){if(y=o[w],y[1].toLowerCase()==="!important"){s.important=!0;let C=this.stringFrom(o,w);C=this.spacesFromEnd(o)+C,C!==" !important"&&(s.raws.important=C);break}else if(y[1].toLowerCase()==="important"){let C=o.slice(0),M="";for(let R=w;R>0;R--){let x=C[R][0];if(M.trim().startsWith("!")&&x!=="space")break;M=C.pop()[1]+M}M.trim().startsWith("!")&&(s.important=!0,s.raws.important=M,o=C)}if(y[0]!=="space"&&y[0]!=="comment")break}o.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(s.raws.between+=E.map(w=>w[1]).join(""),E=[]),this.raw(s,"value",E.concat(o),n),s.value.includes(":")&&!n&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let n=new a;this.init(n,o[2]),n.selector="",n.raws.between="",this.current=n}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(o[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(o){let n=this.input.fromOffset(o);return{column:n.col,line:n.line,offset:o}}init(o,n){this.current.push(o),o.source={input:this.input,start:this.getPosition(n)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let n=!1,s=null,l=!1,f=null,g=[],b=o[1].startsWith("--"),y=[],v=o;for(;v;){if(s=v[0],y.push(v),s==="("||s==="[")f||(f=v),g.push(s==="("?")":"]");else if(b&&l&&s==="{")f||(f=v),g.push("}");else if(g.length===0)if(s===";")if(l){this.decl(y,b);return}else break;else if(s==="{"){this.rule(y);return}else if(s==="}"){this.tokenizer.back(y.pop()),n=!0;break}else s===":"&&(l=!0);else s===g[g.length-1]&&(g.pop(),g.length===0&&(f=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),g.length>0&&this.unclosedBracket(f),n&&l){if(!b)for(;y.length&&(v=y[y.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,b)}else this.unknownWord(y)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,n,s,l){let f,g,b=s.length,y="",v=!0,E,S;for(let w=0;w<b;w+=1)f=s[w],g=f[0],g==="space"&&w===b-1&&!l?v=!1:g==="comment"?(S=s[w-1]?s[w-1][0]:"empty",E=s[w+1]?s[w+1][0]:"empty",!c[S]&&!c[E]?y.slice(-1)===","?v=!1:y+=f[1]:v=!1):y+=f[1];if(!v){let w=s.reduce((C,M)=>C+M[1],"");o.raws[n]={raw:w,value:y}}o[n]=y}rule(o){o.pop();let n=new a;this.init(n,o[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(n,"selector",o),this.current=n}spacesAndCommentsFromEnd(o){let n,s="";for(;o.length&&(n=o[o.length-1][0],!(n!=="space"&&n!=="comment"));)s=o.pop()[1]+s;return s}spacesAndCommentsFromStart(o){let n,s="";for(;o.length&&(n=o[0][0],!(n!=="space"&&n!=="comment"));)s+=o.shift()[1];return s}spacesFromEnd(o){let n,s="";for(;o.length&&(n=o[o.length-1][0],n==="space");)s=o.pop()[1]+s;return s}stringFrom(o,n){let s="";for(let l=n;l<o.length;l++)s+=o[l][1];return o.splice(n,o.length-n),s}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}}return Ir=d,Ir}var Or,zi;function Ps(){if(zi)return Or;zi=1;let e=We(),t=Xt(),r=Dl();function i(a,u){let c=new t(a,u),h=new r(c);try{h.parse()}catch(m){throw m}return h.root}return Or=i,i.default=i,e.registerParse(i),Or}var Nr,Vi;function Co(){if(Vi)return Nr;Vi=1;let e=We(),{my:t}=Gt();class r{constructor(a,u={}){if(this.type="warning",this.text=a,u.node&&u.node.source){u.node[t]||e.rebuild(u.node);let c=u.node.rangeBy(u);this.line=c.start.line,this.column=c.start.column,this.endLine=c.end.line,this.endColumn=c.end.column}for(let c in u)this[c]=u[c]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Nr=r,r.default=r,Nr}var Tr,ji;function Ls(){if(ji)return Tr;ji=1;let e=Co();class t{get content(){return this.css}constructor(i,a,u){this.processor=i,this.messages=[],this.root=a,this.opts=u,this.css="",this.map=void 0}toString(){return this.css}warn(i,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let u=new e(i,a);return this.messages.push(u),u}warnings(){return this.messages.filter(i=>i.type==="warning")}}return Tr=t,t.default=t,Tr}var Dr,qi;function Eo(){if(qi)return Dr;qi=1;let e={};return Dr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Dr}var Ar,Gi;function xo(){if(Gi)return Ar;Gi=1;let e=We(),t=_s(),r=So(),i=Ps(),a=Ls(),u=ht(),c=qt(),{isClean:h,my:m}=Gt(),d=Eo();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},n={Once:!0,postcssPlugin:!0,prepare:!0},s=0;function l(E){return typeof E=="object"&&typeof E.then=="function"}function f(E){let S=!1,w=p[E.type];return E.type==="decl"?S=E.prop.toLowerCase():E.type==="atrule"&&(S=E.name.toLowerCase()),S&&E.append?[w,w+"-"+S,s,w+"Exit",w+"Exit-"+S]:S?[w,w+"-"+S,w+"Exit",w+"Exit-"+S]:E.append?[w,s,w+"Exit"]:[w,w+"Exit"]}function g(E){let S;return E.type==="document"?S=["Document",s,"DocumentExit"]:E.type==="root"?S=["Root",s,"RootExit"]:S=f(E),{eventIndex:0,events:S,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){let S=[E];for(;S.length>0;){let w=S.pop();if(w[h]=!1,w.nodes)for(let C of w.nodes)S.push(C)}return E}let y={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,w,C){this.stringified=!1,this.processed=!1;let M;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))M=b(w);else if(w instanceof v||w instanceof a)M=b(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let R=i;C.syntax&&(R=C.syntax.parse),C.parser&&(R=C.parser),R.parse&&(R=R.parse);try{M=R(w,C)}catch(x){this.processed=!0,this.error=x}M&&!M[m]&&e.rebuild(M)}this.result=new a(S,M,C),this.helpers=de(B({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(R=>typeof R=="object"&&R.prepare?B(B({},R),R.prepare(this.result)):R)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,w){let C=this.result.lastPlugin;try{w&&w.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin?(S.plugin=C.postcssPlugin,S.setMessage()):C.postcssVersion}catch(M){console&&console.error&&console.error(M)}return S}prepareVisitors(){this.listeners={};let S=(w,C,M)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,M])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!o[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!n[C])if(typeof w[C]=="object")for(let M in w[C])M==="*"?S(w,C,w[C][M]):S(w,C+"-"+M.toLowerCase(),w[C][M]);else typeof w[C]=="function"&&S(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let w=this.plugins[S],C=this.runOnRoot(w);if(l(C))try{await C}catch(M){throw this.handleError(M)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[h];){S[h]=!0;let w=[g(S)];for(;w.length>0;){let C=this.visitTick(w);if(l(C))try{await C}catch(M){let R=w[w.length-1].node;throw this.handleError(M,R)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(S.type==="document"){let M=S.nodes.map(R=>C(R,this.helpers));await Promise.all(M)}else await C(S,this.helpers)}catch(M){throw this.handleError(M)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>S.Once(C,this.helpers));return l(w[0])?Promise.all(w):w}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,w=c;S.syntax&&(w=S.syntax.stringify),S.stringifier&&(w=S.stringifier),w.stringify&&(w=w.stringify);let C=this.result.root.source;if(S.map===void 0&&!(C&&C.input&&C.input.map)){let x="";return w(this.result.root,D=>{x+=D}),this.result.css=x,this.result}let R=new r(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let w=this.runOnRoot(S);if(l(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[h];)S[h]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let w of S.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,w){return this.async().then(S,w)}toString(){return this.css}visitSync(S,w){for(let[C,M]of S){this.result.lastPlugin=C;let R;try{R=M(w,this.helpers)}catch(x){throw this.handleError(x,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(l(R))throw this.getAsyncError()}}visitTick(S){let w=S[S.length-1],{node:C,visitors:M}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){S.pop();return}if(M.length>0&&w.visitorIndex<M.length){let[x,D]=M[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===M.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=x;try{return D(C.toProxy(),this.helpers)}catch(T){throw this.handleError(T,C)}}if(w.iterator!==0){let x=w.iterator;w.descending&&(w.descending=!1,C.indexes[x]+=1);let D;for(;D=C.nodes[C.indexes[x]];){if(!D[h]){D[h]=!0,w.descending=!0,S.push(g(D));return}C.indexes[x]+=1}w.iterator=0,delete C.indexes[x]}let R=w.events;for(;w.eventIndex<R.length;){let x=R[w.eventIndex];if(w.eventIndex+=1,x===s){C.nodes&&C.nodes.length&&(C[h]=!0,w.iterator=C.getIterator());return}else if(this.listeners[x]){w.visitors=this.listeners[x];return}}S.pop()}walkSync(S){S[h]=!0;let w=[{eventIndex:0,events:f(S),iterator:0,node:S}];for(;w.length>0;){let C=w[w.length-1],M=C.node;if(C.iterator!==0){let R=C.iterator;C.descending&&(C.descending=!1,M.indexes[R]+=1);let x,D=!1;for(;x=M.nodes[M.indexes[R]];){if(!x[h]){x[h]=!0,C.descending=!0,w.push({eventIndex:0,events:f(x),iterator:0,node:x}),D=!0;break}M.indexes[R]+=1}if(D)continue;C.iterator=0,delete M.indexes[R]}if(C.eventIndex<C.events.length){let R=C.events[C.eventIndex];if(C.eventIndex+=1,R===s)M.nodes&&M.nodes.length&&(C.iterator=M.getIterator());else{let x=this.listeners[R];x&&this.visitSync(x,M.toProxy())&&w.pop()}continue}w.pop()}}warnings(){return this.sync().warnings()}}return v.registerPostcss=E=>{y=E},Ar=v,v.default=v,u.registerLazyResult(v),t.registerLazyResult(v),Ar}var _r,Hi;function Al(){if(Hi)return _r;Hi=1;let e=So(),t=Ps(),r=Ls(),i=qt(),a=Eo();class u{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let h,m=t;try{h=m(this._css,this._opts)}catch(d){this.error=d}if(this.error)throw this.error;return this._root=h,h}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(h,m,d){m=m.toString(),this.stringified=!1,this._processor=h,this._css=m,this._opts=d,this._map=void 0;let p=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=m;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(p,void 0,this._opts,m);if(n.isMap()){let[s,l]=n.generate();s&&(this.result.css=s),l&&(this.result.map=l)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(h){return this.async().catch(h)}finally(h){return this.async().then(h,h)}sync(){if(this.error)throw this.error;return this.result}then(h,m){return this.async().then(h,m)}toString(){return this._css}warnings(){return[]}}return _r=u,u.default=u,_r}var kr,Yi;function _l(){if(Yi)return kr;Yi=1;let e=_s(),t=xo(),r=Al(),i=ht();class a{constructor(c=[]){this.version="8.5.25",this.plugins=this.normalize(c)}normalize(c){let h=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))h=h.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)h.push(m);else if(typeof m=="function")h.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return h}process(c,h={}){return!this.plugins.length&&!h.parser&&!h.stringifier&&!h.syntax?new r(this,c,h):new t(this,c,h)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return kr=a,a.default=a,i.registerProcessor(a),e.registerProcessor(a),kr}var Pr,Ji;function kl(){if(Ji)return Pr;Ji=1;let e=As(),t=Yt(),r=We(),i=Ds(),a=Jt(),u=_s(),c=Nl(),h=Xt(),m=xo(),d=bo(),p=Ht(),o=Ps(),n=_l(),s=Ls(),l=ht(),f=ks(),g=qt(),b=Co();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new n(v)}return y.plugin=function(E,S){let w=!1;function C(...R){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
30
30
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
31
|
-
https://www.w3ctech.com/topic/2226`));let x=S(...R);return x.postcssPlugin=E,x.postcssVersion=new n().version,x}let M;return Object.defineProperty(C,"postcss",{get(){return M||(M=C()),M}}),C.process=function(R,x,D){return y([C(D)]).process(R,x)},C},y.stringify=g,y.parse=o,y.fromJSON=c,y.list=d,y.comment=v=>new t(v),y.atRule=v=>new e(v),y.decl=v=>new a(v),y.rule=v=>new h(v),y.root=v=>new l(v),y.document=v=>new u(v),y.CssSyntaxError=s,y.Declaration=a,y.Container=r,y.Processor=n,y.Document=u,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=i,y.Input=f,y.Rule=h,y.Root=l,y.Node=p,m.registerPostcss(y),_r=y,y.default=y,_r}var _l=Al();const Q=Sl(_l);Q.stringify;Q.fromJSON;Q.plugin;Q.parse;Q.list;Q.document;Q.comment;Q.atRule;Q.rule;Q.decl;Q.root;Q.CssSyntaxError;Q.Declaration;Q.Container;Q.Processor;Q.Document;Q.Comment;Q.Warning;Q.AtRule;Q.Result;Q.Input;Q.Rule;Q.Root;Q.Node;const Ys={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function kl(e){const t=String(e.tagName).toLowerCase();let r=Ys[t]?Ys[t]:e.tagName;return t==="link"&&e.attributes._cssText&&(r="style"),r}function Jt(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Q([vl,bl]).process(e).css}catch(a){console.warn("Failed to adapt css for replay",a)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Js(){return{stylesWithHoverClass:new Map}}const Pl="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",Xs="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",Co=new WeakSet;function Ll(e){if(!e||e.tagName!=="IFRAME"||!("sandbox"in e))return!1;const t=Array.from(e.sandbox);return t.length===1&&t[0]==="allow-same-origin"}function Fl(e){if(e.UNSAFE_allowUnprotectedRebuild)return;const t=e.doc.defaultView;if(t&&!(Co.has(e.doc)&&Ll(t.frameElement)))throw new Error(Pl)}function Bl(e,t,r,s){const a=[];for(const m of e.childNodes)m.type===U.Text&&a.push(m);const u=t.split("/* rr_split */");for(;u.length>1&&u.length>a.length;)u.splice(-2,2,u.slice(-2).join(""));let c="";r&&(c=Jt(u.join(""),s));let f=0;for(let m=0;m<a.length&&m!==u.length;m++){const d=a[m];if(!r)d.textContent=u[m];else if(m<u.length-1){let p=f,o=u[m+1].length;o=Math.min(o,30);let n=!1;for(;o>2;o--){const i=u[m+1].substring(0,o),l=c.substring(f).indexOf(i);if(n=l!==-1,n){p+=l;break}}n||(p+=u[m].length),d.textContent=c.substring(f,p),f=p}else d.textContent=c.substring(f)}}function Ul(e,t,r,s){const{doc:a,hackCss:u,cache:c}=s;e.childNodes.length?Bl(e,r,u,c):(u&&(r=Jt(r,c)),t.appendChild(a.createTextNode(r)))}function Wl(e,t){var r;const{doc:s,hackCss:a,cache:u}=t;switch(e.type){case U.Document:return s.implementation.createDocument(null,"",null);case U.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case U.Element:{const c=kl(e);let f;e.isSVG?f=s.createElementNS("http://www.w3.org/2000/svg",c):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),f=s.createElement(c));const m={};for(const d in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,d))continue;let p=e.attributes[d];if(!(c==="option"&&d==="selected"&&p===!1)&&p!==null){if(p===!0&&(p=""),d.startsWith("rr_")){m[d]=p;continue}if(typeof p=="string"){if(c==="style"&&d==="_cssText"){Ul(e,f,p,t);continue}else if(c==="textarea"&&d==="value"){f.appendChild(s.createTextNode(p));try{e.childNodes=[]}catch(o){console.warn(`Highlight failed to set rrweb text area child nodes ${String(o)}`)}continue}}try{if(e.isSVG&&d==="xlink:href")f.setAttributeNS("http://www.w3.org/1999/xlink",d,p.toString());else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")f.setAttribute("_"+d,p.toString());else if(c==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content"){f.setAttribute("csp-content",p.toString());continue}else c==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||c==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Mi(e.attributes.href)==="js"||(c==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?f.setAttribute("rrweb-original-srcset",e.attributes.srcset):f.setAttribute(d,p.toString()))}catch(o){}}}for(const d in m){const p=m[d];if(c==="canvas"&&d==="rr_dataURL"){const o=s.createElement("img");o.src=p.toString();const n=f.getContext("2d");n&&(to(n),n.drawImage(o,0,0)),f.RRNodeType&&(f.rr_dataURL=p.toString())}else if(c==="img"&&d==="rr_dataURL"){const o=f;o.currentSrc.startsWith("data:")||(o.setAttribute("rrweb-original-src",e.attributes.src),o.src=p.toString())}if(d==="rr_width")f.style.setProperty("width",p.toString());else if(d==="rr_height")f.style.setProperty("height",p.toString());else if(d==="rr_mediaCurrentTime"&&typeof p=="number")f.currentTime=p;else if(d==="rr_mediaState")switch(p){case"played":f.play().catch(o=>console.warn("media playback error",o));break;case"paused":f.pause();break}else d==="rr_mediaPlaybackRate"&&typeof p=="number"?f.playbackRate=p:d==="rr_mediaMuted"&&typeof p=="boolean"?f.muted=p:d==="rr_mediaLoop"&&typeof p=="boolean"?f.loop=p:d==="rr_mediaVolume"&&typeof p=="number"?f.volume=p:d==="rr_open_mode"&&f.setAttribute("rr_open_mode",p)}if(e.isShadowHost)if(!f.shadowRoot)f.attachShadow({mode:"open"});else for(;f.shadowRoot.firstChild;)f.shadowRoot.removeChild(f.shadowRoot.firstChild);return f}case U.Text:return e.isStyle&&a?s.createTextNode(Jt(e.textContent,u)):s.createTextNode(e.textContent);case U.CDATA:return s.createCDATASection(e.textContent);case U.Comment:return s.createComment(e.textContent);default:return null}}function nt(e,t){const{doc:r,mirror:s,skipChild:a=!1,hackCss:u=!0,afterAppend:c,cache:f,cspContent:m}=t;if(s.has(e.id)){const p=s.getNode(e.id),o=s.getMeta(p);if($a(o,e))return s.getNode(e.id)}let d=Wl(e,{doc:r,hackCss:u,cache:f});if(!d)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===U.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==U.DocumentType&&(e.childNodes[0].type===U.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=r),s.add(d,e),(e.type===U.Document||e.type===U.Element)&&!a)for(const p of e.childNodes){const o=nt(p,{doc:r,mirror:s,skipChild:!1,hackCss:u,afterAppend:c,cache:f});if(!o){console.warn("Failed to rebuild",p);continue}if(p.isShadow&&xi(d)&&d.shadowRoot)d.shadowRoot.appendChild(o);else if(e.type===U.Document&&p.type==U.Element){const n=o;m&&jl(n,m,r);let i=null;n.childNodes.forEach(l=>{l.nodeName==="BODY"&&(i=l)}),i?(n.removeChild(i),d.appendChild(o),n.appendChild(i)):d.appendChild(o)}else d.appendChild(o);c&&c(o,p.id)}return d}function $l(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function zl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==U.Element)return;const s=e;for(const a in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,a)&&a.startsWith("rr_")))continue;const u=r.attributes[a];a==="rr_scrollLeft"&&(s.scrollLeft=u),a==="rr_scrollTop"&&(s.scrollTop=u)}}function jl(e,t,r){let s=e.querySelector("head");s||(s=r.createElement("head"),e.insertBefore(s,e.firstChild));const a=r.createElement("meta");a.setAttribute("http-equiv","Content-Security-Policy"),a.setAttribute("content",t),s.insertBefore(a,s.firstChild)}function Vl(e,t){Fl(t);const{doc:r,onVisit:s,hackCss:a=!0,afterAppend:u,cache:c,mirror:f=new Ri,cspContent:m}=t,d=nt(e,{doc:r,mirror:f,skipChild:!1,hackCss:a,afterAppend:u,cache:c,cspContent:m});return $l(f,p=>{s&&s(p),zl(p,f)}),d}function ql(e){var t;if(!e.root.isConnected)throw new Error(Xs);const r=e.root.ownerDocument.createElement("iframe");for(const[a,u]of Object.entries(e.iframeAttributes||{}))a!=="sandbox"&&r.setAttribute(a,u);r.setAttribute("sandbox","allow-same-origin"),e.root.appendChild(r);const s=r.contentDocument;if(!s||!r.contentWindow)throw(t=r.parentNode)==null||t.removeChild(r),new Error(Xs);return Co.add(s),r}var Gl=Object.defineProperty,Hl=(e,t,r)=>t in e?Gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>Hl(e,typeof t!="symbol"?t+"":t,r),Yl=Object.defineProperty,Jl=(e,t,r)=>t in e?Yl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qs=(e,t,r)=>Jl(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();let Xl=class{constructor(){Qs(this,"idNodeMap",new Map),Qs(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const a=this.nodeMetaMap.get(s);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ql(){return new Xl}function Zl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Kl(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 a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}),r}var St={exports:{}},Zs;function eu(){if(Zs)return St.exports;Zs=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 St.exports=t(),St.exports.createColors=t,St.exports}const tu={},ru=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),ve=Kl(ru);var kr,Ks;function Pi(){if(Ks)return kr;Ks=1;let e=eu(),t=ve;class r extends Error{constructor(a,u,c,f,m,d){super(a),this.name="CssSyntaxError",this.reason=a,m&&(this.file=m),f&&(this.source=f),d&&(this.plugin=d),typeof u!="undefined"&&typeof c!="undefined"&&(typeof u=="number"?(this.line=u,this.column=c):(this.line=u.line,this.column=u.column,this.endLine=c.line,this.endColumn=c.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(a){if(!this.source)return"";let u=this.source;a==null&&(a=e.isColorSupported);let c=i=>i,f=i=>i,m=i=>i;if(a){let{bold:i,gray:l,red:h}=e.createColors(!0);f=g=>i(h(g)),c=g=>l(g),t&&(m=g=>t(g))}let d=u.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,d.length),n=String(o).length;return d.slice(p,o).map((i,l)=>{let h=p+1+l,g=" "+(" "+h).slice(-n)+" | ";if(h===this.line){if(i.length>160){let y=20,v=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),S=i.slice(v,E),w=c(g.replace(/\d/g," "))+i.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return f(">")+c(g)+m(S)+`
|
|
32
|
-
`+w+
|
|
33
|
-
`+b+
|
|
31
|
+
https://www.w3ctech.com/topic/2226`));let x=S(...R);return x.postcssPlugin=E,x.postcssVersion=new n().version,x}let M;return Object.defineProperty(C,"postcss",{get(){return M||(M=C()),M}}),C.process=function(R,x,D){return y([C(D)]).process(R,x)},C},y.stringify=g,y.parse=o,y.fromJSON=c,y.list=d,y.comment=v=>new t(v),y.atRule=v=>new e(v),y.decl=v=>new a(v),y.rule=v=>new f(v),y.root=v=>new l(v),y.document=v=>new u(v),y.CssSyntaxError=i,y.Declaration=a,y.Container=r,y.Processor=n,y.Document=u,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=s,y.Input=h,y.Rule=f,y.Root=l,y.Node=p,m.registerPostcss(y),Pr=y,y.default=y,Pr}var Pl=kl();const ae=El(Pl);ae.stringify;ae.fromJSON;ae.plugin;ae.parse;ae.list;ae.document;ae.comment;ae.atRule;ae.rule;ae.decl;ae.root;ae.CssSyntaxError;ae.Declaration;ae.Container;ae.Processor;ae.Document;ae.Comment;ae.Warning;ae.AtRule;ae.Result;ae.Input;ae.Rule;ae.Root;ae.Node;const Xi={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Ll(e){const t=String(e.tagName).toLowerCase();let r=Xi[t]?Xi[t]:e.tagName;return t==="link"&&e.attributes._cssText&&(r="style"),r}function Qt(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let i=e;try{i=ae([Sl,Cl]).process(e).css}catch(a){console.warn("Failed to adapt css for replay",a)}return t==null||t.stylesWithHoverClass.set(e,i),i}function Qi(){return{stylesWithHoverClass:new Map}}const Fl="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",Zi="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",Ro=new WeakSet;function Bl(e){if(!e||e.tagName!=="IFRAME"||!("sandbox"in e))return!1;const t=Array.from(e.sandbox);return t.length===1&&t[0]==="allow-same-origin"}function Ul(e){if(e.UNSAFE_allowUnprotectedRebuild)return;const t=e.doc.defaultView;if(t&&!(Ro.has(e.doc)&&Bl(t.frameElement)))throw new Error(Fl)}function Wl(e,t,r,i){const a=[];for(const m of e.childNodes)m.type===q.Text&&a.push(m);const u=t.split("/* rr_split */");for(;u.length>1&&u.length>a.length;)u.splice(-2,2,u.slice(-2).join(""));let c="";r&&(c=Qt(u.join(""),i));let h=0;for(let m=0;m<a.length&&m!==u.length;m++){const d=a[m];if(!r)d.textContent=u[m];else if(m<u.length-1){let p=h,o=u[m+1].length;o=Math.min(o,30);let n=!1;for(;o>2;o--){const s=u[m+1].substring(0,o),l=c.substring(h).indexOf(s);if(n=l!==-1,n){p+=l;break}}n||(p+=u[m].length),d.textContent=c.substring(h,p),h=p}else d.textContent=c.substring(h)}}function $l(e,t,r,i){const{doc:a,hackCss:u,cache:c}=i;e.childNodes.length?Wl(e,r,u,c):(u&&(r=Qt(r,c)),t.appendChild(a.createTextNode(r)))}function zl(e,t){var r;const{doc:i,hackCss:a,cache:u}=t;switch(e.type){case q.Document:return i.implementation.createDocument(null,"",null);case q.DocumentType:return i.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case q.Element:{const c=Ll(e);let h;e.isSVG?h=i.createElementNS("http://www.w3.org/2000/svg",c):(e.isCustom&&((r=i.defaultView)!=null&&r.customElements)&&!i.defaultView.customElements.get(e.tagName)&&i.defaultView.customElements.define(e.tagName,class extends i.defaultView.HTMLElement{}),h=i.createElement(c));const m={};for(const d in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,d))continue;let p=e.attributes[d];if(!(c==="option"&&d==="selected"&&p===!1)&&p!==null){if(p===!0&&(p=""),d.startsWith("rr_")){m[d]=p;continue}if(typeof p=="string"){if(c==="style"&&d==="_cssText"){$l(e,h,p,t);continue}else if(c==="textarea"&&d==="value"){h.appendChild(i.createTextNode(p));try{e.childNodes=[]}catch(o){console.warn(`Highlight failed to set rrweb text area child nodes ${String(o)}`)}continue}}try{if(e.isSVG&&d==="xlink:href")h.setAttributeNS("http://www.w3.org/1999/xlink",d,p.toString());else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")h.setAttribute("_"+d,p.toString());else if(c==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content"){h.setAttribute("csp-content",p.toString());continue}else c==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||c==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Os(e.attributes.href)==="js"||(c==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?h.setAttribute("rrweb-original-srcset",e.attributes.srcset):h.setAttribute(d,p.toString()))}catch(o){}}}for(const d in m){const p=m[d];if(c==="canvas"&&d==="rr_dataURL"){const o=i.createElement("img");o.src=p.toString();const n=h.getContext("2d");n&&(so(n),n.drawImage(o,0,0)),h.RRNodeType&&(h.rr_dataURL=p.toString())}else if(c==="img"&&d==="rr_dataURL"){const o=h;o.currentSrc.startsWith("data:")||(o.setAttribute("rrweb-original-src",e.attributes.src),o.src=p.toString())}if(d==="rr_width")h.style.setProperty("width",p.toString());else if(d==="rr_height")h.style.setProperty("height",p.toString());else if(d==="rr_mediaCurrentTime"&&typeof p=="number")h.currentTime=p;else if(d==="rr_mediaState")switch(p){case"played":h.play().catch(o=>console.warn("media playback error",o));break;case"paused":h.pause();break}else d==="rr_mediaPlaybackRate"&&typeof p=="number"?h.playbackRate=p:d==="rr_mediaMuted"&&typeof p=="boolean"?h.muted=p:d==="rr_mediaLoop"&&typeof p=="boolean"?h.loop=p:d==="rr_mediaVolume"&&typeof p=="number"?h.volume=p:d==="rr_open_mode"&&h.setAttribute("rr_open_mode",p)}if(e.isShadowHost)if(!h.shadowRoot)h.attachShadow({mode:"open"});else for(;h.shadowRoot.firstChild;)h.shadowRoot.removeChild(h.shadowRoot.firstChild);return h}case q.Text:return e.isStyle&&a?i.createTextNode(Qt(e.textContent,u)):i.createTextNode(e.textContent);case q.CDATA:return i.createCDATASection(e.textContent);case q.Comment:return i.createComment(e.textContent);default:return null}}function at(e,t){const{doc:r,mirror:i,skipChild:a=!1,hackCss:u=!0,afterAppend:c,cache:h,cspContent:m}=t;if(i.has(e.id)){const p=i.getNode(e.id),o=i.getMeta(p);if(Va(o,e))return i.getNode(e.id)}let d=zl(e,{doc:r,hackCss:u,cache:h});if(!d)return null;if(e.rootId&&i.getNode(e.rootId)!==r&&i.replace(e.rootId,r),e.type===q.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==q.DocumentType&&(e.childNodes[0].type===q.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=r),i.add(d,e),(e.type===q.Document||e.type===q.Element)&&!a)for(const p of e.childNodes){const o=at(p,{doc:r,mirror:i,skipChild:!1,hackCss:u,afterAppend:c,cache:h});if(!o){console.warn("Failed to rebuild",p);continue}if(p.isShadow&&Ms(d)&&d.shadowRoot)d.shadowRoot.appendChild(o);else if(e.type===q.Document&&p.type==q.Element){const n=o;m&&ql(n,m,r);let s=null;n.childNodes.forEach(l=>{l.nodeName==="BODY"&&(s=l)}),s?(n.removeChild(s),d.appendChild(o),n.appendChild(s)):d.appendChild(o)}else d.appendChild(o);c&&c(o,p.id)}return d}function Vl(e,t){function r(i){t(i)}for(const i of e.getIds())e.has(i)&&r(e.getNode(i))}function jl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==q.Element)return;const i=e;for(const a in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,a)&&a.startsWith("rr_")))continue;const u=r.attributes[a];a==="rr_scrollLeft"&&(i.scrollLeft=u),a==="rr_scrollTop"&&(i.scrollTop=u)}}function ql(e,t,r){let i=e.querySelector("head");i||(i=r.createElement("head"),e.insertBefore(i,e.firstChild));const a=r.createElement("meta");a.setAttribute("http-equiv","Content-Security-Policy"),a.setAttribute("content",t),i.insertBefore(a,i.firstChild)}function Gl(e,t){Ul(t);const{doc:r,onVisit:i,hackCss:a=!0,afterAppend:u,cache:c,mirror:h=new Is,cspContent:m}=t,d=at(e,{doc:r,mirror:h,skipChild:!1,hackCss:a,afterAppend:u,cache:c,cspContent:m});return Vl(h,p=>{i&&i(p),jl(p,h)}),d}function Hl(e){var t;if(!e.root.isConnected)throw new Error(Zi);const r=e.root.ownerDocument.createElement("iframe");for(const[a,u]of Object.entries(e.iframeAttributes||{}))a!=="sandbox"&&r.setAttribute(a,u);r.setAttribute("sandbox","allow-same-origin"),e.root.appendChild(r);const i=r.contentDocument;if(!i||!r.contentWindow)throw(t=r.parentNode)==null||t.removeChild(r),new Error(Zi);return Ro.add(i),r}var Yl=Object.defineProperty,Jl=(e,t,r)=>t in e?Yl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>Jl(e,typeof t!="symbol"?t+"":t,r),Xl=Object.defineProperty,Ql=(e,t,r)=>t in e?Xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ki=(e,t,r)=>Ql(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();let Zl=class{constructor(){Ki(this,"idNodeMap",new Map),Ki(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const i=(r=this.getMeta(t))==null?void 0:r.id;return i!=null?i:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const a=this.nodeMetaMap.get(i);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Kl(){return new Zl}function eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tu(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?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(i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}),r}var Et={exports:{}},en;function ru(){if(en)return Et.exports;en=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 Et.exports=t(),Et.exports.createColors=t,Et.exports}const su={},iu=Object.freeze(Object.defineProperty({__proto__:null,default:su},Symbol.toStringTag,{value:"Module"})),Re=tu(iu);var Lr,tn;function Fs(){if(tn)return Lr;tn=1;let e=ru(),t=Re;class r extends Error{constructor(a,u,c,h,m,d){super(a),this.name="CssSyntaxError",this.reason=a,m&&(this.file=m),h&&(this.source=h),d&&(this.plugin=d),typeof u!="undefined"&&typeof c!="undefined"&&(typeof u=="number"?(this.line=u,this.column=c):(this.line=u.line,this.column=u.column,this.endLine=c.line,this.endColumn=c.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(a){if(!this.source)return"";let u=this.source;a==null&&(a=e.isColorSupported);let c=s=>s,h=s=>s,m=s=>s;if(a){let{bold:s,gray:l,red:f}=e.createColors(!0);h=g=>s(f(g)),c=g=>l(g),t&&(m=g=>t(g))}let d=u.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,d.length),n=String(o).length;return d.slice(p,o).map((s,l)=>{let f=p+1+l,g=" "+(" "+f).slice(-n)+" | ";if(f===this.line){if(s.length>160){let y=20,v=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),S=s.slice(v,E),w=c(g.replace(/\d/g," "))+s.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return h(">")+c(g)+m(S)+`
|
|
32
|
+
`+w+h("^")}let b=c(g.replace(/\d/g," "))+s.slice(0,this.column-1).replace(/[^\t]/g," ");return h(">")+c(g)+m(s)+`
|
|
33
|
+
`+b+h("^")}return" "+c(g)+m(s)}).join(`
|
|
34
34
|
`)}toString(){let a=this.showSourceCode();return a&&(a=`
|
|
35
35
|
|
|
36
36
|
`+a+`
|
|
37
|
-
`),this.name+": "+this.message+a}}return
|
|
37
|
+
`),this.name+": "+this.message+a}}return Lr=r,r.default=r,Lr}var Fr,rn;function Mo(){if(rn)return Fr;rn=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(p){return typeof p!="string"||!p.includes("<")?p:p.replace(e,"\\3c $2").replace(t,"\\3c $2")}const a={after:`
|
|
38
38
|
`,beforeClose:`
|
|
39
39
|
`,beforeComment:`
|
|
40
40
|
`,beforeDecl:`
|
|
41
41
|
`,beforeOpen:" ",beforeRule:`
|
|
42
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function u(p){return p[0].toUpperCase()+p.slice(1)}function c(p,o){let n="@"+o.name,
|
|
43
|
-
`)){let g=this.raw(o,null,"indent");if(g.length)for(let b=0;b<
|
|
44
|
-
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(o,n){let
|
|
45
|
-
`)&&(
|
|
46
|
-
`)&&(
|
|
47
|
-
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(o){let n;return o.walkDecls(
|
|
48
|
-
`);return n=
|
|
49
|
-
`?(p=1,o+=1):p+=1}return n}class
|
|
50
|
-
`?(p=1,o+=1):p+=1;return{column:p,line:o,offset:l}}prev(){if(!this.parent)return;let d=this.parent.index(this);return this.parent.nodes[d-1]}rangeBy(d={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:c(p,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:c(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(d.word){let l=p.slice(c(p,this.source.start),c(p,this.source.end)).indexOf(d.word);l!==-1&&(o=this.positionInside(l),n=this.positionInside(l+d.word.length))}else d.start?o={column:d.start.column,line:d.start.line,offset:c(p,d.start)}:typeof d.index=="number"&&(o=this.positionInside(d.index)),d.end?n={column:d.end.column,line:d.end.line,offset:c(p,d.end)}:typeof d.endIndex=="number"?n=this.positionInside(d.endIndex):typeof d.index=="number"&&(n=this.positionInside(d.index+1));return(n.line<o.line||n.line===o.line&&n.column<=o.column)&&(n={column:o.column+1,line:o.line,offset:o.offset+1}),{end:n,start:o}}raw(d,p){return new t().raw(this,d,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...d){if(this.parent){let p=this,o=!1;for(let n of d)n===this?o=!0:o?(this.parent.insertAfter(p,n),p=n):this.parent.insertBefore(p,n);o||this.remove()}return this}root(){let d=this;for(;d.parent&&d.parent.type!=="document";)d=d.parent;return d}toJSON(d,p){let o=p==null;p=p||new Map;let n=[],i=[[this,n,0]];for(let h=0;h<i.length;h++){let[g,b,y]=i[h],v={};b[y]=v;for(let E in g){if(!Object.prototype.hasOwnProperty.call(g,E)||E==="parent"||E==="proxyCache")continue;let S=g[E];if(Array.isArray(S)){let w=[];v[E]=w;for(let C=0;C<S.length;C++){let M=S[C];typeof M=="object"&&M.toJSON?M.toJSON===f.prototype.toJSON?i.push([M,w,C]):w[C]=M.toJSON(null,p):w[C]=M}}else if(typeof S=="object"&&S.toJSON)S.toJSON===f.prototype.toJSON?i.push([S,v,E]):v[E]=S.toJSON(null,p);else if(E==="source"){if(S==null)continue;let w=p.get(S.input);w==null&&(w=p.size,p.set(S.input,w)),v[E]={end:S.end,inputId:w,start:S.start}}else v[E]=S}}let l=n[0];return o&&(l.inputs=[...p.keys()].map(h=>h.toJSON())),l}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(d=r){d.stringify&&(d=d.stringify);let p="";return d(this,o=>{p+=o}),p}warn(d,p,o={}){let n={node:this};for(let i in o)n[i]=o[i];return d.warn(p,n)}}return Fr=f,f.default=f,Fr}var Br,nn;function Kt(){if(nn)return Br;nn=1;let e=Zt();class t extends e{constructor(s){super(s),this.type="comment"}}return Br=t,t.default=t,Br}var Ur,on;function er(){if(on)return Ur;on=1;let e=Zt();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}}return Ur=t,t.default=t,Ur}var Wr,an;function Fe(){if(an)return Wr;an=1;let e=Kt(),t=er(),r=Zt(),{isClean:s,my:a}=Qt(),u,c,f,m;function d(n){let i=n.slice();for(;i.length>0;){let l=i.pop();if(delete l.source,l.nodes){l.nodes=l.nodes.slice();for(let h of l.nodes)i.push(h)}}return n.slice()}function p(n){let i=[n];for(;i.length>0;){let l=i.pop();if(l[s]=!1,l.proxyOf.nodes)for(let h of l.proxyOf.nodes)i.push(h)}}class o extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...i){for(let l of i){let h=this.normalize(l,this.last);for(let g of h)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(i){let l=[this];for(;l.length>0;){let h=l.pop();if(h!==this&&h.cleanRaws!==o.prototype.cleanRaws){h.cleanRaws(i);continue}if(r.prototype.cleanRaws.call(h,i),h.nodes)for(let g of h.nodes)l.push(g)}}each(i){if(!this.proxyOf.nodes)return;let l=this.getIterator(),h,g;for(;this.indexes[l]<this.proxyOf.nodes.length&&(h=this.indexes[l],g=i(this.proxyOf.nodes[h],h),g!==!1);)this.indexes[l]+=1;return delete this.indexes[l],g}every(i){return this.nodes.every(i)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let i=this.lastEach;return this.indexes[i]=0,i}getProxyProcessor(){return{get(i,l){return l==="proxyOf"?i:i[l]?l==="each"||typeof l=="string"&&l.startsWith("walk")?(...h)=>i[l](...h.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):l==="every"||l==="some"?h=>i[l]((g,...b)=>h(g.toProxy(),...b)):l==="root"?()=>i.root().toProxy():l==="nodes"?i.nodes.map(h=>h.toProxy()):l==="first"||l==="last"?i[l].toProxy():i[l]:i[l]},set(i,l,h){return i[l]===h||(i[l]=h,(l==="name"||l==="params"||l==="selector")&&i.markDirty()),!0}}}index(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))}insertAfter(i,l){let h=this.index(i),g=this.normalize(l,this.proxyOf.nodes[h]).reverse();h=this.index(i);for(let y of g)this.proxyOf.nodes.splice(h+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],h<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(i,l){let h=this.index(i),g=h===0?"prepend":!1,b=this.normalize(l,this.proxyOf.nodes[h],g).reverse();h=this.index(i);for(let v of b)this.proxyOf.nodes.splice(h,0,v);let y;for(let v in this.indexes)y=this.indexes[v],h<=y&&(this.indexes[v]=y+b.length);return this.markDirty(),this}normalize(i,l){if(typeof i=="string")i=d(c(i).nodes);else if(typeof i=="undefined")i=[];else if(Array.isArray(i)){i=i.slice(0);for(let g of i)g.parent&&g.parent.removeChild(g,"ignore")}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(let g of i)g.parent&&g.parent.removeChild(g,"ignore")}else if(i.type)i=[i];else if(i.prop){if(typeof i.value=="undefined")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new t(i)]}else if(i.selector||i.selectors)i=[new m(i)];else if(i.name)i=[new u(i)];else if(i.text)i=[new e(i)];else throw new Error("Unknown node type in node creation");return i.map(g=>(g[a]||o.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&p(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&l&&typeof l.raws.before!="undefined"&&(g.raws.before=l.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...i){i=i.reverse();for(let l of i){let h=this.normalize(l,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length}return this.markDirty(),this}push(i){return i.parent=this,this.proxyOf.nodes.push(i),this}removeAll(){for(let i of this.proxyOf.nodes)i.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);let l;for(let h in this.indexes)l=this.indexes[h],l>=i&&(this.indexes[h]=l-1);return this.markDirty(),this}replaceValues(i,l,h){return h||(h=l,l={}),this.walkDecls(g=>{l.props&&!l.props.includes(g.prop)||l.fast&&!g.value.includes(l.fast)||(g.value=g.value.replace(i,h))}),this.markDirty(),this}some(i){return this.nodes.some(i)}walk(i){if(!this.proxyOf.nodes)return;let l=[{iterator:this.getIterator(),node:this.proxyOf}];for(;l.length>0;){let{iterator:h,node:g}=l[l.length-1],b=g.indexes[h];if(b>=g.proxyOf.nodes.length){delete g.indexes[h],l.pop();let E=l[l.length-1];E&&(E.node.indexes[E.iterator]+=1);continue}let y=g.proxyOf.nodes[b],v;try{v=i(y,b)}catch(E){throw y.addToError(E)}if(v===!1){for(let E of l)delete E.node.indexes[E.iterator];return!1}y.walk&&y.proxyOf.nodes?l.push({iterator:y.getIterator(),node:y}):g.indexes[h]+=1}}walkAtRules(i,l){return l?i instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&i.test(h.name))return l(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===i)return l(h,g)}):(l=i,this.walk((h,g)=>{if(h.type==="atrule")return l(h,g)}))}walkComments(i){return this.walk((l,h)=>{if(l.type==="comment")return i(l,h)})}walkDecls(i,l){return l?i instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&i.test(h.prop))return l(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===i)return l(h,g)}):(l=i,this.walk((h,g)=>{if(h.type==="decl")return l(h,g)}))}walkRules(i,l){return l?i instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&i.test(h.selector))return l(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===i)return l(h,g)}):(l=i,this.walk((h,g)=>{if(h.type==="rule")return l(h,g)}))}}return o.registerParse=n=>{c=n},o.registerRule=n=>{m=n},o.registerAtRule=n=>{u=n},o.registerRoot=n=>{f=n},Wr=o,o.default=o,o.rebuild=n=>{let i=[n];for(;i.length>0;){let l=i.pop();if(l.type==="atrule"?Object.setPrototypeOf(l,u.prototype):l.type==="rule"?Object.setPrototypeOf(l,m.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,f.prototype),l[a]=!0,l.nodes)for(let h of l.nodes)i.push(h)}},Wr}var $r,ln;function Li(){if(ln)return $r;ln=1;let e=Fe();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return $r=t,t.default=t,e.registerAtRule(t),$r}var zr,un;function Fi(){if(un)return zr;un=1;let e=Fe(),t,r;class s extends e{constructor(u){super(L({type:"document"},u)),this.nodes||(this.nodes=[])}toResult(u={}){return new t(new r,this,u).stringify()}}return s.registerLazyResult=a=>{t=a},s.registerProcessor=a=>{r=a},zr=s,s.default=s,zr}var jr,cn;function iu(){if(cn)return jr;cn=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return jr={nanoid:(s=21)=>{let a="",u=s|0;for(;u-- >0;)a+=e[Math.random()*64|0];return a},customAlphabet:(s,a=21)=>(u=a)=>{let c="",f=u|0;for(;f-- >0;)c+=s[Math.random()*s.length|0];return c}},jr}var Vr,hn;function xo(){if(hn)return Vr;hn=1;let{existsSync:e,readFileSync:t}=ve,{dirname:r,isAbsolute:s,join:a,relative:u,sep:c}=ve,{SourceMapConsumer:f,SourceMapGenerator:m}=ve;function d(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class p{constructor(n,i){if(i.map===!1)return;i.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(n),this.inline=this.startWith(this.annotation,"data:");let l=i.map?i.map.prev:void 0,h=this.loadMap(i.from,l);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=r(this.mapFile)),h&&(this.text=h)}consumer(){return this.consumerCache||(this.consumerCache=new f(this.json||this.text)),this.consumerCache}decodeInline(n){let i=/^data:application\/json;charset=utf-?8;base64,/,l=/^data:application\/json;base64,/,h=/^data:application\/json;charset=utf-?8,/,g=/^data:application\/json,/,b=n.match(h)||n.match(g);if(b)return decodeURIComponent(n.substr(b[0].length));let y=n.match(i)||n.match(l);if(y)return d(n.substr(y[0].length));let v=n.slice(22);throw v=v.slice(0,v.indexOf(",")),new Error("Unsupported source map encoding "+v)}getAnnotationURL(n){return n.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(n){return typeof n!="object"?!1:typeof n.mappings=="string"||typeof n._mappings=="string"||Array.isArray(n.sections)}loadAnnotation(n){let i=n.match(/\/\*\s*# sourceMappingURL=/g);if(!i)return;let l=n.lastIndexOf(i.pop()),h=n.indexOf("*/",l);l>-1&&h>-1&&(this.annotation=this.getAnnotationURL(n.substring(l,h)))}loadFile(n,i,l){if(!l&&!this.unsafeMap){if(!/\.map$/i.test(n)||!i)return;let h=u(r(i),n);if(h===".."||h.startsWith(".."+c)||s(h))return}if(this.root=r(n),e(n))return this.mapFile=n,t(n,"utf-8").toString().trim()}loadMap(n,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let l=i(n);if(l){let h=this.loadFile(l,n,!0);if(!h)throw new Error("Unable to load previous source map: "+l.toString());return h}}else{if(i instanceof f)return m.fromSourceMap(i).toString();if(i instanceof m)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let l=this.annotation;n&&(l=a(r(n),l));let h=this.loadFile(l,n,!1);if(h)try{this.json=JSON.parse(h.replace(/^\)]}'[^\n]*\n/,""))}catch(g){return}return h}}}startWith(n,i){return n?n.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Vr=p,p.default=p,Vr}var qr,fn;function tr(){if(fn)return qr;fn=1;let{nanoid:e}=iu(),{isAbsolute:t,resolve:r}=ve,{SourceMapConsumer:s,SourceMapGenerator:a}=ve,{fileURLToPath:u,pathToFileURL:c}=ve,f=Pi(),m=xo(),d=ve,p=Symbol("lineToIndexCache"),o=!!(s&&a),n=!!(r&&t);function i(h){if(h[p])return h[p];let g=h.css.split(`
|
|
51
|
-
`),b=new Array(g.length),y=0;for(let v=0,E=g.length;v<E;v++)b[v]=y,y+=g[v].length+1;return
|
|
52
|
-
`," "];return e.split(t,r)},split(t,r,
|
|
42
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function u(p){return p[0].toUpperCase()+p.slice(1)}function c(p,o){let n="@"+o.name,s=o.params?p.rawValue(o,"params"):"",l=o.raws.afterName;return typeof l=="undefined"?l=s?" ":"":l===""&&s&&!r.test(s[0])&&(l=" "),n+l+s}function h(p,o,n){let s=n.nodes,l=s.length-1;for(;l>0&&s[l].type==="comment";)l-=1;let f=p.raw(n,"semicolon"),g=n.type==="document";for(let b=s.length-1;b>=0;b--){let y=s[b],v=l!==b||f;!v&&b<s.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&y.prop.startsWith("--"))&&(v=!0),o.push({document:g,node:y,semicolon:v})}}function m(p,o,n,s){let l=p.raw(n,"between","beforeOpen");p.builder(i(s+l)+"{",n,"start");let f=n.nodes&&n.nodes.length,g=()=>{let b=f?p.raw(n,"after"):p.raw(n,"after","emptyBody");b&&p.builder(i(b)),p.builder("}",n,"end"),n.type==="rule"&&n.raws.ownSemicolon&&p.builder(i(n.raws.ownSemicolon),n,"end")};f?(o.push(g),h(p,o,n)):g()}class d{constructor(o){this.builder=o}atrule(o,n){let s=c(this,o);if(o.nodes)this.block(o,s);else{let l=(o.raws.between||"")+(n?";":"");this.builder(i(s+l),o)}}beforeAfter(o,n){let s;o.type==="decl"?s=this.raw(o,null,"beforeDecl"):o.type==="comment"?s=this.raw(o,null,"beforeComment"):n==="before"?s=this.raw(o,null,"beforeRule"):s=this.raw(o,null,"beforeClose");let l=o.parent,f=0;for(;l&&l.type!=="root";)f+=1,l=l.parent;if(s.includes(`
|
|
43
|
+
`)){let g=this.raw(o,null,"indent");if(g.length)for(let b=0;b<f;b++)s+=g}return s}block(o,n){let s=this.raw(o,"between","beforeOpen");this.builder(i(n+s)+"{",o,"start");let l;o.nodes&&o.nodes.length?(this.body(o),l=this.raw(o,"after")):l=this.raw(o,"after","emptyBody"),l&&this.builder(i(l)),this.builder("}",o,"end")}body(o){let n=d.prototype,s=["atrule","block","body","rule","stringify"].every(f=>this[f]===n[f]),l=[];for(h(this,l,o);l.length>0;){let f=l.pop();if(typeof f=="function"){f();continue}let g=f.node,b=this.raw(g,"before");b&&this.builder(f.document?b:i(b)),s&&g.type==="rule"?m(this,l,g,this.rawValue(g,"selector")):s&&g.type==="atrule"&&g.nodes?m(this,l,g,c(this,g)):this.stringify(g,f.semicolon)}}comment(o){let n=this.raw(o,"left","commentLeft"),s=this.raw(o,"right","commentRight");this.builder(i("/*"+n+o.text+s+"*/"),o)}decl(o,n){let s=o.raws,l=this.raw(o,"between","colon"),f=o.prop+l+this.rawValue(o,"value");o.important&&(f+=s.important||" !important"),n&&(f+=";"),this.builder(i(f),o)}document(o){this.body(o)}raw(o,n,s){let l;if(s||(s=n),n&&(l=o.raws[n],typeof l!="undefined"))return l;let f=o.parent;if(s==="before"&&(!f||f.type==="root"&&f.first===o||f&&f.type==="document"))return"";if(!f)return a[s];let g=o.root(),b=g.rawCache||(g.rawCache={});if(typeof b[s]!="undefined")return b[s];if(s==="before"||s==="after")return this.beforeAfter(o,s);{let y="raw"+u(s);this[y]?l=this[y](g,o):g.walk(v=>{if(l=v.raws[n],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=a[s]),b[s]=l,l}rawBeforeClose(o){let n;return o.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after!="undefined")return n=s.raws.after,n.includes(`
|
|
44
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(o,n){let s;return o.walkComments(l=>{if(typeof l.raws.before!="undefined")return s=l.raws.before,s.includes(`
|
|
45
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(n,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(o,n){let s;return o.walkDecls(l=>{if(typeof l.raws.before!="undefined")return s=l.raws.before,s.includes(`
|
|
46
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(n,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(o){let n;return o.walk(s=>{if(s.type!=="decl"&&(n=s.raws.between,typeof n!="undefined"))return!1}),n}rawBeforeRule(o){let n;return o.walk(s=>{if(s.nodes&&(s.parent!==o||o.first!==s)&&typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
|
|
47
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(o){let n;return o.walkDecls(s=>{if(typeof s.raws.between!="undefined")return n=s.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(o){let n;return o.walk(s=>{if(s.nodes&&s.nodes.length===0&&(n=s.raws.after,typeof n!="undefined"))return!1}),n}rawIndent(o){if(o.raws.indent)return o.raws.indent;let n;return o.walk(s=>{let l=s.parent;if(l&&l!==o&&l.parent&&l.parent===o&&typeof s.raws.before!="undefined"){let f=s.raws.before.split(`
|
|
48
|
+
`);return n=f[f.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(o){let n;return o.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(n=s.raws.semicolon,typeof n!="undefined"))return!1}),n}rawValue(o,n){let s=o[n],l=o.raws[n];return l&&l.value===s?l.raw:s}root(o){if(o.source&&o.source.input.hasBOM&&this.builder("\uFEFF",o,"start"),this.body(o),o.raws.after){let n=o.raws.after,s=o.parent&&o.parent.type==="document";this.builder(s?n:i(n))}}rule(o){this.block(o,this.rawValue(o,"selector")),o.raws.ownSemicolon&&this.builder(i(o.raws.ownSemicolon),o,"end")}stringify(o,n){if(!this[o.type])throw new Error("Unknown AST node type "+o.type+". Maybe you need to change PostCSS stringifier.");this[o.type](o,n)}}return Fr=d,d.default=d,Fr}var Br,sn;function Zt(){if(sn)return Br;sn=1;let e=Mo();function t(r,i){new e(i).stringify(r)}return Br=t,t.default=t,Br}var xt={},nn;function Kt(){return nn||(nn=1,xt.isClean=Symbol("isClean"),xt.my=Symbol("my")),xt}var Ur,on;function er(){if(on)return Ur;on=1;let e=Fs(),t=Mo(),r=Zt(),{isClean:i,my:a}=Kt();function u(m,d){let p=new m.constructor,o=[[m,p,d]];for(;o.length>0;){let[n,s,l]=o.pop();for(let f in n){if(!Object.prototype.hasOwnProperty.call(n,f)||f==="proxyCache")continue;let g=n[f],b=typeof g;if(f==="parent"&&b==="object")l&&(s[f]=l);else if(f==="source")s[f]=g;else if(Array.isArray(g)){let y=[];s[f]=y;for(let v of g){let E=new v.constructor;y.push(E),o.push([v,E,s])}}else{if(b==="object"&&g!==null){let y=new g.constructor;o.push([g,y,void 0]),g=y}s[f]=g}}}return p}function c(m,d){if(d&&typeof d.offset!="undefined")return d.offset;let p=1,o=1,n=0;for(let s=0;s<m.length;s++){if(o===d.line&&p===d.column){n=s;break}m[s]===`
|
|
49
|
+
`?(p=1,o+=1):p+=1}return n}class h{get proxyOf(){return this}constructor(d={}){this.raws={},this[i]=!1,this[a]=!0;for(let p of Object.keys(d))if(p!=="__proto__")if(p==="nodes"){this.nodes=[];for(let o of d[p])typeof o.clone=="function"&&o.parent?this.append(o.clone()):this.append(o)}else this[p]=d[p]}addToError(d){if(d.postcssNode=this,d.stack&&this.source&&/\n\s{4}at /.test(d.stack)){let p=this.source;d.stack=d.stack.replace(/\n\s{4}at /,`$&${p.input.from}:${p.start.line}:${p.start.column}$&`)}return d}after(d){return this.parent.insertAfter(this,d),this}assign(d={}){for(let p in d)this[p]=d[p];return this}before(d){return this.parent.insertBefore(this,d),this}cleanRaws(d){delete this.raws.before,delete this.raws.after,d||delete this.raws.between}clone(d={}){let p=u(this);for(let o in d)p[o]=d[o];return p}cloneAfter(d={}){let p=this.clone(d);return this.parent.insertAfter(this,p),p}cloneBefore(d={}){let p=this.clone(d);return this.parent.insertBefore(this,p),p}error(d,p={}){if(this.source){let{end:o,start:n}=this.rangeBy(p);return this.source.input.error(d,{column:n.column,line:n.line},{column:o.column,line:o.line},p)}return new e(d)}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:p==="root"?()=>d.root().toProxy():d[p]},set(d,p,o){return d[p]===o||(d[p]=o,(p==="prop"||p==="value"||p==="name"||p==="params"||p==="important"||p==="text")&&d.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;let d=this;for(;d=d.parent;)d[i]=!1}}next(){if(!this.parent)return;let d=this.parent.index(this);return this.parent.nodes[d+1]}positionBy(d={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:c(p,this.source.start)};if(d.index)o=this.positionInside(d.index);else if(d.word){let s=p.slice(c(p,this.source.start),c(p,this.source.end)).indexOf(d.word);s!==-1&&(o=this.positionInside(s))}return o}positionInside(d){let p=this.source.start.column,o=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=c(n,this.source.start),l=s+d;for(let f=s;f<l;f++)n[f]===`
|
|
50
|
+
`?(p=1,o+=1):p+=1;return{column:p,line:o,offset:l}}prev(){if(!this.parent)return;let d=this.parent.index(this);return this.parent.nodes[d-1]}rangeBy(d={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:c(p,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:c(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(d.word){let l=p.slice(c(p,this.source.start),c(p,this.source.end)).indexOf(d.word);l!==-1&&(o=this.positionInside(l),n=this.positionInside(l+d.word.length))}else d.start?o={column:d.start.column,line:d.start.line,offset:c(p,d.start)}:typeof d.index=="number"&&(o=this.positionInside(d.index)),d.end?n={column:d.end.column,line:d.end.line,offset:c(p,d.end)}:typeof d.endIndex=="number"?n=this.positionInside(d.endIndex):typeof d.index=="number"&&(n=this.positionInside(d.index+1));return(n.line<o.line||n.line===o.line&&n.column<=o.column)&&(n={column:o.column+1,line:o.line,offset:o.offset+1}),{end:n,start:o}}raw(d,p){return new t().raw(this,d,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...d){if(this.parent){let p=this,o=!1;for(let n of d)n===this?o=!0:o?(this.parent.insertAfter(p,n),p=n):this.parent.insertBefore(p,n);o||this.remove()}return this}root(){let d=this;for(;d.parent&&d.parent.type!=="document";)d=d.parent;return d}toJSON(d,p){let o=p==null;p=p||new Map;let n=[],s=[[this,n,0]];for(let f=0;f<s.length;f++){let[g,b,y]=s[f],v={};b[y]=v;for(let E in g){if(!Object.prototype.hasOwnProperty.call(g,E)||E==="parent"||E==="proxyCache")continue;let S=g[E];if(Array.isArray(S)){let w=[];v[E]=w;for(let C=0;C<S.length;C++){let M=S[C];typeof M=="object"&&M.toJSON?M.toJSON===h.prototype.toJSON?s.push([M,w,C]):w[C]=M.toJSON(null,p):w[C]=M}}else if(typeof S=="object"&&S.toJSON)S.toJSON===h.prototype.toJSON?s.push([S,v,E]):v[E]=S.toJSON(null,p);else if(E==="source"){if(S==null)continue;let w=p.get(S.input);w==null&&(w=p.size,p.set(S.input,w)),v[E]={end:S.end,inputId:w,start:S.start}}else v[E]=S}}let l=n[0];return o&&(l.inputs=[...p.keys()].map(f=>f.toJSON())),l}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(d=r){d.stringify&&(d=d.stringify);let p="";return d(this,o=>{p+=o}),p}warn(d,p,o={}){let n={node:this};for(let s in o)n[s]=o[s];return d.warn(p,n)}}return Ur=h,h.default=h,Ur}var Wr,an;function tr(){if(an)return Wr;an=1;let e=er();class t extends e{constructor(i){super(i),this.type="comment"}}return Wr=t,t.default=t,Wr}var $r,ln;function rr(){if(ln)return $r;ln=1;let e=er();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value!="undefined"&&typeof i.value!="string"&&(i=de(B({},i),{value:String(i.value)})),super(i),this.type="decl"}}return $r=t,t.default=t,$r}var zr,un;function $e(){if(un)return zr;un=1;let e=tr(),t=rr(),r=er(),{isClean:i,my:a}=Kt(),u,c,h,m;function d(n){let s=n.slice();for(;s.length>0;){let l=s.pop();if(delete l.source,l.nodes){l.nodes=l.nodes.slice();for(let f of l.nodes)s.push(f)}}return n.slice()}function p(n){let s=[n];for(;s.length>0;){let l=s.pop();if(l[i]=!1,l.proxyOf.nodes)for(let f of l.proxyOf.nodes)s.push(f)}}class o extends r{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...s){for(let l of s){let f=this.normalize(l,this.last);for(let g of f)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(s){let l=[this];for(;l.length>0;){let f=l.pop();if(f!==this&&f.cleanRaws!==o.prototype.cleanRaws){f.cleanRaws(s);continue}if(r.prototype.cleanRaws.call(f,s),f.nodes)for(let g of f.nodes)l.push(g)}}each(s){if(!this.proxyOf.nodes)return;let l=this.getIterator(),f,g;for(;this.indexes[l]<this.proxyOf.nodes.length&&(f=this.indexes[l],g=s(this.proxyOf.nodes[f],f),g!==!1);)this.indexes[l]+=1;return delete this.indexes[l],g}every(s){return this.nodes.every(s)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach;return this.indexes[s]=0,s}getProxyProcessor(){return{get(s,l){return l==="proxyOf"?s:s[l]?l==="each"||typeof l=="string"&&l.startsWith("walk")?(...f)=>s[l](...f.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):l==="every"||l==="some"?f=>s[l]((g,...b)=>f(g.toProxy(),...b)):l==="root"?()=>s.root().toProxy():l==="nodes"?s.nodes.map(f=>f.toProxy()):l==="first"||l==="last"?s[l].toProxy():s[l]:s[l]},set(s,l,f){return s[l]===f||(s[l]=f,(l==="name"||l==="params"||l==="selector")&&s.markDirty()),!0}}}index(s){return typeof s=="number"?s:(s.proxyOf&&(s=s.proxyOf),this.proxyOf.nodes.indexOf(s))}insertAfter(s,l){let f=this.index(s),g=this.normalize(l,this.proxyOf.nodes[f]).reverse();f=this.index(s);for(let y of g)this.proxyOf.nodes.splice(f+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],f<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(s,l){let f=this.index(s),g=f===0?"prepend":!1,b=this.normalize(l,this.proxyOf.nodes[f],g).reverse();f=this.index(s);for(let v of b)this.proxyOf.nodes.splice(f,0,v);let y;for(let v in this.indexes)y=this.indexes[v],f<=y&&(this.indexes[v]=y+b.length);return this.markDirty(),this}normalize(s,l){if(typeof s=="string")s=d(c(s).nodes);else if(typeof s=="undefined")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let g of s)g.parent&&g.parent.removeChild(g,"ignore")}else if(s.type==="root"&&this.type!=="document"){s=s.nodes.slice(0);for(let g of s)g.parent&&g.parent.removeChild(g,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value=="undefined")throw new Error("Value field is missed in node creation");typeof s.value!="string"&&(s.value=String(s.value)),s=[new t(s)]}else if(s.selector||s.selectors)s=[new m(s)];else if(s.name)s=[new u(s)];else if(s.text)s=[new e(s)];else throw new Error("Unknown node type in node creation");return s.map(g=>(g[a]||o.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[i]&&p(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&l&&typeof l.raws.before!="undefined"&&(g.raws.before=l.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...s){s=s.reverse();for(let l of s){let f=this.normalize(l,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length}return this.markDirty(),this}push(s){return s.parent=this,this.proxyOf.nodes.push(s),this}removeAll(){for(let s of this.proxyOf.nodes)s.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(s){s=this.index(s),this.proxyOf.nodes[s].parent=void 0,this.proxyOf.nodes.splice(s,1);let l;for(let f in this.indexes)l=this.indexes[f],l>=s&&(this.indexes[f]=l-1);return this.markDirty(),this}replaceValues(s,l,f){return f||(f=l,l={}),this.walkDecls(g=>{l.props&&!l.props.includes(g.prop)||l.fast&&!g.value.includes(l.fast)||(g.value=g.value.replace(s,f))}),this.markDirty(),this}some(s){return this.nodes.some(s)}walk(s){if(!this.proxyOf.nodes)return;let l=[{iterator:this.getIterator(),node:this.proxyOf}];for(;l.length>0;){let{iterator:f,node:g}=l[l.length-1],b=g.indexes[f];if(b>=g.proxyOf.nodes.length){delete g.indexes[f],l.pop();let E=l[l.length-1];E&&(E.node.indexes[E.iterator]+=1);continue}let y=g.proxyOf.nodes[b],v;try{v=s(y,b)}catch(E){throw y.addToError(E)}if(v===!1){for(let E of l)delete E.node.indexes[E.iterator];return!1}y.walk&&y.proxyOf.nodes?l.push({iterator:y.getIterator(),node:y}):g.indexes[f]+=1}}walkAtRules(s,l){return l?s instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&s.test(f.name))return l(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===s)return l(f,g)}):(l=s,this.walk((f,g)=>{if(f.type==="atrule")return l(f,g)}))}walkComments(s){return this.walk((l,f)=>{if(l.type==="comment")return s(l,f)})}walkDecls(s,l){return l?s instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&s.test(f.prop))return l(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===s)return l(f,g)}):(l=s,this.walk((f,g)=>{if(f.type==="decl")return l(f,g)}))}walkRules(s,l){return l?s instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&s.test(f.selector))return l(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===s)return l(f,g)}):(l=s,this.walk((f,g)=>{if(f.type==="rule")return l(f,g)}))}}return o.registerParse=n=>{c=n},o.registerRule=n=>{m=n},o.registerAtRule=n=>{u=n},o.registerRoot=n=>{h=n},zr=o,o.default=o,o.rebuild=n=>{let s=[n];for(;s.length>0;){let l=s.pop();if(l.type==="atrule"?Object.setPrototypeOf(l,u.prototype):l.type==="rule"?Object.setPrototypeOf(l,m.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,h.prototype),l[a]=!0,l.nodes)for(let f of l.nodes)s.push(f)}},zr}var Vr,cn;function Bs(){if(cn)return Vr;cn=1;let e=$e();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return Vr=t,t.default=t,e.registerAtRule(t),Vr}var jr,hn;function Us(){if(hn)return jr;hn=1;let e=$e(),t,r;class i extends e{constructor(u){super(B({type:"document"},u)),this.nodes||(this.nodes=[])}toResult(u={}){return new t(new r,this,u).stringify()}}return i.registerLazyResult=a=>{t=a},i.registerProcessor=a=>{r=a},jr=i,i.default=i,jr}var qr,fn;function nu(){if(fn)return qr;fn=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return qr={nanoid:(i=21)=>{let a="",u=i|0;for(;u-- >0;)a+=e[Math.random()*64|0];return a},customAlphabet:(i,a=21)=>(u=a)=>{let c="",h=u|0;for(;h-- >0;)c+=i[Math.random()*i.length|0];return c}},qr}var Gr,dn;function Io(){if(dn)return Gr;dn=1;let{existsSync:e,readFileSync:t}=Re,{dirname:r,isAbsolute:i,join:a,relative:u,sep:c}=Re,{SourceMapConsumer:h,SourceMapGenerator:m}=Re;function d(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class p{constructor(n,s){if(s.map===!1)return;s.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(n),this.inline=this.startWith(this.annotation,"data:");let l=s.map?s.map.prev:void 0,f=this.loadMap(s.from,l);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(n){let s=/^data:application\/json;charset=utf-?8;base64,/,l=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,g=/^data:application\/json,/,b=n.match(f)||n.match(g);if(b)return decodeURIComponent(n.substr(b[0].length));let y=n.match(s)||n.match(l);if(y)return d(n.substr(y[0].length));let v=n.slice(22);throw v=v.slice(0,v.indexOf(",")),new Error("Unsupported source map encoding "+v)}getAnnotationURL(n){return n.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(n){return typeof n!="object"?!1:typeof n.mappings=="string"||typeof n._mappings=="string"||Array.isArray(n.sections)}loadAnnotation(n){let s=n.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let l=n.lastIndexOf(s.pop()),f=n.indexOf("*/",l);l>-1&&f>-1&&(this.annotation=this.getAnnotationURL(n.substring(l,f)))}loadFile(n,s,l){if(!l&&!this.unsafeMap){if(!/\.map$/i.test(n)||!s)return;let f=u(r(s),n);if(f===".."||f.startsWith(".."+c)||i(f))return}if(this.root=r(n),e(n))return this.mapFile=n,t(n,"utf-8").toString().trim()}loadMap(n,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let l=s(n);if(l){let f=this.loadFile(l,n,!0);if(!f)throw new Error("Unable to load previous source map: "+l.toString());return f}}else{if(s instanceof h)return m.fromSourceMap(s).toString();if(s instanceof m)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let l=this.annotation;n&&(l=a(r(n),l));let f=this.loadFile(l,n,!1);if(f)try{this.json=JSON.parse(f.replace(/^\)]}'[^\n]*\n/,""))}catch(g){return}return f}}}startWith(n,s){return n?n.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Gr=p,p.default=p,Gr}var Hr,pn;function sr(){if(pn)return Hr;pn=1;let{nanoid:e}=nu(),{isAbsolute:t,resolve:r}=Re,{SourceMapConsumer:i,SourceMapGenerator:a}=Re,{fileURLToPath:u,pathToFileURL:c}=Re,h=Fs(),m=Io(),d=Re,p=Symbol("lineToIndexCache"),o=!!(i&&a),n=!!(r&&t);function s(f){if(f[p])return f[p];let g=f.css.split(`
|
|
51
|
+
`),b=new Array(g.length),y=0;for(let v=0,E=g.length;v<E;v++)b[v]=y,y+=g[v].length+1;return f[p]=b,b}class l{get from(){return this.file||this.id}constructor(g,b={}){if(g===null||typeof g=="undefined"||typeof g=="object"&&!g.toString)throw new Error(`PostCSS received ${g} instead of CSS string`);if(this.css=g.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,b.document&&(this.document=b.document.toString()),b.from&&(!n||/^\w+:\/\//.test(b.from)||t(b.from)?this.file=b.from:this.file=r(b.from)),n&&o){let y=new m(this.css,b);if(y.text){this.map=y;let v=y.consumer().file;!this.file&&v&&(this.file=this.mapResolve(v))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(g,b,y,v={}){let E,S,w,C,M;if(b&&typeof b=="object"){let x=b,D=y;if(typeof x.offset=="number"){C=x.offset;let T=this.fromOffset(C);b=T.line,y=T.col}else b=x.line,y=x.column,C=this.fromLineAndColumn(b,y);if(typeof D.offset=="number"){w=D.offset;let T=this.fromOffset(w);S=T.line,E=T.col}else S=D.line,E=D.column,w=this.fromLineAndColumn(D.line,D.column)}else if(y)C=this.fromLineAndColumn(b,y);else{C=b;let x=this.fromOffset(C);b=x.line,y=x.col}let R=this.origin(b,y,S,E);return R?M=new h(g,R.endLine===void 0?R.line:{column:R.column,line:R.line},R.endLine===void 0?R.column:{column:R.endColumn,line:R.endLine},R.source,R.file,v.plugin):M=new h(g,S===void 0?b:{column:y,line:b},S===void 0?y:{column:E,line:S},this.css,this.file,v.plugin),M.input={column:y,endColumn:E,endLine:S,endOffset:w,line:b,offset:C,source:this.css},this.file&&(c&&(M.input.url=c(this.file).toString()),M.input.file=this.file),M}fromLineAndColumn(g,b){return s(this)[g-1]+b-1}fromOffset(g){let b=s(this),y=b[b.length-1],v=0;if(g>=y)v=b.length-1;else{let E=b.length-2,S;for(;v<E;)if(S=v+(E-v>>1),g<b[S])E=S-1;else if(g>=b[S+1])v=S+1;else{v=S;break}}return{col:g-b[v]+1,line:v+1}}mapResolve(g){return/^\w+:\/\//.test(g)?g:r(this.map.consumer().sourceRoot||this.map.root||".",g)}origin(g,b,y,v){if(!this.map)return!1;let E=this.map.consumer(),S=E.originalPositionFor({column:b-1,line:g});if(!S.source)return!1;let w;if(typeof y=="number"){let x=E.originalPositionFor({column:v-1,line:y});x.source&&(w=x)}let C;t(S.source)?C=c(S.source):C=new URL(S.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let M={column:S.column+1,endColumn:w&&w.column+1,endLine:w&&w.line,line:S.line,url:C.toString()};if(C.protocol==="file:")if(u)M.file=u(C);else throw new Error("file: protocol is not available in this PostCSS build");let R=E.sourceContentFor(S.source);return R&&(M.source=R),M}toJSON(){let g={};for(let b of["hasBOM","css","file","id"])this[b]!=null&&(g[b]=this[b]);return this.map&&(g.map=B({},this.map),g.map.consumerCache&&(g.map.consumerCache=void 0)),g}}return Hr=l,l.default=l,d&&d.registerInput&&d.registerInput(l),Hr}var Yr,mn;function ft(){if(mn)return Yr;mn=1;let e=$e(),t,r;class i extends e{constructor(u){super(u),this.type="root",this.nodes||(this.nodes=[])}normalize(u,c,h){let m=new Set;for(let p of Array.isArray(u)?u:[u])p&&typeof p=="object"&&!p.parent&&p.raws&&typeof p.raws.before!="undefined"&&m.add(p.raws);let d=super.normalize(u);if(c){if(h==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let p of d)m.has(p.raws)||(p.raws.before=c.raws.before)}return d}removeChild(u,c){let h=this.index(u);return!c&&h===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[h].raws.before),super.removeChild(u)}toResult(u={}){return new t(new r,this,u).stringify()}}return i.registerLazyResult=a=>{t=a},i.registerProcessor=a=>{r=a},Yr=i,i.default=i,e.registerRoot(i),Yr}var Jr,gn;function Oo(){if(gn)return Jr;gn=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
52
|
+
`," "];return e.split(t,r)},split(t,r,i){if(!t)return[];let a=[],u="",c=!1,h=0,m=!1,d="",p=!1;for(let o of t)p?p=!1:o==="\\"?p=!0:m?o===d&&(m=!1):o==='"'||o==="'"?(m=!0,d=o):o==="("?h+=1:o===")"?h>0&&(h-=1):h===0&&r.includes(o)&&(c=!0),c?(u!==""&&a.push(u.trim()),u="",c=!1):u+=o;return(i||u!=="")&&a.push(u.trim()),a}};return Jr=e,e.default=e,Jr}var Xr,yn;function Ws(){if(yn)return Xr;yn=1;let e=$e(),t=Oo();class r extends e{get selectors(){return t.comma(this.selector)}set selectors(a){let u=this.selector?this.selector.match(/,\s*/):null,c=u?u[0]:","+this.raw("between","beforeOpen");this.selector=a.join(c)}constructor(a){super(a),this.type="rule",this.nodes||(this.nodes=[])}}return Xr=r,r.default=r,e.registerRule(r),Xr}var Qr,wn;function ou(){if(wn)return Qr;wn=1;let e=Bs(),t=tr(),r=rr(),i=sr(),a=Io(),u=ft(),c=Ws();function h(p,o){return p.inputs?p.inputs.map(n=>{let s=de(B({},n),{__proto__:i.prototype});return s.map&&(s.map=de(B({},s.map),{__proto__:a.prototype})),s}):o}function m(p,o,n){let s=B({},p);if(delete s.inputs,delete s.nodes,s.source){let f=s.source,{inputId:g}=f,b=yt(f,["inputId"]);s.source=b,g!=null&&(s.source.input=o[g])}let l;if(s.type==="root")l=new u(s);else if(s.type==="decl")l=new r(s);else if(s.type==="rule")l=new c(s);else if(s.type==="comment")l=new t(s);else if(s.type==="atrule")l=new e(s);else throw new Error("Unknown node type: "+p.type);if(n){l.nodes=n;for(let g of n)g.parent=l}return l}function d(p,o){if(Array.isArray(p))return p.map(l=>d(l));let n,s=[{childIndex:0,children:[],inputs:h(p,o),json:p}];for(;s.length>0;){let l=s[s.length-1],f=l.json.nodes;if(f&&l.childIndex<f.length){let b=f[l.childIndex];l.childIndex+=1,s.push({childIndex:0,children:[],inputs:h(b,l.inputs),json:b});continue}s.pop();let g=m(l.json,l.inputs,f?l.children:void 0);s.length>0?s[s.length-1].children.push(g):n=g}return n}return Qr=d,d.default=d,Qr}var Zr,vn;function No(){if(vn)return Zr;vn=1;let{dirname:e,relative:t,resolve:r,sep:i}=Re,{SourceMapConsumer:a,SourceMapGenerator:u}=Re,{pathToFileURL:c}=Re,h=sr(),m=!!(a&&u),d=!!(e&&r&&t&&i);class p{constructor(n,s,l,f){this.stringify=n,this.mapOpts=l.map||{},this.root=s,this.opts=l,this.css=f,this.originalCSS=f,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let n;this.isInline()?n="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?n=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?n=this.mapOpts.annotation(this.opts.to,this.root):n=this.outputFile()+".map";let s=`
|
|
53
53
|
`;this.css.includes(`\r
|
|
54
|
-
`)&&(
|
|
55
|
-
`),this.css+=
|
|
56
|
-
`;)n--;this.css=this.css.slice(0,n)+this.css.slice(
|
|
57
|
-
`),i=y.length-g):i+=y.length,v&&E!=="start"){let S=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==S.last||S.raws.semicolon)&&(v.source&&v.source.end?(h.source=this.sourcePath(v),h.original.line=v.source.end.line,h.original.column=v.source.end.column-1,h.generated.line=n,h.generated.column=i-2,this.map.addMapping(h)):(h.source=l,h.original.line=1,h.original.column=0,h.generated.line=n,h.generated.column=i-1,this.map.addMapping(h)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(n=>n.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let n=this.mapOpts.annotation;return typeof n!="undefined"&&n!==!0?!1:this.previous().length?this.previous().some(i=>i.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(n=>n.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;let i=this.memoizedPaths.get(n);if(i)return i;let l=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(l=e(r(l,this.mapOpts.annotation)));let h=t(l,n);return this.memoizedPaths.set(n,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(n=>{if(n.source&&n.source.input.map){let i=n.source.input.map;this.previousMaps.includes(i)||this.previousMaps.push(i)}});else{let n=new f(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps}setSourcesContent(){let n={};if(this.root)this.root.walk(i=>{if(i.source){let l=i.source.input.from;if(l&&!n[l]){n[l]=!0;let h=this.usesFileUrls?this.toFileUrl(l):this.toUrl(this.path(l));this.map.setSourceContent(h,i.source.input.css)}}});else if(this.css){let i=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(i,this.css)}}sourcePath(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))}toBase64(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))}toFileUrl(n){let i=this.memoizedFileURLs.get(n);if(i)return i;if(c){let l=c(n).toString();return this.memoizedFileURLs.set(n,l),l}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(n){let i=this.memoizedURLs.get(n);if(i)return i;s==="\\"&&(n=n.replace(/\\/g,"/"));let l=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,l),l}}return Xr=p,Xr}var Qr,wn;function nu(){if(wn)return Qr;wn=1;const e=39,t=34,r=92,s=47,a=10,u=32,c=12,f=9,m=13,d=91,p=93,o=40,n=41,i=123,l=125,h=59,g=42,b=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return Qr=function(M,R={}){let x=M.css.valueOf(),D=R.ignoreErrors,T,G,X,I,ne,P,V,H,F,Z,ue=x.length,N=0,Se=[],ce=[],Te=-1;function De(){return N}function Ce(ie){throw M.error("Unclosed "+ie,N)}function ze(){return ce.length===0&&N>=ue}function tt(ie){if(ce.length)return ce.pop();if(N>=ue)return;let me=ie?ie.ignoreUnclosed:!1;switch(T=x.charCodeAt(N),T){case a:case u:case f:case m:case c:{I=N;do I+=1,T=x.charCodeAt(I);while(T===u||T===a||T===f||T===m||T===c);P=["space",x.slice(N,I)],N=I-1;break}case d:case p:case i:case l:case b:case h:case n:{let de=String.fromCharCode(T);P=[de,de,N];break}case o:{if(Z=Se.length?Se.pop()[1]:"",F=x.charCodeAt(N+1),Z==="url"&&F!==e&&F!==t&&F!==u&&F!==a&&F!==f&&F!==c&&F!==m){I=N;do{if(V=!1,I=x.indexOf(")",I+1),I===-1)if(D||me){I=N;break}else Ce("bracket");for(H=I;x.charCodeAt(H-1)===r;)H-=1,V=!V}while(V);P=["brackets",x.slice(N,I+1),N,I],N=I}else N<=Te?P=["(","(",N]:(I=x.indexOf(")",N+1),G=x.slice(N,I+1),I===-1||S.test(G)?(Te=I===-1?ue:I,P=["(","(",N]):(P=["brackets",G,N,I],N=I));break}case e:case t:{ne=T===e?"'":'"',I=N;do{if(V=!1,I=x.indexOf(ne,I+1),I===-1)if(D||me){I=N+1;break}else Ce("string");for(H=I;x.charCodeAt(H-1)===r;)H-=1,V=!V}while(V);P=["string",x.slice(N,I+1),N,I],N=I;break}case y:{v.lastIndex=N+1,v.test(x),v.lastIndex===0?I=x.length-1:I=v.lastIndex-2,P=["at-word",x.slice(N,I+1),N,I],N=I;break}case r:{for(I=N,X=!0;x.charCodeAt(I+1)===r;)I+=1,X=!X;if(T=x.charCodeAt(I+1),X&&T!==s&&T!==u&&T!==a&&T!==f&&T!==m&&T!==c&&(I+=1,w.test(x.charAt(I)))){for(;w.test(x.charAt(I+1));)I+=1;x.charCodeAt(I+1)===u&&(I+=1)}P=["word",x.slice(N,I+1),N,I],N=I;break}default:{T===s&&x.charCodeAt(N+1)===g?(I=x.indexOf("*/",N+2)+1,I===0&&(D||me?I=x.length:Ce("comment")),P=["comment",x.slice(N,I+1),N,I],N=I):(E.lastIndex=N+1,E.test(x),E.lastIndex===0?I=x.length-1:I=E.lastIndex-2,P=["word",x.slice(N,I+1),N,I],Se.push(P),N=I);break}}return N++,P}function pe(ie){ce.push(ie)}return{back:pe,endOfFile:ze,nextToken:tt,position:De}},Qr}var Zr,vn;function ou(){if(vn)return Zr;vn=1;let e=Li(),t=Kt(),r=er(),s=ct(),a=Bi(),u=nu();const c={empty:!0,space:!0};function f(p){for(let o=p.length-1;o>=0;o--){let n=p[o],i=n[3]||n[2];if(i)return i}}function m(p,o,n){let i="";for(let l=o;l<n;l++)i+=p[l][1];return i}class d{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let n=new e;n.name=o[1].slice(1),n.name===""&&this.unnamedAtrule(n,o),this.init(n,o[2]);let i,l,h,g=!1,b=!1,y=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),i=o[0],i==="("||i==="["?v.push(i==="("?")":"]"):i==="{"&&v.length>0?v.push("}"):i===v[v.length-1]&&v.pop(),v.length===0)if(i===";"){n.source.end=this.getPosition(o[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){b=!0;break}else if(i==="}"){if(y.length>0){for(h=y.length-1,l=y[h];l&&l[0]==="space";)l=y[--h];l&&(n.source.end=this.getPosition(l[3]||l[2]),n.source.end.offset++)}this.end(o);break}else y.push(o);else y.push(o);if(this.tokenizer.endOfFile()){g=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(n.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(n,"params",y),g&&(o=y[y.length-1],n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),b&&(n.nodes=[],this.current=n)}checkMissedSemicolon(o){let n=this.colon(o);if(n===!1)return;let i=0,l;for(let h=n-1;h>=0&&(l=o[h],!(l[0]!=="space"&&(i+=1,i===2)));h--);throw this.input.error("Missed semicolon",l[0]==="word"?l[3]+1:l[2])}colon(o){let n=0,i,l,h;for(let[g,b]of o.entries()){if(l=b,h=l[0],h==="("&&(n+=1),h===")"&&(n-=1),n===0&&h===":")if(!i)this.doubleColon(l);else{if(i[0]==="word"&&i[1]==="progid")continue;return g}i=l}return!1}comment(o){let n=new t;this.init(n,o[2]),n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++;let i=o[1].slice(2,-2);if(!i.trim())n.text="",n.raws.left=i,n.raws.right="";else{let l=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=l[2],n.raws.left=l[1],n.raws.right=l[3]}}createTokenizer(){this.tokenizer=u(this.input)}decl(o,n){let i=new r;this.init(i,o[0][2]);let l=o[o.length-1];l[0]===";"&&(this.semicolon=!0,o.pop()),i.source.end=this.getPosition(l[3]||l[2]||f(o)),i.source.end.offset++;let h=0;for(;o[h][0]!=="word";)h===o.length-1&&this.unknownWord([o[h]]),h++;i.raws.before+=m(o,0,h),i.source.start=this.getPosition(o[h][2]);let g=h;for(;h<o.length;){let w=o[h][0];if(w===":"||w==="space"||w==="comment")break;h++}i.prop=m(o,g,h);let b=h,y;for(;h<o.length&&(y=o[h],h++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);i.raws.between=m(o,b,h),(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let v=h;for(;h<o.length;){let w=o[h][0];if(w!=="space"&&w!=="comment")break;h++}let E=o.slice(v,h);o=o.slice(h),this.precheckMissedSemicolon(o);for(let w=o.length-1;w>=0;w--){if(y=o[w],y[1].toLowerCase()==="!important"){i.important=!0;let C=this.stringFrom(o,w);C=this.spacesFromEnd(o)+C,C!==" !important"&&(i.raws.important=C);break}else if(y[1].toLowerCase()==="important"){let C=o.slice(0),M="";for(let R=w;R>0;R--){let x=C[R][0];if(M.trim().startsWith("!")&&x!=="space")break;M=C.pop()[1]+M}M.trim().startsWith("!")&&(i.important=!0,i.raws.important=M,o=C)}if(y[0]!=="space"&&y[0]!=="comment")break}o.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(i.raws.between+=E.map(w=>w[1]).join(""),E=[]),this.raw(i,"value",E.concat(o),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let n=new a;this.init(n,o[2]),n.selector="",n.raws.between="",this.current=n}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(o[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(o){let n=this.input.fromOffset(o);return{column:n.col,line:n.line,offset:o}}init(o,n){this.current.push(o),o.source={input:this.input,start:this.getPosition(n)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let n=!1,i=null,l=!1,h=null,g=[],b=o[1].startsWith("--"),y=[],v=o;for(;v;){if(i=v[0],y.push(v),i==="("||i==="[")h||(h=v),g.push(i==="("?")":"]");else if(b&&l&&i==="{")h||(h=v),g.push("}");else if(g.length===0)if(i===";")if(l){this.decl(y,b);return}else break;else if(i==="{"){this.rule(y);return}else if(i==="}"){this.tokenizer.back(y.pop()),n=!0;break}else i===":"&&(l=!0);else i===g[g.length-1]&&(g.pop(),g.length===0&&(h=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),g.length>0&&this.unclosedBracket(h),n&&l){if(!b)for(;y.length&&(v=y[y.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,b)}else this.unknownWord(y)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,n,i,l){let h,g,b=i.length,y="",v=!0,E,S;for(let w=0;w<b;w+=1)h=i[w],g=h[0],g==="space"&&w===b-1&&!l?v=!1:g==="comment"?(S=i[w-1]?i[w-1][0]:"empty",E=i[w+1]?i[w+1][0]:"empty",!c[S]&&!c[E]?y.slice(-1)===","?v=!1:y+=h[1]:v=!1):y+=h[1];if(!v){let w=i.reduce((C,M)=>C+M[1],"");o.raws[n]={raw:w,value:y}}o[n]=y}rule(o){o.pop();let n=new a;this.init(n,o[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(n,"selector",o),this.current=n}spacesAndCommentsFromEnd(o){let n,i="";for(;o.length&&(n=o[o.length-1][0],!(n!=="space"&&n!=="comment"));)i=o.pop()[1]+i;return i}spacesAndCommentsFromStart(o){let n,i="";for(;o.length&&(n=o[0][0],!(n!=="space"&&n!=="comment"));)i+=o.shift()[1];return i}spacesFromEnd(o){let n,i="";for(;o.length&&(n=o[o.length-1][0],n==="space");)i=o.pop()[1]+i;return i}stringFrom(o,n){let i="";for(let l=n;l<o.length;l++)i+=o[l][1];return o.splice(n,o.length-n),i}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}}return Zr=d,Zr}var Kr,bn;function Ui(){if(bn)return Kr;bn=1;let e=Fe(),t=tr(),r=ou();function s(a,u){let c=new t(a,u),f=new r(c);try{f.parse()}catch(m){throw m}return f.root}return Kr=s,s.default=s,e.registerParse(s),Kr}var ei,Sn;function Io(){if(Sn)return ei;Sn=1;let e=Fe(),{my:t}=Qt();class r{constructor(a,u={}){if(this.type="warning",this.text=a,u.node&&u.node.source){u.node[t]||e.rebuild(u.node);let c=u.node.rangeBy(u);this.line=c.start.line,this.column=c.start.column,this.endLine=c.end.line,this.endColumn=c.end.column}for(let c in u)this[c]=u[c]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return ei=r,r.default=r,ei}var ti,Cn;function Wi(){if(Cn)return ti;Cn=1;let e=Io();class t{get content(){return this.css}constructor(s,a,u){this.processor=s,this.messages=[],this.root=a,this.opts=u,this.css="",this.map=void 0}toString(){return this.css}warn(s,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let u=new e(s,a);return this.messages.push(u),u}warnings(){return this.messages.filter(s=>s.type==="warning")}}return ti=t,t.default=t,ti}var ri,En;function Oo(){if(En)return ri;En=1;let e={};return ri=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},ri}var ii,xn;function No(){if(xn)return ii;xn=1;let e=Fe(),t=Fi(),r=Mo(),s=Ui(),a=Wi(),u=ct(),c=Xt(),{isClean:f,my:m}=Qt(),d=Oo();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},n={Once:!0,postcssPlugin:!0,prepare:!0},i=0;function l(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let S=!1,w=p[E.type];return E.type==="decl"?S=E.prop.toLowerCase():E.type==="atrule"&&(S=E.name.toLowerCase()),S&&E.append?[w,w+"-"+S,i,w+"Exit",w+"Exit-"+S]:S?[w,w+"-"+S,w+"Exit",w+"Exit-"+S]:E.append?[w,i,w+"Exit"]:[w,w+"Exit"]}function g(E){let S;return E.type==="document"?S=["Document",i,"DocumentExit"]:E.type==="root"?S=["Root",i,"RootExit"]:S=h(E),{eventIndex:0,events:S,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){let S=[E];for(;S.length>0;){let w=S.pop();if(w[f]=!1,w.nodes)for(let C of w.nodes)S.push(C)}return E}let y={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,w,C){this.stringified=!1,this.processed=!1;let M;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))M=b(w);else if(w instanceof v||w instanceof a)M=b(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let R=s;C.syntax&&(R=C.syntax.parse),C.parser&&(R=C.parser),R.parse&&(R=R.parse);try{M=R(w,C)}catch(x){this.processed=!0,this.error=x}M&&!M[m]&&e.rebuild(M)}this.result=new a(S,M,C),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(R=>typeof R=="object"&&R.prepare?L(L({},R),R.prepare(this.result)):R)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,w){let C=this.result.lastPlugin;try{w&&w.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin?(S.plugin=C.postcssPlugin,S.setMessage()):C.postcssVersion}catch(M){console&&console.error&&console.error(M)}return S}prepareVisitors(){this.listeners={};let S=(w,C,M)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,M])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!o[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!n[C])if(typeof w[C]=="object")for(let M in w[C])M==="*"?S(w,C,w[C][M]):S(w,C+"-"+M.toLowerCase(),w[C][M]);else typeof w[C]=="function"&&S(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let w=this.plugins[S],C=this.runOnRoot(w);if(l(C))try{await C}catch(M){throw this.handleError(M)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[f];){S[f]=!0;let w=[g(S)];for(;w.length>0;){let C=this.visitTick(w);if(l(C))try{await C}catch(M){let R=w[w.length-1].node;throw this.handleError(M,R)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(S.type==="document"){let M=S.nodes.map(R=>C(R,this.helpers));await Promise.all(M)}else await C(S,this.helpers)}catch(M){throw this.handleError(M)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>S.Once(C,this.helpers));return l(w[0])?Promise.all(w):w}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,w=c;S.syntax&&(w=S.syntax.stringify),S.stringifier&&(w=S.stringifier),w.stringify&&(w=w.stringify);let C=this.result.root.source;if(S.map===void 0&&!(C&&C.input&&C.input.map)){let x="";return w(this.result.root,D=>{x+=D}),this.result.css=x,this.result}let R=new r(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let w=this.runOnRoot(S);if(l(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[f];)S[f]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let w of S.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,w){return this.async().then(S,w)}toString(){return this.css}visitSync(S,w){for(let[C,M]of S){this.result.lastPlugin=C;let R;try{R=M(w,this.helpers)}catch(x){throw this.handleError(x,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(l(R))throw this.getAsyncError()}}visitTick(S){let w=S[S.length-1],{node:C,visitors:M}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){S.pop();return}if(M.length>0&&w.visitorIndex<M.length){let[x,D]=M[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===M.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=x;try{return D(C.toProxy(),this.helpers)}catch(T){throw this.handleError(T,C)}}if(w.iterator!==0){let x=w.iterator;w.descending&&(w.descending=!1,C.indexes[x]+=1);let D;for(;D=C.nodes[C.indexes[x]];){if(!D[f]){D[f]=!0,w.descending=!0,S.push(g(D));return}C.indexes[x]+=1}w.iterator=0,delete C.indexes[x]}let R=w.events;for(;w.eventIndex<R.length;){let x=R[w.eventIndex];if(w.eventIndex+=1,x===i){C.nodes&&C.nodes.length&&(C[f]=!0,w.iterator=C.getIterator());return}else if(this.listeners[x]){w.visitors=this.listeners[x];return}}S.pop()}walkSync(S){S[f]=!0;let w=[{eventIndex:0,events:h(S),iterator:0,node:S}];for(;w.length>0;){let C=w[w.length-1],M=C.node;if(C.iterator!==0){let R=C.iterator;C.descending&&(C.descending=!1,M.indexes[R]+=1);let x,D=!1;for(;x=M.nodes[M.indexes[R]];){if(!x[f]){x[f]=!0,C.descending=!0,w.push({eventIndex:0,events:h(x),iterator:0,node:x}),D=!0;break}M.indexes[R]+=1}if(D)continue;C.iterator=0,delete M.indexes[R]}if(C.eventIndex<C.events.length){let R=C.events[C.eventIndex];if(C.eventIndex+=1,R===i)M.nodes&&M.nodes.length&&(C.iterator=M.getIterator());else{let x=this.listeners[R];x&&this.visitSync(x,M.toProxy())&&w.pop()}continue}w.pop()}}warnings(){return this.sync().warnings()}}return v.registerPostcss=E=>{y=E},ii=v,v.default=v,u.registerLazyResult(v),t.registerLazyResult(v),ii}var si,Rn;function au(){if(Rn)return si;Rn=1;let e=Mo(),t=Ui(),r=Wi(),s=Xt(),a=Oo();class u{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let f,m=t;try{f=m(this._css,this._opts)}catch(d){this.error=d}if(this.error)throw this.error;return this._root=f,f}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(f,m,d){m=m.toString(),this.stringified=!1,this._processor=f,this._css=m,this._opts=d,this._map=void 0;let p=s;this.result=new r(this._processor,void 0,this._opts),this.result.css=m;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(p,void 0,this._opts,m);if(n.isMap()){let[i,l]=n.generate();i&&(this.result.css=i),l&&(this.result.map=l)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}sync(){if(this.error)throw this.error;return this.result}then(f,m){return this.async().then(f,m)}toString(){return this._css}warnings(){return[]}}return si=u,u.default=u,si}var ni,Mn;function lu(){if(Mn)return ni;Mn=1;let e=Fi(),t=No(),r=au(),s=ct();class a{constructor(c=[]){this.version="8.5.25",this.plugins=this.normalize(c)}normalize(c){let f=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))f=f.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)f.push(m);else if(typeof m=="function")f.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return f}process(c,f={}){return!this.plugins.length&&!f.parser&&!f.stringifier&&!f.syntax?new r(this,c,f):new t(this,c,f)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return ni=a,a.default=a,s.registerProcessor(a),e.registerProcessor(a),ni}var oi,In;function uu(){if(In)return oi;In=1;let e=Li(),t=Kt(),r=Fe(),s=Pi(),a=er(),u=Fi(),c=su(),f=tr(),m=No(),d=Ro(),p=Zt(),o=Ui(),n=lu(),i=Wi(),l=ct(),h=Bi(),g=Xt(),b=Io();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new n(v)}return y.plugin=function(E,S){let w=!1;function C(...R){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
54
|
+
`)&&(s=`\r
|
|
55
|
+
`),this.css+=s+"/*# sourceMappingURL="+n+" */"}applyPrevMaps(){for(let n of this.previous()){let s=this.toUrl(this.path(n.file)),l=n.root||e(n.file),f;this.mapOpts.sourcesContent===!1?(f=new a(n.text),f.sourcesContent&&(f.sourcesContent=null)):f=n.consumer(),this.map.applySourceMap(f,s,this.toUrl(this.path(l)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let n;for(let s=this.root.nodes.length-1;s>=0;s--)n=this.root.nodes[s],n.type==="comment"&&n.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(s)}else if(this.css){let n;for(;(n=this.css.lastIndexOf("/*#"))!==-1;){let s=this.css.indexOf("*/",n+3);if(s===-1)break;for(;n>0&&this.css[n-1]===`
|
|
56
|
+
`;)n--;this.css=this.css.slice(0,n)+this.css.slice(s+2)}}}}generate(){if(this.clearAnnotation(),d&&m&&this.isMap())return this.generateMap();{let n="";return this.stringify(this.root,s=>{n+=s}),[n]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let n=this.previous()[0].consumer();n.file=this.outputFile(),this.map=u.fromSourceMap(n,{ignoreInvalidMapping:!0})}else this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0});let n=1,s=1,l="<no source>",f={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,v,E)=>{if(this.css+=y,v&&E!=="end"&&(f.generated.line=n,f.generated.column=s-1,v.source&&v.source.start?(f.source=this.sourcePath(v),f.original.line=v.source.start.line,f.original.column=v.source.start.column-1,this.map.addMapping(f)):(f.source=l,f.original.line=1,f.original.column=0,this.map.addMapping(f))),b=y.match(/\n/g),b?(n+=b.length,g=y.lastIndexOf(`
|
|
57
|
+
`),s=y.length-g):s+=y.length,v&&E!=="start"){let S=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==S.last||S.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=n,f.generated.column=s-2,this.map.addMapping(f)):(f.source=l,f.original.line=1,f.original.column=0,f.generated.line=n,f.generated.column=s-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(n=>n.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let n=this.mapOpts.annotation;return typeof n!="undefined"&&n!==!0?!1:this.previous().length?this.previous().some(s=>s.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(n=>n.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(n){if(this.mapOpts.absolute||n.charCodeAt(0)===60||/^\w+:\/\//.test(n))return n;let s=this.memoizedPaths.get(n);if(s)return s;let l=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(l=e(r(l,this.mapOpts.annotation)));let f=t(l,n);return this.memoizedPaths.set(n,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(n=>{if(n.source&&n.source.input.map){let s=n.source.input.map;this.previousMaps.includes(s)||this.previousMaps.push(s)}});else{let n=new h(this.originalCSS,this.opts);n.map&&this.previousMaps.push(n.map)}return this.previousMaps}setSourcesContent(){let n={};if(this.root)this.root.walk(s=>{if(s.source){let l=s.source.input.from;if(l&&!n[l]){n[l]=!0;let f=this.usesFileUrls?this.toFileUrl(l):this.toUrl(this.path(l));this.map.setSourceContent(f,s.source.input.css)}}});else if(this.css){let s=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(s,this.css)}}sourcePath(n){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(n.source.input.from):this.toUrl(this.path(n.source.input.from))}toBase64(n){return Buffer?Buffer.from(n).toString("base64"):window.btoa(unescape(encodeURIComponent(n)))}toFileUrl(n){let s=this.memoizedFileURLs.get(n);if(s)return s;if(c){let l=c(n).toString();return this.memoizedFileURLs.set(n,l),l}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(n){let s=this.memoizedURLs.get(n);if(s)return s;i==="\\"&&(n=n.replace(/\\/g,"/"));let l=encodeURI(n).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(n,l),l}}return Zr=p,Zr}var Kr,bn;function au(){if(bn)return Kr;bn=1;const e=39,t=34,r=92,i=47,a=10,u=32,c=12,h=9,m=13,d=91,p=93,o=40,n=41,s=123,l=125,f=59,g=42,b=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return Kr=function(M,R={}){let x=M.css.valueOf(),D=R.ignoreErrors,T,X,te,I,le,k,V,re,z,oe,pe=x.length,N=0,ve=[],P=[],U=-1;function F(){return N}function $(W){throw M.error("Unclosed "+W,N)}function G(){return P.length===0&&N>=pe}function Q(W){if(P.length)return P.pop();if(N>=pe)return;let K=W?W.ignoreUnclosed:!1;switch(T=x.charCodeAt(N),T){case a:case u:case h:case m:case c:{I=N;do I+=1,T=x.charCodeAt(I);while(T===u||T===a||T===h||T===m||T===c);k=["space",x.slice(N,I)],N=I-1;break}case d:case p:case s:case l:case b:case f:case n:{let me=String.fromCharCode(T);k=[me,me,N];break}case o:{if(oe=ve.length?ve.pop()[1]:"",z=x.charCodeAt(N+1),oe==="url"&&z!==e&&z!==t&&z!==u&&z!==a&&z!==h&&z!==c&&z!==m){I=N;do{if(V=!1,I=x.indexOf(")",I+1),I===-1)if(D||K){I=N;break}else $("bracket");for(re=I;x.charCodeAt(re-1)===r;)re-=1,V=!V}while(V);k=["brackets",x.slice(N,I+1),N,I],N=I}else N<=U?k=["(","(",N]:(I=x.indexOf(")",N+1),X=x.slice(N,I+1),I===-1||S.test(X)?(U=I===-1?pe:I,k=["(","(",N]):(k=["brackets",X,N,I],N=I));break}case e:case t:{le=T===e?"'":'"',I=N;do{if(V=!1,I=x.indexOf(le,I+1),I===-1)if(D||K){I=N+1;break}else $("string");for(re=I;x.charCodeAt(re-1)===r;)re-=1,V=!V}while(V);k=["string",x.slice(N,I+1),N,I],N=I;break}case y:{v.lastIndex=N+1,v.test(x),v.lastIndex===0?I=x.length-1:I=v.lastIndex-2,k=["at-word",x.slice(N,I+1),N,I],N=I;break}case r:{for(I=N,te=!0;x.charCodeAt(I+1)===r;)I+=1,te=!te;if(T=x.charCodeAt(I+1),te&&T!==i&&T!==u&&T!==a&&T!==h&&T!==m&&T!==c&&(I+=1,w.test(x.charAt(I)))){for(;w.test(x.charAt(I+1));)I+=1;x.charCodeAt(I+1)===u&&(I+=1)}k=["word",x.slice(N,I+1),N,I],N=I;break}default:{T===i&&x.charCodeAt(N+1)===g?(I=x.indexOf("*/",N+2)+1,I===0&&(D||K?I=x.length:$("comment")),k=["comment",x.slice(N,I+1),N,I],N=I):(E.lastIndex=N+1,E.test(x),E.lastIndex===0?I=x.length-1:I=E.lastIndex-2,k=["word",x.slice(N,I+1),N,I],ve.push(k),N=I);break}}return N++,k}function ie(W){P.push(W)}return{back:ie,endOfFile:G,nextToken:Q,position:F}},Kr}var es,Sn;function lu(){if(Sn)return es;Sn=1;let e=Bs(),t=tr(),r=rr(),i=ft(),a=Ws(),u=au();const c={empty:!0,space:!0};function h(p){for(let o=p.length-1;o>=0;o--){let n=p[o],s=n[3]||n[2];if(s)return s}}function m(p,o,n){let s="";for(let l=o;l<n;l++)s+=p[l][1];return s}class d{constructor(o){this.input=o,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let n=new e;n.name=o[1].slice(1),n.name===""&&this.unnamedAtrule(n,o),this.init(n,o[2]);let s,l,f,g=!1,b=!1,y=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),s=o[0],s==="("||s==="["?v.push(s==="("?")":"]"):s==="{"&&v.length>0?v.push("}"):s===v[v.length-1]&&v.pop(),v.length===0)if(s===";"){n.source.end=this.getPosition(o[2]),n.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){b=!0;break}else if(s==="}"){if(y.length>0){for(f=y.length-1,l=y[f];l&&l[0]==="space";)l=y[--f];l&&(n.source.end=this.getPosition(l[3]||l[2]),n.source.end.offset++)}this.end(o);break}else y.push(o);else y.push(o);if(this.tokenizer.endOfFile()){g=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(n.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(n,"params",y),g&&(o=y[y.length-1],n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),b&&(n.nodes=[],this.current=n)}checkMissedSemicolon(o){let n=this.colon(o);if(n===!1)return;let s=0,l;for(let f=n-1;f>=0&&(l=o[f],!(l[0]!=="space"&&(s+=1,s===2)));f--);throw this.input.error("Missed semicolon",l[0]==="word"?l[3]+1:l[2])}colon(o){let n=0,s,l,f;for(let[g,b]of o.entries()){if(l=b,f=l[0],f==="("&&(n+=1),f===")"&&(n-=1),n===0&&f===":")if(!s)this.doubleColon(l);else{if(s[0]==="word"&&s[1]==="progid")continue;return g}s=l}return!1}comment(o){let n=new t;this.init(n,o[2]),n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++;let s=o[1].slice(2,-2);if(!s.trim())n.text="",n.raws.left=s,n.raws.right="";else{let l=s.match(/^(\s*)([^]*\S)(\s*)$/);n.text=l[2],n.raws.left=l[1],n.raws.right=l[3]}}createTokenizer(){this.tokenizer=u(this.input)}decl(o,n){let s=new r;this.init(s,o[0][2]);let l=o[o.length-1];l[0]===";"&&(this.semicolon=!0,o.pop()),s.source.end=this.getPosition(l[3]||l[2]||h(o)),s.source.end.offset++;let f=0;for(;o[f][0]!=="word";)f===o.length-1&&this.unknownWord([o[f]]),f++;s.raws.before+=m(o,0,f),s.source.start=this.getPosition(o[f][2]);let g=f;for(;f<o.length;){let w=o[f][0];if(w===":"||w==="space"||w==="comment")break;f++}s.prop=m(o,g,f);let b=f,y;for(;f<o.length&&(y=o[f],f++,y[0]!==":");)y[0]==="word"&&/\w/.test(y[1])&&this.unknownWord([y]);s.raws.between=m(o,b,f),(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let v=f;for(;f<o.length;){let w=o[f][0];if(w!=="space"&&w!=="comment")break;f++}let E=o.slice(v,f);o=o.slice(f),this.precheckMissedSemicolon(o);for(let w=o.length-1;w>=0;w--){if(y=o[w],y[1].toLowerCase()==="!important"){s.important=!0;let C=this.stringFrom(o,w);C=this.spacesFromEnd(o)+C,C!==" !important"&&(s.raws.important=C);break}else if(y[1].toLowerCase()==="important"){let C=o.slice(0),M="";for(let R=w;R>0;R--){let x=C[R][0];if(M.trim().startsWith("!")&&x!=="space")break;M=C.pop()[1]+M}M.trim().startsWith("!")&&(s.important=!0,s.raws.important=M,o=C)}if(y[0]!=="space"&&y[0]!=="comment")break}o.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(s.raws.between+=E.map(w=>w[1]).join(""),E=[]),this.raw(s,"value",E.concat(o),n),s.value.includes(":")&&!n&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let n=new a;this.init(n,o[2]),n.selector="",n.raws.between="",this.current=n}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(o[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(o){let n=this.input.fromOffset(o);return{column:n.col,line:n.line,offset:o}}init(o,n){this.current.push(o),o.source={input:this.input,start:this.getPosition(n)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let n=!1,s=null,l=!1,f=null,g=[],b=o[1].startsWith("--"),y=[],v=o;for(;v;){if(s=v[0],y.push(v),s==="("||s==="[")f||(f=v),g.push(s==="("?")":"]");else if(b&&l&&s==="{")f||(f=v),g.push("}");else if(g.length===0)if(s===";")if(l){this.decl(y,b);return}else break;else if(s==="{"){this.rule(y);return}else if(s==="}"){this.tokenizer.back(y.pop()),n=!0;break}else s===":"&&(l=!0);else s===g[g.length-1]&&(g.pop(),g.length===0&&(f=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),g.length>0&&this.unclosedBracket(f),n&&l){if(!b)for(;y.length&&(v=y[y.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,b)}else this.unknownWord(y)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,n,s,l){let f,g,b=s.length,y="",v=!0,E,S;for(let w=0;w<b;w+=1)f=s[w],g=f[0],g==="space"&&w===b-1&&!l?v=!1:g==="comment"?(S=s[w-1]?s[w-1][0]:"empty",E=s[w+1]?s[w+1][0]:"empty",!c[S]&&!c[E]?y.slice(-1)===","?v=!1:y+=f[1]:v=!1):y+=f[1];if(!v){let w=s.reduce((C,M)=>C+M[1],"");o.raws[n]={raw:w,value:y}}o[n]=y}rule(o){o.pop();let n=new a;this.init(n,o[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(n,"selector",o),this.current=n}spacesAndCommentsFromEnd(o){let n,s="";for(;o.length&&(n=o[o.length-1][0],!(n!=="space"&&n!=="comment"));)s=o.pop()[1]+s;return s}spacesAndCommentsFromStart(o){let n,s="";for(;o.length&&(n=o[0][0],!(n!=="space"&&n!=="comment"));)s+=o.shift()[1];return s}spacesFromEnd(o){let n,s="";for(;o.length&&(n=o[o.length-1][0],n==="space");)s=o.pop()[1]+s;return s}stringFrom(o,n){let s="";for(let l=n;l<o.length;l++)s+=o[l][1];return o.splice(n,o.length-n),s}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}}return es=d,es}var ts,Cn;function $s(){if(Cn)return ts;Cn=1;let e=$e(),t=sr(),r=lu();function i(a,u){let c=new t(a,u),h=new r(c);try{h.parse()}catch(m){throw m}return h.root}return ts=i,i.default=i,e.registerParse(i),ts}var rs,En;function To(){if(En)return rs;En=1;let e=$e(),{my:t}=Kt();class r{constructor(a,u={}){if(this.type="warning",this.text=a,u.node&&u.node.source){u.node[t]||e.rebuild(u.node);let c=u.node.rangeBy(u);this.line=c.start.line,this.column=c.start.column,this.endLine=c.end.line,this.endColumn=c.end.column}for(let c in u)this[c]=u[c]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return rs=r,r.default=r,rs}var ss,xn;function zs(){if(xn)return ss;xn=1;let e=To();class t{get content(){return this.css}constructor(i,a,u){this.processor=i,this.messages=[],this.root=a,this.opts=u,this.css="",this.map=void 0}toString(){return this.css}warn(i,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let u=new e(i,a);return this.messages.push(u),u}warnings(){return this.messages.filter(i=>i.type==="warning")}}return ss=t,t.default=t,ss}var is,Rn;function Do(){if(Rn)return is;Rn=1;let e={};return is=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},is}var ns,Mn;function Ao(){if(Mn)return ns;Mn=1;let e=$e(),t=Us(),r=No(),i=$s(),a=zs(),u=ft(),c=Zt(),{isClean:h,my:m}=Kt(),d=Do();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},n={Once:!0,postcssPlugin:!0,prepare:!0},s=0;function l(E){return typeof E=="object"&&typeof E.then=="function"}function f(E){let S=!1,w=p[E.type];return E.type==="decl"?S=E.prop.toLowerCase():E.type==="atrule"&&(S=E.name.toLowerCase()),S&&E.append?[w,w+"-"+S,s,w+"Exit",w+"Exit-"+S]:S?[w,w+"-"+S,w+"Exit",w+"Exit-"+S]:E.append?[w,s,w+"Exit"]:[w,w+"Exit"]}function g(E){let S;return E.type==="document"?S=["Document",s,"DocumentExit"]:E.type==="root"?S=["Root",s,"RootExit"]:S=f(E),{eventIndex:0,events:S,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){let S=[E];for(;S.length>0;){let w=S.pop();if(w[h]=!1,w.nodes)for(let C of w.nodes)S.push(C)}return E}let y={};class v{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(S,w,C){this.stringified=!1,this.processed=!1;let M;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))M=b(w);else if(w instanceof v||w instanceof a)M=b(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let R=i;C.syntax&&(R=C.syntax.parse),C.parser&&(R=C.parser),R.parse&&(R=R.parse);try{M=R(w,C)}catch(x){this.processed=!0,this.error=x}M&&!M[m]&&e.rebuild(M)}this.result=new a(S,M,C),this.helpers=de(B({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(R=>typeof R=="object"&&R.prepare?B(B({},R),R.prepare(this.result)):R)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,w){let C=this.result.lastPlugin;try{w&&w.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin?(S.plugin=C.postcssPlugin,S.setMessage()):C.postcssVersion}catch(M){console&&console.error&&console.error(M)}return S}prepareVisitors(){this.listeners={};let S=(w,C,M)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,M])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!o[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!n[C])if(typeof w[C]=="object")for(let M in w[C])M==="*"?S(w,C,w[C][M]):S(w,C+"-"+M.toLowerCase(),w[C][M]);else typeof w[C]=="function"&&S(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let w=this.plugins[S],C=this.runOnRoot(w);if(l(C))try{await C}catch(M){throw this.handleError(M)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[h];){S[h]=!0;let w=[g(S)];for(;w.length>0;){let C=this.visitTick(w);if(l(C))try{await C}catch(M){let R=w[w.length-1].node;throw this.handleError(M,R)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(S.type==="document"){let M=S.nodes.map(R=>C(R,this.helpers));await Promise.all(M)}else await C(S,this.helpers)}catch(M){throw this.handleError(M)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>S.Once(C,this.helpers));return l(w[0])?Promise.all(w):w}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,w=c;S.syntax&&(w=S.syntax.stringify),S.stringifier&&(w=S.stringifier),w.stringify&&(w=w.stringify);let C=this.result.root.source;if(S.map===void 0&&!(C&&C.input&&C.input.map)){let x="";return w(this.result.root,D=>{x+=D}),this.result.css=x,this.result}let R=new r(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let w=this.runOnRoot(S);if(l(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[h];)S[h]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let w of S.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,w){return this.async().then(S,w)}toString(){return this.css}visitSync(S,w){for(let[C,M]of S){this.result.lastPlugin=C;let R;try{R=M(w,this.helpers)}catch(x){throw this.handleError(x,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(l(R))throw this.getAsyncError()}}visitTick(S){let w=S[S.length-1],{node:C,visitors:M}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){S.pop();return}if(M.length>0&&w.visitorIndex<M.length){let[x,D]=M[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===M.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=x;try{return D(C.toProxy(),this.helpers)}catch(T){throw this.handleError(T,C)}}if(w.iterator!==0){let x=w.iterator;w.descending&&(w.descending=!1,C.indexes[x]+=1);let D;for(;D=C.nodes[C.indexes[x]];){if(!D[h]){D[h]=!0,w.descending=!0,S.push(g(D));return}C.indexes[x]+=1}w.iterator=0,delete C.indexes[x]}let R=w.events;for(;w.eventIndex<R.length;){let x=R[w.eventIndex];if(w.eventIndex+=1,x===s){C.nodes&&C.nodes.length&&(C[h]=!0,w.iterator=C.getIterator());return}else if(this.listeners[x]){w.visitors=this.listeners[x];return}}S.pop()}walkSync(S){S[h]=!0;let w=[{eventIndex:0,events:f(S),iterator:0,node:S}];for(;w.length>0;){let C=w[w.length-1],M=C.node;if(C.iterator!==0){let R=C.iterator;C.descending&&(C.descending=!1,M.indexes[R]+=1);let x,D=!1;for(;x=M.nodes[M.indexes[R]];){if(!x[h]){x[h]=!0,C.descending=!0,w.push({eventIndex:0,events:f(x),iterator:0,node:x}),D=!0;break}M.indexes[R]+=1}if(D)continue;C.iterator=0,delete M.indexes[R]}if(C.eventIndex<C.events.length){let R=C.events[C.eventIndex];if(C.eventIndex+=1,R===s)M.nodes&&M.nodes.length&&(C.iterator=M.getIterator());else{let x=this.listeners[R];x&&this.visitSync(x,M.toProxy())&&w.pop()}continue}w.pop()}}warnings(){return this.sync().warnings()}}return v.registerPostcss=E=>{y=E},ns=v,v.default=v,u.registerLazyResult(v),t.registerLazyResult(v),ns}var os,In;function uu(){if(In)return os;In=1;let e=No(),t=$s(),r=zs(),i=Zt(),a=Do();class u{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let h,m=t;try{h=m(this._css,this._opts)}catch(d){this.error=d}if(this.error)throw this.error;return this._root=h,h}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(h,m,d){m=m.toString(),this.stringified=!1,this._processor=h,this._css=m,this._opts=d,this._map=void 0;let p=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=m;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(p,void 0,this._opts,m);if(n.isMap()){let[s,l]=n.generate();s&&(this.result.css=s),l&&(this.result.map=l)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(h){return this.async().catch(h)}finally(h){return this.async().then(h,h)}sync(){if(this.error)throw this.error;return this.result}then(h,m){return this.async().then(h,m)}toString(){return this._css}warnings(){return[]}}return os=u,u.default=u,os}var as,On;function cu(){if(On)return as;On=1;let e=Us(),t=Ao(),r=uu(),i=ft();class a{constructor(c=[]){this.version="8.5.25",this.plugins=this.normalize(c)}normalize(c){let h=[];for(let m of c)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))h=h.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)h.push(m);else if(typeof m=="function")h.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return h}process(c,h={}){return!this.plugins.length&&!h.parser&&!h.stringifier&&!h.syntax?new r(this,c,h):new t(this,c,h)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return as=a,a.default=a,i.registerProcessor(a),e.registerProcessor(a),as}var ls,Nn;function hu(){if(Nn)return ls;Nn=1;let e=Bs(),t=tr(),r=$e(),i=Fs(),a=rr(),u=Us(),c=ou(),h=sr(),m=Ao(),d=Oo(),p=er(),o=$s(),n=cu(),s=zs(),l=ft(),f=Ws(),g=Zt(),b=To();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new n(v)}return y.plugin=function(E,S){let w=!1;function C(...R){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
58
58
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
59
|
-
https://www.w3ctech.com/topic/2226`));let x=S(...R);return x.postcssPlugin=E,x.postcssVersion=new n().version,x}let M;return Object.defineProperty(C,"postcss",{get(){return M||(M=C()),M}}),C.process=function(R,x,D){return y([C(D)]).process(R,x)},C},y.stringify=g,y.parse=o,y.fromJSON=c,y.list=d,y.comment=v=>new t(v),y.atRule=v=>new e(v),y.decl=v=>new a(v),y.rule=v=>new h(v),y.root=v=>new l(v),y.document=v=>new u(v),y.CssSyntaxError=s,y.Declaration=a,y.Container=r,y.Processor=n,y.Document=u,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=i,y.Input=f,y.Rule=h,y.Root=l,y.Node=p,m.registerPostcss(y),oi=y,y.default=y,oi}var cu=uu();const K=Zl(cu);K.stringify;K.fromJSON;K.plugin;K.parse;K.list;K.document;K.comment;K.atRule;K.rule;K.decl;K.root;K.CssSyntaxError;K.Declaration;K.Container;K.Processor;K.Document;K.Comment;K.Warning;K.AtRule;K.Result;K.Input;K.Rule;K.Root;K.Node;var $=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function hu(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,a=/\/\*.*?\*\//g;return e.replace(a,"").split(r).forEach(function(u){if(u){const c=u.split(s);c.length>1&&(t[gi(c[0].trim())]=c[1].trim())}}),t}function On(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const a=mu(r);t.push(`${a}: ${s};`)}return t.join(" ")}const fu=/-([a-z])/g,du=/^--[a-zA-Z0-9-]+$/,gi=e=>du.test(e)?e:e.replace(fu,(t,r)=>r?r.toUpperCase():""),pu=/\B([A-Z])/g,mu=e=>e.replace(pu,"-$1").toLowerCase();class be{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof be){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class $i extends be{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",$.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=zi(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(u=>u.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const a=ko(this,t,r);return a.parentElement=null,a}removeChild(t){return Po(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new $i}createDocumentType(t,r,s){const a=new To(t,r,s);return a.ownerDocument=this,a}createElement(t){const r=new rr(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new Do(t);return r.ownerDocument=this,r}createComment(t){const r=new Ao(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new _o(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class To extends be{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",$.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class rr extends be{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",$.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new wu(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?hu(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,a,u)=>{if(r.test(s))return;const c=gi(s);a?t[c]=a:delete t[c],u==="important"&&(t[c]+=" !important"),this.attributes.style=On(t)},t.removeProperty=s=>{if(r.test(s))return"";const a=gi(s),u=t[a]||"";return delete t[a],this.attributes.style=On(t),u},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return zi(this,t)}insertBefore(t,r){return ko(this,t,r)}removeChild(t){return Po(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class gu extends rr{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class yu extends rr{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Do extends be{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",$.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Ao extends be{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",$.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class _o extends be{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",$.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class wu{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const a of s){const u=String(a);this.classes.indexOf(u)>=0||this.classes.push(u)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(a=>s.indexOf(a)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function zi(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function ko(e,t,r){if(!r)return zi(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Po(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var fe=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(fe||{});const Et=new Map,Nn=new WeakSet;function Tn(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Lo(e){if(Nn.has(e))return;Nn.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...s){const a=Et.get(e);a&&(a.cancelled=!0);const u=()=>{s.length===2&&Tn(r)&&s.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...s)};if(Tn(r)&&!r.complete){const c={cancelled:!1};Et.set(e,c);const f=()=>{c.cancelled||(Et.delete(e),u())},m=()=>{if(!c.cancelled){Et.delete(e);try{u()}catch(d){}}};r.onload=f,r.onerror=m}else u()}}Date.now().toString();const yi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},vu={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Ee=null;function Ft(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=bu(e,t,r,s),Fo(e,t,r,s),Su(e,t,r)}function bu(e,t,r,s){var a;if(r.afterAppend&&!Ee&&(Ee=new WeakSet,setTimeout(()=>{Ee=null},0)),!ji(e,t)){const u=Bt(t,r.mirror,s);(a=e.parentNode)==null||a.replaceChild(u,e),e=u}switch(t.RRNodeType){case $.Document:{if(!Ve(e,t,r.mirror,s)){const u=s.getMeta(t);u&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,u),Ee==null||Ee.add(e))}break}case $.Element:{const u=e,c=t;switch(c.tagName){case"IFRAME":{const f=e.contentDocument;if(!f)break;Ft(f,t.contentDocument,r,s);break}}c.shadowRoot&&(u.shadowRoot||u.attachShadow({mode:"open"}),Fo(u.shadowRoot,c.shadowRoot,r,s)),Cu(u,c,s);break}}return e}function Su(e,t,r){var s;switch(t.RRNodeType){case $.Document:{const a=t.scrollData;a&&r.applyScroll(a,!0);break}case $.Element:{const a=e,u=t;switch(u.scrollData&&r.applyScroll(u.scrollData,!0),u.inputData&&r.applyInput(u.inputData),u.tagName){case"AUDIO":case"VIDEO":{const c=e,f=u;f.paused!==void 0&&(f.paused?c.pause():c.play()),f.muted!==void 0&&(c.muted=f.muted),f.volume!==void 0&&(c.volume=f.volume),f.currentTime!==void 0&&(c.currentTime=f.currentTime),f.playbackRate!==void 0&&(c.playbackRate=f.playbackRate),f.loop!==void 0&&(c.loop=f.loop);break}case"CANVAS":{const c=t;if(c.rr_dataURL!==null){const f=document.createElement("img");f.src=c.rr_dataURL;const m=a.getContext("2d");m&&(Lo(m),m.drawImage(f,0,0))}c.canvasMutations.forEach(f=>r.applyCanvas(f.event,f.mutation,e));break}case"STYLE":{const c=a.sheet;c&&t.rules.forEach(f=>r.applyStyleSheetMutation(f,c));break}case"DIALOG":{const c=a,f=u,m=c.open,d=c.matches("dialog:modal"),p=f.open,o=f.isModal,n=d!==o,i=m!==p;if((n||m&&i)&&c.close(),p&&(i||n))try{o?c.showModal():c.show()}catch(l){console.warn(l)}break}}break}case $.Text:case $.Comment:case $.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}Ee!=null&&Ee.has(e)&&(Ee.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function Cu(e,t,r){const s=e.attributes,a=t.attributes;for(const u in a){const c=a[u],f=r.getMeta(t);if(f!=null&&f.isSVG&&yi[u])e.setAttributeNS(yi[u],u,c);else if(t.tagName==="CANVAS"&&u==="rr_dataURL"){const m=document.createElement("img");m.src=c;const d=e.getContext("2d");d&&(Lo(d),d.drawImage(m,0,0))}else{if(t.tagName==="IFRAME"&&u==="srcdoc")continue;try{e.setAttribute(u,c)}catch(m){console.warn(m)}}}for(const{name:u}of Array.from(s))u in a||e.removeAttribute(u);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Fo(e,t,r,s){const a=Array.from(e.childNodes),u=t.childNodes;if(a.length===0&&u.length===0)return;let c=0,f=a.length-1,m=0,d=u.length-1,p=a[c],o=a[f],n=u[m],i=u[d],l,h;for(;c<=f&&m<=d;)if(p===void 0)p=a[++c];else if(o===void 0)o=a[--f];else if(Ve(p,n,r.mirror,s))p=a[++c],n=u[++m];else if(Ve(o,i,r.mirror,s))o=a[--f],i=u[--d];else if(Ve(p,i,r.mirror,s)){try{e.insertBefore(p,o.nextSibling)}catch(y){console.warn(y)}p=a[++c],i=u[--d]}else if(Ve(o,n,r.mirror,s)){try{e.insertBefore(o,p)}catch(y){console.warn(y)}o=a[--f],n=u[++m]}else{if(!l){l={};for(let v=c;v<=f;v++){const E=a[v];E&&r.mirror.hasNode(E)&&(l[r.mirror.getId(E)]=v)}}h=l[s.getId(n)];const y=a[h];if(h!==void 0&&y&&Ve(y,n,r.mirror,s)){try{e.insertBefore(y,p)}catch(v){console.warn(v)}a[h]=void 0}else{const v=Bt(n,r.mirror,s);e.nodeName==="#document"&&p&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&p.nodeType===p.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&p.nodeType===p.ELEMENT_NODE)&&(e.removeChild(p),r.mirror.removeNodeFromMap(p),p=a[++c]);try{e.insertBefore(v,p||null)}catch(E){console.warn(E)}}n=u[++m]}if(c>f){const y=u[d+1];let v=null;for(y&&(v=r.mirror.getNode(s.getId(y)));m<=d;++m){const E=Bt(u[m],r.mirror,s);try{e.insertBefore(E,v)}catch(S){console.warn(S)}}}else if(m>d)for(;c<=f;c++){const y=a[c];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(v){console.warn(v)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)Ft(g,b,r,s),g=g.nextSibling,b=b.nextSibling}function Bt(e,t,r){const s=r.getId(e),a=r.getMeta(e);let u=null;if(s>-1&&(u=t.getNode(s)),u!==null&&ji(u,e))return u;switch(e.RRNodeType){case $.Document:u=new Document;break;case $.DocumentType:u=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let c=e.tagName.toLowerCase();c=vu[c]||c,a&&"isSVG"in a&&(a!=null&&a.isSVG)?u=document.createElementNS(yi.svg,c):u=document.createElement(e.tagName);break}case $.Text:u=document.createTextNode(e.data);break;case $.Comment:u=document.createComment(e.data);break;case $.CDATA:u=document.createCDATASection(e.data);break}a&&t.add(u,L({},a));try{Ee==null||Ee.add(u)}catch(c){}return u}function ji(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Ve(e,t,r,s){const a=r.getId(e),u=s.getId(t);return a===-1||a!==u?!1:ji(e,t)}class et extends $i{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",ku()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new et}createDocumentType(t,r,s){const a=new Eu(t,r,s);return a.ownerDocument=this,a}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new xu(r);break;case"IFRAME":s=new Ou(r,this.mirror);break;case"CANVAS":s=new Mu(r);break;case"STYLE":s=new Iu(r);break;case"DIALOG":s=new Ru(r);break;default:s=new ir(r);break}return s.ownerDocument=this,s}createComment(t){const r=new Tu(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Du(t);return r.ownerDocument=this,r}createTextNode(t){const r=new Nu(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Eu=To;class ir extends rr{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class xu extends gu{}class Ru extends yu{}class Mu extends ir{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Iu extends ir{constructor(){super(...arguments),A(this,"rules",[])}}class Ou extends ir{constructor(t,r){super(t),A(this,"contentDocument",new et),this.contentDocument.mirror=r}}const Nu=Do,Tu=Ao,Du=_o;function Au(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Bo(e,t,r,s){let a;switch(e.nodeType){case fe.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?a=s.contentDocument:(a=t,a.compatMode=e.compatMode);break;case fe.DOCUMENT_TYPE_NODE:{const c=e;a=t.createDocumentType(c.name,c.publicId,c.systemId);break}case fe.ELEMENT_NODE:{const c=e,f=Au(c);a=t.createElement(f);const m=a;for(const{name:d,value:p}of Array.from(c.attributes))m.attributes[d]=p;c.scrollLeft&&(m.scrollLeft=c.scrollLeft),c.scrollTop&&(m.scrollTop=c.scrollTop);break}case fe.TEXT_NODE:a=t.createTextNode(e.textContent||"");break;case fe.CDATA_SECTION_NODE:a=t.createCDATASection(e.data);break;case fe.COMMENT_NODE:a=t.createComment(e.textContent||"");break;case fe.DOCUMENT_FRAGMENT_NODE:a=s.attachShadow({mode:"open"});break;default:return null}let u=r.getMeta(e);return t instanceof et&&(u||(u=Uo(a,t.unserializedId),r.add(e,u)),t.mirror.add(a,L({},u))),a}function _u(e,t=Ql(),r=new et){function s(a,u){const c=Bo(a,r,t,u);if(c!==null)if((u==null?void 0:u.nodeName)!=="IFRAME"&&a.nodeType!==fe.DOCUMENT_FRAGMENT_NODE&&(u==null||u.appendChild(c),c.parentNode=u,c.parentElement=u),a.nodeName==="IFRAME"){const f=a.contentDocument;f&&s(f,c)}else(a.nodeType===fe.DOCUMENT_NODE||a.nodeType===fe.ELEMENT_NODE||a.nodeType===fe.DOCUMENT_FRAGMENT_NODE)&&(a.nodeType===fe.ELEMENT_NODE&&a.shadowRoot&&s(a.shadowRoot,c),a.childNodes.forEach(f=>s(f,c)))}return s(e,null),r}function ku(){return new Pu}class Pu{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const a=this.nodeMetaMap.get(s);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Uo(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const xt=new Map,Dn=new WeakSet;function An(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Wo(e){if(Dn.has(e))return;Dn.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...s){const a=xt.get(e);a&&(a.cancelled=!0);const u=()=>{s.length===2&&An(r)&&s.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...s)};if(An(r)&&!r.complete){const c={cancelled:!1};xt.set(e,c);const f=()=>{c.cancelled||(xt.delete(e),u())},m=()=>{if(!c.cancelled){xt.delete(e);try{u()}catch(d){}}};r.onload=f,r.onerror=m}else u()}}const _n={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Rt={},$o={},Lu=()=>!!globalThis.Zone;function Vi(e){if(Rt[e])return Rt[e];const t=globalThis[e],r=t.prototype,s=e in _n?_n[e]:void 0,a=!!(s&&s.every(f=>{var m,d;return!!((d=(m=Object.getOwnPropertyDescriptor(r,f))==null?void 0:m.get)!=null&&d.toString().includes("[native code]"))})),u=e in kn?kn[e]:void 0,c=!!(u&&u.every(f=>{var m;return typeof r[f]=="function"&&((m=r[f])==null?void 0:m.toString().includes("[native code]"))}));if(a&&c&&!Lu())return Rt[e]=t.prototype,t.prototype;try{const f=document.createElement("iframe");f.style.display="none",document.body.appendChild(f);const m=f.contentWindow;if(!m)return t.prototype;const d=m[e].prototype;if(!d)return f.remove(),r;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(f.classList.add("rr-block"),f.setAttribute("__rrwebUntaintedMutationObserver",""),$o[e]=()=>f.remove()):f.remove(),Rt[e]=d}catch(f){return r}}const ai={};function Oe(e,t,r){var s;const a=`${e}.${String(r)}`;if(ai[a])return ai[a].call(t);const u=Vi(e),c=(s=Object.getOwnPropertyDescriptor(u,r))==null?void 0:s.get;return c?(ai[a]=c,c.call(t)):t[r]}const li={};function zo(e,t,r){const s=`${e}.${String(r)}`;if(li[s])return li[s].bind(t);const u=Vi(e)[r];return typeof u!="function"?t[r]:(li[s]=u,u.bind(t))}function Fu(e){return Oe("Node",e,"ownerDocument")}function Bu(e){return Oe("Node",e,"childNodes")}function Uu(e){return Oe("Node",e,"parentNode")}function Wu(e){return Oe("Node",e,"parentElement")}function $u(e){return Oe("Node",e,"textContent")}function zu(e,t){return zo("Node",e,"contains")(t)}function ju(e){return zo("Node",e,"getRootNode")()}function Vu(e){return!e||!("host"in e)?null:Oe("ShadowRoot",e,"host")}function qu(e){return e.styleSheets}function Gu(e){return!e||!("shadowRoot"in e)?null:Oe("Element",e,"shadowRoot")}function Hu(e,t){return Oe("Element",e,"querySelector")(t)}function Yu(e,t){return Oe("Element",e,"querySelectorAll")(t)}function jo(){var e;return[Vi("MutationObserver").constructor,(e=$o.MutationObserver)!=null?e:(()=>{})]}let Ze=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ze=()=>new Date().getTime());function $e(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],a=r(s);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=a,()=>{e[t]=s}}catch(s){return()=>{}}}const W={ownerDocument:Fu,childNodes:Bu,parentNode:Uu,parentElement:Wu,textContent:$u,contains:zu,getRootNode:ju,host:Vu,styleSheets:qu,shadowRoot:Gu,querySelector:Hu,querySelectorAll:Yu,nowTimestamp:Ze,mutationObserverCtor:jo,patch:$e,wrapCanvasContextDrawImage:Wo};function le(e,t,r=document){const s={capture:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const qe=`Please stop import mirror directly. Instead of that,\r
|
|
59
|
+
https://www.w3ctech.com/topic/2226`));let x=S(...R);return x.postcssPlugin=E,x.postcssVersion=new n().version,x}let M;return Object.defineProperty(C,"postcss",{get(){return M||(M=C()),M}}),C.process=function(R,x,D){return y([C(D)]).process(R,x)},C},y.stringify=g,y.parse=o,y.fromJSON=c,y.list=d,y.comment=v=>new t(v),y.atRule=v=>new e(v),y.decl=v=>new a(v),y.rule=v=>new f(v),y.root=v=>new l(v),y.document=v=>new u(v),y.CssSyntaxError=i,y.Declaration=a,y.Container=r,y.Processor=n,y.Document=u,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=s,y.Input=h,y.Rule=f,y.Root=l,y.Node=p,m.registerPostcss(y),ls=y,y.default=y,ls}var fu=hu();const ue=eu(fu);ue.stringify;ue.fromJSON;ue.plugin;ue.parse;ue.list;ue.document;ue.comment;ue.atRule;ue.rule;ue.decl;ue.root;ue.CssSyntaxError;ue.Declaration;ue.Container;ue.Processor;ue.Document;ue.Comment;ue.Warning;ue.AtRule;ue.Result;ue.Input;ue.Rule;ue.Root;ue.Node;var Y=(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))(Y||{});function du(e){const t={},r=/;(?![^(]*\))/g,i=/:(.+)/,a=/\/\*.*?\*\//g;return e.replace(a,"").split(r).forEach(function(u){if(u){const c=u.split(i);c.length>1&&(t[ws(c[0].trim())]=c[1].trim())}}),t}function Tn(e){const t=[];for(const r in e){const i=e[r];if(typeof i!="string")continue;const a=yu(r);t.push(`${a}: ${i};`)}return t.join(" ")}const pu=/-([a-z])/g,mu=/^--[a-zA-Z0-9-]+$/,ws=e=>mu.test(e)?e:e.replace(pu,(t,r)=>r?r.toUpperCase():""),gu=/\B([A-Z])/g,yu=e=>e.replace(gu,"-$1").toLowerCase();class Me{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof Me){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Vs extends Me{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",Y.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===Y.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===Y.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===Y.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===Y.Element||r===Y.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===Y.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=js(this,t);return i.parentElement=null,i}insertBefore(t,r){const i=t.RRNodeType;if((i===Y.Element||i===Y.DocumentType)&&this.childNodes.some(u=>u.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===Y.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const a=Fo(this,t,r);return a.parentElement=null,a}removeChild(t){return Bo(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const i=this.createDocumentType("html",r,"");this.open(),this.appendChild(i)}}createDocument(t,r,i){return new Vs}createDocumentType(t,r,i){const a=new _o(t,r,i);return a.ownerDocument=this,a}createElement(t){const r=new ir(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new ko(t);return r.ownerDocument=this,r}createComment(t){const r=new Po(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Lo(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class _o extends Me{constructor(t,r,i){super(),A(this,"nodeType",10),A(this,"RRNodeType",Y.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=i,this.nodeName=t}toString(){return"RRDocumentType"}}class ir extends Me{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",Y.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new bu(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?du(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(i,a,u)=>{if(r.test(i))return;const c=ws(i);a?t[c]=a:delete t[c],u==="important"&&(t[c]+=" !important"),this.attributes.style=Tn(t)},t.removeProperty=i=>{if(r.test(i))return"";const a=ws(i),u=t[a]||"";return delete t[a],this.attributes.style=Tn(t),u},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,i){this.setAttribute(r,i)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return js(this,t)}insertBefore(t,r){return Fo(this,t,r)}removeChild(t){return Bo(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class wu extends ir{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class vu extends ir{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class ko extends Me{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",Y.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Po extends Me{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",Y.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Lo extends Me{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",Y.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class bu{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...i)=>{for(const a of i){const u=String(a);this.classes.indexOf(u)>=0||this.classes.push(u)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...i)=>{this.classes=this.classes.filter(a=>i.indexOf(a)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=r}}function js(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function Fo(e,t,r){if(!r)return js(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Bo(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var Se=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(Se||{});const Rt=new Map,Dn=new WeakSet;function An(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Uo(e){if(Dn.has(e))return;Dn.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...i){const a=Rt.get(e);a&&(a.cancelled=!0);const u=()=>{i.length===2&&An(r)&&i.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...i)};if(An(r)&&!r.complete){const c={cancelled:!1};Rt.set(e,c);const h=()=>{c.cancelled||(Rt.delete(e),u())},m=()=>{if(!c.cancelled){Rt.delete(e);try{u()}catch(d){}}};r.onload=h,r.onerror=m}else u()}}Date.now().toString();const vs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Su={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Ie=null;function Ut(e,t,r,i=t.mirror||t.ownerDocument.mirror){e=Cu(e,t,r,i),Wo(e,t,r,i),Eu(e,t,r)}function Cu(e,t,r,i){var a;if(r.afterAppend&&!Ie&&(Ie=new WeakSet,setTimeout(()=>{Ie=null},0)),!qs(e,t)){const u=Wt(t,r.mirror,i);(a=e.parentNode)==null||a.replaceChild(u,e),e=u}switch(t.RRNodeType){case Y.Document:{if(!He(e,t,r.mirror,i)){const u=i.getMeta(t);u&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,u),Ie==null||Ie.add(e))}break}case Y.Element:{const u=e,c=t;switch(c.tagName){case"IFRAME":{const h=e.contentDocument;if(!h)break;Ut(h,t.contentDocument,r,i);break}}c.shadowRoot&&(u.shadowRoot||u.attachShadow({mode:"open"}),Wo(u.shadowRoot,c.shadowRoot,r,i)),xu(u,c,i);break}}return e}function Eu(e,t,r){var i;switch(t.RRNodeType){case Y.Document:{const a=t.scrollData;a&&r.applyScroll(a,!0);break}case Y.Element:{const a=e,u=t;switch(u.scrollData&&r.applyScroll(u.scrollData,!0),u.inputData&&r.applyInput(u.inputData),u.tagName){case"AUDIO":case"VIDEO":{const c=e,h=u;h.paused!==void 0&&(h.paused?c.pause():c.play()),h.muted!==void 0&&(c.muted=h.muted),h.volume!==void 0&&(c.volume=h.volume),h.currentTime!==void 0&&(c.currentTime=h.currentTime),h.playbackRate!==void 0&&(c.playbackRate=h.playbackRate),h.loop!==void 0&&(c.loop=h.loop);break}case"CANVAS":{const c=t;if(c.rr_dataURL!==null){const h=document.createElement("img");h.src=c.rr_dataURL;const m=a.getContext("2d");m&&(Uo(m),m.drawImage(h,0,0))}c.canvasMutations.forEach(h=>r.applyCanvas(h.event,h.mutation,e));break}case"STYLE":{const c=a.sheet;c&&t.rules.forEach(h=>r.applyStyleSheetMutation(h,c));break}case"DIALOG":{const c=a,h=u,m=c.open,d=c.matches("dialog:modal"),p=h.open,o=h.isModal,n=d!==o,s=m!==p;if((n||m&&s)&&c.close(),p&&(s||n))try{o?c.showModal():c.show()}catch(l){console.warn(l)}break}}break}case Y.Text:case Y.Comment:case Y.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}Ie!=null&&Ie.has(e)&&(Ie.delete(e),(i=r.afterAppend)==null||i.call(r,e,r.mirror.getId(e)))}function xu(e,t,r){const i=e.attributes,a=t.attributes;for(const u in a){const c=a[u],h=r.getMeta(t);if(h!=null&&h.isSVG&&vs[u])e.setAttributeNS(vs[u],u,c);else if(t.tagName==="CANVAS"&&u==="rr_dataURL"){const m=document.createElement("img");m.src=c;const d=e.getContext("2d");d&&(Uo(d),d.drawImage(m,0,0))}else{if(t.tagName==="IFRAME"&&u==="srcdoc")continue;try{e.setAttribute(u,c)}catch(m){console.warn(m)}}}for(const{name:u}of Array.from(i))u in a||e.removeAttribute(u);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Wo(e,t,r,i){const a=Array.from(e.childNodes),u=t.childNodes;if(a.length===0&&u.length===0)return;let c=0,h=a.length-1,m=0,d=u.length-1,p=a[c],o=a[h],n=u[m],s=u[d],l,f;for(;c<=h&&m<=d;)if(p===void 0)p=a[++c];else if(o===void 0)o=a[--h];else if(He(p,n,r.mirror,i))p=a[++c],n=u[++m];else if(He(o,s,r.mirror,i))o=a[--h],s=u[--d];else if(He(p,s,r.mirror,i)){try{e.insertBefore(p,o.nextSibling)}catch(y){console.warn(y)}p=a[++c],s=u[--d]}else if(He(o,n,r.mirror,i)){try{e.insertBefore(o,p)}catch(y){console.warn(y)}o=a[--h],n=u[++m]}else{if(!l){l={};for(let v=c;v<=h;v++){const E=a[v];E&&r.mirror.hasNode(E)&&(l[r.mirror.getId(E)]=v)}}f=l[i.getId(n)];const y=a[f];if(f!==void 0&&y&&He(y,n,r.mirror,i)){try{e.insertBefore(y,p)}catch(v){console.warn(v)}a[f]=void 0}else{const v=Wt(n,r.mirror,i);e.nodeName==="#document"&&p&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&p.nodeType===p.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&p.nodeType===p.ELEMENT_NODE)&&(e.removeChild(p),r.mirror.removeNodeFromMap(p),p=a[++c]);try{e.insertBefore(v,p||null)}catch(E){console.warn(E)}}n=u[++m]}if(c>h){const y=u[d+1];let v=null;for(y&&(v=r.mirror.getNode(i.getId(y)));m<=d;++m){const E=Wt(u[m],r.mirror,i);try{e.insertBefore(E,v)}catch(S){console.warn(S)}}}else if(m>d)for(;c<=h;c++){const y=a[c];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(v){console.warn(v)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)Ut(g,b,r,i),g=g.nextSibling,b=b.nextSibling}function Wt(e,t,r){const i=r.getId(e),a=r.getMeta(e);let u=null;if(i>-1&&(u=t.getNode(i)),u!==null&&qs(u,e))return u;switch(e.RRNodeType){case Y.Document:u=new Document;break;case Y.DocumentType:u=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case Y.Element:{let c=e.tagName.toLowerCase();c=Su[c]||c,a&&"isSVG"in a&&(a!=null&&a.isSVG)?u=document.createElementNS(vs.svg,c):u=document.createElement(e.tagName);break}case Y.Text:u=document.createTextNode(e.data);break;case Y.Comment:u=document.createComment(e.data);break;case Y.CDATA:u=document.createCDATASection(e.data);break}a&&t.add(u,B({},a));try{Ie==null||Ie.add(u)}catch(c){}return u}function qs(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function He(e,t,r,i){const a=r.getId(e),u=i.getId(t);return a===-1||a!==u?!1:qs(e,t)}class st extends Vs{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Lu()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,i){return new st}createDocumentType(t,r,i){const a=new Ru(t,r,i);return a.ownerDocument=this,a}createElement(t){const r=t.toUpperCase();let i;switch(r){case"AUDIO":case"VIDEO":i=new Mu(r);break;case"IFRAME":i=new Tu(r,this.mirror);break;case"CANVAS":i=new Ou(r);break;case"STYLE":i=new Nu(r);break;case"DIALOG":i=new Iu(r);break;default:i=new nr(r);break}return i.ownerDocument=this,i}createComment(t){const r=new Au(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new _u(t);return r.ownerDocument=this,r}createTextNode(t){const r=new Du(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Ru=_o;class nr extends ir{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Mu extends wu{}class Iu extends vu{}class Ou extends nr{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Nu extends nr{constructor(){super(...arguments),A(this,"rules",[])}}class Tu extends nr{constructor(t,r){super(t),A(this,"contentDocument",new st),this.contentDocument.mirror=r}}const Du=ko,Au=Po,_u=Lo;function ku(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function $o(e,t,r,i){let a;switch(e.nodeType){case Se.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?a=i.contentDocument:(a=t,a.compatMode=e.compatMode);break;case Se.DOCUMENT_TYPE_NODE:{const c=e;a=t.createDocumentType(c.name,c.publicId,c.systemId);break}case Se.ELEMENT_NODE:{const c=e,h=ku(c);a=t.createElement(h);const m=a;for(const{name:d,value:p}of Array.from(c.attributes))m.attributes[d]=p;c.scrollLeft&&(m.scrollLeft=c.scrollLeft),c.scrollTop&&(m.scrollTop=c.scrollTop);break}case Se.TEXT_NODE:a=t.createTextNode(e.textContent||"");break;case Se.CDATA_SECTION_NODE:a=t.createCDATASection(e.data);break;case Se.COMMENT_NODE:a=t.createComment(e.textContent||"");break;case Se.DOCUMENT_FRAGMENT_NODE:a=i.attachShadow({mode:"open"});break;default:return null}let u=r.getMeta(e);return t instanceof st&&(u||(u=zo(a,t.unserializedId),r.add(e,u)),t.mirror.add(a,B({},u))),a}function Pu(e,t=Kl(),r=new st){function i(a,u){const c=$o(a,r,t,u);if(c!==null)if((u==null?void 0:u.nodeName)!=="IFRAME"&&a.nodeType!==Se.DOCUMENT_FRAGMENT_NODE&&(u==null||u.appendChild(c),c.parentNode=u,c.parentElement=u),a.nodeName==="IFRAME"){const h=a.contentDocument;h&&i(h,c)}else(a.nodeType===Se.DOCUMENT_NODE||a.nodeType===Se.ELEMENT_NODE||a.nodeType===Se.DOCUMENT_FRAGMENT_NODE)&&(a.nodeType===Se.ELEMENT_NODE&&a.shadowRoot&&i(a.shadowRoot,c),a.childNodes.forEach(h=>i(h,c)))}return i(e,null),r}function Lu(){return new Fu}class Fu{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const i=(r=this.getMeta(t))==null?void 0:r.id;return i!=null?i:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const a=this.nodeMetaMap.get(i);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function zo(e,t){switch(e.RRNodeType){case Y.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case Y.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case Y.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case Y.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case Y.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case Y.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const Mt=new Map,_n=new WeakSet;function kn(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Vo(e){if(_n.has(e))return;_n.add(e);const t=e.drawImage.bind(e);e.drawImage=function(r,...i){const a=Mt.get(e);a&&(a.cancelled=!0);const u=()=>{i.length===2&&kn(r)&&i.push(r.naturalWidth||r.width,r.naturalHeight||r.height),t(r,...i)};if(kn(r)&&!r.complete){const c={cancelled:!1};Mt.set(e,c);const h=()=>{c.cancelled||(Mt.delete(e),u())},m=()=>{if(!c.cancelled){Mt.delete(e);try{u()}catch(d){}}};r.onload=h,r.onerror=m}else u()}}const Pn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},It={},jo={},Bu=()=>!!globalThis.Zone;function Gs(e){if(It[e])return It[e];const t=globalThis[e],r=t.prototype,i=e in Pn?Pn[e]:void 0,a=!!(i&&i.every(h=>{var m,d;return!!((d=(m=Object.getOwnPropertyDescriptor(r,h))==null?void 0:m.get)!=null&&d.toString().includes("[native code]"))})),u=e in Ln?Ln[e]:void 0,c=!!(u&&u.every(h=>{var m;return typeof r[h]=="function"&&((m=r[h])==null?void 0:m.toString().includes("[native code]"))}));if(a&&c&&!Bu())return It[e]=t.prototype,t.prototype;try{const h=document.createElement("iframe");h.style.display="none",document.body.appendChild(h);const m=h.contentWindow;if(!m)return t.prototype;const d=m[e].prototype;if(!d)return h.remove(),r;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(h.classList.add("rr-block"),h.setAttribute("__rrwebUntaintedMutationObserver",""),jo[e]=()=>h.remove()):h.remove(),It[e]=d}catch(h){return r}}const us={};function Ae(e,t,r){var i;const a=`${e}.${String(r)}`;if(us[a])return us[a].call(t);const u=Gs(e),c=(i=Object.getOwnPropertyDescriptor(u,r))==null?void 0:i.get;return c?(us[a]=c,c.call(t)):t[r]}const cs={};function qo(e,t,r){const i=`${e}.${String(r)}`;if(cs[i])return cs[i].bind(t);const u=Gs(e)[r];return typeof u!="function"?t[r]:(cs[i]=u,u.bind(t))}function Uu(e){return Ae("Node",e,"ownerDocument")}function Wu(e){return Ae("Node",e,"childNodes")}function $u(e){return Ae("Node",e,"parentNode")}function zu(e){return Ae("Node",e,"parentElement")}function Vu(e){return Ae("Node",e,"textContent")}function ju(e,t){return qo("Node",e,"contains")(t)}function qu(e){return qo("Node",e,"getRootNode")()}function Gu(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function Hu(e){return e.styleSheets}function Yu(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function Ju(e,t){return Ae("Element",e,"querySelector")(t)}function Xu(e,t){return Ae("Element",e,"querySelectorAll")(t)}function Go(){var e;return[Gs("MutationObserver").constructor,(e=jo.MutationObserver)!=null?e:(()=>{})]}let tt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(tt=()=>new Date().getTime());function je(e,t,r){try{if(!(t in e))return()=>{};const i=e[t],a=r(i);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=a,()=>{e[t]=i}}catch(i){return()=>{}}}const H={ownerDocument:Uu,childNodes:Wu,parentNode:$u,parentElement:zu,textContent:Vu,contains:ju,getRootNode:qu,host:Gu,styleSheets:Hu,shadowRoot:Yu,querySelector:Ju,querySelectorAll:Xu,nowTimestamp:tt,mutationObserverCtor:Go,patch:je,wrapCanvasContextDrawImage:Vo};function we(e,t,r=document){const i={capture:!0};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}const Ye=`Please stop import mirror directly. Instead of that,\r
|
|
60
60
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
61
|
-
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(qe),-1},getNode(){return console.error(qe),null},removeNodeFromMap(){console.error(qe)},has(){return console.error(qe),!1},reset(){console.error(qe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(qe),Reflect.get(e,t,r)}}));function Ke(e,t,r={}){let s=null,a=0;return function(...u){const c=Date.now();!a&&r.leading===!1&&(a=c);const f=t-(c-a),m=this;f<=0||f>t?(s&&(clearTimeout(s),s=null),a=c,e.apply(m,u)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{a=r.leading===!1?0:Date.now(),s=null,e.apply(m,u)},f))}}function ht(e,t,r,s,a=window){const u=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,s?r:{set(c){setTimeout(()=>{r.set.call(this,c)},0),u&&u.set&&u.set.call(this,c)}}),()=>ht(e,t,u||{},!0)}function qi(e){var t,r,s,a;const u=e.document;return{left:u.scrollingElement?u.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:u.documentElement.scrollLeft||(u==null?void 0:u.body)&&((t=W.parentElement(u.body))==null?void 0:t.scrollLeft)||((r=u==null?void 0:u.body)==null?void 0:r.scrollLeft)||0,top:u.scrollingElement?u.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(u==null?void 0:u.documentElement.scrollTop)||(u==null?void 0:u.body)&&((s=W.parentElement(u.body))==null?void 0:s.scrollTop)||((a=u==null?void 0:u.body)==null?void 0:a.scrollTop)||0}}function Gi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Hi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Yi(e){return e?e.nodeType===e.ELEMENT_NODE?e:W.parentElement(e):null}const Vo=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch(t){return!1}return!1};function oe(e,t,r,s){if(!e)return!1;const a=Yi(e);if(!a)return!1;try{if(typeof t=="string"){if(a.classList.contains(t)||s&&a.closest("."+t)!==null)return!0}else if(Lt(a,t,s))return!0}catch(u){}return!!(r&&(a.matches(r)||s&&a.closest(r)!==null))}function qo(e,t){return t.getId(e)!==-1}function Tt(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===lt}function Ji(e,t){if(it(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=W.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Ji(s,t):!0}function Ut(e){return!!e.changedTouches}function Xi(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Go(e){const t={},r=(a,u)=>{const c={value:a,parent:u,children:[]};return t[a.node.id]=c,c},s=[];for(const a of e){const{nextId:u,parentId:c}=a;if(u&&u in t){const f=t[u];if(f.parent){const m=f.parent.children.indexOf(f);f.parent.children.splice(m,0,r(a,f.parent))}else{const m=s.indexOf(f);s.splice(m,0,r(a,null))}continue}if(c in t){const f=t[c];f.children.push(r(a,f));continue}s.push(r(a,null))}return s}function Qi(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Qi(e.children[r],t)}function Qe(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Zi(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ki(e,t){var r,s;const a=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!a||a===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const u=a.getBoundingClientRect(),c=Ki(a,t),f=u.height/a.clientHeight;return{x:u.x*c.relativeScale+c.x,y:u.y*c.relativeScale+c.y,relativeScale:f,absoluteScale:c.absoluteScale*f}}function ke(e){return e?e instanceof be&&"shadowRoot"in e?!!e.shadowRoot:!!W.shadowRoot(e):!1}function Ye(e,t){const r=e==null?void 0:e[t[0]];return r?t.length===1?r:Ye(r.cssRules,t.slice(1)):null}function wi(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Ho(e){const t=new Set,r=[];for(let s=e.length;s--;){const a=e[s];t.has(a.id)||(r.push(a),t.add(a.id))}return r}class es{constructor(){O(this,"id",1),O(this,"styleIDMap",new WeakMap),O(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ts(e){var t;let r=null;return"getRootNode"in e&&((t=W.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&W.host(W.getRootNode(e))&&(r=W.host(W.getRootNode(e))),r}function Yo(e){let t=e,r;for(;r=ts(t);)t=r;return t}function Jo(e){const t=W.ownerDocument(e);if(!t)return!1;const r=Yo(e);return W.contains(t,r)}function rs(e){const t=W.ownerDocument(e);return t?W.contains(t,e)||Jo(e):!1}const Ju=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:es,get _mirror(){return exports.mirror},closestElementOfNode:Yi,getBaseDimension:Ki,getNestedRule:Ye,getPositionsAndIndex:wi,getRootShadowHost:Yo,getShadowHost:ts,getWindowHeight:Gi,getWindowScroll:qi,getWindowWidth:Hi,hasShadowRoot:ke,hookSetter:ht,inDom:rs,isAncestorRemoved:Ji,isBlocked:oe,isCanvasNode:Vo,isIgnored:Tt,isSerialized:qo,isSerializedIframe:Qe,isSerializedStylesheet:Zi,iterateResolveTree:Qi,legacy_isTouchEvent:Ut,get nowTimestamp(){return Ze},on:le,polyfill:Xi,queueToResolveTrees:Go,shadowHostInDom:Jo,throttle:Ke,uniqueTextMutations:Ho},Symbol.toStringTag,{value:"Module"}));var k=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(k||{}),_=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(_||{}),j=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(j||{}),xe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(xe||{}),Me=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Me||{}),_e=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(_e||{}),B=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(B||{}),Re=(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))(Re||{});function Pn(e){return"__ln"in e}class Xu{constructor(){O(this,"length",0),O(this,"head",null),O(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Pn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&Pn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Ln=(e,t)=>`${e}@${t}`;class Qu{constructor(){O(this,"frozen",!1),O(this,"locked",!1),O(this,"texts",[]),O(this,"attributes",[]),O(this,"attributeMap",new WeakMap),O(this,"removes",[]),O(this,"mapRemoves",[]),O(this,"movedMap",{}),O(this,"addedSet",new Set),O(this,"movedSet",new Set),O(this,"droppedSet",new Set),O(this,"removesSubTreeCache",new Set),O(this,"mutationCb"),O(this,"blockClass"),O(this,"blockSelector"),O(this,"maskTextClass"),O(this,"maskTextSelector"),O(this,"inlineStylesheet"),O(this,"maskInputOptions"),O(this,"maskTextFn"),O(this,"maskInputFn"),O(this,"keepIframeSrcFn"),O(this,"recordCanvas"),O(this,"inlineImages"),O(this,"inlineVideos"),O(this,"privacySetting"),O(this,"slimDOMOptions"),O(this,"dataURLOptions"),O(this,"doc"),O(this,"mirror"),O(this,"iframeManager"),O(this,"stylesheetManager"),O(this,"shadowDomManager"),O(this,"canvasManager"),O(this,"processedNodeManager"),O(this,"unattachedDoc"),O(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),O(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new Xu,a=m=>{let d=m,p=lt;for(;p===lt;)d=d&&d.nextSibling,p=d&&this.mirror.getId(d);return p},u=m=>{const d=W.parentNode(m);if(!d||!rs(m))return;let p=!1;if(m.nodeType===Node.TEXT_NODE){const l=d.tagName;if(l==="TEXTAREA")return;l==="STYLE"&&this.addedSet.has(d)&&(p=!0)}const o=it(d)?this.mirror.getId(ts(m)):this.mirror.getId(d),n=a(m);if(o===-1||n===-1)return s.addNode(m);const i=He(m,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,privacySetting:this.privacySetting,onSerialize:l=>{Qe(l,this.mirror)&&this.iframeManager.addIframe(l),Zi(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),ke(m)&&this.shadowDomManager.addShadowRoot(W.shadowRoot(m),this.doc)},onIframeLoad:(l,h)=>{this.iframeManager.attachIframe(l,h),this.shadowDomManager.observeAttachShadow(l)},onStylesheetLoad:(l,h)=>{this.stylesheetManager.attachLinkElement(l,h)},cssCaptured:p});i&&(t.push({parentId:o,nextId:n,node:i}),r.add(i.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)Fn(this.removesSubTreeCache,m,this.mirror)&&!this.movedSet.has(W.parentNode(m))||u(m);for(const m of this.addedSet)!Bn(this.droppedSet,m)&&!Fn(this.removesSubTreeCache,m,this.mirror)||Bn(this.movedSet,m)?u(m):this.droppedSet.add(m);let c=null;for(;s.length;){let m=null;if(c){const d=this.mirror.getId(W.parentNode(c.value)),p=a(c.value);d!==-1&&p!==-1&&(m=c)}if(!m){let d=s.tail;for(;d;){const p=d;if(d=d.previous,p){const o=this.mirror.getId(W.parentNode(p.value));if(a(p.value)===-1)continue;if(o!==-1){m=p;break}else{const i=p.value,l=W.parentNode(i);if(l&&l.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=W.host(l);if(this.mirror.getId(h)!==-1){m=p;break}}}}}}if(!m){for(;s.head;)s.removeNode(s.head.value);break}c=m.previous,s.removeNode(m.value),u(m.value)}const f={texts:this.texts.map(m=>{var d,p;const o=m.node,n=W.parentNode(o);n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n);let i=m.value;const l=this.privacySetting==="strict",h=this.privacySetting==="default"&&ao(i),g=(p=(d=m.node)==null?void 0:d.parentElement)==null?void 0:p.getAttribute("data-hl-record");return(l||h)&&!g&&i&&(i=Ii(i)),{id:this.mirror.getId(o),value:i}}).filter(m=>!r.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:d}=m;if(typeof d.style=="string"){const p=JSON.stringify(m.styleDiff),o=JSON.stringify(m._unchangedStyles);p.length<d.style.length&&(p+o).split("var(").length===d.style.split("var(").length&&(d.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:d}}).filter(m=>!r.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!f.texts.length&&!f.attributes.length&&!f.removes.length&&!f.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(f))}),O(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));const s=Array.from(W.childNodes(t),a=>W.textContent(a)||"").join("");r.attributes.value=_t({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:kt(t),value:s,maskInputFn:this.maskInputFn})}),O(this,"processMutation",t=>{if(!Tt(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=W.textContent(t.target);!oe(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:fo(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Yi(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,a=t.target.getAttribute(s);if(s==="value"){const c=kt(r);a=_t({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:a,overwriteRecord:r.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(oe(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;let u=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(a))if(!r.contentDocument)s="rr_src";else return;if(u||(u={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(u),this.attributeMap.set(t.target,u)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!ho(r.tagName,s)){if(t.target.tagName==="INPUT"){const f=t.target;if(f.type==="password"){u.attributes.value="*".repeat(f.value.length);break}}if(u.attributes[s]=co(this.doc,We(r.tagName),We(s),a),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(m){this.unattachedDoc=this.doc}const f=this.unattachedDoc.createElement("span");t.oldValue&&f.setAttribute("style",t.oldValue);for(const m of Array.from(r.style)){const d=r.style.getPropertyValue(m),p=r.style.getPropertyPriority(m);d!==f.style.getPropertyValue(m)||p!==f.style.getPropertyPriority(m)?p===""?u.styleDiff[m]=d:u.styleDiff[m]=[d,p]:u._unchangedStyles[m]=[d,p]}for(const m of Array.from(f.style))r.style.getPropertyValue(m)===""&&(u.styleDiff[m]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?u.attributes.rr_open_mode="modal":u.attributes.rr_open_mode="non-modal")}break}case"childList":{if(oe(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),a=it(t.target)?this.mirror.getId(W.host(t.target)):this.mirror.getId(t.target);oe(t.target,this.blockClass,this.blockSelector,!1)||Tt(r,this.mirror,this.slimDOMOptions)||!qo(r,this.mirror)||(this.addedSet.has(r)?(vi(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Ji(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ln(s,a)]?vi(this.movedSet,r):(this.removes.push({parentId:a,id:s,isShadow:it(t.target)&&st(t.target)?!0:void 0}),Zu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),O(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Tt(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[Ln(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);oe(t,this.blockClass,this.blockSelector,!1)||(W.childNodes(t).forEach(s=>this.genAdds(s)),ke(t)&&W.childNodes(W.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function vi(e,t){e.delete(t),W.childNodes(t).forEach(r=>vi(e,r))}function Zu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),W.childNodes(s).forEach(a=>r.push(a)))}}function Fn(e,t,r){return e.size===0?!1:Ku(e,t)}function Ku(e,t,r){const s=W.parentNode(t);return s?e.has(s):!1}function Bn(e,t){return e.size===0?!1:Xo(e,t)}function Xo(e,t){const r=W.parentNode(t);return r?e.has(r)?!0:Xo(e,r):!1}let ot;function ec(e){ot=e}function tc(){ot=void 0}const z=e=>ot?((...r)=>{try{return e(...r)}catch(s){if(ot&&ot(s)===!0)return;throw s}}):e,Ue=[];function ft(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Qo(e,t){const r=new Qu;Ue.push(r),r.init(e);const[s,a]=jo(),u=new s(z(r.processMutations.bind(r)));return u.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[u,a]}function rc({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const a=typeof t.mousemove=="number"?t.mousemove:50,u=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],f;const m=Ke(z(o=>{const n=Date.now()-f;e(c.map(i=>(i.timeOffset-=n,i)),o),c=[],f=null}),u),d=z(Ke(z(o=>{const n=ft(o),{clientX:i,clientY:l}=Ut(o)?o.changedTouches[0]:o;f||(f=Ze()),c.push({x:i,y:l,id:s.getId(n),timeOffset:Ze()-f}),m(typeof DragEvent!="undefined"&&o instanceof DragEvent?_.Drag:o instanceof MouseEvent?_.MouseMove:_.TouchMove)}),a,{trailing:!1})),p=[le("mousemove",d,r),le("touchmove",d,r),le("drag",d,r)];return z(()=>{p.forEach(o=>o())})}function ic({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:a,sampling:u}){if(u.mouseInteraction===!1)return()=>{};const c=u.mouseInteraction===!0||u.mouseInteraction===void 0?{}:u.mouseInteraction,f=[];let m=null;const d=p=>o=>{const n=ft(o);if(oe(n,s,a,!0)||Vo(n))return;let i=null,l=p;if("pointerType"in o){switch(o.pointerType){case"mouse":i=xe.Mouse;break;case"touch":i=xe.Touch;break;case"pen":i=xe.Pen;break}i===xe.Touch?j[p]===j.MouseDown?l="TouchStart":j[p]===j.MouseUp&&(l="TouchEnd"):xe.Pen}else Ut(o)&&(i=xe.Touch);i!==null?(m=i,(l.startsWith("Touch")&&i===xe.Touch||l.startsWith("Mouse")&&i===xe.Mouse)&&(i=null)):j[p]===j.Click&&(i=m,m=null);const h=Ut(o)?o.changedTouches[0]:o;if(!h)return;const g=r.getId(n),{clientX:b,clientY:y}=h;z(e)(L({type:j[l],id:g,x:b,y},i!==null&&{pointerType:i}))};return Object.keys(j).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&c[p]!==!1).forEach(p=>{let o=We(p);const n=d(p);if(window.PointerEvent)switch(j[p]){case j.MouseDown:case j.MouseUp:o=o.replace("mouse","pointer");break;case j.TouchStart:case j.TouchEnd:return}f.push(le(o,n,t))}),z(()=>{f.forEach(p=>p())})}function Zo({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:a,sampling:u}){const c=z(Ke(z(f=>{const m=ft(f);if(!m||oe(m,s,a,!0))return;const d=r.getId(m);if(m===t&&t.defaultView){const p=qi(t.defaultView);e({id:d,x:p.left,y:p.top})}else e({id:d,x:m.scrollLeft,y:m.scrollTop})}),u.scroll||100));return le("scroll",c,t)}function sc({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const a=z(Ke(z(()=>{const u=Gi(),c=Hi();(r!==u||s!==c)&&(e({width:Number(c),height:Number(u)}),r=u,s=c)}),200));return le("resize",a,t)}const nc=["INPUT","TEXTAREA","SELECT"],Un=new WeakMap;function oc({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:a,ignoreClass:u,ignoreSelector:c,maskInputOptions:f,maskInputFn:m,sampling:d,userTriggeredOnInput:p}){function o(y){let v=ft(y);const E=y.isTrusted,S=v&&v.tagName;if(v&&S==="OPTION"&&(v=W.parentElement(v)),!v||!S||nc.indexOf(S)<0||oe(v,s,a,!0)||v.classList.contains(u)||c&&v.matches(c))return;let w=v.value,C=!1;const M=kt(v)||"",R=v.getAttribute("data-hl-record");M==="radio"||M==="checkbox"?C=v.checked:lo({maskInputOptions:f,type:M,tagName:S,overwriteRecord:R})&&(w=_t({element:v,maskInputOptions:f,tagName:S,type:M,value:w,overwriteRecord:R,maskInputFn:m})),n(v,p?{text:w,isChecked:C,userTriggered:E}:{text:w,isChecked:C});const x=v.name;M==="radio"&&x&&C&&t.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach(D=>{if(D!==v){const T=D.value;n(D,p?{text:T,isChecked:!C,userTriggered:!1}:{text:T,isChecked:!C})}})}function n(y,v){const E=Un.get(y);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){Un.set(y,v);const S=r.getId(y);z(e)(se(L({},v),{id:S}))}}const l=(d.input==="last"?["change"]:["input","change"]).map(y=>le(y,z(o),t)),h=t.defaultView;if(!h)return()=>{l.forEach(y=>y())};const g=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),b=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&l.push(...b.map(y=>ht(y[0],y[1],{set(){z(o)({target:this,isTrusted:!1})}},!1,h))),z(()=>{l.forEach(y=>y())})}function Wt(e){const t=[];function r(s,a){if(Mt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||Mt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||Mt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||Mt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const c=Array.from(s.parentRule.cssRules).indexOf(s);return a.unshift(c),r(s.parentRule,a)}else if(s.parentStyleSheet){const c=Array.from(s.parentStyleSheet.cssRules).indexOf(s);a.unshift(c)}return a}return r(e,t)}function Ae(e,t,r){let s,a;return e?(e.ownerNode?s=t.getId(e.ownerNode):a=r.getId(e),{styleId:a,id:s}):{}}function ac({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const a=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:z((p,o,n)=>{const[i,l]=n,{id:h,styleId:g}=Ae(o,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,adds:[{rule:i,index:l}]}),p.apply(o,n)})}),s.CSSStyleSheet.prototype.addRule=function(p,o,n=this.cssRules.length){const i=`${p} { ${o} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[i,n])};const u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:z((p,o,n)=>{const[i]=n,{id:l,styleId:h}=Ae(o,t,r.styleMirror);return(l&&l!==-1||h&&h!==-1)&&e({id:l,styleId:h,removes:[{index:i}]}),p.apply(o,n)})}),s.CSSStyleSheet.prototype.removeRule=function(p){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let c;s.CSSStyleSheet.prototype.replace&&(c=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:z((p,o,n)=>{const[i]=n,{id:l,styleId:h}=Ae(o,t,r.styleMirror);return(l&&l!==-1||h&&h!==-1)&&e({id:l,styleId:h,replace:i}),p.apply(o,n)})}));let f;s.CSSStyleSheet.prototype.replaceSync&&(f=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(f,{apply:z((p,o,n)=>{const[i]=n,{id:l,styleId:h}=Ae(o,t,r.styleMirror);return(l&&l!==-1||h&&h!==-1)&&e({id:l,styleId:h,replaceSync:i}),p.apply(o,n)})}));const m={};It("CSSGroupingRule")?m.CSSGroupingRule=s.CSSGroupingRule:(It("CSSMediaRule")&&(m.CSSMediaRule=s.CSSMediaRule),It("CSSConditionRule")&&(m.CSSConditionRule=s.CSSConditionRule),It("CSSSupportsRule")&&(m.CSSSupportsRule=s.CSSSupportsRule));const d={};return Object.entries(m).forEach(([p,o])=>{d[p]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(d[p].insertRule,{apply:z((n,i,l)=>{const[h,g]=l,{id:b,styleId:y}=Ae(i.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||y&&y!==-1)&&e({id:b,styleId:y,adds:[{rule:h,index:[...Wt(i),g||0]}]}),n.apply(i,l)})}),o.prototype.deleteRule=new Proxy(d[p].deleteRule,{apply:z((n,i,l)=>{const[h]=l,{id:g,styleId:b}=Ae(i.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,removes:[{index:[...Wt(i),h]}]}),n.apply(i,l)})})}),z(()=>{s.CSSStyleSheet.prototype.insertRule=a,s.CSSStyleSheet.prototype.deleteRule=u,c&&(s.CSSStyleSheet.prototype.replace=c),f&&(s.CSSStyleSheet.prototype.replaceSync=f),Object.entries(m).forEach(([p,o])=>{o.prototype.insertRule=d[p].insertRule,o.prototype.deleteRule=d[p].deleteRule})})}function Ko({mirror:e,stylesheetManager:t},r){var s,a,u;let c=null;r.nodeName==="#document"?c=e.getId(r):c=e.getId(W.host(r));const f=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(u=(a=r.ownerDocument)==null?void 0:a.defaultView)==null?void 0:u.ShadowRoot,m=f!=null&&f.prototype?Object.getOwnPropertyDescriptor(f==null?void 0:f.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!f||!m?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get(){var d;return(d=m.get)==null?void 0:d.call(this)},set(d){var p;const o=(p=m.set)==null?void 0:p.call(this,d);if(c!==null&&c!==-1)try{t.adoptStyleSheets(d,c)}catch(n){}return o}}),z(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get:m.get,set:m.set})}))}function lc({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:a}){const u=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:z((f,m,d)=>{var p;const[o,n,i]=d;if(r.has(o))return u.apply(m,[o,n,i]);const{id:l,styleId:h}=Ae((p=m.parentRule)==null?void 0:p.parentStyleSheet,t,s.styleMirror);return(l&&l!==-1||h&&h!==-1)&&e({id:l,styleId:h,set:{property:o,value:n,priority:i},index:Wt(m.parentRule)}),f.apply(m,d)})});const c=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:z((f,m,d)=>{var p;const[o]=d;if(r.has(o))return c.apply(m,[o]);const{id:n,styleId:i}=Ae((p=m.parentRule)==null?void 0:p.parentStyleSheet,t,s.styleMirror);return(n&&n!==-1||i&&i!==-1)&&e({id:n,styleId:i,remove:{property:o},index:Wt(m.parentRule)}),f.apply(m,d)})}),z(()=>{a.CSSStyleDeclaration.prototype.setProperty=u,a.CSSStyleDeclaration.prototype.removeProperty=c})}function uc({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:a,doc:u}){const c=z(m=>Ke(z(d=>{const p=ft(d);if(!p||oe(p,t,r,!0))return;const{currentTime:o,volume:n,muted:i,playbackRate:l,loop:h}=p;e({type:m,id:s.getId(p),currentTime:o,volume:n,muted:i,playbackRate:l,loop:h})}),a.media||500)),f=[le("play",c(_e.Play),u),le("pause",c(_e.Pause),u),le("seeked",c(_e.Seeked),u),le("volumechange",c(_e.VolumeChange),u),le("ratechange",c(_e.RateChange),u)];return z(()=>{f.forEach(m=>m())})}function cc({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],a=new WeakMap,u=r.FontFace;r.FontFace=function(m,d,p){const o=new u(m,d,p);return a.set(o,{family:m,buffer:typeof d!="string",descriptors:p,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),o};const c=$e(t.fonts,"add",function(f){return function(m){return setTimeout(z(()=>{const d=a.get(m);d&&(e(d),a.delete(m))}),0),f.apply(this,[m])}});return s.push(()=>{r.FontFace=u}),s.push(c),z(()=>{s.forEach(f=>f())})}function hc(e){const{doc:t,mirror:r,blockClass:s,blockSelector:a,selectionCb:u}=e;let c=!0;const f=z(()=>{const m=t.getSelection();if(!m||c&&(m!=null&&m.isCollapsed))return;c=m.isCollapsed||!1;const d=[],p=m.rangeCount||0;for(let o=0;o<p;o++){const n=m.getRangeAt(o),{startContainer:i,startOffset:l,endContainer:h,endOffset:g}=n;oe(i,s,a,!0)||oe(h,s,a,!0)||d.push({start:r.getId(i),startOffset:l,end:r.getId(h),endOffset:g})}u({ranges:d})});return f(),le("selectionchange",f)}function fc({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:$e(r.customElements,"define",function(a){return function(u,c,f){try{t({define:{name:u}})}catch(m){console.warn(`Custom element callback failed for ${u}`)}return a.apply(this,[u,c,f])}})}function dc(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:a,scrollCb:u,viewportResizeCb:c,inputCb:f,mediaInteractionCb:m,styleSheetRuleCb:d,styleDeclarationCb:p,canvasMutationCb:o,fontCb:n,selectionCb:i,customElementCb:l}=e;e.mutationCb=(...h)=>{t.mutation&&t.mutation(...h),r(...h)},e.mousemoveCb=(...h)=>{t.mousemove&&t.mousemove(...h),s(...h)},e.mouseInteractionCb=(...h)=>{t.mouseInteraction&&t.mouseInteraction(...h),a(...h)},e.scrollCb=(...h)=>{t.scroll&&t.scroll(...h),u(...h)},e.viewportResizeCb=(...h)=>{t.viewportResize&&t.viewportResize(...h),c(...h)},e.inputCb=(...h)=>{t.input&&t.input(...h),f(...h)},e.mediaInteractionCb=(...h)=>{t.mediaInteaction&&t.mediaInteaction(...h),m(...h)},e.styleSheetRuleCb=(...h)=>{t.styleSheetRule&&t.styleSheetRule(...h),d(...h)},e.styleDeclarationCb=(...h)=>{t.styleDeclaration&&t.styleDeclaration(...h),p(...h)},e.canvasMutationCb=(...h)=>{t.canvasMutation&&t.canvasMutation(...h),o(...h)},e.fontCb=(...h)=>{t.font&&t.font(...h),n(...h)},e.selectionCb=(...h)=>{t.selection&&t.selection(...h),i(...h)},e.customElementCb=(...h)=>{t.customElement&&t.customElement(...h),l(...h)}}function pc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};dc(e,t);let s,a=()=>{};e.recordDOM&&([s,a]=Qo(e,e.doc));const u=rc(e),c=ic(e),f=Zo(e),m=sc(e,{win:r}),d=oc(e),p=uc(e);let o=()=>{},n=()=>{},i=()=>{},l=()=>{};e.recordDOM&&(o=ac(e,{win:r}),n=Ko(e,e.doc),i=lc(e,{win:r}),e.collectFonts&&(l=cc(e)));const h=hc(e),g=fc(e),b=[];for(const y of e.plugins)b.push(y.observer(y.callback,r,y.options));return z(()=>{Ue.forEach(y=>y.reset()),s==null||s.disconnect(),a(),u(),c(),f(),m(),d(),p(),o(),n(),i(),l(),h(),g(),b.forEach(y=>y())})}function Mt(e){return typeof window[e]!="undefined"}function It(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Wn{constructor(t){O(this,"iframeIdToRemoteIdMap",new WeakMap),O(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,a){const u=s||this.getIdToRemoteIdMap(t),c=a||this.getRemoteIdToIdMap(t);let f=u.get(r);return f||(f=this.generateIdFn(),u.set(r,f),c.set(f,r)),f}getIds(t,r){const s=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return r.map(u=>this.getId(t,u,s,a))}getRemoteId(t,r,s){const a=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const u=a.get(r);return u||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(a=>this.getRemoteId(t,a,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class mc{constructor(t){O(this,"iframes",new WeakMap),O(this,"crossOriginIframeMap",new WeakMap),O(this,"crossOriginIframeMirror",new Wn(uo)),O(this,"crossOriginIframeStyleMirror"),O(this,"crossOriginIframeRootIdMap",new WeakMap),O(this,"mirror"),O(this,"mutationCb"),O(this,"wrappedEmit"),O(this,"loadListener"),O(this,"stylesheetManager"),O(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var s,a;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(a=this.loadListener)==null||a.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin)return;const s=t.source;if(!s)return;const a=this.crossOriginIframeMap.get(s);if(!a)return;const u=this.transformCrossOriginEvent(a,r.data.event);u&&this.wrappedEmit(u,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case k.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const a=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(r.data.node,a),{timestamp:r.timestamp,type:k.IncrementalSnapshot,data:{source:_.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case k.Meta:case k.Load:case k.DomContentLoaded:return!1;case k.Plugin:return r;case k.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case k.IncrementalSnapshot:switch(r.data.source){case _.Mutation:return r.data.adds.forEach(a=>{this.replaceIds(a,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,t);const u=this.crossOriginIframeRootIdMap.get(t);u&&this.patchRootIdOnNode(a.node,u)}),r.data.removes.forEach(a=>{this.replaceIds(a,t,["parentId","id"])}),r.data.attributes.forEach(a=>{this.replaceIds(a,t,["id"])}),r.data.texts.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case _.Drag:case _.TouchMove:case _.MouseMove:return r.data.positions.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case _.ViewportResize:return!1;case _.MediaInteraction:case _.MouseInteraction:case _.Scroll:case _.CanvasMutation:case _.Input:return this.replaceIds(r.data,t,["id"]),r;case _.StyleSheetRule:case _.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case _.Font:return r;case _.Selection:return r.data.ranges.forEach(a=>{this.replaceIds(a,t,["start","end"])}),r;case _.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(a=>{this.replaceStyleIds(a,t,["styleId"])}),r}}return!1}replace(t,r,s,a){for(const u of a)!Array.isArray(r[u])&&typeof r[u]!="number"||(Array.isArray(r[u])?r[u]=t.getIds(s,r[u]):r[u]=t.getId(s,r[u]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Re.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}}class gc{constructor(t){O(this,"shadowDoms",new WeakSet),O(this,"mutationCb"),O(this,"scrollCb"),O(this,"bypassOptions"),O(this,"mirror"),O(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!st(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[s]=Qo(se(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Zo(se(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(W.host(t))),this.restoreHandlers.push(Ko({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push($e(t.prototype,"attachShadow",function(a){return function(u){const c=a.call(this,u),f=W.shadowRoot(this);return f&&rs(this)&&s.addShadowRoot(f,r),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ot=0;Ot<Je.length;Ot++)rt[Je.charCodeAt(Ot)]=Ot;var yc=function(e){var t=new Uint8Array(e),r,s=t.length,a="";for(r=0;r<s;r+=3)a+=Je[t[r]>>2],a+=Je[(t[r]&3)<<4|t[r+1]>>4],a+=Je[(t[r+1]&15)<<2|t[r+2]>>6],a+=Je[t[r+2]&63];return s%3===2?a=a.substring(0,a.length-1)+"=":s%3===1&&(a=a.substring(0,a.length-2)+"=="),a},wc=function(e){var t=e.length*.75,r=e.length,s,a=0,u,c,f,m;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var d=new ArrayBuffer(t),p=new Uint8Array(d);for(s=0;s<r;s+=4)u=rt[e.charCodeAt(s)],c=rt[e.charCodeAt(s+1)],f=rt[e.charCodeAt(s+2)],m=rt[e.charCodeAt(s+3)],p[a++]=u<<2|c>>4,p[a++]=(c&15)<<4|f>>2,p[a++]=(f&3)<<6|m&63;return d};const $n=new Map;function vc(e,t){let r=$n.get(e);return r||(r=new Map,$n.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const ea=(e,t,r)=>{if(!e||!(ra(e,t)||typeof e=="object"))return;const s=e.constructor.name,a=vc(r,s);let u=a.indexOf(e);return u===-1&&(u=a.length,a.push(e)),u};function Dt(e,t,r){if(e instanceof Array)return e.map(s=>Dt(s,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const s=e.constructor.name,a=yc(e);return{rr_type:s,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Dt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const s=e.constructor.name,{src:a}=e;return{rr_type:s,src:a}}else if(e instanceof HTMLCanvasElement){const s="HTMLImageElement",a=e.toDataURL();return{rr_type:s,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Dt(e.data,t,r),e.width,e.height]};if(ra(e,t)||typeof e=="object"){const s=e.constructor.name,a=ea(e,t,r);return{rr_type:s,index:a}}}}return e}const ta=(e,t,r)=>e.map(s=>Dt(s,t,r)),ra=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(a=>typeof t[a]=="function").find(a=>e instanceof t[a]);function bc(e,t,r,s){const a=[],u=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of u)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;const f=$e(t.CanvasRenderingContext2D.prototype,c,function(m){return function(...d){return oe(this.canvas,r,s,!0)||setTimeout(()=>{const p=ta(d,t,this);e(this.canvas,{type:Me["2D"],property:c,args:p})},0),m.apply(this,d)}});a.push(f)}catch(f){const m=ht(t.CanvasRenderingContext2D.prototype,c,{set(d){e(this.canvas,{type:Me["2D"],property:c,args:[d],setter:!0})}});a.push(m)}return()=>{a.forEach(c=>c())}}function Sc(e){return e==="experimental-webgl"?"webgl":e}function zn(e,t,r,s){const a=[];try{const u=$e(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(f,...m){if(!oe(this,t,r,!0)){const d=Sc(f);if("__context"in this||(this.__context=d),s&&["webgl","webgl2"].includes(d))if(m[0]&&typeof m[0]=="object"){const p=m[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else m.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[f,...m])}});a.push(u)}catch(u){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach(u=>u())}}function jn(e,t,r,s,a,u){const c=[],f=Object.getOwnPropertyNames(e);for(const m of f)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(m))try{if(typeof e[m]!="function")continue;const d=$e(e,m,function(p){return function(...o){const n=p.apply(this,o);if(ea(n,u,this),"tagName"in this.canvas&&!oe(this.canvas,s,a,!0)){const i=ta(o,u,this),l={type:t,property:m,args:i};r(this.canvas,l)}return n}});c.push(d)}catch(d){const p=ht(e,m,{set(o){r(this.canvas,{type:t,property:m,args:[o],setter:!0})}});c.push(p)}return c}function Cc(e,t,r,s){const a=[];return typeof t.WebGLRenderingContext!="undefined"&&a.push(...jn(t.WebGLRenderingContext.prototype,Me.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&a.push(...jn(t.WebGL2RenderingContext.prototype,Me.WebGL2,e,r,s,t)),()=>{a.forEach(u=>u())}}const ia=`(function() {
|
|
61
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(Ye),-1},getNode(){return console.error(Ye),null},removeNodeFromMap(){console.error(Ye)},has(){return console.error(Ye),!1},reset(){console.error(Ye)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(Ye),Reflect.get(e,t,r)}}));function rt(e,t,r={}){let i=null,a=0;return function(...u){const c=Date.now();!a&&r.leading===!1&&(a=c);const h=t-(c-a),m=this;h<=0||h>t?(i&&(clearTimeout(i),i=null),a=c,e.apply(m,u)):!i&&r.trailing!==!1&&(i=setTimeout(()=>{a=r.leading===!1?0:Date.now(),i=null,e.apply(m,u)},h))}}function dt(e,t,r,i,a=window){const u=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,i?r:{set(c){setTimeout(()=>{r.set.call(this,c)},0),u&&u.set&&u.set.call(this,c)}}),()=>dt(e,t,u||{},!0)}function Hs(e){var t,r,i,a;const u=e.document;return{left:u.scrollingElement?u.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:u.documentElement.scrollLeft||(u==null?void 0:u.body)&&((t=H.parentElement(u.body))==null?void 0:t.scrollLeft)||((r=u==null?void 0:u.body)==null?void 0:r.scrollLeft)||0,top:u.scrollingElement?u.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(u==null?void 0:u.documentElement.scrollTop)||(u==null?void 0:u.body)&&((i=H.parentElement(u.body))==null?void 0:i.scrollTop)||((a=u==null?void 0:u.body)==null?void 0:a.scrollTop)||0}}function Ys(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Js(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Xs(e){return e?e.nodeType===e.ELEMENT_NODE?e:H.parentElement(e):null}const Ho=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch(t){return!1}return!1};function ge(e,t,r,i){if(!e)return!1;const a=Xs(e);if(!a)return!1;try{if(typeof t=="string"){if(a.classList.contains(t)||i&&a.closest("."+t)!==null)return!0}else if(Bt(a,t,i))return!0}catch(u){}return!!(r&&(a.matches(r)||i&&a.closest(r)!==null))}function Yo(e,t){return t.getId(e)!==-1}function At(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===ct}function Qs(e,t){if(nt(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const i=H.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?!1:i?Qs(i,t):!0}function $t(e){return!!e.changedTouches}function Zs(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Jo(e){const t={},r=(a,u)=>{const c={value:a,parent:u,children:[]};return t[a.node.id]=c,c},i=[];for(const a of e){const{nextId:u,parentId:c}=a;if(u&&u in t){const h=t[u];if(h.parent){const m=h.parent.children.indexOf(h);h.parent.children.splice(m,0,r(a,h.parent))}else{const m=i.indexOf(h);i.splice(m,0,r(a,null))}continue}if(c in t){const h=t[c];h.children.push(r(a,h));continue}i.push(r(a,null))}return i}function Ks(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Ks(e.children[r],t)}function et(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function ei(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ti(e,t){var r,i;const a=(i=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:i.frameElement;if(!a||a===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const u=a.getBoundingClientRect(),c=ti(a,t),h=u.height/a.clientHeight;return{x:u.x*c.relativeScale+c.x,y:u.y*c.relativeScale+c.y,relativeScale:h,absoluteScale:c.absoluteScale*h}}function Fe(e){return e?e instanceof Me&&"shadowRoot"in e?!!e.shadowRoot:!!H.shadowRoot(e):!1}function Qe(e,t){const r=e==null?void 0:e[t[0]];return r?t.length===1?r:Qe(r.cssRules,t.slice(1)):null}function bs(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Xo(e){const t=new Set,r=[];for(let i=e.length;i--;){const a=e[i];t.has(a.id)||(r.push(a),t.add(a.id))}return r}class ri{constructor(){O(this,"id",1),O(this,"styleIDMap",new WeakMap),O(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let i;return r===void 0?i=this.id++:i=r,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function si(e){var t;let r=null;return"getRootNode"in e&&((t=H.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(e))&&(r=H.host(H.getRootNode(e))),r}function Qo(e){let t=e,r;for(;r=si(t);)t=r;return t}function Zo(e){const t=H.ownerDocument(e);if(!t)return!1;const r=Qo(e);return H.contains(t,r)}function ii(e){const t=H.ownerDocument(e);return t?H.contains(t,e)||Zo(e):!1}const Qu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:ri,get _mirror(){return exports.mirror},closestElementOfNode:Xs,getBaseDimension:ti,getNestedRule:Qe,getPositionsAndIndex:bs,getRootShadowHost:Qo,getShadowHost:si,getWindowHeight:Ys,getWindowScroll:Hs,getWindowWidth:Js,hasShadowRoot:Fe,hookSetter:dt,inDom:ii,isAncestorRemoved:Qs,isBlocked:ge,isCanvasNode:Ho,isIgnored:At,isSerialized:Yo,isSerializedIframe:et,isSerializedStylesheet:ei,iterateResolveTree:Ks,legacy_isTouchEvent:$t,get nowTimestamp(){return tt},on:we,polyfill:Zs,queueToResolveTrees:Jo,shadowHostInDom:Zo,throttle:rt,uniqueTextMutations:Xo},Symbol.toStringTag,{value:"Module"}));var L=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(L||{}),_=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(_||{}),Z=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Z||{}),Oe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Oe||{}),Te=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Te||{}),Le=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Le||{}),j=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(j||{}),Ne=(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))(Ne||{});function Fn(e){return"__ln"in e}class Zu{constructor(){O(this,"length",0),O(this,"head",null),O(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let i=0;i<t;i++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Fn(t.previousSibling)){const i=t.previousSibling.__ln.next;r.next=i,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,i&&(i.previous=r)}else if(t.nextSibling&&Fn(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;r.previous=i,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,i&&(i.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Bn=(e,t)=>`${e}@${t}`;class Ku{constructor(){O(this,"frozen",!1),O(this,"locked",!1),O(this,"texts",[]),O(this,"attributes",[]),O(this,"attributeMap",new WeakMap),O(this,"removes",[]),O(this,"mapRemoves",[]),O(this,"movedMap",{}),O(this,"addedSet",new Set),O(this,"movedSet",new Set),O(this,"droppedSet",new Set),O(this,"removesSubTreeCache",new Set),O(this,"mutationCb"),O(this,"blockClass"),O(this,"blockSelector"),O(this,"maskTextClass"),O(this,"maskTextSelector"),O(this,"inlineStylesheet"),O(this,"maskInputOptions"),O(this,"maskTextFn"),O(this,"maskInputFn"),O(this,"keepIframeSrcFn"),O(this,"recordCanvas"),O(this,"inlineImages"),O(this,"inlineVideos"),O(this,"privacySetting"),O(this,"slimDOMOptions"),O(this,"dataURLOptions"),O(this,"doc"),O(this,"mirror"),O(this,"iframeManager"),O(this,"stylesheetManager"),O(this,"shadowDomManager"),O(this,"canvasManager"),O(this,"processedNodeManager"),O(this,"unattachedDoc"),O(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),O(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,i=new Zu,a=m=>{let d=m,p=ct;for(;p===ct;)d=d&&d.nextSibling,p=d&&this.mirror.getId(d);return p},u=m=>{const d=H.parentNode(m);if(!d||!ii(m))return;let p=!1;if(m.nodeType===Node.TEXT_NODE){const l=d.tagName;if(l==="TEXTAREA")return;l==="STYLE"&&this.addedSet.has(d)&&(p=!0)}const o=nt(d)?this.mirror.getId(si(m)):this.mirror.getId(d),n=a(m);if(o===-1||n===-1)return i.addNode(m);const s=Xe(m,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,privacySetting:this.privacySetting,onSerialize:l=>{et(l,this.mirror)&&this.iframeManager.addIframe(l),ei(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),Fe(m)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(m),this.doc)},onIframeLoad:(l,f)=>{this.iframeManager.attachIframe(l,f),this.shadowDomManager.observeAttachShadow(l)},onStylesheetLoad:(l,f)=>{this.stylesheetManager.attachLinkElement(l,f)},cssCaptured:p});s&&(t.push({parentId:o,nextId:n,node:s}),r.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)Un(this.removesSubTreeCache,m,this.mirror)&&!this.movedSet.has(H.parentNode(m))||u(m);for(const m of this.addedSet)!Wn(this.droppedSet,m)&&!Un(this.removesSubTreeCache,m,this.mirror)||Wn(this.movedSet,m)?u(m):this.droppedSet.add(m);let c=null;for(;i.length;){let m=null;if(c){const d=this.mirror.getId(H.parentNode(c.value)),p=a(c.value);d!==-1&&p!==-1&&(m=c)}if(!m){let d=i.tail;for(;d;){const p=d;if(d=d.previous,p){const o=this.mirror.getId(H.parentNode(p.value));if(a(p.value)===-1)continue;if(o!==-1){m=p;break}else{const s=p.value,l=H.parentNode(s);if(l&&l.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=H.host(l);if(this.mirror.getId(f)!==-1){m=p;break}}}}}}if(!m){for(;i.head;)i.removeNode(i.head.value);break}c=m.previous,i.removeNode(m.value),u(m.value)}const h={texts:this.texts.map(m=>{var d,p;const o=m.node,n=H.parentNode(o);n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n);let s=m.value;const l=this.privacySetting==="strict",f=this.privacySetting==="default"&&co(s),g=(p=(d=m.node)==null?void 0:d.parentElement)==null?void 0:p.getAttribute("data-hl-record");return(l||f)&&!g&&s&&(s=Ns(s)),{id:this.mirror.getId(o),value:s}}).filter(m=>!r.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:d}=m;if(typeof d.style=="string"){const p=JSON.stringify(m.styleDiff),o=JSON.stringify(m._unchangedStyles);p.length<d.style.length&&(p+o).split("var(").length===d.style.split("var(").length&&(d.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:d}}).filter(m=>!r.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!h.texts.length&&!h.attributes.length&&!h.removes.length&&!h.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(h))}),O(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));const i=Array.from(H.childNodes(t),a=>H.textContent(a)||"").join("");r.attributes.value=Pt({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Lt(t),value:i,maskInputFn:this.maskInputFn})}),O(this,"processMutation",t=>{if(!At(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=H.textContent(t.target);!ge(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:go(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Xs(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let i=t.attributeName,a=t.target.getAttribute(i);if(i==="value"){const c=Lt(r);a=Pt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:a,overwriteRecord:r.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(ge(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;let u=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(a))if(!r.contentDocument)i="rr_src";else return;if(u||(u={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(u),this.attributeMap.set(t.target,u)),i==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!mo(r.tagName,i)){if(t.target.tagName==="INPUT"){const h=t.target;if(h.type==="password"){u.attributes.value="*".repeat(h.value.length);break}}if(u.attributes[i]=po(this.doc,Ue(r.tagName),Ue(i),a),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(m){this.unattachedDoc=this.doc}const h=this.unattachedDoc.createElement("span");t.oldValue&&h.setAttribute("style",t.oldValue);for(const m of Array.from(r.style)){const d=r.style.getPropertyValue(m),p=r.style.getPropertyPriority(m);d!==h.style.getPropertyValue(m)||p!==h.style.getPropertyPriority(m)?p===""?u.styleDiff[m]=d:u.styleDiff[m]=[d,p]:u._unchangedStyles[m]=[d,p]}for(const m of Array.from(h.style))r.style.getPropertyValue(m)===""&&(u.styleDiff[m]=!1)}else i==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?u.attributes.rr_open_mode="modal":u.attributes.rr_open_mode="non-modal")}break}case"childList":{if(ge(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const i=this.mirror.getId(r),a=nt(t.target)?this.mirror.getId(H.host(t.target)):this.mirror.getId(t.target);ge(t.target,this.blockClass,this.blockSelector,!1)||At(r,this.mirror,this.slimDOMOptions)||!Yo(r,this.mirror)||(this.addedSet.has(r)?(Ss(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&i===-1||Qs(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Bn(i,a)]?Ss(this.movedSet,r):(this.removes.push({parentId:a,id:i,isShadow:nt(t.target)&&ot(t.target)?!0:void 0}),ec(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),O(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(At(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[Bn(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ge(t,this.blockClass,this.blockSelector,!1)||(H.childNodes(t).forEach(i=>this.genAdds(i)),Fe(t)&&H.childNodes(H.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ss(e,t){e.delete(t),H.childNodes(t).forEach(r=>Ss(e,r))}function ec(e,t){const r=[e];for(;r.length;){const i=r.pop();t.has(i)||(t.add(i),H.childNodes(i).forEach(a=>r.push(a)))}}function Un(e,t,r){return e.size===0?!1:tc(e,t)}function tc(e,t,r){const i=H.parentNode(t);return i?e.has(i):!1}function Wn(e,t){return e.size===0?!1:Ko(e,t)}function Ko(e,t){const r=H.parentNode(t);return r?e.has(r)?!0:Ko(e,r):!1}let lt;function rc(e){lt=e}function sc(){lt=void 0}const J=e=>lt?((...r)=>{try{return e(...r)}catch(i){if(lt&<(i)===!0)return;throw i}}):e,Ve=[];function pt(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function ea(e,t){const r=new Ku;Ve.push(r),r.init(e);const[i,a]=Go(),u=new i(J(r.processMutations.bind(r)));return u.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[u,a]}function ic({mousemoveCb:e,sampling:t,doc:r,mirror:i}){if(t.mousemove===!1)return()=>{};const a=typeof t.mousemove=="number"?t.mousemove:50,u=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],h;const m=rt(J(o=>{const n=Date.now()-h;e(c.map(s=>(s.timeOffset-=n,s)),o),c=[],h=null}),u),d=J(rt(J(o=>{const n=pt(o),{clientX:s,clientY:l}=$t(o)?o.changedTouches[0]:o;h||(h=tt()),c.push({x:s,y:l,id:i.getId(n),timeOffset:tt()-h}),m(typeof DragEvent!="undefined"&&o instanceof DragEvent?_.Drag:o instanceof MouseEvent?_.MouseMove:_.TouchMove)}),a,{trailing:!1})),p=[we("mousemove",d,r),we("touchmove",d,r),we("drag",d,r)];return J(()=>{p.forEach(o=>o())})}function nc({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:a,sampling:u}){if(u.mouseInteraction===!1)return()=>{};const c=u.mouseInteraction===!0||u.mouseInteraction===void 0?{}:u.mouseInteraction,h=[];let m=null;const d=p=>o=>{const n=pt(o);if(ge(n,i,a,!0)||Ho(n))return;let s=null,l=p;if("pointerType"in o){switch(o.pointerType){case"mouse":s=Oe.Mouse;break;case"touch":s=Oe.Touch;break;case"pen":s=Oe.Pen;break}s===Oe.Touch?Z[p]===Z.MouseDown?l="TouchStart":Z[p]===Z.MouseUp&&(l="TouchEnd"):Oe.Pen}else $t(o)&&(s=Oe.Touch);s!==null?(m=s,(l.startsWith("Touch")&&s===Oe.Touch||l.startsWith("Mouse")&&s===Oe.Mouse)&&(s=null)):Z[p]===Z.Click&&(s=m,m=null);const f=$t(o)?o.changedTouches[0]:o;if(!f)return;const g=r.getId(n),{clientX:b,clientY:y}=f;J(e)(B({type:Z[l],id:g,x:b,y},s!==null&&{pointerType:s}))};return Object.keys(Z).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&c[p]!==!1).forEach(p=>{let o=Ue(p);const n=d(p);if(window.PointerEvent)switch(Z[p]){case Z.MouseDown:case Z.MouseUp:o=o.replace("mouse","pointer");break;case Z.TouchStart:case Z.TouchEnd:return}h.push(we(o,n,t))}),J(()=>{h.forEach(p=>p())})}function ta({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:a,sampling:u}){const c=J(rt(J(h=>{const m=pt(h);if(!m||ge(m,i,a,!0))return;const d=r.getId(m);if(m===t&&t.defaultView){const p=Hs(t.defaultView);e({id:d,x:p.left,y:p.top})}else e({id:d,x:m.scrollLeft,y:m.scrollTop})}),u.scroll||100));return we("scroll",c,t)}function oc({viewportResizeCb:e},{win:t}){let r=-1,i=-1;const a=J(rt(J(()=>{const u=Ys(),c=Js();(r!==u||i!==c)&&(e({width:Number(c),height:Number(u)}),r=u,i=c)}),200));return we("resize",a,t)}const ac=["INPUT","TEXTAREA","SELECT"],$n=new WeakMap;function lc({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:a,ignoreClass:u,ignoreSelector:c,maskInputOptions:h,maskInputFn:m,sampling:d,userTriggeredOnInput:p}){function o(y){let v=pt(y);const E=y.isTrusted,S=v&&v.tagName;if(v&&S==="OPTION"&&(v=H.parentElement(v)),!v||!S||ac.indexOf(S)<0||ge(v,i,a,!0)||v.classList.contains(u)||c&&v.matches(c))return;let w=v.value,C=!1;const M=Lt(v)||"",R=v.getAttribute("data-hl-record");M==="radio"||M==="checkbox"?C=v.checked:ho({maskInputOptions:h,type:M,tagName:S,overwriteRecord:R})&&(w=Pt({element:v,maskInputOptions:h,tagName:S,type:M,value:w,overwriteRecord:R,maskInputFn:m})),n(v,p?{text:w,isChecked:C,userTriggered:E}:{text:w,isChecked:C});const x=v.name;M==="radio"&&x&&C&&t.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach(D=>{if(D!==v){const T=D.value;n(D,p?{text:T,isChecked:!C,userTriggered:!1}:{text:T,isChecked:!C})}})}function n(y,v){const E=$n.get(y);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){$n.set(y,v);const S=r.getId(y);J(e)(de(B({},v),{id:S}))}}const l=(d.input==="last"?["change"]:["input","change"]).map(y=>we(y,J(o),t)),f=t.defaultView;if(!f)return()=>{l.forEach(y=>y())};const g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),b=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&l.push(...b.map(y=>dt(y[0],y[1],{set(){J(o)({target:this,isTrusted:!1})}},!1,f))),J(()=>{l.forEach(y=>y())})}function zt(e){const t=[];function r(i,a){if(Ot("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||Ot("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||Ot("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||Ot("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const c=Array.from(i.parentRule.cssRules).indexOf(i);return a.unshift(c),r(i.parentRule,a)}else if(i.parentStyleSheet){const c=Array.from(i.parentStyleSheet.cssRules).indexOf(i);a.unshift(c)}return a}return r(e,t)}function Pe(e,t,r){let i,a;return e?(e.ownerNode?i=t.getId(e.ownerNode):a=r.getId(e),{styleId:a,id:i}):{}}function ke(e,t,r,i){e[t]===r&&(e[t]=i)}const uc=5;function cc({styleSheetRuleCb:e,mirror:t,stylesheetManager:r,doc:i,styleSheetResyncInterval:a},{win:u}){if(!u.CSSStyleSheet||!u.CSSStyleSheet.prototype)return()=>{};const c=new WeakMap,h=new WeakSet;let m=!1,d=!1,p=!1,o,n=!1,s=!1,l=!1;const f=(P,U)=>{const F=c.get(P);F&&(F.reported=Math.max(0,F.reported+U),F.everSeen=Math.max(F.everSeen,F.reported))},g=P=>new Proxy(P,{apply:J((U,F,$)=>{if(m)return d=!0,U.apply(F,$);if(n||s)return U.apply(F,$);const[G,Q]=$,{id:ie,styleId:W}=Pe(F,t,r.styleMirror),K=ie&&ie!==-1||W&&W!==-1;K&&e({id:ie,styleId:W,adds:[{rule:G,index:Q}]}),s=!0;let me;try{me=U.apply(F,$)}finally{s=!1}return K&&f(F,1),me})}),b=P=>new Proxy(P,{apply:J((U,F,$)=>{if(m)return p=!0,U.apply(F,$);if(n||l)return U.apply(F,$);const[G]=$,{id:Q,styleId:ie}=Pe(F,t,r.styleMirror),W=Q&&Q!==-1||ie&&ie!==-1;W&&e({id:Q,styleId:ie,removes:[{index:G}]}),l=!0;let K;try{K=U.apply(F,$)}finally{l=!1}return W&&f(F,-1),K})}),y=u.CSSStyleSheet.prototype.insertRule;let v=g(y),E=y;u.CSSStyleSheet.prototype.insertRule=v;const S=u.CSSStyleSheet.prototype.addRule,w=function(P,U,F=this.cssRules.length){const $=`${P} { ${U} }`;return u.CSSStyleSheet.prototype.insertRule.apply(this,[$,F])};u.CSSStyleSheet.prototype.addRule=w;const C=u.CSSStyleSheet.prototype.deleteRule;let M=b(C),R=C;u.CSSStyleSheet.prototype.deleteRule=M;const x=u.CSSStyleSheet.prototype.removeRule,D=function(P){return u.CSSStyleSheet.prototype.deleteRule.apply(this,[P])};u.CSSStyleSheet.prototype.removeRule=D;let T,X;u.CSSStyleSheet.prototype.replace&&(T=u.CSSStyleSheet.prototype.replace,X=new Proxy(T,{apply:J((P,U,F)=>{if(n)return P.apply(U,F);const[$]=F,{id:G,styleId:Q}=Pe(U,t,r.styleMirror);return(G&&G!==-1||Q&&Q!==-1)&&e({id:G,styleId:Q,replace:$}),P.apply(U,F)})}),u.CSSStyleSheet.prototype.replace=X);let te,I;u.CSSStyleSheet.prototype.replaceSync&&(te=u.CSSStyleSheet.prototype.replaceSync,I=new Proxy(te,{apply:J((P,U,F)=>{if(n)return P.apply(U,F);const[$]=F,{id:G,styleId:Q}=Pe(U,t,r.styleMirror);return(G&&G!==-1||Q&&Q!==-1)&&e({id:G,styleId:Q,replaceSync:$}),P.apply(U,F)})}),u.CSSStyleSheet.prototype.replaceSync=I);const le={};Nt("CSSGroupingRule")?le.CSSGroupingRule=u.CSSGroupingRule:(Nt("CSSMediaRule")&&(le.CSSMediaRule=u.CSSMediaRule),Nt("CSSConditionRule")&&(le.CSSConditionRule=u.CSSConditionRule),Nt("CSSSupportsRule")&&(le.CSSSupportsRule=u.CSSSupportsRule));const k={},V={};Object.entries(le).forEach(([P,U])=>{k[P]={insertRule:U.prototype.insertRule,deleteRule:U.prototype.deleteRule},V[P]={},V[P].insertRule=new Proxy(k[P].insertRule,{apply:J((F,$,G)=>{if(n)return F.apply($,G);const[Q,ie]=G,{id:W,styleId:K}=Pe($.parentStyleSheet,t,r.styleMirror);return(W&&W!==-1||K&&K!==-1)&&e({id:W,styleId:K,adds:[{rule:Q,index:[...zt($),ie||0]}]}),F.apply($,G)})}),V[P].deleteRule=new Proxy(k[P].deleteRule,{apply:J((F,$,G)=>{if(n)return F.apply($,G);const[Q]=G,{id:ie,styleId:W}=Pe($.parentStyleSheet,t,r.styleMirror);return(ie&&ie!==-1||W&&W!==-1)&&e({id:ie,styleId:W,removes:[{index:[...zt($),Q]}]}),F.apply($,G)})}),U.prototype.insertRule=V[P].insertRule,U.prototype.deleteRule=V[P].deleteRule});const re=()=>{m=!0,d=!1,p=!1;try{const P=o!=null?o:o=new u.CSSStyleSheet;P.insertRule(":root {}",0),P.deleteRule(0)}catch(P){return{insertRule:u.CSSStyleSheet.prototype.insertRule===v,deleteRule:u.CSSStyleSheet.prototype.deleteRule===M}}finally{m=!1}return{insertRule:d,deleteRule:p}};let z=0;const oe=P=>{z>=uc||(z+=1,P.insertRule||(E=u.CSSStyleSheet.prototype.insertRule,v=g(E),u.CSSStyleSheet.prototype.insertRule=v),P.deleteRule||(R=u.CSSStyleSheet.prototype.deleteRule,M=b(R),u.CSSStyleSheet.prototype.deleteRule=M))},pe=P=>{for(let U=0;U<i.styleSheets.length;U++){const F=i.styleSheets[U];if(h.has(F))continue;const $=F.ownerNode;if(!$||Ue($.nodeName)!=="style"||($.textContent||"").trim().length)continue;const G=t.getId($);if(!G||G===-1)continue;let Q;try{Q=F.cssRules}catch(K){continue}const ie=Q.length;let W=c.get(F);if(!W){if(Array.from(Q).some(K=>lo(K))){h.add(F);continue}if(W={reported:ie,everSeen:ie},c.set(F,W),P)continue;N(G,W,Q);continue}if(W.everSeen=Math.max(W.everSeen,ie),ie!==W.reported)if(ie>W.reported){const K=[];for(let me=W.reported;me<ie;me++)K.push({rule:Q[me].cssText,index:me});e({id:G,adds:K}),W.reported=ie}else N(G,W,Q)}};function N(P,U,F){const $=[];for(let G=U.everSeen-1;G>=0;G--)$.push({index:G});$.length&&e({id:P,removes:$}),e({id:P,adds:Array.from(F,(G,Q)=>({rule:G.cssText,index:Q}))}),U.reported=F.length,U.everSeen=F.length}let ve;return a>0&&(ve=u.setInterval(J(()=>{const P=re(),U=P.insertRule&&P.deleteRule;U||oe(P),pe(U)}),a)),J(()=>{ve!==void 0&&u.clearInterval(ve),n=!0;const P=u.CSSStyleSheet.prototype;ke(P,"insertRule",v,E),ke(P,"deleteRule",M,R),ke(P,"addRule",w,S),ke(P,"removeRule",D,x),X&&ke(P,"replace",X,T),I&&ke(P,"replaceSync",I,te),Object.entries(le).forEach(([U,F])=>{ke(F.prototype,"insertRule",V[U].insertRule,k[U].insertRule),ke(F.prototype,"deleteRule",V[U].deleteRule,k[U].deleteRule)})})}function ra({mirror:e,stylesheetManager:t},r){var i,a,u;let c=null;r.nodeName==="#document"?c=e.getId(r):c=e.getId(H.host(r));const h=r.nodeName==="#document"?(i=r.defaultView)==null?void 0:i.Document:(u=(a=r.ownerDocument)==null?void 0:a.defaultView)==null?void 0:u.ShadowRoot,m=h!=null&&h.prototype?Object.getOwnPropertyDescriptor(h==null?void 0:h.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!h||!m?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get(){var d;return(d=m.get)==null?void 0:d.call(this)},set(d){var p;const o=(p=m.set)==null?void 0:p.call(this,d);if(c!==null&&c!==-1)try{t.adoptStyleSheets(d,c)}catch(n){}return o}}),J(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:m.configurable,enumerable:m.enumerable,get:m.get,set:m.set})}))}function hc({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:a}){const u=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(u,{apply:J((h,m,d)=>{var p;const[o,n,s]=d;if(r.has(o))return u.apply(m,[o,n,s]);const{id:l,styleId:f}=Pe((p=m.parentRule)==null?void 0:p.parentStyleSheet,t,i.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,set:{property:o,value:n,priority:s},index:zt(m.parentRule)}),h.apply(m,d)})});const c=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:J((h,m,d)=>{var p;const[o]=d;if(r.has(o))return c.apply(m,[o]);const{id:n,styleId:s}=Pe((p=m.parentRule)==null?void 0:p.parentStyleSheet,t,i.styleMirror);return(n&&n!==-1||s&&s!==-1)&&e({id:n,styleId:s,remove:{property:o},index:zt(m.parentRule)}),h.apply(m,d)})}),J(()=>{a.CSSStyleDeclaration.prototype.setProperty=u,a.CSSStyleDeclaration.prototype.removeProperty=c})}function fc({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:a,doc:u}){const c=J(m=>rt(J(d=>{const p=pt(d);if(!p||ge(p,t,r,!0))return;const{currentTime:o,volume:n,muted:s,playbackRate:l,loop:f}=p;e({type:m,id:i.getId(p),currentTime:o,volume:n,muted:s,playbackRate:l,loop:f})}),a.media||500)),h=[we("play",c(Le.Play),u),we("pause",c(Le.Pause),u),we("seeked",c(Le.Seeked),u),we("volumechange",c(Le.VolumeChange),u),we("ratechange",c(Le.RateChange),u)];return J(()=>{h.forEach(m=>m())})}function dc({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const i=[],a=new WeakMap,u=r.FontFace;r.FontFace=function(m,d,p){const o=new u(m,d,p);return a.set(o,{family:m,buffer:typeof d!="string",descriptors:p,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),o};const c=je(t.fonts,"add",function(h){return function(m){return setTimeout(J(()=>{const d=a.get(m);d&&(e(d),a.delete(m))}),0),h.apply(this,[m])}});return i.push(()=>{r.FontFace=u}),i.push(c),J(()=>{i.forEach(h=>h())})}function pc(e){const{doc:t,mirror:r,blockClass:i,blockSelector:a,selectionCb:u}=e;let c=!0;const h=J(()=>{const m=t.getSelection();if(!m||c&&(m!=null&&m.isCollapsed))return;c=m.isCollapsed||!1;const d=[],p=m.rangeCount||0;for(let o=0;o<p;o++){const n=m.getRangeAt(o),{startContainer:s,startOffset:l,endContainer:f,endOffset:g}=n;ge(s,i,a,!0)||ge(f,i,a,!0)||d.push({start:r.getId(s),startOffset:l,end:r.getId(f),endOffset:g})}u({ranges:d})});return h(),we("selectionchange",h)}function mc({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:je(r.customElements,"define",function(a){return function(u,c,h){try{t({define:{name:u}})}catch(m){console.warn(`Custom element callback failed for ${u}`)}return a.apply(this,[u,c,h])}})}function gc(e,t){const{mutationCb:r,mousemoveCb:i,mouseInteractionCb:a,scrollCb:u,viewportResizeCb:c,inputCb:h,mediaInteractionCb:m,styleSheetRuleCb:d,styleDeclarationCb:p,canvasMutationCb:o,fontCb:n,selectionCb:s,customElementCb:l}=e;e.mutationCb=(...f)=>{t.mutation&&t.mutation(...f),r(...f)},e.mousemoveCb=(...f)=>{t.mousemove&&t.mousemove(...f),i(...f)},e.mouseInteractionCb=(...f)=>{t.mouseInteraction&&t.mouseInteraction(...f),a(...f)},e.scrollCb=(...f)=>{t.scroll&&t.scroll(...f),u(...f)},e.viewportResizeCb=(...f)=>{t.viewportResize&&t.viewportResize(...f),c(...f)},e.inputCb=(...f)=>{t.input&&t.input(...f),h(...f)},e.mediaInteractionCb=(...f)=>{t.mediaInteaction&&t.mediaInteaction(...f),m(...f)},e.styleSheetRuleCb=(...f)=>{t.styleSheetRule&&t.styleSheetRule(...f),d(...f)},e.styleDeclarationCb=(...f)=>{t.styleDeclaration&&t.styleDeclaration(...f),p(...f)},e.canvasMutationCb=(...f)=>{t.canvasMutation&&t.canvasMutation(...f),o(...f)},e.fontCb=(...f)=>{t.font&&t.font(...f),n(...f)},e.selectionCb=(...f)=>{t.selection&&t.selection(...f),s(...f)},e.customElementCb=(...f)=>{t.customElement&&t.customElement(...f),l(...f)}}function yc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};gc(e,t);let i,a=()=>{};e.recordDOM&&([i,a]=ea(e,e.doc));const u=ic(e),c=nc(e),h=ta(e),m=oc(e,{win:r}),d=lc(e),p=fc(e);let o=()=>{},n=()=>{},s=()=>{},l=()=>{};e.recordDOM&&(o=cc(e,{win:r}),n=ra(e,e.doc),s=hc(e,{win:r}),e.collectFonts&&(l=dc(e)));const f=pc(e),g=mc(e),b=[];for(const y of e.plugins)b.push(y.observer(y.callback,r,y.options));return J(()=>{Ve.forEach(y=>y.reset()),i==null||i.disconnect(),a(),u(),c(),h(),m(),d(),p(),o(),n(),s(),l(),f(),g(),b.forEach(y=>y())})}function Ot(e){return typeof window[e]!="undefined"}function Nt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class zn{constructor(t){O(this,"iframeIdToRemoteIdMap",new WeakMap),O(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,i,a){const u=i||this.getIdToRemoteIdMap(t),c=a||this.getRemoteIdToIdMap(t);let h=u.get(r);return h||(h=this.generateIdFn(),u.set(r,h),c.set(h,r)),h}getIds(t,r){const i=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return r.map(u=>this.getId(t,u,i,a))}getRemoteId(t,r,i){const a=i||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const u=a.get(r);return u||-1}getRemoteIds(t,r){const i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getRemoteId(t,a,i))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class wc{constructor(t){O(this,"iframes",new WeakMap),O(this,"crossOriginIframeMap",new WeakMap),O(this,"crossOriginIframeMirror",new zn(fo)),O(this,"crossOriginIframeStyleMirror"),O(this,"crossOriginIframeRootIdMap",new WeakMap),O(this,"mirror"),O(this,"mutationCb"),O(this,"wrappedEmit"),O(this,"loadListener"),O(this,"stylesheetManager"),O(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new zn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var i,a;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(a=this.loadListener)==null||a.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin)return;const i=t.source;if(!i)return;const a=this.crossOriginIframeMap.get(i);if(!a)return;const u=this.transformCrossOriginEvent(a,r.data.event);u&&this.wrappedEmit(u,r.data.isCheckout)}transformCrossOriginEvent(t,r){var i;switch(r.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const a=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(r.data.node,a),{timestamp:r.timestamp,type:L.IncrementalSnapshot,data:{source:_.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return r;case L.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case L.IncrementalSnapshot:switch(r.data.source){case _.Mutation:return r.data.adds.forEach(a=>{this.replaceIds(a,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,t);const u=this.crossOriginIframeRootIdMap.get(t);u&&this.patchRootIdOnNode(a.node,u)}),r.data.removes.forEach(a=>{this.replaceIds(a,t,["parentId","id"])}),r.data.attributes.forEach(a=>{this.replaceIds(a,t,["id"])}),r.data.texts.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case _.Drag:case _.TouchMove:case _.MouseMove:return r.data.positions.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case _.ViewportResize:return!1;case _.MediaInteraction:case _.MouseInteraction:case _.Scroll:case _.CanvasMutation:case _.Input:return this.replaceIds(r.data,t,["id"]),r;case _.StyleSheetRule:case _.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case _.Font:return r;case _.Selection:return r.data.ranges.forEach(a=>{this.replaceIds(a,t,["start","end"])}),r;case _.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(i=r.data.styles)==null||i.forEach(a=>{this.replaceStyleIds(a,t,["styleId"])}),r}}return!1}replace(t,r,i,a){for(const u of a)!Array.isArray(r[u])&&typeof r[u]!="number"||(Array.isArray(r[u])?r[u]=t.getIds(i,r[u]):r[u]=t.getId(i,r[u]));return r}replaceIds(t,r,i){return this.replace(this.crossOriginIframeMirror,t,r,i)}replaceStyleIds(t,r,i){return this.replace(this.crossOriginIframeStyleMirror,t,r,i)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,r)})}patchRootIdOnNode(t,r){t.type!==Ne.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,r)})}}class vc{constructor(t){O(this,"shadowDoms",new WeakSet),O(this,"mutationCb"),O(this,"scrollCb"),O(this,"bypassOptions"),O(this,"mirror"),O(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!ot(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[i]=ea(de(B({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(ta(de(B({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(H.host(t))),this.restoreHandlers.push(ra({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const i=this;this.restoreHandlers.push(je(t.prototype,"attachShadow",function(a){return function(u){const c=a.call(this,u),h=H.shadowRoot(this);return h&&ii(this)&&i.addShadowRoot(h,r),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",it=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Tt=0;Tt<Ze.length;Tt++)it[Ze.charCodeAt(Tt)]=Tt;var bc=function(e){var t=new Uint8Array(e),r,i=t.length,a="";for(r=0;r<i;r+=3)a+=Ze[t[r]>>2],a+=Ze[(t[r]&3)<<4|t[r+1]>>4],a+=Ze[(t[r+1]&15)<<2|t[r+2]>>6],a+=Ze[t[r+2]&63];return i%3===2?a=a.substring(0,a.length-1)+"=":i%3===1&&(a=a.substring(0,a.length-2)+"=="),a},Sc=function(e){var t=e.length*.75,r=e.length,i,a=0,u,c,h,m;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var d=new ArrayBuffer(t),p=new Uint8Array(d);for(i=0;i<r;i+=4)u=it[e.charCodeAt(i)],c=it[e.charCodeAt(i+1)],h=it[e.charCodeAt(i+2)],m=it[e.charCodeAt(i+3)],p[a++]=u<<2|c>>4,p[a++]=(c&15)<<4|h>>2,p[a++]=(h&3)<<6|m&63;return d};const Vn=new Map;function Cc(e,t){let r=Vn.get(e);return r||(r=new Map,Vn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const sa=(e,t,r)=>{if(!e||!(na(e,t)||typeof e=="object"))return;const i=e.constructor.name,a=Cc(r,i);let u=a.indexOf(e);return u===-1&&(u=a.length,a.push(e)),u};function _t(e,t,r){if(e instanceof Array)return e.map(i=>_t(i,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,a=bc(e);return{rr_type:i,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[_t(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:a}=e;return{rr_type:i,src:a}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",a=e.toDataURL();return{rr_type:i,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[_t(e.data,t,r),e.width,e.height]};if(na(e,t)||typeof e=="object"){const i=e.constructor.name,a=sa(e,t,r);return{rr_type:i,index:a}}}}return e}const ia=(e,t,r)=>e.map(i=>_t(i,t,r)),na=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(a=>typeof t[a]=="function").find(a=>e instanceof t[a]);function Ec(e,t,r,i){const a=[],u=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of u)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;const h=je(t.CanvasRenderingContext2D.prototype,c,function(m){return function(...d){return ge(this.canvas,r,i,!0)||setTimeout(()=>{const p=ia(d,t,this);e(this.canvas,{type:Te["2D"],property:c,args:p})},0),m.apply(this,d)}});a.push(h)}catch(h){const m=dt(t.CanvasRenderingContext2D.prototype,c,{set(d){e(this.canvas,{type:Te["2D"],property:c,args:[d],setter:!0})}});a.push(m)}return()=>{a.forEach(c=>c())}}function xc(e){return e==="experimental-webgl"?"webgl":e}function jn(e,t,r,i){const a=[];try{const u=je(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(h,...m){if(!ge(this,t,r,!0)){const d=xc(h);if("__context"in this||(this.__context=d),i&&["webgl","webgl2"].includes(d))if(m[0]&&typeof m[0]=="object"){const p=m[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else m.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[h,...m])}});a.push(u)}catch(u){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach(u=>u())}}function qn(e,t,r,i,a,u){const c=[],h=Object.getOwnPropertyNames(e);for(const m of h)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(m))try{if(typeof e[m]!="function")continue;const d=je(e,m,function(p){return function(...o){const n=p.apply(this,o);if(sa(n,u,this),"tagName"in this.canvas&&!ge(this.canvas,i,a,!0)){const s=ia(o,u,this),l={type:t,property:m,args:s};r(this.canvas,l)}return n}});c.push(d)}catch(d){const p=dt(e,m,{set(o){r(this.canvas,{type:t,property:m,args:[o],setter:!0})}});c.push(p)}return c}function Rc(e,t,r,i){const a=[];return typeof t.WebGLRenderingContext!="undefined"&&a.push(...qn(t.WebGLRenderingContext.prototype,Te.WebGL,e,r,i,t)),typeof t.WebGL2RenderingContext!="undefined"&&a.push(...qn(t.WebGL2RenderingContext.prototype,Te.WebGL2,e,r,i,t)),()=>{a.forEach(u=>u())}}const oa=`(function() {
|
|
62
62
|
"use strict";
|
|
63
63
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
64
64
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -158,7 +158,7 @@ or you can use record.mirror to access the mirror instance during recording.`;ex
|
|
|
158
158
|
};
|
|
159
159
|
})();
|
|
160
160
|
//# sourceMappingURL=image-bitmap-data-url-worker-DwtK8A0z.js.map
|
|
161
|
-
`,Vn=typeof self!="undefined"&&self.Blob&&new Blob([ia],{type:"text/javascript;charset=utf-8"});function Ec(e){let t;try{if(t=Vn&&(self.URL||self.webkitURL).createObjectURL(Vn),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ia),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class xc{constructor(t){O(this,"pendingCanvasMutations",new Map),O(this,"rafStamps",{latestId:0,invokeId:null}),O(this,"mirror"),O(this,"logger"),O(this,"worker"),O(this,"snapshotInProgressMap",new Map),O(this,"lastSnapshotTime",new Map),O(this,"options"),O(this,"mutationCb"),O(this,"resetObservers"),O(this,"frozen",!1),O(this,"locked",!1),O(this,"processMutation",(o,n)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(n)});const{sampling:r,win:s,blockClass:a,blockSelector:u,recordCanvas:c,recordLocalVideos:f,recordRemoteVideos:m,initialSnapshotDelay:d,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new Ec,this.worker.onmessage=o=>{const{id:n}=o.data;if(this.snapshotInProgressMap.set(n,!1),!("base64"in o.data)){this.debug(null,"canvas worker received empty message",{id:n,data:o.data,status:o.data.status});return}const{base64:i,type:l,dx:h,dy:g,dw:b,dh:y}=o.data,v={id:n,type:Me["2D"],commands:[{property:"clearRect",args:[h,g,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:l}]},h,g,b,y]}]};this.debug(null,"canvas worker recording mutation",v),this.mutationCb(v)},this.options=t,c&&r==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:r}),this.initCanvasMutationObserver(s,a,u)):c&&typeof r=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:r}),this.initCanvasFPSObserver(f,m,r,s,a,u,{initialSnapshotDelay:d,dataURLOptions:p},t.resizeFactor,t.maxSnapshotDimension))}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}debug(t,...r){if(!this.logger)return;const s=this.mirror.getId(t);let a="[highlight-canvas-manager]";t&&(a=`[highlight-canvas] [id:${s}]`,t.tagName.toLowerCase()==="canvas"&&(a+=` [ctx:${t.__context}]`)),this.logger.debug(a,t,...r)}async snapshot(t){var r;const s=this.mirror.getId(t);if(this.snapshotInProgressMap.get(s)){this.debug(t,"snapshotting already in progress for",s);return}const a=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),u=this.lastSnapshotTime.get(s);if(!(u&&new Date().getTime()-u<a)){if(this.debug(t,"starting snapshotting"),t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}this.lastSnapshotTime.set(s,new Date().getTime()),this.snapshotInProgressMap.set(s,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const p=t.getContext(t.__context);((r=p==null?void 0:p.getContextAttributes())==null?void 0:r.preserveDrawingBuffer)===!1&&(p.clear(p.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:p==null?void 0:p.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let c=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const p=Math.max(t.width,t.height);c=Math.min(c,this.options.maxSnapshotDimension/p)}const f=t.width*c,m=t.height*c,d=await createImageBitmap(t,{resizeWidth:f,resizeHeight:m});this.debug(t,"created image bitmap",{width:d.width,height:d.height}),this.worker.postMessage({id:s,bitmap:d,width:f,height:m,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[d]),this.debug(t,"sent message")}catch(c){this.debug(t,"failed to snapshot",c)}finally{this.snapshotInProgressMap.set(s,!1)}}}initCanvasFPSObserver(t,r,s,a,u,c,f,m,d){const p=zn(a,u,c,!0),o=1e3/s;let n=0,i;const l=new Map,h=(v,E)=>{const S=[];v.querySelectorAll(E).forEach(M=>S.push(M));const w=document.createNodeIterator(v,Node.ELEMENT_NODE);let C;for(;C=w.nextNode();)C!=null&&C.shadowRoot&&S.push(...h(C.shadowRoot,E));return S},g=v=>{const E=[];return h(a.document,"canvas").forEach(S=>{if(!oe(S,u,c,!0)){this.debug(S,"discovered canvas"),E.push(S);const w=this.mirror.getId(S);l.has(w)||l.set(w,v)}}),E},b=v=>{const E=[];return(t||r)&&h(a.document,"video").forEach(S=>{if(!(!r&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!t&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!oe(S,u,c,!0)){E.push(S);const w=this.mirror.getId(S);l.has(w)||l.set(w,v)}}),E},y=async v=>{if(n&&v-n<o){i=requestAnimationFrame(w=>void y(w));return}n=v;const E=w=>{const C=this.mirror.getId(w),M=l.get(C),R=!f.initialSnapshotDelay||v-M>f.initialSnapshotDelay;return this.debug(w,{delay:f.initialSnapshotDelay,delta:v-M,hadLoadingTime:R}),R},S=[];S.push(...g(v).filter(E).map(w=>this.snapshot(w))),S.push(...b(v).filter(E).map(async w=>{this.debug(w,"starting video snapshotting");const C=this.mirror.getId(w);if(this.snapshotInProgressMap.get(C)){this.debug(w,"video snapshotting already in progress for",C);return}this.snapshotInProgressMap.set(C,!0);try{const{width:M,height:R}=w.getBoundingClientRect(),{actualWidth:x,actualHeight:D}={actualWidth:w.videoWidth,actualHeight:w.videoHeight},T=Math.max(x,D);if(T===0){this.debug(w,"not yet ready",{width:w.width,height:w.height,actualWidth:x,actualHeight:D,boxWidth:M,boxHeight:R});return}let G=m||1;d&&(G=Math.min(G,d/T));const X=x*G,I=D*G,ne=await createImageBitmap(w,{resizeWidth:X,resizeHeight:I}),P=Math.max(M,R)/T,V=x*P,H=D*P,F=(M-V)/2,Z=(R-H)/2;this.debug(w,"created image bitmap",{actualWidth:x,actualHeight:D,boxWidth:M,boxHeight:R,outputWidth:V,outputHeight:H,resizeWidth:X,resizeHeight:I,scale:G,outputScale:P,offsetX:F,offsetY:Z}),this.worker.postMessage({id:C,bitmap:ne,width:X,height:I,dx:F,dy:Z,dw:V,dh:H,dataURLOptions:f.dataURLOptions,logDebug:!!this.logger},[ne]),this.debug(w,"send message")}catch(M){this.debug(w,"failed to snapshot",M)}finally{this.snapshotInProgressMap.set(C,!1)}})),await Promise.all(S).catch(console.error),i=requestAnimationFrame(w=>void y(w))};i=requestAnimationFrame(v=>void y(v)),this.resetObservers=()=>{p(),i&&cancelAnimationFrame(i)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const a=zn(t,r,s,!1),u=bc(this.processMutation.bind(this),t,r,s),c=Cc(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{a(),u(),c()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const a=s.map(c=>{const d=c,{type:f}=d;return mt(d,["type"])}),{type:u}=s[0];this.mutationCb({id:r,type:u,commands:a}),this.pendingCanvasMutations.delete(t)}}class Rc{constructor(t){O(this,"trackedLinkElements",new WeakSet),O(this,"mutationCb"),O(this,"adoptedStyleSheetCb"),O(this,"styleMirror",new es),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const s={id:r,styleIds:[]},a=[];for(const u of t){let c;this.styleMirror.has(u)?c=this.styleMirror.getId(u):(c=this.styleMirror.add(u),a.push({styleId:c,rules:Array.from(u.rules||CSSRule,(f,m)=>({rule:no(f,u.href),index:m}))})),s.styleIds.push(c)}a.length>0&&(s.styles=a),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Mc{constructor(){O(this,"nodeMap",new WeakMap),O(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(a=>a!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let re,At,at,$t=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ls=e.contentWindow)==null?void 0:ls.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ye=oo();function Ne(e={}){var t;const{emit:r,checkoutEveryNms:s,checkoutEveryNth:a,blockClass:u="highlight-block",blockSelector:c=null,ignoreClass:f="highlight-ignore",ignoreSelector:m=null,maskTextClass:d="highlight-mask",maskTextSelector:p=null,inlineStylesheet:o=!0,maskAllInputs:n,maskInputOptions:i,slimDOMOptions:l,maskInputFn:h,maskTextFn:g=Ii,hooks:b,packFn:y,sampling:v={},mousemoveWait:E,recordDOM:S=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:M=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:R=!1,collectFonts:x=!1,inlineImages:D=!1,inlineVideos:T=!1,plugins:G,keepIframeSrcFn:X=()=>!1,privacySetting:I="default",ignoreCSSAttributes:ne=new Set([]),errorHandler:P,logger:V}=e,H=L(L({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);ec(P);const F=C?window.parent===window:!0;let Z=!1;if(!F)try{window.parent.document&&(Z=!1)}catch(q){Z=!0}if(F&&!r)throw new Error("emit function is required");if(!F&&!Z)return()=>{};E!==void 0&&v.mousemove===void 0&&(v.mousemove=E),ye.reset();const ue=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}:i!==void 0?i:{password:!0},N=po(l);Xi();let Se,ce=0;const Te=q=>{for(const ge of G||[])ge.eventProcessor&&(q=ge.eventProcessor(q));return y&&!Z&&(q=y(q)),q};re=(q,ge)=>{var ee;const te=q;if(te.timestamp=Ze(),(ee=Ue[0])!=null&&ee.isFrozen()&&te.type!==k.FullSnapshot&&!(te.type===k.IncrementalSnapshot&&te.data.source===_.Mutation)&&Ue.forEach(he=>he.unfreeze()),F)r==null||r(Te(te),ge);else if(Z){const he={type:"rrweb",event:Te(te),origin:window.location.origin,isCheckout:ge};window.parent.postMessage(he,"*")}if(te.type===k.FullSnapshot)Se=te,ce=0;else if(te.type===k.IncrementalSnapshot){if(te.data.source===_.Mutation&&te.data.isAttachIframe)return;ce++;const he=a&&ce>=a,Y=s&&te.timestamp-Se.timestamp>s;(he||Y)&&At(!0)}};const De=q=>{re({type:k.IncrementalSnapshot,data:L({source:_.Mutation},q)})},Ce=q=>re({type:k.IncrementalSnapshot,data:L({source:_.Scroll},q)}),ze=q=>re({type:k.IncrementalSnapshot,data:L({source:_.CanvasMutation},q)}),tt=q=>re({type:k.IncrementalSnapshot,data:L({source:_.AdoptedStyleSheet},q)}),pe=new Rc({mutationCb:De,adoptedStyleSheetCb:tt}),ie=new mc({mirror:ye,mutationCb:De,stylesheetManager:pe,recordCrossOriginIframes:C,wrappedEmit:re});for(const q of G||[])q.getMirror&&q.getMirror({nodeMirror:ye,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});const me=new Mc,de=typeof(v==null?void 0:v.canvas)=="object"?v.canvas:{fps:v==null?void 0:v.canvas};at=new xc({recordCanvas:w,recordLocalVideos:D,recordRemoteVideos:T,mutationCb:ze,win:window,blockClass:u,blockSelector:c,mirror:ye,sampling:de.fps,samplingManual:de.fpsManual,clearWebGLBuffer:de.clearWebGLBuffer,initialSnapshotDelay:de.initialSnapshotDelay,dataURLOptions:H,resizeFactor:de.resizeFactor,maxSnapshotDimension:de.maxSnapshotDimension,logger:V});const dt=new gc({mutationCb:De,scrollCb:Ce,bypassOptions:{blockClass:u,blockSelector:c,maskTextClass:d,maskTextSelector:p,inlineStylesheet:o,maskInputOptions:ue,dataURLOptions:H,maskTextFn:g,maskInputFn:h,recordCanvas:w,inlineImages:D,inlineVideos:T,privacySetting:I,sampling:v,slimDOMOptions:N,iframeManager:ie,stylesheetManager:pe,canvasManager:at,keepIframeSrcFn:X,processedNodeManager:me},mirror:ye});At=(q=!1)=>{if(!S)return;re({type:k.Meta,data:{href:window.location.href,width:Hi(),height:Gi()}},q),pe.reset(),dt.init(),Ue.forEach(ee=>ee.lock());const ge=yl(document,{mirror:ye,blockClass:u,blockSelector:c,maskTextClass:d,maskTextSelector:p,inlineStylesheet:o,maskAllInputs:ue,maskTextFn:g,maskInputFn:h,slimDOM:N,dataURLOptions:H,recordCanvas:w,inlineImages:D,inlineVideos:T,privacySetting:I,onSerialize:ee=>{Qe(ee,ye)&&ie.addIframe(ee),Zi(ee,ye)&&pe.trackLinkElement(ee),ke(ee)&&dt.addShadowRoot(W.shadowRoot(ee),document)},onIframeLoad:(ee,te)=>{ie.attachIframe(ee,te),dt.observeAttachShadow(ee)},onStylesheetLoad:(ee,te)=>{pe.attachLinkElement(ee,te)},keepIframeSrcFn:X});if(!ge)return console.warn("Failed to snapshot the document");re({type:k.FullSnapshot,data:{node:ge,initialOffset:qi(window)}},q),Ue.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&pe.adoptStyleSheets(document.adoptedStyleSheets,ye.getId(document))};try{const q=[],ge=te=>{var he;return z(pc)({mutationCb:De,mousemoveCb:(Y,sr)=>re({type:k.IncrementalSnapshot,data:{source:sr,positions:Y}}),mouseInteractionCb:Y=>re({type:k.IncrementalSnapshot,data:L({source:_.MouseInteraction},Y)}),scrollCb:Ce,viewportResizeCb:Y=>re({type:k.IncrementalSnapshot,data:L({source:_.ViewportResize},Y)}),inputCb:Y=>re({type:k.IncrementalSnapshot,data:L({source:_.Input},Y)}),mediaInteractionCb:Y=>re({type:k.IncrementalSnapshot,data:L({source:_.MediaInteraction},Y)}),styleSheetRuleCb:Y=>re({type:k.IncrementalSnapshot,data:L({source:_.StyleSheetRule},Y)}),styleDeclarationCb:Y=>re({type:k.IncrementalSnapshot,data:L({source:_.StyleDeclaration},Y)}),canvasMutationCb:ze,fontCb:Y=>re({type:k.IncrementalSnapshot,data:L({source:_.Font},Y)}),selectionCb:Y=>{re({type:k.IncrementalSnapshot,data:L({source:_.Selection},Y)})},customElementCb:Y=>{re({type:k.IncrementalSnapshot,data:L({source:_.CustomElement},Y)})},blockClass:u,ignoreClass:f,ignoreSelector:m,maskTextClass:d,maskTextSelector:p,maskInputOptions:ue,inlineStylesheet:o,sampling:v,recordDOM:S,recordCanvas:w,inlineImages:D,inlineVideos:T,userTriggeredOnInput:R,collectFonts:x,doc:te,maskInputFn:h,maskTextFn:g,keepIframeSrcFn:X,blockSelector:c,slimDOMOptions:N,dataURLOptions:H,mirror:ye,iframeManager:ie,stylesheetManager:pe,shadowDomManager:dt,processedNodeManager:me,canvasManager:at,ignoreCSSAttributes:ne,privacySetting:I,plugins:((he=G==null?void 0:G.filter(Y=>Y.observer))==null?void 0:he.map(Y=>({observer:Y.observer,options:Y.options,callback:sr=>re({type:k.Plugin,data:{plugin:Y.name,payload:sr}})})))||[]},b)};ie.addLoadListener(te=>{try{q.push(ge(te.contentDocument))}catch(he){console.warn(he)}});const ee=()=>{At(),q.push(ge(document)),$t=!0};return["interactive","complete"].includes(document.readyState)?ee():(q.push(le("DOMContentLoaded",()=>{re({type:k.DomContentLoaded,data:{}}),M==="DOMContentLoaded"&&ee()})),q.push(le("load",()=>{re({type:k.Load,data:{}}),M==="load"&&ee()},window))),()=>{q.forEach(te=>{try{te()}catch(he){String(he).toLowerCase().includes("cross-origin")||console.warn(he)}}),me.destroy(),$t=!1,tc()}}catch(q){console.warn(q)}}Ne.addCustomEvent=(e,t)=>{$t&&re({type:k.Custom,data:{tag:e,payload:t}})};Ne.freezePage=()=>{Ue.forEach(e=>e.freeze())};Ne.takeFullSnapshot=e=>{if(!$t)throw new Error("please take full snapshot after start recording");At(e)};Ne.snapshotCanvas=async e=>{if(!at)throw new Error("canvas manager is not initialized");await at.snapshot(e)};Ne.mirror=ye;function sa(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(a){a(r)}),(s=e.get("*"))&&s.slice().map(function(a){a(t,r)})}}}const Ic=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"}));function Oc(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,a={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||m,scrollIntoView:r.prototype.scrollIntoView},u=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function c(b){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(b)}const f=c(e.navigator.userAgent)?1:0;function m(b,y){this.scrollLeft=b,this.scrollTop=y}function d(b){return .5*(1-Math.cos(Math.PI*b))}function p(b){if(b===null||typeof b!="object"||b.behavior===void 0||b.behavior==="auto"||b.behavior==="instant")return!0;if(typeof b=="object"&&b.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+b.behavior+" is not a valid value for enumeration ScrollBehavior.")}function o(b,y){if(y==="Y")return b.clientHeight+f<b.scrollHeight;if(y==="X")return b.clientWidth+f<b.scrollWidth}function n(b,y){const v=e.getComputedStyle(b,null)["overflow"+y];return v==="auto"||v==="scroll"}function i(b){const y=o(b,"Y")&&n(b,"Y"),v=o(b,"X")&&n(b,"X");return y||v}function l(b){for(;b!==t.body&&i(b)===!1;)b=b.parentNode||b.host;return b}function h(b){const y=u();let v,E,S,w=(y-b.startTime)/s;w=w>1?1:w,v=d(w),E=b.startX+(b.x-b.startX)*v,S=b.startY+(b.y-b.startY)*v,b.method.call(b.scrollable,E,S),(E!==b.x||S!==b.y)&&e.requestAnimationFrame(h.bind(e,b))}function g(b,y,v){let E,S,w,C;const M=u();b===t.body?(E=e,S=e.scrollX||e.pageXOffset,w=e.scrollY||e.pageYOffset,C=a.scroll):(E=b,S=b.scrollLeft,w=b.scrollTop,C=m),h({scrollable:E,method:C,startTime:M,startX:S,startY:w,x:y,y:v})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){a.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])){a.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(p(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const b=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof b=="undefined"?this.scrollLeft:~~b,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(p(arguments[0])===!0){a.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const b=l(this),y=b.getBoundingClientRect(),v=this.getBoundingClientRect();b!==t.body?(g.call(this,b,b.scrollLeft+v.left-y.left,b.scrollTop+v.top-y.top),e.getComputedStyle(b).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Nc{constructor(t=[],r){O(this,"timeOffset",0),O(this,"speed"),O(this,"actions"),O(this,"raf",null),O(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){const r=this.raf===!0;this.actions.length=0,this.actions=[...t],r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const a=Math.floor((r+s)/2);if(this.actions[a].delay<t.delay)r=a+1;else if(this.actions[a].delay>t.delay)s=a-1;else return a+1}return r}}function ui(e,t){if(e.type===k.IncrementalSnapshot&&e.data.source===_.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
161
|
+
`,Gn=typeof self!="undefined"&&self.Blob&&new Blob([oa],{type:"text/javascript;charset=utf-8"});function Mc(e){let t;try{if(t=Gn&&(self.URL||self.webkitURL).createObjectURL(Gn),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(oa),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Ic{constructor(t){O(this,"pendingCanvasMutations",new Map),O(this,"rafStamps",{latestId:0,invokeId:null}),O(this,"mirror"),O(this,"logger"),O(this,"worker"),O(this,"snapshotInProgressMap",new Map),O(this,"lastSnapshotTime",new Map),O(this,"options"),O(this,"mutationCb"),O(this,"resetObservers"),O(this,"frozen",!1),O(this,"locked",!1),O(this,"processMutation",(o,n)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(n)});const{sampling:r,win:i,blockClass:a,blockSelector:u,recordCanvas:c,recordLocalVideos:h,recordRemoteVideos:m,initialSnapshotDelay:d,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new Mc,this.worker.onmessage=o=>{const{id:n}=o.data;if(this.snapshotInProgressMap.set(n,!1),!("base64"in o.data)){this.debug(null,"canvas worker received empty message",{id:n,data:o.data,status:o.data.status});return}const{base64:s,type:l,dx:f,dy:g,dw:b,dh:y}=o.data,v={id:n,type:Te["2D"],commands:[{property:"clearRect",args:[f,g,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:l}]},f,g,b,y]}]};this.debug(null,"canvas worker recording mutation",v),this.mutationCb(v)},this.options=t,c&&r==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:r}),this.initCanvasMutationObserver(i,a,u)):c&&typeof r=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:r}),this.initCanvasFPSObserver(h,m,r,i,a,u,{initialSnapshotDelay:d,dataURLOptions:p},t.resizeFactor,t.maxSnapshotDimension))}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}debug(t,...r){if(!this.logger)return;const i=this.mirror.getId(t);let a="[highlight-canvas-manager]";t&&(a=`[highlight-canvas] [id:${i}]`,t.tagName.toLowerCase()==="canvas"&&(a+=` [ctx:${t.__context}]`)),this.logger.debug(a,t,...r)}async snapshot(t){var r;const i=this.mirror.getId(t);if(this.snapshotInProgressMap.get(i)){this.debug(t,"snapshotting already in progress for",i);return}const a=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),u=this.lastSnapshotTime.get(i);if(!(u&&new Date().getTime()-u<a)){if(this.debug(t,"starting snapshotting"),t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}this.lastSnapshotTime.set(i,new Date().getTime()),this.snapshotInProgressMap.set(i,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const p=t.getContext(t.__context);((r=p==null?void 0:p.getContextAttributes())==null?void 0:r.preserveDrawingBuffer)===!1&&(p.clear(p.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:p==null?void 0:p.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let c=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const p=Math.max(t.width,t.height);c=Math.min(c,this.options.maxSnapshotDimension/p)}const h=t.width*c,m=t.height*c,d=await createImageBitmap(t,{resizeWidth:h,resizeHeight:m});this.debug(t,"created image bitmap",{width:d.width,height:d.height}),this.worker.postMessage({id:i,bitmap:d,width:h,height:m,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[d]),this.debug(t,"sent message")}catch(c){this.debug(t,"failed to snapshot",c)}finally{this.snapshotInProgressMap.set(i,!1)}}}initCanvasFPSObserver(t,r,i,a,u,c,h,m,d){const p=jn(a,u,c,!0),o=1e3/i;let n=0,s;const l=new Map,f=(v,E)=>{const S=[];v.querySelectorAll(E).forEach(M=>S.push(M));const w=document.createNodeIterator(v,Node.ELEMENT_NODE);let C;for(;C=w.nextNode();)C!=null&&C.shadowRoot&&S.push(...f(C.shadowRoot,E));return S},g=v=>{const E=[];return f(a.document,"canvas").forEach(S=>{if(!ge(S,u,c,!0)){this.debug(S,"discovered canvas"),E.push(S);const w=this.mirror.getId(S);l.has(w)||l.set(w,v)}}),E},b=v=>{const E=[];return(t||r)&&f(a.document,"video").forEach(S=>{if(!(!r&&S.src!==""&&S.src.indexOf("blob:")===-1)&&!(!t&&(S.src===""||S.src.indexOf("blob:")!==-1))&&!ge(S,u,c,!0)){E.push(S);const w=this.mirror.getId(S);l.has(w)||l.set(w,v)}}),E},y=async v=>{if(n&&v-n<o){s=requestAnimationFrame(w=>void y(w));return}n=v;const E=w=>{const C=this.mirror.getId(w),M=l.get(C),R=!h.initialSnapshotDelay||v-M>h.initialSnapshotDelay;return this.debug(w,{delay:h.initialSnapshotDelay,delta:v-M,hadLoadingTime:R}),R},S=[];S.push(...g(v).filter(E).map(w=>this.snapshot(w))),S.push(...b(v).filter(E).map(async w=>{this.debug(w,"starting video snapshotting");const C=this.mirror.getId(w);if(this.snapshotInProgressMap.get(C)){this.debug(w,"video snapshotting already in progress for",C);return}this.snapshotInProgressMap.set(C,!0);try{const{width:M,height:R}=w.getBoundingClientRect(),{actualWidth:x,actualHeight:D}={actualWidth:w.videoWidth,actualHeight:w.videoHeight},T=Math.max(x,D);if(T===0){this.debug(w,"not yet ready",{width:w.width,height:w.height,actualWidth:x,actualHeight:D,boxWidth:M,boxHeight:R});return}let X=m||1;d&&(X=Math.min(X,d/T));const te=x*X,I=D*X,le=await createImageBitmap(w,{resizeWidth:te,resizeHeight:I}),k=Math.max(M,R)/T,V=x*k,re=D*k,z=(M-V)/2,oe=(R-re)/2;this.debug(w,"created image bitmap",{actualWidth:x,actualHeight:D,boxWidth:M,boxHeight:R,outputWidth:V,outputHeight:re,resizeWidth:te,resizeHeight:I,scale:X,outputScale:k,offsetX:z,offsetY:oe}),this.worker.postMessage({id:C,bitmap:le,width:te,height:I,dx:z,dy:oe,dw:V,dh:re,dataURLOptions:h.dataURLOptions,logDebug:!!this.logger},[le]),this.debug(w,"send message")}catch(M){this.debug(w,"failed to snapshot",M)}finally{this.snapshotInProgressMap.set(C,!1)}})),await Promise.all(S).catch(console.error),s=requestAnimationFrame(w=>void y(w))};s=requestAnimationFrame(v=>void y(v)),this.resetObservers=()=>{p(),s&&cancelAnimationFrame(s)}}initCanvasMutationObserver(t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const a=jn(t,r,i,!1),u=Ec(this.processMutation.bind(this),t,r,i),c=Rc(this.processMutation.bind(this),t,r,i);this.resetObservers=()=>{a(),u(),c()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||r===-1)return;const a=i.map(c=>{const d=c,{type:h}=d;return yt(d,["type"])}),{type:u}=i[0];this.mutationCb({id:r,type:u,commands:a}),this.pendingCanvasMutations.delete(t)}}class Oc{constructor(t){O(this,"trackedLinkElements",new WeakSet),O(this,"mutationCb"),O(this,"adoptedStyleSheetCb"),O(this,"styleMirror",new ri),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const i={id:r,styleIds:[]},a=[];for(const u of t){let c;this.styleMirror.has(u)?c=this.styleMirror.getId(u):(c=this.styleMirror.add(u),a.push({styleId:c,rules:Array.from(u.rules||CSSRule,(h,m)=>({rule:ao(h,u.href),index:m}))})),i.styleIds.push(c)}a.length>0&&(i.styles=a),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Nc{constructor(){O(this,"nodeMap",new WeakMap),O(this,"active",!1)}inOtherBuffer(t,r){const i=this.nodeMap.get(t);return i&&Array.from(i).some(a=>a!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let fe,kt,ut,Vt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ci=e.contentWindow)==null?void 0:ci.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ee=uo();function _e(e={}){var t;const{emit:r,checkoutEveryNms:i,checkoutEveryNth:a,blockClass:u="highlight-block",blockSelector:c=null,ignoreClass:h="highlight-ignore",ignoreSelector:m=null,maskTextClass:d="highlight-mask",maskTextSelector:p=null,inlineStylesheet:o=!0,maskAllInputs:n,maskInputOptions:s,slimDOMOptions:l,maskInputFn:f,maskTextFn:g=Ns,hooks:b,packFn:y,sampling:v={},mousemoveWait:E,recordDOM:S=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:M=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:R=!1,collectFonts:x=!1,inlineImages:D=!1,inlineVideos:T=!1,plugins:X,keepIframeSrcFn:te=()=>!1,privacySetting:I="default",ignoreCSSAttributes:le=new Set([]),styleSheetResyncInterval:k=2e3,errorHandler:V,logger:re}=e,z=B(B({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);rc(V);const oe=C?window.parent===window:!0;let pe=!1;if(!oe)try{window.parent.document&&(pe=!1)}catch(ee){pe=!0}if(oe&&!r)throw new Error("emit function is required");if(!oe&&!pe)return()=>{};E!==void 0&&v.mousemove===void 0&&(v.mousemove=E),Ee.reset();const N=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}:s!==void 0?s:{password:!0},ve=yo(l);Zs();let P,U=0;const F=ee=>{for(const Ce of X||[])Ce.eventProcessor&&(ee=Ce.eventProcessor(ee));return y&&!pe&&(ee=y(ee)),ee};fe=(ee,Ce)=>{var ce;const he=ee;if(he.timestamp=tt(),(ce=Ve[0])!=null&&ce.isFrozen()&&he.type!==L.FullSnapshot&&!(he.type===L.IncrementalSnapshot&&he.data.source===_.Mutation)&&Ve.forEach(be=>be.unfreeze()),oe)r==null||r(F(he),Ce);else if(pe){const be={type:"rrweb",event:F(he),origin:window.location.origin,isCheckout:Ce};window.parent.postMessage(be,"*")}if(he.type===L.FullSnapshot)P=he,U=0;else if(he.type===L.IncrementalSnapshot){if(he.data.source===_.Mutation&&he.data.isAttachIframe)return;U++;const be=a&&U>=a,se=i&&he.timestamp-P.timestamp>i;(be||se)&&kt(!0)}};const $=ee=>{fe({type:L.IncrementalSnapshot,data:B({source:_.Mutation},ee)})},G=ee=>fe({type:L.IncrementalSnapshot,data:B({source:_.Scroll},ee)}),Q=ee=>fe({type:L.IncrementalSnapshot,data:B({source:_.CanvasMutation},ee)}),ie=ee=>fe({type:L.IncrementalSnapshot,data:B({source:_.AdoptedStyleSheet},ee)}),W=new Oc({mutationCb:$,adoptedStyleSheetCb:ie}),K=new wc({mirror:Ee,mutationCb:$,stylesheetManager:W,recordCrossOriginIframes:C,wrappedEmit:fe});for(const ee of X||[])ee.getMirror&&ee.getMirror({nodeMirror:Ee,crossOriginIframeMirror:K.crossOriginIframeMirror,crossOriginIframeStyleMirror:K.crossOriginIframeStyleMirror});const me=new Nc,qe=typeof(v==null?void 0:v.canvas)=="object"?v.canvas:{fps:v==null?void 0:v.canvas};ut=new Ic({recordCanvas:w,recordLocalVideos:D,recordRemoteVideos:T,mutationCb:Q,win:window,blockClass:u,blockSelector:c,mirror:Ee,sampling:qe.fps,samplingManual:qe.fpsManual,clearWebGLBuffer:qe.clearWebGLBuffer,initialSnapshotDelay:qe.initialSnapshotDelay,dataURLOptions:z,resizeFactor:qe.resizeFactor,maxSnapshotDimension:qe.maxSnapshotDimension,logger:re});const mt=new vc({mutationCb:$,scrollCb:G,bypassOptions:{blockClass:u,blockSelector:c,maskTextClass:d,maskTextSelector:p,inlineStylesheet:o,maskInputOptions:N,dataURLOptions:z,maskTextFn:g,maskInputFn:f,recordCanvas:w,inlineImages:D,inlineVideos:T,privacySetting:I,sampling:v,slimDOMOptions:ve,iframeManager:K,stylesheetManager:W,canvasManager:ut,keepIframeSrcFn:te,processedNodeManager:me},mirror:Ee});kt=(ee=!1)=>{if(!S)return;fe({type:L.Meta,data:{href:window.location.href,width:Js(),height:Ys()}},ee),W.reset(),mt.init(),Ve.forEach(ce=>ce.lock());const Ce=vl(document,{mirror:Ee,blockClass:u,blockSelector:c,maskTextClass:d,maskTextSelector:p,inlineStylesheet:o,maskAllInputs:N,maskTextFn:g,maskInputFn:f,slimDOM:ve,dataURLOptions:z,recordCanvas:w,inlineImages:D,inlineVideos:T,privacySetting:I,onSerialize:ce=>{et(ce,Ee)&&K.addIframe(ce),ei(ce,Ee)&&W.trackLinkElement(ce),Fe(ce)&&mt.addShadowRoot(H.shadowRoot(ce),document)},onIframeLoad:(ce,he)=>{K.attachIframe(ce,he),mt.observeAttachShadow(ce)},onStylesheetLoad:(ce,he)=>{W.attachLinkElement(ce,he)},keepIframeSrcFn:te});if(!Ce)return console.warn("Failed to snapshot the document");fe({type:L.FullSnapshot,data:{node:Ce,initialOffset:Hs(window)}},ee),Ve.forEach(ce=>ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,Ee.getId(document))};try{const ee=[],Ce=he=>{var be;return J(yc)({mutationCb:$,mousemoveCb:(se,or)=>fe({type:L.IncrementalSnapshot,data:{source:or,positions:se}}),mouseInteractionCb:se=>fe({type:L.IncrementalSnapshot,data:B({source:_.MouseInteraction},se)}),scrollCb:G,viewportResizeCb:se=>fe({type:L.IncrementalSnapshot,data:B({source:_.ViewportResize},se)}),inputCb:se=>fe({type:L.IncrementalSnapshot,data:B({source:_.Input},se)}),mediaInteractionCb:se=>fe({type:L.IncrementalSnapshot,data:B({source:_.MediaInteraction},se)}),styleSheetRuleCb:se=>fe({type:L.IncrementalSnapshot,data:B({source:_.StyleSheetRule},se)}),styleDeclarationCb:se=>fe({type:L.IncrementalSnapshot,data:B({source:_.StyleDeclaration},se)}),canvasMutationCb:Q,fontCb:se=>fe({type:L.IncrementalSnapshot,data:B({source:_.Font},se)}),selectionCb:se=>{fe({type:L.IncrementalSnapshot,data:B({source:_.Selection},se)})},customElementCb:se=>{fe({type:L.IncrementalSnapshot,data:B({source:_.CustomElement},se)})},blockClass:u,ignoreClass:h,ignoreSelector:m,maskTextClass:d,maskTextSelector:p,maskInputOptions:N,inlineStylesheet:o,sampling:v,recordDOM:S,recordCanvas:w,inlineImages:D,inlineVideos:T,userTriggeredOnInput:R,collectFonts:x,doc:he,maskInputFn:f,maskTextFn:g,keepIframeSrcFn:te,blockSelector:c,slimDOMOptions:ve,dataURLOptions:z,mirror:Ee,iframeManager:K,stylesheetManager:W,shadowDomManager:mt,processedNodeManager:me,canvasManager:ut,ignoreCSSAttributes:le,styleSheetResyncInterval:k,privacySetting:I,plugins:((be=X==null?void 0:X.filter(se=>se.observer))==null?void 0:be.map(se=>({observer:se.observer,options:se.options,callback:or=>fe({type:L.Plugin,data:{plugin:se.name,payload:or}})})))||[]},b)};K.addLoadListener(he=>{try{ee.push(Ce(he.contentDocument))}catch(be){console.warn(be)}});const ce=()=>{kt(),ee.push(Ce(document)),Vt=!0};return["interactive","complete"].includes(document.readyState)?ce():(ee.push(we("DOMContentLoaded",()=>{fe({type:L.DomContentLoaded,data:{}}),M==="DOMContentLoaded"&&ce()})),ee.push(we("load",()=>{fe({type:L.Load,data:{}}),M==="load"&&ce()},window))),()=>{ee.forEach(he=>{try{he()}catch(be){String(be).toLowerCase().includes("cross-origin")||console.warn(be)}}),me.destroy(),Vt=!1,sc()}}catch(ee){console.warn(ee)}}_e.addCustomEvent=(e,t)=>{Vt&&fe({type:L.Custom,data:{tag:e,payload:t}})};_e.freezePage=()=>{Ve.forEach(e=>e.freeze())};_e.takeFullSnapshot=e=>{if(!Vt)throw new Error("please take full snapshot after start recording");kt(e)};_e.snapshotCanvas=async e=>{if(!ut)throw new Error("canvas manager is not initialized");await ut.snapshot(e)};_e.mirror=Ee;function aa(e){return{all:e=e||new Map,on:function(t,r){var i=e.get(t);i?i.push(r):e.set(t,[r])},off:function(t,r){var i=e.get(t);i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var i=e.get(t);i&&i.slice().map(function(a){a(r)}),(i=e.get("*"))&&i.slice().map(function(a){a(t,r)})}}}const Tc=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"}));function Dc(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,i=468,a={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||m,scrollIntoView:r.prototype.scrollIntoView},u=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function c(b){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(b)}const h=c(e.navigator.userAgent)?1:0;function m(b,y){this.scrollLeft=b,this.scrollTop=y}function d(b){return .5*(1-Math.cos(Math.PI*b))}function p(b){if(b===null||typeof b!="object"||b.behavior===void 0||b.behavior==="auto"||b.behavior==="instant")return!0;if(typeof b=="object"&&b.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+b.behavior+" is not a valid value for enumeration ScrollBehavior.")}function o(b,y){if(y==="Y")return b.clientHeight+h<b.scrollHeight;if(y==="X")return b.clientWidth+h<b.scrollWidth}function n(b,y){const v=e.getComputedStyle(b,null)["overflow"+y];return v==="auto"||v==="scroll"}function s(b){const y=o(b,"Y")&&n(b,"Y"),v=o(b,"X")&&n(b,"X");return y||v}function l(b){for(;b!==t.body&&s(b)===!1;)b=b.parentNode||b.host;return b}function f(b){const y=u();let v,E,S,w=(y-b.startTime)/i;w=w>1?1:w,v=d(w),E=b.startX+(b.x-b.startX)*v,S=b.startY+(b.y-b.startY)*v,b.method.call(b.scrollable,E,S),(E!==b.x||S!==b.y)&&e.requestAnimationFrame(f.bind(e,b))}function g(b,y,v){let E,S,w,C;const M=u();b===t.body?(E=e,S=e.scrollX||e.pageXOffset,w=e.scrollY||e.pageYOffset,C=a.scroll):(E=b,S=b.scrollLeft,w=b.scrollTop,C=m),f({scrollable:E,method:C,startTime:M,startX:S,startY:w,x:y,y:v})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){a.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])){a.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(p(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const b=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof b=="undefined"?this.scrollLeft:~~b,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(p(arguments[0])===!0){a.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const b=l(this),y=b.getBoundingClientRect(),v=this.getBoundingClientRect();b!==t.body?(g.call(this,b,b.scrollLeft+v.left-y.left,b.scrollTop+v.top-y.top),e.getComputedStyle(b).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Ac{constructor(t=[],r){O(this,"timeOffset",0),O(this,"speed"),O(this,"actions"),O(this,"raf",null),O(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const i=this.findActionIndex(t);this.actions.splice(i,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){const r=this.raf===!0;this.actions.length=0,this.actions=[...t],r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,i=this.actions.length-1;for(;r<=i;){const a=Math.floor((r+i)/2);if(this.actions[a].delay<t.delay)r=a+1;else if(this.actions[a].delay>t.delay)i=a-1;else return a+1}return r}}function hs(e,t){if(e.type===L.IncrementalSnapshot&&e.data.source===_.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,i=e.timestamp+r;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
162
162
|
Copyright (c) Microsoft Corporation.
|
|
163
163
|
|
|
164
164
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -171,17 +171,17 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
171
171
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
172
172
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
173
173
|
PERFORMANCE OF THIS SOFTWARE.
|
|
174
|
-
***************************************************************************** */function qn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,a,u=r.call(e),c=[];try{for(;(t===void 0||t-- >0)&&!(s=u.next()).done;)c.push(s.value)}catch(f){a={error:f}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(a)throw a.error}}return c}var Xe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Xe||(Xe={}));var na={type:"xstate.init"};function ci(e){return e===void 0?[]:[].concat(e)}function Be(e){return{type:"xstate.assign",assignment:e}}function Gn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function zt(e){return function(t){return e===t}}function oa(e){return typeof e=="string"?{type:e}:e}function Hn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:zt(e)}}function Yn(e,t,r){var s=t,a=!1;return[e.filter((function(u){if(u.type==="xstate.assign"){a=!0;var c=Object.assign({},s);return typeof u.assignment=="function"?c=u.assignment(s,r):Object.keys(u.assignment).forEach((function(f){c[f]=typeof u.assignment[f]=="function"?u.assignment[f](s,r):u.assignment[f]})),s=c,!1}return!0})),s,a]}function aa(e,t){t===void 0&&(t={});var r=qn(Yn(ci(e.states[e.initial].entry).map((function(c){return Gn(c,t.actions)})),e.context,na),2),s=r[0],a=r[1],u={config:e,_options:t,initialState:{value:e.initial,actions:s,context:a,matches:zt(e.initial)},transition:function(c,f){var m,d,p=typeof c=="string"?{value:c,context:e.context}:c,o=p.value,n=p.context,i=oa(f),l=e.states[o];if(l.on){var h=ci(l.on[i.type]);try{for(var g=(function(P){var V=typeof Symbol=="function"&&Symbol.iterator,H=V&&P[V],F=0;if(H)return H.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&F>=P.length&&(P=void 0),{value:P&&P[F++],done:!P}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")})(h),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return Hn(o,n);var v=typeof y=="string"?{target:y}:y,E=v.target,S=v.actions,w=S===void 0?[]:S,C=v.cond,M=C===void 0?function(){return!0}:C,R=E===void 0,x=E!=null?E:o,D=e.states[x];if(M(n,i)){var T=qn(Yn((R?ci(w):[].concat(l.exit,w,D.entry).filter((function(P){return P}))).map((function(P){return Gn(P,u._options.actions)})),n,i),3),G=T[0],X=T[1],I=T[2],ne=E!=null?E:o;return{value:ne,context:X,actions:G,changed:E!==o||G.length>0||I,matches:zt(ne)}}}}catch(P){m={error:P}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(m)throw m.error}}}return Hn(o,n)}};return u}var Jn=function(e,t){return e.actions.forEach((function(r){var s=r.exec;return s&&s(e.context,t)}))};function la(e){var t=e.initialState,r=Xe.NotStarted,s=new Set,a={_machine:e,send:function(u){r===Xe.Running&&(t=e.transition(t,u),Jn(t,oa(u)),s.forEach((function(c){return c(t)})))},subscribe:function(u){return s.add(u),u(t),{unsubscribe:function(){return s.delete(u)}}},start:function(u){if(u){var c=typeof u=="object"?u:{context:e.config.context,value:u};t={value:c.value,actions:[],context:c.context,matches:zt(c.value)}}return r=Xe.Running,Jn(t,na),a},stop:function(){return r=Xe.Stopped,s.clear(),a},get state(){return t},get status(){return r}};return a}function Tc(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===k.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Dc(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const a=aa({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]},REPLACE_EVENTS:{target:"playing",actions:["replaceEvents"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]},REPLACE_EVENTS:{target:"paused",actions:["replaceEvents"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Be({lastPlayedEvent:(u,c)=>c.type==="CAST_EVENT"?c.payload.event:u.lastPlayedEvent}),recordTimeOffset:Be((u,c)=>{let f=u.timeOffset;return"payload"in c&&"timeOffset"in c.payload&&(f=c.payload.timeOffset),se(L({},u),{timeOffset:f,baselineTime:u.events[0].timestamp+f})}),play(u){var c;const{timer:f,events:m,baselineTime:d,lastPlayedEvent:p}=u;f.clear();for(const l of m)ui(l,d);const o=Tc(m,d);let n=p==null?void 0:p.timestamp;(p==null?void 0:p.type)===k.IncrementalSnapshot&&p.data.source===_.MouseMove&&(n=p.timestamp+((c=p.data.positions[0])==null?void 0:c.timeOffset)),d<(n||0)&&s.emit(B.PlayBack);const i=new Array;for(const l of o)if(!(n&&n<d&&(l.timestamp<=n||l===p)))if(l.timestamp<d)i.push(l);else{const h=t(l,!1);f.addAction({doAction:()=>{h()},delay:l.delay})}r(i),s.emit(B.Flush),f.start()},pause(u){u.timer.clear()},resetLastPlayedEvent:Be(u=>se(L({},u),{lastPlayedEvent:null})),startLive:Be({baselineTime:(u,c)=>(u.timer.start(),c.type==="TO_LIVE"&&c.payload.baselineTime?c.payload.baselineTime:Date.now())}),replaceEvents:Be((u,c)=>{if(c.type!=="REPLACE_EVENTS")return u;const{events:f,timer:m,baselineTime:d}=u,{events:p}=c.payload;if(p.length===0)return u;f.length=0;const o=[],n=m.timeOffset+d;for(const i of p)ui(i,d),f.push(i),i.timestamp>=n&&o.push({doAction:t(i,!1),delay:i.delay});return m.isActive()&&m.replaceActions(o),se(L({},u),{events:f})}),addEvent:Be((u,c)=>{const{baselineTime:f,timer:m,events:d}=u;if(c.type==="ADD_EVENT"){const{event:p}=c.payload;ui(p,f);let o=d.length-1;if(!d[o]||d[o].timestamp<=p.timestamp)d.push(p);else{let l=-1,h=0;for(;h<=o;){const g=Math.floor((h+o)/2);d[g].timestamp<=p.timestamp?h=g+1:o=g-1}l===-1&&(l=h),d.splice(l,0,p)}const n=p.timestamp<f,i=t(p,n);n?i():m.isActive()&&m.addAction({doAction:()=>{i()},delay:p.delay})}return se(L({},u),{events:d})})}});return la(a)}function Ac(e){const t=aa({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:Be({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return la(t)}const _c=e=>["noscript { display: none !important; }",`.${e} { background: currentColor; border-radius: 5px; }`,`.${e}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`],Xn=new Map;function ua(e,t){let r=Xn.get(e);return r||(r=new Map,Xn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Pe(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const a=await Pe(e,t,r)(s.args);return await createImageBitmap.apply(null,a)}else if("index"in s){if(r||t===null)return s;const{rr_type:a,index:u}=s;return ua(t,a)[u]}else if("args"in s){const{rr_type:a,args:u}=s,c=window[a];return new c(...await Promise.all(u.map(Pe(e,t,r))))}else{if("base64"in s)return wc(s.base64);if("src"in s){const a=e.get(s.src);if(a)return a;{const u=new Image;return u.src=s.src,e.set(s.src,u),u}}else if("data"in s&&s.rr_type==="Blob"){const a=await Promise.all(s.data.map(Pe(e,t,r)));return new Blob(a,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Pe(e,t,r)));return s}}function kc(e,t){try{return t===Me.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Pc=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Lc(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Pc.includes(r))return;const s=ua(e,r);s.includes(t)||s.push(t)}async function Fc({mutation:e,target:t,type:r,imageMap:s,errorHandler:a}){try{const u=kc(t,r);if(!u)return;if(e.setter){u[e.property]=e.args[0];return}const c=u[e.property],f=await Promise.all(e.args.map(Pe(s,u))),m=c.apply(u,f);Lc(u,m);const d=!1}catch(u){a(e,u)}}async function Bc({event:e,mutations:t,target:r,imageMap:s,errorHandler:a}){const u=r.getContext("2d");if(!u){a(t[0],new Error("Canvas context is null"));return}Wo(u);const c=t.map(async m=>Promise.all(m.args.map(Pe(s,u))));(await Promise.all(c)).forEach((m,d)=>{const p=t[d];try{if(p.setter){u[p.property]=p.args[0];return}const o=u[p.property];p.property==="drawImage"&&typeof p.args[0]=="string"?(s.get(e),o.apply(u,p.args)):o.apply(u,m)}catch(o){a(p,o)}})}async function bi({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:a,errorHandler:u}){try{const c=a.get(e)||t,f="commands"in c?c.commands:[c];if([Me.WebGL,Me.WebGL2].includes(t.type)){for(let m=0;m<f.length;m++){const d=f[m];await Fc({mutation:d,type:t.type,target:r,imageMap:s,errorHandler:u})}return}await Bc({event:e,mutations:f,target:r,imageMap:s,errorHandler:u})}catch(c){u(t,c)}}class Uc{constructor(t){O(this,"mediaMap",new Map),O(this,"warn"),O(this,"service"),O(this,"speedService"),O(this,"emitter"),O(this,"getCurrentTime"),O(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(B.Start,this.start.bind(this)),this.emitter.on(B.SkipStart,this.start.bind(this)),this.emitter.on(B.Pause,this.pause.bind(this)),this.emitter.on(B.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const u=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,c="duration"in r&&r.duration;if(Number.isNaN(c)){this.waitForMetadata(r);return}let f=s.currentTimeAtLastInteraction+u;r.loop&&c!==!1&&(f=f%c),r.currentTime=f}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var i,l,h,g,b;const a=this.mediaMap.get(t),{type:u,playbackRate:c,currentTime:f,muted:m,volume:d,loop:p}=s;return{isPlaying:u===_e.Play||u!==_e.Pause&&((a==null?void 0:a.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(i=f!=null?f:a==null?void 0:a.currentTimeAtLastInteraction)!=null?i:0,lastInteractionTimeOffset:r,playbackRate:(l=c!=null?c:a==null?void 0:a.playbackRate)!=null?l:1,volume:(h=d!=null?d:a==null?void 0:a.volume)!=null?h:1,muted:(g=m!=null?m:a==null?void 0:a.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=p!=null?p:a==null?void 0:a.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:a,volume:u,isPlaying:c}=r,f=this.service.state.matches("paused"),m=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==u&&(t.volume=u),t.muted=s,t.loop=a,t.playbackRate!==m&&(t.playbackRate=m),c&&!f?t.play():t.pause()}catch(d){this.warn(`Failed to replay media interactions: ${d.message||d}`)}}addMediaElements(t,r,s){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;const a=t,u=s.getMeta(a);if(!u||!("attributes"in u))return;const c=this.service.state.matches("paused"),f=u.attributes;let m=!1;f.rr_mediaState?m=f.rr_mediaState==="played":m=a.getAttribute("autoplay")!==null,m&&c&&a.pause();let d=1;typeof f.rr_mediaPlaybackRate=="number"&&(d=f.rr_mediaPlaybackRate);let p=!1;typeof f.rr_mediaMuted=="boolean"?p=f.rr_mediaMuted:p=a.getAttribute("muted")!==null;let o=!1;typeof f.rr_mediaLoop=="boolean"?o=f.rr_mediaLoop:o=a.getAttribute("loop")!==null;let n=1;typeof f.rr_mediaVolume=="number"&&(n=f.rr_mediaVolume);let i=0;typeof f.rr_mediaCurrentTime=="number"&&(i=f.rr_mediaCurrentTime),this.mediaMap.set(a,{isPlaying:m,currentTimeAtLastInteraction:i,lastInteractionTimeOffset:r,playbackRate:d,volume:n,muted:p,loop:o}),this.syncTargetWithState(a)}mediaMutation({target:t,timeOffset:r,mutation:s}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Nt(e,t){if(e.nodeName!=="DIALOG"||e instanceof be)return;const r=e,s=r.open,a=s&&r.matches("dialog:modal"),u=r.getAttribute("rr_open_mode"),c=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",f=u==="modal";if(!(s&&!(a&&u==="non-modal"||!a&&f))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),c&&(f?r.showModal():r.show())}}function Wc(e,t){if(e.nodeName!=="DIALOG"||e instanceof be)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const Qn=5*1e3,Zn=1*1e3,Kn=3600*1e3,$c=sa||Ic,eo="[replayer]",hi={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function fi(e){return e.type==k.IncrementalSnapshot&&(e.data.source==_.TouchMove||e.data.source==_.MouseInteraction&&e.data.type==j.TouchStart)}class ca{constructor(t,r){if(O(this,"wrapper"),O(this,"iframe"),O(this,"UNSAFE_replayCanvas",!1),O(this,"service"),O(this,"speedService"),O(this,"config"),O(this,"usingVirtualDom",!1),O(this,"virtualDom",new et),O(this,"mouse"),O(this,"mouseTail",null),O(this,"tailPositions",[]),O(this,"emitter",$c()),O(this,"nextUserInteractionEvent"),O(this,"activityIntervals",[]),O(this,"inactiveEndTimestamp"),O(this,"legacy_missingNodeRetryMap",{}),O(this,"cache",Js()),O(this,"imageMap",new Map),O(this,"canvasEventMap",new Map),O(this,"mirror",oo()),O(this,"styleMirror",new es),O(this,"mediaManager"),O(this,"firstFullSnapshot",null),O(this,"newDocumentQueue",[]),O(this,"mousePos",null),O(this,"touchActive",null),O(this,"lastMouseDownEvent",null),O(this,"lastHoveredRootNode"),O(this,"lastSelectionData",null),O(this,"constructedStyleMutations",[]),O(this,"adoptedStyleSheets",[]),O(this,"handleResize",f=>{this.iframe.style.display="inherit";for(const m of[this.mouseTail,this.iframe])m&&(m.setAttribute("width",String(f.width)),m.setAttribute("height",String(f.height)))}),O(this,"applyEventsSynchronously",f=>{for(const m of f){switch(m.type){case k.DomContentLoaded:case k.Load:case k.Custom:continue;case k.FullSnapshot:case k.Meta:case k.Plugin:case k.IncrementalSnapshot:break}this.getCastFn(m,!0)()}}),O(this,"getCastFn",(f,m=!1)=>{let d;switch(f.type){case k.DomContentLoaded:case k.Load:break;case k.Custom:d=()=>{this.emitter.emit(B.CustomEvent,f)};break;case k.Meta:d=()=>this.emitter.emit(B.Resize,{width:f.data.width,height:f.data.height});break;case k.FullSnapshot:d=()=>{var o;if(this.firstFullSnapshot){if(this.firstFullSnapshot===f){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(f,m),(o=this.iframe.contentWindow)==null||o.scrollTo(f.data.initialOffset)};break;case k.IncrementalSnapshot:d=()=>{if(this.applyIncremental(f,m),!m&&(this.handleInactivity(f.timestamp),f===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const o of this.service.state.context.events)if(!(o.timestamp<=f.timestamp)&&this.isUserInteraction(o)){o.delay-f.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=o);break}if(this.nextUserInteractionEvent){const o=this.nextUserInteractionEvent.delay-f.delay,n={speed:Math.min(Math.round(o/Qn),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:n}),this.emitter.emit(B.SkipStart,n)}}};break}return()=>{d&&d();for(const n of this.config.plugins||[])n.handler&&n.handler(f,m,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:f}});const o=this.service.state.context.events.length-1;if(!this.config.liveMode&&f===this.service.state.context.events[o]){const n=()=>{o<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(B.Finish))};let i=50;f.type===k.IncrementalSnapshot&&f.data.source===_.MouseMove&&f.data.positions.length&&(i+=Math.max(0,-f.data.positions[0].timeOffset)),setTimeout(n,i)}this.emitter.emit(B.EventCast,f)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:hi,useVirtualDom:!0,logger:console,inactiveThreshold:.02,inactiveSkipTime:Qn};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(B.Resize,this.handleResize),this.setupDom();for(const f of this.config.plugins||[])f.getMirror&&f.getMirror({nodeMirror:this.mirror});this.emitter.on(B.Flush,()=>{if(this.usingVirtualDom){const f={mirror:this.mirror,applyCanvas:(m,d,p)=>{bi({event:m,mutation:d,target:p,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(m,d)=>{m.source===_.StyleSheetRule?this.applyStyleSheetRule(m,d):m.source===_.StyleDeclaration&&this.applyStyleDeclaration(m,d)},afterAppend:(m,d)=>{for(const p of this.config.plugins||[])p.onBuild&&p.onBuild(m,{id:d,replayer:this})}};if(this.iframe.contentDocument)try{Ft(this.iframe.contentDocument,this.virtualDom,f,this.virtualDom.mirror)}catch(m){console.warn(m)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const m in this.legacy_missingNodeRetryMap)try{const d=this.legacy_missingNodeRetryMap[m],p=Bt(d.node,this.mirror,this.virtualDom.mirror);Ft(p,d.node,f,this.virtualDom.mirror),d.node=p}catch(d){this.warn(d)}this.constructedStyleMutations.forEach(m=>{this.applyStyleSheetMutation(m)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(m=>{this.applyAdoptedStyleSheet(m)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[f,m]=this.lastMouseDownEvent;f.dispatchEvent(m)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(B.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const a=new Nc([],{speed:this.config.speed});this.service=Dc({events:t.map(f=>r&&r.unpackFn?r.unpackFn(f):f).sort((f,m)=>f.timestamp-m.timestamp),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(f=>{this.emitter.emit(B.StateChange,{player:f})}),this.speedService=Ac({normalSpeed:-1,timer:a}),this.speedService.start(),this.speedService.subscribe(f=>{this.emitter.emit(B.StateChange,{speed:f})}),this.mediaManager=new Uc({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const u=this.service.state.context.events.find(f=>f.type===k.Meta),c=this.service.state.context.events.find(f=>f.type===k.FullSnapshot);if(u){const{width:f,height:m}=u.data;setTimeout(()=>{this.emitter.emit(B.Resize,{width:f,height:m})},0)}c&&setTimeout(()=>{var f;this.firstFullSnapshot||(this.firstFullSnapshot=c,this.rebuildFullSnapshot(c),(f=this.iframe.contentWindow)==null||f.scrollTo(c.data.initialOffset))},1),this.service.state.context.events.find(fi)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getActivityIntervals(){if(this.activityIntervals.length==0){const t=[],r=this.getMetaData(),s=[{timestamp:r.startTime},...this.service.state.context.events.filter(c=>this.isUserInteraction(c)),{timestamp:r.endTime}];for(let c=1;c<s.length;c++){const f=s[c-1],m=s[c];m.timestamp-f.timestamp>this.config.inactivePeriodThreshold?t.push({startTime:f.timestamp,endTime:m.timestamp,duration:m.timestamp-f.timestamp,active:!1}):t.push({startTime:f.timestamp,endTime:m.timestamp,duration:m.timestamp-f.timestamp,active:!0})}const a=[];let u=t[0];for(let c=1;c<t.length;c++)t[c].active!=t[c-1].active&&(a.push({startTime:u.startTime,endTime:t[c-1].endTime,duration:t[c-1].endTime-u.startTime,active:t[c-1].active}),u=t[c]);u&&t.length>0&&a.push({startTime:u.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-u.startTime,active:t[t.length-1].active}),u=a[0];for(let c=1;c<a.length;c++)(!a[c].active&&a[c].duration>this.config.inactiveThreshold*r.totalTime||!a[c-1].active&&a[c-1].duration>this.config.inactiveThreshold*r.totalTime)&&(this.activityIntervals.push({startTime:u.startTime,endTime:a[c-1].endTime,duration:a[c-1].endTime-u.startTime,active:a[c-1].active}),u=a[c]);u&&a.length>0&&this.activityIntervals.push({startTime:u.startTime,endTime:a[a.length-1].endTime,duration:a[a.length-1].endTime-u.startTime,active:a[a.length-1].active})}return this.activityIntervals}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(B.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(B.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(B.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(B.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;fi(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}replaceEvents(t){for(const r of t)if(fi(r)){this.mouse.classList.add("touch-device");break}this.service.send({type:"REPLACE_EVENTS",payload:{events:t}})}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Js()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=ql({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(Oc(this.iframe.contentWindow,this.iframe.contentDocument),Xi(this.iframe.contentWindow))}handleInactivity(t,r){if((t===this.inactiveEndTimestamp||r)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){for(const s of this.getActivityIntervals())if(t>=s.startTime&&t<s.endTime&&!s.active){this.inactiveEndTimestamp=s.endTime;break}if(this.inactiveEndTimestamp){const s=this.inactiveEndTimestamp-t,a={speed:s/Kn*this.config.inactiveSkipTime<Zn?s/Zn:Math.round(Math.max(s,Kn)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:a}),this.emitter.emit(B.SkipStart,a)}}}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],a=new Set,u=(m,d)=>{if(m.nodeName==="DIALOG"&&a.add(m),this.collectIframeAndAttachDocument(s,m),this.mediaManager.isSupportedMediaElement(m)){const{events:p}=this.service.state.context;this.mediaManager.addMediaElements(m,t.timestamp-p[0].timestamp,this.mirror)}for(const p of this.config.plugins||[])p.onBuild&&p.onBuild(m,{id:d,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),this.newDocumentQueue=[],Vl(t.data.node,{doc:this.iframe.contentDocument,afterAppend:u,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas,cspContent:this.config.cspContent}),u(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:m,builtNode:d}of s)this.attachDocumentToIframe(m,d),this.newDocumentQueue=this.newDocumentQueue.filter(p=>p!==m);const{documentElement:c,head:f}=this.iframe.contentDocument;this.insertStyleRules(c,f),a.forEach(m=>Nt(m)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(B.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const a=_c(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&a.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!a.length)if(this.usingVirtualDom){const u=this.virtualDom.createElement("style");this.virtualDom.mirror.add(u,Uo(u,this.virtualDom.unserializedId)),t.insertBefore(u,r),u.rules.push({source:_.StyleSheetRule,adds:a.map((c,f)=>({rule:c,index:f}))})}else{const u=document.createElement("style");t.insertBefore(u,r);for(let c=0;c<a.length;c++)(s=u.sheet)==null||s.insertRule(a[c],c)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,a=[],u=new Set,c=(f,m)=>{f.nodeName==="DIALOG"&&u.add(f),this.collectIframeAndAttachDocument(a,f);const d=s.getMeta(f);if((d==null?void 0:d.type)===Re.Element&&(d==null?void 0:d.tagName.toUpperCase())==="HTML"){const{documentElement:p,head:o}=r.contentDocument;this.insertStyleRules(p,o)}if(!this.usingVirtualDom)for(const p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:m,replayer:this})};nt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:c,cache:this.cache}),c(r.contentDocument,t.node.id);for(const{mutationInQueue:f,builtNode:m}of a)this.attachDocumentToIframe(f,m),this.newDocumentQueue=this.newDocumentQueue.filter(d=>d!==f);u.forEach(f=>Nt(f))}collectIframeAndAttachDocument(t,r){if(Qe(r,this.mirror)){const s=this.newDocumentQueue.find(a=>a.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let a,u=this.service.state;const c=()=>{u=this.service.state};this.emitter.on(B.Start,c),this.emitter.on(B.Pause,c);const f=()=>{this.emitter.off(B.Start,c),this.emitter.off(B.Pause,c)};r.querySelectorAll('link[rel="stylesheet"]').forEach(m=>{m.sheet||(s.add(m),m.addEventListener("load",()=>{s.delete(m),s.size===0&&a!==-1&&(u.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(B.LoadStylesheetEnd),a&&clearTimeout(a),f())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(B.LoadStylesheetStart),a=setTimeout(()=>{u.matches("playing")&&this.play(this.getCurrentTime()),a=-1,f()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===k.IncrementalSnapshot&&r.data.source===_.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(a=>{this.preloadImages(a,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),a=s.getContext("2d"),u=a==null?void 0:a.createImageData(s.width,s.height);a==null||a.putImageData(u,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const a=await Promise.all(t.commands.map(async u=>{const c=await Promise.all(u.args.map(Pe(this.imageMap,null,s)));return se(L({},u),{args:c})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{commands:a}))}else{const a=await Promise.all(t.args.map(Pe(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{args:a}))}}}applyIncremental(t,r){var s,a,u;const{data:c}=t;switch(c.source){case _.Mutation:{try{this.applyMutation(c,r)}catch(f){this.warn(`Exception in mutation ${f.message||f}`,c)}break}case _.Drag:case _.TouchMove:case _.MouseMove:if(r){const f=c.positions[c.positions.length-1];this.mousePos={x:f.x,y:f.y,id:f.id,debugData:c}}else c.positions.forEach(f=>{const m={doAction:()=>{this.moveAndHover(f.x,f.y,f.id,r,c)},delay:f.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(m)}),this.timer.addAction({doAction(){},delay:t.delay-((s=c.positions[0])==null?void 0:s.timeOffset)});break;case _.MouseInteraction:{if(c.id===-1)break;const f=new Event(We(j[c.type])),m=this.mirror.getNode(c.id);if(!m)return this.debugNodeNotFound(c,c.id);this.emitter.emit(B.MouseInteraction,{type:c.type,target:m});const{triggerFocus:d}=this.config;switch(c.type){case j.Blur:"blur"in m&&m.blur();break;case j.Focus:d&&m.focus&&m.focus({preventScroll:!0});break;case j.Click:case j.TouchStart:case j.TouchEnd:case j.MouseDown:case j.MouseUp:r?(c.type===j.TouchStart?this.touchActive=!0:c.type===j.TouchEnd&&(this.touchActive=!1),c.type===j.MouseDown?this.lastMouseDownEvent=[m,f]:c.type===j.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:c.x||0,y:c.y||0,id:c.id,debugData:c}):(c.type===j.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(c.x||0,c.y||0,c.id,r,c),c.type===j.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):c.type===j.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):c.type===j.TouchEnd?this.mouse.classList.remove("touch-active"):m.dispatchEvent(f));break;case j.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:m.dispatchEvent(f)}break}case _.Scroll:{if(c.id===-1)break;if(this.usingVirtualDom){const f=this.virtualDom.mirror.getNode(c.id);if(!f)return this.debugNodeNotFound(c,c.id);f.scrollData=c;break}this.applyScroll(c,r);break}case _.ViewportResize:this.emitter.emit(B.Resize,{width:c.width,height:c.height});break;case _.Input:{if(c.id===-1)break;if(this.usingVirtualDom){const f=this.virtualDom.mirror.getNode(c.id);if(!f)return this.debugNodeNotFound(c,c.id);f.inputData=c;break}this.applyInput(c);break}case _.MediaInteraction:{const f=this.usingVirtualDom?this.virtualDom.mirror.getNode(c.id):this.mirror.getNode(c.id);if(!f)return this.debugNodeNotFound(c,c.id);const m=f,{events:d}=this.service.state.context;this.mediaManager.mediaMutation({target:m,timeOffset:t.timestamp-d[0].timestamp,mutation:c});break}case _.StyleSheetRule:case _.StyleDeclaration:{this.usingVirtualDom?c.styleId?this.constructedStyleMutations.push(c):c.id&&((a=this.virtualDom.mirror.getNode(c.id))==null||a.rules.push(c)):this.applyStyleSheetMutation(c);break}case _.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const f=this.virtualDom.mirror.getNode(c.id);if(!f)return this.debugNodeNotFound(c,c.id);f.canvasMutations.push({event:t,mutation:c})}else{const f=this.mirror.getNode(c.id);if(!f)return this.debugNodeNotFound(c,c.id);bi({event:t,mutation:c,target:f,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case _.Font:{try{const f=new FontFace(c.family,c.buffer?new Uint8Array(JSON.parse(c.fontSource)):c.fontSource,c.descriptors);(u=this.iframe.contentDocument)==null||u.fonts.add(f)}catch(f){this.warn(f)}break}case _.Selection:{if(r){this.lastSelectionData=c;break}this.applySelection(c);break}case _.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(c):this.applyAdoptedStyleSheet(c);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,_u(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const d in this.legacy_missingNodeRetryMap)try{const p=this.legacy_missingNodeRetryMap[d],o=Bo(p.node,this.virtualDom,this.mirror);o&&(p.node=o)}catch(p){this.warn(p)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(d=>s.getNode(d.id)?!0:(this.warnNodeNotFound(t,d.id),!1)),t.removes.forEach(d=>{var p;const o=s.getNode(d.id);if(!o)return;let n=s.getNode(d.parentId);if(!n)return this.warnNodeNotFound(t,d.parentId);if(d.isShadow&&ke(n)&&(n=n.shadowRoot),s.removeNodeFromMap(o),n)try{n.removeChild(o),this.usingVirtualDom&&o.nodeName==="#text"&&n.nodeName==="STYLE"&&((p=n.rules)==null?void 0:p.length)>0&&(n.rules=[])}catch(i){if(i instanceof DOMException)this.warn("parent could not remove child in mutation",n,o,t);else throw i}});const a=L({},this.legacy_missingNodeRetryMap),u=[],c=d=>{let p=null;return d.nextId&&(p=s.getNode(d.nextId)),d.nextId!==null&&d.nextId!==void 0&&d.nextId!==-1&&!p},f=d=>{var p,o;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let n=s.getNode(d.parentId);if(!n)return d.node.type===Re.Document?this.newDocumentQueue.push(d):u.push(d);d.node.isShadow&&(ke(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot);let i=null,l=null;if(d.previousId&&(i=s.getNode(d.previousId)),d.nextId&&(l=s.getNode(d.nextId)),c(d))return u.push(d);if(d.node.rootId&&!s.getNode(d.node.rootId))return;const h=d.node.rootId?s.getNode(d.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Qe(n,s)){this.attachDocumentToIframe(d,n);return}const g=(v,E)=>{if(!this.usingVirtualDom){Nt(v);for(const S of this.config.plugins||[])S.onBuild&&S.onBuild(v,{id:E,replayer:this})}},b=nt(d.node,{doc:h,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(d.previousId===-1||d.nextId===-1){a[d.node.id]={node:b,mutation:d};return}const y=s.getMeta(n);if(y&&y.type===Re.Element&&d.node.type===Re.Text){const v=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if(y.tagName==="textarea")for(const E of v)E.nodeType===n.TEXT_NODE&&n.removeChild(E);else if(y.tagName==="style"&&v.length===1)for(const E of v)E.nodeType===n.TEXT_NODE&&!s.hasNode(E)&&(b.textContent=E.textContent,n.removeChild(E))}else if((y==null?void 0:y.type)===Re.Document){const v=n;d.node.type===Re.DocumentType&&((p=v.childNodes[0])==null?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),b.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(i&&i.nextSibling&&i.nextSibling.parentNode?n.insertBefore(b,i.nextSibling):l&&l.parentNode?n.contains(l)?n.insertBefore(b,l):n.insertBefore(b,null):n.appendChild(b),g(b,d.node.id),this.usingVirtualDom&&b.nodeName==="#text"&&n.nodeName==="STYLE"&&((o=n.rules)==null?void 0:o.length)>0&&(n.rules=[]),Qe(b,this.mirror)){const v=this.mirror.getId(b),E=this.newDocumentQueue.find(S=>S.parentId===v);E&&(this.attachDocumentToIframe(E,b),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==E))}(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(a,n,b,d)};t.adds.forEach(d=>{f(d)});const m=Date.now();for(;u.length;){const d=Go(u);if(u.length=0,Date.now()-m>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}for(const p of d)s.getNode(p.value.parentId)?Qi(p,n=>{f(n)}):this.debug("Drop resolve tree since there is no parent for the root node.",p)}Object.keys(a).length&&Object.assign(this.legacy_missingNodeRetryMap,a),Ho(t.texts).forEach(d=>{var p;const o=s.getNode(d.id);if(!o)return t.removes.find(i=>i.id===d.id)?void 0:this.warnNodeNotFound(t,d.id);const n=o.parentElement;if(d.value&&n&&n.tagName==="STYLE"?o.textContent=Jt(d.value,this.cache):o.textContent=d.value,this.usingVirtualDom){const i=o.parentNode;((p=i==null?void 0:i.rules)==null?void 0:p.length)>0&&(i.rules=[])}}),t.attributes.forEach(d=>{var p;const o=s.getNode(d.id);if(!o)return t.removes.find(n=>n.id===d.id)?void 0:this.warnNodeNotFound(t,d.id);for(const n in d.attributes)if(typeof n=="string"){const i=d.attributes[n];if(i===null)o.removeAttribute(n),n==="open"&&Wc(o,d);else if(typeof i=="string")try{if(n==="_cssText"&&(o.nodeName==="LINK"||o.nodeName==="STYLE"))try{const l=s.getMeta(o),h=nt(se(L({},l),{attributes:L(L({},l.attributes),d.attributes)}),{doc:o.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(l.attributes,d.attributes);const g=o.nextSibling,b=o.parentNode;if(h&&b){b.removeChild(o),b.insertBefore(h,g),s.replace(d.id,h);break}}catch(l){}if(n==="value"&&o.nodeName==="TEXTAREA"){const l=o;l.childNodes.forEach(g=>l.removeChild(g));const h=(p=o.ownerDocument)==null?void 0:p.createTextNode(i);h&&l.appendChild(h)}else o.setAttribute(n,i);n==="rr_open_mode"&&o.nodeName==="DIALOG"&&Nt(o,d)}catch(l){this.warn("An error occurred may due to the checkout feature.",l)}else if(n==="style"){const l=i,h=o;for(const g in l)if(l[g]===!1)h.style.removeProperty(g);else if(l[g]instanceof Array){const b=l[g];h.style.setProperty(g,b[0],b[1])}else{const b=l[g];h.style.setProperty(g,b)}}}})}applyScroll(t,r){var s,a;const u=this.mirror.getNode(t.id);if(!u)return this.debugNodeNotFound(t,t.id);const c=this.mirror.getMeta(u);if(u===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((c==null?void 0:c.type)===Re.Document)(a=u.defaultView)==null||a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{u.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(f){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:a,startOffset:u,end:c,endOffset:f})=>{const m=this.mirror.getNode(a),d=this.mirror.getNode(c);if(!m||!d)return;const p=new Range;p.setStart(m,u),p.setEnd(d,f);const o=m.ownerDocument,n=o==null?void 0:o.getSelection();return n&&r.add(n),{range:p,selection:n}});r.forEach(a=>a.removeAllRanges()),s.forEach(a=>{var u;return a&&((u=a.selection)==null?void 0:u.addRange(a.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===_.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===_.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,a,u,c;if((s=t.adds)==null||s.forEach(({rule:f,index:m})=>{try{if(Array.isArray(m)){const{positions:d,index:p}=wi(m),o=Ye(r.cssRules,d);o==null||o.insertRule(f,p)}else{const d=m===void 0?void 0:Math.min(m,r.cssRules.length);r==null||r.insertRule(f,d)}}catch(d){}}),(a=t.removes)==null||a.forEach(({index:f})=>{try{if(Array.isArray(f)){const{positions:m,index:d}=wi(f),p=Ye(r.cssRules,m);p==null||p.deleteRule(d||0)}else r==null||r.deleteRule(f)}catch(m){}}),typeof t.replace=="string")try{(u=r.replace)==null||u.call(r,t.replace)}catch(f){}if(typeof t.replaceSync=="string")try{(c=r.replaceSync)==null||c.call(r,t.replaceSync)}catch(f){}}applyStyleDeclaration(t,r){if(t.set){const s=Ye(r.rules,t.index);s!=null&&s.style&&s.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const s=Ye(r.rules,t.index);s!=null&&s.style&&s.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(f=>{var m;let d=null,p=null;if(ke(s)?p=((m=s.ownerDocument)==null?void 0:m.defaultView)||null:s.nodeName==="#document"&&(p=s.defaultView),!!p)try{d=new p.CSSStyleSheet,this.styleMirror.add(d,f.styleId),this.applyStyleSheetRule({source:_.StyleSheetRule,adds:f.rules},d)}catch(o){}});const a=10;let u=0;const c=(f,m)=>{const d=m.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);ke(f)?f.shadowRoot.adoptedStyleSheets=d:f.nodeName==="#document"&&(f.adoptedStyleSheets=d),d.length!==m.length&&u<a&&(setTimeout(()=>c(f,m),0+100*u),u++)};c(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,a){const{previousId:u,nextId:c}=a,f=u&&t[u],m=c&&t[c];if(f){const{node:d,mutation:p}=f;r.insertBefore(d,s),delete t[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(t,r,d,p)}if(m){const{node:d,mutation:p}=m;r.insertBefore(d,s.nextSibling),delete t[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(t,r,d,p)}}moveAndHover(t,r,s,a,u){const c=this.mirror.getNode(s);if(!c)return this.debugNodeNotFound(u,s);const f=Ki(c,this.iframe),m=t*f.absoluteScale+f.x,d=r*f.absoluteScale+f.y;this.mouse.style.left=`${m}px`,this.mouse.style.top=`${d}px`,a||this.drawMouseTail({x:m,y:d}),this.hoverElements(c)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:a,duration:u}=this.config.mouseTail===!0?hi:Object.assign({},hi,this.config.mouseTail),c=()=>{if(!this.mouseTail)return;const f=this.mouseTail.getContext("2d");!f||!this.tailPositions.length||(f.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),f.beginPath(),f.lineWidth=s,f.lineCap=r,f.strokeStyle=a,f.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(m=>f.lineTo(m.x,m.y)),f.stroke())};this.tailPositions.push(t),c(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(f=>f!==t),c()},u/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(a=>{a.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==k.IncrementalSnapshot?!1:t.data.source>_.Mutation&&t.data.source<=_.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(B.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(eo,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(eo,...t)}}const is="rrweb-embedded",ss=1,zc=["speed","maxSpeed","loadTimeout","skipInactive","inactivePeriodThreshold","showWarning","showDebug","blockClass","liveMode","insertStyleRules","triggerFocus","UNSAFE_replayCanvas","cspContent","pauseAnimation","mouseTail","useVirtualDom","inactiveThreshold","inactiveSkipTime"];function Si(e){const t={};if(e&&typeof e=="object")for(const r of zc){const s=e[r];s!==void 0&&typeof s!="function"&&(t[r]=s)}return t}function Ci(e){return{channel:is,version:ss,message:e}}function ha(e){if(!e||typeof e!="object")return!1;const t=e;return t.channel===is&&t.version===ss&&!!t.message&&typeof t.message=="object"&&typeof t.message.type=="string"}const jc=new Set([B.Resize,B.EventCast,B.CustomEvent]);class fa{constructor(t={}){var r,s,a,u,c;O(this,"root"),O(this,"parentWindow"),O(this,"timeUpdateIntervalMs"),O(this,"expectedParentOrigin"),O(this,"replayer",null),O(this,"playing",!1),O(this,"timer",null),O(this,"started",!1),O(this,"layout",null),O(this,"onMessage",f=>{if(f.source===this.parentWindow&&this.expectedParentOrigin!==null&&f.origin===this.expectedParentOrigin&&ha(f.data))try{this.handle(f.data.message)}catch(m){this.post({type:"error",message:m instanceof Error?m.message:String(m)})}}),this.root=(r=t.root)!=null?r:document.body,this.parentWindow=(s=t.parentWindow)!=null?s:window.parent,this.timeUpdateIntervalMs=(a=t.timeUpdateIntervalMs)!=null?a:50,this.expectedParentOrigin=(c=(u=t.expectedParentOrigin)!=null?u:new URLSearchParams(location.search).get("parentOrigin"))!=null?c:null}start(){this.started||(this.started=!0,this.expectedParentOrigin===null&&console.warn("[rrweb-embedded] no parentOrigin configured; all incoming messages will be ignored"),window.addEventListener("message",this.onMessage),this.post({type:"ready"}))}stop(){var t;window.removeEventListener("message",this.onMessage),this.setPlaying(!1),(t=this.replayer)==null||t.destroy(),this.replayer=null,this.started=!1}handle(t){var d,p,o;var r,s,a,u,c,f,m;switch(t.type){case"ping":this.post({type:"ready"});return;case"init":this.init(t.events,t.config,t.autoplay);return;case"play":(r=this.replayer)==null||r.play((d=t.timeOffset)!=null?d:0),this.setPlaying(!0);return;case"pause":(s=this.replayer)==null||s.pause(t.timeOffset),this.setPlaying(!1),this.postTime();return;case"resume":(a=this.replayer)==null||a.resume((p=t.timeOffset)!=null?p:0),this.setPlaying(!0);return;case"setLayout":this.layout={scale:t.scale,anchor:(o=t.anchor)!=null?o:"center"},this.applyLayout(),this.postDimensions();return;case"setConfig":(u=this.replayer)==null||u.setConfig(Si(t.config));return;case"replaceEvents":this.replayer&&(this.replayer.replaceEvents(t.events),this.postInitialized());return;case"addEvent":(c=this.replayer)==null||c.addEvent(t.event);return;case"enableInteract":(f=this.replayer)==null||f.enableInteract();return;case"disableInteract":(m=this.replayer)==null||m.disableInteract();return;case"destroy":this.stop();return}}init(t,r,s){this.replayer&&(this.setPlaying(!1),this.replayer.destroy());const a=se(L({},Si(r)),{root:this.root});this.replayer=new ca(t,a),this.wireEvents(this.replayer),this.applyLayout(),this.postInitialized(),this.postDimensions(),s&&(this.replayer.play(0),this.setPlaying(!0))}applyLayout(){var t;const r=(t=this.replayer)==null?void 0:t.wrapper;if(!r||!this.layout)return;const{scale:s,anchor:a}=this.layout,u=a==="top";r.style.position="absolute",r.style.transformOrigin="top left",r.style.left="50%",r.style.top=u?"0":"50%",r.style.transform=u?`scale(${s}) translate(-50%, 0)`:`scale(${s}) translate(-50%, -50%)`}postDimensions(){var t;const r=(t=this.replayer)==null?void 0:t.wrapper;if(!r)return;const s=r.getBoundingClientRect();this.post({type:"dimensions",width:s.width,height:s.height,top:s.top,left:s.left})}postInitialized(){this.replayer&&this.post({type:"initialized",metadata:this.replayer.getMetaData(),activityIntervals:this.replayer.getActivityIntervals()})}wireEvents(t){for(const r of Object.values(B))t.on(r,s=>{r===B.Finish&&(this.setPlaying(!1),this.postTime()),r===B.Resize&&this.postDimensions(),this.post(jc.has(r)&&s!==void 0?{type:"replayer-event",event:r,payload:s}:{type:"replayer-event",event:r})})}setPlaying(t){this.playing!==t&&(this.playing=t,t?this.startTimePump():this.stopTimePump())}startTimePump(){this.timer===null&&(this.timer=setInterval(()=>this.postTime(),this.timeUpdateIntervalMs))}postTime(){this.replayer&&this.post({type:"time",currentTime:this.replayer.getCurrentTime()})}stopTimePump(){this.timer!==null&&(clearInterval(this.timer),this.timer=null)}post(t){var r;this.parentWindow.postMessage(Ci(t),(r=this.expectedParentOrigin)!=null?r:"*")}}function Vc(e){const t=new fa(e);return t.start(),t}class qc{constructor(t,r={}){var s;O(this,"iframe"),O(this,"hostOrigin"),O(this,"listeners",new Map),O(this,"metadata",null),O(this,"activityIntervals",[]),O(this,"dimensions",null),O(this,"lastCurrentTime",0),O(this,"ready",!1),O(this,"readyResolvers",[]),O(this,"disposed",!1),O(this,"pending",[]),O(this,"onMessage",a=>{a.source===this.iframe.contentWindow&&ha(a.data)&&this.handle(a.data.message)}),this.iframe=t,this.hostOrigin=(s=r.hostOrigin)!=null?s:"*",window.addEventListener("message",this.onMessage),this.probe()}whenReady(){return this.ready?Promise.resolve():new Promise(t=>this.readyResolvers.push(t))}init(t,r,s=!1){this.send({type:"init",events:t,config:r,autoplay:s})}play(t){this.send({type:"play",timeOffset:t})}pause(t){this.send({type:"pause",timeOffset:t})}resume(t){this.send({type:"resume",timeOffset:t})}setConfig(t){this.send({type:"setConfig",config:t})}setLayout(t,r){this.send({type:"setLayout",scale:t,anchor:r})}replaceEvents(t){this.send({type:"replaceEvents",events:t})}addEvent(t){this.send({type:"addEvent",event:t})}enableInteract(){this.send({type:"enableInteract"})}disableInteract(){this.send({type:"disableInteract"})}destroy(){if(!this.disposed){this.disposed=!0;try{this.send({type:"destroy"})}finally{window.removeEventListener("message",this.onMessage),this.listeners.clear()}}}on(t,r){let s=this.listeners.get(t);s||(s=new Set,this.listeners.set(t,s)),s.add(r)}off(t,r){var s;(s=this.listeners.get(t))==null||s.delete(r)}getCurrentTime(){return this.lastCurrentTime}getMetaData(){return this.metadata}getActivityIntervals(){return this.activityIntervals}getDimensions(){return this.dimensions}send(t){if(!this.ready){this.pending.push(t);return}this.postToHost(t)}postToHost(t){const r=this.iframe.contentWindow;r&&r.postMessage(Ci(t),this.hostOrigin)}flushPending(){const t=this.pending;this.pending=[],t.forEach(r=>this.postToHost(r))}probe(){var t;(t=this.iframe.contentWindow)==null||t.postMessage(Ci({type:"ping"}),"*")}handle(t){switch(t.type){case"ready":this.ready=!0,this.flushPending(),this.readyResolvers.forEach(r=>r()),this.readyResolvers=[];return;case"initialized":this.metadata=t.metadata,this.activityIntervals=t.activityIntervals,this.emit("initialized",t.metadata);return;case"replayer-event":this.emit(t.event,t.payload);return;case"time":this.lastCurrentTime=t.currentTime,this.emit("time",t.currentTime);return;case"dimensions":this.dimensions={width:t.width,height:t.height,top:t.top,left:t.left},this.emit("dimensions",this.dimensions);return;case"error":this.emit("error",t.message);return}}emit(t,r){var s;(s=this.listeners.get(t))==null||s.forEach(a=>a(r))}}function Gc(e){try{return new URL(e).origin}catch(t){return"'self'"}}function Hc(e){var u;const t=Gc(e.scriptUrl),r=["'unsafe-inline'",t,...(u=e.extraStyleSources)!=null?u:[]].join(" "),s=["default-src 'none'",`script-src ${t}`,`style-src ${r}`,"img-src * data: blob:","font-src * data:","media-src * data: blob:","frame-src *","connect-src 'none'","worker-src 'none'"].join("; "),a=e.styleUrl?`<link rel="stylesheet" href="${di(e.styleUrl)}">`:"";return`<!DOCTYPE html>
|
|
174
|
+
***************************************************************************** */function Hn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i,a,u=r.call(e),c=[];try{for(;(t===void 0||t-- >0)&&!(i=u.next()).done;)c.push(i.value)}catch(h){a={error:h}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(a)throw a.error}}return c}var Ke;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ke||(Ke={}));var la={type:"xstate.init"};function fs(e){return e===void 0?[]:[].concat(e)}function ze(e){return{type:"xstate.assign",assignment:e}}function Yn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function jt(e){return function(t){return e===t}}function ua(e){return typeof e=="string"?{type:e}:e}function Jn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:jt(e)}}function Xn(e,t,r){var i=t,a=!1;return[e.filter((function(u){if(u.type==="xstate.assign"){a=!0;var c=Object.assign({},i);return typeof u.assignment=="function"?c=u.assignment(i,r):Object.keys(u.assignment).forEach((function(h){c[h]=typeof u.assignment[h]=="function"?u.assignment[h](i,r):u.assignment[h]})),i=c,!1}return!0})),i,a]}function ca(e,t){t===void 0&&(t={});var r=Hn(Xn(fs(e.states[e.initial].entry).map((function(c){return Yn(c,t.actions)})),e.context,la),2),i=r[0],a=r[1],u={config:e,_options:t,initialState:{value:e.initial,actions:i,context:a,matches:jt(e.initial)},transition:function(c,h){var m,d,p=typeof c=="string"?{value:c,context:e.context}:c,o=p.value,n=p.context,s=ua(h),l=e.states[o];if(l.on){var f=fs(l.on[s.type]);try{for(var g=(function(k){var V=typeof Symbol=="function"&&Symbol.iterator,re=V&&k[V],z=0;if(re)return re.call(k);if(k&&typeof k.length=="number")return{next:function(){return k&&z>=k.length&&(k=void 0),{value:k&&k[z++],done:!k}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")})(f),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return Jn(o,n);var v=typeof y=="string"?{target:y}:y,E=v.target,S=v.actions,w=S===void 0?[]:S,C=v.cond,M=C===void 0?function(){return!0}:C,R=E===void 0,x=E!=null?E:o,D=e.states[x];if(M(n,s)){var T=Hn(Xn((R?fs(w):[].concat(l.exit,w,D.entry).filter((function(k){return k}))).map((function(k){return Yn(k,u._options.actions)})),n,s),3),X=T[0],te=T[1],I=T[2],le=E!=null?E:o;return{value:le,context:te,actions:X,changed:E!==o||X.length>0||I,matches:jt(le)}}}}catch(k){m={error:k}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(m)throw m.error}}}return Jn(o,n)}};return u}var Qn=function(e,t){return e.actions.forEach((function(r){var i=r.exec;return i&&i(e.context,t)}))};function ha(e){var t=e.initialState,r=Ke.NotStarted,i=new Set,a={_machine:e,send:function(u){r===Ke.Running&&(t=e.transition(t,u),Qn(t,ua(u)),i.forEach((function(c){return c(t)})))},subscribe:function(u){return i.add(u),u(t),{unsubscribe:function(){return i.delete(u)}}},start:function(u){if(u){var c=typeof u=="object"?u:{context:e.config.context,value:u};t={value:c.value,actions:[],context:c.context,matches:jt(c.value)}}return r=Ke.Running,Qn(t,la),a},stop:function(){return r=Ke.Stopped,i.clear(),a},get state(){return t},get status(){return r}};return a}function _c(e,t){for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.type===L.Meta&&i.timestamp<=t)return e.slice(r)}return e}function kc(e,{getCastFn:t,applyEventsSynchronously:r,emitter:i}){const a=ca({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]},REPLACE_EVENTS:{target:"playing",actions:["replaceEvents"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]},REPLACE_EVENTS:{target:"paused",actions:["replaceEvents"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ze({lastPlayedEvent:(u,c)=>c.type==="CAST_EVENT"?c.payload.event:u.lastPlayedEvent}),recordTimeOffset:ze((u,c)=>{let h=u.timeOffset;return"payload"in c&&"timeOffset"in c.payload&&(h=c.payload.timeOffset),de(B({},u),{timeOffset:h,baselineTime:u.events[0].timestamp+h})}),play(u){var c;const{timer:h,events:m,baselineTime:d,lastPlayedEvent:p}=u;h.clear();for(const l of m)hs(l,d);const o=_c(m,d);let n=p==null?void 0:p.timestamp;(p==null?void 0:p.type)===L.IncrementalSnapshot&&p.data.source===_.MouseMove&&(n=p.timestamp+((c=p.data.positions[0])==null?void 0:c.timeOffset)),d<(n||0)&&i.emit(j.PlayBack);const s=new Array;for(const l of o)if(!(n&&n<d&&(l.timestamp<=n||l===p)))if(l.timestamp<d)s.push(l);else{const f=t(l,!1);h.addAction({doAction:()=>{f()},delay:l.delay})}r(s),i.emit(j.Flush),h.start()},pause(u){u.timer.clear()},resetLastPlayedEvent:ze(u=>de(B({},u),{lastPlayedEvent:null})),startLive:ze({baselineTime:(u,c)=>(u.timer.start(),c.type==="TO_LIVE"&&c.payload.baselineTime?c.payload.baselineTime:Date.now())}),replaceEvents:ze((u,c)=>{if(c.type!=="REPLACE_EVENTS")return u;const{events:h,timer:m,baselineTime:d}=u,{events:p}=c.payload;if(p.length===0)return u;h.length=0;const o=[],n=m.timeOffset+d;for(const s of p)hs(s,d),h.push(s),s.timestamp>=n&&o.push({doAction:t(s,!1),delay:s.delay});return m.isActive()&&m.replaceActions(o),de(B({},u),{events:h})}),addEvent:ze((u,c)=>{const{baselineTime:h,timer:m,events:d}=u;if(c.type==="ADD_EVENT"){const{event:p}=c.payload;hs(p,h);let o=d.length-1;if(!d[o]||d[o].timestamp<=p.timestamp)d.push(p);else{let l=-1,f=0;for(;f<=o;){const g=Math.floor((f+o)/2);d[g].timestamp<=p.timestamp?f=g+1:o=g-1}l===-1&&(l=f),d.splice(l,0,p)}const n=p.timestamp<h,s=t(p,n);n?s():m.isActive()&&m.addAction({doAction:()=>{s()},delay:p.delay})}return de(B({},u),{events:d})})}});return ha(a)}function Pc(e){const t=ca({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,i)=>{"payload"in i&&r.timer.setSpeed(i.payload.speed)},recordSpeed:ze({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return ha(t)}const Lc=e=>["noscript { display: none !important; }",`.${e} { background: currentColor; border-radius: 5px; }`,`.${e}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`],Zn=new Map;function fa(e,t){let r=Zn.get(e);return r||(r=new Map,Zn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Fc=new Set(["Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","Float32Array","Float64Array","DataView","ImageData","ArrayBuffer","Array"]);function Be(e,t,r,i=!1){return async a=>{if(a&&typeof a=="object"&&"rr_type"in a)if(r&&(r.isUnchanged=!1),a.rr_type==="ImageBitmap"&&"args"in a){const u=await Be(e,t,r,i)(a.args);return await createImageBitmap.apply(null,u)}else if("index"in a){if(r||t===null)return a;const{rr_type:u,index:c}=a;return fa(t,u)[c]}else if("args"in a){const{rr_type:u,args:c}=a;if(i&&!Fc.has(u))return console.warn(`[replayer] refusing to construct canvas arg of unknown type: ${u}`),null;const h=window[u];return new h(...await Promise.all(c.map(Be(e,t,r,i))))}else{if("base64"in a)return Sc(a.base64);if("src"in a){const u=e.get(a.src);if(u)return u;{const c=new Image;return c.src=a.src,e.set(a.src,c),c}}else if("data"in a&&a.rr_type==="Blob"){const u=await Promise.all(a.data.map(Be(e,t,r,i)));return new Blob(u,{type:a.type})}}else if(Array.isArray(a))return await Promise.all(a.map(Be(e,t,r,i)));return a}}function Bc(e,t){try{return t===Te.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Uc=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Wc(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Uc.includes(r))return;const i=fa(e,r);i.includes(t)||i.push(t)}async function $c({mutation:e,target:t,type:r,imageMap:i,errorHandler:a,enforceCanvasArgAllowlist:u}){try{const c=Bc(t,r);if(!c)return;if(e.setter){c[e.property]=e.args[0];return}const h=c[e.property],m=await Promise.all(e.args.map(Be(i,c,void 0,u))),d=h.apply(c,m);Wc(c,d);const p=!1}catch(c){a(e,c)}}async function zc({event:e,mutations:t,target:r,imageMap:i,errorHandler:a,enforceCanvasArgAllowlist:u}){const c=r.getContext("2d");if(!c){a(t[0],new Error("Canvas context is null"));return}Vo(c);const h=t.map(async d=>Promise.all(d.args.map(Be(i,c,void 0,u))));(await Promise.all(h)).forEach((d,p)=>{const o=t[p];try{if(o.setter){c[o.property]=o.args[0];return}const n=c[o.property];o.property==="drawImage"&&typeof o.args[0]=="string"?(i.get(e),n.apply(c,o.args)):n.apply(c,d)}catch(n){a(o,n)}})}async function Cs({event:e,mutation:t,target:r,imageMap:i,canvasEventMap:a,errorHandler:u,enforceCanvasArgAllowlist:c}){try{const h=a.get(e)||t,m="commands"in h?h.commands:[h];if([Te.WebGL,Te.WebGL2].includes(t.type)){for(let d=0;d<m.length;d++){const p=m[d];await $c({mutation:p,type:t.type,target:r,imageMap:i,errorHandler:u,enforceCanvasArgAllowlist:c})}return}await zc({event:e,mutations:m,target:r,imageMap:i,errorHandler:u,enforceCanvasArgAllowlist:c})}catch(h){u(t,h)}}class Vc{constructor(t){O(this,"mediaMap",new Map),O(this,"warn"),O(this,"service"),O(this,"speedService"),O(this,"emitter"),O(this,"getCurrentTime"),O(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(j.Start,this.start.bind(this)),this.emitter.on(j.SkipStart,this.start.bind(this)),this.emitter.on(j.Pause,this.pause.bind(this)),this.emitter.on(j.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,i)=>{this.syncTargetWithState(i),t.pause&&i.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:i}){if(i.isPlaying){const u=(t-i.lastInteractionTimeOffset)/1e3*i.playbackRate,c="duration"in r&&r.duration;if(Number.isNaN(c)){this.waitForMetadata(r);return}let h=i.currentTimeAtLastInteraction+u;r.loop&&c!==!1&&(h=h%c),r.currentTime=h}else r.pause(),r.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const i=this.mediaMap.get(t);i&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:i})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:i}){var s,l,f,g,b;const a=this.mediaMap.get(t),{type:u,playbackRate:c,currentTime:h,muted:m,volume:d,loop:p}=i;return{isPlaying:u===Le.Play||u!==Le.Pause&&((a==null?void 0:a.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(s=h!=null?h:a==null?void 0:a.currentTimeAtLastInteraction)!=null?s:0,lastInteractionTimeOffset:r,playbackRate:(l=c!=null?c:a==null?void 0:a.playbackRate)!=null?l:1,volume:(f=d!=null?d:a==null?void 0:a.volume)!=null?f:1,muted:(g=m!=null?m:a==null?void 0:a.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=p!=null?p:a==null?void 0:a.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:i,loop:a,volume:u,isPlaying:c}=r,h=this.service.state.matches("paused"),m=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==u&&(t.volume=u),t.muted=i,t.loop=a,t.playbackRate!==m&&(t.playbackRate=m),c&&!h?t.play():t.pause()}catch(d){this.warn(`Failed to replay media interactions: ${d.message||d}`)}}addMediaElements(t,r,i){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;const a=t,u=i.getMeta(a);if(!u||!("attributes"in u))return;const c=this.service.state.matches("paused"),h=u.attributes;let m=!1;h.rr_mediaState?m=h.rr_mediaState==="played":m=a.getAttribute("autoplay")!==null,m&&c&&a.pause();let d=1;typeof h.rr_mediaPlaybackRate=="number"&&(d=h.rr_mediaPlaybackRate);let p=!1;typeof h.rr_mediaMuted=="boolean"?p=h.rr_mediaMuted:p=a.getAttribute("muted")!==null;let o=!1;typeof h.rr_mediaLoop=="boolean"?o=h.rr_mediaLoop:o=a.getAttribute("loop")!==null;let n=1;typeof h.rr_mediaVolume=="number"&&(n=h.rr_mediaVolume);let s=0;typeof h.rr_mediaCurrentTime=="number"&&(s=h.rr_mediaCurrentTime),this.mediaMap.set(a,{isPlaying:m,currentTimeAtLastInteraction:s,lastInteractionTimeOffset:r,playbackRate:d,volume:n,muted:p,loop:o}),this.syncTargetWithState(a)}mediaMutation({target:t,timeOffset:r,mutation:i}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:i})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Dt(e,t){if(e.nodeName!=="DIALOG"||e instanceof Me)return;const r=e,i=r.open,a=i&&r.matches("dialog:modal"),u=r.getAttribute("rr_open_mode"),c=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",h=u==="modal";if(!(i&&!(a&&u==="non-modal"||!a&&h))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}i&&r.close(),c&&(h?r.showModal():r.show())}}function jc(e,t){if(e.nodeName!=="DIALOG"||e instanceof Me)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const Kn=5*1e3,eo=1*1e3,to=3600*1e3,qc=aa||Tc,ro="[replayer]",ds={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ps(e){return e.type==L.IncrementalSnapshot&&(e.data.source==_.TouchMove||e.data.source==_.MouseInteraction&&e.data.type==Z.TouchStart)}class da{constructor(t,r){if(O(this,"wrapper"),O(this,"iframe"),O(this,"UNSAFE_replayCanvas",!1),O(this,"service"),O(this,"speedService"),O(this,"config"),O(this,"usingVirtualDom",!1),O(this,"virtualDom",new st),O(this,"mouse"),O(this,"mouseTail",null),O(this,"tailPositions",[]),O(this,"emitter",qc()),O(this,"nextUserInteractionEvent"),O(this,"activityIntervals",[]),O(this,"inactiveEndTimestamp"),O(this,"legacy_missingNodeRetryMap",{}),O(this,"cache",Qi()),O(this,"imageMap",new Map),O(this,"canvasEventMap",new Map),O(this,"mirror",uo()),O(this,"styleMirror",new ri),O(this,"mediaManager"),O(this,"firstFullSnapshot",null),O(this,"newDocumentQueue",[]),O(this,"mousePos",null),O(this,"touchActive",null),O(this,"lastMouseDownEvent",null),O(this,"lastHoveredRootNode"),O(this,"lastSelectionData",null),O(this,"constructedStyleMutations",[]),O(this,"adoptedStyleSheets",[]),O(this,"handleResize",h=>{this.iframe.style.display="inherit";for(const m of[this.mouseTail,this.iframe])m&&(m.setAttribute("width",String(h.width)),m.setAttribute("height",String(h.height)))}),O(this,"applyEventsSynchronously",h=>{for(const m of h){switch(m.type){case L.DomContentLoaded:case L.Load:case L.Custom:continue;case L.FullSnapshot:case L.Meta:case L.Plugin:case L.IncrementalSnapshot:break}this.getCastFn(m,!0)()}}),O(this,"getCastFn",(h,m=!1)=>{let d;switch(h.type){case L.DomContentLoaded:case L.Load:break;case L.Custom:d=()=>{this.emitter.emit(j.CustomEvent,h)};break;case L.Meta:d=()=>this.emitter.emit(j.Resize,{width:h.data.width,height:h.data.height});break;case L.FullSnapshot:d=()=>{var o;if(this.firstFullSnapshot){if(this.firstFullSnapshot===h){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(h,m),(o=this.iframe.contentWindow)==null||o.scrollTo(h.data.initialOffset)};break;case L.IncrementalSnapshot:d=()=>{if(this.applyIncremental(h,m),!m&&(this.handleInactivity(h.timestamp),h===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const o of this.service.state.context.events)if(!(o.timestamp<=h.timestamp)&&this.isUserInteraction(o)){o.delay-h.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=o);break}if(this.nextUserInteractionEvent){const o=this.nextUserInteractionEvent.delay-h.delay,n={speed:Math.min(Math.round(o/Kn),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:n}),this.emitter.emit(j.SkipStart,n)}}};break}return()=>{d&&d();for(const n of this.config.plugins||[])n.handler&&n.handler(h,m,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:h}});const o=this.service.state.context.events.length-1;if(!this.config.liveMode&&h===this.service.state.context.events[o]){const n=()=>{o<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(j.Finish))};let s=50;h.type===L.IncrementalSnapshot&&h.data.source===_.MouseMove&&h.data.positions.length&&(s+=Math.max(0,-h.data.positions[0].timeOffset)),setTimeout(n,s)}this.emitter.emit(j.EventCast,h)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,enforceCanvasArgAllowlist:!1,pauseAnimation:!0,mouseTail:ds,useVirtualDom:!0,logger:console,inactiveThreshold:.02,inactiveSkipTime:Kn};this.config=Object.assign({},i,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(j.Resize,this.handleResize),this.setupDom();for(const h of this.config.plugins||[])h.getMirror&&h.getMirror({nodeMirror:this.mirror});this.emitter.on(j.Flush,()=>{if(this.usingVirtualDom){const h={mirror:this.mirror,applyCanvas:(m,d,p)=>{Cs({event:m,mutation:d,target:p,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this),enforceCanvasArgAllowlist:this.config.enforceCanvasArgAllowlist})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(m,d)=>{m.source===_.StyleSheetRule?this.applyStyleSheetRule(m,d):m.source===_.StyleDeclaration&&this.applyStyleDeclaration(m,d)},afterAppend:(m,d)=>{for(const p of this.config.plugins||[])p.onBuild&&p.onBuild(m,{id:d,replayer:this})}};if(this.iframe.contentDocument)try{Ut(this.iframe.contentDocument,this.virtualDom,h,this.virtualDom.mirror)}catch(m){console.warn(m)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const m in this.legacy_missingNodeRetryMap)try{const d=this.legacy_missingNodeRetryMap[m],p=Wt(d.node,this.mirror,this.virtualDom.mirror);Ut(p,d.node,h,this.virtualDom.mirror),d.node=p}catch(d){this.warn(d)}this.constructedStyleMutations.forEach(m=>{this.applyStyleSheetMutation(m)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(m=>{this.applyAdoptedStyleSheet(m)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[h,m]=this.lastMouseDownEvent;h.dispatchEvent(m)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(j.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const a=new Ac([],{speed:this.config.speed});this.service=kc({events:t.map(h=>r&&r.unpackFn?r.unpackFn(h):h).sort((h,m)=>h.timestamp-m.timestamp),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(h=>{this.emitter.emit(j.StateChange,{player:h})}),this.speedService=Pc({normalSpeed:-1,timer:a}),this.speedService.start(),this.speedService.subscribe(h=>{this.emitter.emit(j.StateChange,{speed:h})}),this.mediaManager=new Vc({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const u=this.service.state.context.events.find(h=>h.type===L.Meta),c=this.service.state.context.events.find(h=>h.type===L.FullSnapshot);if(u){const{width:h,height:m}=u.data;setTimeout(()=>{this.emitter.emit(j.Resize,{width:h,height:m})},0)}c&&setTimeout(()=>{var h;this.firstFullSnapshot||(this.firstFullSnapshot=c,this.rebuildFullSnapshot(c),(h=this.iframe.contentWindow)==null||h.scrollTo(c.data.initialOffset))},1),this.service.state.context.events.find(ps)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getActivityIntervals(){if(this.activityIntervals.length==0){const t=[],r=this.getMetaData(),i=[{timestamp:r.startTime},...this.service.state.context.events.filter(c=>this.isUserInteraction(c)),{timestamp:r.endTime}];for(let c=1;c<i.length;c++){const h=i[c-1],m=i[c];m.timestamp-h.timestamp>this.config.inactivePeriodThreshold?t.push({startTime:h.timestamp,endTime:m.timestamp,duration:m.timestamp-h.timestamp,active:!1}):t.push({startTime:h.timestamp,endTime:m.timestamp,duration:m.timestamp-h.timestamp,active:!0})}const a=[];let u=t[0];for(let c=1;c<t.length;c++)t[c].active!=t[c-1].active&&(a.push({startTime:u.startTime,endTime:t[c-1].endTime,duration:t[c-1].endTime-u.startTime,active:t[c-1].active}),u=t[c]);u&&t.length>0&&a.push({startTime:u.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-u.startTime,active:t[t.length-1].active}),u=a[0];for(let c=1;c<a.length;c++)(!a[c].active&&a[c].duration>this.config.inactiveThreshold*r.totalTime||!a[c-1].active&&a[c-1].duration>this.config.inactiveThreshold*r.totalTime)&&(this.activityIntervals.push({startTime:u.startTime,endTime:a[c-1].endTime,duration:a[c-1].endTime-u.startTime,active:a[c-1].active}),u=a[c]);u&&a.length>0&&this.activityIntervals.push({startTime:u.startTime,endTime:a[a.length-1].endTime,duration:a[a.length-1].endTime-u.startTime,active:a[a.length-1].active})}return this.activityIntervals}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,i;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(i=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||i.classList.remove("rrweb-paused"),this.emitter.emit(j.Start)}pause(t){var r,i;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(i=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||i.classList.add("rrweb-paused"),this.emitter.emit(j.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(j.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(j.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;ps(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}replaceEvents(t){for(const r of t)if(ps(r)){this.mouse.classList.add("touch-device");break}this.service.send({type:"REPLACE_EVENTS",payload:{events:t}})}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Qi()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=Hl({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(Dc(this.iframe.contentWindow,this.iframe.contentDocument),Zs(this.iframe.contentWindow))}handleInactivity(t,r){if((t===this.inactiveEndTimestamp||r)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){for(const i of this.getActivityIntervals())if(t>=i.startTime&&t<i.endTime&&!i.active){this.inactiveEndTimestamp=i.endTime;break}if(this.inactiveEndTimestamp){const i=this.inactiveEndTimestamp-t,a={speed:i/to*this.config.inactiveSkipTime<eo?i/eo:Math.round(Math.max(i,to)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:a}),this.emitter.emit(j.SkipStart,a)}}}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const i=[],a=new Set,u=(m,d)=>{if(m.nodeName==="DIALOG"&&a.add(m),this.collectIframeAndAttachDocument(i,m),this.mediaManager.isSupportedMediaElement(m)){const{events:p}=this.service.state.context;this.mediaManager.addMediaElements(m,t.timestamp-p[0].timestamp,this.mirror)}for(const p of this.config.plugins||[])p.onBuild&&p.onBuild(m,{id:d,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),this.newDocumentQueue=[],Gl(t.data.node,{doc:this.iframe.contentDocument,afterAppend:u,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas,cspContent:this.config.cspContent}),u(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:m,builtNode:d}of i)this.attachDocumentToIframe(m,d),this.newDocumentQueue=this.newDocumentQueue.filter(p=>p!==m);const{documentElement:c,head:h}=this.iframe.contentDocument;this.insertStyleRules(c,h),a.forEach(m=>Dt(m)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(j.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var i;const a=Lc(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&a.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!a.length)if(this.usingVirtualDom){const u=this.virtualDom.createElement("style");this.virtualDom.mirror.add(u,zo(u,this.virtualDom.unserializedId)),t.insertBefore(u,r),u.rules.push({source:_.StyleSheetRule,adds:a.map((c,h)=>({rule:c,index:h}))})}else{const u=document.createElement("style");t.insertBefore(u,r);for(let c=0;c<a.length;c++)(i=u.sheet)==null||i.insertRule(a[c],c)}}attachDocumentToIframe(t,r){const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,a=[],u=new Set,c=(h,m)=>{h.nodeName==="DIALOG"&&u.add(h),this.collectIframeAndAttachDocument(a,h);const d=i.getMeta(h);if((d==null?void 0:d.type)===Ne.Element&&(d==null?void 0:d.tagName.toUpperCase())==="HTML"){const{documentElement:p,head:o}=r.contentDocument;this.insertStyleRules(p,o)}if(!this.usingVirtualDom)for(const p of this.config.plugins||[])p.onBuild&&p.onBuild(h,{id:m,replayer:this})};at(t.node,{doc:r.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:c,cache:this.cache}),c(r.contentDocument,t.node.id);for(const{mutationInQueue:h,builtNode:m}of a)this.attachDocumentToIframe(h,m),this.newDocumentQueue=this.newDocumentQueue.filter(d=>d!==h);u.forEach(h=>Dt(h))}collectIframeAndAttachDocument(t,r){if(et(r,this.mirror)){const i=this.newDocumentQueue.find(a=>a.parentId===this.mirror.getId(r));i&&t.push({mutationInQueue:i,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const i=new Set;let a,u=this.service.state;const c=()=>{u=this.service.state};this.emitter.on(j.Start,c),this.emitter.on(j.Pause,c);const h=()=>{this.emitter.off(j.Start,c),this.emitter.off(j.Pause,c)};r.querySelectorAll('link[rel="stylesheet"]').forEach(m=>{m.sheet||(i.add(m),m.addEventListener("load",()=>{i.delete(m),i.size===0&&a!==-1&&(u.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(j.LoadStylesheetEnd),a&&clearTimeout(a),h())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(j.LoadStylesheetStart),a=setTimeout(()=>{u.matches("playing")&&this.play(this.getCurrentTime()),a=-1,h()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===L.IncrementalSnapshot&&r.data.source===_.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(a=>{this.preloadImages(a,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const i=document.createElement("canvas"),a=i.getContext("2d"),u=a==null?void 0:a.createImageData(i.width,i.height);a==null||a.putImageData(u,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const i={isUnchanged:!0};if("commands"in t){const a=await Promise.all(t.commands.map(async u=>{const c=await Promise.all(u.args.map(Be(this.imageMap,null,i,this.config.enforceCanvasArgAllowlist)));return de(B({},u),{args:c})}));i.isUnchanged===!1&&this.canvasEventMap.set(r,de(B({},t),{commands:a}))}else{const a=await Promise.all(t.args.map(Be(this.imageMap,null,i,this.config.enforceCanvasArgAllowlist)));i.isUnchanged===!1&&this.canvasEventMap.set(r,de(B({},t),{args:a}))}}}applyIncremental(t,r){var i,a,u;const{data:c}=t;switch(c.source){case _.Mutation:{try{this.applyMutation(c,r)}catch(h){this.warn(`Exception in mutation ${h.message||h}`,c)}break}case _.Drag:case _.TouchMove:case _.MouseMove:if(r){const h=c.positions[c.positions.length-1];this.mousePos={x:h.x,y:h.y,id:h.id,debugData:c}}else c.positions.forEach(h=>{const m={doAction:()=>{this.moveAndHover(h.x,h.y,h.id,r,c)},delay:h.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(m)}),this.timer.addAction({doAction(){},delay:t.delay-((i=c.positions[0])==null?void 0:i.timeOffset)});break;case _.MouseInteraction:{if(c.id===-1)break;const h=new Event(Ue(Z[c.type])),m=this.mirror.getNode(c.id);if(!m)return this.debugNodeNotFound(c,c.id);this.emitter.emit(j.MouseInteraction,{type:c.type,target:m});const{triggerFocus:d}=this.config;switch(c.type){case Z.Blur:"blur"in m&&m.blur();break;case Z.Focus:d&&m.focus&&m.focus({preventScroll:!0});break;case Z.Click:case Z.TouchStart:case Z.TouchEnd:case Z.MouseDown:case Z.MouseUp:r?(c.type===Z.TouchStart?this.touchActive=!0:c.type===Z.TouchEnd&&(this.touchActive=!1),c.type===Z.MouseDown?this.lastMouseDownEvent=[m,h]:c.type===Z.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:c.x||0,y:c.y||0,id:c.id,debugData:c}):(c.type===Z.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(c.x||0,c.y||0,c.id,r,c),c.type===Z.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):c.type===Z.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):c.type===Z.TouchEnd?this.mouse.classList.remove("touch-active"):m.dispatchEvent(h));break;case Z.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:m.dispatchEvent(h)}break}case _.Scroll:{if(c.id===-1)break;if(this.usingVirtualDom){const h=this.virtualDom.mirror.getNode(c.id);if(!h)return this.debugNodeNotFound(c,c.id);h.scrollData=c;break}this.applyScroll(c,r);break}case _.ViewportResize:this.emitter.emit(j.Resize,{width:c.width,height:c.height});break;case _.Input:{if(c.id===-1)break;if(this.usingVirtualDom){const h=this.virtualDom.mirror.getNode(c.id);if(!h)return this.debugNodeNotFound(c,c.id);h.inputData=c;break}this.applyInput(c);break}case _.MediaInteraction:{const h=this.usingVirtualDom?this.virtualDom.mirror.getNode(c.id):this.mirror.getNode(c.id);if(!h)return this.debugNodeNotFound(c,c.id);const m=h,{events:d}=this.service.state.context;this.mediaManager.mediaMutation({target:m,timeOffset:t.timestamp-d[0].timestamp,mutation:c});break}case _.StyleSheetRule:case _.StyleDeclaration:{this.usingVirtualDom?c.styleId?this.constructedStyleMutations.push(c):c.id&&((a=this.virtualDom.mirror.getNode(c.id))==null||a.rules.push(c)):this.applyStyleSheetMutation(c);break}case _.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const h=this.virtualDom.mirror.getNode(c.id);if(!h)return this.debugNodeNotFound(c,c.id);h.canvasMutations.push({event:t,mutation:c})}else{const h=this.mirror.getNode(c.id);if(!h)return this.debugNodeNotFound(c,c.id);Cs({event:t,mutation:c,target:h,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this),enforceCanvasArgAllowlist:this.config.enforceCanvasArgAllowlist})}break}case _.Font:{try{const h=new FontFace(c.family,c.buffer?new Uint8Array(JSON.parse(c.fontSource)):c.fontSource,c.descriptors);(u=this.iframe.contentDocument)==null||u.fonts.add(h)}catch(h){this.warn(h)}break}case _.Selection:{if(r){this.lastSelectionData=c;break}this.applySelection(c);break}case _.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(c):this.applyAdoptedStyleSheet(c);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Pu(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const d in this.legacy_missingNodeRetryMap)try{const p=this.legacy_missingNodeRetryMap[d],o=$o(p.node,this.virtualDom,this.mirror);o&&(p.node=o)}catch(p){this.warn(p)}const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(d=>i.getNode(d.id)?!0:(this.warnNodeNotFound(t,d.id),!1)),t.removes.forEach(d=>{var p;const o=i.getNode(d.id);if(!o)return;let n=i.getNode(d.parentId);if(!n)return this.warnNodeNotFound(t,d.parentId);if(d.isShadow&&Fe(n)&&(n=n.shadowRoot),i.removeNodeFromMap(o),n)try{n.removeChild(o),this.usingVirtualDom&&o.nodeName==="#text"&&n.nodeName==="STYLE"&&((p=n.rules)==null?void 0:p.length)>0&&(n.rules=[])}catch(s){if(s instanceof DOMException)this.warn("parent could not remove child in mutation",n,o,t);else throw s}});const a=B({},this.legacy_missingNodeRetryMap),u=[],c=d=>{let p=null;return d.nextId&&(p=i.getNode(d.nextId)),d.nextId!==null&&d.nextId!==void 0&&d.nextId!==-1&&!p},h=d=>{var p,o;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let n=i.getNode(d.parentId);if(!n)return d.node.type===Ne.Document?this.newDocumentQueue.push(d):u.push(d);d.node.isShadow&&(Fe(n)||n.attachShadow({mode:"open"}),n=n.shadowRoot);let s=null,l=null;if(d.previousId&&(s=i.getNode(d.previousId)),d.nextId&&(l=i.getNode(d.nextId)),c(d))return u.push(d);if(d.node.rootId&&!i.getNode(d.node.rootId))return;const f=d.node.rootId?i.getNode(d.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(et(n,i)){this.attachDocumentToIframe(d,n);return}const g=(v,E)=>{if(!this.usingVirtualDom){Dt(v);for(const S of this.config.plugins||[])S.onBuild&&S.onBuild(v,{id:E,replayer:this})}},b=at(d.node,{doc:f,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(d.previousId===-1||d.nextId===-1){a[d.node.id]={node:b,mutation:d};return}const y=i.getMeta(n);if(y&&y.type===Ne.Element&&d.node.type===Ne.Text){const v=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if(y.tagName==="textarea")for(const E of v)E.nodeType===n.TEXT_NODE&&n.removeChild(E);else if(y.tagName==="style"&&v.length===1)for(const E of v)E.nodeType===n.TEXT_NODE&&!i.hasNode(E)&&(b.textContent=E.textContent,n.removeChild(E))}else if((y==null?void 0:y.type)===Ne.Document){const v=n;d.node.type===Ne.DocumentType&&((p=v.childNodes[0])==null?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),b.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(s&&s.nextSibling&&s.nextSibling.parentNode?n.insertBefore(b,s.nextSibling):l&&l.parentNode?n.contains(l)?n.insertBefore(b,l):n.insertBefore(b,null):n.appendChild(b),g(b,d.node.id),this.usingVirtualDom&&b.nodeName==="#text"&&n.nodeName==="STYLE"&&((o=n.rules)==null?void 0:o.length)>0&&(n.rules=[]),et(b,this.mirror)){const v=this.mirror.getId(b),E=this.newDocumentQueue.find(S=>S.parentId===v);E&&(this.attachDocumentToIframe(E,b),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==E))}(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(a,n,b,d)};t.adds.forEach(d=>{h(d)});const m=Date.now();for(;u.length;){const d=Jo(u);if(u.length=0,Date.now()-m>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}for(const p of d)i.getNode(p.value.parentId)?Ks(p,n=>{h(n)}):this.debug("Drop resolve tree since there is no parent for the root node.",p)}Object.keys(a).length&&Object.assign(this.legacy_missingNodeRetryMap,a),Xo(t.texts).forEach(d=>{var p;const o=i.getNode(d.id);if(!o)return t.removes.find(s=>s.id===d.id)?void 0:this.warnNodeNotFound(t,d.id);const n=o.parentElement;if(d.value&&n&&n.tagName==="STYLE"?o.textContent=Qt(d.value,this.cache):o.textContent=d.value,this.usingVirtualDom){const s=o.parentNode;((p=s==null?void 0:s.rules)==null?void 0:p.length)>0&&(s.rules=[])}}),t.attributes.forEach(d=>{var p;const o=i.getNode(d.id);if(!o)return t.removes.find(n=>n.id===d.id)?void 0:this.warnNodeNotFound(t,d.id);for(const n in d.attributes)if(typeof n=="string"){const s=d.attributes[n];if(s===null)o.removeAttribute(n),n==="open"&&jc(o,d);else if(typeof s=="string")try{if(n==="_cssText"&&(o.nodeName==="LINK"||o.nodeName==="STYLE"))try{const l=i.getMeta(o),f=at(de(B({},l),{attributes:B(B({},l.attributes),d.attributes)}),{doc:o.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(l.attributes,d.attributes);const g=o.nextSibling,b=o.parentNode;if(f&&b){b.removeChild(o),b.insertBefore(f,g),i.replace(d.id,f);break}}catch(l){}if(n==="value"&&o.nodeName==="TEXTAREA"){const l=o;l.childNodes.forEach(g=>l.removeChild(g));const f=(p=o.ownerDocument)==null?void 0:p.createTextNode(s);f&&l.appendChild(f)}else o.setAttribute(n,s);n==="rr_open_mode"&&o.nodeName==="DIALOG"&&Dt(o,d)}catch(l){this.warn("An error occurred may due to the checkout feature.",l)}else if(n==="style"){const l=s,f=o;for(const g in l)if(l[g]===!1)f.style.removeProperty(g);else if(l[g]instanceof Array){const b=l[g];f.style.setProperty(g,b[0],b[1])}else{const b=l[g];f.style.setProperty(g,b)}}}})}applyScroll(t,r){var i,a;const u=this.mirror.getNode(t.id);if(!u)return this.debugNodeNotFound(t,t.id);const c=this.mirror.getMeta(u);if(u===this.iframe.contentDocument)(i=this.iframe.contentWindow)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((c==null?void 0:c.type)===Ne.Document)(a=u.defaultView)==null||a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{u.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(h){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(i){}}applySelection(t){try{const r=new Set,i=t.ranges.map(({start:a,startOffset:u,end:c,endOffset:h})=>{const m=this.mirror.getNode(a),d=this.mirror.getNode(c);if(!m||!d)return;const p=new Range;p.setStart(m,u),p.setEnd(d,h);const o=m.ownerDocument,n=o==null?void 0:o.getSelection();return n&&r.add(n),{range:p,selection:n}});r.forEach(a=>a.removeAllRanges()),i.forEach(a=>{var u;return a&&((u=a.selection)==null?void 0:u.addRange(a.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let i=null;t.styleId?i=this.styleMirror.getStyle(t.styleId):t.id&&(i=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),i&&(t.source===_.StyleSheetRule?this.applyStyleSheetRule(t,i):t.source===_.StyleDeclaration&&this.applyStyleDeclaration(t,i))}applyStyleSheetRule(t,r){var i,a,u,c;if((i=t.adds)==null||i.forEach(({rule:h,index:m})=>{try{if(Array.isArray(m)){const{positions:d,index:p}=bs(m),o=Qe(r.cssRules,d);o==null||o.insertRule(h,p)}else{const d=m===void 0?void 0:Math.min(m,r.cssRules.length);r==null||r.insertRule(h,d)}}catch(d){}}),(a=t.removes)==null||a.forEach(({index:h})=>{try{if(Array.isArray(h)){const{positions:m,index:d}=bs(h),p=Qe(r.cssRules,m);p==null||p.deleteRule(d||0)}else r==null||r.deleteRule(h)}catch(m){}}),typeof t.replace=="string")try{(u=r.replace)==null||u.call(r,t.replace)}catch(h){}if(typeof t.replaceSync=="string")try{(c=r.replaceSync)==null||c.call(r,t.replaceSync)}catch(h){}}applyStyleDeclaration(t,r){if(t.set){const i=Qe(r.rules,t.index);i!=null&&i.style&&i.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const i=Qe(r.rules,t.index);i!=null&&i.style&&i.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const i=this.mirror.getNode(t.id);if(!i)return;(r=t.styles)==null||r.forEach(h=>{var m;let d=null,p=null;if(Fe(i)?p=((m=i.ownerDocument)==null?void 0:m.defaultView)||null:i.nodeName==="#document"&&(p=i.defaultView),!!p)try{d=new p.CSSStyleSheet,this.styleMirror.add(d,h.styleId),this.applyStyleSheetRule({source:_.StyleSheetRule,adds:h.rules},d)}catch(o){}});const a=10;let u=0;const c=(h,m)=>{const d=m.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);Fe(h)?h.shadowRoot.adoptedStyleSheets=d:h.nodeName==="#document"&&(h.adoptedStyleSheets=d),d.length!==m.length&&u<a&&(setTimeout(()=>c(h,m),0+100*u),u++)};c(i,t.styleIds)}legacy_resolveMissingNode(t,r,i,a){const{previousId:u,nextId:c}=a,h=u&&t[u],m=c&&t[c];if(h){const{node:d,mutation:p}=h;r.insertBefore(d,i),delete t[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(t,r,d,p)}if(m){const{node:d,mutation:p}=m;r.insertBefore(d,i.nextSibling),delete t[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(t,r,d,p)}}moveAndHover(t,r,i,a,u){const c=this.mirror.getNode(i);if(!c)return this.debugNodeNotFound(u,i);const h=ti(c,this.iframe),m=t*h.absoluteScale+h.x,d=r*h.absoluteScale+h.y;this.mouse.style.left=`${m}px`,this.mouse.style.top=`${d}px`,a||this.drawMouseTail({x:m,y:d}),this.hoverElements(c)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:i,strokeStyle:a,duration:u}=this.config.mouseTail===!0?ds:Object.assign({},ds,this.config.mouseTail),c=()=>{if(!this.mouseTail)return;const h=this.mouseTail.getContext("2d");!h||!this.tailPositions.length||(h.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),h.beginPath(),h.lineWidth=i,h.lineCap=r,h.strokeStyle=a,h.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(m=>h.lineTo(m.x,m.y)),h.stroke())};this.tailPositions.push(t),c(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(h=>h!==t),c()},u/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(a=>{a.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let i=t;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type!==L.IncrementalSnapshot?!1:t.data.source>_.Mutation&&t.data.source<=_.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(j.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(ro,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(ro,...t)}}const ni="rrweb-embedded",oi=1,Gc=["speed","maxSpeed","loadTimeout","skipInactive","inactivePeriodThreshold","showWarning","showDebug","blockClass","liveMode","insertStyleRules","triggerFocus","UNSAFE_replayCanvas","enforceCanvasArgAllowlist","cspContent","pauseAnimation","mouseTail","useVirtualDom","inactiveThreshold","inactiveSkipTime"];function Es(e){const t={};if(e&&typeof e=="object")for(const r of Gc){const i=e[r];i!==void 0&&typeof i!="function"&&(t[r]=i)}return t}function xs(e){return{channel:ni,version:oi,message:e}}function pa(e){if(!e||typeof e!="object")return!1;const t=e;return t.channel===ni&&t.version===oi&&!!t.message&&typeof t.message=="object"&&typeof t.message.type=="string"}const Hc=new Set([j.Resize,j.EventCast,j.CustomEvent]);class ma{constructor(t={}){var r,i,a,u,c;O(this,"root"),O(this,"parentWindow"),O(this,"timeUpdateIntervalMs"),O(this,"expectedParentOrigin"),O(this,"replayer",null),O(this,"playing",!1),O(this,"timer",null),O(this,"started",!1),O(this,"layout",null),O(this,"onMessage",h=>{if(h.source===this.parentWindow&&this.expectedParentOrigin!==null&&h.origin===this.expectedParentOrigin&&pa(h.data))try{this.handle(h.data.message)}catch(m){this.post({type:"error",message:m instanceof Error?m.message:String(m)})}}),this.root=(r=t.root)!=null?r:document.body,this.parentWindow=(i=t.parentWindow)!=null?i:window.parent,this.timeUpdateIntervalMs=(a=t.timeUpdateIntervalMs)!=null?a:50,this.expectedParentOrigin=(c=(u=t.expectedParentOrigin)!=null?u:new URLSearchParams(location.search).get("parentOrigin"))!=null?c:null}start(){this.started||(this.started=!0,this.expectedParentOrigin===null&&console.warn("[rrweb-embedded] no parentOrigin configured; all incoming messages will be ignored"),window.addEventListener("message",this.onMessage),this.post({type:"ready"}))}stop(){var t;window.removeEventListener("message",this.onMessage),this.setPlaying(!1),(t=this.replayer)==null||t.destroy(),this.replayer=null,this.started=!1}handle(t){var d,p,o;var r,i,a,u,c,h,m;switch(t.type){case"ping":this.post({type:"ready"});return;case"init":this.init(t.events,t.config,t.autoplay);return;case"play":(r=this.replayer)==null||r.play((d=t.timeOffset)!=null?d:0),this.setPlaying(!0);return;case"pause":(i=this.replayer)==null||i.pause(t.timeOffset),this.setPlaying(!1),this.postTime();return;case"resume":(a=this.replayer)==null||a.resume((p=t.timeOffset)!=null?p:0),this.setPlaying(!0);return;case"setLayout":this.layout={scale:t.scale,anchor:(o=t.anchor)!=null?o:"center"},this.applyLayout(),this.postDimensions();return;case"setConfig":(u=this.replayer)==null||u.setConfig(Es(t.config));return;case"replaceEvents":this.replayer&&(this.replayer.replaceEvents(t.events),this.postInitialized());return;case"addEvent":(c=this.replayer)==null||c.addEvent(t.event);return;case"enableInteract":(h=this.replayer)==null||h.enableInteract();return;case"disableInteract":(m=this.replayer)==null||m.disableInteract();return;case"destroy":this.stop();return}}init(t,r,i){this.replayer&&(this.setPlaying(!1),this.replayer.destroy());const a=de(B({},Es(r)),{root:this.root});this.replayer=new da(t,a),this.wireEvents(this.replayer),this.applyLayout(),this.postInitialized(),this.postDimensions(),i&&(this.replayer.play(0),this.setPlaying(!0))}applyLayout(){var t;const r=(t=this.replayer)==null?void 0:t.wrapper;if(!r||!this.layout)return;const{scale:i,anchor:a}=this.layout,u=a==="top";r.style.position="absolute",r.style.transformOrigin="top left",r.style.left="50%",r.style.top=u?"0":"50%",r.style.transform=u?`scale(${i}) translate(-50%, 0)`:`scale(${i}) translate(-50%, -50%)`}postDimensions(){var t;const r=(t=this.replayer)==null?void 0:t.wrapper;if(!r)return;const i=r.getBoundingClientRect();this.post({type:"dimensions",width:i.width,height:i.height,top:i.top,left:i.left})}postInitialized(){this.replayer&&this.post({type:"initialized",metadata:this.replayer.getMetaData(),activityIntervals:this.replayer.getActivityIntervals()})}wireEvents(t){for(const r of Object.values(j))t.on(r,i=>{r===j.Finish&&(this.setPlaying(!1),this.postTime()),r===j.Resize&&this.postDimensions(),this.post(Hc.has(r)&&i!==void 0?{type:"replayer-event",event:r,payload:i}:{type:"replayer-event",event:r})})}setPlaying(t){this.playing!==t&&(this.playing=t,t?this.startTimePump():this.stopTimePump())}startTimePump(){this.timer===null&&(this.timer=setInterval(()=>this.postTime(),this.timeUpdateIntervalMs))}postTime(){this.replayer&&this.post({type:"time",currentTime:this.replayer.getCurrentTime()})}stopTimePump(){this.timer!==null&&(clearInterval(this.timer),this.timer=null)}post(t){var r;this.parentWindow.postMessage(xs(t),(r=this.expectedParentOrigin)!=null?r:"*")}}function Yc(e){const t=new ma(e);return t.start(),t}class Jc{constructor(t,r={}){var i;O(this,"iframe"),O(this,"hostOrigin"),O(this,"listeners",new Map),O(this,"metadata",null),O(this,"activityIntervals",[]),O(this,"dimensions",null),O(this,"lastCurrentTime",0),O(this,"ready",!1),O(this,"readyResolvers",[]),O(this,"disposed",!1),O(this,"pending",[]),O(this,"onMessage",a=>{a.source===this.iframe.contentWindow&&pa(a.data)&&this.handle(a.data.message)}),this.iframe=t,this.hostOrigin=(i=r.hostOrigin)!=null?i:"*",window.addEventListener("message",this.onMessage),this.probe()}whenReady(){return this.ready?Promise.resolve():new Promise(t=>this.readyResolvers.push(t))}init(t,r,i=!1){this.send({type:"init",events:t,config:r,autoplay:i})}play(t){this.send({type:"play",timeOffset:t})}pause(t){this.send({type:"pause",timeOffset:t})}resume(t){this.send({type:"resume",timeOffset:t})}setConfig(t){this.send({type:"setConfig",config:t})}setLayout(t,r){this.send({type:"setLayout",scale:t,anchor:r})}replaceEvents(t){this.send({type:"replaceEvents",events:t})}addEvent(t){this.send({type:"addEvent",event:t})}enableInteract(){this.send({type:"enableInteract"})}disableInteract(){this.send({type:"disableInteract"})}destroy(){if(!this.disposed){this.disposed=!0;try{this.send({type:"destroy"})}finally{window.removeEventListener("message",this.onMessage),this.listeners.clear()}}}on(t,r){let i=this.listeners.get(t);i||(i=new Set,this.listeners.set(t,i)),i.add(r)}off(t,r){var i;(i=this.listeners.get(t))==null||i.delete(r)}getCurrentTime(){return this.lastCurrentTime}getMetaData(){return this.metadata}getActivityIntervals(){return this.activityIntervals}getDimensions(){return this.dimensions}send(t){if(!this.ready){this.pending.push(t);return}this.postToHost(t)}postToHost(t){const r=this.iframe.contentWindow;r&&r.postMessage(xs(t),this.hostOrigin)}flushPending(){const t=this.pending;this.pending=[],t.forEach(r=>this.postToHost(r))}probe(){var t;(t=this.iframe.contentWindow)==null||t.postMessage(xs({type:"ping"}),"*")}handle(t){switch(t.type){case"ready":this.ready=!0,this.flushPending(),this.readyResolvers.forEach(r=>r()),this.readyResolvers=[];return;case"initialized":this.metadata=t.metadata,this.activityIntervals=t.activityIntervals,this.emit("initialized",t.metadata);return;case"replayer-event":this.emit(t.event,t.payload);return;case"time":this.lastCurrentTime=t.currentTime,this.emit("time",t.currentTime);return;case"dimensions":this.dimensions={width:t.width,height:t.height,top:t.top,left:t.left},this.emit("dimensions",this.dimensions);return;case"error":this.emit("error",t.message);return}}emit(t,r){var i;(i=this.listeners.get(t))==null||i.forEach(a=>a(r))}}function Xc(e){try{return new URL(e).origin}catch(t){return"'self'"}}function Qc(e){var u;const t=Xc(e.scriptUrl),r=["'unsafe-inline'",t,...(u=e.extraStyleSources)!=null?u:[]].join(" "),i=["default-src 'none'",`script-src ${t}`,`style-src ${r}`,"img-src * data: blob:","font-src * data:","media-src * data: blob:","frame-src *","connect-src 'none'","worker-src 'none'"].join("; "),a=e.styleUrl?`<link rel="stylesheet" href="${ms(e.styleUrl)}">`:"";return`<!DOCTYPE html>
|
|
175
175
|
<html>
|
|
176
176
|
<head>
|
|
177
177
|
<meta charset="utf-8">
|
|
178
|
-
<meta http-equiv="Content-Security-Policy" content="${
|
|
178
|
+
<meta http-equiv="Content-Security-Policy" content="${ms(i)}">
|
|
179
179
|
<style>html,body{margin:0;padding:0;height:100%;overflow:hidden;background:transparent}</style>
|
|
180
180
|
${a}
|
|
181
|
-
<script type="module" src="${
|
|
181
|
+
<script type="module" src="${ms(e.scriptUrl)}"><\/script>
|
|
182
182
|
</head>
|
|
183
183
|
<body></body>
|
|
184
|
-
</html>`}function
|
|
184
|
+
</html>`}function ms(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}const{addCustomEvent:Zc}=_e,{freezePage:Kc}=_e,{takeFullSnapshot:eh}=_e;exports.EmbeddedReplayerClient=Jc;exports.EmbeddedReplayerHost=ma;exports.EventType=L;exports.IncrementalSource=_;exports.MouseInteractions=Z;exports.RRWEB_EMBEDDED_CHANNEL=ni;exports.RRWEB_EMBEDDED_PROTOCOL_VERSION=oi;exports.Replayer=da;exports.ReplayerEvents=j;exports.addCustomEvent=Zc;exports.buildHostDocument=Qc;exports.canvasMutation=Cs;exports.freezePage=Kc;exports.pickSerializableConfig=Es;exports.record=_e;exports.startEmbeddedReplayerHost=Yc;exports.takeFullSnapshot=eh;exports.utils=Qu;
|
|
185
185
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
186
186
|
var __cp = (to, from, except, desc) => {
|
|
187
187
|
if ((from && typeof from === "object") || typeof from === "function") {
|