@extn/segi-js 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,37 +1,37 @@
1
- "use strict";var Segi=(()=>{var yu=Object.create;var jt=Object.defineProperty;var wu=Object.getOwnPropertyDescriptor;var Su=Object.getOwnPropertyNames;var bu=Object.getPrototypeOf,vu=Object.prototype.hasOwnProperty;var Cu=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var je=(s,e)=>()=>(s&&(e=s(s=0)),e);var Gt=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Ht=(s,e)=>{for(var t in e)jt(s,t,{get:e[t],enumerable:!0})},In=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Su(e))!vu.call(s,i)&&i!==t&&jt(s,i,{get:()=>e[i],enumerable:!(r=wu(e,i))||r.enumerable});return s};var Eu=(s,e,t)=>(t=s!=null?yu(bu(s)):{},In(e||!s||!s.__esModule?jt(t,"default",{value:s,enumerable:!0}):t,s)),Iu=s=>In(jt({},"__esModule",{value:!0}),s);var Nn=Gt(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.SEGI_DEFAULT_ADMIN_URL=le.SEGI_DEFAULT_CDN_URL=le.SEGI_DEFAULT_PM2_ENDPOINT=le.SEGI_DEFAULT_INGEST_ENDPOINT=le.SEGI_DEFAULT_API_BASE=void 0;le.SEGI_DEFAULT_API_BASE="https://segiapi.extn.ai";le.SEGI_DEFAULT_INGEST_ENDPOINT="https://segiapi.extn.ai/api/ingest/events";le.SEGI_DEFAULT_PM2_ENDPOINT="https://segiapi.extn.ai/api/ingest/pm2";le.SEGI_DEFAULT_CDN_URL="https://cdn.extn.ai/segi/segi.min.js";le.SEGI_DEFAULT_ADMIN_URL="https://segi.extn.ai"});var On=Gt(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.scrubHeaders=Rn;dt.scrubObject=Fe;dt.scrubEvent=Au;var xu=new Set(["authorization","cookie","set-cookie","x-api-key","proxy-authorization"]),Mu=[/^password$/i,/^passwd$/i,/token/i,/secret/i,/api[-_]?key/i,/^authorization$/i,/card[-_]?number/i,/^rrn$/i,/^residentnumber$/i],An="[Filtered]";function Rn(s){if(!s)return s;let e={};for(let[t,r]of Object.entries(s))xu.has(t.toLowerCase())?e[t]=An:e[t]=r;return e}function Nu(s){return Mu.some(e=>e.test(s))}function Fe(s,e=0){if(e>8||s==null)return s;if(Array.isArray(s))return s.map(t=>Fe(t,e+1));if(typeof s=="object"){let t={};for(let[r,i]of Object.entries(s))Nu(r)?t[r]=An:t[r]=Fe(i,e+1);return t}return s}function Au(s){let e=JSON.parse(JSON.stringify(s));return e.request&&(e.request.headers=Rn(e.request.headers),e.request.body=Fe(e.request.body),e.request.query=Fe(e.request.query)),e.extra&&(e.extra=Fe(e.extra)),e.tags&&(e.tags=Fe(e.tags)),e}});var Dn=Gt(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.generateFingerprint=Du;var Ru=Cu("crypto");function hs(s){return s?s.replace(/0x[0-9a-fA-F]+/g,"0xX").replace(/\b\d{4,}\b/g,"N").replace(/[\r\n]+/g," ").trim().slice(0,500):""}function Ou(s){if(!s)return"";let e=s.split(`
2
- `).map(r=>r.trim()).filter(Boolean),t=e.find(r=>r.startsWith("at "))??e[1]??"";return hs(t)}function Du(s){let e=[String(s.projectId),hs(s.errorName??""),hs(s.message??""),Ou(s.stack??"")];return(0,Ru.createHash)("sha256").update(e.join("|")).digest("hex")}});var Tn=Gt(we=>{"use strict";var Tu=we&&we.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),ds=we&&we.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Tu(e,s,t)};Object.defineProperty(we,"__esModule",{value:!0});ds(Nn(),we);ds(On(),we);ds(Dn(),we)});function Ln(s){return s<640?"mobile":s<1024?"tablet":"desktop"}function ku(s,e){let t=s;for(;t;){if(t.classList?.contains(e))return!0;t=t.parentElement}return!1}function Lu(s){try{if(s.id)return`#${s.id}`;let e=s.tagName?.toLowerCase();if(!e)return;let t=(s.className&&typeof s.className=="string"?s.className.split(/\s+/).filter(Boolean).slice(0,2):[]).map(r=>`.${r}`);return`${e}${t.join("")}`.slice(0,512)}catch{return}}function $n(s){let e=s.options.mask?.class??"segi-mask",t=!1,r=[],i=-1,n=0,o=(h={})=>{if(r.length===0)return;let f=r.splice(0,r.length);s.sendClicks(f,!!h.useBeacon)},a=setInterval(()=>{t||o()},5e3),l=h=>{if(!t)try{let f=h.target;if(!f||ku(f,e))return;let g=Math.max(document.documentElement.scrollWidth,document.body?.scrollWidth??0,1),m=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0,1),p=h.pageX,d=h.pageY,y=window.innerWidth,b={sessionUid:s.sessionUid,ts:new Date().toISOString(),urlPath:location.pathname.slice(0,255),device:Ln(y),viewportW:y,viewportH:window.innerHeight,x:Math.round(h.clientX),y:Math.round(h.clientY),pageX:Math.round(p),pageY:Math.round(d),relX:Math.max(0,Math.min(1,p/g)),relY:Math.max(0,Math.min(1,d/m)),selector:Lu(f),tag:f.tagName?.toLowerCase().slice(0,32),text:(f.textContent??void 0)?.trim().slice(0,128)||void 0};r.push(b),r.length>=50&&o()}catch{}},u=()=>{if(t)return;let h=Date.now();if(!(h-n<1e3))try{let f=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0,1),g=window.innerHeight,m=Math.round(window.scrollY+g),p=Math.max(0,Math.min(100,Math.round(m/f*100)));if(p<=i)return;i=p,n=h;let d=window.innerWidth;s.sendScroll({sessionUid:s.sessionUid,urlPath:location.pathname.slice(0,255),device:Ln(d),viewportH:g,docH:f,maxScrollY:m,maxScrollPct:p},!1)}catch{}},c=()=>{o({useBeacon:!0})};return window.addEventListener("click",l,!0),window.addEventListener("scroll",u,{capture:!0,passive:!0}),window.addEventListener("pagehide",c),{pause(){t=!0},resume(){t=!1},stop(){clearInterval(a),window.removeEventListener("click",l,!0),window.removeEventListener("scroll",u,!0),window.removeEventListener("pagehide",c),o({useBeacon:!0})},flushClicks:o}}var Pn=je(()=>{"use strict"});function Yt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let e=Math.random()*16|0;return(s==="x"?e:e&3|8).toString(16)})}function Wn(){try{if(typeof sessionStorage>"u")return null;let s=sessionStorage.getItem(Un),e=Number(sessionStorage.getItem(Bn)??"0");return!s||!e?null:{uid:s,at:e}}catch{return null}}function gs(s,e){try{if(typeof sessionStorage>"u")return;sessionStorage.setItem(Un,s),sessionStorage.setItem(Bn,String(e))}catch{}}function zn(){let s=Date.now(),e=Wn();if(e&&s-e.at<18e5)return gs(e.uid,s),e.uid;let t=Yt();return gs(t,s),$u=t,t}function Vn(){let s=Wn();s&&gs(s.uid,Date.now())}function ys(){try{if(typeof localStorage>"u")return Ge||(Ge=Yt()),Ge;let s=localStorage.getItem(Fn);if(s)return s;let e=Yt();return localStorage.setItem(Fn,e),e}catch{return Ge||(Ge=Yt()),Ge}}var Un,Bn,Fn,$u,Ge,jn=je(()=>{"use strict";Un="_bd_session_uid",Bn="_bd_session_at",Fn="_bd_anon",$u=null,Ge=null});function Gn(s){return(s&&s.trim()||Pu).replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"")}async function Ne(s,e,t){let r=`${Gn(s.endpoint)}/api/trace${e}`;try{return await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-Segi-Project-Key":s.projectKey},body:JSON.stringify(t)})}catch{return null}}function ws(s,e,t){try{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;let r=`${Gn(s.endpoint)}/api/trace${e}?pk=${encodeURIComponent(s.projectKey)}`,i=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(r,i)}catch{return!1}}var Pu,Hn=je(()=>{"use strict";Pu="https://segiapi.extn.ai"});var ou={};Ht(ou,{EventType:()=>I,IncrementalSource:()=>E,MouseInteractions:()=>$,Replayer:()=>Li,ReplayerEvents:()=>L,addCustomEvent:()=>Ym,canvasMutation:()=>_i,freezePage:()=>Xm,mirror:()=>Vr,record:()=>_e,takeFullSnapshot:()=>Zm,utils:()=>am});function $i(s){if(Xt[s])return Xt[s];let e=globalThis[s],t=e.prototype,r=s in Zn?Zn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in Kn?Kn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!zu())return Xt[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?Xt[s]=u:t}catch{return t}}function Ie(s,e,t){var r;let i=`${s}.${String(t)}`;if(Ss[i])return Ss[i].call(e);let n=$i(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Ss[i]=o,o.call(e)):e[t]}function oa(s,e,t){let r=`${s}.${String(t)}`;if(bs[r])return bs[r].bind(e);let n=$i(s)[t];return typeof n!="function"?e[t]:(bs[r]=n,n.bind(e))}function Vu(s){return Ie("Node",s,"ownerDocument")}function ju(s){return Ie("Node",s,"childNodes")}function Gu(s){return Ie("Node",s,"parentNode")}function Hu(s){return Ie("Node",s,"parentElement")}function Yu(s){return Ie("Node",s,"textContent")}function Xu(s,e){return oa("Node",s,"contains")(e)}function Zu(s){return oa("Node",s,"getRootNode")()}function Ku(s){return!s||!("host"in s)?null:Ie("ShadowRoot",s,"host")}function Ju(s){return s.styleSheets}function qu(s){return!s||!("shadowRoot"in s)?null:Ie("Element",s,"shadowRoot")}function Qu(s,e){return Ie("Element",s,"querySelector")(e)}function ec(s,e){return Ie("Element",s,"querySelectorAll")(e)}function tc(){return $i("MutationObserver").constructor}function rc(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function Pi(s){return s.nodeType===s.ELEMENT_NODE}function bt(s){let e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function vt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function sc(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ic(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function ks(s){try{let e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);let r=Array.from(e,i=>aa(i,t)).join("");return sc(r)}catch{return null}}function aa(s,e){if(oc(s)){let t;try{t=ks(s.styleSheet)||ic(s)}catch{t=s.cssText}return s.styleSheet.href?Nr(t,s.styleSheet.href):t}else{let t=s.cssText;return ac(s)&&s.selectorText.includes(":")&&(t=nc(t)),e?Nr(t,e):t}}function nc(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function oc(s){return"styleSheet"in s}function ac(s){return"selectorText"in s}function la(){return new It}function xr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",a=r&&Te(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Te(s){return s.toLowerCase()}function lc(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=Jn in n?n[Jn]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function uc(s,e){return!s||!e||s.type!==e.type?!1:s.type===O.Document?s.compatMode===e.compatMode:s.type===O.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===O.Comment||s.type===O.Text||s.type===O.CDATA?s.textContent===e.textContent:s.type===O.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Mr(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Te(e):null}function Fi(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function cc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}function Nr(s,e){return(s||"").replace(hc,(t,r,i,n,o,a)=>{let l=i||o||a,u=r||n||"";if(!l)return t;if(fc.test(l)||dc.test(l))return`url(${u}${l}${u})`;if(pc.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${cc(e)+l}${u})`;let c=e.split("/"),h=l.split("/");c.pop();for(let f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Zt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function mc(s,e,t=!1){let r=Array.from(e.childNodes),i=[],n=0;if(r.length>1&&s&&typeof s=="string"){let o=Zt(s,t),a=o.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){let u=Zt(r[l].textContent,t),c=100,h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),g=o.split(f),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[l-1].textContent!=="")m=o.indexOf(f,1);else if(g.length===1){if(f=f.substring(0,f.length-1),g=o.split(f),g.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=o.indexOf(f));if(g.length>=2&&h>c){let p=r[l-1].textContent;if(p&&typeof p=="string"){let d=Zt(p).length;m=o.indexOf(f,d)}m===-1&&(m=g[0].length)}if(m!==-1){let p=Math.floor(m/a);for(;p>0&&p<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;let d=Zt(s.substring(0,p),t);if(d.length===m){i.push(s.substring(0,p)),s=s.substring(p),o=o.substring(m);break}else d.length<m?p+=Math.max(1,Math.floor((m-d.length)/a)):p-=Math.max(1,Math.floor((d.length-m)*a))}break}}}}return i.push(s),i}function gc(s,e){return mc(s,e).join("/* rr_split */")}function ua(){return yc++}function Sc(s){if(s instanceof HTMLFormElement)return"form";let e=Te(s.tagName);return wc.test(e)?"div":e}function Cc(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,a=n.exec(e.substring(t));return a?(o=a[0],t+=o.length,o):""}let i=[];for(;r(vc),!(t>=e.length);){let n=r(bc);if(n.slice(-1)===",")n=Ke(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Ke(s,n);let a=!1;for(;;){let l=e.charAt(t);if(l===""){i.push((n+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((n+o).trim());break}else l==="("&&(a=!0);o+=l,t+=1}}}return i.join(", ")}function Ke(s,e){return!e||e.trim()===""?e:Ui(s,e)}function Ec(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ui(s,e){let t=Qn.get(s);if(t||(t=s.createElement("a"),Qn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ca(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Ke(s,r):t==="srcset"?Cc(s,r):t==="style"?Nr(r,Ui(s)):e==="object"&&t==="data"?Ke(s,r):r)}function ha(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function Ic(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function Ar(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Ar(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?Ar(ee.parentNode(s),e,t):!1}function fa(s,e,t,r){let i;if(Pi(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ar(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function xc(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Mc(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Nc(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:d=!1}=e,y=Ac(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:O.Document,childNodes:[],compatMode:s.compatMode}:{type:O.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:O.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Oc(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case s.TEXT_NODE:return Rc(s,{doc:t,needsMask:o,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:O.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:O.Comment,textContent:ee.textContent(s)||"",rootId:y};default:return!1}}function Ac(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function Rc(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=ee.parentNode(s),a=o&&o.tagName,l="",u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":n||(l=ee.textContent(s),u&&l&&(l=Nr(l,Ui(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:O.Text,textContent:l||"",rootId:i}}function Oc(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,m=Ic(s,r,i),p=Sc(s),d={},y=s.attributes.length;for(let w=0;w<y;w++){let v=s.attributes[w];ha(p,v.name,v.value)||(d[v.name]=ca(t,p,Te(v.name),v.value))}if(p==="link"&&n){let w=Array.from(t.styleSheets).find(x=>x.href===s.href),v=null;w&&(v=ks(w)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(p==="style"&&s.sheet){let w=ks(s.sheet);w&&(s.childNodes.length>1&&(w=gc(w,s)),d._cssText=w)}if(["input","textarea","select"].includes(p)){let w=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=xr({element:s,type:Mr(s),tagName:p,value:w,maskInputOptions:o,maskInputFn:a}):v&&(d.checked=v)}if(p==="option"&&(s.selected&&!o.select?d.selected=!0:delete d.selected),p==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&c){if(s.__context==="2d")lc(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){let w=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;let x=v.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(p==="img"&&u){He||(He=t.createElement("canvas"),qn=He.getContext("2d"));let w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,N=()=>{w.removeEventListener("load",N);try{He.width=w.naturalWidth,He.height=w.naturalHeight,qn.drawImage(w,0,0),d.rr_dataURL=He.toDataURL(l.type,l.quality)}catch(R){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${v}! Error: ${R}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N)}if(["audio","video"].includes(p)){let w=d;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),m){let{width:w,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${v}px`}}p==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let b;try{customElements.get(p)&&(b=!0)}catch{}return{type:O.Element,tagName:p,attributes:d,childNodes:[],isSVG:Ec(s)||void 0,needBlock:m,rootId:g,isCustom:b}}function V(s){return s==null?"":s.toLowerCase()}function da(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function Dc(s,e){if(e.comment&&s.type===O.Comment)return!0;if(s.type===O.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Fi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(V(s.attributes.name).match(/^msapplication-tile(image|color)$/)||V(s.attributes.name)==="application-name"||V(s.attributes.rel)==="icon"||V(s.attributes.rel)==="apple-touch-icon"||V(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&V(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(V(s.attributes.property).match(/^(og|twitter|fb):/)||V(s.attributes.name).match(/^(og|twitter):/)||V(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(V(s.attributes.name)==="robots"||V(s.attributes.name)==="googlebot"||V(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(V(s.attributes.name)==="author"||V(s.attributes.name)==="generator"||V(s.attributes.name)==="framework"||V(s.attributes.name)==="publisher"||V(s.attributes.name)==="progid"||V(s.attributes.property).match(/^article:/)||V(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(V(s.attributes.name)==="google-site-verification"||V(s.attributes.name)==="yandex-verification"||V(s.attributes.name)==="csrf-token"||V(s.attributes.name)==="p:domain_verify"||V(s.attributes.name)==="verify-v1"||V(s.attributes.name)==="verification"||V(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Je(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:R=!1,cssCaptured:A=!1}=e,{needsMask:P}=e,{preserveWhiteSpace:q=!0}=e;P||(P=fa(s,o,a,P===void 0));let se=Nc(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:p,recordCanvas:d,keepIframeSrcFn:N,newlyAddedElement:R,cssCaptured:A});if(!se)return console.warn(s,"not serialized"),null;let ie;r.hasNode(s)?ie=r.getId(s):Dc(se,g)||!q&&se.type===O.Text&&!se.textContent.replace(/^\s+|\s+$/gm,"").length?ie=xt:ie=ua();let T=Object.assign(se,{id:ie});if(r.add(s,T),ie===xt)return null;y&&y(s);let ke=!l;if(T.type===O.Element){ke=ke&&!T.needBlock,delete T.needBlock;let X=ee.shadowRoot(s);X&&vt(X)&&(T.isShadowHost=!0)}if((T.type===O.Document||T.type===O.Element)&&ke){g.headWhitespace&&T.type===O.Element&&T.tagName==="head"&&(q=!1);let X={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:q,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N,cssCaptured:!1};if(!(T.type===O.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===O.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(X.cssCaptured=!0);for(let ue of Array.from(ee.childNodes(s))){let ne=Je(ue,X);ne&&T.childNodes.push(ne)}}let U=null;if(Pi(s)&&(U=ee.shadowRoot(s)))for(let ue of Array.from(ee.childNodes(U))){let ne=Je(ue,X);ne&&(vt(U)&&(ne.isShadow=!0),T.childNodes.push(ne))}}let Le=ee.parentNode(s);return Le&&bt(Le)&&vt(Le)&&(T.isShadow=!0),T.type===O.Element&&T.tagName==="iframe"&&xc(s,()=>{let X=s.contentDocument;if(X&&b){let U=Je(X,{doc:X,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:q,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});U&&b(s,U)}},w),T.type===O.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&Fi(T.attributes.href)==="css")&&Mc(s,()=>{if(v){let X=Je(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:q,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});X&&v(s,X)}},x),T}function Tc(s,e){let{mirror:t=new It,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{},N=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,R=da(g);return Je(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:N,maskTextFn:h,maskInputFn:f,slimDOMOptions:R,dataURLOptions:m,inlineImages:l,recordCanvas:u,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}function $c(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Pc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}function Wc(s){return s[0].toUpperCase()+s.slice(1)}function Ps(s,e){new zc(e).stringify(s)}function Fs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Fs(o,t)):(n==="object"&&i!==null&&(i=Fs(i)),t[r]=i)}return t}function th(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}function Ra(s){return s.map(e=>(e.nodes&&(e.nodes=Ra(e.nodes)),delete e.source,e))}function Oa(s){if(s[Ea]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Oa(e)}function _h(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function Tr(s,e){let t=new Fh(s,e),r=new Ph(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
1
+ "use strict";var Segi=(()=>{var yu=Object.create;var jt=Object.defineProperty;var wu=Object.getOwnPropertyDescriptor;var bu=Object.getOwnPropertyNames;var Su=Object.getPrototypeOf,vu=Object.prototype.hasOwnProperty;var Cu=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var je=(s,e)=>()=>(s&&(e=s(s=0)),e);var Gt=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Ht=(s,e)=>{for(var t in e)jt(s,t,{get:e[t],enumerable:!0})},In=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bu(e))!vu.call(s,i)&&i!==t&&jt(s,i,{get:()=>e[i],enumerable:!(r=wu(e,i))||r.enumerable});return s};var Eu=(s,e,t)=>(t=s!=null?yu(Su(s)):{},In(e||!s||!s.__esModule?jt(t,"default",{value:s,enumerable:!0}):t,s)),Iu=s=>In(jt({},"__esModule",{value:!0}),s);var Nn=Gt(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.SEGI_DEFAULT_ADMIN_URL=le.SEGI_DEFAULT_CDN_URL=le.SEGI_DEFAULT_PM2_ENDPOINT=le.SEGI_DEFAULT_INGEST_ENDPOINT=le.SEGI_DEFAULT_API_BASE=void 0;le.SEGI_DEFAULT_API_BASE="https://segiapi.extn.ai";le.SEGI_DEFAULT_INGEST_ENDPOINT="https://segiapi.extn.ai/api/ingest/events";le.SEGI_DEFAULT_PM2_ENDPOINT="https://segiapi.extn.ai/api/ingest/pm2";le.SEGI_DEFAULT_CDN_URL="https://cdn.extn.ai/segi/segi.min.js";le.SEGI_DEFAULT_ADMIN_URL="https://segi.extn.ai"});var On=Gt(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.scrubHeaders=Rn;dt.scrubObject=Fe;dt.scrubEvent=Au;var xu=new Set(["authorization","cookie","set-cookie","x-api-key","proxy-authorization"]),Mu=[/^password$/i,/^passwd$/i,/token/i,/secret/i,/api[-_]?key/i,/^authorization$/i,/card[-_]?number/i,/^rrn$/i,/^residentnumber$/i],An="[Filtered]";function Rn(s){if(!s)return s;let e={};for(let[t,r]of Object.entries(s))xu.has(t.toLowerCase())?e[t]=An:e[t]=r;return e}function Nu(s){return Mu.some(e=>e.test(s))}function Fe(s,e=0){if(e>8||s==null)return s;if(Array.isArray(s))return s.map(t=>Fe(t,e+1));if(typeof s=="object"){let t={};for(let[r,i]of Object.entries(s))Nu(r)?t[r]=An:t[r]=Fe(i,e+1);return t}return s}function Au(s){let e=JSON.parse(JSON.stringify(s));return e.request&&(e.request.headers=Rn(e.request.headers),e.request.body=Fe(e.request.body),e.request.query=Fe(e.request.query)),e.extra&&(e.extra=Fe(e.extra)),e.tags&&(e.tags=Fe(e.tags)),e}});var Dn=Gt(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.generateFingerprint=Du;var Ru=Cu("crypto");function hs(s){return s?s.replace(/0x[0-9a-fA-F]+/g,"0xX").replace(/\b\d{4,}\b/g,"N").replace(/[\r\n]+/g," ").trim().slice(0,500):""}function Ou(s){if(!s)return"";let e=s.split(`
2
+ `).map(r=>r.trim()).filter(Boolean),t=e.find(r=>r.startsWith("at "))??e[1]??"";return hs(t)}function Du(s){let e=[String(s.projectId),hs(s.errorName??""),hs(s.message??""),Ou(s.stack??"")];return(0,Ru.createHash)("sha256").update(e.join("|")).digest("hex")}});var Tn=Gt(we=>{"use strict";var Tu=we&&we.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),ds=we&&we.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Tu(e,s,t)};Object.defineProperty(we,"__esModule",{value:!0});ds(Nn(),we);ds(On(),we);ds(Dn(),we)});function Ln(s){return s<640?"mobile":s<1024?"tablet":"desktop"}function ku(s,e){let t=s;for(;t;){if(t.classList?.contains(e))return!0;t=t.parentElement}return!1}function Lu(s){try{if(s.id)return`#${s.id}`;let e=s.tagName?.toLowerCase();if(!e)return;let t=(s.className&&typeof s.className=="string"?s.className.split(/\s+/).filter(Boolean).slice(0,2):[]).map(r=>`.${r}`);return`${e}${t.join("")}`.slice(0,512)}catch{return}}function Pn(s){let e=s.options.mask?.class??"segi-mask",t=!1,r=[],i=-1,n=0,o=(h={})=>{if(r.length===0)return;let f=r.splice(0,r.length);s.sendClicks(f,!!h.useBeacon)},a=setInterval(()=>{t||o()},5e3),l=h=>{if(!t)try{let f=h.target;if(!f||ku(f,e))return;let g=Math.max(document.documentElement.scrollWidth,document.body?.scrollWidth??0,1),m=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0,1),p=h.pageX,d=h.pageY,y=window.innerWidth,S={sessionUid:s.sessionUid,ts:new Date().toISOString(),urlPath:location.pathname.slice(0,255),device:Ln(y),viewportW:y,viewportH:window.innerHeight,x:Math.round(h.clientX),y:Math.round(h.clientY),pageX:Math.round(p),pageY:Math.round(d),relX:Math.max(0,Math.min(1,p/g)),relY:Math.max(0,Math.min(1,d/m)),selector:Lu(f),tag:f.tagName?.toLowerCase().slice(0,32),text:(f.textContent??void 0)?.trim().slice(0,128)||void 0};r.push(S),r.length>=50&&o()}catch{}},u=()=>{if(t)return;let h=Date.now();if(!(h-n<1e3))try{let f=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0,1),g=window.innerHeight,m=Math.round(window.scrollY+g),p=Math.max(0,Math.min(100,Math.round(m/f*100)));if(p<=i)return;i=p,n=h;let d=window.innerWidth;s.sendScroll({sessionUid:s.sessionUid,urlPath:location.pathname.slice(0,255),device:Ln(d),viewportH:g,docH:f,maxScrollY:m,maxScrollPct:p},!1)}catch{}},c=()=>{o({useBeacon:!0})};return window.addEventListener("click",l,!0),window.addEventListener("scroll",u,{capture:!0,passive:!0}),window.addEventListener("pagehide",c),{pause(){t=!0},resume(){t=!1},stop(){clearInterval(a),window.removeEventListener("click",l,!0),window.removeEventListener("scroll",u,!0),window.removeEventListener("pagehide",c),o({useBeacon:!0})},flushClicks:o}}var $n=je(()=>{"use strict"});function Yt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let e=Math.random()*16|0;return(s==="x"?e:e&3|8).toString(16)})}function Wn(){try{if(typeof sessionStorage>"u")return null;let s=sessionStorage.getItem(Un),e=Number(sessionStorage.getItem(Bn)??"0");return!s||!e?null:{uid:s,at:e}}catch{return null}}function gs(s,e){try{if(typeof sessionStorage>"u")return;sessionStorage.setItem(Un,s),sessionStorage.setItem(Bn,String(e))}catch{}}function zn(){let s=Date.now(),e=Wn();if(e&&s-e.at<18e5)return gs(e.uid,s),e.uid;let t=Yt();return gs(t,s),Pu=t,t}function Vn(){let s=Wn();s&&gs(s.uid,Date.now())}function ys(){try{if(typeof localStorage>"u")return Ge||(Ge=Yt()),Ge;let s=localStorage.getItem(Fn);if(s)return s;let e=Yt();return localStorage.setItem(Fn,e),e}catch{return Ge||(Ge=Yt()),Ge}}var Un,Bn,Fn,Pu,Ge,jn=je(()=>{"use strict";Un="_bd_session_uid",Bn="_bd_session_at",Fn="_bd_anon",Pu=null,Ge=null});function Gn(s){return(s&&s.trim()||$u).replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"")}async function Ne(s,e,t){let r=`${Gn(s.endpoint)}/api/trace${e}`;try{return await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-Segi-Project-Key":s.projectKey},body:JSON.stringify(t)})}catch{return null}}function ws(s,e,t){try{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;let r=`${Gn(s.endpoint)}/api/trace${e}?pk=${encodeURIComponent(s.projectKey)}`,i=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(r,i)}catch{return!1}}var $u,Hn=je(()=>{"use strict";$u="https://segiapi.extn.ai"});var ou={};Ht(ou,{EventType:()=>I,IncrementalSource:()=>E,MouseInteractions:()=>k,Replayer:()=>Li,ReplayerEvents:()=>_,addCustomEvent:()=>Ym,canvasMutation:()=>_i,freezePage:()=>Xm,mirror:()=>Vr,record:()=>_e,takeFullSnapshot:()=>Zm,utils:()=>am});function Pi(s){if(Xt[s])return Xt[s];let e=globalThis[s],t=e.prototype,r=s in Zn?Zn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in Kn?Kn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!zu())return Xt[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?Xt[s]=u:t}catch{return t}}function Ie(s,e,t){var r;let i=`${s}.${String(t)}`;if(bs[i])return bs[i].call(e);let n=Pi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(bs[i]=o,o.call(e)):e[t]}function oa(s,e,t){let r=`${s}.${String(t)}`;if(Ss[r])return Ss[r].bind(e);let n=Pi(s)[t];return typeof n!="function"?e[t]:(Ss[r]=n,n.bind(e))}function Vu(s){return Ie("Node",s,"ownerDocument")}function ju(s){return Ie("Node",s,"childNodes")}function Gu(s){return Ie("Node",s,"parentNode")}function Hu(s){return Ie("Node",s,"parentElement")}function Yu(s){return Ie("Node",s,"textContent")}function Xu(s,e){return oa("Node",s,"contains")(e)}function Zu(s){return oa("Node",s,"getRootNode")()}function Ku(s){return!s||!("host"in s)?null:Ie("ShadowRoot",s,"host")}function Ju(s){return s.styleSheets}function qu(s){return!s||!("shadowRoot"in s)?null:Ie("Element",s,"shadowRoot")}function Qu(s,e){return Ie("Element",s,"querySelector")(e)}function ec(s,e){return Ie("Element",s,"querySelectorAll")(e)}function tc(){return Pi("MutationObserver").constructor}function rc(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function $i(s){return s.nodeType===s.ELEMENT_NODE}function St(s){let e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function vt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function sc(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ic(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function ks(s){try{let e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);let r=Array.from(e,i=>aa(i,t)).join("");return sc(r)}catch{return null}}function aa(s,e){if(oc(s)){let t;try{t=ks(s.styleSheet)||ic(s)}catch{t=s.cssText}return s.styleSheet.href?Nr(t,s.styleSheet.href):t}else{let t=s.cssText;return ac(s)&&s.selectorText.includes(":")&&(t=nc(t)),e?Nr(t,e):t}}function nc(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function oc(s){return"styleSheet"in s}function ac(s){return"selectorText"in s}function la(){return new It}function xr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",a=r&&Te(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Te(s){return s.toLowerCase()}function lc(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=Jn in n?n[Jn]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function uc(s,e){return!s||!e||s.type!==e.type?!1:s.type===A.Document?s.compatMode===e.compatMode:s.type===A.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===A.Comment||s.type===A.Text||s.type===A.CDATA?s.textContent===e.textContent:s.type===A.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Mr(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Te(e):null}function Fi(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function cc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}function Nr(s,e){return(s||"").replace(hc,(t,r,i,n,o,a)=>{let l=i||o||a,u=r||n||"";if(!l)return t;if(fc.test(l)||dc.test(l))return`url(${u}${l}${u})`;if(pc.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${cc(e)+l}${u})`;let c=e.split("/"),h=l.split("/");c.pop();for(let f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Zt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function mc(s,e,t=!1){let r=Array.from(e.childNodes),i=[],n=0;if(r.length>1&&s&&typeof s=="string"){let o=Zt(s,t),a=o.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){let u=Zt(r[l].textContent,t),c=100,h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),g=o.split(f),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[l-1].textContent!=="")m=o.indexOf(f,1);else if(g.length===1){if(f=f.substring(0,f.length-1),g=o.split(f),g.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=o.indexOf(f));if(g.length>=2&&h>c){let p=r[l-1].textContent;if(p&&typeof p=="string"){let d=Zt(p).length;m=o.indexOf(f,d)}m===-1&&(m=g[0].length)}if(m!==-1){let p=Math.floor(m/a);for(;p>0&&p<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;let d=Zt(s.substring(0,p),t);if(d.length===m){i.push(s.substring(0,p)),s=s.substring(p),o=o.substring(m);break}else d.length<m?p+=Math.max(1,Math.floor((m-d.length)/a)):p-=Math.max(1,Math.floor((d.length-m)*a))}break}}}}return i.push(s),i}function gc(s,e){return mc(s,e).join("/* rr_split */")}function ua(){return yc++}function bc(s){if(s instanceof HTMLFormElement)return"form";let e=Te(s.tagName);return wc.test(e)?"div":e}function Cc(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,a=n.exec(e.substring(t));return a?(o=a[0],t+=o.length,o):""}let i=[];for(;r(vc),!(t>=e.length);){let n=r(Sc);if(n.slice(-1)===",")n=Ke(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Ke(s,n);let a=!1;for(;;){let l=e.charAt(t);if(l===""){i.push((n+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((n+o).trim());break}else l==="("&&(a=!0);o+=l,t+=1}}}return i.join(", ")}function Ke(s,e){return!e||e.trim()===""?e:Ui(s,e)}function Ec(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ui(s,e){let t=Qn.get(s);if(t||(t=s.createElement("a"),Qn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ca(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Ke(s,r):t==="srcset"?Cc(s,r):t==="style"?Nr(r,Ui(s)):e==="object"&&t==="data"?Ke(s,r):r)}function ha(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function Ic(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function Ar(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Ar(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?Ar(ee.parentNode(s),e,t):!1}function fa(s,e,t,r){let i;if($i(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ar(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function xc(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Mc(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Nc(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:d=!1}=e,y=Ac(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:A.Document,childNodes:[],compatMode:s.compatMode}:{type:A.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:A.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Oc(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case s.TEXT_NODE:return Rc(s,{doc:t,needsMask:o,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:A.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:A.Comment,textContent:ee.textContent(s)||"",rootId:y};default:return!1}}function Ac(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function Rc(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=ee.parentNode(s),a=o&&o.tagName,l="",u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":n||(l=ee.textContent(s),u&&l&&(l=Nr(l,Ui(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:A.Text,textContent:l||"",rootId:i}}function Oc(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,m=Ic(s,r,i),p=bc(s),d={},y=s.attributes.length;for(let w=0;w<y;w++){let v=s.attributes[w];ha(p,v.name,v.value)||(d[v.name]=ca(t,p,Te(v.name),v.value))}if(p==="link"&&n){let w=Array.from(t.styleSheets).find(x=>x.href===s.href),v=null;w&&(v=ks(w)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(p==="style"&&s.sheet){let w=ks(s.sheet);w&&(s.childNodes.length>1&&(w=gc(w,s)),d._cssText=w)}if(["input","textarea","select"].includes(p)){let w=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=xr({element:s,type:Mr(s),tagName:p,value:w,maskInputOptions:o,maskInputFn:a}):v&&(d.checked=v)}if(p==="option"&&(s.selected&&!o.select?d.selected=!0:delete d.selected),p==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&c){if(s.__context==="2d")lc(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){let w=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;let x=v.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(p==="img"&&u){He||(He=t.createElement("canvas"),qn=He.getContext("2d"));let w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,N=()=>{w.removeEventListener("load",N);try{He.width=w.naturalWidth,He.height=w.naturalHeight,qn.drawImage(w,0,0),d.rr_dataURL=He.toDataURL(l.type,l.quality)}catch(W){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${v}! Error: ${W}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?N():w.addEventListener("load",N)}if(["audio","video"].includes(p)){let w=d;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),m){let{width:w,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${v}px`}}p==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(p)&&(S=!0)}catch{}return{type:A.Element,tagName:p,attributes:d,childNodes:[],isSVG:Ec(s)||void 0,needBlock:m,rootId:g,isCustom:S}}function z(s){return s==null?"":s.toLowerCase()}function da(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function Dc(s,e){if(e.comment&&s.type===A.Comment)return!0;if(s.type===A.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Fi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(z(s.attributes.name).match(/^msapplication-tile(image|color)$/)||z(s.attributes.name)==="application-name"||z(s.attributes.rel)==="icon"||z(s.attributes.rel)==="apple-touch-icon"||z(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&z(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(z(s.attributes.property).match(/^(og|twitter|fb):/)||z(s.attributes.name).match(/^(og|twitter):/)||z(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(z(s.attributes.name)==="robots"||z(s.attributes.name)==="googlebot"||z(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(z(s.attributes.name)==="author"||z(s.attributes.name)==="generator"||z(s.attributes.name)==="framework"||z(s.attributes.name)==="publisher"||z(s.attributes.name)==="progid"||z(s.attributes.property).match(/^article:/)||z(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(z(s.attributes.name)==="google-site-verification"||z(s.attributes.name)==="yandex-verification"||z(s.attributes.name)==="csrf-token"||z(s.attributes.name)==="p:domain_verify"||z(s.attributes.name)==="verify-v1"||z(s.attributes.name)==="verification"||z(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Je(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:W=!1,cssCaptured:U=!1}=e,{needsMask:Y}=e,{preserveWhiteSpace:Q=!0}=e;Y||(Y=fa(s,o,a,Y===void 0));let se=Nc(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:p,recordCanvas:d,keepIframeSrcFn:N,newlyAddedElement:W,cssCaptured:U});if(!se)return console.warn(s,"not serialized"),null;let ie;r.hasNode(s)?ie=r.getId(s):Dc(se,g)||!Q&&se.type===A.Text&&!se.textContent.replace(/^\s+|\s+$/gm,"").length?ie=xt:ie=ua();let O=Object.assign(se,{id:ie});if(r.add(s,O),ie===xt)return null;y&&y(s);let ke=!l;if(O.type===A.Element){ke=ke&&!O.needBlock,delete O.needBlock;let X=ee.shadowRoot(s);X&&vt(X)&&(O.isShadowHost=!0)}if((O.type===A.Document||O.type===A.Element)&&ke){g.headWhitespace&&O.type===A.Element&&O.tagName==="head"&&(Q=!1);let X={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N,cssCaptured:!1};if(!(O.type===A.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===A.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(X.cssCaptured=!0);for(let ue of Array.from(ee.childNodes(s))){let ne=Je(ue,X);ne&&O.childNodes.push(ne)}}let P=null;if($i(s)&&(P=ee.shadowRoot(s)))for(let ue of Array.from(ee.childNodes(P))){let ne=Je(ue,X);ne&&(vt(P)&&(ne.isShadow=!0),O.childNodes.push(ne))}}let Le=ee.parentNode(s);return Le&&St(Le)&&vt(Le)&&(O.isShadow=!0),O.type===A.Element&&O.tagName==="iframe"&&xc(s,()=>{let X=s.contentDocument;if(X&&S){let P=Je(X,{doc:X,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});P&&S(s,P)}},w),O.type===A.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Fi(O.attributes.href)==="css")&&Mc(s,()=>{if(v){let X=Je(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});X&&v(s,X)}},x),O}function Tc(s,e){let{mirror:t=new It,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{},N=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,W=da(g);return Je(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:N,maskTextFn:h,maskInputFn:f,slimDOMOptions:W,dataURLOptions:m,inlineImages:l,recordCanvas:u,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}function Pc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function $c(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}function Wc(s){return s[0].toUpperCase()+s.slice(1)}function $s(s,e){new zc(e).stringify(s)}function Fs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Fs(o,t)):(n==="object"&&i!==null&&(i=Fs(i)),t[r]=i)}return t}function th(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}function Ra(s){return s.map(e=>(e.nodes&&(e.nodes=Ra(e.nodes)),delete e.source,e))}function Oa(s){if(s[Ea]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Oa(e)}function _h(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function Tr(s,e){let t=new Fh(s,e),r=new $h(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
3
3
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
4
4
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
5
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function mt(s){return typeof s=="object"&&typeof s.then=="function"}function za(s){let e=!1,t=Yh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,st,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,st,t+"Exit"]:[t,t+"Exit"]}function wo(s){let e;return s.type==="document"?e=["Document",st,"DocumentExit"]:s.type==="root"?e=["Root",st,"RootExit"]:e=za(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ys(s){return s[me]=!1,s.nodes&&s.nodes.forEach(e=>Ys(e)),s}function Rt(s,e){if(Array.isArray(s))return s.map(i=>Rt(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:ff.prototype};n.map&&(n.map={...n.map,__proto__:uf.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>Rt(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new df(r);if(r.type==="decl")return new lf(r);if(r.type==="rule")return new pf(r);if(r.type==="comment")return new cf(r);if(r.type==="atrule")return new hf(r);throw new Error("Unknown node type: "+s.type)}function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zi(s)}function Af(s){let e=So[s.tagName]?So[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function es(s,e){let t=e?.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=H([kc,Lc]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e?.stylesWithHoverClass.set(s,r),r}function bo(){return{stylesWithHoverClass:new Map}}function Rf(s,e,t,r){let i=[];for(let l of s.childNodes)l.type===O.Text&&i.push(l);let n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=es(n.join(""),r));let a=0;for(let l=0;l<i.length&&l!==n.length;l++){let u=i[l];if(!t)u.textContent=n[l];else if(l<n.length-1){let c=a,h=n[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){let g=n[l+1].substring(0,h),m=o.substring(a).indexOf(g);if(f=m!==-1,f){c+=m;break}}f||(c+=n[l].length),u.textContent=o.substring(a,c),a=c}else u.textContent=o.substring(a)}}function Of(s,e,t,r){let{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?Rf(s,t,n,o):(n&&(t=es(t,o)),e.appendChild(i.createTextNode(t)))}function Df(s,e){var t;let{doc:r,hackCss:i,cache:n}=e;switch(s.type){case O.Document:return r.implementation.createDocument(null,"",null);case O.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case O.Element:{let o=Af(s),a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",o):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(o));let l={};for(let u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){Of(s,a,c,e);continue}else if(o==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Fi(s.attributes.href)==="js"||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch{}}}for(let u in l){let c=l[u];if(o==="canvas"&&u==="rr_dataURL"){let h=r.createElement("img");h.onload=()=>{let f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){let h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case O.Text:return s.isStyle&&i?r.createTextNode(es(s.textContent,n)):r.createTextNode(s.textContent);case O.CDATA:return r.createCDATASection(s.textContent);case O.Comment:return r.createComment(s.textContent);default:return null}}function Ct(s,e){let{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(r.has(s.id)){let u=r.getNode(s.id),c=r.getMeta(u);if(uc(c,s))return r.getNode(s.id)}let l=Df(s,{doc:t,hackCss:n,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===O.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==O.DocumentType&&(s.childNodes[0].type===O.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===O.Document||s.type===O.Element)&&!i)for(let u of s.childNodes){let c=Ct(u,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Pi(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===O.Document&&u.type==O.Element){let h=c,f=null;h.childNodes.forEach(g=>{g.nodeName==="BODY"&&(f=g)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function Tf(s,e){function t(r){e(r)}for(let r of s.getIds())s.has(r)&&t(s.getNode(r))}function _f(s,e){let t=e.getMeta(s);if(t?.type!==O.Element)return;let r=s;for(let i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;let n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function kf(s,e){let{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:a=new It}=e,l=Ct(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Tf(a,u=>{r&&r(u),_f(u,a)}),l}function Bf(){return new Uf}function Wf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function zf(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}function Hf(s){return s[0].toUpperCase()+s.slice(1)}function qs(s,e){new Yf(e).stringify(s)}function Qs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Qs(o,t)):(n==="object"&&i!==null&&(i=Qs(i)),t[r]=i)}return t}function od(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}function fl(s){return s.map(e=>(e.nodes&&(e.nodes=fl(e.nodes)),delete e.source,e))}function dl(s){if(s[ol]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)dl(e)}function Fd(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function $r(s,e){let t=new Vd(s,e),r=new zd(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
5
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function mt(s){return typeof s=="object"&&typeof s.then=="function"}function za(s){let e=!1,t=Yh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,st,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,st,t+"Exit"]:[t,t+"Exit"]}function wo(s){let e;return s.type==="document"?e=["Document",st,"DocumentExit"]:s.type==="root"?e=["Root",st,"RootExit"]:e=za(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ys(s){return s[me]=!1,s.nodes&&s.nodes.forEach(e=>Ys(e)),s}function Rt(s,e){if(Array.isArray(s))return s.map(i=>Rt(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:ff.prototype};n.map&&(n.map={...n.map,__proto__:uf.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>Rt(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new df(r);if(r.type==="decl")return new lf(r);if(r.type==="rule")return new pf(r);if(r.type==="comment")return new cf(r);if(r.type==="atrule")return new hf(r);throw new Error("Unknown node type: "+s.type)}function $(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zi(s)}function Af(s){let e=bo[s.tagName]?bo[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function es(s,e){let t=e?.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=G([kc,Lc]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e?.stylesWithHoverClass.set(s,r),r}function So(){return{stylesWithHoverClass:new Map}}function Rf(s,e,t,r){let i=[];for(let l of s.childNodes)l.type===A.Text&&i.push(l);let n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=es(n.join(""),r));let a=0;for(let l=0;l<i.length&&l!==n.length;l++){let u=i[l];if(!t)u.textContent=n[l];else if(l<n.length-1){let c=a,h=n[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){let g=n[l+1].substring(0,h),m=o.substring(a).indexOf(g);if(f=m!==-1,f){c+=m;break}}f||(c+=n[l].length),u.textContent=o.substring(a,c),a=c}else u.textContent=o.substring(a)}}function Of(s,e,t,r){let{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?Rf(s,t,n,o):(n&&(t=es(t,o)),e.appendChild(i.createTextNode(t)))}function Df(s,e){var t;let{doc:r,hackCss:i,cache:n}=e;switch(s.type){case A.Document:return r.implementation.createDocument(null,"",null);case A.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case A.Element:{let o=Af(s),a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",o):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(o));let l={};for(let u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){Of(s,a,c,e);continue}else if(o==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Fi(s.attributes.href)==="js"||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch{}}}for(let u in l){let c=l[u];if(o==="canvas"&&u==="rr_dataURL"){let h=r.createElement("img");h.onload=()=>{let f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){let h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case A.Text:return s.isStyle&&i?r.createTextNode(es(s.textContent,n)):r.createTextNode(s.textContent);case A.CDATA:return r.createCDATASection(s.textContent);case A.Comment:return r.createComment(s.textContent);default:return null}}function Ct(s,e){let{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(r.has(s.id)){let u=r.getNode(s.id),c=r.getMeta(u);if(uc(c,s))return r.getNode(s.id)}let l=Df(s,{doc:t,hackCss:n,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===A.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==A.DocumentType&&(s.childNodes[0].type===A.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===A.Document||s.type===A.Element)&&!i)for(let u of s.childNodes){let c=Ct(u,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&$i(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===A.Document&&u.type==A.Element){let h=c,f=null;h.childNodes.forEach(g=>{g.nodeName==="BODY"&&(f=g)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function Tf(s,e){function t(r){e(r)}for(let r of s.getIds())s.has(r)&&t(s.getNode(r))}function _f(s,e){let t=e.getMeta(s);if(t?.type!==A.Element)return;let r=s;for(let i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;let n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function kf(s,e){let{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:a=new It}=e,l=Ct(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Tf(a,u=>{r&&r(u),_f(u,a)}),l}function Bf(){return new Uf}function Wf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function zf(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}function Hf(s){return s[0].toUpperCase()+s.slice(1)}function qs(s,e){new Yf(e).stringify(s)}function Qs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Qs(o,t)):(n==="object"&&i!==null&&(i=Qs(i)),t[r]=i)}return t}function od(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}function fl(s){return s.map(e=>(e.nodes&&(e.nodes=fl(e.nodes)),delete e.source,e))}function dl(s){if(s[ol]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)dl(e)}function Fd(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function Pr(s,e){let t=new Vd(s,e),r=new zd(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
6
6
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
7
7
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
8
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function yt(s){return typeof s=="object"&&typeof s.then=="function"}function xl(s){let e=!1,t=qd[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ot,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ot,t+"Exit"]:[t,t+"Exit"]}function Fo(s){let e;return s.type==="document"?e=["Document",ot,"DocumentExit"]:s.type==="root"?e=["Root",ot,"RootExit"]:e=xl(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function li(s){return s[ge]=!1,s.nodes&&s.nodes.forEach(e=>li(e)),s}function _t(s,e){if(Array.isArray(s))return s.map(i=>_t(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:gp.prototype};n.map&&(n.map={...n.map,__proto__:dp.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>_t(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new yp(r);if(r.type==="decl")return new fp(r);if(r.type==="rule")return new wp(r);if(r.type==="comment")return new pp(r);if(r.type==="atrule")return new mp(r);throw new Error("Unknown node type: "+s.type)}function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new on(s)}function Tp(s){let e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){let o=n.split(r);o.length>1&&(e[hi(o[0].trim())]=o[1].trim())}}),e}function Uo(s){let e=[];for(let t in s){let r=s[t];if(typeof r!="string")continue;let i=$p(t);e.push(`${i}: ${r};`)}return e.join(" ")}function an(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function kl(s,e,t){if(!t)return an(s,e);if(t.parentNode!==s)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 e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function Ll(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}function Wr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Fp(s,e,t,r),$l(s,e,t,r),Up(s,e,t)}function Fp(s,e,t,r){var i;if(t.afterAppend&&!ye&&(ye=new WeakSet,setTimeout(()=>{ye=null},0)),!ln(s,e)){let n=zr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case _.Document:{if(!Ye(s,e,t.mirror,r)){let n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),ye?.add(s))}break}case _.Element:{let n=s,o=e;switch(o.tagName){case"IFRAME":{let a=s.contentDocument;if(!a)break;Wr(a,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),$l(n.shadowRoot,o.shadowRoot,t,r)),Bp(n,o,r);break}}return s}function Up(s,e,t){var r;switch(e.RRNodeType){case _.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case _.Element:{let i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{let o=s,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{let o=e;if(o.rr_dataURL!==null){let a=document.createElement("img");a.onload=()=>{let l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{let o=i.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{let o=i,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,g=l!==c;if((f||l&&g)&&o.close(),c&&(g||f))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case _.Text:case _.Comment:case _.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ye?.has(s)&&(ye.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Bp(s,e,t){let r=s.attributes,i=e.attributes;for(let n in i){let o=i[n],a=t.getMeta(e);if(a?.isSVG&&gi[n])s.setAttributeNS(gi[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){let l=document.createElement("img");l.src=o,l.onload=()=>{let u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(l){console.warn(l)}}}for(let{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function $l(s,e,t,r){let i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,a=i.length-1,l=0,u=n.length-1,c=i[o],h=i[a],f=n[l],g=n[u],m,p;for(;o<=a&&l<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--a];else if(Ye(c,f,t.mirror,r))c=i[++o],f=n[++l];else if(Ye(h,g,t.mirror,r))h=i[--a],g=n[--u];else if(Ye(c,g,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(b){console.warn(b)}c=i[++o],g=n[--u]}else if(Ye(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(b){console.warn(b)}h=i[--a],f=n[++l]}else{if(!m){m={};for(let w=o;w<=a;w++){let v=i[w];v&&t.mirror.hasNode(v)&&(m[t.mirror.getId(v)]=w)}}p=m[r.getId(f)];let b=i[p];if(p!==void 0&&b&&Ye(b,f,t.mirror,r)){try{s.insertBefore(b,c)}catch(w){console.warn(w)}i[p]=void 0}else{let w=zr(f,t.mirror,r);s.nodeName==="#document"&&c&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++o]);try{s.insertBefore(w,c||null)}catch(v){console.warn(v)}}f=n[++l]}if(o>a){let b=n[u+1],w=null;for(b&&(w=t.mirror.getNode(r.getId(b)));l<=u;++l){let v=zr(n[l],t.mirror,r);try{s.insertBefore(v,w)}catch(x){console.warn(x)}}}else if(l>u)for(;o<=a;o++){let b=i[o];if(!(!b||b.parentNode!==s))try{s.removeChild(b),t.mirror.removeNodeFromMap(b)}catch(w){console.warn(w)}}let d=s.firstChild,y=e.firstChild;for(;d!==null&&y!==null;)Wr(d,y,t,r),d=d.nextSibling,y=y.nextSibling}function zr(s,e,t){let r=t.getId(s),i=t.getMeta(s),n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&ln(n,s))return n;switch(s.RRNodeType){case _.Document:n=new Document;break;case _.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case _.Element:{let o=s.tagName.toLowerCase();o=Pp[o]||o,i&&"isSVG"in i&&i?.isSVG?n=document.createElementNS(gi.svg,o):n=document.createElement(s.tagName);break}case _.Text:n=document.createTextNode(s.data);break;case _.Comment:n=document.createComment(s.data);break;case _.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,{...i});try{ye?.add(n)}catch{}return n}function ln(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ye(s,e,t,r){let i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:ln(s,e)}function Gp(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function Pl(s,e,t,r){let i;switch(s.nodeType){case ae.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ae.DOCUMENT_TYPE_NODE:{let o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ae.ELEMENT_NODE:{let o=s,a=Gp(o);i=e.createElement(a);let l=i;for(let{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case ae.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ae.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ae.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ae.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof ut&&(n||(n=Fl(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,{...n})),i}function Hp(s,e=Bf(),t=new ut){function r(i,n){let o=Pl(i,t,e,n);if(o!==null)if(n?.nodeName!=="IFRAME"&&i.nodeType!==ae.DOCUMENT_FRAGMENT_NODE&&(n?.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){let a=i.contentDocument;a&&r(a,o)}else(i.nodeType===ae.DOCUMENT_NODE||i.nodeType===ae.ELEMENT_NODE||i.nodeType===ae.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ae.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(s,null),t}function Yp(){return new Ci}function Fl(s,e){switch(s.RRNodeType){case _.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case _.DocumentType:{let t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case _.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case _.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}function un(s){if(pr[s])return pr[s];let e=globalThis[s],t=e.prototype,r=s in Bo?Bo[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in Wo?Wo[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Xp())return pr[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?pr[s]=u:t}catch{return t}}function xe(s,e,t){var r;let i=`${s}.${String(t)}`;if(Rs[i])return Rs[i].call(e);let n=un(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Rs[i]=o,o.call(e)):e[t]}function Ul(s,e,t){let r=`${s}.${String(t)}`;if(Os[r])return Os[r].bind(e);let n=un(s)[t];return typeof n!="function"?e[t]:(Os[r]=n,n.bind(e))}function Zp(s){return xe("Node",s,"ownerDocument")}function Kp(s){return xe("Node",s,"childNodes")}function Jp(s){return xe("Node",s,"parentNode")}function qp(s){return xe("Node",s,"parentElement")}function Qp(s){return xe("Node",s,"textContent")}function em(s,e){return Ul("Node",s,"contains")(e)}function tm(s){return Ul("Node",s,"getRootNode")()}function rm(s){return!s||!("host"in s)?null:xe("ShadowRoot",s,"host")}function sm(s){return s.styleSheets}function im(s){return!s||!("shadowRoot"in s)?null:xe("Element",s,"shadowRoot")}function nm(s,e){return xe("Element",s,"querySelector")(e)}function om(s,e){return xe("Element",s,"querySelectorAll")(e)}function Bl(){return un("MutationObserver").constructor}function ze(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function te(s,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}function ht(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===!1&&(i=o);let a=e-(o-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(l,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,n)},a))}}function Bt(s,e,t,r,i=window){let n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Bt(s,e,n||{},!0)}function cn(s){var e,t,r,i;let n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=D.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=D.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function hn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function fn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function dn(s){return s?s.nodeType===s.ELEMENT_NODE?s:D.parentElement(s):null}function re(s,e,t,r){if(!s)return!1;let i=dn(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Ar(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Wl(s,e){return e.getId(s)!==-1}function Cr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===xt}function pn(s,e){if(bt(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=D.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?pn(r,e):!0}function jr(s){return!!s.changedTouches}function mn(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function zl(s){let e={},t=(i,n)=>{let o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(let i of s){let{nextId:n,parentId:o}=i;if(n&&n in e){let a=e[n];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(o in e){let a=e[o];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function gn(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)gn(s.children[t],e)}function tt(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function yn(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function wn(s,e){var t,r;let i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let n=i.getBoundingClientRect(),o=wn(i,e),a=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Oe(s){return s?s instanceof fe&&"shadowRoot"in s?!!s.shadowRoot:!!D.shadowRoot(s):!1}function qe(s,e){let t=s[e[0]];return e.length===1?t:qe(t.cssRules[e[1]].cssRules,e.slice(2))}function Ei(s){let e=[...s],t=e.pop();return{positions:e,index:t}}function Vl(s){let e=new Set,t=[];for(let r=s.length;r--;){let i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}function Sn(s){var e;let t=null;return"getRootNode"in s&&((e=D.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&D.host(D.getRootNode(s))&&(t=D.host(D.getRootNode(s))),t}function jl(s){let e=s,t;for(;t=Sn(e);)e=t;return e}function Gl(s){let e=D.ownerDocument(s);if(!e)return!1;let t=jl(s);return D.contains(e,t)}function bn(s){let e=D.ownerDocument(s);return e?D.contains(e,s)||Gl(s):!1}function zo(s){return"__ln"in s}function Mi(s,e){s.delete(e),D.childNodes(e).forEach(t=>Mi(s,t))}function lm(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),D.childNodes(r).forEach(i=>t.push(i)))}}function jo(s,e,t){return s.size===0?!1:um(s,e)}function um(s,e,t){let r=D.parentNode(e);return r?s.has(r):!1}function Go(s,e){return s.size===0?!1:Hl(s,e)}function Hl(s,e){let t=D.parentNode(e);return t?s.has(t)?!0:Hl(s,t):!1}function cm(s){Et=s}function hm(){Et=void 0}function Wt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function Yl(s,e){let t=new xi;Ue.push(t),t.init(s);let r=new(Bl())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function fm({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],a,l=ht(k(h=>{let f=Date.now()-a;s(o.map(g=>(g.timeOffset-=f,g)),h),o=[],a=null}),n),u=k(ht(k(h=>{let f=Wt(h),{clientX:g,clientY:m}=jr(h)?h.changedTouches[0]:h;a||(a=kt()),o.push({x:g,y:m,id:r.getId(f),timeOffset:kt()-a}),l(typeof DragEvent<"u"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[te("mousemove",u,t),te("touchmove",u,t),te("drag",u,t)];return k(()=>{c.forEach(h=>h())})}function dm({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[],l=null,u=c=>h=>{let f=Wt(h);if(re(f,r,i,!0))return;let g=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":g=Se.Mouse;break;case"touch":g=Se.Touch;break;case"pen":g=Se.Pen;break}g===Se.Touch?$[c]===$.MouseDown?m="TouchStart":$[c]===$.MouseUp&&(m="TouchEnd"):Se.Pen}else jr(h)&&(g=Se.Touch);g!==null?(l=g,(m.startsWith("Touch")&&g===Se.Touch||m.startsWith("Mouse")&&g===Se.Mouse)&&(g=null)):$[c]===$.Click&&(g=l,l=null);let p=jr(h)?h.changedTouches[0]:h;if(!p)return;let d=t.getId(f),{clientX:y,clientY:b}=p;k(s)({type:$[m],id:d,x:y,y:b,...g!==null&&{pointerType:g}})};return Object.keys($).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Te(c),f=u(c);if(window.PointerEvent)switch($[c]){case $.MouseDown:case $.MouseUp:h=h.replace("mouse","pointer");break;case $.TouchStart:case $.TouchEnd:return}a.push(te(h,f,e))}),k(()=>{a.forEach(c=>c())})}function Xl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=k(ht(k(a=>{let l=Wt(a);if(!l||re(l,r,i,!0))return;let u=t.getId(l);if(l===e&&e.defaultView){let c=cn(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),n.scroll||100));return te("scroll",o,e)}function pm({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=k(ht(k(()=>{let n=hn(),o=fn();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return te("resize",i,e)}function gm({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(b){let w=Wt(b),v=b.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=D.parentElement(w)),!w||!x||mm.indexOf(x)<0||re(w,r,i,!0)||w.classList.contains(n)||o&&w.matches(o))return;let N=w.value,R=!1,A=Mr(w)||"";A==="radio"||A==="checkbox"?R=w.checked:(a[x.toLowerCase()]||a[A])&&(N=xr({element:w,maskInputOptions:a,tagName:x,type:A,value:N,maskInputFn:l})),f(w,c?{text:N,isChecked:R,userTriggered:v}:{text:N,isChecked:R});let P=w.name;A==="radio"&&P&&R&&e.querySelectorAll(`input[type="radio"][name="${P}"]`).forEach(q=>{if(q!==w){let se=q.value;f(q,c?{text:se,isChecked:!R,userTriggered:!1}:{text:se,isChecked:!R})}})}function f(b,w){let v=Ho.get(b);if(!v||v.text!==w.text||v.isChecked!==w.isChecked){Ho.set(b,w);let x=t.getId(b);k(s)({...w,id:x})}}let m=(u.input==="last"?["change"]:["input","change"]).map(b=>te(b,k(h),e)),p=e.defaultView;if(!p)return()=>{m.forEach(b=>b())};let d=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&m.push(...y.map(b=>Bt(b[0],b[1],{set(){k(h)({target:this,isTrusted:!1})}},!1,p))),k(()=>{m.forEach(b=>b())})}function Gr(s){let e=[];function t(r,i){if(mr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||mr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||mr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||mr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Ae(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function ym({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:k((c,h,f)=>{let[g,m]=f,{id:p,styleId:d}=Ae(h,e,t.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,adds:[{rule:g,index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){let g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,f])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:k((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ae(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,removes:[{index:g}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:k((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ae(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replace:g}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:k((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ae(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replaceSync:g}),c.apply(h,f)})}));let l={};gr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(gr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),gr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),gr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:k((f,g,m)=>{let[p,d]=m,{id:y,styleId:b}=Ae(g.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||b&&b!==-1)&&s({id:y,styleId:b,adds:[{rule:p,index:[...Gr(g),d||0]}]}),f.apply(g,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:k((f,g,m)=>{let[p]=m,{id:d,styleId:y}=Ae(g.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||y&&y!==-1)&&s({id:d,styleId:y,removes:[{index:[...Gr(g),p]}]}),f.apply(g,m)})})}),k(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Zl({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(D.host(t));let a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,l=a?.prototype?Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=l.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function wm({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:k((a,l,u)=>{var c;let[h,f,g]=u;if(t.has(h))return n.apply(l,[h,f,g]);let{id:m,styleId:p}=Ae((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,set:{property:h,value:f,priority:g},index:Gr(l.parentRule)}),a.apply(l,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:k((a,l,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(l,[h]);let{id:f,styleId:g}=Ae((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&s({id:f,styleId:g,remove:{property:h},index:Gr(l.parentRule)}),a.apply(l,u)})}),k(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Sm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=k(l=>ht(k(u=>{let c=Wt(u);if(!c||re(c,e,t,!0))return;let{currentTime:h,volume:f,muted:g,playbackRate:m,loop:p}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:g,playbackRate:m,loop:p})}),i.media||500)),a=[te("play",o(Re.Play),n),te("pause",o(Re.Pause),n),te("seeked",o(Re.Seeked),n),te("volumechange",o(Re.VolumeChange),n),te("ratechange",o(Re.RateChange),n)];return k(()=>{a.forEach(l=>l())})}function bm({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(l,u,c){let h=new n(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let o=ze(e.fonts,"add",function(a){return function(l){return setTimeout(k(()=>{let u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=n}),r.push(o),k(()=>{r.forEach(a=>a())})}function vm(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=!0,a=k(()=>{let l=e.getSelection();if(!l||o&&l?.isCollapsed)return;o=l.isCollapsed||!1;let u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){let f=l.getRangeAt(h),{startContainer:g,startOffset:m,endContainer:p,endOffset:d}=f;re(g,r,i,!0)||re(p,r,i,!0)||u.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:d})}n({ranges:u})});return a(),te("selectionchange",a)}function Cm({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:ze(t.customElements,"define",function(i){return function(n,o,a){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,a])}})}function Em(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:g,customElementCb:m}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),l(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p)}}function Im(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};Em(s,e);let r;s.recordDOM&&(r=Yl(s,s.doc));let i=fm(s),n=dm(s),o=Xl(s),a=pm(s,{win:t}),l=gm(s),u=Sm(s),c=()=>{},h=()=>{},f=()=>{},g=()=>{};s.recordDOM&&(c=ym(s,{win:t}),h=Zl(s,s.doc),f=wm(s,{win:t}),s.collectFonts&&(g=bm(s)));let m=vm(s),p=Cm(s),d=[];for(let y of s.plugins)d.push(y.observer(y.callback,t,y.options));return k(()=>{Ue.forEach(y=>y.reset()),r?.disconnect(),i(),n(),o(),a(),l(),u(),c(),h(),f(),g(),m(),p(),d.forEach(y=>y())})}function mr(s){return typeof window[s]<"u"}function gr(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}function Nm(s,e){let t=Yo.get(s);return t||(t=new Map,Yo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Er(s,e,t){if(s instanceof Array)return s.map(r=>Er(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){let r=s.constructor.name,i=xm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Er(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Er(s.data,e,t),s.width,s.height]};if(ql(s,e)||typeof s=="object"){let r=s.constructor.name,i=Kl(s,e,t);return{rr_type:r,index:i}}}}return s}function Am(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let a=ze(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return re(this.canvas,t,r,!0)||setTimeout(()=>{let c=Jl(u,e,this);s(this.canvas,{type:Ee["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch{let a=Bt(e.CanvasRenderingContext2D.prototype,o,{set(l){s(this.canvas,{type:Ee["2D"],property:o,args:[l],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function Rm(s){return s==="experimental-webgl"?"webgl":s}function Xo(s,e,t,r){let i=[];try{let n=ze(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!re(this,e,t,!0)){let u=Rm(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Zo(s,e,t,r,i,n){let o=[],a=Object.getOwnPropertyNames(s);for(let l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;let u=ze(s,l,function(c){return function(...h){let f=c.apply(this,h);if(Kl(f,n,this),"tagName"in this.canvas&&!re(this.canvas,r,i,!0)){let g=Jl(h,n,this),m={type:e,property:l,args:g};t(this.canvas,m)}return f}});o.push(u)}catch{let u=Bt(s,l,{set(c){t(this.canvas,{type:e,property:l,args:[c],setter:!0})}});o.push(u)}return o}function Om(s,e,t,r){let i=[];return i.push(...Zo(e.WebGLRenderingContext.prototype,Ee.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Zo(e.WebGL2RenderingContext.prototype,Ee.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}function Tm(s){let e;try{if(e=Ko&&(window.URL||window.webkitURL).createObjectURL(Ko),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Ql,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}function _e(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:g,maskInputFn:m,maskTextFn:p,hooks:d,packFn:y,sampling:b={},dataURLOptions:w={},mousemoveWait:v,recordDOM:x=!0,recordCanvas:N=!1,recordCrossOriginIframes:R=!1,recordAfter:A=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:q=!1,inlineImages:se=!1,plugins:ie,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:ke=new Set([]),errorHandler:Le}=s;cm(Le);let X=R?window.parent===window:!0,U=!1;if(!X)try{window.parent.document&&(U=!1)}catch{U=!0}if(X&&!e)throw new Error("emit function is required");if(!X&&!U)return()=>{};v!==void 0&&b.mousemove===void 0&&(b.mousemove=v),he.reset();let ue=h===!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}:f!==void 0?f:{password:!0},ne=da(g);mn();let ft,as=0,vn=F=>{for(let ce of ie||[])ce.eventProcessor&&(F=ce.eventProcessor(F));return y&&!U&&(F=y(F)),F};J=(F,ce)=>{var Z;let K=F;if(K.timestamp=kt(),(Z=Ue[0])!=null&&Z.isFrozen()&&K.type!==I.FullSnapshot&&!(K.type===I.IncrementalSnapshot&&K.data.source===E.Mutation)&&Ue.forEach(oe=>oe.unfreeze()),X)e?.(vn(K),ce);else if(U){let oe={type:"rrweb",event:vn(K),origin:window.location.origin,isCheckout:ce};window.parent.postMessage(oe,"*")}if(K.type===I.FullSnapshot)ft=K,as=0;else if(K.type===I.IncrementalSnapshot){if(K.data.source===E.Mutation&&K.data.isAttachIframe)return;as++;let oe=r&&as>=r,z=t&&K.timestamp-ft.timestamp>t;(oe||z)&&Ir(!0)}};let zt=F=>{J({type:I.IncrementalSnapshot,data:{source:E.Mutation,...F}})},Cn=F=>J({type:I.IncrementalSnapshot,data:{source:E.Scroll,...F}}),En=F=>J({type:I.IncrementalSnapshot,data:{source:E.CanvasMutation,...F}}),gu=F=>J({type:I.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...F}}),$e=new Oi({mutationCb:zt,adoptedStyleSheetCb:gu}),Pe=new Ni({mirror:he,mutationCb:zt,stylesheetManager:$e,recordCrossOriginIframes:R,wrappedEmit:J});for(let F of ie||[])F.getMirror&&F.getMirror({nodeMirror:he,crossOriginIframeMirror:Pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Pe.crossOriginIframeStyleMirror});let ls=new Di;Ds=new Ri({recordCanvas:N,mutationCb:En,win:window,blockClass:i,blockSelector:n,mirror:he,sampling:b.canvas,dataURLOptions:w});let Vt=new Ai({mutationCb:zt,scrollCb:Cn,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ue,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:N,inlineImages:se,sampling:b,slimDOMOptions:ne,iframeManager:Pe,stylesheetManager:$e,canvasManager:Ds,keepIframeSrcFn:T,processedNodeManager:ls},mirror:he});Ir=(F=!1)=>{if(!x)return;J({type:I.Meta,data:{href:window.location.href,width:fn(),height:hn()}},F),$e.reset(),Vt.init(),Ue.forEach(Z=>Z.lock());let ce=Tc(document,{mirror:he,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ue,maskTextFn:p,maskInputFn:m,slimDOM:ne,dataURLOptions:w,recordCanvas:N,inlineImages:se,onSerialize:Z=>{tt(Z,he)&&Pe.addIframe(Z),yn(Z,he)&&$e.trackLinkElement(Z),Oe(Z)&&Vt.addShadowRoot(D.shadowRoot(Z),document)},onIframeLoad:(Z,K)=>{Pe.attachIframe(Z,K),Vt.observeAttachShadow(Z)},onStylesheetLoad:(Z,K)=>{$e.attachLinkElement(Z,K)},keepIframeSrcFn:T});if(!ce)return console.warn("Failed to snapshot the document");J({type:I.FullSnapshot,data:{node:ce,initialOffset:cn(window)}},F),Ue.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$e.adoptStyleSheets(document.adoptedStyleSheets,he.getId(document))};try{let F=[],ce=K=>{var oe;return k(Im)({mutationCb:zt,mousemoveCb:(z,us)=>J({type:I.IncrementalSnapshot,data:{source:us,positions:z}}),mouseInteractionCb:z=>J({type:I.IncrementalSnapshot,data:{source:E.MouseInteraction,...z}}),scrollCb:Cn,viewportResizeCb:z=>J({type:I.IncrementalSnapshot,data:{source:E.ViewportResize,...z}}),inputCb:z=>J({type:I.IncrementalSnapshot,data:{source:E.Input,...z}}),mediaInteractionCb:z=>J({type:I.IncrementalSnapshot,data:{source:E.MediaInteraction,...z}}),styleSheetRuleCb:z=>J({type:I.IncrementalSnapshot,data:{source:E.StyleSheetRule,...z}}),styleDeclarationCb:z=>J({type:I.IncrementalSnapshot,data:{source:E.StyleDeclaration,...z}}),canvasMutationCb:En,fontCb:z=>J({type:I.IncrementalSnapshot,data:{source:E.Font,...z}}),selectionCb:z=>{J({type:I.IncrementalSnapshot,data:{source:E.Selection,...z}})},customElementCb:z=>{J({type:I.IncrementalSnapshot,data:{source:E.CustomElement,...z}})},blockClass:i,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:ue,inlineStylesheet:c,sampling:b,recordDOM:x,recordCanvas:N,inlineImages:se,userTriggeredOnInput:P,collectFonts:q,doc:K,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:T,blockSelector:n,slimDOMOptions:ne,dataURLOptions:w,mirror:he,iframeManager:Pe,stylesheetManager:$e,shadowDomManager:Vt,processedNodeManager:ls,canvasManager:Ds,ignoreCSSAttributes:ke,plugins:((oe=ie?.filter(z=>z.observer))==null?void 0:oe.map(z=>({observer:z.observer,options:z.options,callback:us=>J({type:I.Plugin,data:{plugin:z.name,payload:us}})})))||[]},d)};Pe.addLoadListener(K=>{try{F.push(ce(K.contentDocument))}catch(oe){console.warn(oe)}});let Z=()=>{Ir(),F.push(ce(document)),Yr=!0};return["interactive","complete"].includes(document.readyState)?Z():(F.push(te("DOMContentLoaded",()=>{J({type:I.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&Z()})),F.push(te("load",()=>{J({type:I.Load,data:{}}),A==="load"&&Z()},window))),()=>{F.forEach(K=>{try{K()}catch(oe){String(oe).toLowerCase().includes("cross-origin")||console.warn(oe)}}),ls.destroy(),Yr=!1,hm()}}catch(F){console.warn(F)}}function eu(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}function km(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;let t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(y){let b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(y)}let a=o(s.navigator.userAgent)?1:0;function l(y,b){this.scrollLeft=y,this.scrollTop=b}function u(y){return .5*(1-Math.cos(Math.PI*y))}function c(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(y,b){if(b==="Y")return y.clientHeight+a<y.scrollHeight;if(b==="X")return y.clientWidth+a<y.scrollWidth}function f(y,b){let w=s.getComputedStyle(y,null)["overflow"+b];return w==="auto"||w==="scroll"}function g(y){let b=h(y,"Y")&&f(y,"Y"),w=h(y,"X")&&f(y,"X");return b||w}function m(y){for(;y!==e.body&&g(y)===!1;)y=y.parentNode||y.host;return y}function p(y){let b=n(),w,v,x,N=(b-y.startTime)/r;N=N>1?1:N,w=u(N),v=y.startX+(y.x-y.startX)*w,x=y.startY+(y.y-y.startY)*w,y.method.call(y.scrollable,v,x),(v!==y.x||x!==y.y)&&s.requestAnimationFrame(p.bind(s,y))}function d(y,b,w){let v,x,N,R,A=n();y===e.body?(v=s,x=s.scrollX||s.pageXOffset,N=s.scrollY||s.pageYOffset,R=i.scroll):(v=y,x=y.scrollLeft,N=y.scrollTop,R=l),p({scrollable:v,method:R,startTime:A,startX:x,startY:N,x:b,y:w})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}d.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,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}d.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let y=arguments[0].left,b=arguments[0].top;d.call(this,this,typeof y>"u"?this.scrollLeft:~~y,typeof b>"u"?this.scrollTop:~~b)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let y=m(this),b=y.getBoundingClientRect(),w=this.getBoundingClientRect();y!==e.body?(d.call(this,y,y.scrollLeft+w.left-b.left,y.scrollTop+w.top-b.top),s.getComputedStyle(y).position!=="fixed"&&s.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}function Jo(s,e){if(s.type===I.IncrementalSnapshot&&s.data.source===E.MouseMove&&s.data.positions&&s.data.positions.length){let t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}function qo(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}function Ts(s){return s===void 0?[]:[].concat(s)}function Ze(s){return{type:"xstate.assign",assignment:s}}function Qo(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Xr(s){return function(e){return s===e}}function ru(s){return typeof s=="string"?{type:s}:s}function ea(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Xr(s)}}function ta(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](r,t):n.assignment[a]}),r=o,!1}return!0}),r,i]}function su(s,e){e===void 0&&(e={});var t=qo(ta(Ts(s.states[s.initial].entry).map(function(o){return Qo(o,e.actions)}),s.context,tu),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Xr(s.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,g=ru(a),m=s.states[h];if(m.on){var p=Ts(m.on[g.type]);try{for(var d=(function(U){var ue=typeof Symbol=="function"&&Symbol.iterator,ne=ue&&U[ue],ft=0;if(ne)return ne.call(U);if(U&&typeof U.length=="number")return{next:function(){return U&&ft>=U.length&&(U=void 0),{value:U&&U[ft++],done:!U}}};throw new TypeError(ue?"Object is not iterable.":"Symbol.iterator is not defined.")})(p),y=d.next();!y.done;y=d.next()){var b=y.value;if(b===void 0)return ea(h,f);var w=typeof b=="string"?{target:b}:b,v=w.target,x=w.actions,N=x===void 0?[]:x,R=w.cond,A=R===void 0?function(){return!0}:R,P=v===void 0,q=v??h,se=s.states[q];if(A(f,g)){var ie=qo(ta((P?Ts(N):[].concat(m.exit,N,se.entry).filter(function(U){return U})).map(function(U){return Qo(U,n._options.actions)}),f,g),3),T=ie[0],ke=ie[1],Le=ie[2],X=v??h;return{value:X,context:ke,actions:T,changed:v!==h||T.length>0||Le,matches:Xr(X)}}}}catch(U){l={error:U}}finally{try{y&&!y.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return ea(h,f)}};return n}function iu(s){var e=s.initialState,t=et.NotStarted,r=new Set,i={_machine:s,send:function(n){t===et.Running&&(e=s.transition(e,n),ra(e,ru(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Xr(o.value)}}return t=et.Running,ra(e,tu),i},stop:function(){return t=et.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Lm(s,e){for(let t=s.length-1;t>=0;t--){let r=s[t];if(r.type===I.Meta&&r.timestamp<=e)return s.slice(t)}return s}function $m(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){let i=su({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ze({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:Ze((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),{...n,timeOffset:a,baselineTime:n.events[0].timestamp+a}}),play(n){var o;let{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(let m of l)Jo(m,u);let h=Lm(l,u),f=c?.timestamp;c?.type===I.IncrementalSnapshot&&c.data.source===E.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(L.PlayBack);let g=new Array;for(let m of h)if(!(f&&f<u&&(m.timestamp<=f||m===c)))if(m.timestamp<u)g.push(m);else{let p=e(m,!1);a.addAction({doAction:()=>{p()},delay:m.delay})}t(g),r.emit(L.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:Ze(n=>({...n,lastPlayedEvent:null})),startLive:Ze({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:Ze((n,o)=>{let{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){let{event:c}=o.payload;Jo(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let m=-1,p=0;for(;p<=h;){let d=Math.floor((p+h)/2);u[d].timestamp<=c.timestamp?p=d+1:h=d-1}m===-1&&(m=p),u.splice(m,0,c)}let f=c.timestamp<a,g=e(c,f);f?g():l.isActive()&&l.addAction({doAction:()=>{g()},delay:c.delay})}return{...n,events:u}})}});return iu(i)}function Pm(s){let e=su({id:"speed",context:s,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:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:Ze({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return iu(e)}function nu(s,e){let t=sa.get(s);return t||(t=new Map,sa.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function De(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await De(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;let{rr_type:i,index:n}=r;return nu(e,i)[n]}else if("args"in r){let{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(De(s,e,t))))}else{if("base64"in r)return Mm(r.base64);if("src"in r){let i=s.get(r.src);if(i)return i;{let n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(De(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(De(s,e,t)));return r}}function Um(s,e){try{return e===Ee.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch{return null}}function Wm(s,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!Bm.includes(t))return;let r=nu(s,t);r.includes(e)||r.push(e)}async function zm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{let n=Um(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}let o=n[s.property],a=await Promise.all(s.args.map(De(r,n))),l=o.apply(n,a);Wm(n,l);let u=!1}catch(n){i(s,n)}}async function Vm({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){let n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}let o=e.map(async l=>Promise.all(l.args.map(De(r,n))));(await Promise.all(o)).forEach((l,u)=>{let c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}let h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(n,c.args)):h.apply(n,l)}catch(h){i(c,h)}})}async function _i({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{let o=i.get(s)||e,a="commands"in o?o.commands:[o];if([Ee.WebGL,Ee.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){let u=a[l];await zm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await Vm({event:s,mutations:a,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}function yr(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;let t=s,r=t.open,i=r&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(a?t.showModal():t.show())}}function jm(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;let t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}function na(s){return s.type==I.IncrementalSnapshot&&(s.data.source==E.TouchMove||s.data.source==E.MouseInteraction&&s.data.type==$.TouchStart)}var Fu,Uu,S,Yn,Bu,Wu,Xn,O,Zn,Kn,Xt,zu,Ss,bs,ee,It,Jn,hc,fc,dc,pc,yc,wc,xt,He,qn,bc,vc,Qn,_c,eo,kc,Lc,Bi,j,pa,Fc,Uc,Bc,de,to,ro,Ls,Wi,$t,so,$s,ga,zc,Zr,Kt,Vc,jc,Gc,Hc,Us,Kr,Yc,Bs,Jr,Xc,Zc,Kc,Jc,io,no,qc,Qc,vs,eh,Ws,ya,rh,sh,oo,Jt,zs,Vs,ih,Cs,ao,nh,Es,oh,lo,Rr,qr,wa,wr,Sr,Sa,ba,va,uo,ah,lh,uh,ch,Ca,hh,js,Qr,Ea,Ia,xa,Ma,fh,Na,zi,Vi,Aa,ve,Be,dh,Ta,_a,Mt,ji,co,ka,Gs,La,ph,Hs,Gi,Is,ho,qt,fo,Qt,pt,er,tr,rr,mh,gh,yh,wh,Sh,bh,vh,Ch,Eh,Ih,sr,ir,xh,po,Mh,$a,Or,Hi,Pa,Fa,Ua,rt,Pt,Nt,Ba,Wa,Nh,Dr,Yi,Ah,Rh,Oh,Dh,Th,mo,go,kh,Lh,$h,Ph,Fh,Xi,me,Uh,Bh,Wh,zh,Vh,jh,yo,Gh,Hh,Yh,Xh,Zh,st,Xs,it,ja,Kh,Jh,qh,Qh,ef,Zs,tf,rf,sf,nf,of,At,af,lf,uf,cf,hf,ff,df,pf,mf,gf,Ga,yf,wf,Zi,Sf,bf,Ha,vf,Ya,Xa,Cf,Ef,If,xf,Za,Ka,Mf,Nf,H,So,Lf,$f,C,Pf,Ff,vo,Uf,Ki,G,Ja,Vf,jf,Gf,pe,Co,Eo,Ks,Ji,Ft,Io,Js,Qa,Yf,ts,nr,Xf,Zf,Kf,Jf,ei,rs,qf,ti,ss,Qf,ed,td,rd,xo,Mo,sd,id,xs,nd,ri,el,ad,ld,No,or,si,ii,ud,Ms,Ao,cd,Ns,hd,Ro,_r,is,tl,br,vr,rl,sl,il,Oo,fd,dd,pd,md,nl,gd,ni,ns,ol,al,ll,ul,yd,cl,qi,Qi,hl,Ce,We,wd,ml,gl,Ot,en,Do,yl,oi,wl,Sd,ai,tn,As,To,ar,_o,lr,gt,ur,cr,hr,bd,vd,Cd,Ed,Id,xd,Md,Nd,Ad,Rd,fr,dr,Od,ko,Dd,Sl,kr,rn,bl,vl,Cl,nt,Ut,Dt,El,Il,Td,Lr,sn,_d,kd,Ld,$d,Pd,Lo,$o,Ud,Bd,Wd,zd,Vd,nn,ge,jd,Gd,Hd,Yd,Xd,Zd,Po,Kd,Jd,qd,Qd,ep,ot,ui,at,Nl,tp,rp,sp,ip,np,ci,op,ap,lp,up,cp,Tt,hp,fp,dp,pp,mp,gp,yp,wp,Sp,bp,Al,vp,Cp,on,Ep,Ip,Rl,xp,Ol,Dl,Mp,Np,Ap,Rp,Tl,_l,Op,Dp,Y,_,_p,kp,hi,Lp,$p,fe,fi,Pr,lt,di,pi,Fr,Ur,Br,mi,ae,gi,Pp,ye,ut,Wp,ct,yi,wi,Si,bi,vi,zp,Vp,jp,Ci,Bo,Wo,pr,Xp,Rs,Os,D,Xe,Vr,kt,Lt,am,I,E,$,Se,Ee,Re,L,be,Ii,Vo,xi,Et,k,Ue,mm,Ho,Hr,Ni,Ai,Qe,St,wt,xm,Mm,Yo,Kl,Jl,ql,Ql,Dm,Ko,Ri,Oi,Di,J,Ir,Ds,Yr,he,_m,Ti,et,tu,ra,Fm,sa,Bm,ki,Gm,Hm,ia,_s,Li,Ym,Xm,Zm,au=je(()=>{"use strict";Fu=Object.defineProperty,Uu=(s,e,t)=>e in s?Fu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,S=(s,e,t)=>Uu(s,typeof e!="symbol"?e+"":e,t),Bu=Object.defineProperty,Wu=(s,e,t)=>e in s?Bu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Xn=(s,e,t)=>Wu(s,typeof e!="symbol"?e+"":e,t),O=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(O||{}),Zn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xt={},zu=()=>!!globalThis.Zone;Ss={};bs={};ee={ownerDocument:Vu,childNodes:ju,parentNode:Gu,parentElement:Hu,textContent:Yu,contains:Xu,getRootNode:Zu,host:Ku,styleSheets:Ju,shadowRoot:qu,querySelector:Qu,querySelectorAll:ec,mutationObserver:tc,patch:rc};It=class{constructor(){Xn(this,"idNodeMap",new Map),Xn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Jn="__rrweb_original__";hc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,fc=/^(?:[a-z+]+:)?\/\//i,dc=/^www\..*/i,pc=/^(data:)([^,]*),(.*)/i;yc=1,wc=new RegExp("[^a-z0-9-_:]"),xt=-2;bc=/^[^ \t\n\r\u000c]+/,vc=/^[, \t\n\r\u000c]+/;Qn=new WeakMap;_c=/(max|min)-device-(width|height)/,eo=new RegExp(_c.source,"g"),kc={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(eo)&&(s.params=s.params.replace(eo,"$1-$2"))}}}},Lc={postcssPlugin:"postcss-hover-classes",prepare:function(){let s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
9
- `+t.replace(/:hover/g,".\\:hover"))}))}}}};Bi={exports:{}},j=String,pa=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};Bi.exports=pa();Bi.exports.createColors=pa;Fc=Bi.exports,Uc={},Bc=Object.freeze(Object.defineProperty({__proto__:null,default:Uc},Symbol.toStringTag,{value:"Module"})),de=Pc(Bc),to=Fc,ro=de,Ls=class ma extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ma)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=to.isColorSupported),ro&&e&&(t=ro(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=to.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
8
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function yt(s){return typeof s=="object"&&typeof s.then=="function"}function xl(s){let e=!1,t=qd[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ot,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ot,t+"Exit"]:[t,t+"Exit"]}function Fo(s){let e;return s.type==="document"?e=["Document",ot,"DocumentExit"]:s.type==="root"?e=["Root",ot,"RootExit"]:e=xl(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function li(s){return s[ge]=!1,s.nodes&&s.nodes.forEach(e=>li(e)),s}function _t(s,e){if(Array.isArray(s))return s.map(i=>_t(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:gp.prototype};n.map&&(n.map={...n.map,__proto__:dp.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>_t(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new yp(r);if(r.type==="decl")return new fp(r);if(r.type==="rule")return new wp(r);if(r.type==="comment")return new pp(r);if(r.type==="atrule")return new mp(r);throw new Error("Unknown node type: "+s.type)}function F(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new on(s)}function Tp(s){let e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){let o=n.split(r);o.length>1&&(e[hi(o[0].trim())]=o[1].trim())}}),e}function Uo(s){let e=[];for(let t in s){let r=s[t];if(typeof r!="string")continue;let i=Pp(t);e.push(`${i}: ${r};`)}return e.join(" ")}function an(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function kl(s,e,t){if(!t)return an(s,e);if(t.parentNode!==s)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 e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function Ll(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}function Wr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Fp(s,e,t,r),Pl(s,e,t,r),Up(s,e,t)}function Fp(s,e,t,r){var i;if(t.afterAppend&&!ye&&(ye=new WeakSet,setTimeout(()=>{ye=null},0)),!ln(s,e)){let n=zr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case D.Document:{if(!Ye(s,e,t.mirror,r)){let n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),ye?.add(s))}break}case D.Element:{let n=s,o=e;switch(o.tagName){case"IFRAME":{let a=s.contentDocument;if(!a)break;Wr(a,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Pl(n.shadowRoot,o.shadowRoot,t,r)),Bp(n,o,r);break}}return s}function Up(s,e,t){var r;switch(e.RRNodeType){case D.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case D.Element:{let i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{let o=s,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{let o=e;if(o.rr_dataURL!==null){let a=document.createElement("img");a.onload=()=>{let l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{let o=i.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{let o=i,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,g=l!==c;if((f||l&&g)&&o.close(),c&&(g||f))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case D.Text:case D.Comment:case D.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ye?.has(s)&&(ye.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Bp(s,e,t){let r=s.attributes,i=e.attributes;for(let n in i){let o=i[n],a=t.getMeta(e);if(a?.isSVG&&gi[n])s.setAttributeNS(gi[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){let l=document.createElement("img");l.src=o,l.onload=()=>{let u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(l){console.warn(l)}}}for(let{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function Pl(s,e,t,r){let i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,a=i.length-1,l=0,u=n.length-1,c=i[o],h=i[a],f=n[l],g=n[u],m,p;for(;o<=a&&l<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--a];else if(Ye(c,f,t.mirror,r))c=i[++o],f=n[++l];else if(Ye(h,g,t.mirror,r))h=i[--a],g=n[--u];else if(Ye(c,g,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=i[++o],g=n[--u]}else if(Ye(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(S){console.warn(S)}h=i[--a],f=n[++l]}else{if(!m){m={};for(let w=o;w<=a;w++){let v=i[w];v&&t.mirror.hasNode(v)&&(m[t.mirror.getId(v)]=w)}}p=m[r.getId(f)];let S=i[p];if(p!==void 0&&S&&Ye(S,f,t.mirror,r)){try{s.insertBefore(S,c)}catch(w){console.warn(w)}i[p]=void 0}else{let w=zr(f,t.mirror,r);s.nodeName==="#document"&&c&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++o]);try{s.insertBefore(w,c||null)}catch(v){console.warn(v)}}f=n[++l]}if(o>a){let S=n[u+1],w=null;for(S&&(w=t.mirror.getNode(r.getId(S)));l<=u;++l){let v=zr(n[l],t.mirror,r);try{s.insertBefore(v,w)}catch(x){console.warn(x)}}}else if(l>u)for(;o<=a;o++){let S=i[o];if(!(!S||S.parentNode!==s))try{s.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(w){console.warn(w)}}let d=s.firstChild,y=e.firstChild;for(;d!==null&&y!==null;)Wr(d,y,t,r),d=d.nextSibling,y=y.nextSibling}function zr(s,e,t){let r=t.getId(s),i=t.getMeta(s),n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&ln(n,s))return n;switch(s.RRNodeType){case D.Document:n=new Document;break;case D.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case D.Element:{let o=s.tagName.toLowerCase();o=$p[o]||o,i&&"isSVG"in i&&i?.isSVG?n=document.createElementNS(gi.svg,o):n=document.createElement(s.tagName);break}case D.Text:n=document.createTextNode(s.data);break;case D.Comment:n=document.createComment(s.data);break;case D.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,{...i});try{ye?.add(n)}catch{}return n}function ln(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ye(s,e,t,r){let i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:ln(s,e)}function Gp(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function $l(s,e,t,r){let i;switch(s.nodeType){case ae.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ae.DOCUMENT_TYPE_NODE:{let o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ae.ELEMENT_NODE:{let o=s,a=Gp(o);i=e.createElement(a);let l=i;for(let{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case ae.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ae.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ae.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ae.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof ut&&(n||(n=Fl(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,{...n})),i}function Hp(s,e=Bf(),t=new ut){function r(i,n){let o=$l(i,t,e,n);if(o!==null)if(n?.nodeName!=="IFRAME"&&i.nodeType!==ae.DOCUMENT_FRAGMENT_NODE&&(n?.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){let a=i.contentDocument;a&&r(a,o)}else(i.nodeType===ae.DOCUMENT_NODE||i.nodeType===ae.ELEMENT_NODE||i.nodeType===ae.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ae.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(s,null),t}function Yp(){return new Ci}function Fl(s,e){switch(s.RRNodeType){case D.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case D.DocumentType:{let t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case D.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case D.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}function un(s){if(pr[s])return pr[s];let e=globalThis[s],t=e.prototype,r=s in Bo?Bo[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in Wo?Wo[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Xp())return pr[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?pr[s]=u:t}catch{return t}}function xe(s,e,t){var r;let i=`${s}.${String(t)}`;if(Rs[i])return Rs[i].call(e);let n=un(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Rs[i]=o,o.call(e)):e[t]}function Ul(s,e,t){let r=`${s}.${String(t)}`;if(Os[r])return Os[r].bind(e);let n=un(s)[t];return typeof n!="function"?e[t]:(Os[r]=n,n.bind(e))}function Zp(s){return xe("Node",s,"ownerDocument")}function Kp(s){return xe("Node",s,"childNodes")}function Jp(s){return xe("Node",s,"parentNode")}function qp(s){return xe("Node",s,"parentElement")}function Qp(s){return xe("Node",s,"textContent")}function em(s,e){return Ul("Node",s,"contains")(e)}function tm(s){return Ul("Node",s,"getRootNode")()}function rm(s){return!s||!("host"in s)?null:xe("ShadowRoot",s,"host")}function sm(s){return s.styleSheets}function im(s){return!s||!("shadowRoot"in s)?null:xe("Element",s,"shadowRoot")}function nm(s,e){return xe("Element",s,"querySelector")(e)}function om(s,e){return xe("Element",s,"querySelectorAll")(e)}function Bl(){return un("MutationObserver").constructor}function ze(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function te(s,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}function ht(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===!1&&(i=o);let a=e-(o-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(l,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,n)},a))}}function Bt(s,e,t,r,i=window){let n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Bt(s,e,n||{},!0)}function cn(s){var e,t,r,i;let n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=R.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=R.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function hn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function fn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function dn(s){return s?s.nodeType===s.ELEMENT_NODE?s:R.parentElement(s):null}function re(s,e,t,r){if(!s)return!1;let i=dn(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Ar(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Wl(s,e){return e.getId(s)!==-1}function Cr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===xt}function pn(s,e){if(St(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=R.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?pn(r,e):!0}function jr(s){return!!s.changedTouches}function mn(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function zl(s){let e={},t=(i,n)=>{let o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(let i of s){let{nextId:n,parentId:o}=i;if(n&&n in e){let a=e[n];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(o in e){let a=e[o];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function gn(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)gn(s.children[t],e)}function tt(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function yn(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function wn(s,e){var t,r;let i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let n=i.getBoundingClientRect(),o=wn(i,e),a=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Oe(s){return s?s instanceof fe&&"shadowRoot"in s?!!s.shadowRoot:!!R.shadowRoot(s):!1}function qe(s,e){let t=s[e[0]];return e.length===1?t:qe(t.cssRules[e[1]].cssRules,e.slice(2))}function Ei(s){let e=[...s],t=e.pop();return{positions:e,index:t}}function Vl(s){let e=new Set,t=[];for(let r=s.length;r--;){let i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}function bn(s){var e;let t=null;return"getRootNode"in s&&((e=R.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&R.host(R.getRootNode(s))&&(t=R.host(R.getRootNode(s))),t}function jl(s){let e=s,t;for(;t=bn(e);)e=t;return e}function Gl(s){let e=R.ownerDocument(s);if(!e)return!1;let t=jl(s);return R.contains(e,t)}function Sn(s){let e=R.ownerDocument(s);return e?R.contains(e,s)||Gl(s):!1}function zo(s){return"__ln"in s}function Mi(s,e){s.delete(e),R.childNodes(e).forEach(t=>Mi(s,t))}function lm(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),R.childNodes(r).forEach(i=>t.push(i)))}}function jo(s,e,t){return s.size===0?!1:um(s,e)}function um(s,e,t){let r=R.parentNode(e);return r?s.has(r):!1}function Go(s,e){return s.size===0?!1:Hl(s,e)}function Hl(s,e){let t=R.parentNode(e);return t?s.has(t)?!0:Hl(s,t):!1}function cm(s){Et=s}function hm(){Et=void 0}function Wt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function Yl(s,e){let t=new xi;Ue.push(t),t.init(s);let r=new(Bl())(T(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function fm({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],a,l=ht(T(h=>{let f=Date.now()-a;s(o.map(g=>(g.timeOffset-=f,g)),h),o=[],a=null}),n),u=T(ht(T(h=>{let f=Wt(h),{clientX:g,clientY:m}=jr(h)?h.changedTouches[0]:h;a||(a=kt()),o.push({x:g,y:m,id:r.getId(f),timeOffset:kt()-a}),l(typeof DragEvent<"u"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[te("mousemove",u,t),te("touchmove",u,t),te("drag",u,t)];return T(()=>{c.forEach(h=>h())})}function dm({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[],l=null,u=c=>h=>{let f=Wt(h);if(re(f,r,i,!0))return;let g=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":g=be.Mouse;break;case"touch":g=be.Touch;break;case"pen":g=be.Pen;break}g===be.Touch?k[c]===k.MouseDown?m="TouchStart":k[c]===k.MouseUp&&(m="TouchEnd"):be.Pen}else jr(h)&&(g=be.Touch);g!==null?(l=g,(m.startsWith("Touch")&&g===be.Touch||m.startsWith("Mouse")&&g===be.Mouse)&&(g=null)):k[c]===k.Click&&(g=l,l=null);let p=jr(h)?h.changedTouches[0]:h;if(!p)return;let d=t.getId(f),{clientX:y,clientY:S}=p;T(s)({type:k[m],id:d,x:y,y:S,...g!==null&&{pointerType:g}})};return Object.keys(k).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Te(c),f=u(c);if(window.PointerEvent)switch(k[c]){case k.MouseDown:case k.MouseUp:h=h.replace("mouse","pointer");break;case k.TouchStart:case k.TouchEnd:return}a.push(te(h,f,e))}),T(()=>{a.forEach(c=>c())})}function Xl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=T(ht(T(a=>{let l=Wt(a);if(!l||re(l,r,i,!0))return;let u=t.getId(l);if(l===e&&e.defaultView){let c=cn(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),n.scroll||100));return te("scroll",o,e)}function pm({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=T(ht(T(()=>{let n=hn(),o=fn();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return te("resize",i,e)}function gm({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(S){let w=Wt(S),v=S.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=R.parentElement(w)),!w||!x||mm.indexOf(x)<0||re(w,r,i,!0)||w.classList.contains(n)||o&&w.matches(o))return;let N=w.value,W=!1,U=Mr(w)||"";U==="radio"||U==="checkbox"?W=w.checked:(a[x.toLowerCase()]||a[U])&&(N=xr({element:w,maskInputOptions:a,tagName:x,type:U,value:N,maskInputFn:l})),f(w,c?{text:N,isChecked:W,userTriggered:v}:{text:N,isChecked:W});let Y=w.name;U==="radio"&&Y&&W&&e.querySelectorAll(`input[type="radio"][name="${Y}"]`).forEach(Q=>{if(Q!==w){let se=Q.value;f(Q,c?{text:se,isChecked:!W,userTriggered:!1}:{text:se,isChecked:!W})}})}function f(S,w){let v=Ho.get(S);if(!v||v.text!==w.text||v.isChecked!==w.isChecked){Ho.set(S,w);let x=t.getId(S);T(s)({...w,id:x})}}let m=(u.input==="last"?["change"]:["input","change"]).map(S=>te(S,T(h),e)),p=e.defaultView;if(!p)return()=>{m.forEach(S=>S())};let d=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&m.push(...y.map(S=>Bt(S[0],S[1],{set(){T(h)({target:this,isTrusted:!1})}},!1,p))),T(()=>{m.forEach(S=>S())})}function Gr(s){let e=[];function t(r,i){if(mr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||mr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||mr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||mr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Ae(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function ym({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:T((c,h,f)=>{let[g,m]=f,{id:p,styleId:d}=Ae(h,e,t.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,adds:[{rule:g,index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){let g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,f])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:T((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ae(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,removes:[{index:g}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:T((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ae(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replace:g}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:T((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ae(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replaceSync:g}),c.apply(h,f)})}));let l={};gr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(gr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),gr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),gr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:T((f,g,m)=>{let[p,d]=m,{id:y,styleId:S}=Ae(g.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||S&&S!==-1)&&s({id:y,styleId:S,adds:[{rule:p,index:[...Gr(g),d||0]}]}),f.apply(g,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:T((f,g,m)=>{let[p]=m,{id:d,styleId:y}=Ae(g.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||y&&y!==-1)&&s({id:d,styleId:y,removes:[{index:[...Gr(g),p]}]}),f.apply(g,m)})})}),T(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Zl({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(R.host(t));let a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,l=a?.prototype?Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=l.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),T(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function wm({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:T((a,l,u)=>{var c;let[h,f,g]=u;if(t.has(h))return n.apply(l,[h,f,g]);let{id:m,styleId:p}=Ae((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,set:{property:h,value:f,priority:g},index:Gr(l.parentRule)}),a.apply(l,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:T((a,l,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(l,[h]);let{id:f,styleId:g}=Ae((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&s({id:f,styleId:g,remove:{property:h},index:Gr(l.parentRule)}),a.apply(l,u)})}),T(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function bm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=T(l=>ht(T(u=>{let c=Wt(u);if(!c||re(c,e,t,!0))return;let{currentTime:h,volume:f,muted:g,playbackRate:m,loop:p}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:g,playbackRate:m,loop:p})}),i.media||500)),a=[te("play",o(Re.Play),n),te("pause",o(Re.Pause),n),te("seeked",o(Re.Seeked),n),te("volumechange",o(Re.VolumeChange),n),te("ratechange",o(Re.RateChange),n)];return T(()=>{a.forEach(l=>l())})}function Sm({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(l,u,c){let h=new n(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let o=ze(e.fonts,"add",function(a){return function(l){return setTimeout(T(()=>{let u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=n}),r.push(o),T(()=>{r.forEach(a=>a())})}function vm(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=!0,a=T(()=>{let l=e.getSelection();if(!l||o&&l?.isCollapsed)return;o=l.isCollapsed||!1;let u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){let f=l.getRangeAt(h),{startContainer:g,startOffset:m,endContainer:p,endOffset:d}=f;re(g,r,i,!0)||re(p,r,i,!0)||u.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:d})}n({ranges:u})});return a(),te("selectionchange",a)}function Cm({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:ze(t.customElements,"define",function(i){return function(n,o,a){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,a])}})}function Em(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:g,customElementCb:m}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),l(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p)}}function Im(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};Em(s,e);let r;s.recordDOM&&(r=Yl(s,s.doc));let i=fm(s),n=dm(s),o=Xl(s),a=pm(s,{win:t}),l=gm(s),u=bm(s),c=()=>{},h=()=>{},f=()=>{},g=()=>{};s.recordDOM&&(c=ym(s,{win:t}),h=Zl(s,s.doc),f=wm(s,{win:t}),s.collectFonts&&(g=Sm(s)));let m=vm(s),p=Cm(s),d=[];for(let y of s.plugins)d.push(y.observer(y.callback,t,y.options));return T(()=>{Ue.forEach(y=>y.reset()),r?.disconnect(),i(),n(),o(),a(),l(),u(),c(),h(),f(),g(),m(),p(),d.forEach(y=>y())})}function mr(s){return typeof window[s]<"u"}function gr(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}function Nm(s,e){let t=Yo.get(s);return t||(t=new Map,Yo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Er(s,e,t){if(s instanceof Array)return s.map(r=>Er(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){let r=s.constructor.name,i=xm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Er(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Er(s.data,e,t),s.width,s.height]};if(ql(s,e)||typeof s=="object"){let r=s.constructor.name,i=Kl(s,e,t);return{rr_type:r,index:i}}}}return s}function Am(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let a=ze(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return re(this.canvas,t,r,!0)||setTimeout(()=>{let c=Jl(u,e,this);s(this.canvas,{type:Ee["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch{let a=Bt(e.CanvasRenderingContext2D.prototype,o,{set(l){s(this.canvas,{type:Ee["2D"],property:o,args:[l],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function Rm(s){return s==="experimental-webgl"?"webgl":s}function Xo(s,e,t,r){let i=[];try{let n=ze(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!re(this,e,t,!0)){let u=Rm(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Zo(s,e,t,r,i,n){let o=[],a=Object.getOwnPropertyNames(s);for(let l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;let u=ze(s,l,function(c){return function(...h){let f=c.apply(this,h);if(Kl(f,n,this),"tagName"in this.canvas&&!re(this.canvas,r,i,!0)){let g=Jl(h,n,this),m={type:e,property:l,args:g};t(this.canvas,m)}return f}});o.push(u)}catch{let u=Bt(s,l,{set(c){t(this.canvas,{type:e,property:l,args:[c],setter:!0})}});o.push(u)}return o}function Om(s,e,t,r){let i=[];return i.push(...Zo(e.WebGLRenderingContext.prototype,Ee.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Zo(e.WebGL2RenderingContext.prototype,Ee.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}function Tm(s){let e;try{if(e=Ko&&(window.URL||window.webkitURL).createObjectURL(Ko),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Ql,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}function _e(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:g,maskInputFn:m,maskTextFn:p,hooks:d,packFn:y,sampling:S={},dataURLOptions:w={},mousemoveWait:v,recordDOM:x=!0,recordCanvas:N=!1,recordCrossOriginIframes:W=!1,recordAfter:U=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:Y=!1,collectFonts:Q=!1,inlineImages:se=!1,plugins:ie,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:ke=new Set([]),errorHandler:Le}=s;cm(Le);let X=W?window.parent===window:!0,P=!1;if(!X)try{window.parent.document&&(P=!1)}catch{P=!0}if(X&&!e)throw new Error("emit function is required");if(!X&&!P)return()=>{};v!==void 0&&S.mousemove===void 0&&(S.mousemove=v),he.reset();let ue=h===!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}:f!==void 0?f:{password:!0},ne=da(g);mn();let ft,as=0,vn=L=>{for(let ce of ie||[])ce.eventProcessor&&(L=ce.eventProcessor(L));return y&&!P&&(L=y(L)),L};J=(L,ce)=>{var Z;let K=L;if(K.timestamp=kt(),(Z=Ue[0])!=null&&Z.isFrozen()&&K.type!==I.FullSnapshot&&!(K.type===I.IncrementalSnapshot&&K.data.source===E.Mutation)&&Ue.forEach(oe=>oe.unfreeze()),X)e?.(vn(K),ce);else if(P){let oe={type:"rrweb",event:vn(K),origin:window.location.origin,isCheckout:ce};window.parent.postMessage(oe,"*")}if(K.type===I.FullSnapshot)ft=K,as=0;else if(K.type===I.IncrementalSnapshot){if(K.data.source===E.Mutation&&K.data.isAttachIframe)return;as++;let oe=r&&as>=r,B=t&&K.timestamp-ft.timestamp>t;(oe||B)&&Ir(!0)}};let zt=L=>{J({type:I.IncrementalSnapshot,data:{source:E.Mutation,...L}})},Cn=L=>J({type:I.IncrementalSnapshot,data:{source:E.Scroll,...L}}),En=L=>J({type:I.IncrementalSnapshot,data:{source:E.CanvasMutation,...L}}),gu=L=>J({type:I.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...L}}),Pe=new Oi({mutationCb:zt,adoptedStyleSheetCb:gu}),$e=new Ni({mirror:he,mutationCb:zt,stylesheetManager:Pe,recordCrossOriginIframes:W,wrappedEmit:J});for(let L of ie||[])L.getMirror&&L.getMirror({nodeMirror:he,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});let ls=new Di;Ds=new Ri({recordCanvas:N,mutationCb:En,win:window,blockClass:i,blockSelector:n,mirror:he,sampling:S.canvas,dataURLOptions:w});let Vt=new Ai({mutationCb:zt,scrollCb:Cn,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ue,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:N,inlineImages:se,sampling:S,slimDOMOptions:ne,iframeManager:$e,stylesheetManager:Pe,canvasManager:Ds,keepIframeSrcFn:O,processedNodeManager:ls},mirror:he});Ir=(L=!1)=>{if(!x)return;J({type:I.Meta,data:{href:window.location.href,width:fn(),height:hn()}},L),Pe.reset(),Vt.init(),Ue.forEach(Z=>Z.lock());let ce=Tc(document,{mirror:he,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ue,maskTextFn:p,maskInputFn:m,slimDOM:ne,dataURLOptions:w,recordCanvas:N,inlineImages:se,onSerialize:Z=>{tt(Z,he)&&$e.addIframe(Z),yn(Z,he)&&Pe.trackLinkElement(Z),Oe(Z)&&Vt.addShadowRoot(R.shadowRoot(Z),document)},onIframeLoad:(Z,K)=>{$e.attachIframe(Z,K),Vt.observeAttachShadow(Z)},onStylesheetLoad:(Z,K)=>{Pe.attachLinkElement(Z,K)},keepIframeSrcFn:O});if(!ce)return console.warn("Failed to snapshot the document");J({type:I.FullSnapshot,data:{node:ce,initialOffset:cn(window)}},L),Ue.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,he.getId(document))};try{let L=[],ce=K=>{var oe;return T(Im)({mutationCb:zt,mousemoveCb:(B,us)=>J({type:I.IncrementalSnapshot,data:{source:us,positions:B}}),mouseInteractionCb:B=>J({type:I.IncrementalSnapshot,data:{source:E.MouseInteraction,...B}}),scrollCb:Cn,viewportResizeCb:B=>J({type:I.IncrementalSnapshot,data:{source:E.ViewportResize,...B}}),inputCb:B=>J({type:I.IncrementalSnapshot,data:{source:E.Input,...B}}),mediaInteractionCb:B=>J({type:I.IncrementalSnapshot,data:{source:E.MediaInteraction,...B}}),styleSheetRuleCb:B=>J({type:I.IncrementalSnapshot,data:{source:E.StyleSheetRule,...B}}),styleDeclarationCb:B=>J({type:I.IncrementalSnapshot,data:{source:E.StyleDeclaration,...B}}),canvasMutationCb:En,fontCb:B=>J({type:I.IncrementalSnapshot,data:{source:E.Font,...B}}),selectionCb:B=>{J({type:I.IncrementalSnapshot,data:{source:E.Selection,...B}})},customElementCb:B=>{J({type:I.IncrementalSnapshot,data:{source:E.CustomElement,...B}})},blockClass:i,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:ue,inlineStylesheet:c,sampling:S,recordDOM:x,recordCanvas:N,inlineImages:se,userTriggeredOnInput:Y,collectFonts:Q,doc:K,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:O,blockSelector:n,slimDOMOptions:ne,dataURLOptions:w,mirror:he,iframeManager:$e,stylesheetManager:Pe,shadowDomManager:Vt,processedNodeManager:ls,canvasManager:Ds,ignoreCSSAttributes:ke,plugins:((oe=ie?.filter(B=>B.observer))==null?void 0:oe.map(B=>({observer:B.observer,options:B.options,callback:us=>J({type:I.Plugin,data:{plugin:B.name,payload:us}})})))||[]},d)};$e.addLoadListener(K=>{try{L.push(ce(K.contentDocument))}catch(oe){console.warn(oe)}});let Z=()=>{Ir(),L.push(ce(document)),Yr=!0};return["interactive","complete"].includes(document.readyState)?Z():(L.push(te("DOMContentLoaded",()=>{J({type:I.DomContentLoaded,data:{}}),U==="DOMContentLoaded"&&Z()})),L.push(te("load",()=>{J({type:I.Load,data:{}}),U==="load"&&Z()},window))),()=>{L.forEach(K=>{try{K()}catch(oe){String(oe).toLowerCase().includes("cross-origin")||console.warn(oe)}}),ls.destroy(),Yr=!1,hm()}}catch(L){console.warn(L)}}function eu(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}function km(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;let t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(y){let S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(y)}let a=o(s.navigator.userAgent)?1:0;function l(y,S){this.scrollLeft=y,this.scrollTop=S}function u(y){return .5*(1-Math.cos(Math.PI*y))}function c(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(y,S){if(S==="Y")return y.clientHeight+a<y.scrollHeight;if(S==="X")return y.clientWidth+a<y.scrollWidth}function f(y,S){let w=s.getComputedStyle(y,null)["overflow"+S];return w==="auto"||w==="scroll"}function g(y){let S=h(y,"Y")&&f(y,"Y"),w=h(y,"X")&&f(y,"X");return S||w}function m(y){for(;y!==e.body&&g(y)===!1;)y=y.parentNode||y.host;return y}function p(y){let S=n(),w,v,x,N=(S-y.startTime)/r;N=N>1?1:N,w=u(N),v=y.startX+(y.x-y.startX)*w,x=y.startY+(y.y-y.startY)*w,y.method.call(y.scrollable,v,x),(v!==y.x||x!==y.y)&&s.requestAnimationFrame(p.bind(s,y))}function d(y,S,w){let v,x,N,W,U=n();y===e.body?(v=s,x=s.scrollX||s.pageXOffset,N=s.scrollY||s.pageYOffset,W=i.scroll):(v=y,x=y.scrollLeft,N=y.scrollTop,W=l),p({scrollable:v,method:W,startTime:U,startX:x,startY:N,x:S,y:w})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}d.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,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}d.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let y=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof y>"u"?this.scrollLeft:~~y,typeof S>"u"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let y=m(this),S=y.getBoundingClientRect(),w=this.getBoundingClientRect();y!==e.body?(d.call(this,y,y.scrollLeft+w.left-S.left,y.scrollTop+w.top-S.top),s.getComputedStyle(y).position!=="fixed"&&s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}function Jo(s,e){if(s.type===I.IncrementalSnapshot&&s.data.source===E.MouseMove&&s.data.positions&&s.data.positions.length){let t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}function qo(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}function Ts(s){return s===void 0?[]:[].concat(s)}function Ze(s){return{type:"xstate.assign",assignment:s}}function Qo(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Xr(s){return function(e){return s===e}}function ru(s){return typeof s=="string"?{type:s}:s}function ea(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Xr(s)}}function ta(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](r,t):n.assignment[a]}),r=o,!1}return!0}),r,i]}function su(s,e){e===void 0&&(e={});var t=qo(ta(Ts(s.states[s.initial].entry).map(function(o){return Qo(o,e.actions)}),s.context,tu),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Xr(s.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,g=ru(a),m=s.states[h];if(m.on){var p=Ts(m.on[g.type]);try{for(var d=(function(P){var ue=typeof Symbol=="function"&&Symbol.iterator,ne=ue&&P[ue],ft=0;if(ne)return ne.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&ft>=P.length&&(P=void 0),{value:P&&P[ft++],done:!P}}};throw new TypeError(ue?"Object is not iterable.":"Symbol.iterator is not defined.")})(p),y=d.next();!y.done;y=d.next()){var S=y.value;if(S===void 0)return ea(h,f);var w=typeof S=="string"?{target:S}:S,v=w.target,x=w.actions,N=x===void 0?[]:x,W=w.cond,U=W===void 0?function(){return!0}:W,Y=v===void 0,Q=v??h,se=s.states[Q];if(U(f,g)){var ie=qo(ta((Y?Ts(N):[].concat(m.exit,N,se.entry).filter(function(P){return P})).map(function(P){return Qo(P,n._options.actions)}),f,g),3),O=ie[0],ke=ie[1],Le=ie[2],X=v??h;return{value:X,context:ke,actions:O,changed:v!==h||O.length>0||Le,matches:Xr(X)}}}}catch(P){l={error:P}}finally{try{y&&!y.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return ea(h,f)}};return n}function iu(s){var e=s.initialState,t=et.NotStarted,r=new Set,i={_machine:s,send:function(n){t===et.Running&&(e=s.transition(e,n),ra(e,ru(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Xr(o.value)}}return t=et.Running,ra(e,tu),i},stop:function(){return t=et.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Lm(s,e){for(let t=s.length-1;t>=0;t--){let r=s[t];if(r.type===I.Meta&&r.timestamp<=e)return s.slice(t)}return s}function Pm(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){let i=su({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ze({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:Ze((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),{...n,timeOffset:a,baselineTime:n.events[0].timestamp+a}}),play(n){var o;let{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(let m of l)Jo(m,u);let h=Lm(l,u),f=c?.timestamp;c?.type===I.IncrementalSnapshot&&c.data.source===E.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(_.PlayBack);let g=new Array;for(let m of h)if(!(f&&f<u&&(m.timestamp<=f||m===c)))if(m.timestamp<u)g.push(m);else{let p=e(m,!1);a.addAction({doAction:()=>{p()},delay:m.delay})}t(g),r.emit(_.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:Ze(n=>({...n,lastPlayedEvent:null})),startLive:Ze({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:Ze((n,o)=>{let{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){let{event:c}=o.payload;Jo(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let m=-1,p=0;for(;p<=h;){let d=Math.floor((p+h)/2);u[d].timestamp<=c.timestamp?p=d+1:h=d-1}m===-1&&(m=p),u.splice(m,0,c)}let f=c.timestamp<a,g=e(c,f);f?g():l.isActive()&&l.addAction({doAction:()=>{g()},delay:c.delay})}return{...n,events:u}})}});return iu(i)}function $m(s){let e=su({id:"speed",context:s,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:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:Ze({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return iu(e)}function nu(s,e){let t=sa.get(s);return t||(t=new Map,sa.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function De(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await De(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;let{rr_type:i,index:n}=r;return nu(e,i)[n]}else if("args"in r){let{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(De(s,e,t))))}else{if("base64"in r)return Mm(r.base64);if("src"in r){let i=s.get(r.src);if(i)return i;{let n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(De(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(De(s,e,t)));return r}}function Um(s,e){try{return e===Ee.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch{return null}}function Wm(s,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!Bm.includes(t))return;let r=nu(s,t);r.includes(e)||r.push(e)}async function zm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{let n=Um(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}let o=n[s.property],a=await Promise.all(s.args.map(De(r,n))),l=o.apply(n,a);Wm(n,l);let u=!1}catch(n){i(s,n)}}async function Vm({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){let n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}let o=e.map(async l=>Promise.all(l.args.map(De(r,n))));(await Promise.all(o)).forEach((l,u)=>{let c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}let h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(n,c.args)):h.apply(n,l)}catch(h){i(c,h)}})}async function _i({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{let o=i.get(s)||e,a="commands"in o?o.commands:[o];if([Ee.WebGL,Ee.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){let u=a[l];await zm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await Vm({event:s,mutations:a,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}function yr(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;let t=s,r=t.open,i=r&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(a?t.showModal():t.show())}}function jm(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;let t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}function na(s){return s.type==I.IncrementalSnapshot&&(s.data.source==E.TouchMove||s.data.source==E.MouseInteraction&&s.data.type==k.TouchStart)}var Fu,Uu,b,Yn,Bu,Wu,Xn,A,Zn,Kn,Xt,zu,bs,Ss,ee,It,Jn,hc,fc,dc,pc,yc,wc,xt,He,qn,Sc,vc,Qn,_c,eo,kc,Lc,Bi,V,pa,Fc,Uc,Bc,de,to,ro,Ls,Wi,Pt,so,Ps,ga,zc,Zr,Kt,Vc,jc,Gc,Hc,Us,Kr,Yc,Bs,Jr,Xc,Zc,Kc,Jc,io,no,qc,Qc,vs,eh,Ws,ya,rh,sh,oo,Jt,zs,Vs,ih,Cs,ao,nh,Es,oh,lo,Rr,qr,wa,wr,br,ba,Sa,va,uo,ah,lh,uh,ch,Ca,hh,js,Qr,Ea,Ia,xa,Ma,fh,Na,zi,Vi,Aa,ve,Be,dh,Ta,_a,Mt,ji,co,ka,Gs,La,ph,Hs,Gi,Is,ho,qt,fo,Qt,pt,er,tr,rr,mh,gh,yh,wh,bh,Sh,vh,Ch,Eh,Ih,sr,ir,xh,po,Mh,Pa,Or,Hi,$a,Fa,Ua,rt,$t,Nt,Ba,Wa,Nh,Dr,Yi,Ah,Rh,Oh,Dh,Th,mo,go,kh,Lh,Ph,$h,Fh,Xi,me,Uh,Bh,Wh,zh,Vh,jh,yo,Gh,Hh,Yh,Xh,Zh,st,Xs,it,ja,Kh,Jh,qh,Qh,ef,Zs,tf,rf,sf,nf,of,At,af,lf,uf,cf,hf,ff,df,pf,mf,gf,Ga,yf,wf,Zi,bf,Sf,Ha,vf,Ya,Xa,Cf,Ef,If,xf,Za,Ka,Mf,Nf,G,bo,Lf,Pf,C,$f,Ff,vo,Uf,Ki,j,Ja,Vf,jf,Gf,pe,Co,Eo,Ks,Ji,Ft,Io,Js,Qa,Yf,ts,nr,Xf,Zf,Kf,Jf,ei,rs,qf,ti,ss,Qf,ed,td,rd,xo,Mo,sd,id,xs,nd,ri,el,ad,ld,No,or,si,ii,ud,Ms,Ao,cd,Ns,hd,Ro,_r,is,tl,Sr,vr,rl,sl,il,Oo,fd,dd,pd,md,nl,gd,ni,ns,ol,al,ll,ul,yd,cl,qi,Qi,hl,Ce,We,wd,ml,gl,Ot,en,Do,yl,oi,wl,bd,ai,tn,As,To,ar,_o,lr,gt,ur,cr,hr,Sd,vd,Cd,Ed,Id,xd,Md,Nd,Ad,Rd,fr,dr,Od,ko,Dd,bl,kr,rn,Sl,vl,Cl,nt,Ut,Dt,El,Il,Td,Lr,sn,_d,kd,Ld,Pd,$d,Lo,Po,Ud,Bd,Wd,zd,Vd,nn,ge,jd,Gd,Hd,Yd,Xd,Zd,$o,Kd,Jd,qd,Qd,ep,ot,ui,at,Nl,tp,rp,sp,ip,np,ci,op,ap,lp,up,cp,Tt,hp,fp,dp,pp,mp,gp,yp,wp,bp,Sp,Al,vp,Cp,on,Ep,Ip,Rl,xp,Ol,Dl,Mp,Np,Ap,Rp,Tl,_l,Op,Dp,H,D,_p,kp,hi,Lp,Pp,fe,fi,$r,lt,di,pi,Fr,Ur,Br,mi,ae,gi,$p,ye,ut,Wp,ct,yi,wi,bi,Si,vi,zp,Vp,jp,Ci,Bo,Wo,pr,Xp,Rs,Os,R,Xe,Vr,kt,Lt,am,I,E,k,be,Ee,Re,_,Se,Ii,Vo,xi,Et,T,Ue,mm,Ho,Hr,Ni,Ai,Qe,bt,wt,xm,Mm,Yo,Kl,Jl,ql,Ql,Dm,Ko,Ri,Oi,Di,J,Ir,Ds,Yr,he,_m,Ti,et,tu,ra,Fm,sa,Bm,ki,Gm,Hm,ia,_s,Li,Ym,Xm,Zm,au=je(()=>{"use strict";Fu=Object.defineProperty,Uu=(s,e,t)=>e in s?Fu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>Uu(s,typeof e!="symbol"?e+"":e,t),Bu=Object.defineProperty,Wu=(s,e,t)=>e in s?Bu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Xn=(s,e,t)=>Wu(s,typeof e!="symbol"?e+"":e,t),A=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(A||{}),Zn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xt={},zu=()=>!!globalThis.Zone;bs={};Ss={};ee={ownerDocument:Vu,childNodes:ju,parentNode:Gu,parentElement:Hu,textContent:Yu,contains:Xu,getRootNode:Zu,host:Ku,styleSheets:Ju,shadowRoot:qu,querySelector:Qu,querySelectorAll:ec,mutationObserver:tc,patch:rc};It=class{constructor(){Xn(this,"idNodeMap",new Map),Xn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Jn="__rrweb_original__";hc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,fc=/^(?:[a-z+]+:)?\/\//i,dc=/^www\..*/i,pc=/^(data:)([^,]*),(.*)/i;yc=1,wc=new RegExp("[^a-z0-9-_:]"),xt=-2;Sc=/^[^ \t\n\r\u000c]+/,vc=/^[, \t\n\r\u000c]+/;Qn=new WeakMap;_c=/(max|min)-device-(width|height)/,eo=new RegExp(_c.source,"g"),kc={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(eo)&&(s.params=s.params.replace(eo,"$1-$2"))}}}},Lc={postcssPlugin:"postcss-hover-classes",prepare:function(){let s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
9
+ `+t.replace(/:hover/g,".\\:hover"))}))}}}};Bi={exports:{}},V=String,pa=function(){return{isColorSupported:!1,reset:V,bold:V,dim:V,italic:V,underline:V,inverse:V,hidden:V,strikethrough:V,black:V,red:V,green:V,yellow:V,blue:V,magenta:V,cyan:V,white:V,gray:V,bgBlack:V,bgRed:V,bgGreen:V,bgYellow:V,bgBlue:V,bgMagenta:V,bgCyan:V,bgWhite:V}};Bi.exports=pa();Bi.exports.createColors=pa;Fc=Bi.exports,Uc={},Bc=Object.freeze(Object.defineProperty({__proto__:null,default:Uc},Symbol.toStringTag,{value:"Module"})),de=$c(Bc),to=Fc,ro=de,Ls=class ma extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ma)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=to.isColorSupported),ro&&e&&(t=ro(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=to.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
10
10
  `+g+a("^")}return" "+l(f)+u}).join(`
11
11
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
12
12
 
13
13
  `+e+`
14
- `),this.name+": "+this.message+e}},Wi=Ls;Ls.default=Ls;$t={};$t.isClean=Symbol("isClean");$t.my=Symbol("my");so={after:`
14
+ `),this.name+": "+this.message+e}},Wi=Ls;Ls.default=Ls;Pt={};Pt.isClean=Symbol("isClean");Pt.my=Symbol("my");so={after:`
15
15
  `,beforeClose:`
16
16
  `,beforeComment:`
17
17
  `,beforeDecl:`
18
18
  `,beforeOpen:" ",beforeRule:`
19
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};$s=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
19
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};Ps=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
20
20
  `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<n;a++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return so[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Wc(r);this[a]?i=this[a](o,e):o.walk(l=>{if(i=l.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=so[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
21
21
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
22
22
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
23
23
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
24
24
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
25
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},ga=$s;$s.default=$s;zc=ga;Zr=Ps;Ps.default=Ps;({isClean:Kt,my:Vc}=$t),jc=Wi,Gc=ga,Hc=Zr;Us=class{constructor(e={}){this.raws={},this[Kt]=!1,this[Vc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Fs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new jc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Kt]){this[Kt]=!1;let e=this;for(;e=e.parent;)e[Kt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
25
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},ga=Ps;Ps.default=Ps;zc=ga;Zr=$s;$s.default=$s;({isClean:Kt,my:Vc}=Pt),jc=Wi,Gc=ga,Hc=Zr;Us=class{constructor(e={}){this.raws={},this[Kt]=!1,this[Vc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Fs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new jc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Kt]){this[Kt]=!1;let e=this;for(;e=e.parent;)e[Kt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
26
26
  `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Gc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Hc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}},Kr=Us;Us.default=Us;Yc=Kr,Bs=class extends Yc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Jr=Bs;Bs.default=Bs;Xc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Zc=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Kc=(s=21)=>{let e="",t=s;for(;t--;)e+=Xc[Math.random()*64|0];return e},Jc={nanoid:Kc,customAlphabet:Zc},{SourceMapConsumer:io,SourceMapGenerator:no}=de,{existsSync:qc,readFileSync:Qc}=de,{dirname:vs,join:eh}=de;Ws=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=vs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new io(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return th(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=vs(e),qc(e))return this.mapFile=e,Qc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof io)return no.fromSourceMap(t).toString();if(t instanceof no)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=eh(vs(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},ya=Ws;Ws.default=Ws;({SourceMapConsumer:rh,SourceMapGenerator:sh}=de),{fileURLToPath:oo,pathToFileURL:Jt}=de,{isAbsolute:zs,resolve:Vs}=de,{nanoid:ih}=Jc,Cs=de,ao=Wi,nh=ya,Es=Symbol("fromOffsetCache"),oh=!!(rh&&sh),lo=!!(Vs&&zs),Rr=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!lo||/^\w+:\/\//.test(t.from)||zs(t.from)?this.file=t.from:this.file=Vs(t.from)),lo&&oh){let r=new nh(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ih(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,a=h.col}else o=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,o,a);return l?n=new ao(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):n=new ao(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(Jt&&(n.input.url=Jt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Es])r=this[Es];else{let n=this.css.split(`
27
- `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[Es]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Vs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;zs(o.source)?l=Jt(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Jt(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(oo)u.file=oo(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},qr=Rr;Rr.default=Rr;Cs&&Cs.registerInput&&Cs.registerInput(Rr);({SourceMapConsumer:wa,SourceMapGenerator:wr}=de),{dirname:Sr,relative:Sa,resolve:ba,sep:va}=de,{pathToFileURL:uo}=de,ah=qr,lh=!!(wa&&wr),uh=!!(Sr&&ba&&Sa&&va),ch=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
27
+ `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[Es]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Vs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;zs(o.source)?l=Jt(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Jt(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(oo)u.file=oo(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},qr=Rr;Rr.default=Rr;Cs&&Cs.registerInput&&Cs.registerInput(Rr);({SourceMapConsumer:wa,SourceMapGenerator:wr}=de),{dirname:br,relative:ba,resolve:Sa,sep:va}=de,{pathToFileURL:uo}=de,ah=qr,lh=!!(wa&&wr),uh=!!(br&&Sa&&ba&&va),ch=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
28
28
  `;this.css.includes(`\r
29
29
  `)&&(t=`\r
30
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Sr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new wa(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),uh&&lh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=wr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new wr({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 wr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
31
- `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Sr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Sr(ba(r,this.mapOpts.annotation)));let i=Sa(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ah(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(uo){let r=uo(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;va==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Ca=ch,hh=Kr,js=class extends hh{constructor(e){super(e),this.type="comment"}},Qr=js;js.default=js;({isClean:Ea,my:Ia}=$t),xa=Jr,Ma=Qr,fh=Kr;ve=class Da extends fh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ra(Na(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xa(e)]}else if(e.selector)e=[new zi(e)];else if(e.name)e=[new Vi(e)];else if(e.text)e=[new Ma(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ia]||Da.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ea]&&Oa(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ve.registerParse=s=>{Na=s};ve.registerRule=s=>{zi=s};ve.registerAtRule=s=>{Vi=s};ve.registerRoot=s=>{Aa=s};Be=ve;ve.default=ve;ve.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Vi.prototype):s.type==="rule"?Object.setPrototypeOf(s,zi.prototype):s.type==="decl"?Object.setPrototypeOf(s,xa.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ma.prototype):s.type==="root"&&Object.setPrototypeOf(s,Aa.prototype),s[Ia]=!0,s.nodes&&s.nodes.forEach(e=>{ve.rebuild(e)})};dh=Be,Mt=class extends dh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ta(new _a,this,e).stringify()}};Mt.registerLazyResult=s=>{Ta=s};Mt.registerProcessor=s=>{_a=s};ji=Mt;Mt.default=Mt;co={},ka=function(e){co[e]||(co[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},Gs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}},La=Gs;Gs.default=Gs;ph=La,Hs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ph(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Gi=Hs;Hs.default=Hs;Is=39,ho=34,qt=92,fo=47,Qt=10,pt=32,er=12,tr=9,rr=13,mh=91,gh=93,yh=40,wh=41,Sh=123,bh=125,vh=59,Ch=42,Eh=58,Ih=64,sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,ir=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xh=/.[\r\n"'(/\\]/,po=/[\da-f]/i,Mh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,g,m,p=r.length,d=0,y=[],b=[];function w(){return d}function v(A){throw e.error("Unclosed "+A,d)}function x(){return b.length===0&&d>=p}function N(A){if(b.length)return b.pop();if(d>=p)return;let P=A?A.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case Qt:case pt:case tr:case rr:case er:{o=d;do o+=1,n=r.charCodeAt(o);while(n===pt||n===Qt||n===tr||n===rr||n===er);m=["space",r.slice(d,o)],d=o-1;break}case mh:case gh:case Sh:case bh:case Eh:case vh:case wh:{let q=String.fromCharCode(n);m=[q,q,d];break}case yh:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==Is&&g!==ho&&g!==pt&&g!==Qt&&g!==tr&&g!==er&&g!==rr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||P){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===qt;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||xh.test(l)?m=["(","(",d]:(m=["brackets",l,d,o],d=o);break}case Is:case ho:{a=n===Is?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||P){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===qt;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Ih:{sr.lastIndex=d+1,sr.test(r),sr.lastIndex===0?o=r.length-1:o=sr.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case qt:{for(o=d,u=!0;r.charCodeAt(o+1)===qt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==fo&&n!==pt&&n!==Qt&&n!==tr&&n!==rr&&n!==er&&(o+=1,po.test(r.charAt(o)))){for(;po.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===pt&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===fo&&r.charCodeAt(d+1)===Ch?(o=r.indexOf("*/",d+2)+1,o===0&&(i||P?o=r.length:v("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(ir.lastIndex=d+1,ir.test(r),ir.lastIndex===0?o=r.length-1:o=ir.lastIndex-2,m=["word",r.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function R(A){b.push(A)}return{back:R,endOfFile:x,nextToken:N,position:w}},$a=Be,Or=class extends $a{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Hi=Or;Or.default=Or;$a.registerAtRule(Or);Pa=Be,rt=class extends Pa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Fa(new Ua,this,e).stringify()}};rt.registerLazyResult=s=>{Fa=s};rt.registerProcessor=s=>{Ua=s};Pt=rt;rt.default=rt;Pa.registerRoot(rt);Nt={comma(s){return Nt.split(s,[","],!0)},space(s){let e=[" ",`
32
- `," "];return Nt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Ba=Nt;Nt.default=Nt;Wa=Be,Nh=Ba,Dr=class extends Wa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Nh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Yi=Dr;Dr.default=Dr;Wa.registerRule(Dr);Ah=Jr,Rh=Mh,Oh=Qr,Dh=Hi,Th=Pt,mo=Yi,go={empty:!0,space:!0};kh=class{constructor(e){this.input=e,this.root=new Th,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Dh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Oh;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Rh(this.input)}decl(e,t){let r=new Ah;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||_h(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new mo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!go[h]&&!go[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new mo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Lh=kh,$h=Be,Ph=Lh,Fh=qr;Xi=Tr;Tr.default=Tr;$h.registerParse(Tr);({isClean:me,my:Uh}=$t),Bh=Ca,Wh=Zr,zh=Be,Vh=ji,jh=ka,yo=Gi,Gh=Xi,Hh=Pt,Yh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xh={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},Zh={Once:!0,postcssPlugin:!0,prepare:!0},st=0;Xs={},it=class Va{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Ys(t);else if(t instanceof Va||t instanceof yo)i=Ys(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Gh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Uh]&&zh.rebuild(i)}this.result=new yo(e,i,r),this.helpers={...Xs,postcss:Xs,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,a=n.split("."),l=o.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Xh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Zh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(mt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=!0;let t=[wo(e)];for(;t.length>0;){let r=this.visitTick(t);if(mt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return mt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Wh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Bh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(mt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||jh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(mt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[me]){a[me]=!0,e.push(wo(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===st){r.nodes&&r.nodes.length&&(r[me]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[me]=!0;let t=za(e);for(let r of t)if(r===st)e.nodes&&e.each(i=>{i[me]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};it.registerPostcss=s=>{Xs=s};ja=it;it.default=it;Hh.registerLazyResult(it);Vh.registerLazyResult(it);Kh=Ca,Jh=Zr,qh=ka,Qh=Xi,ef=Gi,Zs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Jh;this.result=new ef(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Kh(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||qh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Qh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},tf=Zs;Zs.default=Zs;rf=tf,sf=ja,nf=ji,of=Pt,At=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new rf(this,e,t):new sf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},af=At;At.default=At;of.registerProcessor(At);nf.registerProcessor(At);lf=Jr,uf=ya,cf=Qr,hf=Hi,ff=qr,df=Pt,pf=Yi;mf=Rt;Rt.default=Rt;gf=Wi,Ga=Jr,yf=ja,wf=Be,Zi=af,Sf=Zr,bf=mf,Ha=ji,vf=La,Ya=Qr,Xa=Hi,Cf=Gi,Ef=qr,If=Xi,xf=Ba,Za=Yi,Ka=Pt,Mf=Kr;B.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
30
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||br(e.file),i;this.mapOpts.sourcesContent===!1?(i=new wa(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),uh&&lh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=wr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new wr({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 wr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
31
+ `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?br(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=br(Sa(r,this.mapOpts.annotation)));let i=ba(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ah(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(uo){let r=uo(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;va==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Ca=ch,hh=Kr,js=class extends hh{constructor(e){super(e),this.type="comment"}},Qr=js;js.default=js;({isClean:Ea,my:Ia}=Pt),xa=Jr,Ma=Qr,fh=Kr;ve=class Da extends fh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ra(Na(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xa(e)]}else if(e.selector)e=[new zi(e)];else if(e.name)e=[new Vi(e)];else if(e.text)e=[new Ma(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ia]||Da.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ea]&&Oa(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ve.registerParse=s=>{Na=s};ve.registerRule=s=>{zi=s};ve.registerAtRule=s=>{Vi=s};ve.registerRoot=s=>{Aa=s};Be=ve;ve.default=ve;ve.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Vi.prototype):s.type==="rule"?Object.setPrototypeOf(s,zi.prototype):s.type==="decl"?Object.setPrototypeOf(s,xa.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ma.prototype):s.type==="root"&&Object.setPrototypeOf(s,Aa.prototype),s[Ia]=!0,s.nodes&&s.nodes.forEach(e=>{ve.rebuild(e)})};dh=Be,Mt=class extends dh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ta(new _a,this,e).stringify()}};Mt.registerLazyResult=s=>{Ta=s};Mt.registerProcessor=s=>{_a=s};ji=Mt;Mt.default=Mt;co={},ka=function(e){co[e]||(co[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},Gs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}},La=Gs;Gs.default=Gs;ph=La,Hs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ph(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Gi=Hs;Hs.default=Hs;Is=39,ho=34,qt=92,fo=47,Qt=10,pt=32,er=12,tr=9,rr=13,mh=91,gh=93,yh=40,wh=41,bh=123,Sh=125,vh=59,Ch=42,Eh=58,Ih=64,sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,ir=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xh=/.[\r\n"'(/\\]/,po=/[\da-f]/i,Mh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,g,m,p=r.length,d=0,y=[],S=[];function w(){return d}function v(U){throw e.error("Unclosed "+U,d)}function x(){return S.length===0&&d>=p}function N(U){if(S.length)return S.pop();if(d>=p)return;let Y=U?U.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case Qt:case pt:case tr:case rr:case er:{o=d;do o+=1,n=r.charCodeAt(o);while(n===pt||n===Qt||n===tr||n===rr||n===er);m=["space",r.slice(d,o)],d=o-1;break}case mh:case gh:case bh:case Sh:case Eh:case vh:case wh:{let Q=String.fromCharCode(n);m=[Q,Q,d];break}case yh:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==Is&&g!==ho&&g!==pt&&g!==Qt&&g!==tr&&g!==er&&g!==rr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||Y){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===qt;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||xh.test(l)?m=["(","(",d]:(m=["brackets",l,d,o],d=o);break}case Is:case ho:{a=n===Is?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||Y){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===qt;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Ih:{sr.lastIndex=d+1,sr.test(r),sr.lastIndex===0?o=r.length-1:o=sr.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case qt:{for(o=d,u=!0;r.charCodeAt(o+1)===qt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==fo&&n!==pt&&n!==Qt&&n!==tr&&n!==rr&&n!==er&&(o+=1,po.test(r.charAt(o)))){for(;po.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===pt&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===fo&&r.charCodeAt(d+1)===Ch?(o=r.indexOf("*/",d+2)+1,o===0&&(i||Y?o=r.length:v("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(ir.lastIndex=d+1,ir.test(r),ir.lastIndex===0?o=r.length-1:o=ir.lastIndex-2,m=["word",r.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function W(U){S.push(U)}return{back:W,endOfFile:x,nextToken:N,position:w}},Pa=Be,Or=class extends Pa{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Hi=Or;Or.default=Or;Pa.registerAtRule(Or);$a=Be,rt=class extends $a{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Fa(new Ua,this,e).stringify()}};rt.registerLazyResult=s=>{Fa=s};rt.registerProcessor=s=>{Ua=s};$t=rt;rt.default=rt;$a.registerRoot(rt);Nt={comma(s){return Nt.split(s,[","],!0)},space(s){let e=[" ",`
32
+ `," "];return Nt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Ba=Nt;Nt.default=Nt;Wa=Be,Nh=Ba,Dr=class extends Wa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Nh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Yi=Dr;Dr.default=Dr;Wa.registerRule(Dr);Ah=Jr,Rh=Mh,Oh=Qr,Dh=Hi,Th=$t,mo=Yi,go={empty:!0,space:!0};kh=class{constructor(e){this.input=e,this.root=new Th,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Dh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Oh;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Rh(this.input)}decl(e,t){let r=new Ah;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||_h(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new mo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!go[h]&&!go[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new mo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Lh=kh,Ph=Be,$h=Lh,Fh=qr;Xi=Tr;Tr.default=Tr;Ph.registerParse(Tr);({isClean:me,my:Uh}=Pt),Bh=Ca,Wh=Zr,zh=Be,Vh=ji,jh=ka,yo=Gi,Gh=Xi,Hh=$t,Yh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xh={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},Zh={Once:!0,postcssPlugin:!0,prepare:!0},st=0;Xs={},it=class Va{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Ys(t);else if(t instanceof Va||t instanceof yo)i=Ys(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Gh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Uh]&&zh.rebuild(i)}this.result=new yo(e,i,r),this.helpers={...Xs,postcss:Xs,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,a=n.split("."),l=o.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Xh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Zh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(mt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=!0;let t=[wo(e)];for(;t.length>0;){let r=this.visitTick(t);if(mt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return mt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Wh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Bh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(mt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||jh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(mt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[me]){a[me]=!0,e.push(wo(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===st){r.nodes&&r.nodes.length&&(r[me]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[me]=!0;let t=za(e);for(let r of t)if(r===st)e.nodes&&e.each(i=>{i[me]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};it.registerPostcss=s=>{Xs=s};ja=it;it.default=it;Hh.registerLazyResult(it);Vh.registerLazyResult(it);Kh=Ca,Jh=Zr,qh=ka,Qh=Xi,ef=Gi,Zs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Jh;this.result=new ef(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Kh(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||qh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Qh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},tf=Zs;Zs.default=Zs;rf=tf,sf=ja,nf=ji,of=$t,At=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new rf(this,e,t):new sf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},af=At;At.default=At;of.registerProcessor(At);nf.registerProcessor(At);lf=Jr,uf=ya,cf=Qr,hf=Hi,ff=qr,df=$t,pf=Yi;mf=Rt;Rt.default=Rt;gf=Wi,Ga=Jr,yf=ja,wf=Be,Zi=af,bf=Zr,Sf=mf,Ha=ji,vf=La,Ya=Qr,Xa=Hi,Cf=Gi,Ef=qr,If=Xi,xf=Ba,Za=Yi,Ka=$t,Mf=Kr;$.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
33
33
  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:
34
- https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Zi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return B([i(l)]).process(o,a)},i};B.stringify=Sf;B.parse=If;B.fromJSON=bf;B.list=xf;B.comment=s=>new Ya(s);B.atRule=s=>new Xa(s);B.decl=s=>new Ga(s);B.rule=s=>new Za(s);B.root=s=>new Ka(s);B.document=s=>new Ha(s);B.CssSyntaxError=gf;B.Declaration=Ga;B.Container=wf;B.Processor=Zi;B.Document=Ha;B.Comment=Ya;B.Warning=vf;B.AtRule=Xa;B.Result=Cf;B.Input=Ef;B.Rule=Za;B.Root=Ka;B.Node=Mf;yf.registerPostcss(B);Nf=B;B.default=B;H=$c(Nf);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;So={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"};Lf=Object.defineProperty,$f=(s,e,t)=>e in s?Lf(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,C=(s,e,t)=>$f(s,typeof e!="symbol"?e+"":e,t),Pf=Object.defineProperty,Ff=(s,e,t)=>e in s?Pf(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,vo=(s,e,t)=>Ff(s,typeof e!="symbol"?e+"":e,t),Uf=class{constructor(){vo(this,"idNodeMap",new Map),vo(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Ki={exports:{}},G=String,Ja=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};Ki.exports=Ja();Ki.exports.createColors=Ja;Vf=Ki.exports,jf={},Gf=Object.freeze(Object.defineProperty({__proto__:null,default:jf},Symbol.toStringTag,{value:"Module"})),pe=zf(Gf),Co=Vf,Eo=pe,Ks=class qa extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,qa)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Co.isColorSupported),Eo&&e&&(t=Eo(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=Co.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
34
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Zi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return $([i(l)]).process(o,a)},i};$.stringify=bf;$.parse=If;$.fromJSON=Sf;$.list=xf;$.comment=s=>new Ya(s);$.atRule=s=>new Xa(s);$.decl=s=>new Ga(s);$.rule=s=>new Za(s);$.root=s=>new Ka(s);$.document=s=>new Ha(s);$.CssSyntaxError=gf;$.Declaration=Ga;$.Container=wf;$.Processor=Zi;$.Document=Ha;$.Comment=Ya;$.Warning=vf;$.AtRule=Xa;$.Result=Cf;$.Input=Ef;$.Rule=Za;$.Root=Ka;$.Node=Mf;yf.registerPostcss($);Nf=$;$.default=$;G=Pc(Nf);G.stringify;G.fromJSON;G.plugin;G.parse;G.list;G.document;G.comment;G.atRule;G.rule;G.decl;G.root;G.CssSyntaxError;G.Declaration;G.Container;G.Processor;G.Document;G.Comment;G.Warning;G.AtRule;G.Result;G.Input;G.Rule;G.Root;G.Node;bo={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"};Lf=Object.defineProperty,Pf=(s,e,t)=>e in s?Lf(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,C=(s,e,t)=>Pf(s,typeof e!="symbol"?e+"":e,t),$f=Object.defineProperty,Ff=(s,e,t)=>e in s?$f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,vo=(s,e,t)=>Ff(s,typeof e!="symbol"?e+"":e,t),Uf=class{constructor(){vo(this,"idNodeMap",new Map),vo(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Ki={exports:{}},j=String,Ja=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};Ki.exports=Ja();Ki.exports.createColors=Ja;Vf=Ki.exports,jf={},Gf=Object.freeze(Object.defineProperty({__proto__:null,default:jf},Symbol.toStringTag,{value:"Module"})),pe=zf(Gf),Co=Vf,Eo=pe,Ks=class qa extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,qa)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Co.isColorSupported),Eo&&e&&(t=Eo(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=Co.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
35
35
  `+g+a("^")}return" "+l(f)+u}).join(`
36
36
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
37
37
 
@@ -49,16 +49,16 @@ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.p
49
49
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
50
50
  `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Qa=Js;Js.default=Js;Yf=Qa;ts=qs;qs.default=qs;({isClean:nr,my:Xf}=Ft),Zf=Ji,Kf=Qa,Jf=ts;ei=class{constructor(e={}){this.raws={},this[nr]=!1,this[Xf]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Qs(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Zf(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[nr]){this[nr]=!1;let e=this;for(;e=e.parent;)e[nr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
51
51
  `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Kf().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))r[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),r[o]={end:a.end,inputId:l,start:a.start}}else r[o]=a}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Jf){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}},rs=ei;ei.default=ei;qf=rs,ti=class extends qf{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},ss=ti;ti.default=ti;Qf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ed=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},td=(s=21)=>{let e="",t=s;for(;t--;)e+=Qf[Math.random()*64|0];return e},rd={nanoid:td,customAlphabet:ed},{SourceMapConsumer:xo,SourceMapGenerator:Mo}=pe,{existsSync:sd,readFileSync:id}=pe,{dirname:xs,join:nd}=pe;ri=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=xs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new xo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return od(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=xs(e),sd(e))return this.mapFile=e,id(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof xo)return Mo.fromSourceMap(t).toString();if(t instanceof Mo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=nd(xs(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},el=ri;ri.default=ri;({SourceMapConsumer:ad,SourceMapGenerator:ld}=pe),{fileURLToPath:No,pathToFileURL:or}=pe,{isAbsolute:si,resolve:ii}=pe,{nanoid:ud}=rd,Ms=pe,Ao=Ji,cd=el,Ns=Symbol("fromOffsetCache"),hd=!!(ad&&ld),Ro=!!(ii&&si),_r=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ro||/^\w+:\/\//.test(t.from)||si(t.from)?this.file=t.from:this.file=ii(t.from)),Ro&&hd){let r=new cd(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ud(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,a=h.col}else o=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,o,a);return l?n=new Ao(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):n=new Ao(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:a,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(or&&(n.input.url=or(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ns])r=this[Ns];else{let n=this.css.split(`
52
- `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[Ns]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ii(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;si(o.source)?l=or(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||or(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(No)u.file=No(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},is=_r;_r.default=_r;Ms&&Ms.registerInput&&Ms.registerInput(_r);({SourceMapConsumer:tl,SourceMapGenerator:br}=pe),{dirname:vr,relative:rl,resolve:sl,sep:il}=pe,{pathToFileURL:Oo}=pe,fd=is,dd=!!(tl&&br),pd=!!(vr&&sl&&rl&&il),md=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
52
+ `);r=new Array(n.length);let o=0;for(let a=0,l=n.length;a<l;a++)r[a]=o,o+=n[a].length+1;this[Ns]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ii(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:i,line:r}));let l;si(o.source)?l=or(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||or(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(No)u.file=No(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},is=_r;_r.default=_r;Ms&&Ms.registerInput&&Ms.registerInput(_r);({SourceMapConsumer:tl,SourceMapGenerator:Sr}=pe),{dirname:vr,relative:rl,resolve:sl,sep:il}=pe,{pathToFileURL:Oo}=pe,fd=is,dd=!!(tl&&Sr),pd=!!(vr&&sl&&rl&&il),md=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
53
53
  `;this.css.includes(`\r
54
54
  `)&&(t=`\r
55
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||vr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new tl(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pd&&dd&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=br.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new br({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 br({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
56
- `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?vr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=vr(sl(r,this.mapOpts.annotation)));let i=rl(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new fd(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Oo){let r=Oo(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;il==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},nl=md,gd=rs,ni=class extends gd{constructor(e){super(e),this.type="comment"}},ns=ni;ni.default=ni;({isClean:ol,my:al}=Ft),ll=ss,ul=ns,yd=rs;Ce=class pl extends yd{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fl(cl(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ll(e)]}else if(e.selector)e=[new qi(e)];else if(e.name)e=[new Qi(e)];else if(e.text)e=[new ul(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[al]||pl.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ol]&&dl(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Ce.registerParse=s=>{cl=s};Ce.registerRule=s=>{qi=s};Ce.registerAtRule=s=>{Qi=s};Ce.registerRoot=s=>{hl=s};We=Ce;Ce.default=Ce;Ce.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Qi.prototype):s.type==="rule"?Object.setPrototypeOf(s,qi.prototype):s.type==="decl"?Object.setPrototypeOf(s,ll.prototype):s.type==="comment"?Object.setPrototypeOf(s,ul.prototype):s.type==="root"&&Object.setPrototypeOf(s,hl.prototype),s[al]=!0,s.nodes&&s.nodes.forEach(e=>{Ce.rebuild(e)})};wd=We,Ot=class extends wd{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ml(new gl,this,e).stringify()}};Ot.registerLazyResult=s=>{ml=s};Ot.registerProcessor=s=>{gl=s};en=Ot;Ot.default=Ot;Do={},yl=function(e){Do[e]||(Do[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},oi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}},wl=oi;oi.default=oi;Sd=wl,ai=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Sd(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},tn=ai;ai.default=ai;As=39,To=34,ar=92,_o=47,lr=10,gt=32,ur=12,cr=9,hr=13,bd=91,vd=93,Cd=40,Ed=41,Id=123,xd=125,Md=59,Nd=42,Ad=58,Rd=64,fr=/[\t\n\f\r "#'()/;[\\\]{}]/g,dr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Od=/.[\r\n"'(/\\]/,ko=/[\da-f]/i,Dd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,g,m,p=r.length,d=0,y=[],b=[];function w(){return d}function v(A){throw e.error("Unclosed "+A,d)}function x(){return b.length===0&&d>=p}function N(A){if(b.length)return b.pop();if(d>=p)return;let P=A?A.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case lr:case gt:case cr:case hr:case ur:{o=d;do o+=1,n=r.charCodeAt(o);while(n===gt||n===lr||n===cr||n===hr||n===ur);m=["space",r.slice(d,o)],d=o-1;break}case bd:case vd:case Id:case xd:case Ad:case Md:case Ed:{let q=String.fromCharCode(n);m=[q,q,d];break}case Cd:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==As&&g!==To&&g!==gt&&g!==lr&&g!==cr&&g!==ur&&g!==hr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||P){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===ar;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||Od.test(l)?m=["(","(",d]:(m=["brackets",l,d,o],d=o);break}case As:case To:{a=n===As?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||P){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===ar;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Rd:{fr.lastIndex=d+1,fr.test(r),fr.lastIndex===0?o=r.length-1:o=fr.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case ar:{for(o=d,u=!0;r.charCodeAt(o+1)===ar;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==_o&&n!==gt&&n!==lr&&n!==cr&&n!==hr&&n!==ur&&(o+=1,ko.test(r.charAt(o)))){for(;ko.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===gt&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===_o&&r.charCodeAt(d+1)===Nd?(o=r.indexOf("*/",d+2)+1,o===0&&(i||P?o=r.length:v("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(dr.lastIndex=d+1,dr.test(r),dr.lastIndex===0?o=r.length-1:o=dr.lastIndex-2,m=["word",r.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function R(A){b.push(A)}return{back:R,endOfFile:x,nextToken:N,position:w}},Sl=We,kr=class extends Sl{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},rn=kr;kr.default=kr;Sl.registerAtRule(kr);bl=We,nt=class extends bl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new vl(new Cl,this,e).stringify()}};nt.registerLazyResult=s=>{vl=s};nt.registerProcessor=s=>{Cl=s};Ut=nt;nt.default=nt;bl.registerRoot(nt);Dt={comma(s){return Dt.split(s,[","],!0)},space(s){let e=[" ",`
57
- `," "];return Dt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},El=Dt;Dt.default=Dt;Il=We,Td=El,Lr=class extends Il{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Td.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},sn=Lr;Lr.default=Lr;Il.registerRule(Lr);_d=ss,kd=Dd,Ld=ns,$d=rn,Pd=Ut,Lo=sn,$o={empty:!0,space:!0};Ud=class{constructor(e){this.input=e,this.root=new Pd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new $d;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Ld;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=kd(this.input)}decl(e,t){let r=new _d;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Fd(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Lo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!$o[h]&&!$o[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Lo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Bd=Ud,Wd=We,zd=Bd,Vd=is;nn=$r;$r.default=$r;Wd.registerParse($r);({isClean:ge,my:jd}=Ft),Gd=nl,Hd=ts,Yd=We,Xd=en,Zd=yl,Po=tn,Kd=nn,Jd=Ut,qd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Qd={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},ep={Once:!0,postcssPlugin:!0,prepare:!0},ot=0;ui={},at=class Ml{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=li(t);else if(t instanceof Ml||t instanceof Po)i=li(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Kd;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[jd]&&Yd.rebuild(i)}this.result=new Po(e,i,r),this.helpers={...ui,postcss:ui,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,a=n.split("."),l=o.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Qd[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ep[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(yt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=!0;let t=[Fo(e)];for(;t.length>0;){let r=this.visitTick(t);if(yt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return yt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Hd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Gd(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(yt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Zd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(yt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[ge]){a[ge]=!0,e.push(Fo(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ot){r.nodes&&r.nodes.length&&(r[ge]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ge]=!0;let t=xl(e);for(let r of t)if(r===ot)e.nodes&&e.each(i=>{i[ge]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};at.registerPostcss=s=>{ui=s};Nl=at;at.default=at;Jd.registerLazyResult(at);Xd.registerLazyResult(at);tp=nl,rp=ts,sp=yl,ip=nn,np=tn,ci=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=rp;this.result=new np(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new tp(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||sp("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ip;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},op=ci;ci.default=ci;ap=op,lp=Nl,up=en,cp=Ut,Tt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ap(this,e,t):new lp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},hp=Tt;Tt.default=Tt;cp.registerProcessor(Tt);up.registerProcessor(Tt);fp=ss,dp=el,pp=ns,mp=rn,gp=is,yp=Ut,wp=sn;Sp=_t;_t.default=_t;bp=Ji,Al=ss,vp=Nl,Cp=We,on=hp,Ep=ts,Ip=Sp,Rl=en,xp=wl,Ol=ns,Dl=rn,Mp=tn,Np=is,Ap=nn,Rp=El,Tl=sn,_l=Ut,Op=rs;W.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
55
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||vr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new tl(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pd&&dd&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Sr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Sr({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 Sr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=a.match(/\n/g),n?(e+=n.length,o=a.lastIndexOf(`
56
+ `),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?vr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=vr(sl(r,this.mapOpts.annotation)));let i=rl(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new fd(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Oo){let r=Oo(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;il==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},nl=md,gd=rs,ni=class extends gd{constructor(e){super(e),this.type="comment"}},ns=ni;ni.default=ni;({isClean:ol,my:al}=Ft),ll=ss,ul=ns,yd=rs;Ce=class pl extends yd{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fl(cl(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ll(e)]}else if(e.selector)e=[new qi(e)];else if(e.name)e=[new Qi(e)];else if(e.text)e=[new ul(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[al]||pl.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ol]&&dl(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Ce.registerParse=s=>{cl=s};Ce.registerRule=s=>{qi=s};Ce.registerAtRule=s=>{Qi=s};Ce.registerRoot=s=>{hl=s};We=Ce;Ce.default=Ce;Ce.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Qi.prototype):s.type==="rule"?Object.setPrototypeOf(s,qi.prototype):s.type==="decl"?Object.setPrototypeOf(s,ll.prototype):s.type==="comment"?Object.setPrototypeOf(s,ul.prototype):s.type==="root"&&Object.setPrototypeOf(s,hl.prototype),s[al]=!0,s.nodes&&s.nodes.forEach(e=>{Ce.rebuild(e)})};wd=We,Ot=class extends wd{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ml(new gl,this,e).stringify()}};Ot.registerLazyResult=s=>{ml=s};Ot.registerProcessor=s=>{gl=s};en=Ot;Ot.default=Ot;Do={},yl=function(e){Do[e]||(Do[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},oi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}},wl=oi;oi.default=oi;bd=wl,ai=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new bd(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},tn=ai;ai.default=ai;As=39,To=34,ar=92,_o=47,lr=10,gt=32,ur=12,cr=9,hr=13,Sd=91,vd=93,Cd=40,Ed=41,Id=123,xd=125,Md=59,Nd=42,Ad=58,Rd=64,fr=/[\t\n\f\r "#'()/;[\\\]{}]/g,dr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Od=/.[\r\n"'(/\\]/,ko=/[\da-f]/i,Dd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,g,m,p=r.length,d=0,y=[],S=[];function w(){return d}function v(U){throw e.error("Unclosed "+U,d)}function x(){return S.length===0&&d>=p}function N(U){if(S.length)return S.pop();if(d>=p)return;let Y=U?U.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case lr:case gt:case cr:case hr:case ur:{o=d;do o+=1,n=r.charCodeAt(o);while(n===gt||n===lr||n===cr||n===hr||n===ur);m=["space",r.slice(d,o)],d=o-1;break}case Sd:case vd:case Id:case xd:case Ad:case Md:case Ed:{let Q=String.fromCharCode(n);m=[Q,Q,d];break}case Cd:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==As&&g!==To&&g!==gt&&g!==lr&&g!==cr&&g!==ur&&g!==hr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||Y){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===ar;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||Od.test(l)?m=["(","(",d]:(m=["brackets",l,d,o],d=o);break}case As:case To:{a=n===As?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||Y){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===ar;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Rd:{fr.lastIndex=d+1,fr.test(r),fr.lastIndex===0?o=r.length-1:o=fr.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case ar:{for(o=d,u=!0;r.charCodeAt(o+1)===ar;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==_o&&n!==gt&&n!==lr&&n!==cr&&n!==hr&&n!==ur&&(o+=1,ko.test(r.charAt(o)))){for(;ko.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===gt&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===_o&&r.charCodeAt(d+1)===Nd?(o=r.indexOf("*/",d+2)+1,o===0&&(i||Y?o=r.length:v("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(dr.lastIndex=d+1,dr.test(r),dr.lastIndex===0?o=r.length-1:o=dr.lastIndex-2,m=["word",r.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function W(U){S.push(U)}return{back:W,endOfFile:x,nextToken:N,position:w}},bl=We,kr=class extends bl{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},rn=kr;kr.default=kr;bl.registerAtRule(kr);Sl=We,nt=class extends Sl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new vl(new Cl,this,e).stringify()}};nt.registerLazyResult=s=>{vl=s};nt.registerProcessor=s=>{Cl=s};Ut=nt;nt.default=nt;Sl.registerRoot(nt);Dt={comma(s){return Dt.split(s,[","],!0)},space(s){let e=[" ",`
57
+ `," "];return Dt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},El=Dt;Dt.default=Dt;Il=We,Td=El,Lr=class extends Il{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Td.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},sn=Lr;Lr.default=Lr;Il.registerRule(Lr);_d=ss,kd=Dd,Ld=ns,Pd=rn,$d=Ut,Lo=sn,Po={empty:!0,space:!0};Ud=class{constructor(e){this.input=e,this.root=new $d,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Pd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Ld;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=kd(this.input)}decl(e,t){let r=new _d;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Fd(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Lo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Po[h]&&!Po[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Lo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Bd=Ud,Wd=We,zd=Bd,Vd=is;nn=Pr;Pr.default=Pr;Wd.registerParse(Pr);({isClean:ge,my:jd}=Ft),Gd=nl,Hd=ts,Yd=We,Xd=en,Zd=yl,$o=tn,Kd=nn,Jd=Ut,qd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Qd={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},ep={Once:!0,postcssPlugin:!0,prepare:!0},ot=0;ui={},at=class Ml{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=li(t);else if(t instanceof Ml||t instanceof $o)i=li(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Kd;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[jd]&&Yd.rebuild(i)}this.result=new $o(e,i,r),this.helpers={...ui,postcss:ui,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,a=n.split("."),l=o.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Qd[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ep[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(yt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=!0;let t=[Fo(e)];for(;t.length>0;){let r=this.visitTick(t);if(yt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return yt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Hd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Gd(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(yt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Zd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(yt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[ge]){a[ge]=!0,e.push(Fo(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ot){r.nodes&&r.nodes.length&&(r[ge]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ge]=!0;let t=xl(e);for(let r of t)if(r===ot)e.nodes&&e.each(i=>{i[ge]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};at.registerPostcss=s=>{ui=s};Nl=at;at.default=at;Jd.registerLazyResult(at);Xd.registerLazyResult(at);tp=nl,rp=ts,sp=yl,ip=nn,np=tn,ci=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=rp;this.result=new np(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new tp(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||sp("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ip;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},op=ci;ci.default=ci;ap=op,lp=Nl,up=en,cp=Ut,Tt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ap(this,e,t):new lp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},hp=Tt;Tt.default=Tt;cp.registerProcessor(Tt);up.registerProcessor(Tt);fp=ss,dp=el,pp=ns,mp=rn,gp=is,yp=Ut,wp=sn;bp=_t;_t.default=_t;Sp=Ji,Al=ss,vp=Nl,Cp=We,on=hp,Ep=ts,Ip=bp,Rl=en,xp=wl,Ol=ns,Dl=rn,Mp=tn,Np=is,Ap=nn,Rp=El,Tl=sn,_l=Ut,Op=rs;F.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!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 a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new on().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return W([i(l)]).process(o,a)},i};W.stringify=Ep;W.parse=Ap;W.fromJSON=Ip;W.list=Rp;W.comment=s=>new Ol(s);W.atRule=s=>new Dl(s);W.decl=s=>new Al(s);W.rule=s=>new Tl(s);W.root=s=>new _l(s);W.document=s=>new Rl(s);W.CssSyntaxError=bp;W.Declaration=Al;W.Container=Cp;W.Processor=on;W.Document=Rl;W.Comment=Ol;W.Warning=xp;W.AtRule=Dl;W.Result=Mp;W.Input=Np;W.Rule=Tl;W.Root=_l;W.Node=Op;vp.registerPostcss(W);Dp=W;W.default=W;Y=Wf(Dp);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;_=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(_||{});_p=/-([a-z])/g,kp=/^--[a-zA-Z0-9-]+$/,hi=s=>kp.test(s)?s:s.replace(_p,(e,t)=>t?t.toUpperCase():""),Lp=/\B([A-Z])/g,$p=s=>s.replace(Lp,"-$1").toLowerCase(),fe=class s{constructor(...e){C(this,"parentElement",null),C(this,"parentNode",null),C(this,"ownerDocument"),C(this,"firstChild",null),C(this,"lastChild",null),C(this,"previousSibling",null),C(this,"nextSibling",null),C(this,"ELEMENT_NODE",1),C(this,"TEXT_NODE",3),C(this,"nodeType"),C(this,"nodeName"),C(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},fi=class s extends fe{constructor(...e){super(e),C(this,"nodeType",9),C(this,"nodeName","#document"),C(this,"compatMode","CSS1Compat"),C(this,"RRNodeType",_.Document),C(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===_.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===_.Element||t===_.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=an(this,e);return r.parentElement=null,r}insertBefore(e,t){let r=e.RRNodeType;if((r===_.Element||r===_.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=kl(this,e,t);return i.parentElement=null,i}removeChild(e){return Ll(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new Pr(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=new lt(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new Fr(e);return t.ownerDocument=this,t}createComment(e){let t=new Ur(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Br(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},Pr=class extends fe{constructor(e,t,r){super(),C(this,"nodeType",10),C(this,"RRNodeType",_.DocumentType),C(this,"name"),C(this,"publicId"),C(this,"systemId"),C(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},lt=class extends fe{constructor(e){super(),C(this,"nodeType",1),C(this,"RRNodeType",_.Element),C(this,"tagName"),C(this,"attributes",{}),C(this,"shadowRoot",null),C(this,"scrollLeft"),C(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new mi(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?Tp(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;let o=hi(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Uo(e)},e.removeProperty=r=>{if(t.test(r))return"";let i=hi(r),n=e[i]||"";return delete e[i],this.attributes.style=Uo(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return an(this,e)}insertBefore(e,t){return kl(this,e,t)}removeChild(e){return Ll(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},di=class extends lt{constructor(){super(...arguments),C(this,"currentTime"),C(this,"volume"),C(this,"paused"),C(this,"muted"),C(this,"playbackRate"),C(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},pi=class extends lt{constructor(){super(...arguments),C(this,"tagName","DIALOG"),C(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")}},Fr=class extends fe{constructor(e){super(),C(this,"nodeType",3),C(this,"nodeName","#text"),C(this,"RRNodeType",_.Text),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Ur=class extends fe{constructor(e){super(),C(this,"nodeType",8),C(this,"nodeName","#comment"),C(this,"RRNodeType",_.Comment),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Br=class extends fe{constructor(e){super(),C(this,"nodeName","#cdata-section"),C(this,"nodeType",4),C(this,"RRNodeType",_.CDATA),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},mi=class{constructor(e,t){if(C(this,"onChange"),C(this,"classes",[]),C(this,"add",(...r)=>{for(let i of r){let n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),C(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};ae=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(ae||{}),gi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Pp={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"},ye=null;ut=class s extends fi{constructor(e){super(),C(this,"UNSERIALIZED_STARTING_ID",-2),C(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),C(this,"mirror",Yp()),C(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new Wp(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),r;switch(t){case"AUDIO":case"VIDEO":r=new yi(t);break;case"IFRAME":r=new vi(t,this.mirror);break;case"CANVAS":r=new Si(t);break;case"STYLE":r=new bi(t);break;case"DIALOG":r=new wi(t);break;default:r=new ct(t);break}return r.ownerDocument=this,r}createComment(e){let t=new Vp(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new jp(e);return t.ownerDocument=this,t}createTextNode(e){let t=new zp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},Wp=Pr,ct=class extends lt{constructor(){super(...arguments),C(this,"inputData",null),C(this,"scrollData",null)}},yi=class extends di{},wi=class extends pi{},Si=class extends ct{constructor(){super(...arguments),C(this,"rr_dataURL",null),C(this,"canvasMutations",[])}getContext(){return null}},bi=class extends ct{constructor(){super(...arguments),C(this,"rules",[])}},vi=class extends ct{constructor(e,t){super(e),C(this,"contentDocument",new ut),this.contentDocument.mirror=t}},zp=Fr,Vp=Ur,jp=Br;Ci=class{constructor(){C(this,"idNodeMap",new Map),C(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Bo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pr={},Xp=()=>!!globalThis.Zone;Rs={};Os={};D={ownerDocument:Zp,childNodes:Kp,parentNode:Jp,parentElement:qp,textContent:Qp,contains:em,getRootNode:tm,host:rm,styleSheets:sm,shadowRoot:im,querySelector:nm,querySelectorAll:om,mutationObserver:Bl,patch:ze};Xe=`Please stop import mirror directly. Instead of that,\r
59
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new on().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return F([i(l)]).process(o,a)},i};F.stringify=Ep;F.parse=Ap;F.fromJSON=Ip;F.list=Rp;F.comment=s=>new Ol(s);F.atRule=s=>new Dl(s);F.decl=s=>new Al(s);F.rule=s=>new Tl(s);F.root=s=>new _l(s);F.document=s=>new Rl(s);F.CssSyntaxError=Sp;F.Declaration=Al;F.Container=Cp;F.Processor=on;F.Document=Rl;F.Comment=Ol;F.Warning=xp;F.AtRule=Dl;F.Result=Mp;F.Input=Np;F.Rule=Tl;F.Root=_l;F.Node=Op;vp.registerPostcss(F);Dp=F;F.default=F;H=Wf(Dp);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;D=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(D||{});_p=/-([a-z])/g,kp=/^--[a-zA-Z0-9-]+$/,hi=s=>kp.test(s)?s:s.replace(_p,(e,t)=>t?t.toUpperCase():""),Lp=/\B([A-Z])/g,Pp=s=>s.replace(Lp,"-$1").toLowerCase(),fe=class s{constructor(...e){C(this,"parentElement",null),C(this,"parentNode",null),C(this,"ownerDocument"),C(this,"firstChild",null),C(this,"lastChild",null),C(this,"previousSibling",null),C(this,"nextSibling",null),C(this,"ELEMENT_NODE",1),C(this,"TEXT_NODE",3),C(this,"nodeType"),C(this,"nodeName"),C(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},fi=class s extends fe{constructor(...e){super(e),C(this,"nodeType",9),C(this,"nodeName","#document"),C(this,"compatMode","CSS1Compat"),C(this,"RRNodeType",D.Document),C(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===D.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===D.Element||t===D.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=an(this,e);return r.parentElement=null,r}insertBefore(e,t){let r=e.RRNodeType;if((r===D.Element||r===D.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=kl(this,e,t);return i.parentElement=null,i}removeChild(e){return Ll(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new $r(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=new lt(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new Fr(e);return t.ownerDocument=this,t}createComment(e){let t=new Ur(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Br(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},$r=class extends fe{constructor(e,t,r){super(),C(this,"nodeType",10),C(this,"RRNodeType",D.DocumentType),C(this,"name"),C(this,"publicId"),C(this,"systemId"),C(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},lt=class extends fe{constructor(e){super(),C(this,"nodeType",1),C(this,"RRNodeType",D.Element),C(this,"tagName"),C(this,"attributes",{}),C(this,"shadowRoot",null),C(this,"scrollLeft"),C(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new mi(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?Tp(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;let o=hi(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Uo(e)},e.removeProperty=r=>{if(t.test(r))return"";let i=hi(r),n=e[i]||"";return delete e[i],this.attributes.style=Uo(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return an(this,e)}insertBefore(e,t){return kl(this,e,t)}removeChild(e){return Ll(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},di=class extends lt{constructor(){super(...arguments),C(this,"currentTime"),C(this,"volume"),C(this,"paused"),C(this,"muted"),C(this,"playbackRate"),C(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},pi=class extends lt{constructor(){super(...arguments),C(this,"tagName","DIALOG"),C(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")}},Fr=class extends fe{constructor(e){super(),C(this,"nodeType",3),C(this,"nodeName","#text"),C(this,"RRNodeType",D.Text),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Ur=class extends fe{constructor(e){super(),C(this,"nodeType",8),C(this,"nodeName","#comment"),C(this,"RRNodeType",D.Comment),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Br=class extends fe{constructor(e){super(),C(this,"nodeName","#cdata-section"),C(this,"nodeType",4),C(this,"RRNodeType",D.CDATA),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},mi=class{constructor(e,t){if(C(this,"onChange"),C(this,"classes",[]),C(this,"add",(...r)=>{for(let i of r){let n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),C(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};ae=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(ae||{}),gi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},$p={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"},ye=null;ut=class s extends fi{constructor(e){super(),C(this,"UNSERIALIZED_STARTING_ID",-2),C(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),C(this,"mirror",Yp()),C(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new Wp(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),r;switch(t){case"AUDIO":case"VIDEO":r=new yi(t);break;case"IFRAME":r=new vi(t,this.mirror);break;case"CANVAS":r=new bi(t);break;case"STYLE":r=new Si(t);break;case"DIALOG":r=new wi(t);break;default:r=new ct(t);break}return r.ownerDocument=this,r}createComment(e){let t=new Vp(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new jp(e);return t.ownerDocument=this,t}createTextNode(e){let t=new zp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},Wp=$r,ct=class extends lt{constructor(){super(...arguments),C(this,"inputData",null),C(this,"scrollData",null)}},yi=class extends di{},wi=class extends pi{},bi=class extends ct{constructor(){super(...arguments),C(this,"rr_dataURL",null),C(this,"canvasMutations",[])}getContext(){return null}},Si=class extends ct{constructor(){super(...arguments),C(this,"rules",[])}},vi=class extends ct{constructor(e,t){super(e),C(this,"contentDocument",new ut),this.contentDocument.mirror=t}},zp=Fr,Vp=Ur,jp=Br;Ci=class{constructor(){C(this,"idNodeMap",new Map),C(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Bo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pr={},Xp=()=>!!globalThis.Zone;Rs={};Os={};R={ownerDocument:Zp,childNodes:Kp,parentNode:Jp,parentElement:qp,textContent:Qp,contains:em,getRootNode:tm,host:rm,styleSheets:sm,shadowRoot:im,querySelector:nm,querySelectorAll:om,mutationObserver:Bl,patch:ze};Xe=`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.`,Vr={map:{},getId(){return console.error(Xe),-1},getNode(){return console.error(Xe),null},removeNodeFromMap(){console.error(Xe)},has(){return console.error(Xe),!1},reset(){console.error(Xe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Vr=new Proxy(Vr,{get(s,e,t){return e==="map"&&console.error(Xe),Reflect.get(s,e,t)}}));kt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(kt=()=>new Date().getTime());Lt=class{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};am=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Lt,get _mirror(){return Vr},closestElementOfNode:dn,getBaseDimension:wn,getNestedRule:qe,getPositionsAndIndex:Ei,getRootShadowHost:jl,getShadowHost:Sn,getWindowHeight:hn,getWindowScroll:cn,getWindowWidth:fn,hasShadowRoot:Oe,hookSetter:Bt,inDom:bn,isAncestorRemoved:pn,isBlocked:re,isIgnored:Cr,isSerialized:Wl,isSerializedIframe:tt,isSerializedStylesheet:yn,iterateResolveTree:gn,legacy_isTouchEvent:jr,get nowTimestamp(){return kt},on:te,polyfill:mn,queueToResolveTrees:zl,shadowHostInDom:Gl,throttle:ht,uniqueTextMutations:Vl},Symbol.toStringTag,{value:"Module"})),I=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(I||{}),E=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(E||{}),$=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))($||{}),Se=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Se||{}),Ee=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ee||{}),Re=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Re||{}),L=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(L||{}),be=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(be||{});Ii=class{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&zo(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&zo(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Vo=(s,e)=>`${s}@${e}`,xi=class{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Ii,i=l=>{let u=l,c=xt;for(;c===xt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=l=>{let u=D.parentNode(l);if(!u||!bn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){let m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=bt(u)?this.mirror.getId(Sn(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);let g=Je(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{tt(m,this.mirror)&&this.iframeManager.addIframe(m),yn(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Oe(l)&&this.shadowDomManager.addShadowRoot(D.shadowRoot(l),this.doc)},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p)},cssCaptured:c});g&&(e.push({parentId:h,nextId:f,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)jo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(D.parentNode(l))||n(l);for(let l of this.addedSet)!Go(this.droppedSet,l)&&!jo(this.removesSubTreeCache,l,this.mirror)||Go(this.movedSet,l)?n(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){let u=this.mirror.getId(D.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(D.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{let g=c.value,m=D.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=D.host(m);if(this.mirror.getId(p)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),n(l.value)}let a={texts:this.texts.map(l=>{let u=l.node,c=D.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:u}=l;if(typeof u.style=="string"){let c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(D.childNodes(e),i=>D.textContent(i)||"").join("");t.attributes.value=xr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Mr(e),value:r,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!Cr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=D.textContent(e.target);!re(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:fa(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,dn(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Mr(t);i=xr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(re(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!ha(t.tagName,r))if(n.attributes[r]=ca(this.doc,Te(t.tagName),Te(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let a of Array.from(t.style)){let l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?n.styleDiff[a]=l:n.styleDiff[a]=[l,u]:n._unchangedStyles[a]=[l,u]}for(let a of Array.from(o.style))t.style.getPropertyValue(a)===""&&(n.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(re(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),i=bt(e.target)?this.mirror.getId(D.host(e.target)):this.mirror.getId(e.target);re(e.target,this.blockClass,this.blockSelector,!1)||Cr(t,this.mirror,this.slimDOMOptions)||!Wl(t,this.mirror)||(this.addedSet.has(t)?(Mi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||pn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Vo(r,i)]?Mi(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:bt(e.target)&&vt(e.target)?!0:void 0}),lm(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Cr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Vo(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);re(e,this.blockClass,this.blockSelector,!1)||(D.childNodes(e).forEach(r=>this.genAdds(r)),Oe(e)&&D.childNodes(D.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}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()}};k=s=>Et?(...t)=>{try{return s(...t)}catch(r){if(Et&&Et(r)===!0)return;throw r}}:s,Ue=[];mm=["INPUT","TEXTAREA","SELECT"],Ho=new WeakMap;Hr=class{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),o.set(a,t)),a}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Ni=class{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new Hr(ua)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Hr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==be.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Ai=class{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!vt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=Yl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Xl({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(D.host(e))),this.restoreHandlers.push(Zl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(ze(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),a=D.shadowRoot(this);return a&&bn(this)&&r.addShadowRoot(a,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",St=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(wt=0;wt<Qe.length;wt++)St[Qe.charCodeAt(wt)]=wt;xm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Qe[e[t]>>2],i+=Qe[(e[t]&3)<<4|e[t+1]>>4],i+=Qe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Qe[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Mm=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)n=St[s.charCodeAt(r)],o=St[s.charCodeAt(r+1)],a=St[s.charCodeAt(r+2)],l=St[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},Yo=new Map;Kl=(s,e,t)=>{if(!s||!(ql(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=Nm(t,r),n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};Jl=(s,e,t)=>s.map(r=>Er(r,e,t)),ql=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);Ql="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Dm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Ko=typeof window<"u"&&window.Blob&&new Blob([Dm(Ql)],{type:"text/javascript;charset=utf-8"});Ri=class{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});let{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){let o=Xo(t,r,i,!0),a=new Map,l=new Tm;l.onmessage=m=>{let{id:p}=m.data;if(a.set(p,!1),!("base64"in m.data))return;let{base64:d,type:y,width:b,height:w}=m.data;this.mutationCb({id:p,type:Ee["2D"],commands:[{property:"clearRect",args:[0,0,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:y}]},0,0]}]})};let u=1e3/e,c=0,h,f=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(p=>{re(p,r,i,!0)||m.push(p)}),m},g=m=>{if(c&&m-c<u){h=requestAnimationFrame(g);return}c=m,f().forEach(async p=>{var d;let y=this.mirror.getId(p);if(a.get(y)||p.width===0||p.height===0)return;if(a.set(y,!0),["webgl","webgl2"].includes(p.__context)){let w=p.getContext(p.__context);((d=w?.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}let b=await createImageBitmap(p);l.postMessage({id:y,bitmap:b,width:p.width,height:p.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(g)};h=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=Xo(e,t,r,!1),n=Am(this.processMutation.bind(this),e,t,r),o=Om(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:a,...l}=o;return l}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}},Oi=class{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new Lt),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},i=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(a,l)=>({rule:aa(a,n.href),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Di=class{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Yr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Yn=s.contentWindow)==null?void 0:Yn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}he=la();_e.addCustomEvent=(s,e)=>{if(!Yr)throw new Error("please add custom event after start recording");J({type:I.Custom,data:{tag:s,payload:e}})};_e.freezePage=()=>{Ue.forEach(s=>s.freeze())};_e.takeFullSnapshot=s=>{if(!Yr)throw new Error("please take full snapshot after start recording");Ir(s)};_e.mirror=he;_m=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"}));Ti=class{constructor(e=[],t){S(this,"timeOffset",0),S(this,"speed"),S(this,"actions"),S(this,"raf",null),S(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.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(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){let i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(et||(et={}));tu={type:"xstate.init"};ra=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};Fm=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],sa=new Map;Bm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];ki=class{constructor(e){S(this,"mediaMap",new Map),S(this,"warn"),S(this,"service"),S(this,"speedService"),S(this,"emitter"),S(this,"getCurrentTime"),S(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(L.Start,this.start.bind(this)),this.emitter.on(L.SkipStart,this.start.bind(this)),this.emitter.on(L.Pause,this.pause.bind(this)),this.emitter.on(L.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=()=>{this.metadataCallbackMap.delete(e);let r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){let i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:n===Re.Play||n!==Re.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:a??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:o??i?.playbackRate??1,volume:u??i?.volume??1,muted:l??i?.muted??e.getAttribute("muted")===null,loop:c??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:n,isPlaying:o}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,n=r.getMeta(i);if(!n||!("attributes"in n))return;let o=this.service.state.matches("paused"),a=n.attributes,l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&o&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let g=0;typeof a.rr_mediaCurrentTime=="number"&&(g=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:g,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};Gm=5*1e3,Hm=eu||_m,ia="[replayer]",_s={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};Li=class{constructor(e,t){if(S(this,"wrapper"),S(this,"iframe"),S(this,"service"),S(this,"speedService"),S(this,"config"),S(this,"usingVirtualDom",!1),S(this,"virtualDom",new ut),S(this,"mouse"),S(this,"mouseTail",null),S(this,"tailPositions",[]),S(this,"emitter",Hm()),S(this,"nextUserInteractionEvent"),S(this,"legacy_missingNodeRetryMap",{}),S(this,"cache",bo()),S(this,"imageMap",new Map),S(this,"canvasEventMap",new Map),S(this,"mirror",la()),S(this,"styleMirror",new Lt),S(this,"mediaManager"),S(this,"firstFullSnapshot",null),S(this,"newDocumentQueue",[]),S(this,"mousePos",null),S(this,"touchActive",null),S(this,"lastMouseDownEvent",null),S(this,"lastHoveredRootNode"),S(this,"lastSelectionData",null),S(this,"constructedStyleMutations",[]),S(this,"adoptedStyleSheets",[]),S(this,"handleResize",a=>{this.iframe.style.display="inherit";for(let l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),S(this,"applyEventsSynchronously",a=>{for(let l of a){switch(l.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),S(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:u=()=>{this.emitter.emit(L.CustomEvent,a)};break;case I.Meta:u=()=>this.emitter.emit(L.Resize,{width:a.data.width,height:a.data.height});break;case I.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case I.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){let h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Gm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(L.SkipStart,f)}}};break}return()=>{u&&u();for(let f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){let f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(L.Finish))},g=50;a.type===I.IncrementalSnapshot&&a.data.source===E.MouseMove&&a.data.positions.length&&(g+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,g)}this.emitter.emit(L.EventCast,a)}}),!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:_s,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(L.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(L.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(l,u,c)=>{_i({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===E.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===E.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Wr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let l in this.legacy_missingNodeRetryMap)try{let u=this.legacy_missingNodeRetryMap[l],c=zr(u.node,this.mirror,this.virtualDom.mirror);Wr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),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){let[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(L.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Ti([],{speed:this.config.speed});this.service=$m({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(L.StateChange,{player:a})}),this.speedService=Pm({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(L.StateChange,{speed:a})}),this.mediaManager=new ki({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let n=this.service.state.context.events.find(a=>a.type===I.Meta),o=this.service.state.context.events.find(a=>a.type===I.FullSnapshot);if(n){let{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(L.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(na)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(L.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(L.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(L.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(L.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;na(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event: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=bo()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(km(this.iframe.contentWindow,this.iframe.contentDocument),mn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!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={};let r=[],i=new Set,n=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){let{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),kf(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);let{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),i.forEach(l=>yr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(L.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;let i=Fm(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){let n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Fl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:E.StyleSheetRule,adds:i.map((o,a)=>({rule:o,index:a}))})}else{let n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(i,a);let u=r.getMeta(a);if(u?.type===be.Element&&u?.tagName.toUpperCase()==="HTML"){let{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Ct(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(let{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>yr(a))}collectIframeAndAttachDocument(e,t){if(tt(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let r=new Set,i,n=this.service.state,o=()=>{n=this.service.state};this.emitter.on(L.Start,o),this.emitter.on(L.Pause,o);let a=()=>{this.emitter.off(L.Start,o),this.emitter.off(L.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(L.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(L.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let r=document.createElement("canvas"),i=r.getContext("2d"),n=i?.createImageData(r.width,r.height);i?.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async n=>{let o=await Promise.all(n.args.map(De(this.imageMap,null,r)));return{...n,args:o}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(De(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var r,i,n;let{data:o}=e;switch(o.source){case E.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){let a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{let l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case E.MouseInteraction:{if(o.id===-1)break;let a=new Event(Te($[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(L.MouseInteraction,{type:o.type,target:l});let{triggerFocus:u}=this.config;switch(o.type){case $.Blur:"blur"in l&&l.blur();break;case $.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case $.Click:case $.TouchStart:case $.TouchEnd:case $.MouseDown:case $.MouseUp:t?(o.type===$.TouchStart?this.touchActive=!0:o.type===$.TouchEnd&&(this.touchActive=!1),o.type===$.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===$.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===$.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===$.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===$.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===$.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case $.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case E.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case E.ViewportResize:this.emitter.emit(L.Resize,{width:o.width,height:o.height});break;case E.Input:{if(o.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case E.MediaInteraction:{let a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);let l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{let a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);_i({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{let a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case E.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Hp(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let u in this.legacy_missingNodeRetryMap)try{let c=this.legacy_missingNodeRetryMap[u],h=Pl(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Oe(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(g){if(g instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw g}});let i={...this.legacy_missingNodeRetryMap},n=[],o=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===be.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(Oe(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let g=null,m=null;if(u.previousId&&(g=r.getNode(u.previousId)),u.nextId&&(m=r.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;let p=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(tt(f,r)){this.attachDocumentToIframe(u,f);return}let d=(w,v)=>{if(!this.usingVirtualDom){yr(w);for(let x of this.config.plugins||[])x.onBuild&&x.onBuild(w,{id:v,replayer:this})}},y=Ct(u.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}let b=r.getMeta(f);if(b&&b.type===be.Element&&u.node.type===be.Text){let w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(b.tagName==="textarea")for(let v of w)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(b.tagName==="style"&&w.length===1)for(let v of w)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(y.textContent=v.textContent,f.removeChild(v))}else if(b?.type===be.Document){let w=f;u.node.type===be.DocumentType&&((c=w.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),y.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(g&&g.nextSibling&&g.nextSibling.parentNode?f.insertBefore(y,g.nextSibling):m&&m.parentNode?f.contains(m)?f.insertBefore(y,m):f.insertBefore(y,null):f.appendChild(y),d(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),tt(y,this.mirror)){let w=this.mirror.getId(y),v=this.newDocumentQueue.find(x=>x.parentId===w);v&&(this.attachDocumentToIframe(v,y),this.newDocumentQueue=this.newDocumentQueue.filter(x=>x!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,y,u)};e.adds.forEach(u=>{a(u)});let l=Date.now();for(;n.length;){let u=zl(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(let c of u)r.getNode(c.value.parentId)?gn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Vl(e.texts).forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(g=>g.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);let f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=es(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){let g=h.parentNode;((c=g?.rules)==null?void 0:c.length)>0&&(g.rules=[])}}),e.attributes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(let f in u.attributes)if(typeof f=="string"){let g=u.attributes[f];if(g===null)h.removeAttribute(f),f==="open"&&jm(h,u);else if(typeof g=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{let m=r.getMeta(h),p=Ct({...m,attributes:{...m.attributes,...u.attributes}},{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,u.attributes);let d=h.nextSibling,y=h.parentNode;if(p&&y){y.removeChild(h),y.insertBefore(p,d),r.replace(u.id,p);break}}catch{}if(f==="value"&&h.nodeName==="TEXTAREA"){let m=h;m.childNodes.forEach(d=>m.removeChild(d));let p=(c=h.ownerDocument)==null?void 0:c.createTextNode(g);p&&m.appendChild(p)}else h.setAttribute(f,g);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&yr(h,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(f==="style"){let m=g,p=h;for(let d in m)if(m[d]===!1)p.style.removeProperty(d);else if(m[d]instanceof Array){let y=m[d];p.style.setProperty(d,y[0],y[1])}else{let y=m[d];p.style.setProperty(d,y)}}}})}applyScroll(e,t){var r,i;let n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);let o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(o?.type===be.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,r=e.ranges.map(({start:i,startOffset:n,end:o,endOffset:a})=>{let l=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!l||!u)return;let c=new Range;c.setStart(l,n),c.setEnd(u,a);let h=l.ownerDocument,f=h?.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){let{positions:u,index:c}=Ei(l);qe(t.cssRules,u).insertRule(a,c)}else{let u=l===void 0?void 0:Math.min(l,t.cssRules.length);t?.insertRule(a,u)}}catch{}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){let{positions:l,index:u}=Ei(a);qe(t.cssRules,l).deleteRule(u||0)}else t?.deleteRule(a)}catch{}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch{}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&qe(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&qe(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Oe(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:a.rules},u)}catch{}});let i=10,n=0,o=(a,l)=>{let u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Oe(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<i&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:n,nextId:o}=i,a=n&&e[n],l=o&&e[o];if(a){let{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){let{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,n){let o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);let a=wn(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?_s:Object.assign({},_s,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;let a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(L.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(ia,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ia,...e)}},{addCustomEvent:Ym}=_e,{freezePage:Xm}=_e,{takeFullSnapshot:Zm}=_e});var uu={};Ht(uu,{startRrweb:()=>Km});async function Km(s){if(typeof window>"u")return null;let e;try{e=await Promise.resolve().then(()=>(au(),ou))}catch{return null}let t=s.options.mask?.class??"segi-mask",r=s.options.mask?.inputs??"all",i=r==="all"?{password:!0,email:!0,tel:!0,number:!0,text:!0,textarea:!0}:r==="sensitive"?{password:!0,email:!0,tel:!0,number:!0}:{password:!0},n=[],o=0,a=null,l=Date.now(),u=!1,c=!1,h=setInterval(()=>{u||c||p()},1e4),f=setInterval(()=>{u||c||Date.now()-l>=18e4&&m()},15e3);function g(){if(a)return;let w=0,v=(...R)=>{typeof console<"u"&&console.log("[segi.replay]",...R)};v("startRecorder() called, rrweb keys:",Object.keys(e).slice(0,12));let x=e.record({emit(R){w++;let A=R;if(u||c)return;let P;try{P=JSON.stringify(R)}catch(q){v(`emit #${w} type:${A.type} source:${A.data?.source} STRINGIFY_FAILED:`,q.message);return}w<=10&&v(`emit #${w}`,"type:",A.type,"source:",A.data?.source,"size:",P.length),n.push(P),o+=P.length,o>=102400&&p()},sampling:{mousemove:20,scroll:150,input:"last"},maskAllInputs:r==="all",maskInputOptions:i,blockClass:t,ignoreClass:t,maskTextClass:t,recordCanvas:!1,collectFonts:!1,checkoutEveryNms:3e4});a=typeof x=="function"?x:null,v("record() returned, stopFn:",typeof x,"rrweb.record.takeFullSnapshot:",typeof e.record.takeFullSnapshot,"rrweb.takeFullSnapshot:",typeof e.takeFullSnapshot);let N=R=>{if(!(c||u))try{let A=e;typeof A.record.takeFullSnapshot=="function"?(v(`forceSnapshot[${R}] via record.takeFullSnapshot`),A.record.takeFullSnapshot(!0)):typeof A.takeFullSnapshot=="function"?(v(`forceSnapshot[${R}] via top-level takeFullSnapshot`),A.takeFullSnapshot(!0)):v(`forceSnapshot[${R}] no takeFullSnapshot found`)}catch(A){v(`forceSnapshot[${R}] threw:`,A)}};setTimeout(()=>N("100ms"),100),setTimeout(()=>N("500ms"),500),setTimeout(()=>N("2000ms"),2e3)}function m(){try{a?.()}finally{a=null}p()}function p(w=!1){if(n.length===0)return;let v=n;if(n=[],o=0,typeof console<"u"){let x=v.reduce((R,A)=>R+A.length,0),N={};for(let R of v){let A=R.match(/^\{"type":(\d+)/),P=A?A[1]:"?";N[P]=(N[P]??0)+1}console.log("[segi.replay] flush:",v.length,"events,",x,"bytes, types:",N,"useBeacon:",w)}try{s.sendChunk(v,w)}catch{}}function d(){l=Date.now(),!a&&!u&&!c&&g()}for(let w of lu)window.addEventListener(w,d,{passive:!0,capture:!0});let y=()=>p(!0),b=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&p(!0)};return window.addEventListener("pagehide",y),typeof document<"u"&&document.addEventListener("visibilitychange",b),g(),{pause(){u=!0,m()},resume(){u=!1,l=Date.now(),g()},stop(){c=!0,m(),clearInterval(h),clearInterval(f);for(let w of lu)window.removeEventListener(w,d,{capture:!0});window.removeEventListener("pagehide",y),typeof document<"u"&&document.removeEventListener("visibilitychange",b)},flush:p,takeFullSnapshot(){if(!(c||u))try{e.record.takeFullSnapshot?.()}catch{}}}}var lu,cu=je(()=>{"use strict";lu=["mousemove","mousedown","keydown","touchstart","scroll","wheel"]});var du={};Ht(du,{activateReplay:()=>qm,replayApi:()=>Qm,withReplay:()=>Jm});function Jm(s={}){return{__segi_replay:!0,options:s}}function hu(){if(typeof window>"u")return"desktop";let s=window.innerWidth;return s<640?"mobile":s<1024?"tablet":"desktop"}function Ve(s){if(!(typeof location>"u"))try{return new URLSearchParams(location.search).get(s)??void 0}catch{return}}function fu(s,e){return(s.blockRoutes??[]).some(r=>e.startsWith(r))}async function qm(s){if(M||typeof window>"u")return;let e=s.config.options;if(e.enabled===!1)return;let t=Math.max(0,Math.min(100,e.sample??100));if(Math.random()*100>=t||fu(e,location.pathname))return;let r=zn(),i=ys(),n={endpoint:e.endpoint??s.endpoint,projectKey:s.projectKey},o={sessionUid:r,anonId:i,startedAt:new Date().toISOString(),device:hu(),viewportW:window.innerWidth,viewportH:window.innerHeight,ua:navigator.userAgent?.slice(0,512),referrer:document.referrer||void 0,landingUrl:location.href.slice(0,512),utmSource:Ve("utm_source"),utmMedium:Ve("utm_medium"),utmCampaign:Ve("utm_campaign"),utmContent:Ve("utm_content"),utmTerm:Ve("utm_term"),fbclid:Ve("fbclid"),gclid:Ve("gclid")},a=!0;try{let h=await Ne(n,"/session/start",o);h&&h.ok&&(await h.json().catch(()=>({}))).recordingEnabled===!1&&(a=!1)}catch{}if(!a){M={sessionUid:r,config:n,options:e,heatmap:null,rrweb:null,replayBlocked:!1,paused:!0,userId:null,startedAt:o.startedAt,pagesVisited:0,clickCount:0,recordingEnabled:!1};return}let l=$n({sessionUid:r,options:e,sendClicks:(h,f)=>{f?ws(n,"/heatmap/clicks",{clicks:h}):Ne(n,"/heatmap/clicks",{clicks:h})},sendScroll:h=>{Ne(n,"/heatmap/scroll",h)}});M={sessionUid:r,config:n,options:e,heatmap:l,rrweb:null,replayBlocked:!1,paused:!1,userId:null,startedAt:o.startedAt,pagesVisited:1,clickCount:0,recordingEnabled:!0};let u=window,c=h=>{let f=!1,g=()=>{f||(f=!0,typeof u.requestIdleCallback=="function"?u.requestIdleCallback(h,{timeout:2e3}):setTimeout(h,1e3))};typeof document<"u"&&document.readyState==="complete"?g():(window.addEventListener("load",g,{once:!0}),setTimeout(g,5e3))};Promise.resolve().then(()=>(cu(),uu)).then(({startRrweb:h})=>new Promise(f=>{c(()=>{h({sessionUid:r,options:e,sendChunk:async(g,m)=>{if(!M||M.replayBlocked)return;let p=`{"sessionUid":${JSON.stringify(r)},"chunk":[${g.join(",")}]}`,d=(n.endpoint||"https://segiapi.extn.ai").replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"");if(m){try{let y=`${d}/api/trace/replay?pk=${encodeURIComponent(n.projectKey)}`,b=new Blob([p],{type:"application/json"});typeof navigator<"u"&&typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(y,b)}catch{}return}try{let y=await fetch(`${d}/api/trace/replay`,{method:"POST",headers:{"Content-Type":"application/json","X-Segi-Project-Key":n.projectKey},body:p});typeof console<"u"&&console.log("[segi.replay] /replay POST",y.status,p.length,"bytes"),y.status===429&&M&&(M.replayBlocked=!0,M.rrweb?.stop(),M.rrweb=null)}catch(y){typeof console<"u"&&console.log("[segi.replay] /replay POST FETCH FAILED:",y.message)}}}).then(f,()=>f(null))})})).then(h=>{h&&M&&(M.rrweb=h)}).catch(()=>{}),Ne(n,"/events",{events:[{sessionUid:r,ts:new Date().toISOString(),type:"page_view",url:location.href,title:document.title}]}),window.addEventListener("pagehide",()=>{M&&(M.rrweb?.flush(!0),ws(M.config,"/session/end",{sessionUid:M.sessionUid,endedAt:new Date().toISOString(),durationMs:Date.now()-new Date(M.startedAt).getTime(),pagesVisited:M.pagesVisited,clickCount:M.clickCount}))})}var M,Qm,pu=je(()=>{"use strict";Pn();jn();Hn();M=null;Qm={pause(){M?.heatmap?.pause(),M?.rrweb?.pause(),M&&(M.paused=!0)},resume(){M?.heatmap?.resume(),M?.rrweb?.resume(),M&&(M.paused=!1),Vn()},setUser(s){M&&(M.userId=s?.id??null,Ne(M.config,"/session/start",{sessionUid:M.sessionUid,anonId:ys(),userId:M.userId,startedAt:M.startedAt,device:hu(),viewportW:window.innerWidth,viewportH:window.innerHeight}))},event(s,e){!M||M.paused||Ne(M.config,"/events",{events:[{sessionUid:M.sessionUid,ts:new Date().toISOString(),type:"custom",name:s.slice(0,64),url:location.href,meta:e}]})},notifyRouteChange(s,e){if(!(!M||M.paused)){if(fu(M.options,location.pathname)){M.heatmap?.pause(),M.rrweb?.pause(),M.paused=!0;return}M.paused&&(M.heatmap?.resume(),M.rrweb?.resume(),M.paused=!1),M.pagesVisited+=1,M.rrweb?.takeFullSnapshot(),Ne(M.config,"/events",{events:[{sessionUid:M.sessionUid,ts:new Date().toISOString(),type:"page_view",url:s??location.href,title:e??document.title}]})}},_sessionUid(){return M?.sessionUid??null}}});var ig={};Ht(ig,{Segi:()=>Me,default:()=>sg});function xn(){return{options:{projectKey:"",endpoint:""},user:null,tags:{},breadcrumbs:[],initialized:!1}}function Mn(s,e){let t=s.options.maxBreadcrumbs??50;s.breadcrumbs.push(e),s.breadcrumbs.length>t&&s.breadcrumbs.splice(0,s.breadcrumbs.length-t)}function cs(s,e){let t={type:e.type??"error",level:e.level??"error",message:e.message??"",errorName:e.errorName,stack:e.stack,platform:e.platform,runtime:e.runtime,environment:e.environment??s.options.environment,release:e.release??s.options.release,transaction:e.transaction,url:e.url,userAgent:e.userAgent,user:e.user??s.user??void 0,tags:{...s.tags,...e.tags??{}},extra:e.extra,breadcrumbs:s.breadcrumbs.slice(),request:e.request,timestamp:e.timestamp??new Date().toISOString()};if(s.options.beforeSend)try{let r=s.options.beforeSend(t);return r||{...t,_drop:!0}}catch{return t}return t}var kn=Eu(Tn()),_n=new Set;function ps(s,e){_n.has(s)||(_n.add(s),typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[segi] ${e}`))}function _u(s){return s===401||s===403?"ingest rejected the project key (check projectKey + endpoint region)":s===404?"ingest endpoint not found (check endpoint URL)":s===413?"event payload too large; dropped by ingest":s===429?"ingest rate-limited (over plan quota or burst)":s>=500?"ingest is returning 5xx \u2014 events may be lost":"ingest returned a non-2xx response"}function ms(s,e,t){let r=s||kn.SEGI_DEFAULT_INGEST_ENDPOINT;if(!r||!e){ps("missing-config",e?"init() called without a valid endpoint \u2014 events will not be sent":"init() called without a projectKey \u2014 events will not be sent");return}if(!t._drop)try{let i=JSON.stringify(t),n={"Content-Type":"application/json","X-Segi-Project-Key":e};if(typeof fetch=="function"){fetch(r,{method:"POST",headers:n,body:i,keepalive:!0,mode:"cors",credentials:"omit"}).then(o=>{o.ok||ps(`status-${o.status}`,`${_u(o.status)} (HTTP ${o.status} from ${r})`)}).catch(o=>{ps("network-error",`network error reaching ${r} \u2014 events not delivered (${o instanceof Error?o.message:String(o)})`)});return}if(typeof navigator<"u"&&typeof navigator.sendBeacon=="function"){let o=`${r}${r.includes("?")?"&":"?"}pk=${encodeURIComponent(e)}`,a=new Blob([i],{type:"application/json"});navigator.sendBeacon(o,a)}}catch{}}var Q=xn();function eg(s){try{if(s&&typeof s=="object"&&"stack"in s)return String(s.stack??"")}catch{}}function os(s){if(Q.initialized)try{if(s instanceof ErrorEvent){let e=s.error,t=e?.message??s.message??"Error";Me.captureException(e??new Error(t),{message:t,url:typeof location<"u"?location.href:void 0})}else if("reason"in s){let e=s.reason,t=e instanceof Error?e.message:typeof e=="string"?e:"Unhandled promise rejection";Me.captureException(e,{message:t,url:typeof location<"u"?location.href:void 0})}}catch{}}function tg(){typeof window>"u"||(window.addEventListener("error",os,!0),window.addEventListener("unhandledrejection",os,!0))}function mu(){typeof window>"u"||(window.removeEventListener("error",os,!0),window.removeEventListener("unhandledrejection",os,!0))}var rg={pause(){},resume(){},setUser(){},event(){},notifyRouteChange(){}},Me={replay:rg,init(s,e={}){try{let t=typeof window<"u"?window:null;if((Q.initialized||t?.__segiInitialized===!0)&&!e.force){!e.silent&&typeof console<"u"&&console.warn("[segi] init() called more than once; ignoring. Pass { force: true } to override.");return}Q.initialized&&mu();let{replay:i,...n}=s;Q.options={...n},Q.initialized=!0,t&&(t.__segiInitialized=!0),tg(),i?.__segi_replay&&Promise.resolve().then(()=>(pu(),du)).then(o=>(Me.replay=o.replayApi,o.activateReplay({projectKey:n.projectKey,endpoint:n.endpoint,config:i}))).catch(()=>{})}catch{}},isInitialized(){return Q.initialized},close(){try{if(mu(),Q.initialized=!1,Q.user=null,Q.tags={},Q.breadcrumbs=[],typeof window<"u"){let s=window;s.__segiInitialized=!1}}catch{}},captureException(s,e={}){try{if(!Q.initialized)return;let t=s instanceof Error?s:new Error(typeof s=="string"?s:JSON.stringify(s)),r=cs(Q,{type:"error",level:"error",message:t.message,errorName:t.name,stack:eg(t),platform:"javascript",runtime:"browser",url:e.url??(typeof location<"u"?location.href:void 0),userAgent:e.userAgent??(typeof navigator<"u"?navigator.userAgent:void 0),...e});ms(Q.options.endpoint,Q.options.projectKey,r)}catch{}},captureMessage(s,e={}){try{if(!Q.initialized)return;let t=cs(Q,{type:"message",level:e.level??"info",message:s,platform:"javascript",runtime:"browser",url:typeof location<"u"?location.href:void 0,userAgent:typeof navigator<"u"?navigator.userAgent:void 0,...e});ms(Q.options.endpoint,Q.options.projectKey,t)}catch{}},setUser(s){try{Q.user=s}catch{}},setTag(s,e){try{Q.tags[s]=e}catch{}},addBreadcrumb(s){try{Mn(Q,{...s,timestamp:s.timestamp??new Date().toISOString()})}catch{}}};(function(){try{let e=window;if(e.__segiBundleLoaded){typeof console<"u"&&console.warn("[segi] segi.min.js loaded more than once; ignoring this load.");return}e.__segiBundleLoaded=!0;let t=e.SegiConfig??{},r={},i=document.getElementsByTagName("script");for(let a=i.length-1;a>=0;a--){let l=i[a];if(l.src&&/segi(\.min)?\.js/.test(l.src)){r={projectKey:l.dataset.projectKey,endpoint:l.dataset.endpoint,environment:l.dataset.environment,release:l.dataset.release};break}}let n=t.projectKey??r.projectKey,o=t.endpoint??r.endpoint;if(!n){e.Segi=Me;return}Me.init({projectKey:n,endpoint:o,environment:t.environment??r.environment,release:t.release??r.release}),e.Segi=Me}catch{}})();var sg=Me;return Iu(ig);})();
61
+ or you can use record.mirror to access the mirror instance during recording.`,Vr={map:{},getId(){return console.error(Xe),-1},getNode(){return console.error(Xe),null},removeNodeFromMap(){console.error(Xe)},has(){return console.error(Xe),!1},reset(){console.error(Xe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Vr=new Proxy(Vr,{get(s,e,t){return e==="map"&&console.error(Xe),Reflect.get(s,e,t)}}));kt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(kt=()=>new Date().getTime());Lt=class{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};am=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Lt,get _mirror(){return Vr},closestElementOfNode:dn,getBaseDimension:wn,getNestedRule:qe,getPositionsAndIndex:Ei,getRootShadowHost:jl,getShadowHost:bn,getWindowHeight:hn,getWindowScroll:cn,getWindowWidth:fn,hasShadowRoot:Oe,hookSetter:Bt,inDom:Sn,isAncestorRemoved:pn,isBlocked:re,isIgnored:Cr,isSerialized:Wl,isSerializedIframe:tt,isSerializedStylesheet:yn,iterateResolveTree:gn,legacy_isTouchEvent:jr,get nowTimestamp(){return kt},on:te,polyfill:mn,queueToResolveTrees:zl,shadowHostInDom:Gl,throttle:ht,uniqueTextMutations:Vl},Symbol.toStringTag,{value:"Module"})),I=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(I||{}),E=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(E||{}),k=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(k||{}),be=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(be||{}),Ee=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ee||{}),Re=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Re||{}),_=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(_||{}),Se=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Se||{});Ii=class{constructor(){b(this,"length",0),b(this,"head",null),b(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&zo(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&zo(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Vo=(s,e)=>`${s}@${e}`,xi=class{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Ii,i=l=>{let u=l,c=xt;for(;c===xt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=l=>{let u=R.parentNode(l);if(!u||!Sn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){let m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=St(u)?this.mirror.getId(bn(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);let g=Je(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{tt(m,this.mirror)&&this.iframeManager.addIframe(m),yn(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Oe(l)&&this.shadowDomManager.addShadowRoot(R.shadowRoot(l),this.doc)},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p)},cssCaptured:c});g&&(e.push({parentId:h,nextId:f,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)jo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(R.parentNode(l))||n(l);for(let l of this.addedSet)!Go(this.droppedSet,l)&&!jo(this.removesSubTreeCache,l,this.mirror)||Go(this.movedSet,l)?n(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){let u=this.mirror.getId(R.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(R.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{let g=c.value,m=R.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=R.host(m);if(this.mirror.getId(p)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),n(l.value)}let a={texts:this.texts.map(l=>{let u=l.node,c=R.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:u}=l;if(typeof u.style=="string"){let c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),b(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(R.childNodes(e),i=>R.textContent(i)||"").join("");t.attributes.value=xr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Mr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!Cr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=R.textContent(e.target);!re(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:fa(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,dn(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Mr(t);i=xr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(re(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!ha(t.tagName,r))if(n.attributes[r]=ca(this.doc,Te(t.tagName),Te(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let a of Array.from(t.style)){let l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?n.styleDiff[a]=l:n.styleDiff[a]=[l,u]:n._unchangedStyles[a]=[l,u]}for(let a of Array.from(o.style))t.style.getPropertyValue(a)===""&&(n.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(re(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),i=St(e.target)?this.mirror.getId(R.host(e.target)):this.mirror.getId(e.target);re(e.target,this.blockClass,this.blockSelector,!1)||Cr(t,this.mirror,this.slimDOMOptions)||!Wl(t,this.mirror)||(this.addedSet.has(t)?(Mi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||pn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Vo(r,i)]?Mi(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:St(e.target)&&vt(e.target)?!0:void 0}),lm(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Cr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Vo(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);re(e,this.blockClass,this.blockSelector,!1)||(R.childNodes(e).forEach(r=>this.genAdds(r)),Oe(e)&&R.childNodes(R.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}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()}};T=s=>Et?(...t)=>{try{return s(...t)}catch(r){if(Et&&Et(r)===!0)return;throw r}}:s,Ue=[];mm=["INPUT","TEXTAREA","SELECT"],Ho=new WeakMap;Hr=class{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),o.set(a,t)),a}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Ni=class{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Hr(ua)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Hr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Se.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Ai=class{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!vt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=Yl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Xl({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(R.host(e))),this.restoreHandlers.push(Zl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(ze(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),a=R.shadowRoot(this);return a&&Sn(this)&&r.addShadowRoot(a,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(wt=0;wt<Qe.length;wt++)bt[Qe.charCodeAt(wt)]=wt;xm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Qe[e[t]>>2],i+=Qe[(e[t]&3)<<4|e[t+1]>>4],i+=Qe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Qe[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Mm=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)n=bt[s.charCodeAt(r)],o=bt[s.charCodeAt(r+1)],a=bt[s.charCodeAt(r+2)],l=bt[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},Yo=new Map;Kl=(s,e,t)=>{if(!s||!(ql(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=Nm(t,r),n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};Jl=(s,e,t)=>s.map(r=>Er(r,e,t)),ql=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);Ql="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Dm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Ko=typeof window<"u"&&window.Blob&&new Blob([Dm(Ql)],{type:"text/javascript;charset=utf-8"});Ri=class{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});let{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){let o=Xo(t,r,i,!0),a=new Map,l=new Tm;l.onmessage=m=>{let{id:p}=m.data;if(a.set(p,!1),!("base64"in m.data))return;let{base64:d,type:y,width:S,height:w}=m.data;this.mutationCb({id:p,type:Ee["2D"],commands:[{property:"clearRect",args:[0,0,S,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:y}]},0,0]}]})};let u=1e3/e,c=0,h,f=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(p=>{re(p,r,i,!0)||m.push(p)}),m},g=m=>{if(c&&m-c<u){h=requestAnimationFrame(g);return}c=m,f().forEach(async p=>{var d;let y=this.mirror.getId(p);if(a.get(y)||p.width===0||p.height===0)return;if(a.set(y,!0),["webgl","webgl2"].includes(p.__context)){let w=p.getContext(p.__context);((d=w?.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}let S=await createImageBitmap(p);l.postMessage({id:y,bitmap:S,width:p.width,height:p.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(g)};h=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=Xo(e,t,r,!1),n=Am(this.processMutation.bind(this),e,t,r),o=Om(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:a,...l}=o;return l}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}},Oi=class{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Lt),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},i=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(a,l)=>({rule:aa(a,n.href),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Di=class{constructor(){b(this,"nodeMap",new WeakMap),b(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Yr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Yn=s.contentWindow)==null?void 0:Yn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}he=la();_e.addCustomEvent=(s,e)=>{if(!Yr)throw new Error("please add custom event after start recording");J({type:I.Custom,data:{tag:s,payload:e}})};_e.freezePage=()=>{Ue.forEach(s=>s.freeze())};_e.takeFullSnapshot=s=>{if(!Yr)throw new Error("please take full snapshot after start recording");Ir(s)};_e.mirror=he;_m=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"}));Ti=class{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.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(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){let i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(et||(et={}));tu={type:"xstate.init"};ra=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};Fm=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],sa=new Map;Bm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];ki=class{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(_.Start,this.start.bind(this)),this.emitter.on(_.SkipStart,this.start.bind(this)),this.emitter.on(_.Pause,this.pause.bind(this)),this.emitter.on(_.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=()=>{this.metadataCallbackMap.delete(e);let r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){let i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:n===Re.Play||n!==Re.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:a??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:o??i?.playbackRate??1,volume:u??i?.volume??1,muted:l??i?.muted??e.getAttribute("muted")===null,loop:c??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:n,isPlaying:o}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,n=r.getMeta(i);if(!n||!("attributes"in n))return;let o=this.service.state.matches("paused"),a=n.attributes,l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&o&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let g=0;typeof a.rr_mediaCurrentTime=="number"&&(g=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:g,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};Gm=5*1e3,Hm=eu||_m,ia="[replayer]",_s={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};Li=class{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new ut),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Hm()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",So()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",la()),b(this,"styleMirror",new Lt),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",a=>{this.iframe.style.display="inherit";for(let l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),b(this,"applyEventsSynchronously",a=>{for(let l of a){switch(l.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:u=()=>{this.emitter.emit(_.CustomEvent,a)};break;case I.Meta:u=()=>this.emitter.emit(_.Resize,{width:a.data.width,height:a.data.height});break;case I.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case I.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){let h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Gm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(_.SkipStart,f)}}};break}return()=>{u&&u();for(let f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){let f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(_.Finish))},g=50;a.type===I.IncrementalSnapshot&&a.data.source===E.MouseMove&&a.data.positions.length&&(g+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,g)}this.emitter.emit(_.EventCast,a)}}),!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:_s,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(_.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(_.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(l,u,c)=>{_i({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===E.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===E.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Wr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let l in this.legacy_missingNodeRetryMap)try{let u=this.legacy_missingNodeRetryMap[l],c=zr(u.node,this.mirror,this.virtualDom.mirror);Wr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),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){let[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(_.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Ti([],{speed:this.config.speed});this.service=Pm({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(_.StateChange,{player:a})}),this.speedService=$m({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(_.StateChange,{speed:a})}),this.mediaManager=new ki({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let n=this.service.state.context.events.find(a=>a.type===I.Meta),o=this.service.state.context.events.find(a=>a.type===I.FullSnapshot);if(n){let{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(_.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(na)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(_.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(_.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(_.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(_.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;na(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event: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=So()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(km(this.iframe.contentWindow,this.iframe.contentDocument),mn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!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={};let r=[],i=new Set,n=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){let{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),kf(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);let{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),i.forEach(l=>yr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(_.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;let i=Fm(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){let n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Fl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:E.StyleSheetRule,adds:i.map((o,a)=>({rule:o,index:a}))})}else{let n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(i,a);let u=r.getMeta(a);if(u?.type===Se.Element&&u?.tagName.toUpperCase()==="HTML"){let{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Ct(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(let{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>yr(a))}collectIframeAndAttachDocument(e,t){if(tt(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let r=new Set,i,n=this.service.state,o=()=>{n=this.service.state};this.emitter.on(_.Start,o),this.emitter.on(_.Pause,o);let a=()=>{this.emitter.off(_.Start,o),this.emitter.off(_.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(_.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(_.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let r=document.createElement("canvas"),i=r.getContext("2d"),n=i?.createImageData(r.width,r.height);i?.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async n=>{let o=await Promise.all(n.args.map(De(this.imageMap,null,r)));return{...n,args:o}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(De(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var r,i,n;let{data:o}=e;switch(o.source){case E.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){let a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{let l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case E.MouseInteraction:{if(o.id===-1)break;let a=new Event(Te(k[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(_.MouseInteraction,{type:o.type,target:l});let{triggerFocus:u}=this.config;switch(o.type){case k.Blur:"blur"in l&&l.blur();break;case k.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case k.Click:case k.TouchStart:case k.TouchEnd:case k.MouseDown:case k.MouseUp:t?(o.type===k.TouchStart?this.touchActive=!0:o.type===k.TouchEnd&&(this.touchActive=!1),o.type===k.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===k.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===k.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===k.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===k.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===k.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case k.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case E.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case E.ViewportResize:this.emitter.emit(_.Resize,{width:o.width,height:o.height});break;case E.Input:{if(o.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case E.MediaInteraction:{let a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);let l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{let a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);_i({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{let a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case E.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Hp(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let u in this.legacy_missingNodeRetryMap)try{let c=this.legacy_missingNodeRetryMap[u],h=$l(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Oe(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(g){if(g instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw g}});let i={...this.legacy_missingNodeRetryMap},n=[],o=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===Se.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(Oe(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let g=null,m=null;if(u.previousId&&(g=r.getNode(u.previousId)),u.nextId&&(m=r.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;let p=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(tt(f,r)){this.attachDocumentToIframe(u,f);return}let d=(w,v)=>{if(!this.usingVirtualDom){yr(w);for(let x of this.config.plugins||[])x.onBuild&&x.onBuild(w,{id:v,replayer:this})}},y=Ct(u.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}let S=r.getMeta(f);if(S&&S.type===Se.Element&&u.node.type===Se.Text){let w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(let v of w)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&w.length===1)for(let v of w)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(y.textContent=v.textContent,f.removeChild(v))}else if(S?.type===Se.Document){let w=f;u.node.type===Se.DocumentType&&((c=w.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),y.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(g&&g.nextSibling&&g.nextSibling.parentNode?f.insertBefore(y,g.nextSibling):m&&m.parentNode?f.contains(m)?f.insertBefore(y,m):f.insertBefore(y,null):f.appendChild(y),d(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),tt(y,this.mirror)){let w=this.mirror.getId(y),v=this.newDocumentQueue.find(x=>x.parentId===w);v&&(this.attachDocumentToIframe(v,y),this.newDocumentQueue=this.newDocumentQueue.filter(x=>x!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,y,u)};e.adds.forEach(u=>{a(u)});let l=Date.now();for(;n.length;){let u=zl(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(let c of u)r.getNode(c.value.parentId)?gn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Vl(e.texts).forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(g=>g.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);let f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=es(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){let g=h.parentNode;((c=g?.rules)==null?void 0:c.length)>0&&(g.rules=[])}}),e.attributes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(let f in u.attributes)if(typeof f=="string"){let g=u.attributes[f];if(g===null)h.removeAttribute(f),f==="open"&&jm(h,u);else if(typeof g=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{let m=r.getMeta(h),p=Ct({...m,attributes:{...m.attributes,...u.attributes}},{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,u.attributes);let d=h.nextSibling,y=h.parentNode;if(p&&y){y.removeChild(h),y.insertBefore(p,d),r.replace(u.id,p);break}}catch{}if(f==="value"&&h.nodeName==="TEXTAREA"){let m=h;m.childNodes.forEach(d=>m.removeChild(d));let p=(c=h.ownerDocument)==null?void 0:c.createTextNode(g);p&&m.appendChild(p)}else h.setAttribute(f,g);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&yr(h,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(f==="style"){let m=g,p=h;for(let d in m)if(m[d]===!1)p.style.removeProperty(d);else if(m[d]instanceof Array){let y=m[d];p.style.setProperty(d,y[0],y[1])}else{let y=m[d];p.style.setProperty(d,y)}}}})}applyScroll(e,t){var r,i;let n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);let o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(o?.type===Se.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,r=e.ranges.map(({start:i,startOffset:n,end:o,endOffset:a})=>{let l=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!l||!u)return;let c=new Range;c.setStart(l,n),c.setEnd(u,a);let h=l.ownerDocument,f=h?.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){let{positions:u,index:c}=Ei(l);qe(t.cssRules,u).insertRule(a,c)}else{let u=l===void 0?void 0:Math.min(l,t.cssRules.length);t?.insertRule(a,u)}}catch{}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){let{positions:l,index:u}=Ei(a);qe(t.cssRules,l).deleteRule(u||0)}else t?.deleteRule(a)}catch{}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch{}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&qe(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&qe(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Oe(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:a.rules},u)}catch{}});let i=10,n=0,o=(a,l)=>{let u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Oe(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<i&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:n,nextId:o}=i,a=n&&e[n],l=o&&e[o];if(a){let{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){let{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,n){let o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);let a=wn(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?_s:Object.assign({},_s,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;let a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(_.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(ia,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ia,...e)}},{addCustomEvent:Ym}=_e,{freezePage:Xm}=_e,{takeFullSnapshot:Zm}=_e});var uu={};Ht(uu,{startRrweb:()=>Km});async function Km(s){if(typeof window>"u")return null;let e;try{e=await Promise.resolve().then(()=>(au(),ou))}catch{return null}let t=s.options.mask?.class??"segi-mask",r=s.options.mask?.inputs??"all",i=r==="all"?{password:!0,email:!0,tel:!0,number:!0,text:!0,textarea:!0}:r==="sensitive"?{password:!0,email:!0,tel:!0,number:!0}:{password:!0},n=[],o=0,a=null,l=Date.now(),u=!1,c=!1,h=setInterval(()=>{u||c||p()},1e4),f=setInterval(()=>{u||c||Date.now()-l>=18e4&&m()},15e3);function g(){if(a)return;let w=e.record({emit(x){if(u||c)return;let N;try{N=JSON.stringify(x)}catch{return}n.push(N),o+=N.length,o>=102400&&p()},sampling:{mousemove:20,scroll:150,input:"last"},maskAllInputs:r==="all",maskInputOptions:i,blockClass:t,ignoreClass:t,maskTextClass:t,recordCanvas:!1,collectFonts:!1,checkoutEveryNms:3e4});a=typeof w=="function"?w:null;let v=()=>{if(!(c||u))try{let x=e;typeof x.record.takeFullSnapshot=="function"?x.record.takeFullSnapshot(!0):typeof x.takeFullSnapshot=="function"&&x.takeFullSnapshot(!0)}catch{}};setTimeout(v,100),setTimeout(v,500),setTimeout(v,2e3)}function m(){try{a?.()}finally{a=null}p()}function p(w=!1){if(n.length===0)return;let v=n;n=[],o=0;try{s.sendChunk(v,w)}catch{}}function d(){l=Date.now(),!a&&!u&&!c&&g()}for(let w of lu)window.addEventListener(w,d,{passive:!0,capture:!0});let y=()=>p(!0),S=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&p(!0)};return window.addEventListener("pagehide",y),typeof document<"u"&&document.addEventListener("visibilitychange",S),g(),{pause(){u=!0,m()},resume(){u=!1,l=Date.now(),g()},stop(){c=!0,m(),clearInterval(h),clearInterval(f);for(let w of lu)window.removeEventListener(w,d,{capture:!0});window.removeEventListener("pagehide",y),typeof document<"u"&&document.removeEventListener("visibilitychange",S)},flush:p,takeFullSnapshot(){if(!(c||u))try{e.record.takeFullSnapshot?.()}catch{}}}}var lu,cu=je(()=>{"use strict";lu=["mousemove","mousedown","keydown","touchstart","scroll","wheel"]});var du={};Ht(du,{activateReplay:()=>qm,replayApi:()=>Qm,withReplay:()=>Jm});function Jm(s={}){return{__segi_replay:!0,options:s}}function hu(){if(typeof window>"u")return"desktop";let s=window.innerWidth;return s<640?"mobile":s<1024?"tablet":"desktop"}function Ve(s){if(!(typeof location>"u"))try{return new URLSearchParams(location.search).get(s)??void 0}catch{return}}function fu(s,e){return(s.blockRoutes??[]).some(r=>e.startsWith(r))}async function qm(s){if(M||typeof window>"u")return;let e=s.config.options;if(e.enabled===!1)return;let t=Math.max(0,Math.min(100,e.sample??100));if(Math.random()*100>=t||fu(e,location.pathname))return;let r=zn(),i=ys(),n={endpoint:e.endpoint??s.endpoint,projectKey:s.projectKey},o={sessionUid:r,anonId:i,startedAt:new Date().toISOString(),device:hu(),viewportW:window.innerWidth,viewportH:window.innerHeight,ua:navigator.userAgent?.slice(0,512),referrer:document.referrer||void 0,landingUrl:location.href.slice(0,512),utmSource:Ve("utm_source"),utmMedium:Ve("utm_medium"),utmCampaign:Ve("utm_campaign"),utmContent:Ve("utm_content"),utmTerm:Ve("utm_term"),fbclid:Ve("fbclid"),gclid:Ve("gclid")},a=!0;try{let h=await Ne(n,"/session/start",o);h&&h.ok&&(await h.json().catch(()=>({}))).recordingEnabled===!1&&(a=!1)}catch{}if(!a){M={sessionUid:r,config:n,options:e,heatmap:null,rrweb:null,replayBlocked:!1,paused:!0,userId:null,startedAt:o.startedAt,pagesVisited:0,clickCount:0,recordingEnabled:!1};return}let l=Pn({sessionUid:r,options:e,sendClicks:(h,f)=>{f?ws(n,"/heatmap/clicks",{clicks:h}):Ne(n,"/heatmap/clicks",{clicks:h})},sendScroll:h=>{Ne(n,"/heatmap/scroll",h)}});M={sessionUid:r,config:n,options:e,heatmap:l,rrweb:null,replayBlocked:!1,paused:!1,userId:null,startedAt:o.startedAt,pagesVisited:1,clickCount:0,recordingEnabled:!0};let u=window,c=h=>{let f=!1,g=()=>{f||(f=!0,typeof u.requestIdleCallback=="function"?u.requestIdleCallback(h,{timeout:2e3}):setTimeout(h,1e3))};typeof document<"u"&&document.readyState==="complete"?g():(window.addEventListener("load",g,{once:!0}),setTimeout(g,5e3))};Promise.resolve().then(()=>(cu(),uu)).then(({startRrweb:h})=>new Promise(f=>{c(()=>{h({sessionUid:r,options:e,sendChunk:async(g,m)=>{if(!M||M.replayBlocked)return;let p=`{"sessionUid":${JSON.stringify(r)},"chunk":[${g.join(",")}]}`,d=(n.endpoint||"https://segiapi.extn.ai").replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"");if(m){try{let y=`${d}/api/trace/replay?pk=${encodeURIComponent(n.projectKey)}`,S=new Blob([p],{type:"application/json"});typeof navigator<"u"&&typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(y,S)}catch{}return}try{(await fetch(`${d}/api/trace/replay`,{method:"POST",headers:{"Content-Type":"application/json","X-Segi-Project-Key":n.projectKey},body:p})).status===429&&M&&(M.replayBlocked=!0,M.rrweb?.stop(),M.rrweb=null)}catch{}}}).then(f,()=>f(null))})})).then(h=>{h&&M&&(M.rrweb=h)}).catch(()=>{}),Ne(n,"/events",{events:[{sessionUid:r,ts:new Date().toISOString(),type:"page_view",url:location.href,title:document.title}]}),window.addEventListener("pagehide",()=>{M&&(M.rrweb?.flush(!0),ws(M.config,"/session/end",{sessionUid:M.sessionUid,endedAt:new Date().toISOString(),durationMs:Date.now()-new Date(M.startedAt).getTime(),pagesVisited:M.pagesVisited,clickCount:M.clickCount}))})}var M,Qm,pu=je(()=>{"use strict";$n();jn();Hn();M=null;Qm={pause(){M?.heatmap?.pause(),M?.rrweb?.pause(),M&&(M.paused=!0)},resume(){M?.heatmap?.resume(),M?.rrweb?.resume(),M&&(M.paused=!1),Vn()},setUser(s){M&&(M.userId=s?.id??null,Ne(M.config,"/session/start",{sessionUid:M.sessionUid,anonId:ys(),userId:M.userId,startedAt:M.startedAt,device:hu(),viewportW:window.innerWidth,viewportH:window.innerHeight}))},event(s,e){!M||M.paused||Ne(M.config,"/events",{events:[{sessionUid:M.sessionUid,ts:new Date().toISOString(),type:"custom",name:s.slice(0,64),url:location.href,meta:e}]})},notifyRouteChange(s,e){if(!M)return;if(fu(M.options,location.pathname)){M.paused||(M.heatmap?.pause(),M.rrweb?.pause(),M.paused=!0);return}M.paused&&(M.heatmap?.resume(),M.rrweb?.resume(),M.paused=!1),M.pagesVisited+=1,M.rrweb?.takeFullSnapshot(),Ne(M.config,"/events",{events:[{sessionUid:M.sessionUid,ts:new Date().toISOString(),type:"page_view",url:s??location.href,title:e??document.title}]})},_sessionUid(){return M?.sessionUid??null}}});var ig={};Ht(ig,{Segi:()=>Me,default:()=>sg});function xn(){return{options:{projectKey:"",endpoint:""},user:null,tags:{},breadcrumbs:[],initialized:!1}}function Mn(s,e){let t=s.options.maxBreadcrumbs??50;s.breadcrumbs.push(e),s.breadcrumbs.length>t&&s.breadcrumbs.splice(0,s.breadcrumbs.length-t)}function cs(s,e){let t={type:e.type??"error",level:e.level??"error",message:e.message??"",errorName:e.errorName,stack:e.stack,platform:e.platform,runtime:e.runtime,environment:e.environment??s.options.environment,release:e.release??s.options.release,transaction:e.transaction,url:e.url,userAgent:e.userAgent,user:e.user??s.user??void 0,tags:{...s.tags,...e.tags??{}},extra:e.extra,breadcrumbs:s.breadcrumbs.slice(),request:e.request,timestamp:e.timestamp??new Date().toISOString()};if(s.options.beforeSend)try{let r=s.options.beforeSend(t);return r||{...t,_drop:!0}}catch{return t}return t}var kn=Eu(Tn()),_n=new Set;function ps(s,e){_n.has(s)||(_n.add(s),typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[segi] ${e}`))}function _u(s){return s===401||s===403?"ingest rejected the project key (check projectKey + endpoint region)":s===404?"ingest endpoint not found (check endpoint URL)":s===413?"event payload too large; dropped by ingest":s===429?"ingest rate-limited (over plan quota or burst)":s>=500?"ingest is returning 5xx \u2014 events may be lost":"ingest returned a non-2xx response"}function ms(s,e,t){let r=s||kn.SEGI_DEFAULT_INGEST_ENDPOINT;if(!r||!e){ps("missing-config",e?"init() called without a valid endpoint \u2014 events will not be sent":"init() called without a projectKey \u2014 events will not be sent");return}if(!t._drop)try{let i=JSON.stringify(t),n={"Content-Type":"application/json","X-Segi-Project-Key":e};if(typeof fetch=="function"){fetch(r,{method:"POST",headers:n,body:i,keepalive:!0,mode:"cors",credentials:"omit"}).then(o=>{o.ok||ps(`status-${o.status}`,`${_u(o.status)} (HTTP ${o.status} from ${r})`)}).catch(o=>{ps("network-error",`network error reaching ${r} \u2014 events not delivered (${o instanceof Error?o.message:String(o)})`)});return}if(typeof navigator<"u"&&typeof navigator.sendBeacon=="function"){let o=`${r}${r.includes("?")?"&":"?"}pk=${encodeURIComponent(e)}`,a=new Blob([i],{type:"application/json"});navigator.sendBeacon(o,a)}}catch{}}var q=xn();function eg(s){try{if(s&&typeof s=="object"&&"stack"in s)return String(s.stack??"")}catch{}}function os(s){if(q.initialized)try{if(s instanceof ErrorEvent){let e=s.error,t=e?.message??s.message??"Error";Me.captureException(e??new Error(t),{message:t,url:typeof location<"u"?location.href:void 0})}else if("reason"in s){let e=s.reason,t=e instanceof Error?e.message:typeof e=="string"?e:"Unhandled promise rejection";Me.captureException(e,{message:t,url:typeof location<"u"?location.href:void 0})}}catch{}}function tg(){typeof window>"u"||(window.addEventListener("error",os,!0),window.addEventListener("unhandledrejection",os,!0))}function mu(){typeof window>"u"||(window.removeEventListener("error",os,!0),window.removeEventListener("unhandledrejection",os,!0))}var rg={pause(){},resume(){},setUser(){},event(){},notifyRouteChange(){}},Me={replay:rg,init(s,e={}){try{let t=typeof window<"u"?window:null;if((q.initialized||t?.__segiInitialized===!0)&&!e.force){!e.silent&&typeof console<"u"&&console.warn("[segi] init() called more than once; ignoring. Pass { force: true } to override.");return}q.initialized&&mu();let{replay:i,...n}=s;q.options={...n},q.initialized=!0,t&&(t.__segiInitialized=!0),tg(),i?.__segi_replay&&Promise.resolve().then(()=>(pu(),du)).then(o=>(Me.replay=o.replayApi,o.activateReplay({projectKey:n.projectKey,endpoint:n.endpoint,config:i}))).catch(()=>{})}catch{}},isInitialized(){return q.initialized},close(){try{if(mu(),q.initialized=!1,q.user=null,q.tags={},q.breadcrumbs=[],typeof window<"u"){let s=window;s.__segiInitialized=!1}}catch{}},captureException(s,e={}){try{if(!q.initialized)return;let t=s instanceof Error?s:new Error(typeof s=="string"?s:JSON.stringify(s)),r=cs(q,{type:"error",level:"error",message:t.message,errorName:t.name,stack:eg(t),platform:"javascript",runtime:"browser",url:e.url??(typeof location<"u"?location.href:void 0),userAgent:e.userAgent??(typeof navigator<"u"?navigator.userAgent:void 0),...e});ms(q.options.endpoint,q.options.projectKey,r)}catch{}},captureMessage(s,e={}){try{if(!q.initialized)return;let t=cs(q,{type:"message",level:e.level??"info",message:s,platform:"javascript",runtime:"browser",url:typeof location<"u"?location.href:void 0,userAgent:typeof navigator<"u"?navigator.userAgent:void 0,...e});ms(q.options.endpoint,q.options.projectKey,t)}catch{}},setUser(s){try{q.user=s}catch{}},setTag(s,e){try{q.tags[s]=e}catch{}},addBreadcrumb(s){try{Mn(q,{...s,timestamp:s.timestamp??new Date().toISOString()})}catch{}}};(function(){try{let e=window;if(e.__segiBundleLoaded){typeof console<"u"&&console.warn("[segi] segi.min.js loaded more than once; ignoring this load.");return}e.__segiBundleLoaded=!0;let t=e.SegiConfig??{},r={},i=document.getElementsByTagName("script");for(let a=i.length-1;a>=0;a--){let l=i[a];if(l.src&&/segi(\.min)?\.js/.test(l.src)){r={projectKey:l.dataset.projectKey,endpoint:l.dataset.endpoint,environment:l.dataset.environment,release:l.dataset.release};break}}let n=t.projectKey??r.projectKey,o=t.endpoint??r.endpoint;if(!n){e.Segi=Me;return}Me.init({projectKey:n,endpoint:o,environment:t.environment??r.environment,release:t.release??r.release}),e.Segi=Me}catch{}})();var sg=Me;return Iu(ig);})();
62
62
  /*! Bundled license information:
63
63
 
64
64
  rrweb/dist/rrweb.js: