posthog-js 1.431.2 → 1.431.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/customizations.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.cjs +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.no-external.cjs +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.js +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.no-external.cjs +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/dist/rrweb.js +1 -1
- package/dist/rrweb.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +5 -5
package/dist/rrweb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e,i,n){return(i=function(e){var i=function(e){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(i)?i:i+""}(i))in e?Object.defineProperty(e,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[i]=n,e}function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function n(t){for(var n=1;arguments.length>n;n++){var s=null!=arguments[n]?arguments[n]:{};n%2?i(Object(s),!0).forEach(function(i){e(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):i(Object(s)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))})}return t}function s(t,e){if(null==t)return{};var i,n,s=function(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;r.length>n;n++)e.includes(i=r[n])||{}.propertyIsEnumerable.call(t,i)&&(s[i]=t[i])}return s}function r(t,e,i,n,s,r,o){try{var l=t[r](o),a=l.value}catch(t){return void i(t)}l.done?e(a):Promise.resolve(a).then(n,s)}function o(t){return function(){var e=this,i=arguments;return new Promise(function(n,s){var o=t.apply(e,i);function l(t){r(o,n,s,l,a,"next",t)}function a(t){r(o,n,s,l,a,"throw",t)}l(void 0)})}}const l=["inputId"],a=["inputId"],h=["type"];var u=Object.defineProperty,c=(t,e)=>{let i={};for(var n in t)u(i,n,{get:t[n],enumerable:!0});return e||u(i,Symbol.toStringTag,{value:"Module"}),i},f=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}({});function d(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date,"0".repeat(32),"0".repeat(16);var p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},v={};function y(t){if(v[t])return v[t];const e=function(t){var e,i;const n=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(i=e.__symbol__)||void 0===i?void 0:i.call(e,t);return n&&globalThis[n]?globalThis[n]:void 0}(t)||globalThis[t],i=e.prototype,n=t in p?p[t]:void 0,s=Boolean(n&&n.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(i,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),r=t in m?m[t]:void 0,o=Boolean(r&&r.every(t=>{var e;return"function"==typeof i[t]&&(null===(e=i[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(s&&o)return v[t]=e.prototype,e.prototype;const l=document.createElement("iframe");l.style.display="none";let a=!1;try{document.body.appendChild(l);const n=l.contentWindow;if(!n)return e.prototype;const s=n[t].prototype;return s?(d(h=navigator.userAgent,"AppleWebKit")&&!d(h,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",t),a=!0),v[t]=s):i}catch(t){return i}finally{!a&&l.parentNode&&document.body.removeChild(l)}var h}var g=Object.create(null);function b(t,e,i){var n;const s=g[t],r=s[i];if(r)return r.call(e);const o=y(t),l=null===(n=Object.getOwnPropertyDescriptor(o,i))||void 0===n?void 0:n.get;return l?(s[i]=l,l.call(e)):e[i]}g.Node=Object.create(null),g.ShadowRoot=Object.create(null),g.MutationObserver=Object.create(null),g.Element=Object.create(null);var w,S={};function k(t,e,i){const n=`${t}.${String(i)}`;if(S[n])return S[n].bind(e);const s=y(t)[i];return"function"!=typeof s?e[i]:(S[n]=s,s.bind(e))}var C={childNodes:t=>b("Node",t,"childNodes"),parentNode:t=>b("Node",t,"parentNode"),parentElement:t=>b("Node",t,"parentElement"),textContent:t=>b("Node",t,"textContent"),isConnected(t){if(void 0===w){var e;const t=null===(e=Object.getOwnPropertyDescriptor(y("Node"),"isConnected"))||void 0===e?void 0:e.get;w=(null==t?void 0:t.toString().includes("[native code]"))?t:null}return null==w?void 0:w.call(t)},contains:(t,e)=>k("Node",t,"contains")(e),getRootNode:t=>k("Node",t,"getRootNode")(),host:t=>t&&"host"in t?b("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null,querySelector:(t,e)=>k("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>k("Element",t,"querySelectorAll")(e),mutationObserver:()=>y("MutationObserver").constructor,patch(t,e,i){try{if(!(e in t))return()=>{};const n=t[e],s={next:n},r=i(function(...t){return s.next.apply(this,t)});return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n},__rrweb_layer__:{enumerable:!1,value:s}})),t[e]=r,()=>{if(t[e]===r)return void(t[e]=s.next);const i=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0};let n=t[e],o=i(n);for(;o;){if(o.next===r)return void(o.next=s.next);n=o.next,o=i(n)}}}catch(t){return()=>{}}}};function M(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var x=0,E=0;function A(){x+=1}function I(){return x}function R(){return E}function T(t,e){return(e!==x||t>6e4)&&(E+=1,!0)}var O=0,D=0,N=0,L={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},_=null,F=null,P=[],B=0,j=0,U={slowestBatchMs:0},W={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0};function H(t){(O+=1)>1||(L={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},P=[],B=0,F=(t=>t&&t>0?t:null)(t),D=M(),N=x)}function G(){return 0===O?_||{durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0}:(O-=1)>0?L:(L.durationMs=M()-D,L.deferredStylesheetCount=B,W.deferredCount+=B,F=null,T(L.durationMs,N)?L:_=L)}function z(){return _}function V(t,e,i){let n=t.length;if(i>=32)return n;for(let s=0;t.length>s;s++){const r=t[s];try{const t=r.cssRules;if(t&&t.length)n+=V(t,e,i+1);else if(e&&r.styleSheet){const t=r.styleSheet;if(!e.has(t)){e.add(t);const s=t.rules||t.cssRules;s&&(n+=V(s,e,i+1))}}}catch(t){}}return n}function Y(t){if(0===O)return;const e=V(t,null,0);L.cssRuleCount+=e,j>0&&(L.nonDeferrableCssRuleCount+=e)}function q(t){j+=1;try{return t()}finally{j-=1}}function Z(t){O>0&&(L.stylesheetMs+=t)}function X(t){if(0===O||null===F)return!1;const e=L.cssRuleCount-L.nonDeferrableCssRuleCount;return e>=F||e+function(t){try{const e=t&&(t.rules||t.cssRules);if(!e)return 0;const i=new WeakSet;return i.add(t),V(e,i,0)}catch(t){return 0}}(t)>F}function J(){const t=P;return P=[],t}function Q(){W.failedCount+=1}function K(t){t>0&&(W.abandonedCount+=t)}function tt(){return n({},W)}function et(){return n({},U)}function it(){O=0,D=0,N=0,x=0,E=0,L={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},_=null,F=null,P=[],B=0,j=0,U={slowestBatchMs:0},W={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function nt(t){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt(t)}function st(t,e,i){return(e=function(t){var e=function(t){if("object"!=nt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=nt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function rt(t){return t.nodeType===t.ELEMENT_NODE}function ot(t){const e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function lt(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}function at(t){return"[object ShadowRoot]"==={}.toString.call(t)}function ht(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function ut(t){const{cssText:e}=t;if(3>e.split('"').length)return e;const i=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?i.push("layer"):t.layerName&&i.push(`layer(${t.layerName})`),t.supportsText&&i.push(`supports(${t.supportsText})`),t.media.length&&i.push(t.media.mediaText),i.join(" ")+";"}var ct=0;function ft(t){const e=0===ct,i=e?M():0;ct+=1;try{const e=t.rules||t.cssRules;if(!e)return null;Y(e);let i=t.href;return!i&&t.ownerNode&&(i=t.ownerNode.baseURI),ht(Array.from(e,t=>dt(t,i)).join(""))}catch(t){return null}finally{ct-=1,e&&Z(M()-i)}}function dt(t,e){if(mt(t)){let e;try{e=ft(t.styleSheet)||ut(t)}catch(i){e=t.cssText}try{var i;if(e&&(null===(i=t.styleSheet)||void 0===i?void 0:i.href))return Nt(e,t.styleSheet.href)}catch(t){}return e}{let i=t.cssText;return vt(t)&&t.selectorText.includes(":")&&(i=pt(i)),e?Nt(i,e):i}}function pt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function mt(t){return"styleSheet"in t}function vt(t){return"selectorText"in t}var yt=/^-?[A-Za-z_][\w-]*$/,gt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function bt(t){const e=[];let i=!1,n=null;const s=new Map;function r(t){const s=e.pop();if("group"===s.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void r(null)}const i=e[e.length-1];return i.parts.push(t),void(i.index+=1)}if(!s.importRule)return i=!0,void(n=t);o(e[e.length-1],s.importRule,t)}function o(t,e,i){try{let s;try{s=i||ut(e)}catch(t){s=e.cssText}try{var n;s&&(null===(n=e.styleSheet)||void 0===n?void 0:n.href)&&(s=Nt(s,e.styleSheet.href))}catch(t){}s&&t.parts.push(s),t.index+=1}catch(t){r(null)}}function l(t){const i=t.rules[t.index];if("sheet"===t.kind&&mt(i)){const n=s.get(i);return null===n?(t.parts.push(i.cssText),void(t.index+=1)):n?void e.push({kind:"sheet",sheet:n.sheet,rules:n.rules,sheetHref:n.sheetHref,index:0,parts:[],importRule:i}):void o(t,i,null)}if(function(t,i){try{const n=function(t){const e=t;if(!e.cssRules||0===e.cssRules.length)return null;if(e.media&&"string"==typeof e.media.mediaText)return`@media ${e.media.mediaText} {`;if(vt(t)){if("number"==typeof e.type&&1!==e.type)return null;const i=e.style?e.style.cssText:"";return`${t.selectorText} {${i?" "+i:""}`}if("containerName"in e)return"string"!=typeof e.containerQuery||e.containerName&&!yt.test(e.containerName)?null:`@container ${e.containerName?`${e.containerName} `:""}${e.containerQuery} {`;if("string"==typeof e.conditionText){let n="";try{var i;n=(null===(i=t.constructor)||void 0===i?void 0:i.name)||""}catch(t){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?`@supports ${e.conditionText} {`:null}return"string"==typeof e.name?"keyText"in e.cssRules[0]?yt.test(e.name)?`@keyframes ${e.name} {`:null:""===e.name?"@layer {":gt.test(e.name)?`@layer ${e.name} {`:null:null}(t);if(null===n)return!1;const s=i.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:s,index:0,parts:[],prelude:s?Nt(n,s):n,fixColons:"sheet"===i.kind&&vt(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(i,t))return;let n=i.cssText;"sheet"===t.kind&&vt(i)&&i.selectorText.includes(":")&&(n=pt(n)),t.parts.push(t.sheetHref?Nt(n,t.sheetHref):n),t.index+=1}return function(t){try{const i=t.rules||t.cssRules;if(!i)return!1;Y(i);let n=t.href;!n&&t.ownerNode&&(n=t.ownerNode.baseURI);const r=Array.from(i);return e.push({kind:"sheet",sheet:t,rules:r,sheetHref:n,index:0,parts:[],importRule:null}),function(t,e){const i=[{sheet:e,rules:t,index:0}];for(;i.length>0;){const t=i[i.length-1];if(t.index>=t.rules.length){i.pop();continue}const e=t.rules[t.index];if(t.index+=1,!mt(e)||s.has(e))continue;let n=null;try{n=e.styleSheet}catch(t){s.set(e,null);continue}if(n&&!i.some(t=>t.sheet===n))try{const t=n.rules||n.cssRules;if(!t)continue;Y(t);let r=n.href;!r&&n.ownerNode&&(r=n.ownerNode.baseURI);const o=Array.from(t);s.set(e,{sheet:n,rules:o,sheetHref:r}),i.push({sheet:n,rules:o,index:0})}catch(t){}}}(r,t),!0}catch(t){return!1}}(t)||(i=!0),{advance(t){if(i)return!0;const s=M();let o=t>0?t:1;try{for(;!i&&o>0;){const t=e[e.length-1];if(t.index>=t.rules.length){let e=null;try{if("group"===t.kind){const i=t.prelude+t.parts.join("")+"}";e=t.fixColons?pt(i):i}else e=ht(t.parts.join(""))}catch(t){}r(e);continue}o-=1;try{l(t)}catch(t){r(null)}}}catch(t){i=!0,n=null}finally{Z(M()-s)}return i},text:()=>i?n:null,remainingRules(){if(i)return 0;let t=0;for(const i of e)t+=i.rules.length-i.index;return t}}}var wt=class{constructor(){st(this,"idNodeMap",new Map),st(this,"nodeMetaMap",new WeakMap)}getId(t){var e,i;return t&&null!==(e=null===(i=this.getMeta(t))||void 0===i?void 0:i.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),rt(t)){const e=C.shadowRoot(t);e&&this.removeNodeFromMap(e),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){const i=this.getNode(t);if(i){const t=this.nodeMetaMap.get(i);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function St(){return new wt}function kt({element:t,maskInputOptions:e,tagName:i,type:n,value:s,maskInputFn:r}){let o=s||"";const l=n&&Ct(n);return(e[i.toLowerCase()]||l&&e[l])&&(o=r?r(o,t):"*".repeat(o.length)),o}function Ct(t){return t.toLowerCase()}var Mt=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function xt({element:t,name:e,value:i,maskAllElementAttributes:n,maskAttributeFn:s,isGenerated:r=!1}){return i?n?r&&Mt.has(Ct(e))?i:"*".repeat(i.length):s?s(e,i,t):i:i}var Et="__rrweb_original__";function At(t){try{const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ct(e):null}catch(t){return null}}function It(t,e){var i;let n;try{n=new URL(t,null!=e?e:window.location.href)}catch(t){return null}const s=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(i=null==s?void 0:s[1])&&void 0!==i?i:null}var Rt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Tt=/^(?:[a-z+]+:)?\/\//i,Ot=/^www\..*/i,Dt=/^(data:)([^,]*),(.*)/i;function Nt(t,e){return(t||"").replace(Rt,(t,i,n,s,r,o)=>{const l=n||r||o,a=i||s||"";if(!l)return t;if(Tt.test(l)||Ot.test(l))return`url(${a}${l}${a})`;if(Dt.test(l))return`url(${a}${l}${a})`;if("/"===l[0])return`url(${a}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+l}${a})`;const h=e.split("/"),u=l.split("/");h.pop();for(const t of u)"."!==t&&(".."===t?h.pop():h.push(t));return`url(${a}${h.join("/")}${a})`})}var Lt=new Map,_t=Object.create,Ft=Object.defineProperty,Pt=Object.getOwnPropertyDescriptor,Bt=Object.getOwnPropertyNames,jt=Object.getPrototypeOf,Ut={}.hasOwnProperty,Wt=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),$t=(t,e,i)=>(i=null!=t?_t(jt(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var s,r=Bt(e),o=0,l=r.length;l>o;o++)Ut.call(t,s=r[o])||void 0===s||Ft(t,s,{get:(t=>e[t]).bind(null,s),enumerable:!(n=Pt(e,s))||n.enumerable});return t})(!e&&t&&t.__esModule&&Ut.call(t,"default")?i:Ft(i,"default",{value:t,enumerable:!0}),t)),Ht=new RegExp(/(max|min)-device-(width|height)/.source,"g"),Gt={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(Ht)&&(t.params=t.params.replace(Ht,"$1-$2"))}}}},zt={postcssPlugin:"postcss-hover-classes",prepare(){const t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach(function(t){if(t.includes(":hover")){const i=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");i!==t&&(e.selector+=",\n"+i)}}))}}}},Vt=Wt((t,e)=>{var i=String,n=function(){return{isColorSupported:!1,reset:i,bold:i,dim:i,italic:i,underline:i,inverse:i,hidden:i,strikethrough:i,black:i,red:i,green:i,yellow:i,blue:i,magenta:i,cyan:i,white:i,gray:i,bgBlack:i,bgRed:i,bgGreen:i,bgYellow:i,bgBlue:i,bgMagenta:i,bgCyan:i,bgWhite:i,blackBright:i,redBright:i,greenBright:i,yellowBright:i,blueBright:i,magentaBright:i,cyanBright:i,whiteBright:i,bgBlackBright:i,bgRedBright:i,bgGreenBright:i,bgYellowBright:i,bgBlueBright:i,bgMagentaBright:i,bgCyanBright:i,bgWhiteBright:i}};e.exports=n(),e.exports.createColors=n}),Yt=Wt((t,e)=>{e.exports={}}),qt=Wt((t,e)=>{var i=Vt(),n=Yt(),s=class t extends Error{constructor(e,i,n,s,r,o){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),s&&(this.source=s),o&&(this.plugin=o),void 0!==i&&void 0!==n&&("number"==typeof i?(this.line=i,this.column=n):(this.line=i.line,this.column=i.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=i.isColorSupported);let s=t=>t,r=t=>t,o=t=>t;if(t){let{bold:t,gray:e,red:l}=i.createColors(!0);r=e=>t(l(e)),s=t=>e(t),n&&(o=t=>n(t))}let l=e.split(/\r?\n/),a=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),u=String(h).length;return l.slice(a,h).map((t,e)=>{let i=a+1+e,n=" "+(" "+i).slice(-u)+" | ";if(i===this.line){if(t.length>160){let e=20,i=Math.max(0,this.column-e),l=Math.max(this.column+e,this.endColumn+e),a=t.slice(i,l),h=s(n.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return r(">")+s(n)+o(a)+"\n "+h+r("^")}let e=s(n.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(n)+o(t)+"\n "+e+r("^")}return" "+s(n)+o(t)}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=s,s.default=s}),Zt=Wt((t,e)=>{var i=/(<)(\/?style\b)/gi,n=/(<)(!--)/g,s=/[\t\n\f\r "#'()/;[\\\]{}]/;function r(t){return"string"!=typeof t?t:t.includes("<")?t.replace(i,"\\3c $2").replace(n,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function l(t,e){let i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",r=e.raws.afterName;return void 0===r?r=n?" ":"":""===r&&n&&!s.test(n[0])&&(r=" "),i+r+n}function a(t,e,i){let n=i.nodes,s=n.length-1;for(;s>0&&"comment"===n[s].type;)s-=1;let r=t.raw(i,"semicolon"),o="document"===i.type;for(let t=n.length-1;t>=0;t--){let i=n[t],l=s!==t||r;!l&&n.length-1>t&&("atrule"===i.type&&!i.nodes||"decl"===i.type&&i.prop.startsWith("--"))&&(l=!0),e.push({document:o,node:i,semicolon:l})}}function h(t,e,i,n){let s=t.raw(i,"between","beforeOpen");t.builder(r(n+s)+"{",i,"start");let o=i.nodes&&i.nodes.length,l=()=>{let e=o?t.raw(i,"after"):t.raw(i,"after","emptyBody");e&&t.builder(r(e)),t.builder("}",i,"end"),"rule"===i.type&&i.raws.ownSemicolon&&t.builder(r(i.raws.ownSemicolon),i,"end")};o?(e.push(l),a(t,e,i)):l()}var u=class t{constructor(t){this.builder=t}atrule(t,e){let i=l(this,t);t.nodes?this.block(t,i):this.builder(r(i+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){let i;i=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");let n=t.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(i.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;s>t;t++)i+=e}return i}block(t,e){let i,n=this.raw(t,"between","beforeOpen");this.builder(r(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(r(i)),this.builder("}",t,"end")}body(e){let i=t.prototype,n=["atrule","block","body","rule","stringify"].every(t=>this[t]===i[t]),s=[];for(a(this,s,e);s.length>0;){let t=s.pop();if("function"==typeof t){t();continue}let e=t.node,i=this.raw(e,"before");i&&this.builder(t.document?i:r(i)),n&&"rule"===e.type?h(this,s,e,this.rawValue(e,"selector")):n&&"atrule"===e.type&&e.nodes?h(this,s,e,l(this,e)):this.stringify(e,t.semicolon)}}comment(t){let e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(r("/*"+e+t.text+i+"*/"),t)}decl(t,e){let i=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=i.important||" !important"),e&&(s+=";"),this.builder(r(s),t)}document(t){this.body(t)}raw(t,e,i){let n;if(i||(i=e),e&&(n=t.raws[e],void 0!==n))return n;let s=t.parent;if("before"===i){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return o[i];let r=t.root(),l=r.rawCache||(r.rawCache={});if(void 0!==l[i])return l[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);{let s="raw"+((a=i)[0].toUpperCase()+a.slice(1));this[s]?n=this[s](r,t):r.walk(t=>{if(n=t.raws[e],void 0!==n)return!1})}var a;return void 0===n&&(n=o[i]),l[i]=n,n}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return e=i.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(i=>{let n=i.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==i.raws.before){let t=i.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let i=t[e],n=t.raws[e];return n&&n.value===i?n.raw:i}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){let e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:r(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(r(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=u,u.default=u}),Xt=Wt((t,e)=>{var i=Zt();function n(t,e){new i(e).stringify(t)}e.exports=n,n.default=n}),Jt=Wt((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),Qt=Wt((t,e)=>{var i=qt(),n=Zt(),s=Xt(),{isClean:r,my:o}=Jt();function l(t,e){if(e&&void 0!==e.offset)return e.offset;let i=1,n=1,s=0;for(let r=0;t.length>r;r++){if(n===e.line&&i===e.column){s=r;break}"\n"===t[r]?(i=1,n+=1):i+=1}return s}var a=class t{get proxyOf(){return this}constructor(t={}){this.raws={},this[r]=!1,this[o]=!0;for(let e of Object.keys(t))if("__proto__"!==e)if("nodes"===e){this.nodes=[];for(let i of t[e])this.append("function"==typeof i.clone&&i.parent?i.clone():i)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=function(t){let e=new t.constructor,i=[[t,e,void 0]];for(;i.length>0;){let[t,e,n]=i.pop();for(let s in t){if(!{}.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let r=t[s],o=typeof r;if("parent"===s&&"object"===o)n&&(e[s]=n);else if("source"===s)e[s]=r;else if(Array.isArray(r)){let t=[];e[s]=t;for(let n of r){let s=new n.constructor;t.push(s),i.push([n,s,e])}}else{if("object"===o&&null!==r){let t=new r.constructor;i.push([r,t,void 0]),r=t}e[s]=r}}}return e}(this);for(let i in t)e[i]=t[i];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:i,start:n}=this.rangeBy(e);return this.source.input.error(t,{column:n.column,line:n.line},{column:i.column,line:i.line},e)}return new i(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let t=this;for(;t=t.parent;)t[r]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)};if(t.index)i=this.positionInside(t.index);else if(t.word){let n=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==n&&(i=this.positionInside(n))}return i}positionInside(t){let e=this.source.start.column,i=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=l(n,this.source.start),r=s+t;for(let t=s;r>t;t++)"\n"===n[t]?(e=1,i+=1):e+=1;return{column:e,line:i,offset:r}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:l(e,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let s=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==s&&(i=this.positionInside(s),n=this.positionInside(s+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:l(e,t.start)}:"number"==typeof t.index&&(i=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line,offset:l(e,t.end)}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):"number"==typeof t.index&&(n=this.positionInside(t.index+1));return(i.line>n.line||n.line===i.line&&i.column>=n.column)&&(n={column:i.column+1,line:i.line,offset:i.offset+1}),{end:n,start:i}}raw(t,e){return(new n).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,i=!1;for(let n of t)n===this?i=!0:i?(this.parent.insertAfter(e,n),e=n):this.parent.insertBefore(e,n);i||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,i){let n=null==i;i=i||new Map;let s=[],r=[[this,s,0]];for(let e=0;r.length>e;e++){let[n,s,o]=r[e],l={};s[o]=l;for(let e in n){if(!{}.hasOwnProperty.call(n,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=n[e];if(Array.isArray(s)){let n=[];l[e]=n;for(let e=0;s.length>e;e++){let o=s[e];"object"==typeof o&&o.toJSON?o.toJSON===t.prototype.toJSON?r.push([o,n,e]):n[e]=o.toJSON(null,i):n[e]=o}}else if("object"==typeof s&&s.toJSON)s.toJSON===t.prototype.toJSON?r.push([s,l,e]):l[e]=s.toJSON(null,i);else if("source"===e){if(null==s)continue;let t=i.get(s.input);null==t&&(t=i.size,i.set(s.input,t)),l[e]={end:s.end,inputId:t,start:s.start}}else l[e]=s}}let o=s[0];return n&&(o.inputs=[...i.keys()].map(t=>t.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=s){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i={}){let n={node:this};for(let t in i)n[t]=i[t];return t.warn(e,n)}};e.exports=a,a.default=a}),Kt=Wt((t,e)=>{var i=Qt(),n=class extends i{constructor(t){super(t),this.type="comment"}};e.exports=n,n.default=n}),te=Wt((t,e)=>{var i=Qt(),s=class extends i{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=n(n({},t),{},{value:String(t.value)})),super(t),this.type="decl"}};e.exports=s,s.default=s}),ee=Wt((t,e)=>{var i,n,s,r,o=Kt(),l=te(),a=Qt(),{isClean:h,my:u}=Jt(),c=class t extends a{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(e){let i=[this];for(;i.length>0;){let n=i.pop();if(n===this||n.cleanRaws===t.prototype.cleanRaws){if(a.prototype.cleanRaws.call(n,e),n.nodes)for(let t of n.nodes)i.push(t)}else n.cleanRaws(e)}}each(t){if(!this.proxyOf.nodes)return;let e,i,n=this.getIterator();for(;this.proxyOf.nodes.length>this.indexes[n]&&(e=this.indexes[n],i=t(this.proxyOf.nodes[e],e),!1!==i);)this.indexes[n]+=1;return delete this.indexes[n],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...i)=>t[e](...i.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t)):"every"===e||"some"===e?i=>t[e]((t,...e)=>i(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n]).reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n+1,0,t);for(let t in this.indexes)i=this.indexes[t],i>n&&(this.indexes[t]=i+s.length);return this.markDirty(),this}insertBefore(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n,0,t);for(let t in this.indexes)i=this.indexes[t],n>i||(this.indexes[t]=i+s.length);return this.markDirty(),this}normalize(e,s){if("string"==typeof e)e=function(t){let e=t.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let i of t.nodes)e.push(i)}}return t.slice()}(n(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector||e.selectors)e=[new r(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[u]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[h]&&function(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[h]=!1,t.proxyOf.nodes)for(let i of t.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&s&&void 0!==s.raws.before&&(e.raws.before=s.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let i in this.indexes)e=this.indexes[i],t>e||(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(n=>{e.props&&!e.props.includes(n.prop)||e.fast&&!n.value.includes(e.fast)||(n.value=n.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let e=[{iterator:this.getIterator(),node:this.proxyOf}];for(;e.length>0;){let{iterator:i,node:n}=e[e.length-1],s=n.indexes[i];if(s>=n.proxyOf.nodes.length){delete n.indexes[i],e.pop();let t=e[e.length-1];t&&(t.node.indexes[t.iterator]+=1);continue}let r,o=n.proxyOf.nodes[s];try{r=t(o,s)}catch(t){throw o.addToError(t)}if(!1===r){for(let t of e)delete t.node.indexes[t.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("atrule"===i.type&&t.test(i.name))return e(i,n)}):this.walk((i,n)=>{if("atrule"===i.type&&i.name===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("decl"===i.type&&t.test(i.prop))return e(i,n)}):this.walk((i,n)=>{if("decl"===i.type&&i.prop===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("rule"===i.type&&t.test(i.selector))return e(i,n)}):this.walk((i,n)=>{if("rule"===i.type&&i.selector===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}};c.registerParse=t=>{n=t},c.registerRule=t=>{r=t},c.registerAtRule=t=>{i=t},c.registerRoot=t=>{s=t},e.exports=c,c.default=c,c.rebuild=t=>{let e=[t];for(;e.length>0;){let t=e.pop();if("atrule"===t.type?Object.setPrototypeOf(t,i.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,l.prototype):"comment"===t.type?Object.setPrototypeOf(t,o.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[u]=!0,t.nodes)for(let i of t.nodes)e.push(i)}}}),ie=Wt((t,e)=>{var i=ee(),n=class extends i{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};e.exports=n,n.default=n,i.registerAtRule(n)}),ne=Wt((t,e)=>{var i,s,r=ee(),o=class extends r{constructor(t){super(n({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new i(new s,this,t).stringify()}};o.registerLazyResult=t=>{i=t},o.registerProcessor=t=>{s=t},e.exports=o,o.default=o}),se=Wt((t,e)=>{e.exports={nanoid(t=21){let e="",i=0|t;for(;i-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e=21)=>(i=e)=>{let n="",s=0|i;for(;s-- >0;)n+=t[Math.random()*t.length|0];return n}}}),re=Wt((t,e)=>{var{existsSync:i,readFileSync:n}=Yt(),{dirname:s,isAbsolute:r,join:o,relative:l,sep:a}=Yt(),{SourceMapConsumer:h,SourceMapGenerator:u}=Yt(),c=class{constructor(t,e){if(!1===e.map)return;e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=s(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(t){let e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));let i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return n=t.substr(i[0].length),Buffer?Buffer.from(n,"base64").toString():window.atob(n);var n;let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let i=t.lastIndexOf(e.pop()),n=t.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,n)))}loadFile(t,e,o){if(!o&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;let i=l(s(e),t);if(".."===i||i.startsWith(".."+a)||r(i))return}if(this.root=s(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof h)return u.fromSourceMap(e).toString();if(e instanceof u)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let i=e(t);if(i){let e=this.loadFile(i,t,!0);if(!e)throw new Error("Unable to load previous source map: "+i.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;t&&(e=o(s(t),e));let i=this.loadFile(e,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return i}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=c,c.default=c}),oe=Wt((t,e)=>{var{nanoid:i}=se(),{isAbsolute:s,resolve:r}=Yt(),{SourceMapConsumer:o,SourceMapGenerator:l}=Yt(),{fileURLToPath:a,pathToFileURL:h}=Yt(),u=qt(),c=re(),f=Yt(),d=Symbol("lineToIndexCache"),p=Boolean(o&&l),m=Boolean(r&&s);function v(t){if(t[d])return t[d];let e=t.css.split("\n"),i=new Array(e.length),n=0;for(let t=0,s=e.length;s>t;t++)i[t]=n,n+=e[t].length+1;return t[d]=i,i}var y=class{get from(){return this.file||this.id}constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!m||/^\w+:\/\//.test(e.from)||s(e.from)?e.from:r(e.from)),m&&p){let t=new c(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,n={}){let s,r,o,l,a;if(e&&"object"==typeof e){let t=e,n=i;if("number"==typeof t.offset){l=t.offset;let n=this.fromOffset(l);e=n.line,i=n.col}else l=this.fromLineAndColumn(e=t.line,i=t.column);if("number"==typeof n.offset){o=n.offset;let t=this.fromOffset(o);r=t.line,s=t.col}else r=n.line,s=n.column,o=this.fromLineAndColumn(n.line,n.column)}else if(i)l=this.fromLineAndColumn(e,i);else{l=e;let t=this.fromOffset(l);e=t.line,i=t.col}let c=this.origin(e,i,r,s);return a=c?new u(t,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):new u(t,void 0===r?e:{column:i,line:e},void 0===r?i:{column:s,line:r},this.css,this.file,n.plugin),a.input={column:i,endColumn:s,endLine:r,endOffset:o,line:e,offset:l,source:this.css},this.file&&(h&&(a.input.url=h(this.file).toString()),a.input.file=this.file),a}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){let e=v(this),i=0;if(e[e.length-1]>t){let n,s=e.length-2;for(;s>i;)if(n=i+(s-i>>1),e[n]>t)s=n-1;else{if(e[n+1]>t){i=n;break}i=n+1}}else i=e.length-1;return{col:t-e[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:r(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,n){if(!this.map)return!1;let r,o,l=this.map.consumer(),u=l.originalPositionFor({column:e-1,line:t});if(!u.source)return!1;if("number"==typeof i){let t=l.originalPositionFor({column:n-1,line:i});t.source&&(r=t)}o=s(u.source)?h(u.source):new URL(u.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let c={column:u.column+1,endColumn:r&&r.column+1,endLine:r&&r.line,line:u.line,url:o.toString()};if("file:"===o.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");c.file=a(o)}let f=l.sourceContentFor(u.source);return f&&(c.source=f),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=n({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=y,y.default=y,f&&f.registerInput&&f.registerInput(y)}),le=Wt((t,e)=>{var i,n,s=ee(),r=class extends s{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){let n=new Set;for(let e of Array.isArray(t)?t:[t])e&&"object"==typeof e&&!e.parent&&e.raws&&void 0!==e.raws.before&&n.add(e.raws);let s=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of s)n.has(t.raws)||(t.raws.before=e.raws.before);return s}removeChild(t,e){let i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new i(new n,this,t).stringify()}};r.registerLazyResult=t=>{i=t},r.registerProcessor=t=>{n=t},e.exports=r,r.default=r,s.registerRoot(r)}),ae=Wt((t,e)=>{var i={comma(t){return i.split(t,[","],!0)},space(t){return i.split(t,[" ","\n","\t"])},split(t,e,i){let n=[],s="",r=!1,o=0,l=!1,a="",h=!1;for(let i of t)h?h=!1:"\\"===i?h=!0:l?i===a&&(l=!1):'"'===i||"'"===i?(l=!0,a=i):"("===i?o+=1:")"===i?o>0&&(o-=1):0===o&&e.includes(i)&&(r=!0),r?(""!==s&&n.push(s.trim()),s="",r=!1):s+=i;return(i||""!==s)&&n.push(s.trim()),n}};e.exports=i,i.default=i}),he=Wt((t,e)=>{var i=ee(),n=ae(),s=class extends i{get selectors(){return n.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=s,s.default=s,i.registerRule(s)}),ue=Wt((t,e)=>{var i=ie(),r=Kt(),o=te(),a=oe(),h=re(),u=le(),c=he();function f(t,e){return t.inputs?t.inputs.map(t=>{let e=n(n({},t),{},{__proto__:a.prototype});return e.map&&(e.map=n(n({},e.map),{},{__proto__:h.prototype})),e}):e}function d(t,e,a){let h,f=n({},t);if(delete f.inputs,delete f.nodes,f.source){let t=f.source,{inputId:i}=t;f.source=s(t,l),null!=i&&(f.source.input=e[i])}if("root"===f.type)h=new u(f);else if("decl"===f.type)h=new o(f);else if("rule"===f.type)h=new c(f);else if("comment"===f.type)h=new r(f);else{if("atrule"!==f.type)throw new Error("Unknown node type: "+t.type);h=new i(f)}if(a){h.nodes=a;for(let t of a)t.parent=h}return h}function p(t,e){if(Array.isArray(t))return t.map(t=>p(t));let i,n=[{childIndex:0,children:[],inputs:f(t,e),json:t}];for(;n.length>0;){let t=n[n.length-1],e=t.json.nodes;if(e&&e.length>t.childIndex){let i=e[t.childIndex];t.childIndex+=1,n.push({childIndex:0,children:[],inputs:f(i,t.inputs),json:i});continue}n.pop();let s=d(t.json,t.inputs,e?t.children:void 0);n.length>0?n[n.length-1].children.push(s):i=s}return i}e.exports=p,p.default=p}),ce=Wt((t,e)=>{var{dirname:i,relative:n,resolve:s,sep:r}=Yt(),{SourceMapConsumer:o,SourceMapGenerator:l}=Yt(),{pathToFileURL:a}=Yt(),h=oe(),u=Boolean(o&&l),c=Boolean(i&&s&&n&&r);e.exports=class{constructor(t,e,i,n){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,n=this.toUrl(this.path(t.file)),s=t.root||i(t.file);!1===this.mapOpts.sourcesContent?(e=new o(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else if(this.css){let t;for(;-1!==(t=this.css.lastIndexOf("/*#"));){let e=this.css.indexOf("*/",t+3);if(-1===e)break;for(;t>0&&"\n"===this.css[t-1];)t--;this.css=this.css.slice(0,t)+this.css.slice(e+2)}}}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=l.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,i=1,n=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,a)=>{if(this.css+=o,l&&"end"!==a&&(r.generated.line=i,r.generated.column=n-1,l.source&&l.source.start?(r.source=this.sourcePath(l),r.original.line=l.source.start.line,r.original.column=l.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),e=o.match(/\n/g),e?(i+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,l&&"start"!==a){let t=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==t.last||t.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=i,r.generated.column=n-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=i,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));let o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new h(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let i=e.source.input.from;if(i&&!t[i]){t[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,e.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(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(a){let e=a(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===r&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}}}),fe=Wt((t,e)=>{var i="'".charCodeAt(0),n='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),o="\n".charCodeAt(0),l=" ".charCodeAt(0),a="\f".charCodeAt(0),h="\t".charCodeAt(0),u="\r".charCodeAt(0),c="[".charCodeAt(0),f="]".charCodeAt(0),d="(".charCodeAt(0),p=")".charCodeAt(0),m="{".charCodeAt(0),v="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),b=":".charCodeAt(0),w="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e={}){let x,E,A,I,R,T,O,D,N,L,_=t.css.valueOf(),F=e.ignoreErrors,P=_.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(B>=P)return;let e=!!t&&t.ignoreUnclosed;switch(x=_.charCodeAt(B),x){case o:case l:case h:case u:case a:I=B;do{I+=1,x=_.charCodeAt(I)}while(x===l||x===o||x===h||x===u||x===a);T=["space",_.slice(B,I)],B=I-1;break;case c:case f:case m:case v:case b:case y:case p:{let t=String.fromCharCode(x);T=[t,t,B];break}case d:if(L=j.length?j.pop()[1]:"",N=_.charCodeAt(B+1),"url"===L&&N!==i&&N!==n&&N!==l&&N!==o&&N!==h&&N!==a&&N!==u){I=B;do{if(O=!1,I=_.indexOf(")",I+1),-1===I){if(F||e){I=B;break}H("bracket")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["brackets",_.slice(B,I+1),B,I],B=I}else B>W?(I=_.indexOf(")",B+1),E=_.slice(B,I+1),-1===I||C.test(E)?(W=-1===I?P:I,T=["(","(",B]):(T=["brackets",E,B,I],B=I)):T=["(","(",B];break;case i:case n:R=x===i?"'":'"',I=B;do{if(O=!1,I=_.indexOf(R,I+1),-1===I){if(F||e){I=B+1;break}H("string")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["string",_.slice(B,I+1),B,I],B=I;break;case w:S.lastIndex=B+1,S.test(_),I=0===S.lastIndex?_.length-1:S.lastIndex-2,T=["at-word",_.slice(B,I+1),B,I],B=I;break;case s:for(I=B,A=!0;_.charCodeAt(I+1)===s;)I+=1,A=!A;if(x=_.charCodeAt(I+1),A&&x!==r&&x!==l&&x!==o&&x!==h&&x!==u&&x!==a&&(I+=1,M.test(_.charAt(I)))){for(;M.test(_.charAt(I+1));)I+=1;_.charCodeAt(I+1)===l&&(I+=1)}T=["word",_.slice(B,I+1),B,I],B=I;break;default:x===r&&_.charCodeAt(B+1)===g?(I=_.indexOf("*/",B+2)+1,0===I&&(F||e?I=_.length:H("comment")),T=["comment",_.slice(B,I+1),B,I],B=I):(k.lastIndex=B+1,k.test(_),I=0===k.lastIndex?_.length-1:k.lastIndex-2,T=["word",_.slice(B,I+1),B,I],j.push(T),B=I)}return B++,T},position:()=>B}}}),de=Wt((t,e)=>{var i=ie(),n=Kt(),s=te(),r=le(),o=he(),l=fe(),a={empty:!0,space:!0};function h(t,e,i){let n="";for(let s=e;i>s;s++)n+=t[s][1];return n}e.exports=class{constructor(t){this.input=t,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,n,s,r=new i;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let o=!1,l=!1,a=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){l=!0;break}if("}"===e){if(a.length>0){for(s=a.length-1,n=a[s];n&&"space"===n[0];)n=a[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o&&(r.source.end=this.getPosition((t=a[a.length-1])[3]||t[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),l&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let i,n=0;for(let s=e-1;s>=0&&(i=t[s],"space"===i[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(t){let e,i,n,s=0;for(let[r,o]of t.entries()){if(i=o,n=i[0],"("===n&&(s+=1),")"===n&&(s-=1),0===s&&":"===n){if(e){if("word"===e[0]&&"progid"===e[1])continue;return r}this.doubleColon(i)}e=i}return!1}comment(t){let e=new n;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let i=t[1].slice(2,-2);if(i.trim()){let t=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}else e.text="",e.raws.left=i,e.raws.right=""}createTokenizer(){this.tokenizer=l(this.input)}decl(t,e){let i=new s;this.init(i,t[0][2]);let n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;e>=0;e--){let i=t[e],n=i[3]||i[2];if(n)return n}}(t)),i.source.end.offset++;let r=0;for(;"word"!==t[r][0];)r===t.length-1&&this.unknownWord([t[r]]),r++;i.raws.before+=h(t,0,r),i.source.start=this.getPosition(t[r][2]);let o=r;for(;t.length>r;){let e=t[r][0];if(":"===e||"space"===e||"comment"===e)break;r++}i.prop=h(t,o,r);let l,a=r;for(;t.length>r&&(l=t[r],r++,":"!==l[0]);)"word"===l[0]&&/\w/.test(l[1])&&this.unknownWord([l]);i.raws.between=h(t,a,r),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let u=r;for(;t.length>r;){let e=t[r][0];if("space"!==e&&"comment"!==e)break;r++}let c=t.slice(u,r);t=t.slice(r),this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(l=t[e],"!important"===l[1].toLowerCase()){i.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n," !important"!==n&&(i.raws.important=n);break}if("important"===l[1].toLowerCase()){let n=t.slice(0),s="";for(let t=e;t>0;t--){let e=n[t][0];if(s.trim().startsWith("!")&&"space"!==e)break;s=n.pop()[1]+s}s.trim().startsWith("!")&&(i.important=!0,i.raws.important=s,t=n)}if("space"!==l[0]&&"comment"!==l[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(i.raws.between+=c.map(t=>t[1]).join(""),c=[]),this.raw(i,"value",c.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,i=null,n=!1,s=null,r=[],o=t[1].startsWith("--"),l=[],a=t;for(;a;){if(i=a[0],l.push(a),"("===i||"["===i)s||(s=a),r.push("("===i?")":"]");else if(o&&n&&"{"===i)s||(s=a),r.push("}");else if(0===r.length){if(";"===i){if(n)return void this.decl(l,o);break}if("{"===i)return void this.rule(l);if("}"===i){this.tokenizer.back(l.pop()),e=!0;break}":"===i&&(n=!0)}else i===r[r.length-1]&&(r.pop(),0===r.length&&(s=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),r.length>0&&this.unclosedBracket(s),e&&n){if(!o)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,n){let s,r,o,l,h=i.length,u="",c=!0;for(let t=0;h>t;t+=1)s=i[t],r=s[0],"space"!==r||t!==h-1||n?"comment"===r?(l=i[t-1]?i[t-1][0]:"empty",o=i[t+1]?i[t+1][0]:"empty",a[l]||a[o]||","===u.slice(-1)?c=!1:u+=s[1]):u+=s[1]:c=!1;if(!c){let n=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:n,value:u}}t[e]=u}rule(t){t.pop();let e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let e,i="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)i=t.pop()[1]+i;return i}stringFrom(t,e){let i="";for(let n=e;t.length>n;n++)i+=t[n][1];return t.splice(e,t.length-e),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),pe=Wt((t,e)=>{var i=ee(),n=oe(),s=de();function r(t,e){let i=new s(new n(t,e));try{i.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return i.root}e.exports=r,r.default=r,i.registerParse(r)}),me=Wt((t,e)=>{var i=ee(),{my:n}=Jt(),s=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){e.node[n]||i.rebuild(e.node);let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}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}};e.exports=s,s.default=s}),ve=Wt((t,e)=>{var i=me(),n=class{get content(){return this.css}constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new i(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=n,n.default=n}),ye=Wt((t,e)=>{var i={};e.exports=function(t){i[t]||(i[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),ge=Wt((t,e)=>{var i=ee(),s=ne(),r=ce(),l=pe(),a=ve(),h=le(),u=Xt(),{isClean:c,my:f}=Jt(),d=ye(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={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},v={Once:!0,postcssPlugin:!0,prepare:!0};function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){let e=!1,i=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function b(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:g(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[c]=!1,t.nodes)for(let i of t.nodes)e.push(i)}return t}var S={},k=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof t||s instanceof a)o=w(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let t=l;r.syntax&&(t=r.syntax.parse),r.parser&&(t=r.parser),t.parse&&(t=t.parse);try{o=t(s,r)}catch(t){this.processed=!0,this.error=t}o&&!o[f]&&i.rebuild(o)}else o=w(s);this.result=new a(e,o,r),this.helpers=n(n({},S),{},{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?n(n({},t),t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion){let t=i.postcssPlugin,e=i.postcssVersion,n=this.result.processor.version,s=e.split("."),r=n.split(".");(s[0]!==r[0]||parseInt(s[1])>parseInt(r[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(let e of this.plugins)if("object"==typeof e)for(let i in e){if(!m[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!v[i])if("object"==typeof e[i])for(let n in e[i])t(e,"*"===n?i:i+"-"+n.toLowerCase(),e[i][n]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return o(function*(){t.plugin=0;for(let e=0;t.plugins.length>e;e++){let i=t.runOnRoot(t.plugins[e]);if(y(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){let e=t.result.root;for(;!e[c];){e[c]=!0;let i=[b(e)];for(;i.length>0;){let e=t.visitTick(i);if(y(e))try{yield e}catch(e){throw t.handleError(e,i[i.length-1].node)}}}if(t.listeners.OnceExit)for(let[i,n]of t.listeners.OnceExit){t.result.lastPlugin=i;try{if("document"===e.type){let i=e.nodes.map(e=>n(e,t.helpers));yield Promise.all(i)}else yield n(e,t.helpers)}catch(e){throw t.handleError(e)}}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(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 t=this.result.opts,e=u;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let i=this.result.root.source;if(void 0===t.map&&!(i&&i.input&&i.input.map)){let t="";return e(this.result.root,e=>{t+=e}),this.result.css=t,this.result}let n=new r(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[c];)t[c]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(let[i,n]of t){let t;this.result.lastPlugin=i;try{t=n(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:i,visitors:n}=e;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void t.pop();if(n.length>0&&n.length>e.visitorIndex){let[t,s]=n[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===n.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){let n,s=e.iterator;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c])return n[c]=!0,void t.push(b(n));e.iterator=0,delete i.indexes[s]}let s=e.events;for(;s.length>e.eventIndex;){let t=s[e.eventIndex];if(e.eventIndex+=1,0===t)return void(i.nodes&&i.nodes.length&&(i[c]=!0,e.iterator=i.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[c]=!0;let e=[{eventIndex:0,events:g(t),iterator:0,node:t}];for(;e.length>0;){let t=e[e.length-1],i=t.node;if(0!==t.iterator){let n,s=t.iterator,r=!1;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c]){n[c]=!0,e.push({eventIndex:0,events:g(n),iterator:0,node:n}),r=!0;break}if(r)continue;t.iterator=0,delete i.indexes[s]}if(t.events.length>t.eventIndex){let n=t.events[t.eventIndex];if(t.eventIndex+=1,0===n)i.nodes&&i.nodes.length&&(t.iterator=i.getIterator());else{let t=this.listeners[n];t&&this.visitSync(t,i.toProxy())&&e.pop()}continue}e.pop()}}warnings(){return this.sync().warnings()}};k.registerPostcss=t=>{S=t},e.exports=k,k.default=k,h.registerLazyResult(k),s.registerLazyResult(k)}),be=Wt((t,e)=>{var i=ce(),n=pe(),s=ve(),r=Xt(),o=ye(),l=class{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 t,e=n;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=n,this._map=void 0;let o=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=e;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new i(o,void 0,this._opts,e);if(a.isMap()){let[t,e]=a.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=l,l.default=l}),we=Wt((t,e)=>{var i=ne(),n=ge(),s=be(),r=le(),o=class{constructor(t=[]){this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else{if("function"!=typeof i)throw"object"==typeof i&&(i.parse||i.stringify)?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."):new Error(i+" is not a PostCSS plugin");e.push(i)}return e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new n(this,t,e):new s(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,r.registerProcessor(o),i.registerProcessor(o)}),Se=Wt((t,e)=>{var i=ie(),n=Kt(),s=ee(),r=qt(),o=te(),l=ne(),a=ue(),h=oe(),u=ge(),c=ae(),f=Qt(),d=pe(),p=we(),m=ve(),v=le(),y=he(),g=Xt(),b=me();function w(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new p(t)}w.plugin=function(t,e){let i,n=!1;function s(...i){console&&console.warn&&!n&&(n=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=e(...i);return s.postcssPlugin=t,s.postcssVersion=(new p).version,s}return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(t,e,i){return w([s(i)]).process(t,e)},s},w.stringify=g,w.parse=d,w.fromJSON=a,w.list=c,w.comment=t=>new n(t),w.atRule=t=>new i(t),w.decl=t=>new o(t),w.rule=t=>new y(t),w.root=t=>new v(t),w.document=t=>new l(t),w.CssSyntaxError=r,w.Declaration=o,w.Container=s,w.Processor=p,w.Document=l,w.Comment=n,w.Warning=b,w.AtRule=i,w.Result=m,w.Input=h,w.Rule=y,w.Root=v,w.Node=f,u.registerPostcss(w),e.exports=w,w.default=w}),ke=Wt((t,e)=>{var i=Kt(),n=de(),s=fe();e.exports=class extends n{checkMissedSemicolon(){}comment(t){let e=new i;this.init(e,t[2]);let n=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:n.col,line:n.line,offset:t[3]+1};let s=t[1].slice(2);if("*/"===s.slice(-2)&&(s=s.slice(0,-2)),/^\s*$/.test(s))e.text="",e.raws.left=s,e.raws.right="";else{let t=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){let e,i,n=this.colon(t);if(!1===n)return;for(e=n-1;e>=0&&"word"!==t[e][0];e--);if(0===e||0>e)return;for(i=e-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}let s=t.slice(e),r=t.slice(i,e);t.splice(i,t.length-i),this.spaces=r.map(t=>t[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}}),Ce=$t(Wt((t,e)=>{var{Input:i}=Se(),n=ke();e.exports=function(t,e){let s=new n(new i(t,e));return s.parse(),s.root}})(),1),Me=$t(Se(),1).default,xe={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Ee(t,e){const i=null==e?void 0:e.stylesWithHoverClass.get(t);if(i)return i;let n=t;try{n=Me([Gt,zt]).process(t,{parser:Ce.default}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,n),n}function Ae(){return{stylesWithHoverClass:new Map}}var Ie=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),Re=new Set,Te=new Set;function Oe(t,e){var i;const{doc:n,mirror:s,skipChild:r=!1,hackCss:o=!0,afterAppend:l,cache:a}=e;let h=null;if(s.has(t.id)){const e=s.getNode(t.id);if(function(t,e){return!(!t||!e||t.type!==e.type)&&(t.type===f.Document?t.compatMode===e.compatMode:t.type===f.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===f.Comment||t.type===f.Text||t.type===f.CDATA?t.textContent===e.textContent:t.type===f.Element&&t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock)}(s.getMeta(e),t))return s.getNode(t.id);h=e}let u=function(t,e){const{doc:i,hackCss:n,cache:s}=e;switch(t.type){case f.Document:return i.implementation.createDocument(null,"",null);case f.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case f.Element:{const e=function(t){let e=xe[t.tagName]?xe[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);let o;if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",e);else{var r;if(t.isCustom&&(null===(r=i.defaultView)||void 0===r?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(Ie.has(t))return!1;if(!t.includes("-"))return!1;const e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!i.defaultView.customElements.get(t.tagName))try{i.defaultView.customElements.define(t.tagName,class extends i.defaultView.HTMLElement{})}catch(e){Re.has(t.tagName)||(Re.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(e)}const l={};for(const r in t.attributes){if(!{}.hasOwnProperty.call(t.attributes,r))continue;let a=t.attributes[r];if("option"===e&&"selected"===r&&!1===a)continue;if(null===a)continue;if(!0===a&&(a=""),r.startsWith("rr_")){l[r]=a;continue}const h="textarea"===e&&"value"===r,u="style"===e&&"_cssText"===r;if(u&&n&&"string"==typeof a&&(a=Ee(a,s)),!h&&!u||"string"!=typeof a)try{if(t.isSVG&&"xlink:href"===r)o.setAttributeNS("http://www.w3.org/1999/xlink",r,a.toString());else if("onload"===r||"onclick"===r||"onmouse"===r.substring(0,7))o.setAttribute("_"+r,a.toString());else{if("meta"===e&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===r){o.setAttribute("csp-content",a.toString());continue}"link"===e&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===e&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===It(t.attributes.href)||("img"===e&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(r,a.toString()))}}catch(t){}else o.appendChild(i.createTextNode(a)),t.childNodes=[]}const a=!("static"!==l.rr_position&&"relative"!==l.rr_position&&"sticky"!==l.rr_position||void 0!==l.rr_transform&&"none"!==l.rr_transform);if(a&&"string"==typeof l.rr_display){const t=l.rr_display;o.style.setProperty("display","inline"===t?"inline-block":t)}for(const n in l){const s=l[n];if("canvas"===e&&"rr_dataURL"===n){const t=i.createElement("img");t.onload=()=>{const e=o.getContext("2d");e&&e.drawImage(t,0,0,t.width,t.height)},t.src=s.toString(),o.RRNodeType&&(o.rr_dataURL=s.toString())}else if("img"===e&&"rr_dataURL"===n){const e=o;e.currentSrc.startsWith("data:")||(e.setAttribute("rrweb-original-src",t.attributes.src),e.src=s.toString())}if("rr_width"===n)o.style.setProperty("width",s.toString());else if("rr_height"===n)o.style.setProperty("height",s.toString());else if("rr_left"===n)a||(o.style.setProperty("left",s.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===n)a||(o.style.setProperty("top",s.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===n&&"number"==typeof s)o.currentTime=s;else if("rr_mediaState"===n)switch(s){case"played":o.play().catch(t=>console.warn("media playback error",t));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===n&&"number"==typeof s?o.playbackRate=s:"rr_mediaMuted"===n&&"boolean"==typeof s?o.muted=s:"rr_mediaLoop"===n&&"boolean"==typeof s?o.loop=s:"rr_mediaVolume"===n&&"number"==typeof s?o.volume=s:"rr_open_mode"===n&&o.setAttribute("rr_open_mode",s)}if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else lt(o)||Te.has(e)||(Te.add(e),console.warn("rrweb: browser refused a shadow root on",e));return"input"!==e&&"textarea"!==e||o.setAttribute("autocomplete","off"),o}case f.Text:return function(t,e){if("SCRIPT_PLACEHOLDER"===t.textContent)return e.doc.createTextNode("");let i=t.textContent;if(t.isStyle&&e.hackCss)try{i=Ee(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(i)}(t,{cache:s,doc:i,hackCss:n});case f.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case f.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:n,hackCss:o,cache:a});if(!u)return null;if(null==h||null===(i=h.parentNode)||void 0===i||i.removeChild(h),t.rootId&&s.getNode(t.rootId)!==n&&s.replace(t.rootId,n),t.type===f.Document&&(n.close(),n.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==f.DocumentType&&n.write(t.childNodes[0].type===f.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),u=n),s.add(u,t),(t.type===f.Document||t.type===f.Element)&&!r)for(const e of t.childNodes){if(e.isShadow&&t.isShadowHost&&rt(u)&&!u.shadowRoot)continue;const i=Oe(e,{doc:n,mirror:s,skipChild:!1,hackCss:o,afterAppend:l,cache:a});if(i){if(e.isShadow&&rt(u)&&u.shadowRoot)u.shadowRoot.appendChild(i);else if(t.type===f.Document&&e.type==f.Element){const t=i;let e=null;t.childNodes.forEach(t=>{"BODY"===t.nodeName&&(e=t)}),e?(t.removeChild(e),u.appendChild(i),t.appendChild(e)):u.appendChild(i)}else if(t.type===f.Document&&e.type===f.DocumentType){const t=u.doctype;t&&u.removeChild(t),u.firstChild&&1===u.firstChild.nodeType?u.insertBefore(i,u.firstChild):u.appendChild(i)}else u.appendChild(i);l&&l(i,e.id)}else console.warn("Failed to rebuild",e)}return u}var De,Ne,Le=1,_e=new RegExp("[^a-z0-9-_:]");function Fe(){return Le++}var Pe=/^[^ \t\n\r\u000c]+/,Be=/^[, \t\n\r\u000c]+/,je=new WeakMap;function Ue(t,e){return e&&""!==e.trim()?We(t,e):e}function We(t,e){let i=je.get(t);if(i||(i=t.createElement("a"),je.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function $e(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==":t}(t,e.maxBase64ImageLength):t}function He(t,e,i,n,s,r){if(!n)return n;if("src"===i||"href"===i&&("use"!==e||"#"!==n[0])){if("link"===e&&s){var o;const t=null===(o=s.sheet)||void 0===o?void 0:o.href;if(t)return t}const i=Ue(t,n);if(i.startsWith("data:")){if("img"===e&&s){let t=i;return((null==r?void 0:r.type)||void 0!==(null==r?void 0:r.quality))&&(t=function(t,e,i,n){if(1e5>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>4096||t.naturalHeight>4096)return e;const s=Lt.get(e);if(s&&s.type===i&&s.quality===n)return s.result;try{const s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;const r=s.getContext("2d");if(!r)return e;r.drawImage(t,0,0);const o=s.toDataURL(i||"image/webp",null!=n?n:.4),l=e.length>o.length?o:e;if(Lt.size>=10){const t=Lt.keys().next().value;void 0!==t&&Lt.delete(t)}return Lt.set(e,{type:i,quality:n,result:l}),l}catch(t){return e}}(s,i,r.type,r.quality)),$e(t,r)}if("image"===e)return $e(i,r)}return i}if("xlink:href"===i&&"#"!==n[0]){const i=Ue(t,n);return"image"===e&&i.startsWith("data:")?$e(i,r):i}return"background"!==i||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===i?function(t,e){if(""===e.trim())return e;let i=0;function n(t){let n;const s=t.exec(e.substring(i));return s?(n=s[0],i+=n.length,n):""}const s=[];for(;n(Be),e.length>i;){let r=n(Pe);if(","===r.slice(-1))r=Ue(t,r.substring(0,r.length-1)),s.push(r);else{let n="";r=Ue(t,r);let o=!1;for(;;){const t=e.charAt(i);if(""===t){s.push((r+n).trim());break}if(o)")"===t&&(o=!1);else{if(","===t){i+=1,s.push((r+n).trim());break}"("===t&&(o=!0)}n+=t,i+=1}}}return s.join(", ")}(t,n):"style"===i?Nt(n,We(t)):"object"===e&&"data"===i?Ue(t,n):n:Ue(t,n)}function Ge(t,e,i){return("video"===t||"audio"===t)&&"autoplay"===Ct(e)}function ze(t,e,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!i&&ze(C.parentNode(t),e,i);for(let i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!i&&ze(C.parentNode(t),e,i)}function Ve(t,e,i,n){let s;if(rt(t)){if(s=t,!C.childNodes(s).length)return!1}else{if(null===C.parentElement(t))return!1;s=C.parentElement(t)}try{if("string"==typeof e){if(n){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(ze(s,e,n))return!0;if(i)if(n){if(s.closest(i))return!0}else if(s.matches(i))return!0}catch(t){}return!1}function Ye(t,e,i){const n=t.removeEventListener;"function"==typeof n&&n.call(t,e,i)}var qe=new Map;function Ze(t,e){return Array.from(t.styleSheets).find(t=>t.href===e)}function Xe(t){return null==t?"":t.toLowerCase()}var Je=!1,Qe=!1;function Ke(){return Qe}function ti(){Qe=!1,Je=!1}function ei(t,e){const{doc:i,mirror:n,blockClass:s,blockSelector:r,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p=!1,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y={},inlineImages:g=!1,recordCanvas:b=!1,canvasMaskingConfigured:w,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M=5e3,onIframeListenerRegistered:x,onStylesheetLoad:E,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:R=!1,depth:T=0,maxDepth:D=50}=e;let{needsMask:N}=e,{preserveWhiteSpace:_=!0}=e;if(T>=D)return Qe=!0,Je||(Je=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${D}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;N||(N=Ve(t,o,l,void 0===N)),O>0&&(L.nodeCount+=1);const F=function(t,e){const{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:h,maskInputFn:u,maskAllElementAttributes:c=!1,maskAttributeFn:d,dataURLOptions:p={},inlineImages:m,recordCanvas:v,canvasMaskingConfigured:y,keepIframeSrcFn:g,newlyAddedElement:b=!1}=e,w=function(t,e){if(!e.hasNode(t))return;const i=e.getId(t);return 1===i?void 0:i}(i,n);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:f.Document,childNodes:[],compatMode:t.compatMode}:{type:f.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:f.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return function(t,e){const{doc:i,blockClass:n,blockSelector:s,inlineStylesheet:r,maskInputOptions:o={},maskInputFn:l,maskAllElementAttributes:a=!1,maskAttributeFn:h,dataURLOptions:u={},inlineImages:c,recordCanvas:d,canvasMaskingConfigured:p,keepIframeSrcFn:m,newlyAddedElement:v=!1,rootId:y}=e,g=function(t,e,i){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(i)return t.matches(i)}catch(t){}return!1}(t,n,s),b=function(t){if(t instanceof HTMLFormElement)return"form";const e=Ct(t.tagName);return _e.test(e)?"div":e}(t),w=new Set;let S={};const k=t.attributes.length;for(let e=0;k>e;e++){const n=t.attributes[e];Ge(b,n.name)||(S[n.name]=He(i,b,Ct(n.name),n.value,t,u))}if("link"===b&&r&&!g){let e=t.sheet;if(!e){const n=function(t){return t.href}(t);n&&(e=Ze(i,n),!e&&n.includes(".css"))&&(e=Ze(i,window.location.origin+"/"+n.replace(window.location.href,"")))}let n=null;e&&(X(e)?O>0&&(P.push(t),B+=1):n=ft(e)),n&&(delete S.rel,delete S.href,S._cssText=n)}if("style"===b&&t.sheet&&!(t.innerText||C.textContent(t)||"").trim().length){const e=q(()=>ft(t.sheet));e&&(S._cssText=e)}if("input"===b||"textarea"===b||"select"===b){const e=t.value,i=t.checked;"radio"!==S.type&&"checkbox"!==S.type&&"submit"!==S.type&&"button"!==S.type&&e?S.value=kt({element:t,type:At(t),tagName:b,value:e,maskInputOptions:o,maskInputFn:l}):i&&(S.checked=i)}if("option"===b&&(t.selected&&!o.select?S.selected=!0:delete S.selected),"dialog"===b&&t.open){try{S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){S.rr_open_mode="modal",S.ph_rr_could_not_detect_modal=!0}w.add("rr_open_mode")}if("canvas"===b&&d&&!(null==p?void 0:p()))if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let i=0;t.width>i;i+=50)for(let n=0;t.height>n;n+=50){const s=e.getImageData;if(new Uint32Array((Et in s?s[Et]:s).call(e,i,n,Math.min(50,t.width-i),Math.min(50,t.height-n)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(S.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){const e=t.toDataURL(u.type,u.quality),n=i.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(u.type,u.quality)&&(S.rr_dataURL=e)}let M,x=!1;if("img"===b&&c){De||(De=i.createElement("canvas"),Ne=De.getContext("2d"));const e=t,n=e.currentSrc||e.getAttribute("src")||"<unknown-src>",s=e.crossOrigin,r=(e,i)=>x?xt({element:t,name:e,value:i,maskAllElementAttributes:a,maskAttributeFn:h}):i,o=()=>{Ye(e,"load",o);try{De.width=e.naturalWidth,De.height=e.naturalHeight,Ne.drawImage(e,0,0);const t=De.toDataURL(u.type,u.quality);S.rr_dataURL=r("rr_dataURL",t)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o));console.warn(`Cannot inline img src=${n}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(s?S.crossOrigin=r("crossOrigin",s):e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if("audio"===b||"video"===b){const e=S;e.rr_mediaState=t.paused?"paused":"played",w.add("rr_mediaState"),e.rr_mediaCurrentTime=t.currentTime,e.rr_mediaPlaybackRate=t.playbackRate,e.rr_mediaMuted=t.muted,e.rr_mediaLoop=t.loop,e.rr_mediaVolume=t.volume}if(v||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),g){var E,A,I;const{width:e,height:n,left:s,top:r}=t.getBoundingClientRect(),o=null===(E=i.defaultView)||void 0===E?void 0:E.getComputedStyle(t);S={class:S.class,rr_width:`${e}px`,rr_height:`${n}px`,rr_left:`${Math.floor(s+((null===(A=i.defaultView)||void 0===A?void 0:A.scrollX)||0))}px`,rr_top:`${Math.floor(r+((null===(I=i.defaultView)||void 0===I?void 0:I.scrollY)||0))}px`},w.add("rr_width"),w.add("rr_height"),w.add("rr_left"),w.add("rr_top"),o&&(S.rr_position=o.position||"static",w.add("rr_position"),o.transform&&"none"!==o.transform&&(S.rr_transform=o.transform,w.add("rr_transform")),o.display&&o.display.startsWith("inline")&&(S.rr_display=o.display,w.add("rr_display")))}if("iframe"!==b||m(S.src)||(t.contentDocument||(S.rr_src=S.src),delete S.src),a||h)for(const[e,i]of Object.entries(S))"string"!=typeof i&&null!==i||(S[e]=xt({element:t,name:e,value:i,maskAllElementAttributes:a,maskAttributeFn:h,isGenerated:w.has(e)}));x=!0;try{customElements.get(b)&&(M=!0)}catch(t){}return{type:f.Element,tagName:b,attributes:S,childNodes:[],isSVG:(R=t,Boolean("svg"===R.tagName||R.ownerSVGElement)||void 0),needBlock:g,rootId:y,isCustom:M};var R}(t,{doc:i,blockClass:s,blockSelector:r,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,maskAllElementAttributes:c,maskAttributeFn:d,dataURLOptions:p,inlineImages:m,recordCanvas:v,canvasMaskingConfigured:y,keepIframeSrcFn:g,newlyAddedElement:b,rootId:w});case t.TEXT_NODE:return function(t,e){const{needsMask:i,maskTextFn:n,rootId:s}=e,r=C.parentNode(t),o=r&&r.tagName;let l=C.textContent(t);const a="STYLE"===o||void 0,h="SCRIPT"===o||void 0;if(a&&l){try{var u;if(t.nextSibling||t.previousSibling);else if(X(r.sheet));else if(null===(u=r.sheet)||void 0===u?void 0:u.cssRules){const t=ft(r.sheet);t&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(t)&&(l=t)}}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}l=Nt(l,We(e.doc))}return h&&(l="SCRIPT_PLACEHOLDER"),!a&&!h&&l&&i&&(l=n?n(l,C.parentElement(t)):l.replace(/[\S]/g,"*")),{type:f.Text,textContent:l||"",isStyle:a,rootId:s}}(t,{doc:i,needsMask:o,maskTextFn:h,rootId:w});case t.CDATA_SECTION_NODE:return{type:f.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:f.Comment,textContent:C.textContent(t)||"",rootId:w};default:return!1}}(t,{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:N,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,keepIframeSrcFn:I,newlyAddedElement:R});if(!F)return console.warn(t,"not serialized"),null;let j;j=n.hasNode(t)?n.getId(t):!function(t,e){if(e.comment&&t.type===f.Comment)return!0;if(t.type===f.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===It(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Xe(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Xe(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(Xe(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Xe(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Xe(t.attributes.property).match(/^(og|twitter|fb):/)||Xe(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Xe(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(Xe(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(Xe(t.attributes.name))||Xe(t.attributes.property).match(/^article:/)||Xe(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(Xe(t.attributes.name)))return!0}}return!1}(F,v)&&(_||F.type!==f.Text||F.isStyle||F.textContent.replace(/^\s+|\s+$/gm,"").length)?Fe():-2;const U=Object.assign(F,{id:j});if(n.add(t,U),-2===j)return null;S&&S(t);let W=!a;if(U.type===f.Element){W=W&&!U.needBlock,delete U.needBlock;const e=C.shadowRoot(t);e&&at(e)&&(U.isShadowHost=!0)}if((U.type===f.Document||U.type===f.Element)&&W){v.headWhitespace&&U.type===f.Element&&"head"===U.tagName&&(_=!1);const e={doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M,onIframeListenerRegistered:x,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:I,depth:T+1,maxDepth:D};if(U.type===f.Element&&"textarea"===U.tagName&&void 0!==U.attributes.value);else for(const i of Array.from(C.childNodes(t))){const t=ei(i,e);t&&U.childNodes.push(t)}let R=null;if(rt(t)&&(R=C.shadowRoot(t)))for(const t of Array.from(C.childNodes(R))){const i=ei(t,e);i&&(at(R)&&(i.isShadow=!0),U.childNodes.push(i))}}const H=C.parentNode(t);if(H&&ot(H)&&at(H)&&(U.isShadow=!0),U.type===f.Element&&"iframe"===U.tagName){const e=function(t,e,i){const n=()=>{},s=t.contentWindow;if(!s)return n;let r;try{r=s.document.readyState}catch(t){return n}const o=()=>e();if("complete"!==r){let n=!1,s=null;const r=()=>{n||(n=!0,null!==s&&(clearTimeout(s),s=null),Ye(t,"load",l),t.addEventListener("load",o),e())},l=()=>r();return s=setTimeout(r,i),t.addEventListener("load",l),()=>{null!==s&&(clearTimeout(s),s=null),n?Ye(t,"load",o):(n=!0,Ye(t,"load",l))}}const l="about:blank";let a;try{a=s.location.href}catch(t){return n}if(a!==l||t.src===l||""===t.src){const i=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(i),Ye(t,"load",o)}}return t.addEventListener("load",o),()=>{Ye(t,"load",o)}}(t,()=>{const e=t.contentDocument;if(e&&k){const i=ei(e,{doc:e,mirror:n,blockClass:s,blockSelector:r,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M,onIframeListenerRegistered:x,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:I,depth:T+1,maxDepth:D});i&&k(t,i)}},M);null==x||x(t,e)}return U.type===f.Element&&"link"===U.tagName&&"stylesheet"===U.attributes.rel&&function(e,a,f){if(qe.has(e))return;let C;try{C=e.sheet}catch(t){return}if(C)return;const x=new AbortController;let R=!1;const O=()=>{if(!R){R=!0;try{(()=>{if(E){const e=ei(t,{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:I,depth:T,maxDepth:D});e&&E(t,e)}})()}finally{qe.delete(e),x.abort()}}},L=setTimeout(O,f);x.signal.addEventListener("abort",()=>clearTimeout(L),{once:!0}),e.addEventListener("load",O,{signal:x.signal,once:!0}),qe.set(e,x)}(t,0,A),U}function ii(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}function ni(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date,"0".repeat(32),"0".repeat(16);var si={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},ri={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},oi={};function li(t){if(oi[t])return oi[t];const e=function(t){var e,i;const n=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(i=e.__symbol__)||void 0===i?void 0:i.call(e,t);return n&&globalThis[n]?globalThis[n]:void 0}(t)||globalThis[t],i=e.prototype,n=t in si?si[t]:void 0,s=Boolean(n&&n.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(i,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),r=t in ri?ri[t]:void 0,o=Boolean(r&&r.every(t=>{var e;return"function"==typeof i[t]&&(null===(e=i[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(s&&o)return oi[t]=e.prototype,e.prototype;const l=document.createElement("iframe");l.style.display="none";let a=!1;try{document.body.appendChild(l);const n=l.contentWindow;if(!n)return e.prototype;const s=n[t].prototype;return s?(ni(h=navigator.userAgent,"AppleWebKit")&&!ni(h,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",t),a=!0),oi[t]=s):i}catch(t){return i}finally{!a&&l.parentNode&&document.body.removeChild(l)}var h}var ai=Object.create(null);function hi(t,e,i){var n;const s=ai[t],r=s[i];if(r)return r.call(e);const o=li(t),l=null===(n=Object.getOwnPropertyDescriptor(o,i))||void 0===n?void 0:n.get;return l?(s[i]=l,l.call(e)):e[i]}ai.Node=Object.create(null),ai.ShadowRoot=Object.create(null),ai.MutationObserver=Object.create(null),ai.Element=Object.create(null);var ui,ci={};function fi(t,e,i){const n=`${t}.${String(i)}`;if(ci[n])return ci[n].bind(e);const s=li(t)[i];return"function"!=typeof s?e[i]:(ci[n]=s,s.bind(e))}var di={childNodes:t=>hi("Node",t,"childNodes"),parentNode:t=>hi("Node",t,"parentNode"),parentElement:t=>hi("Node",t,"parentElement"),textContent:t=>hi("Node",t,"textContent"),isConnected(t){if(void 0===ui){var e;const t=null===(e=Object.getOwnPropertyDescriptor(li("Node"),"isConnected"))||void 0===e?void 0:e.get;ui=(null==t?void 0:t.toString().includes("[native code]"))?t:null}return null==ui?void 0:ui.call(t)},contains:(t,e)=>fi("Node",t,"contains")(e),getRootNode:t=>fi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?hi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?hi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>fi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>fi("Element",t,"querySelectorAll")(e),mutationObserver:()=>li("MutationObserver").constructor,patch(t,e,i){try{if(!(e in t))return()=>{};const n=t[e],s={next:n},r=i(function(...t){return s.next.apply(this,t)});return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n},__rrweb_layer__:{enumerable:!1,value:s}})),t[e]=r,()=>{if(t[e]===r)return void(t[e]=s.next);const i=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0};let n=t[e],o=i(n);for(;o;){if(o.next===r)return void(o.next=s.next);n=o.next,o=i(n)}}}catch(t){return()=>{}}}};function pi(t){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(t)}function mi(t,e,i){return(e=function(t){var e=function(t){if("object"!=pi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=pi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pi(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function vi(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}var yi=class{constructor(){mi(this,"idNodeMap",new Map),mi(this,"nodeMetaMap",new WeakMap)}getId(t){var e,i;return t&&null!==(e=null===(i=this.getMeta(t))||void 0===i?void 0:i.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){const e=di.shadowRoot(t);e&&this.removeNodeFromMap(e),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){const i=this.getNode(t);if(i){const t=this.nodeMetaMap.get(i);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},gi=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports);new RegExp(/(max|min)-device-(width|height)/.source,"g");var bi=gi((t,e)=>{var i=String,n=function(){return{isColorSupported:!1,reset:i,bold:i,dim:i,italic:i,underline:i,inverse:i,hidden:i,strikethrough:i,black:i,red:i,green:i,yellow:i,blue:i,magenta:i,cyan:i,white:i,gray:i,bgBlack:i,bgRed:i,bgGreen:i,bgYellow:i,bgBlue:i,bgMagenta:i,bgCyan:i,bgWhite:i,blackBright:i,redBright:i,greenBright:i,yellowBright:i,blueBright:i,magentaBright:i,cyanBright:i,whiteBright:i,bgBlackBright:i,bgRedBright:i,bgGreenBright:i,bgYellowBright:i,bgBlueBright:i,bgMagentaBright:i,bgCyanBright:i,bgWhiteBright:i}};e.exports=n(),e.exports.createColors=n}),wi=gi((t,e)=>{e.exports={}}),Si=gi((t,e)=>{var i=bi(),n=wi(),s=class t extends Error{constructor(e,i,n,s,r,o){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),s&&(this.source=s),o&&(this.plugin=o),void 0!==i&&void 0!==n&&("number"==typeof i?(this.line=i,this.column=n):(this.line=i.line,this.column=i.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=i.isColorSupported);let s=t=>t,r=t=>t,o=t=>t;if(t){let{bold:t,gray:e,red:l}=i.createColors(!0);r=e=>t(l(e)),s=t=>e(t),n&&(o=t=>n(t))}let l=e.split(/\r?\n/),a=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),u=String(h).length;return l.slice(a,h).map((t,e)=>{let i=a+1+e,n=" "+(" "+i).slice(-u)+" | ";if(i===this.line){if(t.length>160){let e=20,i=Math.max(0,this.column-e),l=Math.max(this.column+e,this.endColumn+e),a=t.slice(i,l),h=s(n.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return r(">")+s(n)+o(a)+"\n "+h+r("^")}let e=s(n.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(n)+o(t)+"\n "+e+r("^")}return" "+s(n)+o(t)}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=s,s.default=s}),ki=gi((t,e)=>{var i=/(<)(\/?style\b)/gi,n=/(<)(!--)/g,s=/[\t\n\f\r "#'()/;[\\\]{}]/;function r(t){return"string"!=typeof t?t:t.includes("<")?t.replace(i,"\\3c $2").replace(n,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function l(t,e){let i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",r=e.raws.afterName;return void 0===r?r=n?" ":"":""===r&&n&&!s.test(n[0])&&(r=" "),i+r+n}function a(t,e,i){let n=i.nodes,s=n.length-1;for(;s>0&&"comment"===n[s].type;)s-=1;let r=t.raw(i,"semicolon"),o="document"===i.type;for(let t=n.length-1;t>=0;t--){let i=n[t],l=s!==t||r;!l&&n.length-1>t&&("atrule"===i.type&&!i.nodes||"decl"===i.type&&i.prop.startsWith("--"))&&(l=!0),e.push({document:o,node:i,semicolon:l})}}function h(t,e,i,n){let s=t.raw(i,"between","beforeOpen");t.builder(r(n+s)+"{",i,"start");let o=i.nodes&&i.nodes.length,l=()=>{let e=o?t.raw(i,"after"):t.raw(i,"after","emptyBody");e&&t.builder(r(e)),t.builder("}",i,"end"),"rule"===i.type&&i.raws.ownSemicolon&&t.builder(r(i.raws.ownSemicolon),i,"end")};o?(e.push(l),a(t,e,i)):l()}var u=class t{constructor(t){this.builder=t}atrule(t,e){let i=l(this,t);t.nodes?this.block(t,i):this.builder(r(i+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){let i;i=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");let n=t.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(i.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;s>t;t++)i+=e}return i}block(t,e){let i,n=this.raw(t,"between","beforeOpen");this.builder(r(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(r(i)),this.builder("}",t,"end")}body(e){let i=t.prototype,n=["atrule","block","body","rule","stringify"].every(t=>this[t]===i[t]),s=[];for(a(this,s,e);s.length>0;){let t=s.pop();if("function"==typeof t){t();continue}let e=t.node,i=this.raw(e,"before");i&&this.builder(t.document?i:r(i)),n&&"rule"===e.type?h(this,s,e,this.rawValue(e,"selector")):n&&"atrule"===e.type&&e.nodes?h(this,s,e,l(this,e)):this.stringify(e,t.semicolon)}}comment(t){let e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(r("/*"+e+t.text+i+"*/"),t)}decl(t,e){let i=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=i.important||" !important"),e&&(s+=";"),this.builder(r(s),t)}document(t){this.body(t)}raw(t,e,i){let n;if(i||(i=e),e&&(n=t.raws[e],void 0!==n))return n;let s=t.parent;if("before"===i){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return o[i];let r=t.root(),l=r.rawCache||(r.rawCache={});if(void 0!==l[i])return l[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);{let s="raw"+((a=i)[0].toUpperCase()+a.slice(1));this[s]?n=this[s](r,t):r.walk(t=>{if(n=t.raws[e],void 0!==n)return!1})}var a;return void 0===n&&(n=o[i]),l[i]=n,n}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return e=i.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(i=>{let n=i.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==i.raws.before){let t=i.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let i=t[e],n=t.raws[e];return n&&n.value===i?n.raw:i}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){let e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:r(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(r(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=u,u.default=u}),Ci=gi((t,e)=>{var i=ki();function n(t,e){new i(e).stringify(t)}e.exports=n,n.default=n}),Mi=gi((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),xi=gi((t,e)=>{var i=Si(),n=ki(),s=Ci(),{isClean:r,my:o}=Mi();function l(t,e){if(e&&void 0!==e.offset)return e.offset;let i=1,n=1,s=0;for(let r=0;t.length>r;r++){if(n===e.line&&i===e.column){s=r;break}"\n"===t[r]?(i=1,n+=1):i+=1}return s}var a=class t{get proxyOf(){return this}constructor(t={}){this.raws={},this[r]=!1,this[o]=!0;for(let e of Object.keys(t))if("__proto__"!==e)if("nodes"===e){this.nodes=[];for(let i of t[e])this.append("function"==typeof i.clone&&i.parent?i.clone():i)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=function(t){let e=new t.constructor,i=[[t,e,void 0]];for(;i.length>0;){let[t,e,n]=i.pop();for(let s in t){if(!{}.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let r=t[s],o=typeof r;if("parent"===s&&"object"===o)n&&(e[s]=n);else if("source"===s)e[s]=r;else if(Array.isArray(r)){let t=[];e[s]=t;for(let n of r){let s=new n.constructor;t.push(s),i.push([n,s,e])}}else{if("object"===o&&null!==r){let t=new r.constructor;i.push([r,t,void 0]),r=t}e[s]=r}}}return e}(this);for(let i in t)e[i]=t[i];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:i,start:n}=this.rangeBy(e);return this.source.input.error(t,{column:n.column,line:n.line},{column:i.column,line:i.line},e)}return new i(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let t=this;for(;t=t.parent;)t[r]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)};if(t.index)i=this.positionInside(t.index);else if(t.word){let n=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==n&&(i=this.positionInside(n))}return i}positionInside(t){let e=this.source.start.column,i=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=l(n,this.source.start),r=s+t;for(let t=s;r>t;t++)"\n"===n[t]?(e=1,i+=1):e+=1;return{column:e,line:i,offset:r}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:l(e,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let s=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==s&&(i=this.positionInside(s),n=this.positionInside(s+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:l(e,t.start)}:"number"==typeof t.index&&(i=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line,offset:l(e,t.end)}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):"number"==typeof t.index&&(n=this.positionInside(t.index+1));return(i.line>n.line||n.line===i.line&&i.column>=n.column)&&(n={column:i.column+1,line:i.line,offset:i.offset+1}),{end:n,start:i}}raw(t,e){return(new n).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,i=!1;for(let n of t)n===this?i=!0:i?(this.parent.insertAfter(e,n),e=n):this.parent.insertBefore(e,n);i||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,i){let n=null==i;i=i||new Map;let s=[],r=[[this,s,0]];for(let e=0;r.length>e;e++){let[n,s,o]=r[e],l={};s[o]=l;for(let e in n){if(!{}.hasOwnProperty.call(n,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=n[e];if(Array.isArray(s)){let n=[];l[e]=n;for(let e=0;s.length>e;e++){let o=s[e];"object"==typeof o&&o.toJSON?o.toJSON===t.prototype.toJSON?r.push([o,n,e]):n[e]=o.toJSON(null,i):n[e]=o}}else if("object"==typeof s&&s.toJSON)s.toJSON===t.prototype.toJSON?r.push([s,l,e]):l[e]=s.toJSON(null,i);else if("source"===e){if(null==s)continue;let t=i.get(s.input);null==t&&(t=i.size,i.set(s.input,t)),l[e]={end:s.end,inputId:t,start:s.start}}else l[e]=s}}let o=s[0];return n&&(o.inputs=[...i.keys()].map(t=>t.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=s){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i={}){let n={node:this};for(let t in i)n[t]=i[t];return t.warn(e,n)}};e.exports=a,a.default=a}),Ei=gi((t,e)=>{var i=xi(),n=class extends i{constructor(t){super(t),this.type="comment"}};e.exports=n,n.default=n}),Ai=gi((t,e)=>{var i=xi(),s=class extends i{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=n(n({},t),{},{value:String(t.value)})),super(t),this.type="decl"}};e.exports=s,s.default=s}),Ii=gi((t,e)=>{var i,n,s,r,o=Ei(),l=Ai(),a=xi(),{isClean:h,my:u}=Mi(),c=class t extends a{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(e){let i=[this];for(;i.length>0;){let n=i.pop();if(n===this||n.cleanRaws===t.prototype.cleanRaws){if(a.prototype.cleanRaws.call(n,e),n.nodes)for(let t of n.nodes)i.push(t)}else n.cleanRaws(e)}}each(t){if(!this.proxyOf.nodes)return;let e,i,n=this.getIterator();for(;this.proxyOf.nodes.length>this.indexes[n]&&(e=this.indexes[n],i=t(this.proxyOf.nodes[e],e),!1!==i);)this.indexes[n]+=1;return delete this.indexes[n],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...i)=>t[e](...i.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t)):"every"===e||"some"===e?i=>t[e]((t,...e)=>i(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n]).reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n+1,0,t);for(let t in this.indexes)i=this.indexes[t],i>n&&(this.indexes[t]=i+s.length);return this.markDirty(),this}insertBefore(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n,0,t);for(let t in this.indexes)i=this.indexes[t],n>i||(this.indexes[t]=i+s.length);return this.markDirty(),this}normalize(e,s){if("string"==typeof e)e=function(t){let e=t.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let i of t.nodes)e.push(i)}}return t.slice()}(n(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector||e.selectors)e=[new r(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[u]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[h]&&function(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[h]=!1,t.proxyOf.nodes)for(let i of t.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&s&&void 0!==s.raws.before&&(e.raws.before=s.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let i in this.indexes)e=this.indexes[i],t>e||(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(n=>{e.props&&!e.props.includes(n.prop)||e.fast&&!n.value.includes(e.fast)||(n.value=n.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let e=[{iterator:this.getIterator(),node:this.proxyOf}];for(;e.length>0;){let{iterator:i,node:n}=e[e.length-1],s=n.indexes[i];if(s>=n.proxyOf.nodes.length){delete n.indexes[i],e.pop();let t=e[e.length-1];t&&(t.node.indexes[t.iterator]+=1);continue}let r,o=n.proxyOf.nodes[s];try{r=t(o,s)}catch(t){throw o.addToError(t)}if(!1===r){for(let t of e)delete t.node.indexes[t.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("atrule"===i.type&&t.test(i.name))return e(i,n)}):this.walk((i,n)=>{if("atrule"===i.type&&i.name===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("decl"===i.type&&t.test(i.prop))return e(i,n)}):this.walk((i,n)=>{if("decl"===i.type&&i.prop===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("rule"===i.type&&t.test(i.selector))return e(i,n)}):this.walk((i,n)=>{if("rule"===i.type&&i.selector===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}};c.registerParse=t=>{n=t},c.registerRule=t=>{r=t},c.registerAtRule=t=>{i=t},c.registerRoot=t=>{s=t},e.exports=c,c.default=c,c.rebuild=t=>{let e=[t];for(;e.length>0;){let t=e.pop();if("atrule"===t.type?Object.setPrototypeOf(t,i.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,l.prototype):"comment"===t.type?Object.setPrototypeOf(t,o.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[u]=!0,t.nodes)for(let i of t.nodes)e.push(i)}}}),Ri=gi((t,e)=>{var i=Ii(),n=class extends i{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};e.exports=n,n.default=n,i.registerAtRule(n)}),Ti=gi((t,e)=>{var i,s,r=Ii(),o=class extends r{constructor(t){super(n({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new i(new s,this,t).stringify()}};o.registerLazyResult=t=>{i=t},o.registerProcessor=t=>{s=t},e.exports=o,o.default=o}),Oi=gi((t,e)=>{e.exports={nanoid(t=21){let e="",i=0|t;for(;i-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e=21)=>(i=e)=>{let n="",s=0|i;for(;s-- >0;)n+=t[Math.random()*t.length|0];return n}}}),Di=gi((t,e)=>{var{existsSync:i,readFileSync:n}=wi(),{dirname:s,isAbsolute:r,join:o,relative:l,sep:a}=wi(),{SourceMapConsumer:h,SourceMapGenerator:u}=wi(),c=class{constructor(t,e){if(!1===e.map)return;e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=s(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(t){let e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));let i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return n=t.substr(i[0].length),Buffer?Buffer.from(n,"base64").toString():window.atob(n);var n;let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let i=t.lastIndexOf(e.pop()),n=t.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,n)))}loadFile(t,e,o){if(!o&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;let i=l(s(e),t);if(".."===i||i.startsWith(".."+a)||r(i))return}if(this.root=s(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof h)return u.fromSourceMap(e).toString();if(e instanceof u)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let i=e(t);if(i){let e=this.loadFile(i,t,!0);if(!e)throw new Error("Unable to load previous source map: "+i.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;t&&(e=o(s(t),e));let i=this.loadFile(e,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return i}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=c,c.default=c}),Ni=gi((t,e)=>{var{nanoid:i}=Oi(),{isAbsolute:s,resolve:r}=wi(),{SourceMapConsumer:o,SourceMapGenerator:l}=wi(),{fileURLToPath:a,pathToFileURL:h}=wi(),u=Si(),c=Di(),f=wi(),d=Symbol("lineToIndexCache"),p=Boolean(o&&l),m=Boolean(r&&s);function v(t){if(t[d])return t[d];let e=t.css.split("\n"),i=new Array(e.length),n=0;for(let t=0,s=e.length;s>t;t++)i[t]=n,n+=e[t].length+1;return t[d]=i,i}var y=class{get from(){return this.file||this.id}constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!m||/^\w+:\/\//.test(e.from)||s(e.from)?e.from:r(e.from)),m&&p){let t=new c(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,n={}){let s,r,o,l,a;if(e&&"object"==typeof e){let t=e,n=i;if("number"==typeof t.offset){l=t.offset;let n=this.fromOffset(l);e=n.line,i=n.col}else l=this.fromLineAndColumn(e=t.line,i=t.column);if("number"==typeof n.offset){o=n.offset;let t=this.fromOffset(o);r=t.line,s=t.col}else r=n.line,s=n.column,o=this.fromLineAndColumn(n.line,n.column)}else if(i)l=this.fromLineAndColumn(e,i);else{l=e;let t=this.fromOffset(l);e=t.line,i=t.col}let c=this.origin(e,i,r,s);return a=c?new u(t,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):new u(t,void 0===r?e:{column:i,line:e},void 0===r?i:{column:s,line:r},this.css,this.file,n.plugin),a.input={column:i,endColumn:s,endLine:r,endOffset:o,line:e,offset:l,source:this.css},this.file&&(h&&(a.input.url=h(this.file).toString()),a.input.file=this.file),a}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){let e=v(this),i=0;if(e[e.length-1]>t){let n,s=e.length-2;for(;s>i;)if(n=i+(s-i>>1),e[n]>t)s=n-1;else{if(e[n+1]>t){i=n;break}i=n+1}}else i=e.length-1;return{col:t-e[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:r(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,n){if(!this.map)return!1;let r,o,l=this.map.consumer(),u=l.originalPositionFor({column:e-1,line:t});if(!u.source)return!1;if("number"==typeof i){let t=l.originalPositionFor({column:n-1,line:i});t.source&&(r=t)}o=s(u.source)?h(u.source):new URL(u.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let c={column:u.column+1,endColumn:r&&r.column+1,endLine:r&&r.line,line:u.line,url:o.toString()};if("file:"===o.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");c.file=a(o)}let f=l.sourceContentFor(u.source);return f&&(c.source=f),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=n({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=y,y.default=y,f&&f.registerInput&&f.registerInput(y)}),Li=gi((t,e)=>{var i,n,s=Ii(),r=class extends s{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){let n=new Set;for(let e of Array.isArray(t)?t:[t])e&&"object"==typeof e&&!e.parent&&e.raws&&void 0!==e.raws.before&&n.add(e.raws);let s=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of s)n.has(t.raws)||(t.raws.before=e.raws.before);return s}removeChild(t,e){let i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new i(new n,this,t).stringify()}};r.registerLazyResult=t=>{i=t},r.registerProcessor=t=>{n=t},e.exports=r,r.default=r,s.registerRoot(r)}),_i=gi((t,e)=>{var i={comma(t){return i.split(t,[","],!0)},space(t){return i.split(t,[" ","\n","\t"])},split(t,e,i){let n=[],s="",r=!1,o=0,l=!1,a="",h=!1;for(let i of t)h?h=!1:"\\"===i?h=!0:l?i===a&&(l=!1):'"'===i||"'"===i?(l=!0,a=i):"("===i?o+=1:")"===i?o>0&&(o-=1):0===o&&e.includes(i)&&(r=!0),r?(""!==s&&n.push(s.trim()),s="",r=!1):s+=i;return(i||""!==s)&&n.push(s.trim()),n}};e.exports=i,i.default=i}),Fi=gi((t,e)=>{var i=Ii(),n=_i(),s=class extends i{get selectors(){return n.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=s,s.default=s,i.registerRule(s)}),Pi=gi((t,e)=>{var i=Ri(),r=Ei(),o=Ai(),l=Ni(),h=Di(),u=Li(),c=Fi();function f(t,e){return t.inputs?t.inputs.map(t=>{let e=n(n({},t),{},{__proto__:l.prototype});return e.map&&(e.map=n(n({},e.map),{},{__proto__:h.prototype})),e}):e}function d(t,e,l){let h,f=n({},t);if(delete f.inputs,delete f.nodes,f.source){let t=f.source,{inputId:i}=t;f.source=s(t,a),null!=i&&(f.source.input=e[i])}if("root"===f.type)h=new u(f);else if("decl"===f.type)h=new o(f);else if("rule"===f.type)h=new c(f);else if("comment"===f.type)h=new r(f);else{if("atrule"!==f.type)throw new Error("Unknown node type: "+t.type);h=new i(f)}if(l){h.nodes=l;for(let t of l)t.parent=h}return h}function p(t,e){if(Array.isArray(t))return t.map(t=>p(t));let i,n=[{childIndex:0,children:[],inputs:f(t,e),json:t}];for(;n.length>0;){let t=n[n.length-1],e=t.json.nodes;if(e&&e.length>t.childIndex){let i=e[t.childIndex];t.childIndex+=1,n.push({childIndex:0,children:[],inputs:f(i,t.inputs),json:i});continue}n.pop();let s=d(t.json,t.inputs,e?t.children:void 0);n.length>0?n[n.length-1].children.push(s):i=s}return i}e.exports=p,p.default=p}),Bi=gi((t,e)=>{var{dirname:i,relative:n,resolve:s,sep:r}=wi(),{SourceMapConsumer:o,SourceMapGenerator:l}=wi(),{pathToFileURL:a}=wi(),h=Ni(),u=Boolean(o&&l),c=Boolean(i&&s&&n&&r);e.exports=class{constructor(t,e,i,n){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,n=this.toUrl(this.path(t.file)),s=t.root||i(t.file);!1===this.mapOpts.sourcesContent?(e=new o(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else if(this.css){let t;for(;-1!==(t=this.css.lastIndexOf("/*#"));){let e=this.css.indexOf("*/",t+3);if(-1===e)break;for(;t>0&&"\n"===this.css[t-1];)t--;this.css=this.css.slice(0,t)+this.css.slice(e+2)}}}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=l.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,i=1,n=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,a)=>{if(this.css+=o,l&&"end"!==a&&(r.generated.line=i,r.generated.column=n-1,l.source&&l.source.start?(r.source=this.sourcePath(l),r.original.line=l.source.start.line,r.original.column=l.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),e=o.match(/\n/g),e?(i+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,l&&"start"!==a){let t=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==t.last||t.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=i,r.generated.column=n-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=i,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));let o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new h(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let i=e.source.input.from;if(i&&!t[i]){t[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,e.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(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(a){let e=a(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===r&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}}}),ji=gi((t,e)=>{var i="'".charCodeAt(0),n='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),o="\n".charCodeAt(0),l=" ".charCodeAt(0),a="\f".charCodeAt(0),h="\t".charCodeAt(0),u="\r".charCodeAt(0),c="[".charCodeAt(0),f="]".charCodeAt(0),d="(".charCodeAt(0),p=")".charCodeAt(0),m="{".charCodeAt(0),v="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),b=":".charCodeAt(0),w="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e={}){let x,E,A,I,R,T,O,D,N,L,_=t.css.valueOf(),F=e.ignoreErrors,P=_.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(B>=P)return;let e=!!t&&t.ignoreUnclosed;switch(x=_.charCodeAt(B),x){case o:case l:case h:case u:case a:I=B;do{I+=1,x=_.charCodeAt(I)}while(x===l||x===o||x===h||x===u||x===a);T=["space",_.slice(B,I)],B=I-1;break;case c:case f:case m:case v:case b:case y:case p:{let t=String.fromCharCode(x);T=[t,t,B];break}case d:if(L=j.length?j.pop()[1]:"",N=_.charCodeAt(B+1),"url"===L&&N!==i&&N!==n&&N!==l&&N!==o&&N!==h&&N!==a&&N!==u){I=B;do{if(O=!1,I=_.indexOf(")",I+1),-1===I){if(F||e){I=B;break}H("bracket")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["brackets",_.slice(B,I+1),B,I],B=I}else B>W?(I=_.indexOf(")",B+1),E=_.slice(B,I+1),-1===I||C.test(E)?(W=-1===I?P:I,T=["(","(",B]):(T=["brackets",E,B,I],B=I)):T=["(","(",B];break;case i:case n:R=x===i?"'":'"',I=B;do{if(O=!1,I=_.indexOf(R,I+1),-1===I){if(F||e){I=B+1;break}H("string")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["string",_.slice(B,I+1),B,I],B=I;break;case w:S.lastIndex=B+1,S.test(_),I=0===S.lastIndex?_.length-1:S.lastIndex-2,T=["at-word",_.slice(B,I+1),B,I],B=I;break;case s:for(I=B,A=!0;_.charCodeAt(I+1)===s;)I+=1,A=!A;if(x=_.charCodeAt(I+1),A&&x!==r&&x!==l&&x!==o&&x!==h&&x!==u&&x!==a&&(I+=1,M.test(_.charAt(I)))){for(;M.test(_.charAt(I+1));)I+=1;_.charCodeAt(I+1)===l&&(I+=1)}T=["word",_.slice(B,I+1),B,I],B=I;break;default:x===r&&_.charCodeAt(B+1)===g?(I=_.indexOf("*/",B+2)+1,0===I&&(F||e?I=_.length:H("comment")),T=["comment",_.slice(B,I+1),B,I],B=I):(k.lastIndex=B+1,k.test(_),I=0===k.lastIndex?_.length-1:k.lastIndex-2,T=["word",_.slice(B,I+1),B,I],j.push(T),B=I)}return B++,T},position:()=>B}}}),Ui=gi((t,e)=>{var i=Ri(),n=Ei(),s=Ai(),r=Li(),o=Fi(),l=ji(),a={empty:!0,space:!0};function h(t,e,i){let n="";for(let s=e;i>s;s++)n+=t[s][1];return n}e.exports=class{constructor(t){this.input=t,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,n,s,r=new i;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let o=!1,l=!1,a=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){l=!0;break}if("}"===e){if(a.length>0){for(s=a.length-1,n=a[s];n&&"space"===n[0];)n=a[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o&&(r.source.end=this.getPosition((t=a[a.length-1])[3]||t[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),l&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let i,n=0;for(let s=e-1;s>=0&&(i=t[s],"space"===i[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(t){let e,i,n,s=0;for(let[r,o]of t.entries()){if(i=o,n=i[0],"("===n&&(s+=1),")"===n&&(s-=1),0===s&&":"===n){if(e){if("word"===e[0]&&"progid"===e[1])continue;return r}this.doubleColon(i)}e=i}return!1}comment(t){let e=new n;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let i=t[1].slice(2,-2);if(i.trim()){let t=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}else e.text="",e.raws.left=i,e.raws.right=""}createTokenizer(){this.tokenizer=l(this.input)}decl(t,e){let i=new s;this.init(i,t[0][2]);let n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;e>=0;e--){let i=t[e],n=i[3]||i[2];if(n)return n}}(t)),i.source.end.offset++;let r=0;for(;"word"!==t[r][0];)r===t.length-1&&this.unknownWord([t[r]]),r++;i.raws.before+=h(t,0,r),i.source.start=this.getPosition(t[r][2]);let o=r;for(;t.length>r;){let e=t[r][0];if(":"===e||"space"===e||"comment"===e)break;r++}i.prop=h(t,o,r);let l,a=r;for(;t.length>r&&(l=t[r],r++,":"!==l[0]);)"word"===l[0]&&/\w/.test(l[1])&&this.unknownWord([l]);i.raws.between=h(t,a,r),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let u=r;for(;t.length>r;){let e=t[r][0];if("space"!==e&&"comment"!==e)break;r++}let c=t.slice(u,r);t=t.slice(r),this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(l=t[e],"!important"===l[1].toLowerCase()){i.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n," !important"!==n&&(i.raws.important=n);break}if("important"===l[1].toLowerCase()){let n=t.slice(0),s="";for(let t=e;t>0;t--){let e=n[t][0];if(s.trim().startsWith("!")&&"space"!==e)break;s=n.pop()[1]+s}s.trim().startsWith("!")&&(i.important=!0,i.raws.important=s,t=n)}if("space"!==l[0]&&"comment"!==l[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(i.raws.between+=c.map(t=>t[1]).join(""),c=[]),this.raw(i,"value",c.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,i=null,n=!1,s=null,r=[],o=t[1].startsWith("--"),l=[],a=t;for(;a;){if(i=a[0],l.push(a),"("===i||"["===i)s||(s=a),r.push("("===i?")":"]");else if(o&&n&&"{"===i)s||(s=a),r.push("}");else if(0===r.length){if(";"===i){if(n)return void this.decl(l,o);break}if("{"===i)return void this.rule(l);if("}"===i){this.tokenizer.back(l.pop()),e=!0;break}":"===i&&(n=!0)}else i===r[r.length-1]&&(r.pop(),0===r.length&&(s=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),r.length>0&&this.unclosedBracket(s),e&&n){if(!o)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,n){let s,r,o,l,h=i.length,u="",c=!0;for(let t=0;h>t;t+=1)s=i[t],r=s[0],"space"!==r||t!==h-1||n?"comment"===r?(l=i[t-1]?i[t-1][0]:"empty",o=i[t+1]?i[t+1][0]:"empty",a[l]||a[o]||","===u.slice(-1)?c=!1:u+=s[1]):u+=s[1]:c=!1;if(!c){let n=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:n,value:u}}t[e]=u}rule(t){t.pop();let e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let e,i="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)i=t.pop()[1]+i;return i}stringFrom(t,e){let i="";for(let n=e;t.length>n;n++)i+=t[n][1];return t.splice(e,t.length-e),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),Wi=gi((t,e)=>{var i=Ii(),n=Ni(),s=Ui();function r(t,e){let i=new s(new n(t,e));try{i.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return i.root}e.exports=r,r.default=r,i.registerParse(r)}),$i=gi((t,e)=>{var i=Ii(),{my:n}=Mi(),s=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){e.node[n]||i.rebuild(e.node);let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}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}};e.exports=s,s.default=s}),Hi=gi((t,e)=>{var i=$i(),n=class{get content(){return this.css}constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new i(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=n,n.default=n}),Gi=gi((t,e)=>{var i={};e.exports=function(t){i[t]||(i[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),zi=gi((t,e)=>{var i=Ii(),s=Ti(),r=Bi(),l=Wi(),a=Hi(),h=Li(),u=Ci(),{isClean:c,my:f}=Mi(),d=Gi(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={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},v={Once:!0,postcssPlugin:!0,prepare:!0};function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){let e=!1,i=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function b(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:g(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[c]=!1,t.nodes)for(let i of t.nodes)e.push(i)}return t}var S={},k=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof t||s instanceof a)o=w(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let t=l;r.syntax&&(t=r.syntax.parse),r.parser&&(t=r.parser),t.parse&&(t=t.parse);try{o=t(s,r)}catch(t){this.processed=!0,this.error=t}o&&!o[f]&&i.rebuild(o)}else o=w(s);this.result=new a(e,o,r),this.helpers=n(n({},S),{},{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?n(n({},t),t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion){let t=i.postcssPlugin,e=i.postcssVersion,n=this.result.processor.version,s=e.split("."),r=n.split(".");(s[0]!==r[0]||parseInt(s[1])>parseInt(r[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(let e of this.plugins)if("object"==typeof e)for(let i in e){if(!m[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!v[i])if("object"==typeof e[i])for(let n in e[i])t(e,"*"===n?i:i+"-"+n.toLowerCase(),e[i][n]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return o(function*(){t.plugin=0;for(let e=0;t.plugins.length>e;e++){let i=t.runOnRoot(t.plugins[e]);if(y(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){let e=t.result.root;for(;!e[c];){e[c]=!0;let i=[b(e)];for(;i.length>0;){let e=t.visitTick(i);if(y(e))try{yield e}catch(e){throw t.handleError(e,i[i.length-1].node)}}}if(t.listeners.OnceExit)for(let[i,n]of t.listeners.OnceExit){t.result.lastPlugin=i;try{if("document"===e.type){let i=e.nodes.map(e=>n(e,t.helpers));yield Promise.all(i)}else yield n(e,t.helpers)}catch(e){throw t.handleError(e)}}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(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 t=this.result.opts,e=u;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let i=this.result.root.source;if(void 0===t.map&&!(i&&i.input&&i.input.map)){let t="";return e(this.result.root,e=>{t+=e}),this.result.css=t,this.result}let n=new r(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[c];)t[c]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(let[i,n]of t){let t;this.result.lastPlugin=i;try{t=n(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:i,visitors:n}=e;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void t.pop();if(n.length>0&&n.length>e.visitorIndex){let[t,s]=n[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===n.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){let n,s=e.iterator;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c])return n[c]=!0,void t.push(b(n));e.iterator=0,delete i.indexes[s]}let s=e.events;for(;s.length>e.eventIndex;){let t=s[e.eventIndex];if(e.eventIndex+=1,0===t)return void(i.nodes&&i.nodes.length&&(i[c]=!0,e.iterator=i.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[c]=!0;let e=[{eventIndex:0,events:g(t),iterator:0,node:t}];for(;e.length>0;){let t=e[e.length-1],i=t.node;if(0!==t.iterator){let n,s=t.iterator,r=!1;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c]){n[c]=!0,e.push({eventIndex:0,events:g(n),iterator:0,node:n}),r=!0;break}if(r)continue;t.iterator=0,delete i.indexes[s]}if(t.events.length>t.eventIndex){let n=t.events[t.eventIndex];if(t.eventIndex+=1,0===n)i.nodes&&i.nodes.length&&(t.iterator=i.getIterator());else{let t=this.listeners[n];t&&this.visitSync(t,i.toProxy())&&e.pop()}continue}e.pop()}}warnings(){return this.sync().warnings()}};k.registerPostcss=t=>{S=t},e.exports=k,k.default=k,h.registerLazyResult(k),s.registerLazyResult(k)}),Vi=gi((t,e)=>{var i=Bi(),n=Wi(),s=Hi(),r=Ci(),o=Gi(),l=class{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 t,e=n;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=n,this._map=void 0;let o=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=e;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new i(o,void 0,this._opts,e);if(a.isMap()){let[t,e]=a.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=l,l.default=l}),Yi=gi((t,e)=>{var i=Ti(),n=zi(),s=Vi(),r=Li(),o=class{constructor(t=[]){this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else{if("function"!=typeof i)throw"object"==typeof i&&(i.parse||i.stringify)?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."):new Error(i+" is not a PostCSS plugin");e.push(i)}return e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new n(this,t,e):new s(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,r.registerProcessor(o),i.registerProcessor(o)}),qi=gi((t,e)=>{var i=Ri(),n=Ei(),s=Ii(),r=Si(),o=Ai(),l=Ti(),a=Pi(),h=Ni(),u=zi(),c=_i(),f=xi(),d=Wi(),p=Yi(),m=Hi(),v=Li(),y=Fi(),g=Ci(),b=$i();function w(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new p(t)}w.plugin=function(t,e){let i,n=!1;function s(...i){console&&console.warn&&!n&&(n=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=e(...i);return s.postcssPlugin=t,s.postcssVersion=(new p).version,s}return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(t,e,i){return w([s(i)]).process(t,e)},s},w.stringify=g,w.parse=d,w.fromJSON=a,w.list=c,w.comment=t=>new n(t),w.atRule=t=>new i(t),w.decl=t=>new o(t),w.rule=t=>new y(t),w.root=t=>new v(t),w.document=t=>new l(t),w.CssSyntaxError=r,w.Declaration=o,w.Container=s,w.Processor=p,w.Document=l,w.Comment=n,w.Warning=b,w.AtRule=i,w.Result=m,w.Input=h,w.Rule=y,w.Root=v,w.Node=f,u.registerPostcss(w),e.exports=w,w.default=w}),Zi=gi((t,e)=>{var i=Ei(),n=Ui(),s=ji();e.exports=class extends n{checkMissedSemicolon(){}comment(t){let e=new i;this.init(e,t[2]);let n=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:n.col,line:n.line,offset:t[3]+1};let s=t[1].slice(2);if("*/"===s.slice(-2)&&(s=s.slice(0,-2)),/^\s*$/.test(s))e.text="",e.raws.left=s,e.raws.right="";else{let t=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){let e,i,n=this.colon(t);if(!1===n)return;for(e=n-1;e>=0&&"word"!==t[e][0];e--);if(0===e||0>e)return;for(i=e-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}let s=t.slice(e),r=t.slice(i,e);t.splice(i,t.length-i),this.spaces=r.map(t=>t[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}});gi((t,e)=>{var{Input:i}=qi(),n=Zi();e.exports=function(t,e){let s=new n(new i(t,e));return s.parse(),s.root}})(),qi();var Xi=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}({});function Ji(t){const e=[];for(const i in t){const n=t[i];if("string"!=typeof n)continue;const s=nn(i);e.push(`${s}: ${n};`)}return e.join(" ")}var Qi=/-([a-z])/g,Ki=/^--[a-zA-Z0-9-]+$/,tn=t=>Ki.test(t)?t:t.replace(Qi,(t,e)=>e?e.toUpperCase():""),en=/\B([A-Z])/g,nn=t=>t.replace(en,"-$1").toLowerCase();function sn(t){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(t)}function rn(t,e,i){return(e=function(t){var e=function(t){if("object"!=sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=sn(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var on=class t{constructor(...t){rn(this,"parentElement",null),rn(this,"parentNode",null),rn(this,"ownerDocument",void 0),rn(this,"firstChild",null),rn(this,"lastChild",null),rn(this,"previousSibling",null),rn(this,"nextSibling",null),rn(this,"ELEMENT_NODE",1),rn(this,"TEXT_NODE",3),rn(this,"nodeType",void 0),rn(this,"nodeName",void 0),rn(this,"RRNodeType",void 0)}get childNodes(){const t=[];let e=this.firstChild;for(;e;)t.push(e),e=e.nextSibling;return t}contains(e){if(!(e instanceof t))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ln=class t extends on{constructor(...t){super(t),rn(this,"nodeType",9),rn(this,"nodeName","#document"),rn(this,"compatMode","CSS1Compat"),rn(this,"RRNodeType",Xi.Document),rn(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===Xi.Element&&"HTML"===t.tagName)||null}get body(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===Xi.Element&&"BODY"===t.tagName))||null}get head(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===Xi.Element&&"HEAD"===t.tagName))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const e=t.RRNodeType;if((e===Xi.Element||e===Xi.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===e))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${e===Xi.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=vn(this,t);return i.parentElement=null,i}insertBefore(t,e){const i=t.RRNodeType;if((i===Xi.Element||i===Xi.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===Xi.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const n=yn(this,t,e);return n.parentElement=null,n}removeChild(t){return gn(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){const t=this.createDocumentType("html",e,"");this.open(),this.appendChild(t)}}createDocument(e,i,n){return new t}createDocumentType(t,e,i){const n=new an(t,e,i);return n.ownerDocument=this,n}createElement(t){const e=new hn(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){const e=new fn(t);return e.ownerDocument=this,e}createComment(t){const e=new dn(t);return e.ownerDocument=this,e}createCDATASection(t){const e=new pn(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}},an=class extends on{constructor(t,e,i){super(),rn(this,"nodeType",10),rn(this,"RRNodeType",Xi.DocumentType),rn(this,"name",void 0),rn(this,"publicId",void 0),rn(this,"systemId",void 0),rn(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=i,this.nodeName=t}toString(){return"RRDocumentType"}},hn=class extends on{constructor(t){super(),rn(this,"nodeType",1),rn(this,"RRNodeType",Xi.Element),rn(this,"tagName",void 0),rn(this,"attributes",{}),rn(this,"shadowRoot",null),rn(this,"scrollLeft",void 0),rn(this,"scrollTop",void 0),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(e=>t+=e.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new mn(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?function(t){const e={},i=/:(.+)/;return t.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach(function(t){if(t){const n=t.split(i);n.length>1&&(e[tn(n[0].trim())]=n[1].trim())}}),e}(this.attributes.style):{},e=/\B([A-Z])/g;return t.setProperty=(i,n,s)=>{if(e.test(i))return;const r=tn(i);n?t[r]=n:delete t[r],"important"===s&&(t[r]+=" !important"),this.attributes.style=Ji(t)},t.removeProperty=i=>{if(e.test(i))return"";const n=tn(i),s=t[n]||"";return delete t[n],this.attributes.style=Ji(t),s},t}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,i){this.setAttribute(e,i)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return vn(this,t)}insertBefore(t,e){return yn(this,t,e)}removeChild(t){return gn(this,t)}attachShadow(t){const e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){let t="";for(const e in this.attributes)t+=`${e}="${this.attributes[e]}" `;return`${this.tagName} ${t}`}},un=class extends hn{constructor(...t){super(...t),rn(this,"currentTime",void 0),rn(this,"volume",void 0),rn(this,"paused",void 0),rn(this,"muted",void 0),rn(this,"playbackRate",void 0),rn(this,"loop",void 0)}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},cn=class extends hn{constructor(...t){super(...t),rn(this,"tagName","DIALOG"),rn(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}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")}},fn=class extends on{constructor(t){super(),rn(this,"nodeType",3),rn(this,"nodeName","#text"),rn(this,"RRNodeType",Xi.Text),rn(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}},dn=class extends on{constructor(t){super(),rn(this,"nodeType",8),rn(this,"nodeName","#comment"),rn(this,"RRNodeType",Xi.Comment),rn(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},pn=class extends on{constructor(t){super(),rn(this,"nodeName","#cdata-section"),rn(this,"nodeType",4),rn(this,"RRNodeType",Xi.CDATA),rn(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},mn=class{constructor(t,e){if(rn(this,"onChange",void 0),rn(this,"classes",[]),rn(this,"add",(...t)=>{for(const e of t){const t=String(e);0>this.classes.indexOf(t)&&this.classes.push(t)}this.onChange&&this.onChange(this.classes.join(" "))}),rn(this,"remove",(...t)=>{this.classes=this.classes.filter(e=>-1===t.indexOf(e)),this.onChange&&this.onChange(this.classes.join(" "))}),t){const e=t.trim().split(/\s+/);this.classes.push(...e)}this.onChange=e}};function vn(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function yn(t,e,i){if(!i)return vn(t,e);if(i.parentNode!==t)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===i||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=i.previousSibling,i.previousSibling=e,e.nextSibling=i,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function gn(t,e){if(e.parentNode!==t)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:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var bn=function(t){return t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t}({}),wn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Sn={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"},kn=null;function Cn(t,e,i,n=e.mirror||e.ownerDocument.mirror){t=function(t,e,i,n){if(i.afterAppend&&!kn&&(kn=new WeakSet,setTimeout(()=>{kn=null},0)),!An(t,e)){var s;const r=En(e,i.mirror,n);null===(s=t.parentNode)||void 0===s||s.replaceChild(r,t),t=r}switch(e.RRNodeType){case Xi.Document:if(!In(t,e,i.mirror,n)){const s=n.getMeta(e);s&&(i.mirror.removeNodeFromMap(t),t.close(),t.open(),i.mirror.add(t,s),null==kn||kn.add(t))}break;case Xi.Element:{const s=t,r=e;switch(r.tagName){case"IFRAME":{const s=t.contentDocument;if(!s)break;Cn(s,e.contentDocument,i,n);break}}r.shadowRoot&&(s.shadowRoot||vi(s))&&xn(s.shadowRoot,r.shadowRoot,i,n),function(t,e,i){const n=t.attributes,s=e.attributes;for(const n in s){const r=s[n],o=i.getMeta(e);if((null==o?void 0:o.isSVG)&&wn[n])t.setAttributeNS(wn[n],n,r);else if("CANVAS"===e.tagName&&"rr_dataURL"===n)Mn(t,r);else{if("IFRAME"===e.tagName&&"srcdoc"===n)continue;try{t.getAttribute(n)!==r&&t.setAttribute(n,r)}catch(t){console.warn(t)}}}for(const{name:e}of Array.from(n))e in s||t.removeAttribute(e);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(s,r,n);break}}return t}(t,e,i,n),xn(t,e,i,n),function(t,e,i){switch(e.RRNodeType){case Xi.Document:{const t=e.scrollData;t&&i.applyScroll(t,!0);break}case Xi.Element:{const n=t,s=e;switch(s.scrollData&&i.applyScroll(s.scrollData,!0),s.inputData&&i.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":{const e=t,i=s;void 0!==i.paused&&(i.paused?e.pause():e.play()),void 0!==i.muted&&(e.muted=i.muted),void 0!==i.volume&&(e.volume=i.volume),void 0!==i.currentTime&&(e.currentTime=i.currentTime),void 0!==i.playbackRate&&(e.playbackRate=i.playbackRate),void 0!==i.loop&&(e.loop=i.loop);break}case"CANVAS":{const s=e;null!==s.rr_dataURL&&Mn(n,s.rr_dataURL),s.canvasMutations.forEach(e=>i.applyCanvas(e.event,e.mutation,t));break}case"STYLE":{const t=n.sheet;t&&e.rules.forEach(e=>i.applyStyleSheetMutation(e,t));break}case"DIALOG":{const t=n,e=s,i=t.open,r=t.matches("dialog:modal"),o=e.open,l=e.isModal,a=r!==l,h=i!==o;if((a||i&&h)&&t.close(),o&&(h||a))try{l?t.showModal():t.show()}catch(t){console.warn(t)}break}}break}case Xi.Text:case Xi.Comment:case Xi.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}var n;(null==kn?void 0:kn.has(t))&&(kn.delete(t),null===(n=i.afterAppend)||void 0===n||n.call(i,t,i.mirror.getId(t)))}(t,e,i)}function Mn(t,e){const i=t.ownerDocument.createElement("img");i.onload=()=>{const e=t.getContext("2d");e&&e.drawImage(i,0,0,i.width,i.height)},i.src=e}function xn(t,e,i,n){const s=Array.from(t.childNodes),r=e.childNodes;if(0===s.length&&0===r.length)return;let o,l,a=0,h=s.length-1,u=0,c=r.length-1,f=s[a],d=s[h],p=r[u],m=r[c];for(;h>=a&&c>=u;)if(void 0===f)f=s[++a];else if(void 0===d)d=s[--h];else if(In(f,p,i.mirror,n))f=s[++a],p=r[++u];else if(In(d,m,i.mirror,n))d=s[--h],m=r[--c];else if(In(f,m,i.mirror,n)){try{t.insertBefore(f,d.nextSibling)}catch(t){console.warn(t)}f=s[++a],m=r[--c]}else if(In(d,p,i.mirror,n)){try{t.insertBefore(d,f)}catch(t){console.warn(t)}d=s[--h],p=r[++u]}else{if(!o){o={};for(let t=a;h>=t;t++){const e=s[t];e&&i.mirror.hasNode(e)&&(o[i.mirror.getId(e)]=t)}}l=o[n.getId(p)];const e=s[l];if(void 0!==l&&e&&In(e,p,i.mirror,n)){try{t.insertBefore(e,f)}catch(t){console.warn(t)}s[l]=void 0}else{const e=En(p,i.mirror,n);"#document"===t.nodeName&&f&&(e.nodeType===e.DOCUMENT_TYPE_NODE&&f.nodeType===f.DOCUMENT_TYPE_NODE||e.nodeType===e.ELEMENT_NODE&&f.nodeType===f.ELEMENT_NODE)&&(t.removeChild(f),i.mirror.removeNodeFromMap(f),f=s[++a]);try{t.insertBefore(e,f||null)}catch(t){console.warn(t)}}p=r[++u]}if(a>h){const e=r[c+1];let s=null;for(e&&(s=i.mirror.getNode(n.getId(e)));c>=u;++u){const e=En(r[u],i.mirror,n);try{t.insertBefore(e,s)}catch(t){console.warn(t)}}}else if(u>c)for(;h>=a;a++){const e=s[a];if(e&&e.parentNode===t)try{t.removeChild(e),i.mirror.removeNodeFromMap(e)}catch(t){console.warn(t)}}let v=t.firstChild,y=e.firstChild;for(;null!==v&&null!==y;)Cn(v,y,i,n),v=v.nextSibling,y=y.nextSibling}function En(t,e,i){const s=i.getId(t),r=i.getMeta(t);let o=null;if(s>-1&&(o=e.getNode(s)),null!==o&&An(o,t))return o;switch(t.RRNodeType){case Xi.Document:o=new Document;break;case Xi.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case Xi.Element:{let e=t.tagName.toLowerCase();e=Sn[e]||e,o=r&&"isSVG"in r&&(null==r?void 0:r.isSVG)?document.createElementNS(wn.svg,e):document.createElement(t.tagName);break}case Xi.Text:o=document.createTextNode(t.data);break;case Xi.Comment:o=document.createComment(t.data);break;case Xi.CDATA:o=document.createCDATASection(t.data)}r&&e.add(o,n({},r));try{null==kn||kn.add(o)}catch(t){}return o}function An(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function In(t,e,i,n){const s=i.getId(t),r=n.getId(e);return-1!==s&&s===r&&An(t,e)}var Rn=class t extends ln{get unserializedId(){return this.l--}constructor(t){super(),rn(this,"UNSERIALIZED_STARTING_ID",-2),rn(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),rn(this,"mirror",new Wn),rn(this,"scrollData",null),t&&(this.mirror=t)}createDocument(e,i,n){return new t}createDocumentType(t,e,i){const n=new Tn(t,e,i);return n.ownerDocument=this,n}createElement(t){const e=t.toUpperCase();let i;switch(e){case"AUDIO":case"VIDEO":i=new Dn(e);break;case"IFRAME":i=new Fn(e,this.mirror);break;case"CANVAS":i=new Ln(e);break;case"STYLE":i=new _n(e);break;case"DIALOG":i=new Nn(e);break;default:i=new On(e)}return i.ownerDocument=this,i}createComment(t){const e=new Bn(t);return e.ownerDocument=this,e}createCDATASection(t){const e=new jn(t);return e.ownerDocument=this,e}createTextNode(t){const e=new Pn(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.l=this.UNSERIALIZED_STARTING_ID}},Tn=an,On=class extends hn{constructor(...t){super(...t),rn(this,"inputData",null),rn(this,"scrollData",null)}},Dn=class extends un{},Nn=class extends cn{},Ln=class extends On{constructor(...t){super(...t),rn(this,"rr_dataURL",null),rn(this,"canvasMutations",[])}getContext(){return null}},_n=class extends On{constructor(...t){super(...t),rn(this,"rules",[])}},Fn=class extends On{constructor(t,e){super(t),rn(this,"contentDocument",new Rn),this.contentDocument.mirror=e}},Pn=fn,Bn=dn,jn=pn;function Un(t,e,i,s){let r;switch(t.nodeType){case bn.DOCUMENT_NODE:s&&"IFRAME"===s.nodeName?r=s.contentDocument:(r=e,r.compatMode=t.compatMode);break;case bn.DOCUMENT_TYPE_NODE:r=e.createDocumentType(t.name,t.publicId,t.systemId);break;case bn.ELEMENT_NODE:{const i=t,n=(o=i)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase();r=e.createElement(n);const s=r;for(const{name:t,value:e}of Array.from(i.attributes))s.attributes[t]=e;i.scrollLeft&&(s.scrollLeft=i.scrollLeft),i.scrollTop&&(s.scrollTop=i.scrollTop);break}case bn.TEXT_NODE:r=e.createTextNode(t.textContent||"");break;case bn.CDATA_SECTION_NODE:r=e.createCDATASection(t.data);break;case bn.COMMENT_NODE:r=e.createComment(t.textContent||"");break;case bn.DOCUMENT_FRAGMENT_NODE:{const t=s;if(!vi(t))return null;r=t.shadowRoot;break}default:return null}var o;let l=i.getMeta(t);return e instanceof Rn&&(l||(l=$n(r,e.unserializedId),i.add(t,l)),e.mirror.add(r,n({},l))),r}var Wn=class{constructor(){rn(this,"idNodeMap",new Map),rn(this,"nodeMetaMap",new WeakMap)}getId(t){var e,i;return t&&null!==(e=null===(i=this.getMeta(t))||void 0===i?void 0:i.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){const i=this.getNode(t);if(i){const t=this.nodeMetaMap.get(i);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function $n(t,e){switch(t.RRNodeType){case Xi.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case Xi.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case Xi.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case Xi.Text:case Xi.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case Xi.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function Hn(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date,"0".repeat(32),"0".repeat(16);var Gn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},zn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Vn={};function Yn(t){if(Vn[t])return Vn[t];const e=function(t){var e,i;const n=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(i=e.__symbol__)||void 0===i?void 0:i.call(e,t);return n&&globalThis[n]?globalThis[n]:void 0}(t)||globalThis[t],i=e.prototype,n=t in Gn?Gn[t]:void 0,s=Boolean(n&&n.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(i,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),r=t in zn?zn[t]:void 0,o=Boolean(r&&r.every(t=>{var e;return"function"==typeof i[t]&&(null===(e=i[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(s&&o)return Vn[t]=e.prototype,e.prototype;const l=document.createElement("iframe");l.style.display="none";let a=!1;try{document.body.appendChild(l);const n=l.contentWindow;if(!n)return e.prototype;const s=n[t].prototype;return s?(Hn(h=navigator.userAgent,"AppleWebKit")&&!Hn(h,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",t),a=!0),Vn[t]=s):i}catch(t){return i}finally{!a&&l.parentNode&&document.body.removeChild(l)}var h}var qn=Object.create(null);function Zn(t,e,i){var n;const s=qn[t],r=s[i];if(r)return r.call(e);const o=Yn(t),l=null===(n=Object.getOwnPropertyDescriptor(o,i))||void 0===n?void 0:n.get;return l?(s[i]=l,l.call(e)):e[i]}qn.Node=Object.create(null),qn.ShadowRoot=Object.create(null),qn.MutationObserver=Object.create(null),qn.Element=Object.create(null);var Xn,Jn={};function Qn(t,e,i){const n=`${t}.${String(i)}`;if(Jn[n])return Jn[n].bind(e);const s=Yn(t)[i];return"function"!=typeof s?e[i]:(Jn[n]=s,s.bind(e))}function Kn(){return Yn("MutationObserver").constructor}function ts(t,e,i){try{if(!(e in t))return()=>{};const n=t[e],s={next:n},r=i(function(...t){return s.next.apply(this,t)});return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n},__rrweb_layer__:{enumerable:!1,value:s}})),t[e]=r,()=>{if(t[e]===r)return void(t[e]=s.next);const i=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0};let n=t[e],o=i(n);for(;o;){if(o.next===r)return void(o.next=s.next);n=o.next,o=i(n)}}}catch(t){return()=>{}}}var es={childNodes:t=>Zn("Node",t,"childNodes"),parentNode:t=>Zn("Node",t,"parentNode"),parentElement:t=>Zn("Node",t,"parentElement"),textContent:t=>Zn("Node",t,"textContent"),isConnected(t){if(void 0===Xn){var e;const t=null===(e=Object.getOwnPropertyDescriptor(Yn("Node"),"isConnected"))||void 0===e?void 0:e.get;Xn=(null==t?void 0:t.toString().includes("[native code]"))?t:null}return null==Xn?void 0:Xn.call(t)},contains:(t,e)=>Qn("Node",t,"contains")(e),getRootNode:t=>Qn("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Zn("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Zn("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Qn("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Qn("Element",t,"querySelectorAll")(e),mutationObserver:Kn,patch:ts};function is(t){return is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(t)}function ns(t,e,i){return(e=function(t){var e=function(t){if("object"!=is(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=is(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==is(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ss=c({StyleSheetMirror:()=>Ns,_mirror:()=>us,callAllSafely:()=>as,callSafely:()=>ls,closestElementOfNode:()=>ys,getBaseDimension:()=>Is,getNestedRule:()=>Ts,getPositionsAndIndex:()=>Os,getRootShadowHost:()=>_s,getShadowHost:()=>Ls,getWindowHeight:()=>ms,getWindowScroll:()=>ps,getWindowWidth:()=>vs,hasShadowRoot:()=>Rs,hookSetter:()=>fs,inDom:()=>Ps,isAncestorRemoved:()=>Ss,isBlocked:()=>gs,isIgnored:()=>ws,isSerialized:()=>bs,isSerializedIframe:()=>Es,isSerializedStylesheet:()=>As,iterateResolveTree:()=>xs,legacy_isTouchEvent:()=>ks,nowTimestamp:()=>ds,on:()=>rs,polyfill:()=>Cs,queueToResolveTrees:()=>Ms,removeEventListenerSafely:()=>os,shadowHostInDom:()=>Fs,throttle:()=>cs,uniqueTextMutations:()=>Ds});function rs(t,e,i=document){const n={capture:!0,passive:!0};return i.addEventListener(t,e,n),()=>os(i,t,e,n)}function os(t,e,i,n){ls(()=>{const s=t.removeEventListener;"function"==typeof s&&(void 0!==n?s.call(t,e,i,n):s.call(t,e,i))})}function ls(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}function as(t){t.forEach(t=>{if("function"==typeof t)try{t()}catch(t){}})}var hs="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",us={map:{},getId(){return console.warn(hs),-1},getNode(){return console.warn(hs),null},removeNodeFromMap(){console.warn(hs)},has(){return console.warn(hs),!1},reset(){console.warn(hs)}};function cs(t,e,i={}){let n=null,s=0;return function(...r){const o=Date.now();s||!1!==i.leading||(s=o);const l=e-(o-s),a=this;0>=l||l>e?(n&&(clearTimeout(n),n=null),s=o,t.apply(a,r)):n||!1===i.trailing||(n=setTimeout(()=>{s=!1===i.leading?0:Date.now(),n=null,t.apply(a,r)},l))}}function fs(t,e,i,n,s=window){const r=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,n?i:{set(t){if(setTimeout(()=>{try{i.set.call(this,t)}catch(t){}},0),r&&r.set){if(r.get)try{r.get.call(this)}catch(t){return}r.set.call(this,t)}}}),()=>fs(t,e,r||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(us=new Proxy(us,{get(t,e,i){return"map"===e&&console.warn(hs),Reflect.get(t,e,i)}}));var ds=Date.now;function ps(t){var e,i,n,s;const r=t.document;return{left:r.scrollingElement?r.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:r.documentElement.scrollLeft||(null==r?void 0:r.body)&&(null===(e=es.parentElement(r.body))||void 0===e?void 0:e.scrollLeft)||(null==r||null===(i=r.body)||void 0===i?void 0:i.scrollLeft)||0,top:r.scrollingElement?r.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==r?void 0:r.documentElement.scrollTop)||(null==r?void 0:r.body)&&(null===(n=es.parentElement(r.body))||void 0===n?void 0:n.scrollTop)||(null==r||null===(s=r.body)||void 0===s?void 0:s.scrollTop)||0}}function ms(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ys(t){return t?t.nodeType===t.ELEMENT_NODE?t:es.parentElement(t):null}function gs(t,e,i,n){if(!t)return!1;const s=ys(t);if(!s)return!1;try{if("string"==typeof e){if(s.classList.contains(e))return!0;if(n&&null!==s.closest("."+e))return!0}else if(ze(s,e,n))return!0}catch(t){}if(i){if(s.matches(i))return!0;if(n&&null!==s.closest(i))return!0}return!1}function bs(t,e){return-1!==e.getId(t)}function ws(t,e,i){return!("TITLE"!==t.tagName||!i.headTitleMutations)||-2===e.getId(t)}function Ss(t,e){if(ot(t))return!1;const i=e.getId(t);if(!e.has(i))return!0;const n=es.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||Ss(n,e))}function ks(t){return Boolean(t.changedTouches)}function Cs(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function Ms(t){const e={},i=(t,i)=>{const n={value:t,parent:i,children:[]};return e[t.node.id]=n,n},n=[];for(const s of t){const{nextId:t,parentId:r}=s;if(t&&t in e){const r=e[t];if(r.parent){const t=r.parent.children.indexOf(r);r.parent.children.splice(t,0,i(s,r.parent))}else{const t=n.indexOf(r);n.splice(t,0,i(s,null))}continue}if(r in e){const t=e[r];t.children.push(i(s,t));continue}n.push(i(s,null))}return n}function xs(t,e){e(t.value);for(let i=t.children.length-1;i>=0;i--)xs(t.children[i],e)}function Es(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function As(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Is(t,e){var i;const n=null===(i=t.ownerDocument)||void 0===i||null===(i=i.defaultView)||void 0===i?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const s=n.getBoundingClientRect(),r=Is(n,e),o=s.height/n.clientHeight;return{x:s.x*r.relativeScale+r.x,y:s.y*r.relativeScale+r.y,relativeScale:o,absoluteScale:r.absoluteScale*o}}function Rs(t){return!!t&&(t instanceof on&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(es.shadowRoot(t)))}function Ts(t,e){const i=null==t?void 0:t[e[0]];return i?1===e.length?i:Ts(i.cssRules,e.slice(1)):null}function Os(t){const e=[...t];return{positions:e,index:e.pop()}}function Ds(t){const e=new Set,i=[];for(let n=t.length;n--;){const s=t[n];e.has(s.id)||(i.push(s),e.add(s.id))}return i}/[1-9][0-9]{12}/.test(Date.now().toString())||(ds=()=>(new Date).getTime());var Ns=class{constructor(){ns(this,"id",1),ns(this,"styleIDMap",new WeakMap),ns(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Ls(t){var e;let i=null;return"getRootNode"in t&&(null===(e=es.getRootNode(t))||void 0===e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&es.host(es.getRootNode(t))&&(i=es.host(es.getRootNode(t))),i}function _s(t){let e,i=t;for(;e=Ls(i);)i=e;return i}function Fs(t){const e=t.ownerDocument;if(!e)return!1;const i=_s(t);return es.contains(e,i)}function Ps(t){const e=t.ownerDocument;if(!e)return!1;if(es.contains(e,t))return!0;const i=es.isConnected(t);return"boolean"==typeof i?i:Fs(t)}var Bs=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}({}),js="rrweb/fullscreen",Us=function(t){return t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t}({}),Ws=function(t){return t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t}({}),$s=function(t){return t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t}({}),Hs=function(t){return t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t}({}),Gs=function(t){return t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t}({}),zs=function(t){return t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t}({}),Vs=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}({});function Ys(t){return"__ln"in t}var qs,Zs=class{constructor(){ns(this,"length",0),ns(this,"head",null),ns(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let i=0;t>i;i++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Ys(t.previousSibling)){const i=t.previousSibling.__ln.next;e.next=i,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,i&&(i.previous=e)}else if(t.nextSibling&&Ys(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Xs=(t,e)=>`${t}@${e}`,Js=class{constructor(){ns(this,"frozen",!1),ns(this,"locked",!1),ns(this,"texts",[]),ns(this,"attributes",[]),ns(this,"attributeMap",new WeakMap),ns(this,"generatedAttributes",new WeakMap),ns(this,"removes",[]),ns(this,"mapRemoves",new Set),ns(this,"movedMap",{}),ns(this,"addedSet",new Set),ns(this,"movedSet",new Set),ns(this,"droppedSet",new Set),ns(this,"removesSubTreeCache",new Set),ns(this,"mutationCb",void 0),ns(this,"blockClass",void 0),ns(this,"blockSelector",void 0),ns(this,"maskTextClass",void 0),ns(this,"maskTextSelector",void 0),ns(this,"inlineStylesheet",void 0),ns(this,"maskInputOptions",void 0),ns(this,"maskTextFn",void 0),ns(this,"maskInputFn",void 0),ns(this,"maskAllElementAttributes",void 0),ns(this,"maskAttributeFn",void 0),ns(this,"keepIframeSrcFn",void 0),ns(this,"recordCanvas",void 0),ns(this,"canvasMaskingConfigured",void 0),ns(this,"inlineImages",void 0),ns(this,"slimDOMOptions",void 0),ns(this,"dataURLOptions",void 0),ns(this,"doc",void 0),ns(this,"mirror",void 0),ns(this,"iframeManager",void 0),ns(this,"stylesheetManager",void 0),ns(this,"shadowDomManager",void 0),ns(this,"canvasManager",void 0),ns(this,"processedNodeManager",void 0),ns(this,"unattachedDoc",void 0),ns(this,"canvasManagerReleased",!1),ns(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),ns(this,"emit",()=>{if(this.frozen||this.locked)return;const t=M(),e=I();try{this.processBufferedMutations()}finally{i=M()-t,n=e,O>0||T(i,null!=n?n:x)||i>U.slowestBatchMs&&(U.slowestBatchMs=i)}var i,n}),ns(this,"processBufferedMutations",()=>{const t=[],e=new Set,i=new Zs,n=t=>{let e=t,i=-2;for(;-2===i;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i};let s;const r=r=>{var o;const l=es.parentNode(r);if(!l||!Ps(r)||"TEXTAREA"===l.tagName)return;if(this.isBlockedAtEmission(l))return;const a=ot(l)?this.mirror.getId(Ls(r)):this.mirror.getId(l),h=n(r);if(-1===a||-1===h)return i.addNode(r);null!==(o=s)&&void 0!==o||(s={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,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{Es(t,this.mirror)&&this.iframeManager.addIframe(t),As(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Rs(t)&&!gs(t,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(es.shadowRoot(t),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});const u=ei(r,s);u&&(t.push({parentId:a,nextId:h,node:u}),e.add(u.id))};for(const t of this.mapRemoves)this.mapRemoves.delete(t),this.mirror.removeNodeFromMap(t);for(const t of this.movedSet)Ks(this.removesSubTreeCache,t)&&!this.movedSet.has(es.parentNode(t))||r(t);for(const t of this.addedSet)tr(this.droppedSet,t)||Ks(this.removesSubTreeCache,t)?tr(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let o=null;for(;i.length;){let t=null;if(o){const e=this.mirror.getId(es.parentNode(o.value)),i=n(o.value);-1!==e&&-1!==i&&(t=o)}if(!t){let e=i.tail;for(;e;){const i=e;if(e=e.previous,i){const e=this.mirror.getId(es.parentNode(i.value));if(-1===n(i.value))continue;if(-1!==e){t=i;break}{const e=es.parentNode(i.value);if(e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const n=es.host(e);if(-1!==this.mirror.getId(n)){t=i;break}}}}}}if(!t){for(;i.head;)i.removeNode(i.head.value);break}o=t.previous,i.removeNode(t.value),r(t.value)}const l={texts:this.texts.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{const e=t.node,i=es.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{const{attributes:e}=t;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof e.style){const i=JSON.stringify(t.styleDiff),n=JSON.stringify(t._unchangedStyles);e.style.length>i.length&&(i+n).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(const[n,s]of Object.entries(e))if("string"==typeof s||null===s){var i;e[n]=xt({element:t.node,name:n,value:s,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null===(i=this.generatedAttributes.get(t.node))||void 0===i?void 0:i.has(n)})}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},(l.texts.length||l.attributes.length||l.removes.length||l.adds.length)&&this.mutationCb(l)}),ns(this,"bufferBelongsToIframe",t=>this.doc===t.contentDocument),ns(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e));const i=Array.from(es.childNodes(t),t=>es.textContent(t)||"").join("");e.attributes.value=kt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:At(t),value:i,maskInputFn:this.maskInputFn})}),ns(this,"processMutation",t=>{if(!ws(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const e=es.textContent(t.target);gs(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:Ve(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ys(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{var e;const n=t.target,s=Ct(n.tagName),r=t.attributeName,o=null!==(e=t.attributeNamespace)&&void 0!==e?e:null;let l=function(t,e,i){if(!i)return e;const n=t.getAttributeNodeNS(i,e);if(n)return n.name;if("http://www.w3.org/1999/xlink"===i)return`xlink:${e}`;if("http://www.w3.org/XML/1998/namespace"===i)return`xml:${e}`;if("http://www.w3.org/2000/xmlns/"===i)return"xmlns"===e?e:`xmlns:${e}`;const s=t.lookupPrefix(i);return s?`${s}:${e}`:e}(n,r,o),a=o?n.getAttributeNS(o,r):t.target.getAttribute(r);if("value"===l){const t=n,e=At(t);a=kt({element:t,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:e,value:a,maskInputFn:this.maskInputFn})}if(gs(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;let h=this.attributeMap.get(t.target);const u="iframe"===s&&"src"===l;if(u&&!this.keepIframeSrcFn(a)&&n.contentDocument)return;if("type"===l&&"input"===s&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Ge(s,l)){var i;h||(h={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(h),this.attributeMap.set(t.target,h));const e=He(this.doc,s,Ct(l),a,n,this.dataURLOptions);if(u&&!this.keepIframeSrcFn(a)&&(l="rr_src"),h.attributes[l]=e,null===(i=this.generatedAttributes.get(t.target))||void 0===i||i.delete(l),"style"===l){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const e=this.unattachedDoc.createElement("span"),i=n.style;t.oldValue&&(e.style.cssText=t.oldValue);for(const t of Array.from(i)){const n=i.getPropertyValue(t),s=i.getPropertyPriority(t);n!==e.style.getPropertyValue(t)||s!==e.style.getPropertyPriority(t)?h.styleDiff[t]=""===s?n:[n,s]:h._unchangedStyles[t]=[n,s]}for(const t of Array.from(e.style))""===i.getPropertyValue(t)&&(h.styleDiff[t]=!1)}else if("open"===l&&"dialog"===s){h.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";let e=this.generatedAttributes.get(t.target);e||(e=new Set,this.generatedAttributes.set(t.target,e)),e.add("rr_open_mode")}}break}case"childList":if(gs(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const i=this.mirror.getId(e),n=ot(t.target)?this.mirror.getId(es.host(t.target)):this.mirror.getId(t.target);gs(t.target,this.blockClass,this.blockSelector,!1)||ws(e,this.mirror,this.slimDOMOptions)||!bs(e,this.mirror)||(this.addedSet.has(e)?(Qs(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===i||Ss(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Xs(i,n)]?Qs(this.movedSet,e):(this.removes.push({parentId:n,id:i,isShadow:!(!ot(t.target)||!at(t.target))||void 0}),function(t,e){const i=[t];for(;i.length;){const t=i.pop();e.has(t)||(e.add(t),es.childNodes(t).forEach(t=>i.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.add(e))})}}),ns(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)){if(this.addedSet.has(t))return this.addedSet.delete(t),void this.addedSet.add(t);if(!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(ws(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;e&&this.mirror.hasNode(e)&&(i=this.mirror.getId(e)),i&&-1!==i&&(this.movedMap[Xs(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);if(!gs(t,this.blockClass,this.blockSelector,!1)){if(t.nodeType===t.TEXT_NODE)return;const e=es.childNodes(t);for(let t=0,i=e.length;i>t;t++){const i=e[t];i&&this.genAdds(i)}if(Rs(t)){const e=es.childNodes(es.shadowRoot(t));for(let i=0,n=e.length;n>i;i++){const n=e[i];n&&(this.processedNodeManager.add(n,this),this.genAdds(n,t))}}}}}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]}),this.canvasManager.acquire()}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.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(const t of this.mapRemoves)this.mapRemoves.delete(t),this.mirror.removeNodeFromMap(t)}isBlockedAtEmission(t){const e=this.blockClass,i=e&&"string"!=typeof e&&(e.global||e.sticky)?new RegExp(e):null;for(;t;){if(i&&(i.lastIndex=0),gs(t,i||e,this.blockSelector,!0))return!0;const n="getRootNode"in t?es.getRootNode(t):null;t=(null==n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?es.host(n):null}return!1}};function Qs(t,e){const i=[e];for(;i.length;){const e=i.pop();if(t.delete(e),e.nodeType===e.TEXT_NODE)continue;const n=es.childNodes(e);for(let t=0,e=n.length;e>t;t++){const e=n[t];e&&i.push(e)}}}function Ks(t,e,i){return 0!==t.size&&function(t,e){const i=es.parentNode(e);return!!i&&t.has(i)}(t,e)}function tr(t,e){if(0===t.size)return!1;let i=es.parentNode(e);for(;i;){if(t.has(i))return!0;i=es.parentNode(i)}return!1}function er(t){qs=t}function ir(){qs=void 0}var nr=(t,e="rrweb")=>qs?(...i)=>{try{return t(...i)}catch(t){if(qs&&!0===qs(t,e))return;throw t}}:t,sr=[];function rr(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function or(t,e){const i=new Js;let n;i.init(t);try{n=new(Kn())(nr(i.processMutations.bind(i)));const s={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(s.attributeFilter=t.attributeFilter),n.observe(e,s),sr.push(i),{observer:n,buffer:i}}catch(t){try{null==n||n.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function lr({scrollCb:t,doc:e,mirror:i,blockClass:n,blockSelector:s,sampling:r}){const o=new Map,l=r=>{const l=rr(r);if(!l||gs(l,n,s,!0))return;const a=i.getId(l);let h,u;if(l===e&&e.defaultView){const t=ps(e.defaultView);h=t.left,u=t.top}else h=l.scrollLeft,u=l.scrollTop;const c=`${h},${u}`;o.get(a)!==c&&(o.set(a,c),t({id:a,x:h,y:u}))},a=[rs("scroll",nr(cs(nr(t=>l(t)),r.scroll||100)),e)];return"onscrollend"in e&&a.push(rs("scrollend",nr(l),e)),()=>a.forEach(t=>t())}function ar(t,e){for(let i=sr.length-1;i>=0;i--){const n=sr[i];if(!n)continue;let s=n.bufferBelongsToIframe(t);!s&&e&&e.has(n.bufferDoc())&&(s=!0),s&&(n.reset(),sr.splice(i,1))}}var hr=["INPUT","TEXTAREA","SELECT"],ur=new WeakMap;function cr(t){return function t(e,i){if(mr("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||mr("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||mr("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||mr("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);return i.unshift(n),t(e.parentRule,i)}if(e.parentStyleSheet){const t=Array.from(e.parentStyleSheet.cssRules).indexOf(e);i.unshift(t)}return i}(t,[])}function fr(t,e,i){let n,s;return t?(t.ownerNode?n=e.getId(t.ownerNode):s=i.getId(t),{styleId:s,id:n}):{}}function dr({mirror:t,stylesheetManager:e},i){var n,s;let r=null;r=t.getId("#document"===i.nodeName?i:es.host(i));const o="#document"===i.nodeName?null===(n=i.defaultView)||void 0===n?void 0:n.Document:null===(s=i.ownerDocument)||void 0===s||null===(s=s.defaultView)||void 0===s?void 0:s.ShadowRoot,l=(null==o?void 0:o.prototype)?Object.getOwnPropertyDescriptor(null==o?void 0:o.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&l?(Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var t;return null===(t=l.get)||void 0===t?void 0:t.call(this)},set(t){let i;try{var n;i=null===(n=l.set)||void 0===n?void 0:n.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(t){}return i}}),nr(()=>{Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function pr(t,e={}){const i=t.doc.defaultView;if(!i)return()=>{};let s,r;!function(t,e){const{mutationCb:i,mousemoveCb:n,mouseInteractionCb:s,scrollCb:r,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:h,styleDeclarationCb:u,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),i(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),n(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),s(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),r(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),o(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),l(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),a(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),h(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),c(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),f(...t)},t.selectionCb=(...t)=>{e.selection&&e.selection(...t),d(...t)},t.customElementCb=(...t)=>{e.customElement&&e.customElement(...t),p(...t)}}(t,e);const o=[],l=nr(()=>{try{if(r)try{r.destroy(),r.reset()}finally{const t=sr.indexOf(r);-1!==t&&sr.splice(t,1)}t.shadowDomManager.resetForDoc(t.doc),null==s||s.disconnect()}finally{as(o)}});try{if(t.recordDOM){const e=or(t,t.doc);s=e.observer,r=e.buffer}if(o.push(function({mousemoveCb:t,sampling:e,doc:i,mirror:n}){if(!1===e.mousemove)return()=>{};const s="number"==typeof e.mousemove?e.mousemove:50,r="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,l=[];const a=cs(nr(e=>{const i=Date.now()-o;t(l.map(t=>(t.timeOffset-=i,t)),e),l=[],o=null}),r),h=nr(cs(nr(t=>{const e=rr(t),{clientX:i,clientY:s}=ks(t)?t.changedTouches[0]:t;o||(o=ds()),l.push({x:i,y:s,id:n.getId(e),timeOffset:ds()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?Us.Drag:t instanceof MouseEvent?Us.MouseMove:Us.TouchMove)}),s,{trailing:!1})),u=[rs("mousemove",h,i),rs("touchmove",h,i),rs("drag",h,i)];return nr(()=>{u.forEach(t=>t())})}(t)),o.push(function({mouseInteractionCb:t,doc:e,mirror:i,blockClass:s,blockSelector:r,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const l=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let h=null;return Object.keys(Ws).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==l[t]).forEach(o=>{let l=Ct(o);const u=(e=>o=>{const l=rr(o);if(gs(l,s,r,!0))return;let a=null,u=e;if("pointerType"in o){switch(o.pointerType){case"mouse":a=$s.Mouse;break;case"touch":a=$s.Touch;break;case"pen":a=$s.Pen}a===$s.Touch&&(Ws[e]===Ws.MouseDown?u="TouchStart":Ws[e]===Ws.MouseUp&&(u="TouchEnd"))}else ks(o)&&(a=$s.Touch);null!==a?(h=a,(u.startsWith("Touch")&&a===$s.Touch||u.startsWith("Mouse")&&a===$s.Mouse)&&(a=null)):Ws[e]===Ws.Click&&(a=h,h=null);const c=ks(o)?o.changedTouches[0]:o;if(!c)return;const f=i.getId(l),{clientX:d,clientY:p}=c;nr(t)(n({type:Ws[u],id:f,x:d,y:p},null!==a&&{pointerType:a}))})(o);if(window.PointerEvent)switch(Ws[o]){case Ws.MouseDown:case Ws.MouseUp:l=l.replace("mouse","pointer");break;case Ws.TouchStart:case Ws.TouchEnd:return}a.push(rs(l,u,e))}),nr(()=>{a.forEach(t=>t())})}(t)),o.push(lr(t)),o.push(function({viewportResizeCb:t},{win:e}){let i=-1,n=-1;return rs("resize",nr(cs(nr(()=>{const e=ms(),s=vs();i===e&&n===s||(t({width:Number(s),height:Number(e)}),i=e,n=s)}),200)),e)}(t,{win:i})),o.push(function({inputCb:t,doc:e,mirror:i,blockClass:s,blockSelector:r,ignoreClass:o,ignoreSelector:l,maskInputOptions:a,maskInputFn:h,sampling:u,userTriggeredOnInput:c}){function f(t){let i=rr(t);const n=t.isTrusted,u=e.defaultView;if(i&&u&&!(i instanceof u.HTMLElement))return;const f=i&&i.tagName;if(i&&"OPTION"===f&&(i=es.parentElement(i)),!i||!f||0>hr.indexOf(f)||gs(i,s,r,!0))return;if(i.classList.contains(o)||l&&i.matches(l))return;let p=i.value,m=!1;const v=At(i)||"";"radio"===v||"checkbox"===v?m=i.checked:(a[f.toLowerCase()]||a[v])&&(p=kt({element:i,maskInputOptions:a,tagName:f,type:v,value:p,maskInputFn:h})),d(i,c?{text:p,isChecked:m,userTriggered:n}:{text:p,isChecked:m});const y=i.name;"radio"===v&&y&&m&&e.querySelectorAll(`input[type="radio"][name="${y}"]`).forEach(t=>{if(t!==i){const e=t.value;d(t,c?{text:e,isChecked:!m,userTriggered:!1}:{text:e,isChecked:!m})}})}function d(e,s){const r=ur.get(e);if(!r||r.text!==s.text||r.isChecked!==s.isChecked){ur.set(e,s);const r=i.getId(e);nr(t)(n(n({},s),{},{id:r}))}}const p=("last"===u.input?["change"]:["input","change"]).map(t=>rs(t,nr(f),e)),m=e.defaultView;if(!m)return()=>{p.forEach(t=>t())};const v=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return v&&v.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map(t=>fs(t[0],t[1],{set(){nr(f)({target:this,isTrusted:!1})}},!1,m))),nr(()=>{as(p)})}(t)),o.push(function({mediaInteractionCb:t,blockClass:e,blockSelector:i,mirror:n,sampling:s,doc:r}){const o=nr(r=>cs(nr(s=>{const o=rr(s);if(!o||gs(o,e,i,!0))return;const{currentTime:l,volume:a,muted:h,playbackRate:u,loop:c}=o;t({type:r,id:n.getId(o),currentTime:l,volume:a,muted:h,playbackRate:u,loop:c})}),s.media||500)),l=[rs("play",o(Gs.Play),r),rs("pause",o(Gs.Pause),r),rs("seeked",o(Gs.Seeked),r),rs("volumechange",o(Gs.VolumeChange),r),rs("ratechange",o(Gs.RateChange),r)];return nr(()=>{l.forEach(t=>t())})}(t)),t.recordDOM){const e=function(t){const e=new Map,i=new Set;let n=!0;const s=t=>{if(n)try{t()}catch(t){}},r=t=>{var i;const n=e.get(t);if(n){for(;null===(i=n[0])||void 0===i?void 0:i.ready;){const t=n.shift();(null==t?void 0:t.emit)&&s(t.emit)}0===n.length&&e.delete(t)}};return{queueMutation(t,i){if(!t)return void s(i);const n=e.get(t);n?(n.push({emit:i,ready:!0}),r(t)):s(i)},queuePendingMutation(o,l,a){if(!n)return()=>{};let h=e.get(o);h||(h=[],e.set(o,h));const u={emit:l,ready:!1};h.push(u);let c,f=!1,d=!1;const p=()=>{f||d||(f=!0,void 0!==c&&i.delete(c),u.ready=!0,u.emit=void 0,r(o))};try{c=t.setTimeout(p,5e3),f||d?t.clearTimeout(c):i.add(c)}catch(t){p()}return e=>{!d&&n&&(d=!0,void 0!==c&&(t.clearTimeout(c),i.delete(c)),f?e&&s(a):(u.ready=!0,e||(u.emit=void 0),r(o)))}},reset(){n=!1,i.forEach(e=>t.clearTimeout(e)),i.clear(),e.clear()}}}(i);o.push(e.reset),o.push(function({styleSheetRuleCb:t,mirror:e,stylesheetManager:i},{win:n,mutationQueue:s}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r);const{id:h,styleId:u}=fr(r,e,i.styleMirror);return(h&&-1!==h||u&&-1!==u)&&s.queueMutation(r,()=>t({id:h,styleId:u,adds:[{rule:l,index:a}]})),a},"host")}),n.CSSStyleSheet.prototype.addRule=function(t,e,i=this.cssRules.length){return n.CSSStyleSheet.prototype.insertRule.apply(this,[`${t} { ${e} }`,i])};const o=n.CSSStyleSheet.prototype.deleteRule;let l,a;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r);const{id:h,styleId:u}=fr(r,e,i.styleMirror);return(h&&-1!==h||u&&-1!==u)&&s.queueMutation(r,()=>t({id:h,styleId:u,removes:[{index:l}]})),a},"host")}),n.CSSStyleSheet.prototype.removeRule=function(t){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},n.CSSStyleSheet.prototype.replace&&(l=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);try{const n=null==a?void 0:a.then;if(r.ownerNode||!a||"function"!=typeof n)return a;i.onCssomSheetMutation(r);const{id:o,styleId:h}=fr(r,e,i.styleMirror);if(!(o&&-1!==o||h&&-1!==h))return a;const u=s.queuePendingMutation(r,()=>t({id:o,styleId:h,replace:l}),()=>{const e=ft(r);null!==e&&t({id:o,styleId:h,replace:e})});try{n.call(a,()=>u(!0),()=>u(!1))}catch(t){u(!1)}}catch(t){}return a},"host")})),n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r);const{id:h,styleId:u}=fr(r,e,i.styleMirror);return(h&&-1!==h||u&&-1!==u)&&s.queueMutation(r,()=>t({id:h,styleId:u,replaceSync:l})),a},"host")}));const h={};vr("CSSGroupingRule")?h.CSSGroupingRule=n.CSSGroupingRule:(vr("CSSMediaRule")&&(h.CSSMediaRule=n.CSSMediaRule),vr("CSSConditionRule")&&(h.CSSConditionRule=n.CSSConditionRule),vr("CSSSupportsRule")&&(h.CSSSupportsRule=n.CSSSupportsRule));const u={};return Object.entries(h).forEach(([n,r])=>{u[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(u[n].insertRule,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r.parentStyleSheet);const{id:h,styleId:u}=fr(r.parentStyleSheet,e,i.styleMirror);if(r.parentStyleSheet&&(h&&-1!==h||u&&-1!==u)){const e=[...cr(r),a];s.queueMutation(r.parentStyleSheet,()=>t({id:h,styleId:u,adds:[{rule:l,index:e}]}))}return a},"host")}),r.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r.parentStyleSheet);const{id:h,styleId:u}=fr(r.parentStyleSheet,e,i.styleMirror);if(r.parentStyleSheet&&(h&&-1!==h||u&&-1!==u)){const e=[...cr(r),l];s.queueMutation(r.parentStyleSheet,()=>t({id:h,styleId:u,removes:[{index:e}]}))}return a},"host")})}),nr(()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,l&&(n.CSSStyleSheet.prototype.replace=l),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(h).forEach(([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule})})}(t,{win:i,mutationQueue:e})),o.push(dr(t,t.doc)),o.push(function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:i,stylesheetManager:n},{win:s,mutationQueue:r}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nr((s,o,l)=>{var a;const[h,u,c]=l,f=s.apply(o,l);if(i.has(h))return f;const d=null===(a=o.parentRule)||void 0===a?void 0:a.parentStyleSheet;n.onCssomSheetMutation(d);const{id:p,styleId:m}=fr(d,e,n.styleMirror);if(p&&-1!==p||m&&-1!==m){const e=cr(o.parentRule);r.queueMutation(d,()=>t({id:p,styleId:m,set:{property:h,value:u,priority:c},index:e}))}return f},"host")});const l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:nr((s,o,l)=>{var a;const[h]=l,u=s.apply(o,l);if(i.has(h))return u;const c=null===(a=o.parentRule)||void 0===a?void 0:a.parentStyleSheet;n.onCssomSheetMutation(c);const{id:f,styleId:d}=fr(c,e,n.styleMirror);if(f&&-1!==f||d&&-1!==d){const e=cr(o.parentRule);r.queueMutation(c,()=>t({id:f,styleId:d,remove:{property:h},index:e}))}return u},"host")}),nr(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=l})}(t,{win:i,mutationQueue:e})),t.collectFonts&&o.push(function({fontCb:t,doc:e}){const i=e.defaultView;if(!i)return()=>{};const n=[],s=new WeakMap,r=i.FontFace;i.FontFace=function(t,e,i){const n=new r(t,e,i);return s.set(n,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),n};const o=ts(e.fonts,"add",function(e){return function(i){return setTimeout(nr(()=>{const e=s.get(i);e&&(t(e),s.delete(i))}),0),e.apply(this,[i])}});return n.push(()=>{i.FontFace=r}),n.push(o),nr(()=>{n.forEach(t=>t())})}(t))}o.push(function(t){const{doc:e,mirror:i,blockClass:n,blockSelector:s,selectionCb:r}=t;let o=!0;const l=nr(()=>{const t=e.getSelection();if(!t||o&&(null==t?void 0:t.isCollapsed))return;o=t.isCollapsed||!1;const l=[],a=t.rangeCount||0;for(let e=0;a>e;e++){const{startContainer:r,startOffset:o,endContainer:a,endOffset:h}=t.getRangeAt(e);gs(r,n,s,!0)||gs(a,n,s,!0)||l.push({start:i.getId(r),startOffset:o,end:i.getId(a),endOffset:h})}r({ranges:l})});return l(),rs("selectionchange",l)}(t)),o.push(function({doc:t,customElementCb:e}){const i=t.defaultView;return i&&i.customElements?ts(i.customElements,"define",function(t){return function(i,n,s){try{e({define:{name:i}})}catch(t){console.warn(`Custom element callback failed for ${i}`)}return t.apply(this,[i,n,s])}}):()=>{}}(t));for(const e of t.plugins)o.push(e.observer(e.callback,i,e.options))}catch(t){try{l()}catch(t){}throw t}return l}function mr(t){return void 0!==window[t]}function vr(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var yr=class{constructor(t){ns(this,"generateIdFn",void 0),ns(this,"iframeRemoteIdToLocalIdMap",new WeakMap),ns(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,n){if(0>e)return e;const s=i||this.getRemoteIdToLocalIdMap(t),r=n||this.getLocalIdToRemoteIdMap(t);let o=s.get(e);return void 0===o&&(o=this.generateIdFn(),s.set(e,o),r.set(o,e)),o}getIds(t,e){const i=this.getRemoteIdToLocalIdMap(t),n=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getId(t,e,i,n))}getRemoteId(t,e,i){var n;return"number"!=typeof e||0>e?e:null!==(n=(i||this.getLocalIdToRemoteIdMap(t)).get(e))&&void 0!==n?n:-1}getRemoteIds(t,e){const i=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getRemoteId(t,e,i))}reset(t){if(!t)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(t),this.iframeLocalIdToRemoteIdMap.delete(t)}getRemoteIdToLocalIdMap(t){let e=this.iframeRemoteIdToLocalIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToLocalIdMap.set(t,e)),e}getLocalIdToRemoteIdMap(t){let e=this.iframeLocalIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeLocalIdToRemoteIdMap.set(t,e)),e}},gr=class{constructor(t){ns(this,"iframes",new WeakMap),ns(this,"crossOriginIframeMap",new WeakMap),ns(this,"crossOriginIframeMirror",new yr(Fe)),ns(this,"crossOriginIframeStyleMirror",void 0),ns(this,"crossOriginIframeRootIdMap",new WeakMap),ns(this,"mirror",void 0),ns(this,"mutationCb",void 0),ns(this,"wrappedEmit",void 0),ns(this,"loadListener",void 0),ns(this,"pageHideListener",void 0),ns(this,"stylesheetManager",void 0),ns(this,"recordCrossOriginIframes",void 0),ns(this,"messageHandler",void 0),ns(this,"nestedIframeListeners",new Map),ns(this,"attachedWindows",new WeakMap),ns(this,"attachedDocuments",new WeakMap),ns(this,"attachedIframes",new Map),ns(this,"loadListenerDisposers",new WeakMap),ns(this,"iframeElementsById",new Map),ns(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new yr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){let i=this.loadListenerDisposers.get(t);i||(i=new Set,this.loadListenerDisposers.set(t,i)),i.add(e);const n=this.mirror.getId(t);-1!==n&&this.iframeElementsById.set(n,t)}getIframeElementById(t){var e,i,n;return null!==(e=null!==(i=null===(n=this.attachedIframes.get(t))||void 0===n?void 0:n.element)&&void 0!==i?i:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){const e=this.loadListenerDisposers.get(t);e&&(e.forEach(t=>ls(t)),this.loadListenerDisposers.delete(t))}removePageHideListener(t){const e=this.pageHideHandlers.get(t);e&&(e.forEach(({win:t,handler:e})=>{os(t,"pagehide",e)}),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){const i=this.mirror.getId(t);return this.attachedIframes.set(i,{element:t,content:e}),i}attachIframe(t,e){var i;const n=this.trackIframeContent(t,e);if(t.contentDocument){let e=this.attachedDocuments.get(t);e||(e=new Set,this.attachedDocuments.set(t,e)),e.add(t.contentDocument)}this.mutationCb({adds:[{parentId:n,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){const e=this.handleMessage.bind(this);ls(()=>{s.addEventListener("message",e),this.nestedIframeListeners.set(s,e);let i=this.attachedWindows.get(t);i||(i=new Set,this.attachedWindows.set(t,i)),i.add(s)})}ls(()=>{const e=t.contentWindow;if(!e)return;let i=this.pageHideHandlers.get(t);if(i)for(const t of i)if(t.win===e)return;const n=()=>{var e;null===(e=this.pageHideListener)||void 0===e||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument)};e.addEventListener("pagehide",n),i||(i=new Set,this.pageHideHandlers.set(t,i)),i.add({win:e,handler:n})}),null===(i=this.loadListener)||void 0===i||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const n=this.transformCrossOriginEvent(i,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Bs.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:Bs.IncrementalSnapshot,data:{source:Us.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Bs.Meta:case Bs.Load:case Bs.DomContentLoaded:return!1;case Bs.Plugin:return e;case Bs.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Bs.IncrementalSnapshot:switch(e.data.source){case Us.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(e.node,i)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Us.Drag:case Us.TouchMove:case Us.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Us.ViewportResize:return!1;case Us.MediaInteraction:case Us.MouseInteraction:case Us.Scroll:case Us.CanvasMutation:case Us.Input:return this.replaceIds(e.data,t,["id"]),e;case Us.StyleSheetRule:case Us.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Us.Font:return e;case Us.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case Us.AdoptedStyleSheet:var i;return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null===(i=e.data.styles)||void 0===i||i.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,i,n){for(const s of n)(Array.isArray(e[s])||"number"==typeof e[s])&&(e[s]=Array.isArray(e[s])?t.getIds(i,e[s]):t.getId(i,e[s]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Vs.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}removeIframeById(t){const e=this.attachedIframes.get(t),i=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),i){const t=i.contentWindow,e=this.attachedWindows.get(i);e&&(e.forEach(t=>{const e=this.nestedIframeListeners.get(t);e&&(os(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)}),this.attachedWindows.delete(i)),t&&this.nestedIframeListeners.has(t)&&(os(t,"message",this.nestedIframeListeners.get(t)),this.nestedIframeListeners.delete(t)),t&&this.crossOriginIframeMap.delete(t),this.iframes.delete(i),this.disposeLoadListeners(i),this.removePageHideListener(i);const n=this.attachedDocuments.get(i);n&&(n.forEach(t=>{ls(()=>this.mirror.removeNodeFromMap(t))}),ls(()=>ar(i,n)),this.attachedDocuments.delete(i))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0===this.attachedIframes.size)return;const t=[];this.attachedIframes.forEach((e,i)=>{this.mirror.has(i)||t.push(i)}),t.forEach(t=>this.removeIframeById(t))}reattachIframes(){this.attachedIframes.forEach(({content:t},e)=>{this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)})}destroy(){this.recordCrossOriginIframes&&os(window,"message",this.messageHandler),this.nestedIframeListeners.forEach((t,e)=>{os(e,"message",t)}),this.nestedIframeListeners.clear();const t=new Set;this.iframeElementsById.forEach(e=>t.add(e)),this.attachedIframes.forEach(({element:e})=>t.add(e)),t.forEach(t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)}),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}},br=class{constructor(t){ns(this,"shadowDoms",new WeakSet),ns(this,"mutationCb",void 0),ns(this,"scrollCb",void 0),ns(this,"bypassOptions",void 0),ns(this,"mirror",void 0),ns(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){var i,s;if(!at(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=null!==(i=null===(s=es.host(t))||void 0===s?void 0:s.ownerDocument)&&void 0!==i?i:e,{observer:o,buffer:l}=or(n(n({},this.bypassOptions),{},{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push({doc:r,handler(){o.disconnect(),l.destroy(),l.releaseCanvasManager();const t=sr.indexOf(l);-1!==t&&sr.splice(t,1)}}),this.restoreHandlers.push({doc:r,handler:lr(n(n({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(es.host(t))),this.restoreHandlers.push({doc:r,handler:dr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)})},0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const i=this;this.restoreHandlers.push({doc:e,handler:ts(t.prototype,"attachShadow",function(t){return function(n){const s=t.call(this,n),r=es.shadowRoot(this);return r&&Ps(this)&&i.addShadowRoot(r,e),s}})})}reset(){this.restoreHandlers.forEach(({handler:t})=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){const e=[];for(const i of this.restoreHandlers)if(i.doc===t)try{i.handler()}catch(t){}else e.push(i);this.restoreHandlers=e}},wr="skip-frame";function Sr(t){if("object"!=typeof t||null===t)return!1;const{x:e,y:i,width:n,height:s}=t;return Number.isFinite(e)&&Number.isFinite(i)&&Number.isFinite(n)&&Number.isFinite(s)&&n>=0&&s>=0}for(var kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Mr=0;64>Mr;Mr++)Cr[kr.charCodeAt(Mr)]=Mr;var xr=function(t){var e,i=new Uint8Array(t),n=i.length,s="";for(e=0;n>e;e+=3)s+=kr[i[e]>>2],s+=kr[(3&i[e])<<4|i[e+1]>>4],s+=kr[(15&i[e+1])<<2|i[e+2]>>6],s+=kr[63&i[e+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s},Er=new Map,Ar=(t,e,i)=>{if(!t||!Tr(t,e)&&"object"!=typeof t)return;const n=function(t,e){let i=Er.get(t);return i||(i=new Map,Er.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(i,t.constructor.name);let s=n.indexOf(t);return-1===s&&(s=n.length,n.push(t)),s};function Ir(t,e,i,n){if(t instanceof Array)return t.map(t=>Ir(t,e,i,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:xr(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Ir(t.buffer,e,i,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:i}=t;return{rr_type:e,src:i}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(n.type,n.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Ir(t.data,e,i,n),t.width,t.height]}:Tr(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ar(t,e,i)}:t}var Rr=(t,e,i,n)=>t.map(t=>Ir(t,e,i,n)),Tr=(t,e)=>{const i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(i.find(i=>t instanceof e[i]))},Or=["webgl","webgl2"];function Dr(t){return"nodeType"in t}function Nr(t,e,i,s){const r=[];try{if(s){const s=function(t,e,i){const s=t.GPUCanvasContext;if((null==s?void 0:s.prototype)&&"function"==typeof s.prototype.configure)return ts(s.prototype,"configure",function(s){return function(r){const o=function(t){const{canvas:e}=t;return e&&"object"==typeof e?e:null}(this);if(!o||Dr(o)&&gs(o,e,i,!0))return s.call(this,r);Dr(o)&&!("__context"in o)&&(o.__context="webgpu");const l=function(t){const e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return s.call(this,null!==l&&r?n(n({},r),{},{usage:"number"==typeof r.usage?r.usage|l:l}):r)}})}(t,e,i);s&&r.push(s)}const o=ts(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(n,...r){const o=function(t){return"experimental-webgl"===t?"webgl":t}(n);if(!gs(this,e,i,!0)&&("__context"in this||(this.__context=o),s&&Or.includes(o)))if(r[0]&&"object"==typeof r[0]){const t=r[0];t.preserveDrawingBuffer||(t.preserveDrawingBuffer=!0)}else r.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[n,...r])}});r.push(o)}catch(t){console.warn("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(t=>t())}}function Lr(t,e,i,n,s,r,o){const l=[],a=Object.getOwnPropertyNames(t);for(const h of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if("function"!=typeof t[h])continue;const a=ts(t,h,function(t){return function(...l){const a=t.apply(this,l);if(Ar(a,r,this),this.canvas&&"tagName"in this.canvas&&!gs(this.canvas,n,s,!0)){const t=Rr(l,r,this,o);i(this.canvas,{type:e,property:h,args:t})}return a}});l.push(a)}catch(r){const o=fs(t,h,{set(t){this.canvas&&"tagName"in this.canvas&&!gs(this.canvas,n,s,!0)&&i(this.canvas,{type:e,property:h,args:[t],setter:!0})}});l.push(o)}return l}var _r='(function() {\n\t//#region ../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/base64-arraybuffer/1.0.2/f63fa6b5c318cf1c9f6bdd1d4292ad2f15f76f2ec78475025a2d44070e896fe9/node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js\n\tvar chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n\tvar lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);\n\tfor (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;\n\tvar encode = function(arraybuffer) {\n\t\tvar bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";\n\t\tfor (i = 0; i < len; i += 3) {\n\t\t\tbase64 += chars[bytes[i] >> 2];\n\t\t\tbase64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n\t\t\tbase64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n\t\t\tbase64 += chars[bytes[i + 2] & 63];\n\t\t}\n\t\tif (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "=";\n\t\telse if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "==";\n\t\treturn base64;\n\t};\n\t//#endregion\n\t//#region src/record/workers/image-bitmap-data-url-worker.ts\n\tconst lastFingerprintMap = /* @__PURE__ */ new Map();\n\tconst transparentFingerprintMap = /* @__PURE__ */ new Map();\n\tconst lastSentAtMap = /* @__PURE__ */ new Map();\n\tconst PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n\tfunction hashPixels(data) {\n\t\tconst view = new Uint32Array(data.buffer, data.byteOffset, data.byteLength >>> 2);\n\t\tlet primaryHash = 2166136261;\n\t\tlet secondaryHash = 2654435769;\n\t\tfor (let i = 0; i < view.length; i++) {\n\t\t\tprimaryHash ^= view[i];\n\t\t\tprimaryHash = Math.imul(primaryHash, 16777619);\n\t\t\tsecondaryHash ^= view[i];\n\t\t\tsecondaryHash = Math.imul(secondaryHash, 2246822507);\n\t\t}\n\t\treturn `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n\t}\n\tfunction frameFingerprint(width, height, data) {\n\t\treturn `${width}x${height}:${hashPixels(data)}`;\n\t}\n\tfunction transparentFingerprint(width, height) {\n\t\tconst pixelCount = width * height;\n\t\tlet hash = transparentFingerprintMap.get(pixelCount);\n\t\tif (hash === void 0) {\n\t\t\thash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n\t\t\ttransparentFingerprintMap.set(pixelCount, hash);\n\t\t}\n\t\treturn `${width}x${height}:${hash}`;\n\t}\n\tconst worker = self;\n\tlet reusableCanvas = null;\n\tlet reusableCtx = null;\n\tworker.onmessage = async function(e) {\n\t\tif ("resetFrameDedup" in e.data) {\n\t\t\tlastFingerprintMap.clear();\n\t\t\treturn;\n\t\t}\n\t\tif ("OffscreenCanvas" in globalThis) {\n\t\t\tconst { id, bitmap, width, height, displayWidth, displayHeight, dataURLOptions, maskRegions } = e.data;\n\t\t\ttry {\n\t\t\t\tif (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n\t\t\t\t\treusableCanvas = new OffscreenCanvas(width, height);\n\t\t\t\t\treusableCtx = reusableCanvas.getContext("2d", { willReadFrequently: true });\n\t\t\t\t}\n\t\t\t\tconst ctx = reusableCtx;\n\t\t\t\tctx.clearRect(0, 0, width, height);\n\t\t\t\tctx.drawImage(bitmap, 0, 0);\n\t\t\t\tbitmap.close();\n\t\t\t\tif (maskRegions) {\n\t\t\t\t\tctx.fillStyle = "black";\n\t\t\t\t\tfor (const region of maskRegions) ctx.fillRect(region.x, region.y, region.width, region.height);\n\t\t\t\t}\n\t\t\t\tconst fingerprint = frameFingerprint(width, height, ctx.getImageData(0, 0, width, height).data);\n\t\t\t\tif (fingerprint === (lastFingerprintMap.get(id) ?? transparentFingerprint(width, height))) {\n\t\t\t\t\tconst lastSentAt = lastSentAtMap.get(id);\n\t\t\t\t\tif (!(maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS)) return worker.postMessage({ id });\n\t\t\t\t}\n\t\t\t\tconst blob = await reusableCanvas.convertToBlob(dataURLOptions);\n\t\t\t\tconst arrayBuffer = await blob.arrayBuffer();\n\t\t\t\tworker.postMessage({\n\t\t\t\t\tid,\n\t\t\t\t\ttype: blob.type,\n\t\t\t\t\tbase64: encode(arrayBuffer),\n\t\t\t\t\tdisplayWidth,\n\t\t\t\t\tdisplayHeight\n\t\t\t\t});\n\t\t\t\tlastFingerprintMap.set(id, fingerprint);\n\t\t\t\tlastSentAtMap.set(id, Date.now());\n\t\t\t} catch {\n\t\t\t\tworker.postMessage({ id });\n\t\t\t}\n\t\t} else {\n\t\t\te.data.bitmap.close();\n\t\t\treturn worker.postMessage({ id: e.data.id });\n\t\t}\n\t};\n\t//#endregion\n})();\n',Fr="undefined"!=typeof self&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",_r],{type:"text/javascript;charset=utf-8"});function Pr(t){let e;try{if(e=Fr&&(self.URL||self.webkitURL).createObjectURL(Fr),!e)throw"";const i=new Worker(e,{name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(_r),{name:null==t?void 0:t.name})}}var Br,jr,Ur,Wr=class{onFullSnapshot(){var t;null===(t=this.resetFrameDedup)||void 0===t||t.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){ns(this,"pendingCanvasMutations",new Map),ns(this,"rafStamps",{latestId:0,invokeId:null}),ns(this,"mirror",void 0),ns(this,"mutationCb",void 0),ns(this,"resetObservers",void 0),ns(this,"frozen",!1),ns(this,"locked",!1),ns(this,"rafIdTimestamp",null),ns(this,"rafIdFlush",null),ns(this,"refCount",0),ns(this,"torndown",!1),ns(this,"resetFrameDedup",null),ns(this,"processMutation",(t,e)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});const{sampling:e="all",win:i,blockClass:n,blockSelector:s,recordCanvas:r,dataURLOptions:o,resolutionScale:l,canvasMasking:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,r&&"all"===e&&this.initCanvasMutationObserver(i,n,s,o),r&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,n,s,{dataURLOptions:o,resolutionScale:l,canvasMasking:a})}initCanvasFPSObserver(t,e,i,n,s){var r=this;if(!("OffscreenCanvas"in e))return;const l="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,a=Nr(e,i,n,!0),h=new Map;let u;try{u=new Pr}catch(t){return}let c=!1;u.onerror=()=>{var t;c=!0,cancelAnimationFrame(d),null===(t=u.terminate)||void 0===t||t.call(u),this.resetFrameDedup=null},this.resetFrameDedup=()=>{u.postMessage({resetFrameDedup:!0})},u.onmessage=t=>{const{id:e}=t.data;if(h.set(e,!1),!("base64"in t.data))return;const{base64:i,type:n,displayWidth:s,displayHeight:r}=t.data;this.mutationCb({id:e,type:Hs["2D"],commands:[{property:"clearRect",args:[0,0,s,r]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:n}]},0,0,s,r]}],displayWidth:s,displayHeight:r})};const f=1e3/t;let d,p=0;const m=t=>{var a;c||(p&&f>t-p||(p=t,(()=>{const t=[],s=e=>{try{e.querySelectorAll("canvas").forEach(e=>{gs(e,i,n,!0)||t.push(e)}),e.querySelectorAll("*").forEach(t=>{t.shadowRoot&&s(t.shadowRoot)})}catch(t){}};return s(e.document),t})().forEach((a=o(function*(t){const e=r.mirror.getId(t);if(!h.get(e)&&0!==t.width&&0!==t.height){h.set(e,!0);try{if(["webgl","webgl2"].includes(t.__context)){var i,n;const s=t.getContext(t.__context);if(null==s||null===(i=s.isContextLost)||void 0===i?void 0:i.call(s))return void h.set(e,!1);!1===(null==s||null===(n=s.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}const r=t.clientWidth||t.width,o=t.clientHeight||t.height,a=Math.max(1,Math.round(r*l)),c=Math.max(1,Math.round(o*l)),f=function(t,e,i,n,s,r){if(!t||"function"!=typeof t.regionsFn)return;let o;try{o=t.regionsFn(e)}catch(t){return wr}if(void 0===o)return;if(!Array.isArray(o)||!o.every(Sr))return wr;const l=i/s,a=n/r;return o.filter(t=>t.width>0&&t.height>0).map(t=>{const e=Math.floor(t.x*l),i=Math.floor(t.y*a);return{x:e,y:i,width:Math.ceil((t.x+t.width)*l)-e,height:Math.ceil((t.y+t.height)*a)-i}})}(s.canvasMasking,t,a,c,r,o);if("skip-frame"===f)return void h.set(e,!1);const d=yield createImageBitmap(t,1>l?{resizeWidth:a,resizeHeight:c,resizeQuality:"medium"}:{resizeWidth:a,resizeHeight:c});u.postMessage({id:e,bitmap:d,width:a,height:c,displayWidth:r,displayHeight:o,dataURLOptions:s.dataURLOptions,maskRegions:f},[d])}catch(t){h.set(e,!1)}}}),function(t){return a.apply(this,arguments)}))),d=requestAnimationFrame(m))};d=requestAnimationFrame(m),this.resetObservers=()=>{var t;a(),cancelAnimationFrame(d),null===(t=u.terminate)||void 0===t||t.call(u),this.resetFrameDedup=null}}initCanvasMutationObserver(t,e,i,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Nr(t,e,i,!1),r=function(t,e,i,n,s){const r=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const l of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[l])continue;const o=ts(e.CanvasRenderingContext2D.prototype,l,function(r){return function(...o){return gs(this.canvas,i,n,!0)||setTimeout(()=>{const i=Rr(o,e,this,s);t(this.canvas,{type:Hs["2D"],property:l,args:i})},0),r.apply(this,o)}});r.push(o)}catch(s){const o=fs(e.CanvasRenderingContext2D.prototype,l,{set(e){gs(this.canvas,i,n,!0)||t(this.canvas,{type:Hs["2D"],property:l,args:[e],setter:!0})}});r.push(o)}return()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i,n),o=function(t,e,i,n,s){const r=[];return void 0!==e.WebGLRenderingContext&&r.push(...Lr(e.WebGLRenderingContext.prototype,Hs.WebGL,t,i,n,e,s)),void 0!==e.WebGL2RenderingContext&&r.push(...Lr(e.WebGL2RenderingContext.prototype,Hs.WebGL2,t,i,n,e,s)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i,n);this.resetObservers=()=>{s(),r(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||-1===e)return;const n=i.map(t=>s(t,h)),{type:r}=i[0];this.mutationCb({id:e,type:r,commands:n}),this.pendingCanvasMutations.delete(t)}},$r=class{constructor(t){var e;ns(this,"trackedLinkElements",new WeakSet),ns(this,"pendingDeferredSheets",new Set),ns(this,"mutationCb",void 0),ns(this,"adoptedStyleSheetCb",void 0),ns(this,"maskAllElementAttributes",void 0),ns(this,"maskAttributeFn",void 0),ns(this,"styleMirror",new Ns),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(e=t.maskAllElementAttributes)&&void 0!==e&&e,this.maskAttributeFn=t.maskAttributeFn}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}beginDeferredLinkInlining(t,e){if(-1===e||!t.isConnected)return null;let i=null,n=null;try{n=t.sheet,n&&(i=bt(n))}catch(t){}if(!i||!n)return Q(),null;const s=i;let r=!1;const o={sheet:n,invalidate(){r=!0}};this.pendingDeferredSheets.add(o);let l=!1;return{advance:i=>{if(l)return!0;const a=M(),h=I();let u=!0;try{if(r)return l=!0,Q(),!0;if(!s.advance(i))return u=!1,!1;l=!0;const o=s.text();if(!t.isConnected)return!0;let a=null;try{a=t.sheet}catch(t){}return a!==n?(Q(),!0):o?(this.emitCssTextMutation(t,e,o),!0):(Q(),!0)}finally{u&&this.pendingDeferredSheets.delete(o),T(c=M()-a,null!=(f=h)?f:x)||(W.totalMs+=c,c>W.slowestSliceMs&&(W.slowestSliceMs=c))}var c,f},remainingRules:()=>s.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(const e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var i;null===(i=this.beginDeferredLinkInlining(t,e))||void 0===i||i.advance(1/0)}emitCssTextMutation(t,e,i){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:xt({element:t,name:"_cssText",value:i,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const i={id:e,styleIds:[]},n=[];for(const e of t){let t;if(this.styleMirror.has(e))t=this.styleMirror.getId(e);else{const i=this.styleMirror.add(e);t=i;const s=M();try{q(()=>{try{const t=e.rules||e.cssRules;t&&Y(t)}catch(t){}n.push({styleId:i,rules:Array.from(e.rules||CSSRule,(t,i)=>({rule:dt(t,e.href),index:i}))})})}finally{Z(M()-s)}}i.styleIds.push(t)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),qe.forEach(t=>t.abort()),qe.clear()}trackStylesheetInLinkElement(t){}},Hr=class{constructor(){ns(this,"nodeMap",new WeakMap),ns(this,"active",!1)}inOtherBuffer(t,e){const i=this.nodeMap.get(t);return i&&Array.from(i).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}},Gr=!1;try{if(2!==Array.from([1],t=>2*t)[0]){var zr;const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null===(zr=t.contentWindow)||void 0===zr?void 0:zr.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}var Vr=St(),Yr=new Set([Us.Mutation,Us.MediaInteraction,Us.StyleSheetRule,Us.CanvasMutation,Us.Font,Us.Log,Us.StyleDeclaration,Us.AdoptedStyleSheet]);function qr(t){const e=window;if("function"==typeof e.requestIdleCallback){const i=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null===(t=e.cancelIdleCallback)||void 0===t?void 0:t.call(e,i)}}}const i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function Zr(t={}){let e;const{emit:i,checkoutEveryNms:s,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:l=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:f=!0,inlineStylesheetBudgetRules:d,maskAllInputs:p,maskInputOptions:m,slimDOMOptions:v,maskInputFn:y,maskTextFn:g,maskAllElementAttributes:b=!1,maskAttributeFn:w,hooks:S,packFn:k,sampling:C={},dataURLOptions:M={},canvasResolutionScale:x,canvasMasking:E,mousemoveWait:I,recordDOM:R=!0,recordCanvas:T=!1,recordCrossOriginIframes:O=!1,recordAfter:D=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:N=!1,collectFonts:L=!1,inlineImages:_=!1,plugins:F,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:B=new Set([]),attributeFilter:j,errorHandler:U}=t;er(U);const W=n({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},M),z=!O||window.parent===window;let V=!1;if(!z)try{window.parent.document&&(V=!1)}catch(t){V=!0}if(z&&!i)throw new Error("emit function is required");if(!z&&!V)return()=>{};void 0!==I&&void 0===C.mousemove&&(C.mousemove=I),Vr.reset();const Y=!0===p?{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}:void 0!==m?m:{password:!0},q=ii(void 0!==v&&v);let Z;Cs();let X=0;const Q=new Map;let tt,et;const it=t=>{for(const e of F||[])e.eventProcessor&&(t=e.eventProcessor(t));return k&&!V&&(t=k(t)),t};Br=(t,e)=>{var n;const o=t;if(o.timestamp=ds(),!(null===(n=sr[0])||void 0===n?void 0:n.isFrozen())||o.type===Bs.FullSnapshot||o.type===Bs.IncrementalSnapshot&&Yr.has(o.data.source)||sr.forEach(t=>t.unfreeze()),z)null==i||i(it(o),e);else if(V){const t={type:"rrweb",event:it(o),origin:window.location.origin,isCheckout:e};window.parent.postMessage(t,"*")}if(o.type===Bs.FullSnapshot)Z=o,X=0;else if(o.type===Bs.IncrementalSnapshot){if(o.data.source===Us.Mutation&&o.data.isAttachIframe)return;X++,(r&&X>=r||s&&o.timestamp-Z.timestamp>s)&&jr(!0)}};const nt=t=>{if(t.removes&&t.removes.length>0){const e=t.adds.length>0?new Set(t.adds.map(t=>t.node.id)):null,i=new Set;if(t.adds.length>0)for(const e of t.adds){const t=Vr.getNode(e.node.id);t&&"IFRAME"===t.nodeName&&i.add(t)}t.removes.forEach(({id:t})=>{if(e&&e.has(t))return;const n=lt.getIframeElementById(t);n&&i.has(n)?lt.forgetIframeId(t):(null==tt||tt(t),lt.removeIframeById(t))}),null==et||et(),lt.cleanupDetachedIframes()}Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Mutation},t)})},st=t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Scroll},t)}),rt=t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.CanvasMutation},t)}),ot=new $r({mutationCb:nt,adoptedStyleSheetCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.AdoptedStyleSheet},t)}),maskAllElementAttributes:b,maskAttributeFn:w}),lt=new gr({mirror:Vr,mutationCb:nt,stylesheetManager:ot,recordCrossOriginIframes:O,wrappedEmit:Br});for(const t of F||[])t.getMirror&&t.getMirror({nodeMirror:Vr,crossOriginIframeMirror:lt.crossOriginIframeMirror,crossOriginIframeStyleMirror:lt.crossOriginIframeStyleMirror});const at=new Hr,ht=null==E?void 0:E.configured;Ur=new Wr({recordCanvas:T,mutationCb:rt,win:window,blockClass:o,blockSelector:l,mirror:Vr,sampling:C.canvas,dataURLOptions:W,resolutionScale:x,canvasMasking:E});const ut=new br({mutationCb:nt,scrollCb:st,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:u,maskTextSelector:c,inlineStylesheet:f,maskInputOptions:Y,dataURLOptions:W,maskTextFn:g,maskInputFn:y,maskAllElementAttributes:b,maskAttributeFn:w,recordCanvas:T,canvasMaskingConfigured:ht,inlineImages:_,sampling:C,slimDOMOptions:q,iframeManager:lt,stylesheetManager:ot,canvasManager:Ur,keepIframeSrcFn:P,processedNodeManager:at,attributeFilter:j},mirror:Vr});jr=(t=!1)=>{if(R){H(d);try{Br({type:Bs.Meta,data:{href:window.location.href,width:vs(),height:ms()}},t),null==e||e.cancel(),e=void 0,ot.reset(),ut.init(),sr.forEach(t=>t.lock());let i=null,n=[];try{i=function(t,e){const{mirror:i=new wt,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:r="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:h=!1,canvasMaskingConfigured:u,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,maskAllElementAttributes:p=!1,maskAttributeFn:m,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:x=()=>!1,maxDepth:E,inlineStylesheetBudgetRules:A}=e||{},I=!0===c?{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}:!1===c?{password:!0}:c,R=ii(v);H(A);try{return ei(t,{doc:t,mirror:i,blockClass:n,blockSelector:s,maskTextClass:r,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:R,dataURLOptions:y,inlineImages:a,recordCanvas:h,canvasMaskingConfigured:u,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:x,newlyAddedElement:!1,maxDepth:E})}finally{G()}}(document,{mirror:Vr,blockClass:o,blockSelector:l,maskTextClass:u,maskTextSelector:c,inlineStylesheet:f,maskAllInputs:Y,inlineStylesheetBudgetRules:d,maskTextFn:g,maskInputFn:y,maskAllElementAttributes:b,maskAttributeFn:w,slimDOM:q,dataURLOptions:W,recordCanvas:T,canvasMaskingConfigured:ht,inlineImages:_,onSerialize(t){Es(t,Vr)&<.addIframe(t),As(t,Vr)&&ot.trackLinkElement(t),Rs(t)&&ut.addShadowRoot(es.shadowRoot(t),document)},onIframeLoad(t,e){lt.attachIframe(t,e),ut.observeAttachShadow(t)},onIframeListenerRegistered(t,e){lt.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){ot.attachLinkElement(t,e)},keepIframeSrcFn:P})}finally{n=J()}if(!i)return console.warn("Failed to snapshot the document");if(Br({type:Bs.FullSnapshot,data:{node:i,initialOffset:ps(window)}},t),sr.forEach(t=>t.unlock()),Ur.onFullSnapshot(),n.length){const t=function(t,e,i){let n=!1,s=null,r=0,o=null;const l=()=>null!==o||t.length>r,a=()=>{const i=t[r];t[r]=null,r+=1,i&&ls(()=>{o=e.beginDeferredLinkInlining(i,Vr.getId(i))})},h=()=>{if(!o)return;const t=o;let e=!0;ls(()=>{e=t.advance(200)}),e&&(o=null)},u=()=>{o||a(),h()},c=t=>{if(s=null,n)return;let e=0;do{try{u()}catch(t){null==o||o.discard(),o=null,K(1)}e+=1}while(!n&&l()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));n||(l()?s=qr(c):i())};return s=qr(c),{cancel(){n=!0,null==o||o.discard(),o=null,null==s||s.cancel(),s=null},flush(){if(n)return;n=!0,null==s||s.cancel(),s=null;let e=0,u=0;for(;l()&&50>e;){o||a();const t=o;if(t)if(Math.floor(t.remainingRules()/200)+1>50-e)t.discard(),o=null,u+=1;else{try{h()}catch(t){null==o||o.discard(),o=null,u+=1}e+=1}}if(l()||u>0){let e=u+(null!==o?1:0);for(let i=r;t.length>i;i++)null!==t[i]&&(e+=1);K(e),null==o||o.discard(),o=null}i()}}}(n,ot,()=>{e===t&&(e=void 0)});e=t}O&<.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ot.adoptStyleSheets(document.adoptedStyleSheets,Vr.getId(document))}finally{G()}}};try{const t=[];t.push(rs("pagehide",()=>{try{null==e||e.flush()}catch(t){}e=void 0},window));for(const e of["visibilitychange","freeze","resume"])t.push(rs(e,A,document));tt=e=>{const i=Q.get(e);i&&(i.forEach(e=>{ls(e);const i=t.indexOf(e);-1!==i&&t.splice(i,1)}),Q.delete(e))},et=()=>{for(const[t]of Q){const e=Vr.getNode(t);if(e)try{e.contentDocument&&e.contentDocument.defaultView||null==tt||tt(t)}catch(e){null==tt||tt(t)}else null==tt||tt(t)}};const i=t=>{var e;return nr(pr)({mutationCb:nt,mousemoveCb:(t,e)=>Br({type:Bs.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.MouseInteraction},t)}),scrollCb:st,viewportResizeCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.ViewportResize},t)}),inputCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Input},t)}),mediaInteractionCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.MediaInteraction},t)}),styleSheetRuleCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.StyleSheetRule},t)}),styleDeclarationCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.StyleDeclaration},t)}),canvasMutationCb:rt,fontCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Font},t)}),selectionCb(t){Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Selection},t)})},customElementCb(t){Br({type:Bs.IncrementalSnapshot,data:n({source:Us.CustomElement},t)})},blockClass:o,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:c,maskInputOptions:Y,inlineStylesheet:f,sampling:C,recordDOM:R,recordCanvas:T,canvasMaskingConfigured:ht,inlineImages:_,userTriggeredOnInput:N,collectFonts:L,doc:t,maskInputFn:y,maskTextFn:g,maskAllElementAttributes:b,maskAttributeFn:w,keepIframeSrcFn:P,blockSelector:l,slimDOMOptions:q,dataURLOptions:W,mirror:Vr,iframeManager:lt,stylesheetManager:ot,shadowDomManager:ut,processedNodeManager:at,canvasManager:Ur,ignoreCSSAttributes:B,attributeFilter:j,plugins:(null==F||null===(e=F.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>Br({type:Bs.Plugin,data:{plugin:t.name,payload:e}})})))||[]},S)};lt.addLoadListener(e=>{try{const n=Vr.getId(e),s=i(e.contentDocument);if("function"==typeof s&&(t.push(s),-1!==n)){let t=Q.get(n);t||(t=new Set,Q.set(n,t)),t.add(s)}}catch(t){console.warn(t)}}),lt.addPageHideListener(t=>{const e=Vr.getId(t);null==tt||tt(e),ar(t)});let s=-1;const r=t=>Br({type:Bs.Custom,data:{tag:js,payload:t}}),d=()=>{var t,e,i,n;const o=document,l=null!==(t=null!==(e=null!==(i=null!==(n=o.fullscreenElement)&&void 0!==n?n:o.webkitFullscreenElement)&&void 0!==i?i:o.mozFullScreenElement)&&void 0!==e?e:o.msFullscreenElement)&&void 0!==t?t:null,a=l?Vr.getId(l):-1;a!==s&&(-1!==s&&r({id:s,enter:!1}),s=a,-1!==a&&r({id:a,enter:!0}))},p=()=>{jr();const e=i(document);"function"==typeof e&&t.push(e),t.push(rs("fullscreenchange",d)),t.push(rs("webkitfullscreenchange",d)),t.push(rs("mozfullscreenchange",d)),t.push(rs("MSFullscreenChange",d)),Gr=!0};return["interactive","complete"].includes(document.readyState)?p():(t.push(rs("DOMContentLoaded",()=>{Br({type:Bs.DomContentLoaded,data:{}}),"DOMContentLoaded"===D&&p()})),t.push(rs("load",()=>{Br({type:Bs.Load,data:{}}),"load"===D&&p()},window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,as(t),at.destroy(),lt.removeLoadListener(),lt.destroy(),Q.clear(),ut.reset(),Vr.reset(),Gr=!1,ir()}}catch(t){console.warn(t)}}Zr.addCustomEvent=(t,e)=>{if(!Gr)throw new Error("please add custom event after start recording");Br({type:Bs.Custom,data:{tag:t,payload:e}})},Zr.freezePage=()=>{sr.forEach(t=>t.freeze())},Zr.takeFullSnapshot=t=>{if(!Gr)throw new Error("please take full snapshot after start recording");jr(t)},Zr.mirror=Vr;var Xr=c({default:()=>Jr});function Jr(t){return{all:t=t||new Map,on(e,i){var n=t.get(e);n?n.push(i):t.set(e,[i])},off(e,i){var n=t.get(e);n&&(i?n.splice(n.indexOf(i)>>>0,1):t.set(e,[]))},emit(e,i){var n=t.get(e);n&&n.slice().map(function(t){t(i)}),(n=t.get("*"))&&n.slice().map(function(t){t(e,i)})}}}function Qr(t=window,e=document){if("scrollBehavior"in e.documentElement.style&&!0!==t.__forceSmoothScrollPolyfill__)return;const i=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||l,scrollIntoView:i.prototype.scrollIntoView},s=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,r=(o=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(o)?1:0);var o;function l(t,e){this.scrollLeft=t,this.scrollTop=e}function a(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+r:"X"===e?t.scrollWidth>t.clientWidth+r:void 0}function u(e,i){const n=t.getComputedStyle(e,null)["overflow"+i];return"auto"===n||"scroll"===n}function c(t){const e=h(t,"Y")&&u(t,"Y"),i=h(t,"X")&&u(t,"X");return e||i}function f(e){let i,n,r,o=(s()-e.startTime)/468;o=o>1?1:o,i=.5*(1-Math.cos(Math.PI*o)),n=e.startX+(e.x-e.startX)*i,r=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,n,r),n===e.x&&r===e.y||t.requestAnimationFrame(f.bind(t,e))}function d(i,r,o){let a,h,u,c;const d=s();i===e.body?(a=t,h=t.scrollX||t.pageXOffset,u=t.scrollY||t.pageYOffset,c=n.scroll):(a=i,h=i.scrollLeft,u=i.scrollTop,c=l),f({scrollable:a,method:c,startTime:d,startX:h,startY:u,x:r,y:o})}t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?d.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(a(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):d.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0===arguments[0])return;if(!0===a(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");return void n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}const t=arguments[0].left,e=arguments[0].top;d.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0===a(arguments[0]))return void n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0]);const i=function(t){for(;t!==e.body&&!1===c(t);)t=t.parentNode||t.host;return t}(this),s=i.getBoundingClientRect(),r=this.getBoundingClientRect();i!==e.body?(d.call(this,i,i.scrollLeft+r.left-s.left,i.scrollTop+r.top-s.top),"fixed"!==t.getComputedStyle(i).position&&t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})):t.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}}var Kr,to=class{constructor(t=[],e){ns(this,"timeOffset",0),ns(this,"speed",void 0),ns(this,"actions",void 0),ns(this,"raf",null),ns(this,"lastTimestamp",void 0),ns(this,"onActionError",void 0),this.actions=t,this.speed=e.speed,this.onActionError=e.onActionError}addAction(t){const e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){const e=this.findActionIndex(t);this.actions.splice(e,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const t=this.actions[0];if(t.delay>this.timeOffset)break;this.actions.shift();try{t.doAction()}catch(t){var e;null===(e=this.onActionError)||void 0===e||e.call(this,t)}}null!==this.raf&&(this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this)))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){let e=0,i=this.actions.length-1;for(;i>=e;){const n=Math.floor((e+i)/2);if(t.delay>this.actions[n].delay)e=n+1;else{if(t.delay>=this.actions[n].delay)return n+1;i=n-1}}return e}};function eo(t){const e=null==t?void 0:t.timeOffset;return"number"!=typeof e||Number.isNaN(e)?void 0:e}function io(t){const e=t.positions;if(Array.isArray(e)&&e.length)return eo(e[0])}function no(t,e){if(t.type===Bs.IncrementalSnapshot&&t.data.source===Us.MouseMove){const i=io(t.data);if(void 0!==i){const n=t.timestamp+i;return t.delay=n-e,n-e}}return t.delay=t.timestamp-e,t.delay}function so(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,s,r=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o}!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(Kr||(Kr={}));var ro={type:"xstate.init"};function oo(t){return void 0===t?[]:[].concat(t)}function lo(t){return{type:"xstate.assign",assignment:t}}function ao(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function ho(t){return function(e){return t===e}}function uo(t){return"string"==typeof t?{type:t}:t}function co(t,e){return{value:t,context:e,actions:[],changed:!1,matches:ho(t)}}function fo(t,e,i){var n=e,s=!1;return[t.filter(function(t){if("xstate.assign"===t.type){s=!0;var e=Object.assign({},n);return"function"==typeof t.assignment?e=t.assignment(n,i):Object.keys(t.assignment).forEach(function(s){e[s]="function"==typeof t.assignment[s]?t.assignment[s](n,i):t.assignment[s]}),n=e,!1}return!0}),n,s]}function po(t,e){void 0===e&&(e={});var i=so(fo(oo(t.states[t.initial].entry).map(function(t){return ao(t,e.actions)}),t.context,ro),2),n={config:t,it:e,initialState:{value:t.initial,actions:i[0],context:i[1],matches:ho(t.initial)},transition(e,i){var s,r,o="string"==typeof e?{value:e,context:t.context}:e,l=o.value,a=o.context,h=uo(i),u=t.states[l];if(u.on){var c=oo(u.on[h.type]);try{for(var f=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:()=>(t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t})}}(c),d=f.next();!d.done;d=f.next()){var p=d.value;if(void 0===p)return co(l,a);var m="string"==typeof p?{target:p}:p,v=m.target,y=void 0===v?l:v,g=m.actions,b=void 0===g?[]:g,w=m.cond;if((void 0===w?function(){return!0}:w)(a,h)){var S=so(fo([].concat(u.exit,b,t.states[y].entry).filter(function(t){return t}).map(function(t){return ao(t,n.it.actions)}),a,h),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==l||k.length>0||S[2],matches:ho(y)}}}}catch(t){s={error:t}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(s)throw s.error}}}return co(l,a)}};return n}var mo=function(t,e){return t.actions.forEach(function(i){var n=i.exec;return n&&n(t.context,e)})};function vo(t){var e=t.initialState,i=Kr.NotStarted,n=new Set,s={u:t,send(s){i===Kr.Running&&(e=t.transition(e,s),mo(e,uo(s)),n.forEach(function(t){return t(e)}))},subscribe:t=>(n.add(t),t(e),{unsubscribe:()=>n.delete(t)}),start(n){if(n){var r="object"==typeof n?n:{context:t.config.context,value:n};e={value:r.value,actions:[],context:r.context,matches:ho(r.value)}}return i=Kr.Running,mo(e,ro),s},stop:()=>(i=Kr.Stopped,n.clear(),s),get state(){return e},get status(){return i}};return s}function yo(t,e){for(let i=t.length-1;i>=0;i--){const n=t[i];if(n.type===Bs.Meta&&e>=n.timestamp)return t.slice(i)}return t}var go=new Map;function bo(t,e){let i=go.get(t);return i||(i=new Map,go.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}function wo(t,e,i){return n=o(function*(n){if(n&&"object"==typeof n&&"rr_type"in n){if(i&&(i.isUnchanged=!1),"ImageBitmap"===n.rr_type&&"args"in n){const s=yield wo(t,e,i)(n.args);return yield createImageBitmap.apply(null,s)}if("index"in n){if(i||null===e)return n;const{rr_type:t,index:s}=n;return bo(e,t)[s]}if("args"in n){const{rr_type:s,args:r}=n;return new(0,window[s])(...yield Promise.all(r.map(wo(t,e,i))))}if("base64"in n)return function(t){var e,i,n,s,r,o=.75*t.length,l=t.length,a=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var h=new ArrayBuffer(o),u=new Uint8Array(h);for(e=0;l>e;e+=4)i=Cr[t.charCodeAt(e)],n=Cr[t.charCodeAt(e+1)],s=Cr[t.charCodeAt(e+2)],r=Cr[t.charCodeAt(e+3)],u[a++]=i<<2|n>>4,u[a++]=(15&n)<<4|s>>2,u[a++]=(3&s)<<6|63&r;return h}(n.base64);if("src"in n){const e=t.get(n.src);if(e)return e;{const e=new Image;return e.src=n.src,t.set(n.src,e),e}}if("data"in n&&"Blob"===n.rr_type){const s=yield Promise.all(n.data.map(wo(t,e,i)));return new Blob(s,{type:n.type})}}else if(Array.isArray(n))return yield Promise.all(n.map(wo(t,e,i)));return n}),function(t){return n.apply(this,arguments)};var n}var So=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function ko(t){return Co.apply(this,arguments)}function Co(){return Co=o(function*({mutation:t,target:e,type:i,imageMap:n,errorHandler:s}){try{const s=function(t,e){try{return e===Hs.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(e,i);if(!s)return;if(t.setter)return void(s[t.property]=t.args[0]);const r=s[t.property],o=yield Promise.all(t.args.map(wo(n,s)));!function(t,e){if(!(null==e?void 0:e.constructor))return;const{name:i}=e.constructor;if(!So.includes(i))return;const n=bo(t,i);n.includes(e)||n.push(e)}(s,r.apply(s,o))}catch(e){s(t,e)}}),Co.apply(this,arguments)}function Mo(){return Mo=o(function*({event:t,mutations:e,target:i,imageMap:n,errorHandler:s}){const r=i.getContext("2d");if(!r)return void s(e[0],new Error("Canvas context is null"));const l=e.map((a=o(function*(t){return Promise.all(t.args.map(wo(n,r)))}),function(t){return a.apply(this,arguments)}));var a;(yield Promise.all(l)).forEach((i,o)=>{const l=e[o];try{if(l.setter)return void(r[l.property]=l.args[0]);const e=r[l.property];"drawImage"===l.property&&"string"==typeof l.args[0]?(n.get(t),e.apply(r,l.args)):e.apply(r,i)}catch(t){s(l,t)}})}),Mo.apply(this,arguments)}function xo(t){return Eo.apply(this,arguments)}function Eo(){return Eo=o(function*({event:t,mutation:e,target:i,imageMap:n,canvasEventMap:s,errorHandler:r}){try{const o=s.get(t)||e,l="commands"in o?o.commands:[o];if([Hs.WebGL,Hs.WebGL2].includes(e.type)){for(let t=0;l.length>t;t++){const s=l[t];yield ko({mutation:s,type:e.type,target:i,imageMap:n,errorHandler:r})}return}yield function(t){return Mo.apply(this,arguments)}({event:t,mutations:l,target:i,imageMap:n,errorHandler:r})}catch(t){r(e,t)}}),Eo.apply(this,arguments)}var Ao=["AUDIO","VIDEO"],Io=class{constructor(t){ns(this,"mediaMap",new Map),ns(this,"warn",void 0),ns(this,"service",void 0),ns(this,"speedService",void 0),ns(this,"emitter",void 0),ns(this,"getCurrentTime",void 0),ns(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(zs.Start,this.start.bind(this)),this.emitter.on(zs.SkipStart,this.start.bind(this)),this.emitter.on(zs.Pause,this.pause.bind(this)),this.emitter.on(zs.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((e,i)=>{this.syncTargetWithState(i),t.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:e,mediaState:i}){if(i.isPlaying){const n=(t-i.lastInteractionTimeOffset)/1e3*i.playbackRate,s="duration"in e&&e.duration;if(Number.isNaN(s))return void this.waitForMetadata(e);let r=i.currentTimeAtLastInteraction+n;e.loop&&!1!==s&&(r%=s),e.currentTime=r}else e.pause(),e.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t))return;if(!("addEventListener"in t))return;const e=()=>{this.metadataCallbackMap.delete(t);const e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:e,mutation:i}){var n,s,r,o,l;const a=this.mediaMap.get(t),{type:h,playbackRate:u,currentTime:c,muted:f,volume:d,loop:p}=i;return{isPlaying:h===Gs.Play||h!==Gs.Pause&&((null==a?void 0:a.isPlaying)||null!==t.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(n=null!=c?c:null==a?void 0:a.currentTimeAtLastInteraction)&&void 0!==n?n:0,lastInteractionTimeOffset:e,playbackRate:null!==(s=null!=u?u:null==a?void 0:a.playbackRate)&&void 0!==s?s:1,volume:null!==(r=null!=d?d:null==a?void 0:a.volume)&&void 0!==r?r:1,muted:null!==(o=null!=f?f:null==a?void 0:a.muted)&&void 0!==o?o:null===t.getAttribute("muted"),loop:null!==(l=null!=p?p:null==a?void 0:a.loop)&&void 0!==l?l:null===t.getAttribute("loop")}}syncTargetWithState(t){const e=this.mediaMap.get(t);if(!e)return;const{muted:i,loop:n,volume:s,isPlaying:r}=e,o=this.service.state.matches("paused"),l=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==s&&(t.volume=s),t.muted=i,t.loop=n,t.playbackRate!==l&&(t.playbackRate=l),r&&!o?t.play():t.pause()}catch(t){this.warn(`Failed to replay media interactions: ${t.message||t}`)}}addMediaElements(t,e,i){if(!this.isSupportedMediaElement(t))return;const n=t,s=i.getMeta(n);if(!s||!("attributes"in s))return;const r=this.service.state.matches("paused"),o=s.attributes;let l=!1;l=o.rr_mediaState?"played"===o.rr_mediaState:null!==n.getAttribute("autoplay"),l&&r&&n.pause();let a=1;"number"==typeof o.rr_mediaPlaybackRate&&(a=o.rr_mediaPlaybackRate);let h=!1;h="boolean"==typeof o.rr_mediaMuted?o.rr_mediaMuted:null!==n.getAttribute("muted");let u=!1;u="boolean"==typeof o.rr_mediaLoop?o.rr_mediaLoop:null!==n.getAttribute("loop");let c=1;"number"==typeof o.rr_mediaVolume&&(c=o.rr_mediaVolume);let f=0;"number"==typeof o.rr_mediaCurrentTime&&(f=o.rr_mediaCurrentTime),this.mediaMap.set(n,{isPlaying:l,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:e,playbackRate:a,volume:c,muted:h,loop:u}),this.syncTargetWithState(n)}mediaMutation({target:t,timeOffset:e,mutation:i}){Ao.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:e,mutation:i})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Ao.includes(t.nodeName)}reset(){this.mediaMap.clear()}};function Ro(t,e){if("DIALOG"!==t.nodeName||t instanceof on)return;const i=t,n=i.open,s=n&&i.matches("dialog:modal"),r=i.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof i.getAttribute("open"),l="modal"===r;(!n||s&&"non-modal"===r||!s&&l)&&(i.isConnected?(n&&i.close(),o&&(l?i.showModal():i.show())):console.warn("dialog is not attached to the dom",i))}function To(t,e){if("DIALOG"!==t.nodeName||t instanceof on)return;const i=t;i.isConnected?null===e.attributes.open&&(i.removeAttribute("open"),i.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",i)}var Oo=Jr||Xr,Do="[replayer]",No={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Lo(t){return t.type==Bs.IncrementalSnapshot&&(t.data.source==Us.TouchMove||t.data.source==Us.MouseInteraction&&t.data.type==Ws.TouchStart)}var _o=class{get timer(){return this.service.state.context.timer}constructor(t,e){if(ns(this,"wrapper",void 0),ns(this,"iframe",void 0),ns(this,"service",void 0),ns(this,"speedService",void 0),ns(this,"config",void 0),ns(this,"usingVirtualDom",!1),ns(this,"virtualDom",new Rn),ns(this,"mouse",void 0),ns(this,"mouseTail",null),ns(this,"tailPositions",[]),ns(this,"emitter",Oo()),ns(this,"nextUserInteractionEvent",void 0),ns(this,"legacy_missingNodeRetryMap",{}),ns(this,"cache",Ae()),ns(this,"imageMap",new Map),ns(this,"canvasEventMap",new Map),ns(this,"mirror",St()),ns(this,"styleMirror",new Ns),ns(this,"pendingAdoptedStyleSheets",new Map),ns(this,"lastAdoptedStyleIds",new Map),ns(this,"adoptedStyleSheetTokens",new Map),ns(this,"mediaManager",void 0),ns(this,"firstFullSnapshot",null),ns(this,"newDocumentQueue",[]),ns(this,"mousePos",null),ns(this,"touchActive",null),ns(this,"lastMouseDownEvent",null),ns(this,"lastHoveredRootNode",void 0),ns(this,"lastSelectionData",null),ns(this,"lastScrollMap",new Map),ns(this,"constructedStyleMutations",[]),ns(this,"adoptedStyleSheets",[]),ns(this,"emitterHandlers",[]),ns(this,"serviceSubscription",void 0),ns(this,"speedServiceSubscription",void 0),ns(this,"timeouts",new Set),ns(this,"applyGeneration",0),ns(this,"seekRebuildInFlight",!1),ns(this,"seekNeedsFullRebuild",!1),ns(this,"styleSheetLoadListeners",new Map),ns(this,"handleResize",t=>{this.iframe.style.display="inherit";for(const e of[this.mouseTail,this.iframe])e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))}),ns(this,"shouldCastInSyncMode",t=>{switch(t.type){case Bs.DomContentLoaded:case Bs.Load:return!1;case Bs.Custom:return t.data.tag===js;default:return!0}}),ns(this,"applyEvents",(t,e)=>{var i;const n=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e;const{events:i,castEvent:n,yieldBudgetMs:s,schedule:r,isCancelled:o,onComplete:l}=t,a=null!==(e=t.now)&&void 0!==e?e:()=>performance.now();let h=0;const u=t=>{if(!t&&o())return;const e=(()=>{const t=s>0?a()+s:1/0;for(;i.length>h;){if(n(i[h]),h++,o())return!1;if(a()>=t)break}return h>=i.length})();o()||(e?l(t):r(()=>u(!1)))};u(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>{try{this.getCastFn(t,!0)()}catch(t){n===this.applyGeneration&&(this.seekNeedsFullRebuild=!0),this.warn("Exception in fast-forward event",t)}},yieldBudgetMs:null!==(i=this.config.seekYieldBudgetMs)&&void 0!==i?i:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>n!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(zs.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})}),ns(this,"getCastFn",(t,e=!1)=>{let i;switch(t.type){case Bs.DomContentLoaded:case Bs.Load:break;case Bs.Custom:i=()=>{e||this.emitter.emit(zs.CustomEvent,t),"rrweb/fullscreen"===t.data.tag&&this.applyFullscreen(t.data.payload)};break;case Bs.Meta:i=()=>this.emitter.emit(zs.Resize,{width:t.data.width,height:t.data.height});break;case Bs.FullSnapshot:i=()=>{var i;if(this.clearFullscreen(),this.firstFullSnapshot){if(this.firstFullSnapshot===t)return void(this.firstFullSnapshot=!0)}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.rebuildFullSnapshot(t,e),null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo(n(n({},t.data.initialOffset),{},{behavior:"instant"}))};break;case Bs.IncrementalSnapshot:i=()=>{if(this.applyIncremental(t,e),!e&&(t===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const e of this.service.state.context.events)if(e.timestamp>t.timestamp&&this.isUserInteraction(e)){e.delay-t.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=e);break}if(this.nextUserInteractionEvent){const e={speed:Math.min(Math.round((this.nextUserInteractionEvent.delay-t.delay)/5e3),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:e}),this.emitter.emit(zs.SkipStart,e)}}}}return()=>{i&&i();for(const i of this.config.plugins||[])i.handler&&i.handler(t,e,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:t}});const n=this.service.state.context.events.length-1;if(!this.config.liveMode&&t===this.service.state.context.events[n]){const e=this.applyGeneration,i=()=>{e===this.applyGeneration&&(this.seekRebuildInFlight?this.addTimeout(i,50):this.service.state.context.events.length-1>n||(this.backToNormal(),this.service.send("END"),this.emitter.emit(zs.Finish)))};let s=50;if(t.type===Bs.IncrementalSnapshot&&t.data.source===Us.MouseMove){const e=io(t.data);void 0!==e&&(s+=Math.max(0,-e))}setTimeout(i,s)}this.emitter.emit(zs.EventCast,t)}}),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");const i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:No,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};this.config=Object.assign({},i,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(zs.Resize,this.handleResize),this.setupDom();for(const t of this.config.plugins||[])t.getMirror&&t.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(zs.Flush,()=>{if(this.usingVirtualDom){const t={mirror:this.mirror,applyCanvas:(t,e,i)=>{xo({event:t,mutation:e,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===Us.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===Us.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(const i of this.config.plugins||[])i.onBuild&&i.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{Cn(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const e in this.legacy_missingNodeRetryMap)try{const i=this.legacy_missingNodeRetryMap[e],n=En(i.node,this.mirror,this.virtualDom.mirror);Cn(n,i.node,t,this.virtualDom.mirror),i.node=n}catch(t){this.warn(t)}this.constructedStyleMutations.forEach(t=>{this.applyStyleSheetMutation(t)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(t=>{this.applyAdoptedStyleSheet(t)}),this.adoptedStyleSheets=[],this.pendingAdoptedStyleSheets.forEach((t,e)=>{this.applyAdoptedStyleSheet({source:Us.AdoptedStyleSheet,id:e,styleIds:t})})}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[t,e]=this.lastMouseDownEvent;t.dispatchEvent(e)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach(t=>{this.applyScroll(t,!0)}),this.lastScrollMap.clear())}),this.addEmitterHandler(zs.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()});const s=new to([],{speed:this.config.speed,onActionError:t=>this.warn("Exception in timer action",t)});this.service=function(t,{getCastFn:e,applyEvents:i,emitter:s}){return vo(po({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},RESET_LAST_PLAYED:{target:"playing",actions:["resetLastPlayedEvent"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},RESET_LAST_PLAYED:{target:"paused",actions:["resetLastPlayedEvent"]},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:lo({lastPlayedEvent(t,e){return"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}}),recordTimeOffset:lo((t,e)=>{let i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),n(n({},t),{},{timeOffset:i,baselineTime:t.events[0].timestamp+i})}),play(t){const{timer:n,events:r,baselineTime:o,lastPlayedEvent:l}=t;n.clear(),n.timeOffset=0;for(const t of r)no(t,o);const a=yo(r,o),h=a.some(t=>t.type===Bs.FullSnapshot&&t.timestamp===o);let u=null==l?void 0:l.timestamp;if((null==l?void 0:l.type)===Bs.IncrementalSnapshot&&l.data.source===Us.MouseMove){const t=io(l.data);void 0!==t&&(u=l.timestamp+t)}(u||0)>o&&s.emit(zs.PlayBack);const c=new Array;for(const t of a)(!u||u>=o||t.timestamp>u&&t!==l)&&(o>t.timestamp||h&&t.timestamp===o&&(t.type===Bs.Meta||t.type===Bs.FullSnapshot))&&c.push(t);i(c,()=>{for(const i of yo(t.events,o)){if(o>i.timestamp||h&&i.timestamp===o&&(i.type===Bs.Meta||i.type===Bs.FullSnapshot))continue;if(u&&o>u&&i===l)continue;const t=e(i,!1);n.addAction({doAction(){t()},delay:i.delay})}n.start()})},pause(t){t.timer.clear()},resetLastPlayedEvent:lo(t=>n(n({},t),{},{lastPlayedEvent:null})),startLive:lo({baselineTime(t,e){return t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now()}}),addEvent:lo((t,i)=>{const{baselineTime:s,timer:r,events:o}=t;if("ADD_EVENT"===i.type){const{event:t}=i.payload;no(t,s);let n=o.length-1;if(o[n]&&o[n].timestamp>t.timestamp){let e=-1,i=0;for(;n>=i;){const e=Math.floor((i+n)/2);o[e].timestamp>t.timestamp?n=e-1:i=e+1}-1===e&&(e=i),o.splice(e,0,t)}else o.push(t);if(s>t.timestamp)i.payload.applyPastEventSynchronously&&e(t,!0)();else if(r.isActive()){const i=e(t,!1);r.addAction({doAction(){i()},delay:t.delay})}}return n(n({},t),{},{events:o})})}}))}({events:t.map(t=>e&&e.unpackFn?e.unpackFn(t):t).sort((t,e)=>t.timestamp-e.timestamp),timer:s,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe(t=>{this.emitter.emit(zs.StateChange,{player:t})}),this.speedService=vo(po({id:"speed",context:{normalSpeed:-1,timer: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,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:lo({normalSpeed:t=>t.timer.speed}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}})),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(t=>{this.emitter.emit(zs.StateChange,{speed:t})}),this.mediaManager=new Io({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const r=this.service.state.context.events.find(t=>t.type===Bs.Meta),o=this.service.state.context.events.find(t=>t.type===Bs.FullSnapshot);if(r){const{width:t,height:e}=r.data;this.addTimeout(()=>{this.emitter.emit(zs.Resize,{width:t,height:e})},0)}o&&this.addTimeout(()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),null===(t=this.iframe.contentWindow)||void 0===t||t.scrollTo(n(n({},o.data.initialOffset),{},{behavior:"instant"})))},1),this.service.state.context.events.find(Lo)&&this.mouse.classList.add("touch-device")}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){const i=setTimeout(()=>{this.timeouts.delete(i),t()},e);return this.timeouts.add(i),i}setConfig(t){Object.keys(t).forEach(e=>{this.config[e]=t[e]}),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?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(){const t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:e}=this.service.state.context;return t-e[0].timestamp}getMirror(){return this.mirror}play(t=0){var e;(this.seekRebuildInFlight||this.seekNeedsFullRebuild)&&(this.service.send({type:"RESET_LAST_PLAYED"}),this.seekNeedsFullRebuild=!1),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.remove("rrweb-paused"),this.emitter.emit(zs.Start)}pause(t){var e;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.add("rrweb-paused"),this.emitter.emit(zs.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(zs.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach(({event:t,handler:e})=>{this.emitter.off(t,e)}),this.emitterHandlers=[],null===(t=this.serviceSubscription)||void 0===t||t.unsubscribe(),null===(e=this.speedServiceSubscription)||void 0===e||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((t,e)=>{e.removeEventListener("load",t)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(zs.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(zs.Flush),this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("playing")&&this.service.send({type:"PAUSE"})),this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const e=this.config.unpackFn?this.config.unpackFn(t):t;Lo(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}}))}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=Ae()}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),!1!==this.config.mouseTail&&(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");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Qr(this.iframe.contentWindow,this.iframe.contentDocument),Cs(this.iframe.contentWindow))}applyFullscreen(t){const e=t;if(!e||"number"!=typeof e.id||"boolean"!=typeof e.enter)return;const i=this.mirror.getNode(e.id);if(!i||i.nodeType!==Node.ELEMENT_NODE)return;const n=i;e.enter?n.setAttribute("rr_fullscreen",""):n.removeAttribute("rr_fullscreen")}clearFullscreen(){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll("[rr_fullscreen]").forEach(t=>t.removeAttribute("rr_fullscreen"))}discardStaleFlushBuffers(){this.lastScrollMap.clear(),this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[]}rebuildFullSnapshot(t,e=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const i=[],n=new Set,s=(e,s)=>{if("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)){const{events:i}=this.service.state.context;this.mediaManager.addMediaElements(e,t.timestamp-i[0].timestamp,this.mirror)}for(const t of this.config.plugins||[])t.onBuild&&t.onBuild(e,{id:s,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){const{doc:i,onVisit:n,hackCss:s=!0,afterAppend:r,cache:o,mirror:l=new wt}=e,a=Oe(t,{doc:i,mirror:l,skipChild:!1,hackCss:s,afterAppend:r,cache:o});(function(t,e){function i(t){e(t)}for(const e of t.getIds())t.has(e)&&i(t.getNode(e))})(l,t=>{n&&n(t),function(t,e){const i=e.getMeta(t);if((null==i?void 0:i.type)!==f.Element)return;const n=t;for(const t in i.attributes){if(!{}.hasOwnProperty.call(i.attributes,t)||!t.startsWith("rr_"))continue;const e=i.attributes[t];"rr_scrollLeft"===t&&(n.scrollLeft=e),"rr_scrollTop"===t&&(n.scrollTop=e)}}(t,l)})}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:t,builtNode:e}of i)this.attachDocumentToIframe(t,e),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t);const{documentElement:r,head:o}=this.iframe.contentDocument;this.insertStyleRules(r,o),n.forEach(t=>Ro(t)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(zs.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){const i=(n=this.config.blockClass,[`.${n} { background: currentColor }`,"noscript { display: none !important; }","[rr_fullscreen] { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; max-width: none !important; max-height: none !important; z-index: 2147483647 !important; }"]).concat(this.config.insertStyleRules);var n;if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,$n(n,this.virtualDom.unserializedId)),t.insertBefore(n,e),n.rules.push({source:Us.StyleSheetRule,adds:i.map((t,e)=>({rule:t,index:e}))})}else{const n=document.createElement("style");t.insertBefore(n,e);for(let t=0;i.length>t;t++){var s;null===(s=n.sheet)||void 0===s||s.insertRule(i[t],t)}}}attachDocumentToIframe(t,e){const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,r=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);const o=i.getMeta(t);if((null==o?void 0:o.type)===Vs.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){const{documentElement:t,head:i}=e.contentDocument;this.insertStyleRules(t,i)}if(!this.usingVirtualDom)for(const e of this.config.plugins||[])e.onBuild&&e.onBuild(t,{id:r,replayer:this})};Oe(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:r,cache:this.cache}),r(e.contentDocument,t.node.id);for(const{mutationInQueue:t,builtNode:e}of n)this.attachDocumentToIframe(t,e),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t);s.forEach(t=>Ro(t))}collectIframeAndAttachDocument(t,e){if(Es(e,this.mirror)){const i=this.newDocumentQueue.find(t=>t.parentId===this.mirror.getId(e));i&&t.push({mutationInQueue:i,builtNode:e})}}waitForStylesheetLoad(){var t;const e=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(e){const t=new Set;let i,n=this.service.state;const s=()=>{n=this.service.state};this.emitter.on(zs.Start,s),this.emitter.on(zs.Pause,s);const r=()=>{this.emitter.off(zs.Start,s),this.emitter.off(zs.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{e.sheet||(t.add(e),e.addEventListener("load",()=>{t.delete(e),0===t.size&&-1!==i&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(zs.LoadStylesheetEnd),i&&clearTimeout(i),r())}))}),t.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(zs.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,r()},this.config.loadTimeout))}}preloadAllImages(){var t=this;return o(function*(){const e=[];for(const i of t.service.state.context.events)i.type===Bs.IncrementalSnapshot&&i.data.source===Us.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(i.data,i)),("commands"in i.data?i.data.commands:[i.data]).forEach(e=>{t.preloadImages(e,i)}));return Promise.all(e)})()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){const t=document.createElement("canvas"),e=t.getContext("2d"),i=null==e?void 0:e.createImageData(t.width,t.height);null==e||e.putImageData(i,0,0)}}deserializeAndPreloadCanvasEvents(t,e){var i=this;return o(function*(){if(!i.canvasEventMap.has(e)){const r={isUnchanged:!0};if("commands"in t){const l=yield Promise.all(t.commands.map((s=o(function*(t){const e=yield Promise.all(t.args.map(wo(i.imageMap,null,r)));return n(n({},t),{},{args:e})}),function(t){return s.apply(this,arguments)})));!1===r.isUnchanged&&i.canvasEventMap.set(e,n(n({},t),{},{commands:l}))}else{const s=yield Promise.all(t.args.map(wo(i.imageMap,null,r)));!1===r.isUnchanged&&i.canvasEventMap.set(e,n(n({},t),{},{args:s}))}}var s})()}applyIncremental(t,e){const{data:i}=t;if(this.iframe.contentDocument)switch(i.source){case Us.Mutation:try{this.applyMutation(i,e)}catch(t){this.warn(`Exception in mutation ${t.message||t}`,i)}break;case Us.Drag:case Us.TouchMove:case Us.MouseMove:if(!Array.isArray(i.positions)||!i.positions.length)break;if(e){const t=i.positions[i.positions.length-1];this.mousePos={x:t.x,y:t.y,id:t.id,debugData:i}}else{var n;i.positions.forEach(n=>{const s=eo(n);void 0!==s&&this.timer.addAction({doAction:()=>{this.moveAndHover(n.x,n.y,n.id,e,i)},delay:s+t.timestamp-this.service.state.context.baselineTime})}),this.timer.addAction({doAction(){},delay:t.delay-(null!==(n=io(i))&&void 0!==n?n:0)})}break;case Us.MouseInteraction:{if(-1===i.id)break;const t=new Event(Ct(Ws[i.type])),n=this.mirror.getNode(i.id);if(!n)return this.debugNodeNotFound(i,i.id);this.emitter.emit(zs.MouseInteraction,{type:i.type,target:n});const{triggerFocus:s}=this.config;switch(i.type){case Ws.Blur:"blur"in n&&n.blur();break;case Ws.Focus:s&&n.focus&&n.focus({preventScroll:!0});break;case Ws.Click:case Ws.TouchStart:case Ws.TouchEnd:case Ws.MouseDown:case Ws.MouseUp:e?(i.type===Ws.TouchStart?this.touchActive=!0:i.type===Ws.TouchEnd&&(this.touchActive=!1),i.type===Ws.MouseDown?this.lastMouseDownEvent=[n,t]:i.type===Ws.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:i.x||0,y:i.y||0,id:i.id,debugData:i}):(i.type===Ws.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(i.x||0,i.y||0,i.id,e,i),i.type===Ws.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):i.type===Ws.TouchStart?this.mouse.classList.add("touch-active"):i.type===Ws.TouchEnd?this.mouse.classList.remove("touch-active"):n.dispatchEvent(t));break;case Ws.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:n.dispatchEvent(t)}break}case Us.Scroll:if(-1===i.id)break;if(e&&this.lastScrollMap.set(i.id,i),this.usingVirtualDom){const t=this.virtualDom.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);t.scrollData=i;break}this.applyScroll(i,e);break;case Us.ViewportResize:this.emitter.emit(zs.Resize,{width:i.width,height:i.height});break;case Us.Input:if(-1===i.id)break;if(this.usingVirtualDom){const t=this.virtualDom.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);t.inputData=i;break}this.applyInput(i);break;case Us.MediaInteraction:{const e=this.usingVirtualDom?this.virtualDom.mirror.getNode(i.id):this.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);const n=e,{events:s}=this.service.state.context;this.mediaManager.mediaMutation({target:n,timeOffset:t.timestamp-s[0].timestamp,mutation:i});break}case Us.StyleSheetRule:case Us.StyleDeclaration:var s;this.usingVirtualDom?i.styleId?this.constructedStyleMutations.push(i):i.id&&(null===(s=this.virtualDom.mirror.getNode(i.id))||void 0===s||s.rules.push(i)):this.applyStyleSheetMutation(i);break;case Us.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.canvasMutations.push({event:t,mutation:i})}else{const e=this.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);xo({event:t,mutation:i,target:e,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Us.Font:try{var r;const t=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);null===(r=this.iframe.contentDocument)||void 0===r||r.fonts.add(t)}catch(t){this.warn(t)}break;case Us.Selection:if(e){this.lastSelectionData=i;break}this.applySelection(i);break;case Us.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(i):this.applyAdoptedStyleSheet(i)}}applyMutation(t,e){if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,function(t,e=function(){return new yi}(),i=new Rn){(function t(n,s){const r=Un(n,i,e,s);if(null!==r)if("IFRAME"!==(null==s?void 0:s.nodeName)&&n.nodeType!==bn.DOCUMENT_FRAGMENT_NODE&&(null==s||s.appendChild(r),r.parentNode=s,r.parentElement=s),"IFRAME"===n.nodeName){const e=n.contentDocument;e&&t(e,r)}else n.nodeType!==bn.DOCUMENT_NODE&&n.nodeType!==bn.ELEMENT_NODE&&n.nodeType!==bn.DOCUMENT_FRAGMENT_NODE||(n.nodeType===bn.ELEMENT_NODE&&n.shadowRoot&&t(n.shadowRoot,r),n.childNodes.forEach(e=>t(e,r)))})(t,null)}(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const t in this.legacy_missingNodeRetryMap)try{const e=this.legacy_missingNodeRetryMap[t],i=Un(e.node,this.virtualDom,this.mirror);i&&(e.node=i)}catch(t){this.warn(t)}const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter(e=>!!i.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1)).forEach(e=>{const n=i.getNode(e.id);if(!n)return;let s=i.getNode(e.parentId);if(!s)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&Rs(s)&&(s=s.shadowRoot),i.removeNodeFromMap(n),s)try{var r;s.removeChild(n),this.usingVirtualDom&&"#text"===n.nodeName&&"STYLE"===s.nodeName&&(null===(r=s.rules)||void 0===r?void 0:r.length)>0&&(s.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",s,n,t)}});const s=n({},this.legacy_missingNodeRetryMap),r=[],o=e=>{var n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let o=i.getNode(e.parentId);if(!o)return e.node.type===Vs.Document?this.newDocumentQueue.push(e):t.adds.some(t=>t.node.id===e.parentId)?r.push(e):void 0;if(e.node.isShadow){var l;if(Rs(o))o=o.shadowRoot;else{if(!lt(o))return this.warn("Parent does not support shadow root, skipping mutation",e);o=o.shadowRoot}const t=null!==(l=this.lastAdoptedStyleIds.get(e.parentId))&&void 0!==l?l:this.pendingAdoptedStyleSheets.get(e.parentId);t&&(this.usingVirtualDom?this.pendingAdoptedStyleSheets.set(e.parentId,t):this.applyAdoptedStyleSheet({source:Us.AdoptedStyleSheet,id:e.parentId,styleIds:t}))}let a=null,h=null;if(e.previousId&&(a=i.getNode(e.previousId)),e.nextId&&(h=i.getNode(e.nextId)),e.node.rootId&&!i.getNode(e.node.rootId))return;const u=e.node.rootId?i.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Es(o,i))return void this.attachDocumentToIframe(e,o);const c=(t,e)=>{if(!this.usingVirtualDom){Ro(t);for(const i of this.config.plugins||[])i.onBuild&&i.onBuild(t,{id:e,replayer:this})}},f=Oe(e.node,{doc:u,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:c});if(-1===e.previousId||-1===e.nextId)return void(s[e.node.id]={node:f,mutation:e});const d=i.getMeta(o);if(d&&d.type===Vs.Element&&e.node.type===Vs.Text){const t=Array.isArray(o.childNodes)?o.childNodes:Array.from(o.childNodes);if("textarea"===d.tagName)for(const e of t)e.nodeType===o.TEXT_NODE&&o.removeChild(e);else if("style"===d.tagName&&1===t.length)for(const e of t)e.nodeType!==o.TEXT_NODE||i.hasNode(e)||(f.textContent=e.textContent,o.removeChild(e))}else if((null==d?void 0:d.type)===Vs.Document){var p;const t=o;e.node.type===Vs.DocumentType&&(null===(p=t.childNodes[0])||void 0===p?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&t.removeChild(t.childNodes[0]),"HTML"===f.nodeName&&t.documentElement&&t.removeChild(t.documentElement)}if(a&&a.nextSibling&&a.nextSibling.parentNode?o.insertBefore(f,a.nextSibling):h&&h.parentNode?o.contains(h)?o.insertBefore(f,h):o.insertBefore(f,null):o.appendChild(f),c(f,e.node.id),this.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===o.nodeName&&(null===(n=o.rules)||void 0===n?void 0:n.length)>0&&(o.rules=[]),Es(f,this.mirror)){const t=this.mirror.getId(f),e=this.newDocumentQueue.find(e=>e.parentId===t);e&&(this.attachDocumentToIframe(e,f),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(s,o,f,e)};t.adds.forEach(t=>{o(t)});const l=performance.now();for(;r.length;){const t=Ms(r);if(r.length=0,performance.now()-l>150){this.warn("Timeout in the loop, please check the resolve tree data:",t);break}for(const e of t)i.getNode(e.value.parentId)?xs(e,t=>{o(t)}):this.debug("Drop resolve tree since there is no parent for the root node.",e)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),Ds(t.texts).forEach(e=>{const n=i.getNode(e.id);if(!n){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}if(n.textContent=e.value,this.usingVirtualDom){var s;const t=n.parentNode;(null==t||null===(s=t.rules)||void 0===s?void 0:s.length)>0&&(t.rules=[])}}),t.attributes.forEach(e=>{const s=i.getNode(e.id);if(!s){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}for(const t in e.attributes)if("string"==typeof t){const l=e.attributes[t];if("autocomplete"===t&&("INPUT"===s.nodeName||"TEXTAREA"===s.nodeName))continue;if(null===l)s.removeAttribute(t),"open"===t&&To(s,e);else if("string"==typeof l)try{var r;if("_cssText"===t&&("LINK"===s.nodeName||"STYLE"===s.nodeName))try{const t=i.getMeta(s),r=s.nextSibling,o=s.parentNode,l=Oe(n(n({},t),{},{attributes:n(n({},t.attributes),e.attributes)}),{doc:s.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache});if(Object.assign(t.attributes,e.attributes),l&&o){s.parentNode===o&&o.removeChild(s),o.insertBefore(l,r),i.replace(e.id,l);break}}catch(t){}if("value"===t&&"TEXTAREA"===s.nodeName){var o;const t=s;t.childNodes.forEach(e=>t.removeChild(e));const e=null===(o=s.ownerDocument)||void 0===o?void 0:o.createTextNode(l);e&&t.appendChild(e)}else"xlink:href"===t&&(null===(r=i.getMeta(s))||void 0===r?void 0:r.isSVG)?s.setAttributeNS("http://www.w3.org/1999/xlink",t,l):s.setAttribute(t,l);"rr_open_mode"===t&&"DIALOG"===s.nodeName&&Ro(s,e)}catch(t){this.warn("An error occurred may due to the checkout feature.",t)}else if("style"===t){const t=l,e=s;for(const i in t)if(!1===t[i])e.style.removeProperty(i);else if(t[i]instanceof Array){const n=t[i];e.style.setProperty(i,n[0],n[1])}else e.style.setProperty(i,t[i])}}})}applyScroll(t,e){const i=this.mirror.getNode(t.id);if(!i)return this.debugNodeNotFound(t,t.id);const n=this.mirror.getMeta(i);var s;if(i===this.iframe.contentDocument)null===(s=this.iframe.contentWindow)||void 0===s||s.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==n?void 0:n.type)===Vs.Document){var r;null===(r=i.defaultView)||void 0===r||r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}else try{i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){const e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{const e=new Set,i=t.ranges.map(({start:t,startOffset:i,end:n,endOffset:s})=>{const r=this.mirror.getNode(t),o=this.mirror.getNode(n);if(!r||!o)return;const l=new Range;l.setStart(r,i),l.setEnd(o,s);const a=r.ownerDocument,h=null==a?void 0:a.getSelection();return h&&e.add(h),{range:l,selection:h}});e.forEach(t=>t.removeAllRanges()),i.forEach(t=>{var e;return t&&(null===(e=t.selection)||void 0===e?void 0:e.addRange(t.range))})}catch(t){}}applyStyleSheetMutation(t){var e;let i=null;t.styleId?i=this.styleMirror.getStyle(t.styleId):t.id&&(i=(null===(e=this.mirror.getNode(t.id))||void 0===e?void 0:e.sheet)||null),i&&(t.source===Us.StyleSheetRule?this.applyStyleSheetRule(t,i):t.source===Us.StyleDeclaration&&this.applyStyleDeclaration(t,i))}applyStyleSheetRule(t,e){var i,n;if(null===(i=t.adds)||void 0===i||i.forEach(({rule:t,index:i})=>{try{if(Array.isArray(i)){const{positions:n,index:s}=Os(i),r=Ts(e.cssRules,n);null==r||r.insertRule(t,s)}else{const n=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(t,n)}}catch(t){}}),null===(n=t.removes)||void 0===n||n.forEach(({index:t})=>{try{if(Array.isArray(t)){const{positions:i,index:n}=Os(t),s=Ts(e.cssRules,i);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(t)}catch(t){}}),"string"==typeof t.replace)try{var s;null===(s=e.replace)||void 0===s||s.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{var r;null===(r=e.replaceSync)||void 0===r||r.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){if(t.set){var i;const n=Ts(e.rules,t.index);null==n||null===(i=n.style)||void 0===i||i.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var n;const i=Ts(e.rules,t.index);null==i||null===(n=i.style)||void 0===n||n.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e;this.lastAdoptedStyleIds.set(t.id,t.styleIds);const i=this.mirror.getNode(t.id);if(!i)return;const n={};this.adoptedStyleSheetTokens.set(t.id,n),null===(e=t.styles)||void 0===e||e.forEach(t=>{var e;let n=null,s=null;if(s="#document"===i.nodeName?i.defaultView:(null===(e=i.ownerDocument)||void 0===e?void 0:e.defaultView)||null,s)try{n=new s.CSSStyleSheet,this.styleMirror.add(n,t.styleId),this.applyStyleSheetRule({source:Us.StyleSheetRule,adds:t.rules},n)}catch(t){}});let s=0;const r=(e,i)=>{if(this.adoptedStyleSheetTokens.get(t.id)!==n)return;const o=i.map(t=>this.styleMirror.getStyle(t)).filter(t=>null!==t);let l=!1;try{Rs(e)?(e.shadowRoot.adoptedStyleSheets=o,l=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,l=!0)}catch(t){}l?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,i),l&&o.length===i.length||s>=10||(this.addTimeout(()=>r(e,i),0+100*s),s++)};r(i,t.styleIds)}legacy_resolveMissingNode(t,e,i,n){const{previousId:s,nextId:r}=n,o=s&&t[s],l=r&&t[r];if(o){const{node:n,mutation:s}=o;e.insertBefore(n,i),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,e,n,s)}if(l){const{node:n,mutation:s}=l;e.insertBefore(n,i.nextSibling),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,e,n,s)}}moveAndHover(t,e,i,n,s){const r=this.mirror.getNode(i);if(!r)return this.debugNodeNotFound(s,i);const o=Is(r,this.iframe),l=t*o.absoluteScale+o.x,a=e*o.absoluteScale+o.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${a}px`,n||this.drawMouseTail({x:l,y:a}),this.hoverElements(r)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:e,lineWidth:i,strokeStyle:n,duration:s}=!0===this.config.mouseTail?No:Object.assign({},No,this.config.mouseTail),r=()=>{if(!this.mouseTail)return;const t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=i,t.lineCap=e,t.strokeStyle=n,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(e=>t.lineTo(e.x,e.y)),t.stroke())};this.tailPositions.push(t),r(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(e=>e!==t),r()},s/this.speedService.state.context.timer.speed)}hoverElements(t){var e;null===(e=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===e||e.querySelectorAll(".\\:hover").forEach(t=>{t.classList.remove(":hover")});const i=t.getRootNode();this.lastHoveredRootNode=i.nodeType===Node.DOCUMENT_NODE||i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i:void 0;let n=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;for(;n;)n.classList.add(":hover"),n=n.parentElement}isUserInteraction(t){return t.type===Bs.IncrementalSnapshot&&t.data.source>Us.Mutation&&Us.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(zs.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn(`Node with id '${e}' not found. `,t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug(`Node with id '${e}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Do,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Do,...t)}},Fo=Zr.addCustomEvent,Po=Zr.freezePage,Bo=Zr.takeFullSnapshot;export{Bs as EventType,Us as IncrementalSource,Ws as MouseInteractions,_o as Replayer,zs as ReplayerEvents,Fo as addCustomEvent,xo as canvasMutation,Po as freezePage,tt as getDeferredStylesheetStats,R as getDiscardedDurationSamples,z as getLastSnapshotCost,et as getMutationCost,us as mirror,Zr as record,ti as resetMaxDepthState,it as resetSnapshotCostState,Bo as takeFullSnapshot,ss as utils,Ke as wasMaxDepthReached};
|
|
1
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e,i,n){return(i=function(e){var i=function(e){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(i)?i:i+""}(i))in e?Object.defineProperty(e,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[i]=n,e}function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function n(t){for(var n=1;arguments.length>n;n++){var s=null!=arguments[n]?arguments[n]:{};n%2?i(Object(s),!0).forEach(function(i){e(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):i(Object(s)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))})}return t}function s(t,e){if(null==t)return{};var i,n,s=function(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;r.length>n;n++)e.includes(i=r[n])||{}.propertyIsEnumerable.call(t,i)&&(s[i]=t[i])}return s}function r(t,e,i,n,s,r,o){try{var l=t[r](o),a=l.value}catch(t){return void i(t)}l.done?e(a):Promise.resolve(a).then(n,s)}function o(t){return function(){var e=this,i=arguments;return new Promise(function(n,s){var o=t.apply(e,i);function l(t){r(o,n,s,l,a,"next",t)}function a(t){r(o,n,s,l,a,"throw",t)}l(void 0)})}}const l=["inputId"],a=["inputId"],h=["type"];var u=Object.defineProperty,c=(t,e)=>{let i={};for(var n in t)u(i,n,{get:t[n],enumerable:!0});return e||u(i,Symbol.toStringTag,{value:"Module"}),i},f=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}({});function d(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date,"0".repeat(32),"0".repeat(16);var p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},v={};function y(t){if(v[t])return v[t];const e=function(t){var e,i;const n=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(i=e.__symbol__)||void 0===i?void 0:i.call(e,t);return n&&globalThis[n]?globalThis[n]:void 0}(t)||globalThis[t],i=e.prototype,n=t in p?p[t]:void 0,s=Boolean(n&&n.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(i,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),r=t in m?m[t]:void 0,o=Boolean(r&&r.every(t=>{var e;return"function"==typeof i[t]&&(null===(e=i[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(s&&o)return v[t]=e.prototype,e.prototype;const l=document.createElement("iframe");l.style.display="none";let a=!1;try{document.body.appendChild(l);const n=l.contentWindow;if(!n)return e.prototype;const s=n[t].prototype;return s?(d(h=navigator.userAgent,"AppleWebKit")&&!d(h,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",t),a=!0),v[t]=s):i}catch(t){return i}finally{!a&&l.parentNode&&document.body.removeChild(l)}var h}var g=Object.create(null);function b(t,e,i){var n;const s=g[t],r=s[i];if(r)return r.call(e);const o=y(t),l=null===(n=Object.getOwnPropertyDescriptor(o,i))||void 0===n?void 0:n.get;return l?(s[i]=l,l.call(e)):e[i]}g.Node=Object.create(null),g.ShadowRoot=Object.create(null),g.MutationObserver=Object.create(null),g.Element=Object.create(null);var w,S={};function k(t,e,i){const n=`${t}.${String(i)}`;if(S[n])return S[n].bind(e);const s=y(t)[i];return"function"!=typeof s?e[i]:(S[n]=s,s.bind(e))}var C={childNodes:t=>b("Node",t,"childNodes"),parentNode:t=>b("Node",t,"parentNode"),parentElement:t=>b("Node",t,"parentElement"),textContent:t=>b("Node",t,"textContent"),isConnected(t){if(void 0===w){var e;const t=null===(e=Object.getOwnPropertyDescriptor(y("Node"),"isConnected"))||void 0===e?void 0:e.get;w=(null==t?void 0:t.toString().includes("[native code]"))?t:null}return null==w?void 0:w.call(t)},contains:(t,e)=>k("Node",t,"contains")(e),getRootNode:t=>k("Node",t,"getRootNode")(),host:t=>t&&"host"in t?b("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null,querySelector:(t,e)=>k("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>k("Element",t,"querySelectorAll")(e),mutationObserver:()=>y("MutationObserver").constructor,patch(t,e,i){try{if(!(e in t))return()=>{};const n=t[e],s={next:n},r=i(function(...t){return s.next.apply(this,t)});return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n},__rrweb_layer__:{enumerable:!1,value:s}})),t[e]=r,()=>{if(t[e]===r)return void(t[e]=s.next);const i=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0};let n=t[e],o=i(n);for(;o;){if(o.next===r)return void(o.next=s.next);n=o.next,o=i(n)}}}catch(t){return()=>{}}}};function M(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var x=0,E=0;function A(){x+=1}function I(){return x}function R(){return E}function T(t,e){return(e!==x||t>6e4)&&(E+=1,!0)}var O=0,D=0,N=0,L={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},_=null,F=null,P=[],B=0,j=0,U={slowestBatchMs:0},W={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0};function H(t){(O+=1)>1||(L={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},P=[],B=0,F=(t=>t&&t>0?t:null)(t),D=M(),N=x)}function G(){return 0===O?_||{durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0}:(O-=1)>0?L:(L.durationMs=M()-D,L.deferredStylesheetCount=B,W.deferredCount+=B,F=null,T(L.durationMs,N)?L:_=L)}function z(){return _}function V(t,e,i){let n=t.length;if(i>=32)return n;for(let s=0;t.length>s;s++){const r=t[s];try{const t=r.cssRules;if(t&&t.length)n+=V(t,e,i+1);else if(e&&r.styleSheet){const t=r.styleSheet;if(!e.has(t)){e.add(t);const s=t.rules||t.cssRules;s&&(n+=V(s,e,i+1))}}}catch(t){}}return n}function Y(t){if(0===O)return;const e=V(t,null,0);L.cssRuleCount+=e,j>0&&(L.nonDeferrableCssRuleCount+=e)}function q(t){j+=1;try{return t()}finally{j-=1}}function Z(t){O>0&&(L.stylesheetMs+=t)}function X(t){if(0===O||null===F)return!1;const e=L.cssRuleCount-L.nonDeferrableCssRuleCount;return e>=F||e+function(t){try{const e=t&&(t.rules||t.cssRules);if(!e)return 0;const i=new WeakSet;return i.add(t),V(e,i,0)}catch(t){return 0}}(t)>F}function J(){const t=P;return P=[],t}function Q(){W.failedCount+=1}function K(t){t>0&&(W.abandonedCount+=t)}function tt(){return n({},W)}function et(){return n({},U)}function it(){O=0,D=0,N=0,x=0,E=0,L={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},_=null,F=null,P=[],B=0,j=0,U={slowestBatchMs:0},W={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function nt(t){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt(t)}function st(t,e,i){return(e=function(t){var e=function(t){if("object"!=nt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=nt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function rt(t){return t.nodeType===t.ELEMENT_NODE}function ot(t){const e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function lt(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}function at(t){return"[object ShadowRoot]"==={}.toString.call(t)}function ht(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function ut(t){const{cssText:e}=t;if(3>e.split('"').length)return e;const i=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?i.push("layer"):t.layerName&&i.push(`layer(${t.layerName})`),t.supportsText&&i.push(`supports(${t.supportsText})`),t.media.length&&i.push(t.media.mediaText),i.join(" ")+";"}var ct=0;function ft(t){const e=0===ct,i=e?M():0;ct+=1;try{const e=t.rules||t.cssRules;if(!e)return null;Y(e);let i=t.href;return!i&&t.ownerNode&&(i=t.ownerNode.baseURI),ht(Array.from(e,t=>dt(t,i)).join(""))}catch(t){return null}finally{ct-=1,e&&Z(M()-i)}}function dt(t,e){if(mt(t)){let e;try{e=ft(t.styleSheet)||ut(t)}catch(i){e=t.cssText}try{var i;if(e&&(null===(i=t.styleSheet)||void 0===i?void 0:i.href))return Nt(e,t.styleSheet.href)}catch(t){}return e}{let i=t.cssText;return vt(t)&&t.selectorText.includes(":")&&(i=pt(i)),e?Nt(i,e):i}}function pt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function mt(t){return"styleSheet"in t}function vt(t){return"selectorText"in t}var yt=/^-?[A-Za-z_][\w-]*$/,gt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function bt(t){const e=[];let i=!1,n=null;const s=new Map;function r(t){const s=e.pop();if("group"===s.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void r(null)}const i=e[e.length-1];return i.parts.push(t),void(i.index+=1)}if(!s.importRule)return i=!0,void(n=t);o(e[e.length-1],s.importRule,t)}function o(t,e,i){try{let s;try{s=i||ut(e)}catch(t){s=e.cssText}try{var n;s&&(null===(n=e.styleSheet)||void 0===n?void 0:n.href)&&(s=Nt(s,e.styleSheet.href))}catch(t){}s&&t.parts.push(s),t.index+=1}catch(t){r(null)}}function l(t){const i=t.rules[t.index];if("sheet"===t.kind&&mt(i)){const n=s.get(i);return null===n?(t.parts.push(i.cssText),void(t.index+=1)):n?void e.push({kind:"sheet",sheet:n.sheet,rules:n.rules,sheetHref:n.sheetHref,index:0,parts:[],importRule:i}):void o(t,i,null)}if(function(t,i){try{const n=function(t){const e=t;if(!e.cssRules||0===e.cssRules.length)return null;if(e.media&&"string"==typeof e.media.mediaText)return`@media ${e.media.mediaText} {`;if(vt(t)){if("number"==typeof e.type&&1!==e.type)return null;const i=e.style?e.style.cssText:"";return`${t.selectorText} {${i?" "+i:""}`}if("containerName"in e)return"string"!=typeof e.containerQuery||e.containerName&&!yt.test(e.containerName)?null:`@container ${e.containerName?`${e.containerName} `:""}${e.containerQuery} {`;if("string"==typeof e.conditionText){let n="";try{var i;n=(null===(i=t.constructor)||void 0===i?void 0:i.name)||""}catch(t){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?`@supports ${e.conditionText} {`:null}return"string"==typeof e.name?"keyText"in e.cssRules[0]?yt.test(e.name)?`@keyframes ${e.name} {`:null:""===e.name?"@layer {":gt.test(e.name)?`@layer ${e.name} {`:null:null}(t);if(null===n)return!1;const s=i.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:s,index:0,parts:[],prelude:s?Nt(n,s):n,fixColons:"sheet"===i.kind&&vt(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(i,t))return;let n=i.cssText;"sheet"===t.kind&&vt(i)&&i.selectorText.includes(":")&&(n=pt(n)),t.parts.push(t.sheetHref?Nt(n,t.sheetHref):n),t.index+=1}return function(t){try{const i=t.rules||t.cssRules;if(!i)return!1;Y(i);let n=t.href;!n&&t.ownerNode&&(n=t.ownerNode.baseURI);const r=Array.from(i);return e.push({kind:"sheet",sheet:t,rules:r,sheetHref:n,index:0,parts:[],importRule:null}),function(t,e){const i=[{sheet:e,rules:t,index:0}];for(;i.length>0;){const t=i[i.length-1];if(t.index>=t.rules.length){i.pop();continue}const e=t.rules[t.index];if(t.index+=1,!mt(e)||s.has(e))continue;let n=null;try{n=e.styleSheet}catch(t){s.set(e,null);continue}if(n&&!i.some(t=>t.sheet===n))try{const t=n.rules||n.cssRules;if(!t)continue;Y(t);let r=n.href;!r&&n.ownerNode&&(r=n.ownerNode.baseURI);const o=Array.from(t);s.set(e,{sheet:n,rules:o,sheetHref:r}),i.push({sheet:n,rules:o,index:0})}catch(t){}}}(r,t),!0}catch(t){return!1}}(t)||(i=!0),{advance(t){if(i)return!0;const s=M();let o=t>0?t:1;try{for(;!i&&o>0;){const t=e[e.length-1];if(t.index>=t.rules.length){let e=null;try{if("group"===t.kind){const i=t.prelude+t.parts.join("")+"}";e=t.fixColons?pt(i):i}else e=ht(t.parts.join(""))}catch(t){}r(e);continue}o-=1;try{l(t)}catch(t){r(null)}}}catch(t){i=!0,n=null}finally{Z(M()-s)}return i},text:()=>i?n:null,remainingRules(){if(i)return 0;let t=0;for(const i of e)t+=i.rules.length-i.index;return t}}}var wt=class{constructor(){st(this,"idNodeMap",new Map),st(this,"nodeMetaMap",new WeakMap)}getId(t){var e,i;return t&&null!==(e=null===(i=this.getMeta(t))||void 0===i?void 0:i.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),rt(t)){const e=C.shadowRoot(t);e&&this.removeNodeFromMap(e),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){const i=this.getNode(t);if(i){const t=this.nodeMetaMap.get(i);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function St(){return new wt}function kt({element:t,maskInputOptions:e,tagName:i,type:n,value:s,maskInputFn:r}){let o=s||"";const l=n&&Ct(n);return(e[i.toLowerCase()]||l&&e[l])&&(o=r?r(o,t):"*".repeat(o.length)),o}function Ct(t){return t.toLowerCase()}var Mt=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function xt({element:t,name:e,value:i,maskAllElementAttributes:n,maskAttributeFn:s,isGenerated:r=!1}){return i?n?r&&Mt.has(Ct(e))?i:"*".repeat(i.length):s?s(e,i,t):i:i}var Et="__rrweb_original__";function At(t){try{const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ct(e):null}catch(t){return null}}function It(t,e){var i;let n;try{n=new URL(t,null!=e?e:window.location.href)}catch(t){return null}const s=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(i=null==s?void 0:s[1])&&void 0!==i?i:null}var Rt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Tt=/^(?:[a-z+]+:)?\/\//i,Ot=/^www\..*/i,Dt=/^(data:)([^,]*),(.*)/i;function Nt(t,e){return(t||"").replace(Rt,(t,i,n,s,r,o)=>{const l=n||r||o,a=i||s||"";if(!l)return t;if(Tt.test(l)||Ot.test(l))return`url(${a}${l}${a})`;if(Dt.test(l))return`url(${a}${l}${a})`;if("/"===l[0])return`url(${a}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+l}${a})`;const h=e.split("/"),u=l.split("/");h.pop();for(const t of u)"."!==t&&(".."===t?h.pop():h.push(t));return`url(${a}${h.join("/")}${a})`})}var Lt=new Map,_t=Object.create,Ft=Object.defineProperty,Pt=Object.getOwnPropertyDescriptor,Bt=Object.getOwnPropertyNames,jt=Object.getPrototypeOf,Ut={}.hasOwnProperty,Wt=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),$t=(t,e,i)=>(i=null!=t?_t(jt(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var s,r=Bt(e),o=0,l=r.length;l>o;o++)Ut.call(t,s=r[o])||void 0===s||Ft(t,s,{get:(t=>e[t]).bind(null,s),enumerable:!(n=Pt(e,s))||n.enumerable});return t})(!e&&t&&t.__esModule&&Ut.call(t,"default")?i:Ft(i,"default",{value:t,enumerable:!0}),t)),Ht=new RegExp(/(max|min)-device-(width|height)/.source,"g"),Gt={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(Ht)&&(t.params=t.params.replace(Ht,"$1-$2"))}}}},zt={postcssPlugin:"postcss-hover-classes",prepare(){const t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach(function(t){if(t.includes(":hover")){const i=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");i!==t&&(e.selector+=",\n"+i)}}))}}}},Vt=Wt((t,e)=>{var i=String,n=function(){return{isColorSupported:!1,reset:i,bold:i,dim:i,italic:i,underline:i,inverse:i,hidden:i,strikethrough:i,black:i,red:i,green:i,yellow:i,blue:i,magenta:i,cyan:i,white:i,gray:i,bgBlack:i,bgRed:i,bgGreen:i,bgYellow:i,bgBlue:i,bgMagenta:i,bgCyan:i,bgWhite:i,blackBright:i,redBright:i,greenBright:i,yellowBright:i,blueBright:i,magentaBright:i,cyanBright:i,whiteBright:i,bgBlackBright:i,bgRedBright:i,bgGreenBright:i,bgYellowBright:i,bgBlueBright:i,bgMagentaBright:i,bgCyanBright:i,bgWhiteBright:i}};e.exports=n(),e.exports.createColors=n}),Yt=Wt((t,e)=>{e.exports={}}),qt=Wt((t,e)=>{var i=Vt(),n=Yt(),s=class t extends Error{constructor(e,i,n,s,r,o){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),s&&(this.source=s),o&&(this.plugin=o),void 0!==i&&void 0!==n&&("number"==typeof i?(this.line=i,this.column=n):(this.line=i.line,this.column=i.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=i.isColorSupported);let s=t=>t,r=t=>t,o=t=>t;if(t){let{bold:t,gray:e,red:l}=i.createColors(!0);r=e=>t(l(e)),s=t=>e(t),n&&(o=t=>n(t))}let l=e.split(/\r?\n/),a=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),u=String(h).length;return l.slice(a,h).map((t,e)=>{let i=a+1+e,n=" "+(" "+i).slice(-u)+" | ";if(i===this.line){if(t.length>160){let e=20,i=Math.max(0,this.column-e),l=Math.max(this.column+e,this.endColumn+e),a=t.slice(i,l),h=s(n.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return r(">")+s(n)+o(a)+"\n "+h+r("^")}let e=s(n.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(n)+o(t)+"\n "+e+r("^")}return" "+s(n)+o(t)}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=s,s.default=s}),Zt=Wt((t,e)=>{var i=/(<)(\/?style\b)/gi,n=/(<)(!--)/g,s=/[\t\n\f\r "#'()/;[\\\]{}]/;function r(t){return"string"!=typeof t?t:t.includes("<")?t.replace(i,"\\3c $2").replace(n,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function l(t,e){let i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",r=e.raws.afterName;return void 0===r?r=n?" ":"":""===r&&n&&!s.test(n[0])&&(r=" "),i+r+n}function a(t,e,i){let n=i.nodes,s=n.length-1;for(;s>0&&"comment"===n[s].type;)s-=1;let r=t.raw(i,"semicolon"),o="document"===i.type;for(let t=n.length-1;t>=0;t--){let i=n[t],l=s!==t||r;!l&&n.length-1>t&&("atrule"===i.type&&!i.nodes||"decl"===i.type&&i.prop.startsWith("--"))&&(l=!0),e.push({document:o,node:i,semicolon:l})}}function h(t,e,i,n){let s=t.raw(i,"between","beforeOpen");t.builder(r(n+s)+"{",i,"start");let o=i.nodes&&i.nodes.length,l=()=>{let e=o?t.raw(i,"after"):t.raw(i,"after","emptyBody");e&&t.builder(r(e)),t.builder("}",i,"end"),"rule"===i.type&&i.raws.ownSemicolon&&t.builder(r(i.raws.ownSemicolon),i,"end")};o?(e.push(l),a(t,e,i)):l()}var u=class t{constructor(t){this.builder=t}atrule(t,e){let i=l(this,t);t.nodes?this.block(t,i):this.builder(r(i+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){let i;i=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");let n=t.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(i.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;s>t;t++)i+=e}return i}block(t,e){let i,n=this.raw(t,"between","beforeOpen");this.builder(r(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(r(i)),this.builder("}",t,"end")}body(e){let i=t.prototype,n=["atrule","block","body","rule","stringify"].every(t=>this[t]===i[t]),s=[];for(a(this,s,e);s.length>0;){let t=s.pop();if("function"==typeof t){t();continue}let e=t.node,i=this.raw(e,"before");i&&this.builder(t.document?i:r(i)),n&&"rule"===e.type?h(this,s,e,this.rawValue(e,"selector")):n&&"atrule"===e.type&&e.nodes?h(this,s,e,l(this,e)):this.stringify(e,t.semicolon)}}comment(t){let e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(r("/*"+e+t.text+i+"*/"),t)}decl(t,e){let i=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=i.important||" !important"),e&&(s+=";"),this.builder(r(s),t)}document(t){this.body(t)}raw(t,e,i){let n;if(i||(i=e),e&&(n=t.raws[e],void 0!==n))return n;let s=t.parent;if("before"===i){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return o[i];let r=t.root(),l=r.rawCache||(r.rawCache={});if(void 0!==l[i])return l[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);{let s="raw"+((a=i)[0].toUpperCase()+a.slice(1));this[s]?n=this[s](r,t):r.walk(t=>{if(n=t.raws[e],void 0!==n)return!1})}var a;return void 0===n&&(n=o[i]),l[i]=n,n}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return e=i.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(i=>{let n=i.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==i.raws.before){let t=i.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let i=t[e],n=t.raws[e];return n&&n.value===i?n.raw:i}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){let e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:r(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(r(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=u,u.default=u}),Xt=Wt((t,e)=>{var i=Zt();function n(t,e){new i(e).stringify(t)}e.exports=n,n.default=n}),Jt=Wt((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),Qt=Wt((t,e)=>{var i=qt(),n=Zt(),s=Xt(),{isClean:r,my:o}=Jt();function l(t,e){if(e&&void 0!==e.offset)return e.offset;let i=1,n=1,s=0;for(let r=0;t.length>r;r++){if(n===e.line&&i===e.column){s=r;break}"\n"===t[r]?(i=1,n+=1):i+=1}return s}var a=class t{get proxyOf(){return this}constructor(t={}){this.raws={},this[r]=!1,this[o]=!0;for(let e of Object.keys(t))if("__proto__"!==e)if("nodes"===e){this.nodes=[];for(let i of t[e])this.append("function"==typeof i.clone&&i.parent?i.clone():i)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=function(t){let e=new t.constructor,i=[[t,e,void 0]];for(;i.length>0;){let[t,e,n]=i.pop();for(let s in t){if(!{}.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let r=t[s],o=typeof r;if("parent"===s&&"object"===o)n&&(e[s]=n);else if("source"===s)e[s]=r;else if(Array.isArray(r)){let t=[];e[s]=t;for(let n of r){let s=new n.constructor;t.push(s),i.push([n,s,e])}}else{if("object"===o&&null!==r){let t=new r.constructor;i.push([r,t,void 0]),r=t}e[s]=r}}}return e}(this);for(let i in t)e[i]=t[i];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:i,start:n}=this.rangeBy(e);return this.source.input.error(t,{column:n.column,line:n.line},{column:i.column,line:i.line},e)}return new i(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let t=this;for(;t=t.parent;)t[r]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)};if(t.index)i=this.positionInside(t.index);else if(t.word){let n=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==n&&(i=this.positionInside(n))}return i}positionInside(t){let e=this.source.start.column,i=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=l(n,this.source.start),r=s+t;for(let t=s;r>t;t++)"\n"===n[t]?(e=1,i+=1):e+=1;return{column:e,line:i,offset:r}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:l(e,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let s=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==s&&(i=this.positionInside(s),n=this.positionInside(s+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:l(e,t.start)}:"number"==typeof t.index&&(i=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line,offset:l(e,t.end)}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):"number"==typeof t.index&&(n=this.positionInside(t.index+1));return(i.line>n.line||n.line===i.line&&i.column>=n.column)&&(n={column:i.column+1,line:i.line,offset:i.offset+1}),{end:n,start:i}}raw(t,e){return(new n).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,i=!1;for(let n of t)n===this?i=!0:i?(this.parent.insertAfter(e,n),e=n):this.parent.insertBefore(e,n);i||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,i){let n=null==i;i=i||new Map;let s=[],r=[[this,s,0]];for(let e=0;r.length>e;e++){let[n,s,o]=r[e],l={};s[o]=l;for(let e in n){if(!{}.hasOwnProperty.call(n,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=n[e];if(Array.isArray(s)){let n=[];l[e]=n;for(let e=0;s.length>e;e++){let o=s[e];"object"==typeof o&&o.toJSON?o.toJSON===t.prototype.toJSON?r.push([o,n,e]):n[e]=o.toJSON(null,i):n[e]=o}}else if("object"==typeof s&&s.toJSON)s.toJSON===t.prototype.toJSON?r.push([s,l,e]):l[e]=s.toJSON(null,i);else if("source"===e){if(null==s)continue;let t=i.get(s.input);null==t&&(t=i.size,i.set(s.input,t)),l[e]={end:s.end,inputId:t,start:s.start}}else l[e]=s}}let o=s[0];return n&&(o.inputs=[...i.keys()].map(t=>t.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=s){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i={}){let n={node:this};for(let t in i)n[t]=i[t];return t.warn(e,n)}};e.exports=a,a.default=a}),Kt=Wt((t,e)=>{var i=Qt(),n=class extends i{constructor(t){super(t),this.type="comment"}};e.exports=n,n.default=n}),te=Wt((t,e)=>{var i=Qt(),s=class extends i{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=n(n({},t),{},{value:String(t.value)})),super(t),this.type="decl"}};e.exports=s,s.default=s}),ee=Wt((t,e)=>{var i,n,s,r,o=Kt(),l=te(),a=Qt(),{isClean:h,my:u}=Jt(),c=class t extends a{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(e){let i=[this];for(;i.length>0;){let n=i.pop();if(n===this||n.cleanRaws===t.prototype.cleanRaws){if(a.prototype.cleanRaws.call(n,e),n.nodes)for(let t of n.nodes)i.push(t)}else n.cleanRaws(e)}}each(t){if(!this.proxyOf.nodes)return;let e,i,n=this.getIterator();for(;this.proxyOf.nodes.length>this.indexes[n]&&(e=this.indexes[n],i=t(this.proxyOf.nodes[e],e),!1!==i);)this.indexes[n]+=1;return delete this.indexes[n],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...i)=>t[e](...i.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t)):"every"===e||"some"===e?i=>t[e]((t,...e)=>i(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n]).reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n+1,0,t);for(let t in this.indexes)i=this.indexes[t],i>n&&(this.indexes[t]=i+s.length);return this.markDirty(),this}insertBefore(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n,0,t);for(let t in this.indexes)i=this.indexes[t],n>i||(this.indexes[t]=i+s.length);return this.markDirty(),this}normalize(e,s){if("string"==typeof e)e=function(t){let e=t.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let i of t.nodes)e.push(i)}}return t.slice()}(n(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector||e.selectors)e=[new r(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[u]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[h]&&function(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[h]=!1,t.proxyOf.nodes)for(let i of t.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&s&&void 0!==s.raws.before&&(e.raws.before=s.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let i in this.indexes)e=this.indexes[i],t>e||(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(n=>{e.props&&!e.props.includes(n.prop)||e.fast&&!n.value.includes(e.fast)||(n.value=n.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let e=[{iterator:this.getIterator(),node:this.proxyOf}];for(;e.length>0;){let{iterator:i,node:n}=e[e.length-1],s=n.indexes[i];if(s>=n.proxyOf.nodes.length){delete n.indexes[i],e.pop();let t=e[e.length-1];t&&(t.node.indexes[t.iterator]+=1);continue}let r,o=n.proxyOf.nodes[s];try{r=t(o,s)}catch(t){throw o.addToError(t)}if(!1===r){for(let t of e)delete t.node.indexes[t.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("atrule"===i.type&&t.test(i.name))return e(i,n)}):this.walk((i,n)=>{if("atrule"===i.type&&i.name===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("decl"===i.type&&t.test(i.prop))return e(i,n)}):this.walk((i,n)=>{if("decl"===i.type&&i.prop===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("rule"===i.type&&t.test(i.selector))return e(i,n)}):this.walk((i,n)=>{if("rule"===i.type&&i.selector===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}};c.registerParse=t=>{n=t},c.registerRule=t=>{r=t},c.registerAtRule=t=>{i=t},c.registerRoot=t=>{s=t},e.exports=c,c.default=c,c.rebuild=t=>{let e=[t];for(;e.length>0;){let t=e.pop();if("atrule"===t.type?Object.setPrototypeOf(t,i.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,l.prototype):"comment"===t.type?Object.setPrototypeOf(t,o.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[u]=!0,t.nodes)for(let i of t.nodes)e.push(i)}}}),ie=Wt((t,e)=>{var i=ee(),n=class extends i{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};e.exports=n,n.default=n,i.registerAtRule(n)}),ne=Wt((t,e)=>{var i,s,r=ee(),o=class extends r{constructor(t){super(n({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new i(new s,this,t).stringify()}};o.registerLazyResult=t=>{i=t},o.registerProcessor=t=>{s=t},e.exports=o,o.default=o}),se=Wt((t,e)=>{e.exports={nanoid(t=21){let e="",i=0|t;for(;i-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e=21)=>(i=e)=>{let n="",s=0|i;for(;s-- >0;)n+=t[Math.random()*t.length|0];return n}}}),re=Wt((t,e)=>{var{existsSync:i,readFileSync:n}=Yt(),{dirname:s,isAbsolute:r,join:o,relative:l,sep:a}=Yt(),{SourceMapConsumer:h,SourceMapGenerator:u}=Yt(),c=class{constructor(t,e){if(!1===e.map)return;e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=s(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(t){let e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));let i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return n=t.substr(i[0].length),Buffer?Buffer.from(n,"base64").toString():window.atob(n);var n;let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let i=t.lastIndexOf(e.pop()),n=t.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,n)))}loadFile(t,e,o){if(!o&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;let i=l(s(e),t);if(".."===i||i.startsWith(".."+a)||r(i))return}if(this.root=s(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof h)return u.fromSourceMap(e).toString();if(e instanceof u)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let i=e(t);if(i){let e=this.loadFile(i,t,!0);if(!e)throw new Error("Unable to load previous source map: "+i.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;t&&(e=o(s(t),e));let i=this.loadFile(e,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return i}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=c,c.default=c}),oe=Wt((t,e)=>{var{nanoid:i}=se(),{isAbsolute:s,resolve:r}=Yt(),{SourceMapConsumer:o,SourceMapGenerator:l}=Yt(),{fileURLToPath:a,pathToFileURL:h}=Yt(),u=qt(),c=re(),f=Yt(),d=Symbol("lineToIndexCache"),p=Boolean(o&&l),m=Boolean(r&&s);function v(t){if(t[d])return t[d];let e=t.css.split("\n"),i=new Array(e.length),n=0;for(let t=0,s=e.length;s>t;t++)i[t]=n,n+=e[t].length+1;return t[d]=i,i}var y=class{get from(){return this.file||this.id}constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!m||/^\w+:\/\//.test(e.from)||s(e.from)?e.from:r(e.from)),m&&p){let t=new c(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,n={}){let s,r,o,l,a;if(e&&"object"==typeof e){let t=e,n=i;if("number"==typeof t.offset){l=t.offset;let n=this.fromOffset(l);e=n.line,i=n.col}else l=this.fromLineAndColumn(e=t.line,i=t.column);if("number"==typeof n.offset){o=n.offset;let t=this.fromOffset(o);r=t.line,s=t.col}else r=n.line,s=n.column,o=this.fromLineAndColumn(n.line,n.column)}else if(i)l=this.fromLineAndColumn(e,i);else{l=e;let t=this.fromOffset(l);e=t.line,i=t.col}let c=this.origin(e,i,r,s);return a=c?new u(t,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):new u(t,void 0===r?e:{column:i,line:e},void 0===r?i:{column:s,line:r},this.css,this.file,n.plugin),a.input={column:i,endColumn:s,endLine:r,endOffset:o,line:e,offset:l,source:this.css},this.file&&(h&&(a.input.url=h(this.file).toString()),a.input.file=this.file),a}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){let e=v(this),i=0;if(e[e.length-1]>t){let n,s=e.length-2;for(;s>i;)if(n=i+(s-i>>1),e[n]>t)s=n-1;else{if(e[n+1]>t){i=n;break}i=n+1}}else i=e.length-1;return{col:t-e[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:r(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,n){if(!this.map)return!1;let r,o,l=this.map.consumer(),u=l.originalPositionFor({column:e-1,line:t});if(!u.source)return!1;if("number"==typeof i){let t=l.originalPositionFor({column:n-1,line:i});t.source&&(r=t)}o=s(u.source)?h(u.source):new URL(u.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let c={column:u.column+1,endColumn:r&&r.column+1,endLine:r&&r.line,line:u.line,url:o.toString()};if("file:"===o.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");c.file=a(o)}let f=l.sourceContentFor(u.source);return f&&(c.source=f),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=n({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=y,y.default=y,f&&f.registerInput&&f.registerInput(y)}),le=Wt((t,e)=>{var i,n,s=ee(),r=class extends s{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){let n=new Set;for(let e of Array.isArray(t)?t:[t])e&&"object"==typeof e&&!e.parent&&e.raws&&void 0!==e.raws.before&&n.add(e.raws);let s=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of s)n.has(t.raws)||(t.raws.before=e.raws.before);return s}removeChild(t,e){let i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new i(new n,this,t).stringify()}};r.registerLazyResult=t=>{i=t},r.registerProcessor=t=>{n=t},e.exports=r,r.default=r,s.registerRoot(r)}),ae=Wt((t,e)=>{var i={comma(t){return i.split(t,[","],!0)},space(t){return i.split(t,[" ","\n","\t"])},split(t,e,i){let n=[],s="",r=!1,o=0,l=!1,a="",h=!1;for(let i of t)h?h=!1:"\\"===i?h=!0:l?i===a&&(l=!1):'"'===i||"'"===i?(l=!0,a=i):"("===i?o+=1:")"===i?o>0&&(o-=1):0===o&&e.includes(i)&&(r=!0),r?(""!==s&&n.push(s.trim()),s="",r=!1):s+=i;return(i||""!==s)&&n.push(s.trim()),n}};e.exports=i,i.default=i}),he=Wt((t,e)=>{var i=ee(),n=ae(),s=class extends i{get selectors(){return n.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=s,s.default=s,i.registerRule(s)}),ue=Wt((t,e)=>{var i=ie(),r=Kt(),o=te(),a=oe(),h=re(),u=le(),c=he();function f(t,e){return t.inputs?t.inputs.map(t=>{let e=n(n({},t),{},{__proto__:a.prototype});return e.map&&(e.map=n(n({},e.map),{},{__proto__:h.prototype})),e}):e}function d(t,e,a){let h,f=n({},t);if(delete f.inputs,delete f.nodes,f.source){let t=f.source,{inputId:i}=t;f.source=s(t,l),null!=i&&(f.source.input=e[i])}if("root"===f.type)h=new u(f);else if("decl"===f.type)h=new o(f);else if("rule"===f.type)h=new c(f);else if("comment"===f.type)h=new r(f);else{if("atrule"!==f.type)throw new Error("Unknown node type: "+t.type);h=new i(f)}if(a){h.nodes=a;for(let t of a)t.parent=h}return h}function p(t,e){if(Array.isArray(t))return t.map(t=>p(t));let i,n=[{childIndex:0,children:[],inputs:f(t,e),json:t}];for(;n.length>0;){let t=n[n.length-1],e=t.json.nodes;if(e&&e.length>t.childIndex){let i=e[t.childIndex];t.childIndex+=1,n.push({childIndex:0,children:[],inputs:f(i,t.inputs),json:i});continue}n.pop();let s=d(t.json,t.inputs,e?t.children:void 0);n.length>0?n[n.length-1].children.push(s):i=s}return i}e.exports=p,p.default=p}),ce=Wt((t,e)=>{var{dirname:i,relative:n,resolve:s,sep:r}=Yt(),{SourceMapConsumer:o,SourceMapGenerator:l}=Yt(),{pathToFileURL:a}=Yt(),h=oe(),u=Boolean(o&&l),c=Boolean(i&&s&&n&&r);e.exports=class{constructor(t,e,i,n){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,n=this.toUrl(this.path(t.file)),s=t.root||i(t.file);!1===this.mapOpts.sourcesContent?(e=new o(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else if(this.css){let t;for(;-1!==(t=this.css.lastIndexOf("/*#"));){let e=this.css.indexOf("*/",t+3);if(-1===e)break;for(;t>0&&"\n"===this.css[t-1];)t--;this.css=this.css.slice(0,t)+this.css.slice(e+2)}}}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=l.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,i=1,n=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,a)=>{if(this.css+=o,l&&"end"!==a&&(r.generated.line=i,r.generated.column=n-1,l.source&&l.source.start?(r.source=this.sourcePath(l),r.original.line=l.source.start.line,r.original.column=l.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),e=o.match(/\n/g),e?(i+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,l&&"start"!==a){let t=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==t.last||t.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=i,r.generated.column=n-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=i,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));let o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new h(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let i=e.source.input.from;if(i&&!t[i]){t[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,e.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(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(a){let e=a(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===r&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}}}),fe=Wt((t,e)=>{var i="'".charCodeAt(0),n='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),o="\n".charCodeAt(0),l=" ".charCodeAt(0),a="\f".charCodeAt(0),h="\t".charCodeAt(0),u="\r".charCodeAt(0),c="[".charCodeAt(0),f="]".charCodeAt(0),d="(".charCodeAt(0),p=")".charCodeAt(0),m="{".charCodeAt(0),v="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),b=":".charCodeAt(0),w="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e={}){let x,E,A,I,R,T,O,D,N,L,_=t.css.valueOf(),F=e.ignoreErrors,P=_.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(B>=P)return;let e=!!t&&t.ignoreUnclosed;switch(x=_.charCodeAt(B),x){case o:case l:case h:case u:case a:I=B;do{I+=1,x=_.charCodeAt(I)}while(x===l||x===o||x===h||x===u||x===a);T=["space",_.slice(B,I)],B=I-1;break;case c:case f:case m:case v:case b:case y:case p:{let t=String.fromCharCode(x);T=[t,t,B];break}case d:if(L=j.length?j.pop()[1]:"",N=_.charCodeAt(B+1),"url"===L&&N!==i&&N!==n&&N!==l&&N!==o&&N!==h&&N!==a&&N!==u){I=B;do{if(O=!1,I=_.indexOf(")",I+1),-1===I){if(F||e){I=B;break}H("bracket")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["brackets",_.slice(B,I+1),B,I],B=I}else B>W?(I=_.indexOf(")",B+1),E=_.slice(B,I+1),-1===I||C.test(E)?(W=-1===I?P:I,T=["(","(",B]):(T=["brackets",E,B,I],B=I)):T=["(","(",B];break;case i:case n:R=x===i?"'":'"',I=B;do{if(O=!1,I=_.indexOf(R,I+1),-1===I){if(F||e){I=B+1;break}H("string")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["string",_.slice(B,I+1),B,I],B=I;break;case w:S.lastIndex=B+1,S.test(_),I=0===S.lastIndex?_.length-1:S.lastIndex-2,T=["at-word",_.slice(B,I+1),B,I],B=I;break;case s:for(I=B,A=!0;_.charCodeAt(I+1)===s;)I+=1,A=!A;if(x=_.charCodeAt(I+1),A&&x!==r&&x!==l&&x!==o&&x!==h&&x!==u&&x!==a&&(I+=1,M.test(_.charAt(I)))){for(;M.test(_.charAt(I+1));)I+=1;_.charCodeAt(I+1)===l&&(I+=1)}T=["word",_.slice(B,I+1),B,I],B=I;break;default:x===r&&_.charCodeAt(B+1)===g?(I=_.indexOf("*/",B+2)+1,0===I&&(F||e?I=_.length:H("comment")),T=["comment",_.slice(B,I+1),B,I],B=I):(k.lastIndex=B+1,k.test(_),I=0===k.lastIndex?_.length-1:k.lastIndex-2,T=["word",_.slice(B,I+1),B,I],j.push(T),B=I)}return B++,T},position:()=>B}}}),de=Wt((t,e)=>{var i=ie(),n=Kt(),s=te(),r=le(),o=he(),l=fe(),a={empty:!0,space:!0};function h(t,e,i){let n="";for(let s=e;i>s;s++)n+=t[s][1];return n}e.exports=class{constructor(t){this.input=t,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,n,s,r=new i;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let o=!1,l=!1,a=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){l=!0;break}if("}"===e){if(a.length>0){for(s=a.length-1,n=a[s];n&&"space"===n[0];)n=a[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o&&(r.source.end=this.getPosition((t=a[a.length-1])[3]||t[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),l&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let i,n=0;for(let s=e-1;s>=0&&(i=t[s],"space"===i[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(t){let e,i,n,s=0;for(let[r,o]of t.entries()){if(i=o,n=i[0],"("===n&&(s+=1),")"===n&&(s-=1),0===s&&":"===n){if(e){if("word"===e[0]&&"progid"===e[1])continue;return r}this.doubleColon(i)}e=i}return!1}comment(t){let e=new n;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let i=t[1].slice(2,-2);if(i.trim()){let t=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}else e.text="",e.raws.left=i,e.raws.right=""}createTokenizer(){this.tokenizer=l(this.input)}decl(t,e){let i=new s;this.init(i,t[0][2]);let n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;e>=0;e--){let i=t[e],n=i[3]||i[2];if(n)return n}}(t)),i.source.end.offset++;let r=0;for(;"word"!==t[r][0];)r===t.length-1&&this.unknownWord([t[r]]),r++;i.raws.before+=h(t,0,r),i.source.start=this.getPosition(t[r][2]);let o=r;for(;t.length>r;){let e=t[r][0];if(":"===e||"space"===e||"comment"===e)break;r++}i.prop=h(t,o,r);let l,a=r;for(;t.length>r&&(l=t[r],r++,":"!==l[0]);)"word"===l[0]&&/\w/.test(l[1])&&this.unknownWord([l]);i.raws.between=h(t,a,r),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let u=r;for(;t.length>r;){let e=t[r][0];if("space"!==e&&"comment"!==e)break;r++}let c=t.slice(u,r);t=t.slice(r),this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(l=t[e],"!important"===l[1].toLowerCase()){i.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n," !important"!==n&&(i.raws.important=n);break}if("important"===l[1].toLowerCase()){let n=t.slice(0),s="";for(let t=e;t>0;t--){let e=n[t][0];if(s.trim().startsWith("!")&&"space"!==e)break;s=n.pop()[1]+s}s.trim().startsWith("!")&&(i.important=!0,i.raws.important=s,t=n)}if("space"!==l[0]&&"comment"!==l[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(i.raws.between+=c.map(t=>t[1]).join(""),c=[]),this.raw(i,"value",c.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,i=null,n=!1,s=null,r=[],o=t[1].startsWith("--"),l=[],a=t;for(;a;){if(i=a[0],l.push(a),"("===i||"["===i)s||(s=a),r.push("("===i?")":"]");else if(o&&n&&"{"===i)s||(s=a),r.push("}");else if(0===r.length){if(";"===i){if(n)return void this.decl(l,o);break}if("{"===i)return void this.rule(l);if("}"===i){this.tokenizer.back(l.pop()),e=!0;break}":"===i&&(n=!0)}else i===r[r.length-1]&&(r.pop(),0===r.length&&(s=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),r.length>0&&this.unclosedBracket(s),e&&n){if(!o)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,n){let s,r,o,l,h=i.length,u="",c=!0;for(let t=0;h>t;t+=1)s=i[t],r=s[0],"space"!==r||t!==h-1||n?"comment"===r?(l=i[t-1]?i[t-1][0]:"empty",o=i[t+1]?i[t+1][0]:"empty",a[l]||a[o]||","===u.slice(-1)?c=!1:u+=s[1]):u+=s[1]:c=!1;if(!c){let n=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:n,value:u}}t[e]=u}rule(t){t.pop();let e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let e,i="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)i=t.pop()[1]+i;return i}stringFrom(t,e){let i="";for(let n=e;t.length>n;n++)i+=t[n][1];return t.splice(e,t.length-e),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),pe=Wt((t,e)=>{var i=ee(),n=oe(),s=de();function r(t,e){let i=new s(new n(t,e));try{i.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return i.root}e.exports=r,r.default=r,i.registerParse(r)}),me=Wt((t,e)=>{var i=ee(),{my:n}=Jt(),s=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){e.node[n]||i.rebuild(e.node);let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}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}};e.exports=s,s.default=s}),ve=Wt((t,e)=>{var i=me(),n=class{get content(){return this.css}constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new i(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=n,n.default=n}),ye=Wt((t,e)=>{var i={};e.exports=function(t){i[t]||(i[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),ge=Wt((t,e)=>{var i=ee(),s=ne(),r=ce(),l=pe(),a=ve(),h=le(),u=Xt(),{isClean:c,my:f}=Jt(),d=ye(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={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},v={Once:!0,postcssPlugin:!0,prepare:!0};function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){let e=!1,i=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function b(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:g(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[c]=!1,t.nodes)for(let i of t.nodes)e.push(i)}return t}var S={},k=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof t||s instanceof a)o=w(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let t=l;r.syntax&&(t=r.syntax.parse),r.parser&&(t=r.parser),t.parse&&(t=t.parse);try{o=t(s,r)}catch(t){this.processed=!0,this.error=t}o&&!o[f]&&i.rebuild(o)}else o=w(s);this.result=new a(e,o,r),this.helpers=n(n({},S),{},{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?n(n({},t),t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion){let t=i.postcssPlugin,e=i.postcssVersion,n=this.result.processor.version,s=e.split("."),r=n.split(".");(s[0]!==r[0]||parseInt(s[1])>parseInt(r[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(let e of this.plugins)if("object"==typeof e)for(let i in e){if(!m[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!v[i])if("object"==typeof e[i])for(let n in e[i])t(e,"*"===n?i:i+"-"+n.toLowerCase(),e[i][n]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return o(function*(){t.plugin=0;for(let e=0;t.plugins.length>e;e++){let i=t.runOnRoot(t.plugins[e]);if(y(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){let e=t.result.root;for(;!e[c];){e[c]=!0;let i=[b(e)];for(;i.length>0;){let e=t.visitTick(i);if(y(e))try{yield e}catch(e){throw t.handleError(e,i[i.length-1].node)}}}if(t.listeners.OnceExit)for(let[i,n]of t.listeners.OnceExit){t.result.lastPlugin=i;try{if("document"===e.type){let i=e.nodes.map(e=>n(e,t.helpers));yield Promise.all(i)}else yield n(e,t.helpers)}catch(e){throw t.handleError(e)}}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(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 t=this.result.opts,e=u;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let i=this.result.root.source;if(void 0===t.map&&!(i&&i.input&&i.input.map)){let t="";return e(this.result.root,e=>{t+=e}),this.result.css=t,this.result}let n=new r(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[c];)t[c]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(let[i,n]of t){let t;this.result.lastPlugin=i;try{t=n(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:i,visitors:n}=e;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void t.pop();if(n.length>0&&n.length>e.visitorIndex){let[t,s]=n[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===n.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){let n,s=e.iterator;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c])return n[c]=!0,void t.push(b(n));e.iterator=0,delete i.indexes[s]}let s=e.events;for(;s.length>e.eventIndex;){let t=s[e.eventIndex];if(e.eventIndex+=1,0===t)return void(i.nodes&&i.nodes.length&&(i[c]=!0,e.iterator=i.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[c]=!0;let e=[{eventIndex:0,events:g(t),iterator:0,node:t}];for(;e.length>0;){let t=e[e.length-1],i=t.node;if(0!==t.iterator){let n,s=t.iterator,r=!1;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c]){n[c]=!0,e.push({eventIndex:0,events:g(n),iterator:0,node:n}),r=!0;break}if(r)continue;t.iterator=0,delete i.indexes[s]}if(t.events.length>t.eventIndex){let n=t.events[t.eventIndex];if(t.eventIndex+=1,0===n)i.nodes&&i.nodes.length&&(t.iterator=i.getIterator());else{let t=this.listeners[n];t&&this.visitSync(t,i.toProxy())&&e.pop()}continue}e.pop()}}warnings(){return this.sync().warnings()}};k.registerPostcss=t=>{S=t},e.exports=k,k.default=k,h.registerLazyResult(k),s.registerLazyResult(k)}),be=Wt((t,e)=>{var i=ce(),n=pe(),s=ve(),r=Xt(),o=ye(),l=class{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 t,e=n;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=n,this._map=void 0;let o=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=e;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new i(o,void 0,this._opts,e);if(a.isMap()){let[t,e]=a.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=l,l.default=l}),we=Wt((t,e)=>{var i=ne(),n=ge(),s=be(),r=le(),o=class{constructor(t=[]){this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else{if("function"!=typeof i)throw"object"==typeof i&&(i.parse||i.stringify)?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."):new Error(i+" is not a PostCSS plugin");e.push(i)}return e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new n(this,t,e):new s(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,r.registerProcessor(o),i.registerProcessor(o)}),Se=Wt((t,e)=>{var i=ie(),n=Kt(),s=ee(),r=qt(),o=te(),l=ne(),a=ue(),h=oe(),u=ge(),c=ae(),f=Qt(),d=pe(),p=we(),m=ve(),v=le(),y=he(),g=Xt(),b=me();function w(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new p(t)}w.plugin=function(t,e){let i,n=!1;function s(...i){console&&console.warn&&!n&&(n=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=e(...i);return s.postcssPlugin=t,s.postcssVersion=(new p).version,s}return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(t,e,i){return w([s(i)]).process(t,e)},s},w.stringify=g,w.parse=d,w.fromJSON=a,w.list=c,w.comment=t=>new n(t),w.atRule=t=>new i(t),w.decl=t=>new o(t),w.rule=t=>new y(t),w.root=t=>new v(t),w.document=t=>new l(t),w.CssSyntaxError=r,w.Declaration=o,w.Container=s,w.Processor=p,w.Document=l,w.Comment=n,w.Warning=b,w.AtRule=i,w.Result=m,w.Input=h,w.Rule=y,w.Root=v,w.Node=f,u.registerPostcss(w),e.exports=w,w.default=w}),ke=Wt((t,e)=>{var i=Kt(),n=de(),s=fe();e.exports=class extends n{checkMissedSemicolon(){}comment(t){let e=new i;this.init(e,t[2]);let n=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:n.col,line:n.line,offset:t[3]+1};let s=t[1].slice(2);if("*/"===s.slice(-2)&&(s=s.slice(0,-2)),/^\s*$/.test(s))e.text="",e.raws.left=s,e.raws.right="";else{let t=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){let e,i,n=this.colon(t);if(!1===n)return;for(e=n-1;e>=0&&"word"!==t[e][0];e--);if(0===e||0>e)return;for(i=e-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}let s=t.slice(e),r=t.slice(i,e);t.splice(i,t.length-i),this.spaces=r.map(t=>t[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}}),Ce=$t(Wt((t,e)=>{var{Input:i}=Se(),n=ke();e.exports=function(t,e){let s=new n(new i(t,e));return s.parse(),s.root}})(),1),Me=$t(Se(),1).default,xe={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Ee(t,e){const i=null==e?void 0:e.stylesWithHoverClass.get(t);if(i)return i;let n=t;try{n=Me([Gt,zt]).process(t,{parser:Ce.default}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,n),n}function Ae(){return{stylesWithHoverClass:new Map}}var Ie=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),Re=new Set,Te=new Set;function Oe(t,e){var i;const{doc:n,mirror:s,skipChild:r=!1,hackCss:o=!0,afterAppend:l,cache:a}=e;let h=null;if(s.has(t.id)){const e=s.getNode(t.id);if(function(t,e){return!(!t||!e||t.type!==e.type)&&(t.type===f.Document?t.compatMode===e.compatMode:t.type===f.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===f.Comment||t.type===f.Text||t.type===f.CDATA?t.textContent===e.textContent:t.type===f.Element&&t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock)}(s.getMeta(e),t))return s.getNode(t.id);h=e}let u=function(t,e){const{doc:i,hackCss:n,cache:s}=e;switch(t.type){case f.Document:return i.implementation.createDocument(null,"",null);case f.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case f.Element:{const e=function(t){let e=xe[t.tagName]?xe[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);let o;if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",e);else{var r;if(t.isCustom&&(null===(r=i.defaultView)||void 0===r?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(Ie.has(t))return!1;if(!t.includes("-"))return!1;const e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!i.defaultView.customElements.get(t.tagName))try{i.defaultView.customElements.define(t.tagName,class extends i.defaultView.HTMLElement{})}catch(e){Re.has(t.tagName)||(Re.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(e)}const l={};for(const r in t.attributes){if(!{}.hasOwnProperty.call(t.attributes,r))continue;let a=t.attributes[r];if("option"===e&&"selected"===r&&!1===a)continue;if(null===a)continue;if(!0===a&&(a=""),r.startsWith("rr_")){l[r]=a;continue}const h="textarea"===e&&"value"===r,u="style"===e&&"_cssText"===r;if(u&&n&&"string"==typeof a&&(a=Ee(a,s)),!h&&!u||"string"!=typeof a)try{if(t.isSVG&&"xlink:href"===r)o.setAttributeNS("http://www.w3.org/1999/xlink",r,a.toString());else if("onload"===r||"onclick"===r||"onmouse"===r.substring(0,7))o.setAttribute("_"+r,a.toString());else{if("meta"===e&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===r){o.setAttribute("csp-content",a.toString());continue}"link"===e&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===e&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===It(t.attributes.href)||("img"===e&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(r,a.toString()))}}catch(t){}else o.appendChild(i.createTextNode(a)),t.childNodes=[]}const a=!("static"!==l.rr_position&&"relative"!==l.rr_position&&"sticky"!==l.rr_position||void 0!==l.rr_transform&&"none"!==l.rr_transform);if(a&&"string"==typeof l.rr_display){const t=l.rr_display;o.style.setProperty("display","inline"===t?"inline-block":t)}for(const n in l){const s=l[n];if("canvas"===e&&"rr_dataURL"===n){const t=i.createElement("img");t.onload=()=>{const e=o.getContext("2d");e&&e.drawImage(t,0,0,t.width,t.height)},t.src=s.toString(),o.RRNodeType&&(o.rr_dataURL=s.toString())}else if("img"===e&&"rr_dataURL"===n){const e=o;e.currentSrc.startsWith("data:")||(e.setAttribute("rrweb-original-src",t.attributes.src),e.src=s.toString())}if("rr_width"===n)o.style.setProperty("width",s.toString());else if("rr_height"===n)o.style.setProperty("height",s.toString());else if("rr_left"===n)a||(o.style.setProperty("left",s.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===n)a||(o.style.setProperty("top",s.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===n&&"number"==typeof s)o.currentTime=s;else if("rr_mediaState"===n)switch(s){case"played":o.play().catch(t=>console.warn("media playback error",t));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===n&&"number"==typeof s?o.playbackRate=s:"rr_mediaMuted"===n&&"boolean"==typeof s?o.muted=s:"rr_mediaLoop"===n&&"boolean"==typeof s?o.loop=s:"rr_mediaVolume"===n&&"number"==typeof s?o.volume=s:"rr_open_mode"===n&&o.setAttribute("rr_open_mode",s)}if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else lt(o)||Te.has(e)||(Te.add(e),console.warn("rrweb: browser refused a shadow root on",e));return"input"!==e&&"textarea"!==e||o.setAttribute("autocomplete","off"),o}case f.Text:return function(t,e){if("SCRIPT_PLACEHOLDER"===t.textContent)return e.doc.createTextNode("");let i=t.textContent;if(t.isStyle&&e.hackCss)try{i=Ee(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(i)}(t,{cache:s,doc:i,hackCss:n});case f.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case f.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:n,hackCss:o,cache:a});if(!u)return null;if(null==h||null===(i=h.parentNode)||void 0===i||i.removeChild(h),t.rootId&&s.getNode(t.rootId)!==n&&s.replace(t.rootId,n),t.type===f.Document&&(n.close(),n.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==f.DocumentType&&n.write(t.childNodes[0].type===f.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),u=n),s.add(u,t),(t.type===f.Document||t.type===f.Element)&&!r)for(const e of t.childNodes){if(e.isShadow&&t.isShadowHost&&rt(u)&&!u.shadowRoot)continue;const i=Oe(e,{doc:n,mirror:s,skipChild:!1,hackCss:o,afterAppend:l,cache:a});if(i){if(e.isShadow&&rt(u)&&u.shadowRoot)u.shadowRoot.appendChild(i);else if(t.type===f.Document&&e.type==f.Element){const t=i;let e=null;t.childNodes.forEach(t=>{"BODY"===t.nodeName&&(e=t)}),e?(t.removeChild(e),u.appendChild(i),t.appendChild(e)):u.appendChild(i)}else if(t.type===f.Document&&e.type===f.DocumentType){const t=u.doctype;t&&u.removeChild(t),u.firstChild&&1===u.firstChild.nodeType?u.insertBefore(i,u.firstChild):u.appendChild(i)}else u.appendChild(i);l&&l(i,e.id)}else console.warn("Failed to rebuild",e)}return u}var De,Ne,Le=1,_e=new RegExp("[^a-z0-9-_:]");function Fe(){return Le++}var Pe=/^[^ \t\n\r\u000c]+/,Be=/^[, \t\n\r\u000c]+/,je=new WeakMap;function Ue(t,e){return e&&""!==e.trim()?We(t,e):e}function We(t,e){let i=je.get(t);if(i||(i=t.createElement("a"),je.set(t,i)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return i.setAttribute("href",e),i.href}function $e(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==":t}(t,e.maxBase64ImageLength):t}function He(t,e,i,n,s,r){if(!n)return n;if("src"===i||"href"===i&&("use"!==e||"#"!==n[0])){if("link"===e&&s){var o;const t=null===(o=s.sheet)||void 0===o?void 0:o.href;if(t)return t}const i=Ue(t,n);if(i.startsWith("data:")){if("img"===e&&s){let t=i;return((null==r?void 0:r.type)||void 0!==(null==r?void 0:r.quality))&&(t=function(t,e,i,n){if(1e5>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>4096||t.naturalHeight>4096)return e;const s=Lt.get(e);if(s&&s.type===i&&s.quality===n)return s.result;try{const s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;const r=s.getContext("2d");if(!r)return e;r.drawImage(t,0,0);const o=s.toDataURL(i||"image/webp",null!=n?n:.4),l=e.length>o.length?o:e;if(Lt.size>=10){const t=Lt.keys().next().value;void 0!==t&&Lt.delete(t)}return Lt.set(e,{type:i,quality:n,result:l}),l}catch(t){return e}}(s,i,r.type,r.quality)),$e(t,r)}if("image"===e)return $e(i,r)}return i}if("xlink:href"===i&&"#"!==n[0]){const i=Ue(t,n);return"image"===e&&i.startsWith("data:")?$e(i,r):i}return"background"!==i||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===i?function(t,e){if(""===e.trim())return e;let i=0;function n(t){let n;const s=t.exec(e.substring(i));return s?(n=s[0],i+=n.length,n):""}const s=[];for(;n(Be),e.length>i;){let r=n(Pe);if(","===r.slice(-1))r=Ue(t,r.substring(0,r.length-1)),s.push(r);else{let n="";r=Ue(t,r);let o=!1;for(;;){const t=e.charAt(i);if(""===t){s.push((r+n).trim());break}if(o)")"===t&&(o=!1);else{if(","===t){i+=1,s.push((r+n).trim());break}"("===t&&(o=!0)}n+=t,i+=1}}}return s.join(", ")}(t,n):"style"===i?Nt(n,We(t)):"object"===e&&"data"===i?Ue(t,n):n:Ue(t,n)}function Ge(t,e,i){return("video"===t||"audio"===t)&&"autoplay"===Ct(e)}function ze(t,e,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!i&&ze(C.parentNode(t),e,i);for(let i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!i&&ze(C.parentNode(t),e,i)}function Ve(t,e,i,n){let s;if(rt(t)){if(s=t,!C.childNodes(s).length)return!1}else{if(null===C.parentElement(t))return!1;s=C.parentElement(t)}try{if("string"==typeof e){if(n){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(ze(s,e,n))return!0;if(i)if(n){if(s.closest(i))return!0}else if(s.matches(i))return!0}catch(t){}return!1}function Ye(t,e,i){const n=t.removeEventListener;"function"==typeof n&&n.call(t,e,i)}var qe=new Map;function Ze(t,e){return Array.from(t.styleSheets).find(t=>t.href===e)}function Xe(t){return null==t?"":t.toLowerCase()}var Je=!1,Qe=!1;function Ke(){return Qe}function ti(){Qe=!1,Je=!1}function ei(t,e){const{doc:i,mirror:n,blockClass:s,blockSelector:r,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:h=!0,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p=!1,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y={},inlineImages:g=!1,recordCanvas:b=!1,canvasMaskingConfigured:w,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M=5e3,onIframeListenerRegistered:x,onStylesheetLoad:E,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:R=!1,depth:T=0,maxDepth:D=50}=e;let{needsMask:N}=e,{preserveWhiteSpace:_=!0}=e;if(T>=D)return Qe=!0,Je||(Je=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${D}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;N||(N=Ve(t,o,l,void 0===N)),O>0&&(L.nodeCount+=1);const F=function(t,e){const{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:h,maskInputFn:u,maskAllElementAttributes:c=!1,maskAttributeFn:d,dataURLOptions:p={},inlineImages:m,recordCanvas:v,canvasMaskingConfigured:y,keepIframeSrcFn:g,newlyAddedElement:b=!1}=e,w=function(t,e){if(!e.hasNode(t))return;const i=e.getId(t);return 1===i?void 0:i}(i,n);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:f.Document,childNodes:[],compatMode:t.compatMode}:{type:f.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:f.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return function(t,e){const{doc:i,blockClass:n,blockSelector:s,inlineStylesheet:r,maskInputOptions:o={},maskInputFn:l,maskAllElementAttributes:a=!1,maskAttributeFn:h,dataURLOptions:u={},inlineImages:c,recordCanvas:d,canvasMaskingConfigured:p,keepIframeSrcFn:m,newlyAddedElement:v=!1,rootId:y}=e,g=function(t,e,i){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(i)return t.matches(i)}catch(t){}return!1}(t,n,s),b=function(t){if(t instanceof HTMLFormElement)return"form";const e=Ct(t.tagName);return _e.test(e)?"div":e}(t),w=new Set;let S={};const k=t.attributes.length;for(let e=0;k>e;e++){const n=t.attributes[e];Ge(b,n.name)||(S[n.name]=He(i,b,Ct(n.name),n.value,t,u))}if("link"===b&&r&&!g){let e=t.sheet;if(!e){const n=function(t){return t.href}(t);n&&(e=Ze(i,n),!e&&n.includes(".css"))&&(e=Ze(i,window.location.origin+"/"+n.replace(window.location.href,"")))}let n=null;e&&(X(e)?O>0&&(P.push(t),B+=1):n=ft(e)),n&&(delete S.rel,delete S.href,S._cssText=n)}if("style"===b&&t.sheet&&!(t.innerText||C.textContent(t)||"").trim().length){const e=q(()=>ft(t.sheet));e&&(S._cssText=e)}if("input"===b||"textarea"===b||"select"===b){const e=t.value,i=t.checked;"radio"!==S.type&&"checkbox"!==S.type&&"submit"!==S.type&&"button"!==S.type&&e?S.value=kt({element:t,type:At(t),tagName:b,value:e,maskInputOptions:o,maskInputFn:l}):i&&(S.checked=i)}if("option"===b&&(t.selected&&!o.select?S.selected=!0:delete S.selected),"dialog"===b&&t.open){try{S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){S.rr_open_mode="modal",S.ph_rr_could_not_detect_modal=!0}w.add("rr_open_mode")}if("canvas"===b&&d&&!(null==p?void 0:p()))if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let i=0;t.width>i;i+=50)for(let n=0;t.height>n;n+=50){const s=e.getImageData;if(new Uint32Array((Et in s?s[Et]:s).call(e,i,n,Math.min(50,t.width-i),Math.min(50,t.height-n)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(S.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){const e=t.toDataURL(u.type,u.quality),n=i.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(u.type,u.quality)&&(S.rr_dataURL=e)}let M,x=!1;if("img"===b&&c){De||(De=i.createElement("canvas"),Ne=De.getContext("2d"));const e=t,n=e.currentSrc||e.getAttribute("src")||"<unknown-src>",s=e.crossOrigin,r=(e,i)=>x?xt({element:t,name:e,value:i,maskAllElementAttributes:a,maskAttributeFn:h}):i,o=()=>{Ye(e,"load",o);try{De.width=e.naturalWidth,De.height=e.naturalHeight,Ne.drawImage(e,0,0);const t=De.toDataURL(u.type,u.quality);S.rr_dataURL=r("rr_dataURL",t)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o));console.warn(`Cannot inline img src=${n}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(s?S.crossOrigin=r("crossOrigin",s):e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if("audio"===b||"video"===b){const e=S;e.rr_mediaState=t.paused?"paused":"played",w.add("rr_mediaState"),e.rr_mediaCurrentTime=t.currentTime,e.rr_mediaPlaybackRate=t.playbackRate,e.rr_mediaMuted=t.muted,e.rr_mediaLoop=t.loop,e.rr_mediaVolume=t.volume}if(v||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),g){var E,A,I;const{width:e,height:n,left:s,top:r}=t.getBoundingClientRect(),o=null===(E=i.defaultView)||void 0===E?void 0:E.getComputedStyle(t);S={class:S.class,rr_width:`${e}px`,rr_height:`${n}px`,rr_left:`${Math.floor(s+((null===(A=i.defaultView)||void 0===A?void 0:A.scrollX)||0))}px`,rr_top:`${Math.floor(r+((null===(I=i.defaultView)||void 0===I?void 0:I.scrollY)||0))}px`},w.add("rr_width"),w.add("rr_height"),w.add("rr_left"),w.add("rr_top"),o&&(S.rr_position=o.position||"static",w.add("rr_position"),o.transform&&"none"!==o.transform&&(S.rr_transform=o.transform,w.add("rr_transform")),o.display&&o.display.startsWith("inline")&&(S.rr_display=o.display,w.add("rr_display")))}if("iframe"!==b||m(S.src)||(t.contentDocument||(S.rr_src=S.src),delete S.src),a||h)for(const[e,i]of Object.entries(S))"string"!=typeof i&&null!==i||(S[e]=xt({element:t,name:e,value:i,maskAllElementAttributes:a,maskAttributeFn:h,isGenerated:w.has(e)}));x=!0;try{customElements.get(b)&&(M=!0)}catch(t){}return{type:f.Element,tagName:b,attributes:S,childNodes:[],isSVG:(R=t,Boolean("svg"===R.tagName||R.ownerSVGElement)||void 0),needBlock:g,rootId:y,isCustom:M};var R}(t,{doc:i,blockClass:s,blockSelector:r,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,maskAllElementAttributes:c,maskAttributeFn:d,dataURLOptions:p,inlineImages:m,recordCanvas:v,canvasMaskingConfigured:y,keepIframeSrcFn:g,newlyAddedElement:b,rootId:w});case t.TEXT_NODE:return function(t,e){const{needsMask:i,maskTextFn:n,rootId:s}=e,r=C.parentNode(t),o=r&&r.tagName;let l=C.textContent(t);const a="STYLE"===o||void 0,h="SCRIPT"===o||void 0;if(a&&l){try{var u;if(t.nextSibling||t.previousSibling);else if(X(r.sheet));else if(null===(u=r.sheet)||void 0===u?void 0:u.cssRules){const t=ft(r.sheet);t&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(t)&&(l=t)}}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}l=Nt(l,We(e.doc))}return h&&(l="SCRIPT_PLACEHOLDER"),!a&&!h&&l&&i&&(l=n?n(l,C.parentElement(t)):l.replace(/[\S]/g,"*")),{type:f.Text,textContent:l||"",isStyle:a,rootId:s}}(t,{doc:i,needsMask:o,maskTextFn:h,rootId:w});case t.CDATA_SECTION_NODE:return{type:f.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:f.Comment,textContent:C.textContent(t)||"",rootId:w};default:return!1}}(t,{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:N,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,keepIframeSrcFn:I,newlyAddedElement:R});if(!F)return console.warn(t,"not serialized"),null;let j;j=n.hasNode(t)?n.getId(t):!function(t,e){if(e.comment&&t.type===f.Comment)return!0;if(t.type===f.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===It(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Xe(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Xe(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(Xe(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Xe(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Xe(t.attributes.property).match(/^(og|twitter|fb):/)||Xe(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Xe(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(Xe(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(Xe(t.attributes.name))||Xe(t.attributes.property).match(/^article:/)||Xe(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(Xe(t.attributes.name)))return!0}}return!1}(F,v)&&(_||F.type!==f.Text||F.isStyle||F.textContent.replace(/^\s+|\s+$/gm,"").length)?Fe():-2;const U=Object.assign(F,{id:j});if(n.add(t,U),-2===j)return null;S&&S(t);let W=!a;if(U.type===f.Element){W=W&&!U.needBlock,delete U.needBlock;const e=C.shadowRoot(t);e&&at(e)&&(U.isShadowHost=!0)}if((U.type===f.Document||U.type===f.Element)&&W){v.headWhitespace&&U.type===f.Element&&"head"===U.tagName&&(_=!1);const e={doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M,onIframeListenerRegistered:x,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:I,depth:T+1,maxDepth:D};if(U.type===f.Element&&"textarea"===U.tagName&&void 0!==U.attributes.value);else for(const i of Array.from(C.childNodes(t))){const t=ei(i,e);t&&U.childNodes.push(t)}let R=null;if(rt(t)&&(R=C.shadowRoot(t)))for(const t of Array.from(C.childNodes(R))){const i=ei(t,e);i&&(at(R)&&(i.isShadow=!0),U.childNodes.push(i))}}const H=C.parentNode(t);if(H&&ot(H)&&at(H)&&(U.isShadow=!0),U.type===f.Element&&"iframe"===U.tagName){const e=function(t,e,i){const n=()=>{},s=t.contentWindow;if(!s)return n;let r;try{r=s.document.readyState}catch(t){return n}const o=()=>e();if("complete"!==r){let n=!1,s=null;const r=()=>{n||(n=!0,null!==s&&(clearTimeout(s),s=null),Ye(t,"load",l),t.addEventListener("load",o),e())},l=()=>r();return s=setTimeout(r,i),t.addEventListener("load",l),()=>{null!==s&&(clearTimeout(s),s=null),n?Ye(t,"load",o):(n=!0,Ye(t,"load",l))}}const l="about:blank";let a;try{a=s.location.href}catch(t){return n}if(a!==l||t.src===l||""===t.src){const i=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(i),Ye(t,"load",o)}}return t.addEventListener("load",o),()=>{Ye(t,"load",o)}}(t,()=>{const e=t.contentDocument;if(e&&k){const i=ei(e,{doc:e,mirror:n,blockClass:s,blockSelector:r,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M,onIframeListenerRegistered:x,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:I,depth:T+1,maxDepth:D});i&&k(t,i)}},M);null==x||x(t,e)}return U.type===f.Element&&"link"===U.tagName&&"stylesheet"===U.attributes.rel&&function(e,a,f){if(qe.has(e))return;let C;try{C=e.sheet}catch(t){return}if(C)return;const x=new AbortController;let R=!1;const O=()=>{if(!R){R=!0;try{(()=>{if(E){const e=ei(t,{doc:i,mirror:n,blockClass:s,blockSelector:r,needsMask:N,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:u,maskTextFn:c,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:v,dataURLOptions:y,inlineImages:g,recordCanvas:b,canvasMaskingConfigured:w,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:M,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:I,depth:T,maxDepth:D});e&&E(t,e)}})()}finally{qe.delete(e),x.abort()}}},L=setTimeout(O,f);x.signal.addEventListener("abort",()=>clearTimeout(L),{once:!0}),e.addEventListener("load",O,{signal:x.signal,once:!0}),qe.set(e,x)}(t,0,A),U}function ii(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}function ni(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date,"0".repeat(32),"0".repeat(16);var si={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},ri={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},oi={};function li(t){if(oi[t])return oi[t];const e=function(t){var e,i;const n=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(i=e.__symbol__)||void 0===i?void 0:i.call(e,t);return n&&globalThis[n]?globalThis[n]:void 0}(t)||globalThis[t],i=e.prototype,n=t in si?si[t]:void 0,s=Boolean(n&&n.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(i,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),r=t in ri?ri[t]:void 0,o=Boolean(r&&r.every(t=>{var e;return"function"==typeof i[t]&&(null===(e=i[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(s&&o)return oi[t]=e.prototype,e.prototype;const l=document.createElement("iframe");l.style.display="none";let a=!1;try{document.body.appendChild(l);const n=l.contentWindow;if(!n)return e.prototype;const s=n[t].prototype;return s?(ni(h=navigator.userAgent,"AppleWebKit")&&!ni(h,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",t),a=!0),oi[t]=s):i}catch(t){return i}finally{!a&&l.parentNode&&document.body.removeChild(l)}var h}var ai=Object.create(null);function hi(t,e,i){var n;const s=ai[t],r=s[i];if(r)return r.call(e);const o=li(t),l=null===(n=Object.getOwnPropertyDescriptor(o,i))||void 0===n?void 0:n.get;return l?(s[i]=l,l.call(e)):e[i]}ai.Node=Object.create(null),ai.ShadowRoot=Object.create(null),ai.MutationObserver=Object.create(null),ai.Element=Object.create(null);var ui,ci={};function fi(t,e,i){const n=`${t}.${String(i)}`;if(ci[n])return ci[n].bind(e);const s=li(t)[i];return"function"!=typeof s?e[i]:(ci[n]=s,s.bind(e))}var di={childNodes:t=>hi("Node",t,"childNodes"),parentNode:t=>hi("Node",t,"parentNode"),parentElement:t=>hi("Node",t,"parentElement"),textContent:t=>hi("Node",t,"textContent"),isConnected(t){if(void 0===ui){var e;const t=null===(e=Object.getOwnPropertyDescriptor(li("Node"),"isConnected"))||void 0===e?void 0:e.get;ui=(null==t?void 0:t.toString().includes("[native code]"))?t:null}return null==ui?void 0:ui.call(t)},contains:(t,e)=>fi("Node",t,"contains")(e),getRootNode:t=>fi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?hi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?hi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>fi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>fi("Element",t,"querySelectorAll")(e),mutationObserver:()=>li("MutationObserver").constructor,patch(t,e,i){try{if(!(e in t))return()=>{};const n=t[e],s={next:n},r=i(function(...t){return s.next.apply(this,t)});return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n},__rrweb_layer__:{enumerable:!1,value:s}})),t[e]=r,()=>{if(t[e]===r)return void(t[e]=s.next);const i=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0};let n=t[e],o=i(n);for(;o;){if(o.next===r)return void(o.next=s.next);n=o.next,o=i(n)}}}catch(t){return()=>{}}}};function pi(t){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(t)}function mi(t,e,i){return(e=function(t){var e=function(t){if("object"!=pi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=pi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pi(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function vi(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}var yi=class{constructor(){mi(this,"idNodeMap",new Map),mi(this,"nodeMetaMap",new WeakMap)}getId(t){var e,i;return t&&null!==(e=null===(i=this.getMeta(t))||void 0===i?void 0:i.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){const e=di.shadowRoot(t);e&&this.removeNodeFromMap(e),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){const i=this.getNode(t);if(i){const t=this.nodeMetaMap.get(i);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},gi=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports);new RegExp(/(max|min)-device-(width|height)/.source,"g");var bi=gi((t,e)=>{var i=String,n=function(){return{isColorSupported:!1,reset:i,bold:i,dim:i,italic:i,underline:i,inverse:i,hidden:i,strikethrough:i,black:i,red:i,green:i,yellow:i,blue:i,magenta:i,cyan:i,white:i,gray:i,bgBlack:i,bgRed:i,bgGreen:i,bgYellow:i,bgBlue:i,bgMagenta:i,bgCyan:i,bgWhite:i,blackBright:i,redBright:i,greenBright:i,yellowBright:i,blueBright:i,magentaBright:i,cyanBright:i,whiteBright:i,bgBlackBright:i,bgRedBright:i,bgGreenBright:i,bgYellowBright:i,bgBlueBright:i,bgMagentaBright:i,bgCyanBright:i,bgWhiteBright:i}};e.exports=n(),e.exports.createColors=n}),wi=gi((t,e)=>{e.exports={}}),Si=gi((t,e)=>{var i=bi(),n=wi(),s=class t extends Error{constructor(e,i,n,s,r,o){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),s&&(this.source=s),o&&(this.plugin=o),void 0!==i&&void 0!==n&&("number"==typeof i?(this.line=i,this.column=n):(this.line=i.line,this.column=i.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let e=this.source;null==t&&(t=i.isColorSupported);let s=t=>t,r=t=>t,o=t=>t;if(t){let{bold:t,gray:e,red:l}=i.createColors(!0);r=e=>t(l(e)),s=t=>e(t),n&&(o=t=>n(t))}let l=e.split(/\r?\n/),a=Math.max(this.line-3,0),h=Math.min(this.line+2,l.length),u=String(h).length;return l.slice(a,h).map((t,e)=>{let i=a+1+e,n=" "+(" "+i).slice(-u)+" | ";if(i===this.line){if(t.length>160){let e=20,i=Math.max(0,this.column-e),l=Math.max(this.column+e,this.endColumn+e),a=t.slice(i,l),h=s(n.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return r(">")+s(n)+o(a)+"\n "+h+r("^")}let e=s(n.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(n)+o(t)+"\n "+e+r("^")}return" "+s(n)+o(t)}).join("\n")}toString(){let t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=s,s.default=s}),ki=gi((t,e)=>{var i=/(<)(\/?style\b)/gi,n=/(<)(!--)/g,s=/[\t\n\f\r "#'()/;[\\\]{}]/;function r(t){return"string"!=typeof t?t:t.includes("<")?t.replace(i,"\\3c $2").replace(n,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function l(t,e){let i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",r=e.raws.afterName;return void 0===r?r=n?" ":"":""===r&&n&&!s.test(n[0])&&(r=" "),i+r+n}function a(t,e,i){let n=i.nodes,s=n.length-1;for(;s>0&&"comment"===n[s].type;)s-=1;let r=t.raw(i,"semicolon"),o="document"===i.type;for(let t=n.length-1;t>=0;t--){let i=n[t],l=s!==t||r;!l&&n.length-1>t&&("atrule"===i.type&&!i.nodes||"decl"===i.type&&i.prop.startsWith("--"))&&(l=!0),e.push({document:o,node:i,semicolon:l})}}function h(t,e,i,n){let s=t.raw(i,"between","beforeOpen");t.builder(r(n+s)+"{",i,"start");let o=i.nodes&&i.nodes.length,l=()=>{let e=o?t.raw(i,"after"):t.raw(i,"after","emptyBody");e&&t.builder(r(e)),t.builder("}",i,"end"),"rule"===i.type&&i.raws.ownSemicolon&&t.builder(r(i.raws.ownSemicolon),i,"end")};o?(e.push(l),a(t,e,i)):l()}var u=class t{constructor(t){this.builder=t}atrule(t,e){let i=l(this,t);t.nodes?this.block(t,i):this.builder(r(i+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){let i;i=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");let n=t.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(i.includes("\n")){let e=this.raw(t,null,"indent");if(e.length)for(let t=0;s>t;t++)i+=e}return i}block(t,e){let i,n=this.raw(t,"between","beforeOpen");this.builder(r(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(r(i)),this.builder("}",t,"end")}body(e){let i=t.prototype,n=["atrule","block","body","rule","stringify"].every(t=>this[t]===i[t]),s=[];for(a(this,s,e);s.length>0;){let t=s.pop();if("function"==typeof t){t();continue}let e=t.node,i=this.raw(e,"before");i&&this.builder(t.document?i:r(i)),n&&"rule"===e.type?h(this,s,e,this.rawValue(e,"selector")):n&&"atrule"===e.type&&e.nodes?h(this,s,e,l(this,e)):this.stringify(e,t.semicolon)}}comment(t){let e=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(r("/*"+e+t.text+i+"*/"),t)}decl(t,e){let i=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=i.important||" !important"),e&&(s+=";"),this.builder(r(s),t)}document(t){this.body(t)}raw(t,e,i){let n;if(i||(i=e),e&&(n=t.raws[e],void 0!==n))return n;let s=t.parent;if("before"===i){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return o[i];let r=t.root(),l=r.rawCache||(r.rawCache={});if(void 0!==l[i])return l[i];if("before"===i||"after"===i)return this.beforeAfter(t,i);{let s="raw"+((a=i)[0].toUpperCase()+a.slice(1));this[s]?n=this[s](r,t):r.walk(t=>{if(n=t.raws[e],void 0!==n)return!1})}var a;return void 0===n&&(n=o[i]),l[i]=n,n}rawBeforeClose(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return e=t.raws.after,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let i;return t.walkComments(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(t,e){let i;return t.walkDecls(t=>{if(void 0!==t.raws.before)return i=t.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1}),void 0===i?i=this.raw(e,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(t){let e;return t.walk(t=>{if("decl"!==t.type&&(e=t.raws.between,void 0!==e))return!1}),e}rawBeforeRule(t){let e;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&void 0!==i.raws.before)return e=i.raws.before,e.includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&(e=t.raws.after,void 0!==e))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(i=>{let n=i.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==i.raws.before){let t=i.raws.before.split("\n");return e=t[t.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&(e=t.raws.semicolon,void 0!==e))return!1}),e}rawValue(t,e){let i=t[e],n=t.raws[e];return n&&n.value===i?n.raw:i}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){let e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:r(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(r(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=u,u.default=u}),Ci=gi((t,e)=>{var i=ki();function n(t,e){new i(e).stringify(t)}e.exports=n,n.default=n}),Mi=gi((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),xi=gi((t,e)=>{var i=Si(),n=ki(),s=Ci(),{isClean:r,my:o}=Mi();function l(t,e){if(e&&void 0!==e.offset)return e.offset;let i=1,n=1,s=0;for(let r=0;t.length>r;r++){if(n===e.line&&i===e.column){s=r;break}"\n"===t[r]?(i=1,n+=1):i+=1}return s}var a=class t{get proxyOf(){return this}constructor(t={}){this.raws={},this[r]=!1,this[o]=!0;for(let e of Object.keys(t))if("__proto__"!==e)if("nodes"===e){this.nodes=[];for(let i of t[e])this.append("function"==typeof i.clone&&i.parent?i.clone():i)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=function(t){let e=new t.constructor,i=[[t,e,void 0]];for(;i.length>0;){let[t,e,n]=i.pop();for(let s in t){if(!{}.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let r=t[s],o=typeof r;if("parent"===s&&"object"===o)n&&(e[s]=n);else if("source"===s)e[s]=r;else if(Array.isArray(r)){let t=[];e[s]=t;for(let n of r){let s=new n.constructor;t.push(s),i.push([n,s,e])}}else{if("object"===o&&null!==r){let t=new r.constructor;i.push([r,t,void 0]),r=t}e[s]=r}}}return e}(this);for(let i in t)e[i]=t[i];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:i,start:n}=this.rangeBy(e);return this.source.input.error(t,{column:n.column,line:n.line},{column:i.column,line:i.line},e)}return new i(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[r]=!0}markDirty(){if(this[r]){this[r]=!1;let t=this;for(;t=t.parent;)t[r]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)};if(t.index)i=this.positionInside(t.index);else if(t.word){let n=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==n&&(i=this.positionInside(n))}return i}positionInside(t){let e=this.source.start.column,i=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=l(n,this.source.start),r=s+t;for(let t=s;r>t;t++)"\n"===n[t]?(e=1,i+=1):e+=1;return{column:e,line:i,offset:r}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:l(e,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:l(e,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let s=e.slice(l(e,this.source.start),l(e,this.source.end)).indexOf(t.word);-1!==s&&(i=this.positionInside(s),n=this.positionInside(s+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:l(e,t.start)}:"number"==typeof t.index&&(i=this.positionInside(t.index)),t.end?n={column:t.end.column,line:t.end.line,offset:l(e,t.end)}:"number"==typeof t.endIndex?n=this.positionInside(t.endIndex):"number"==typeof t.index&&(n=this.positionInside(t.index+1));return(i.line>n.line||n.line===i.line&&i.column>=n.column)&&(n={column:i.column+1,line:i.line,offset:i.offset+1}),{end:n,start:i}}raw(t,e){return(new n).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,i=!1;for(let n of t)n===this?i=!0:i?(this.parent.insertAfter(e,n),e=n):this.parent.insertBefore(e,n);i||this.remove()}return this}root(){let t=this;for(;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,i){let n=null==i;i=i||new Map;let s=[],r=[[this,s,0]];for(let e=0;r.length>e;e++){let[n,s,o]=r[e],l={};s[o]=l;for(let e in n){if(!{}.hasOwnProperty.call(n,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=n[e];if(Array.isArray(s)){let n=[];l[e]=n;for(let e=0;s.length>e;e++){let o=s[e];"object"==typeof o&&o.toJSON?o.toJSON===t.prototype.toJSON?r.push([o,n,e]):n[e]=o.toJSON(null,i):n[e]=o}}else if("object"==typeof s&&s.toJSON)s.toJSON===t.prototype.toJSON?r.push([s,l,e]):l[e]=s.toJSON(null,i);else if("source"===e){if(null==s)continue;let t=i.get(s.input);null==t&&(t=i.size,i.set(s.input,t)),l[e]={end:s.end,inputId:t,start:s.start}}else l[e]=s}}let o=s[0];return n&&(o.inputs=[...i.keys()].map(t=>t.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=s){t.stringify&&(t=t.stringify);let e="";return t(this,t=>{e+=t}),e}warn(t,e,i={}){let n={node:this};for(let t in i)n[t]=i[t];return t.warn(e,n)}};e.exports=a,a.default=a}),Ei=gi((t,e)=>{var i=xi(),n=class extends i{constructor(t){super(t),this.type="comment"}};e.exports=n,n.default=n}),Ai=gi((t,e)=>{var i=xi(),s=class extends i{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=n(n({},t),{},{value:String(t.value)})),super(t),this.type="decl"}};e.exports=s,s.default=s}),Ii=gi((t,e)=>{var i,n,s,r,o=Ei(),l=Ai(),a=xi(),{isClean:h,my:u}=Mi(),c=class t extends a{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let e of t){let t=this.normalize(e,this.last);for(let e of t)this.proxyOf.nodes.push(e)}return this.markDirty(),this}cleanRaws(e){let i=[this];for(;i.length>0;){let n=i.pop();if(n===this||n.cleanRaws===t.prototype.cleanRaws){if(a.prototype.cleanRaws.call(n,e),n.nodes)for(let t of n.nodes)i.push(t)}else n.cleanRaws(e)}}each(t){if(!this.proxyOf.nodes)return;let e,i,n=this.getIterator();for(;this.proxyOf.nodes.length>this.indexes[n]&&(e=this.indexes[n],i=t(this.proxyOf.nodes[e],e),!1!==i);)this.indexes[n]+=1;return delete this.indexes[n],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?(...i)=>t[e](...i.map(t=>"function"==typeof t?(e,i)=>t(e.toProxy(),i):t)):"every"===e||"some"===e?i=>t[e]((t,...e)=>i(t.toProxy(),...e)):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,i){return t[e]===i||(t[e]=i,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n]).reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n+1,0,t);for(let t in this.indexes)i=this.indexes[t],i>n&&(this.indexes[t]=i+s.length);return this.markDirty(),this}insertBefore(t,e){let i,n=this.index(t),s=this.normalize(e,this.proxyOf.nodes[n],0===n&&"prepend").reverse();n=this.index(t);for(let t of s)this.proxyOf.nodes.splice(n,0,t);for(let t in this.indexes)i=this.indexes[t],n>i||(this.indexes[t]=i+s.length);return this.markDirty(),this}normalize(e,s){if("string"==typeof e)e=function(t){let e=t.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let i of t.nodes)e.push(i)}}return t.slice()}(n(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector||e.selectors)e=[new r(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[u]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[h]&&function(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[h]=!1,t.proxyOf.nodes)for(let i of t.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&s&&void 0!==s.raws.before&&(e.raws.before=s.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...t){t=t.reverse();for(let e of t){let t=this.normalize(e,this.first,"prepend").reverse();for(let e of t)this.proxyOf.nodes.unshift(e);for(let e in this.indexes)this.indexes[e]=this.indexes[e]+t.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){let e;t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);for(let i in this.indexes)e=this.indexes[i],t>e||(this.indexes[i]=e-1);return this.markDirty(),this}replaceValues(t,e,i){return i||(i=e,e={}),this.walkDecls(n=>{e.props&&!e.props.includes(n.prop)||e.fast&&!n.value.includes(e.fast)||(n.value=n.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let e=[{iterator:this.getIterator(),node:this.proxyOf}];for(;e.length>0;){let{iterator:i,node:n}=e[e.length-1],s=n.indexes[i];if(s>=n.proxyOf.nodes.length){delete n.indexes[i],e.pop();let t=e[e.length-1];t&&(t.node.indexes[t.iterator]+=1);continue}let r,o=n.proxyOf.nodes[s];try{r=t(o,s)}catch(t){throw o.addToError(t)}if(!1===r){for(let t of e)delete t.node.indexes[t.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("atrule"===i.type&&t.test(i.name))return e(i,n)}):this.walk((i,n)=>{if("atrule"===i.type&&i.name===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("atrule"===t.type)return e(t,i)}))}walkComments(t){return this.walk((e,i)=>{if("comment"===e.type)return t(e,i)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("decl"===i.type&&t.test(i.prop))return e(i,n)}):this.walk((i,n)=>{if("decl"===i.type&&i.prop===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("decl"===t.type)return e(t,i)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((i,n)=>{if("rule"===i.type&&t.test(i.selector))return e(i,n)}):this.walk((i,n)=>{if("rule"===i.type&&i.selector===t)return e(i,n)}):(e=t,this.walk((t,i)=>{if("rule"===t.type)return e(t,i)}))}};c.registerParse=t=>{n=t},c.registerRule=t=>{r=t},c.registerAtRule=t=>{i=t},c.registerRoot=t=>{s=t},e.exports=c,c.default=c,c.rebuild=t=>{let e=[t];for(;e.length>0;){let t=e.pop();if("atrule"===t.type?Object.setPrototypeOf(t,i.prototype):"rule"===t.type?Object.setPrototypeOf(t,r.prototype):"decl"===t.type?Object.setPrototypeOf(t,l.prototype):"comment"===t.type?Object.setPrototypeOf(t,o.prototype):"root"===t.type&&Object.setPrototypeOf(t,s.prototype),t[u]=!0,t.nodes)for(let i of t.nodes)e.push(i)}}}),Ri=gi((t,e)=>{var i=Ii(),n=class extends i{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};e.exports=n,n.default=n,i.registerAtRule(n)}),Ti=gi((t,e)=>{var i,s,r=Ii(),o=class extends r{constructor(t){super(n({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new i(new s,this,t).stringify()}};o.registerLazyResult=t=>{i=t},o.registerProcessor=t=>{s=t},e.exports=o,o.default=o}),Oi=gi((t,e)=>{e.exports={nanoid(t=21){let e="",i=0|t;for(;i-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e=21)=>(i=e)=>{let n="",s=0|i;for(;s-- >0;)n+=t[Math.random()*t.length|0];return n}}}),Di=gi((t,e)=>{var{existsSync:i,readFileSync:n}=wi(),{dirname:s,isAbsolute:r,join:o,relative:l,sep:a}=wi(),{SourceMapConsumer:h,SourceMapGenerator:u}=wi(),c=class{constructor(t,e){if(!1===e.map)return;e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=s(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(t){let e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));let i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return n=t.substr(i[0].length),Buffer?Buffer.from(n,"base64").toString():window.atob(n);var n;let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let i=t.lastIndexOf(e.pop()),n=t.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,n)))}loadFile(t,e,o){if(!o&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;let i=l(s(e),t);if(".."===i||i.startsWith(".."+a)||r(i))return}if(this.root=s(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof h)return u.fromSourceMap(e).toString();if(e instanceof u)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}{let i=e(t);if(i){let e=this.loadFile(i,t,!0);if(!e)throw new Error("Unable to load previous source map: "+i.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;t&&(e=o(s(t),e));let i=this.loadFile(e,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return i}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=c,c.default=c}),Ni=gi((t,e)=>{var{nanoid:i}=Oi(),{isAbsolute:s,resolve:r}=wi(),{SourceMapConsumer:o,SourceMapGenerator:l}=wi(),{fileURLToPath:a,pathToFileURL:h}=wi(),u=Si(),c=Di(),f=wi(),d=Symbol("lineToIndexCache"),p=Boolean(o&&l),m=Boolean(r&&s);function v(t){if(t[d])return t[d];let e=t.css.split("\n"),i=new Array(e.length),n=0;for(let t=0,s=e.length;s>t;t++)i[t]=n,n+=e[t].length+1;return t[d]=i,i}var y=class{get from(){return this.file||this.id}constructor(t,e={}){if(null==t||"object"==typeof t&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!m||/^\w+:\/\//.test(e.from)||s(e.from)?e.from:r(e.from)),m&&p){let t=new c(this.css,e);if(t.text){this.map=t;let e=t.consumer().file;!this.file&&e&&(this.file=this.mapResolve(e))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,i,n={}){let s,r,o,l,a;if(e&&"object"==typeof e){let t=e,n=i;if("number"==typeof t.offset){l=t.offset;let n=this.fromOffset(l);e=n.line,i=n.col}else l=this.fromLineAndColumn(e=t.line,i=t.column);if("number"==typeof n.offset){o=n.offset;let t=this.fromOffset(o);r=t.line,s=t.col}else r=n.line,s=n.column,o=this.fromLineAndColumn(n.line,n.column)}else if(i)l=this.fromLineAndColumn(e,i);else{l=e;let t=this.fromOffset(l);e=t.line,i=t.col}let c=this.origin(e,i,r,s);return a=c?new u(t,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):new u(t,void 0===r?e:{column:i,line:e},void 0===r?i:{column:s,line:r},this.css,this.file,n.plugin),a.input={column:i,endColumn:s,endLine:r,endOffset:o,line:e,offset:l,source:this.css},this.file&&(h&&(a.input.url=h(this.file).toString()),a.input.file=this.file),a}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){let e=v(this),i=0;if(e[e.length-1]>t){let n,s=e.length-2;for(;s>i;)if(n=i+(s-i>>1),e[n]>t)s=n-1;else{if(e[n+1]>t){i=n;break}i=n+1}}else i=e.length-1;return{col:t-e[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:r(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,i,n){if(!this.map)return!1;let r,o,l=this.map.consumer(),u=l.originalPositionFor({column:e-1,line:t});if(!u.source)return!1;if("number"==typeof i){let t=l.originalPositionFor({column:n-1,line:i});t.source&&(r=t)}o=s(u.source)?h(u.source):new URL(u.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let c={column:u.column+1,endColumn:r&&r.column+1,endLine:r&&r.line,line:u.line,url:o.toString()};if("file:"===o.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");c.file=a(o)}let f=l.sourceContentFor(u.source);return f&&(c.source=f),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=n({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=y,y.default=y,f&&f.registerInput&&f.registerInput(y)}),Li=gi((t,e)=>{var i,n,s=Ii(),r=class extends s{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,i){let n=new Set;for(let e of Array.isArray(t)?t:[t])e&&"object"==typeof e&&!e.parent&&e.raws&&void 0!==e.raws.before&&n.add(e.raws);let s=super.normalize(t);if(e)if("prepend"===i)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let t of s)n.has(t.raws)||(t.raws.before=e.raws.before);return s}removeChild(t,e){let i=this.index(t);return!e&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new i(new n,this,t).stringify()}};r.registerLazyResult=t=>{i=t},r.registerProcessor=t=>{n=t},e.exports=r,r.default=r,s.registerRoot(r)}),_i=gi((t,e)=>{var i={comma(t){return i.split(t,[","],!0)},space(t){return i.split(t,[" ","\n","\t"])},split(t,e,i){let n=[],s="",r=!1,o=0,l=!1,a="",h=!1;for(let i of t)h?h=!1:"\\"===i?h=!0:l?i===a&&(l=!1):'"'===i||"'"===i?(l=!0,a=i):"("===i?o+=1:")"===i?o>0&&(o-=1):0===o&&e.includes(i)&&(r=!0),r?(""!==s&&n.push(s.trim()),s="",r=!1):s+=i;return(i||""!==s)&&n.push(s.trim()),n}};e.exports=i,i.default=i}),Fi=gi((t,e)=>{var i=Ii(),n=_i(),s=class extends i{get selectors(){return n.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,i=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=s,s.default=s,i.registerRule(s)}),Pi=gi((t,e)=>{var i=Ri(),r=Ei(),o=Ai(),l=Ni(),h=Di(),u=Li(),c=Fi();function f(t,e){return t.inputs?t.inputs.map(t=>{let e=n(n({},t),{},{__proto__:l.prototype});return e.map&&(e.map=n(n({},e.map),{},{__proto__:h.prototype})),e}):e}function d(t,e,l){let h,f=n({},t);if(delete f.inputs,delete f.nodes,f.source){let t=f.source,{inputId:i}=t;f.source=s(t,a),null!=i&&(f.source.input=e[i])}if("root"===f.type)h=new u(f);else if("decl"===f.type)h=new o(f);else if("rule"===f.type)h=new c(f);else if("comment"===f.type)h=new r(f);else{if("atrule"!==f.type)throw new Error("Unknown node type: "+t.type);h=new i(f)}if(l){h.nodes=l;for(let t of l)t.parent=h}return h}function p(t,e){if(Array.isArray(t))return t.map(t=>p(t));let i,n=[{childIndex:0,children:[],inputs:f(t,e),json:t}];for(;n.length>0;){let t=n[n.length-1],e=t.json.nodes;if(e&&e.length>t.childIndex){let i=e[t.childIndex];t.childIndex+=1,n.push({childIndex:0,children:[],inputs:f(i,t.inputs),json:i});continue}n.pop();let s=d(t.json,t.inputs,e?t.children:void 0);n.length>0?n[n.length-1].children.push(s):i=s}return i}e.exports=p,p.default=p}),Bi=gi((t,e)=>{var{dirname:i,relative:n,resolve:s,sep:r}=wi(),{SourceMapConsumer:o,SourceMapGenerator:l}=wi(),{pathToFileURL:a}=wi(),h=Ni(),u=Boolean(o&&l),c=Boolean(i&&s&&n&&r);e.exports=class{constructor(t,e,i,n){this.stringify=t,this.mapOpts=i.map||{},this.root=e,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e,n=this.toUrl(this.path(t.file)),s=t.root||i(t.file);!1===this.mapOpts.sourcesContent?(e=new o(t.text),e.sourcesContent&&(e.sourcesContent=null)):e=t.consumer(),this.map.applySourceMap(e,n,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],"comment"===t.type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else if(this.css){let t;for(;-1!==(t=this.css.lastIndexOf("/*#"));){let e=this.css.indexOf("*/",t+3);if(-1===e)break;for(;t>0&&"\n"===this.css[t-1];)t--;this.css=this.css.slice(0,t)+this.css.slice(e+2)}}}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=l.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let t,e,i=1,n=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,l,a)=>{if(this.css+=o,l&&"end"!==a&&(r.generated.line=i,r.generated.column=n-1,l.source&&l.source.start?(r.source=this.sourcePath(l),r.original.line=l.source.start.line,r.original.column=l.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),e=o.match(/\n/g),e?(i+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,l&&"start"!==a){let t=l.parent||{raws:{}};("decl"!==l.type&&("atrule"!==l.type||l.nodes)||l!==t.last||t.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=i,r.generated.column=n-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=i,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));let o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new h(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let i=e.source.input.from;if(i&&!t[i]){t[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,e.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(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(a){let e=a(t).toString();return this.memoizedFileURLs.set(t,e),e}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;"\\"===r&&(t=t.replace(/\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}}}),ji=gi((t,e)=>{var i="'".charCodeAt(0),n='"'.charCodeAt(0),s="\\".charCodeAt(0),r="/".charCodeAt(0),o="\n".charCodeAt(0),l=" ".charCodeAt(0),a="\f".charCodeAt(0),h="\t".charCodeAt(0),u="\r".charCodeAt(0),c="[".charCodeAt(0),f="]".charCodeAt(0),d="(".charCodeAt(0),p=")".charCodeAt(0),m="{".charCodeAt(0),v="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),b=":".charCodeAt(0),w="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e={}){let x,E,A,I,R,T,O,D,N,L,_=t.css.valueOf(),F=e.ignoreErrors,P=_.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(B>=P)return;let e=!!t&&t.ignoreUnclosed;switch(x=_.charCodeAt(B),x){case o:case l:case h:case u:case a:I=B;do{I+=1,x=_.charCodeAt(I)}while(x===l||x===o||x===h||x===u||x===a);T=["space",_.slice(B,I)],B=I-1;break;case c:case f:case m:case v:case b:case y:case p:{let t=String.fromCharCode(x);T=[t,t,B];break}case d:if(L=j.length?j.pop()[1]:"",N=_.charCodeAt(B+1),"url"===L&&N!==i&&N!==n&&N!==l&&N!==o&&N!==h&&N!==a&&N!==u){I=B;do{if(O=!1,I=_.indexOf(")",I+1),-1===I){if(F||e){I=B;break}H("bracket")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["brackets",_.slice(B,I+1),B,I],B=I}else B>W?(I=_.indexOf(")",B+1),E=_.slice(B,I+1),-1===I||C.test(E)?(W=-1===I?P:I,T=["(","(",B]):(T=["brackets",E,B,I],B=I)):T=["(","(",B];break;case i:case n:R=x===i?"'":'"',I=B;do{if(O=!1,I=_.indexOf(R,I+1),-1===I){if(F||e){I=B+1;break}H("string")}for(D=I;_.charCodeAt(D-1)===s;)D-=1,O=!O}while(O);T=["string",_.slice(B,I+1),B,I],B=I;break;case w:S.lastIndex=B+1,S.test(_),I=0===S.lastIndex?_.length-1:S.lastIndex-2,T=["at-word",_.slice(B,I+1),B,I],B=I;break;case s:for(I=B,A=!0;_.charCodeAt(I+1)===s;)I+=1,A=!A;if(x=_.charCodeAt(I+1),A&&x!==r&&x!==l&&x!==o&&x!==h&&x!==u&&x!==a&&(I+=1,M.test(_.charAt(I)))){for(;M.test(_.charAt(I+1));)I+=1;_.charCodeAt(I+1)===l&&(I+=1)}T=["word",_.slice(B,I+1),B,I],B=I;break;default:x===r&&_.charCodeAt(B+1)===g?(I=_.indexOf("*/",B+2)+1,0===I&&(F||e?I=_.length:H("comment")),T=["comment",_.slice(B,I+1),B,I],B=I):(k.lastIndex=B+1,k.test(_),I=0===k.lastIndex?_.length-1:k.lastIndex-2,T=["word",_.slice(B,I+1),B,I],j.push(T),B=I)}return B++,T},position:()=>B}}}),Ui=gi((t,e)=>{var i=Ri(),n=Ei(),s=Ai(),r=Li(),o=Fi(),l=ji(),a={empty:!0,space:!0};function h(t,e,i){let n="";for(let s=e;i>s;s++)n+=t[s][1];return n}e.exports=class{constructor(t){this.input=t,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e,n,s,r=new i;r.name=t[1].slice(1),""===r.name&&this.unnamedAtrule(r,t),this.init(r,t[2]);let o=!1,l=!1,a=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=(t=this.tokenizer.nextToken())[0],"("===e||"["===e?h.push("("===e?")":"]"):"{"===e&&h.length>0?h.push("}"):e===h[h.length-1]&&h.pop(),0===h.length){if(";"===e){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===e){l=!0;break}if("}"===e){if(a.length>0){for(s=a.length-1,n=a[s];n&&"space"===n[0];)n=a[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(t);break}a.push(t)}else a.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),o&&(r.source.end=this.getPosition((t=a[a.length-1])[3]||t[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),l&&(r.nodes=[],this.current=r)}checkMissedSemicolon(t){let e=this.colon(t);if(!1===e)return;let i,n=0;for(let s=e-1;s>=0&&(i=t[s],"space"===i[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(t){let e,i,n,s=0;for(let[r,o]of t.entries()){if(i=o,n=i[0],"("===n&&(s+=1),")"===n&&(s-=1),0===s&&":"===n){if(e){if("word"===e[0]&&"progid"===e[1])continue;return r}this.doubleColon(i)}e=i}return!1}comment(t){let e=new n;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let i=t[1].slice(2,-2);if(i.trim()){let t=i.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}else e.text="",e.raws.left=i,e.raws.right=""}createTokenizer(){this.tokenizer=l(this.input)}decl(t,e){let i=new s;this.init(i,t[0][2]);let n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(let e=t.length-1;e>=0;e--){let i=t[e],n=i[3]||i[2];if(n)return n}}(t)),i.source.end.offset++;let r=0;for(;"word"!==t[r][0];)r===t.length-1&&this.unknownWord([t[r]]),r++;i.raws.before+=h(t,0,r),i.source.start=this.getPosition(t[r][2]);let o=r;for(;t.length>r;){let e=t[r][0];if(":"===e||"space"===e||"comment"===e)break;r++}i.prop=h(t,o,r);let l,a=r;for(;t.length>r&&(l=t[r],r++,":"!==l[0]);)"word"===l[0]&&/\w/.test(l[1])&&this.unknownWord([l]);i.raws.between=h(t,a,r),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let u=r;for(;t.length>r;){let e=t[r][0];if("space"!==e&&"comment"!==e)break;r++}let c=t.slice(u,r);t=t.slice(r),this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(l=t[e],"!important"===l[1].toLowerCase()){i.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n," !important"!==n&&(i.raws.important=n);break}if("important"===l[1].toLowerCase()){let n=t.slice(0),s="";for(let t=e;t>0;t--){let e=n[t][0];if(s.trim().startsWith("!")&&"space"!==e)break;s=n.pop()[1]+s}s.trim().startsWith("!")&&(i.important=!0,i.raws.important=s,t=n)}if("space"!==l[0]&&"comment"!==l[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(i.raws.between+=c.map(t=>t[1]).join(""),c=[]),this.raw(i,"value",c.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){let e=!1,i=null,n=!1,s=null,r=[],o=t[1].startsWith("--"),l=[],a=t;for(;a;){if(i=a[0],l.push(a),"("===i||"["===i)s||(s=a),r.push("("===i?")":"]");else if(o&&n&&"{"===i)s||(s=a),r.push("}");else if(0===r.length){if(";"===i){if(n)return void this.decl(l,o);break}if("{"===i)return void this.rule(l);if("}"===i){this.tokenizer.back(l.pop()),e=!0;break}":"===i&&(n=!0)}else i===r[r.length-1]&&(r.pop(),0===r.length&&(s=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),r.length>0&&this.unclosedBracket(s),e&&n){if(!o)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,i,n){let s,r,o,l,h=i.length,u="",c=!0;for(let t=0;h>t;t+=1)s=i[t],r=s[0],"space"!==r||t!==h-1||n?"comment"===r?(l=i[t-1]?i[t-1][0]:"empty",o=i[t+1]?i[t+1][0]:"empty",a[l]||a[o]||","===u.slice(-1)?c=!1:u+=s[1]):u+=s[1]:c=!1;if(!c){let n=i.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:n,value:u}}t[e]=u}rule(t){t.pop();let e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e||"comment"===e);)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let e,i="";for(;t.length&&(e=t[0][0],"space"===e||"comment"===e);)i+=t.shift()[1];return i}spacesFromEnd(t){let e,i="";for(;t.length&&(e=t[t.length-1][0],"space"===e);)i=t.pop()[1]+i;return i}stringFrom(t,e){let i="";for(let n=e;t.length>n;n++)i+=t[n][1];return t.splice(e,t.length-e),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),Wi=gi((t,e)=>{var i=Ii(),n=Ni(),s=Ui();function r(t,e){let i=new s(new n(t,e));try{i.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return i.root}e.exports=r,r.default=r,i.registerParse(r)}),$i=gi((t,e)=>{var i=Ii(),{my:n}=Mi(),s=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){e.node[n]||i.rebuild(e.node);let t=e.node.rangeBy(e);this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column}for(let t in e)this[t]=e[t]}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}};e.exports=s,s.default=s}),Hi=gi((t,e)=>{var i=$i(),n=class{get content(){return this.css}constructor(t,e,i){this.processor=t,this.messages=[],this.root=e,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let n=new i(t,e);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=n,n.default=n}),Gi=gi((t,e)=>{var i={};e.exports=function(t){i[t]||(i[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),zi=gi((t,e)=>{var i=Ii(),s=Ti(),r=Bi(),l=Wi(),a=Hi(),h=Li(),u=Ci(),{isClean:c,my:f}=Mi(),d=Gi(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={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},v={Once:!0,postcssPlugin:!0,prepare:!0};function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){let e=!1,i=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[i,i+"-"+e,0,i+"Exit",i+"Exit-"+e]:e?[i,i+"-"+e,i+"Exit",i+"Exit-"+e]:t.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function b(t){let e;return e="document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:g(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function w(t){let e=[t];for(;e.length>0;){let t=e.pop();if(t[c]=!1,t.nodes)for(let i of t.nodes)e.push(i)}return t}var S={},k=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof t||s instanceof a)o=w(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let t=l;r.syntax&&(t=r.syntax.parse),r.parser&&(t=r.parser),t.parse&&(t=t.parse);try{o=t(s,r)}catch(t){this.processed=!0,this.error=t}o&&!o[f]&&i.rebuild(o)}else o=w(s);this.result=new a(e,o,r),this.helpers=n(n({},S),{},{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?n(n({},t),t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){let i=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(i.postcssVersion){let t=i.postcssPlugin,e=i.postcssVersion,n=this.result.processor.version,s=e.split("."),r=n.split(".");(s[0]!==r[0]||parseInt(s[1])>parseInt(r[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+t+" uses "+e+". Perhaps this is the source of the error below.")}}else t.plugin=i.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};let t=(t,e,i)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,i])};for(let e of this.plugins)if("object"==typeof e)for(let i in e){if(!m[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!v[i])if("object"==typeof e[i])for(let n in e[i])t(e,"*"===n?i:i+"-"+n.toLowerCase(),e[i][n]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return o(function*(){t.plugin=0;for(let e=0;t.plugins.length>e;e++){let i=t.runOnRoot(t.plugins[e]);if(y(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){let e=t.result.root;for(;!e[c];){e[c]=!0;let i=[b(e)];for(;i.length>0;){let e=t.visitTick(i);if(y(e))try{yield e}catch(e){throw t.handleError(e,i[i.length-1].node)}}}if(t.listeners.OnceExit)for(let[i,n]of t.listeners.OnceExit){t.result.lastPlugin=i;try{if("document"===e.type){let i=e.nodes.map(e=>n(e,t.helpers));yield Promise.all(i)}else yield n(e,t.helpers)}catch(e){throw t.handleError(e)}}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){let e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(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 t=this.result.opts,e=u;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);let i=this.result.root.source;if(void 0===t.map&&!(i&&i.input&&i.input.map)){let t="";return e(this.result.root,e=>{t+=e}),this.result.css=t,this.result}let n=new r(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[c];)t[c]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(let[i,n]of t){let t;this.result.lastPlugin=i;try{t=n(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(t))throw this.getAsyncError()}}visitTick(t){let e=t[t.length-1],{node:i,visitors:n}=e;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void t.pop();if(n.length>0&&n.length>e.visitorIndex){let[t,s]=n[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===n.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=t;try{return s(i.toProxy(),this.helpers)}catch(t){throw this.handleError(t,i)}}if(0!==e.iterator){let n,s=e.iterator;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c])return n[c]=!0,void t.push(b(n));e.iterator=0,delete i.indexes[s]}let s=e.events;for(;s.length>e.eventIndex;){let t=s[e.eventIndex];if(e.eventIndex+=1,0===t)return void(i.nodes&&i.nodes.length&&(i[c]=!0,e.iterator=i.getIterator()));if(this.listeners[t])return void(e.visitors=this.listeners[t])}t.pop()}walkSync(t){t[c]=!0;let e=[{eventIndex:0,events:g(t),iterator:0,node:t}];for(;e.length>0;){let t=e[e.length-1],i=t.node;if(0!==t.iterator){let n,s=t.iterator,r=!1;for(;n=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!n[c]){n[c]=!0,e.push({eventIndex:0,events:g(n),iterator:0,node:n}),r=!0;break}if(r)continue;t.iterator=0,delete i.indexes[s]}if(t.events.length>t.eventIndex){let n=t.events[t.eventIndex];if(t.eventIndex+=1,0===n)i.nodes&&i.nodes.length&&(t.iterator=i.getIterator());else{let t=this.listeners[n];t&&this.visitSync(t,i.toProxy())&&e.pop()}continue}e.pop()}}warnings(){return this.sync().warnings()}};k.registerPostcss=t=>{S=t},e.exports=k,k.default=k,h.registerLazyResult(k),s.registerLazyResult(k)}),Vi=gi((t,e)=>{var i=Bi(),n=Wi(),s=Hi(),r=Ci(),o=Gi(),l=class{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 t,e=n;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,n){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=n,this._map=void 0;let o=r;this.result=new s(this._processor,void 0,this._opts),this.result.css=e;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new i(o,void 0,this._opts,e);if(a.isMap()){let[t,e]=a.generate();t&&(this.result.css=t),e&&(this.result.map=e)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=l,l.default=l}),Yi=gi((t,e)=>{var i=Ti(),n=zi(),s=Vi(),r=Li(),o=class{constructor(t=[]){this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let i of t)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))e=e.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)e.push(i);else{if("function"!=typeof i)throw"object"==typeof i&&(i.parse||i.stringify)?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."):new Error(i+" is not a PostCSS plugin");e.push(i)}return e}process(t,e={}){return this.plugins.length||e.parser||e.stringifier||e.syntax?new n(this,t,e):new s(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,r.registerProcessor(o),i.registerProcessor(o)}),qi=gi((t,e)=>{var i=Ri(),n=Ei(),s=Ii(),r=Si(),o=Ai(),l=Ti(),a=Pi(),h=Ni(),u=zi(),c=_i(),f=xi(),d=Wi(),p=Yi(),m=Hi(),v=Li(),y=Fi(),g=Ci(),b=$i();function w(...t){return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new p(t)}w.plugin=function(t,e){let i,n=!1;function s(...i){console&&console.warn&&!n&&(n=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=e(...i);return s.postcssPlugin=t,s.postcssVersion=(new p).version,s}return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(t,e,i){return w([s(i)]).process(t,e)},s},w.stringify=g,w.parse=d,w.fromJSON=a,w.list=c,w.comment=t=>new n(t),w.atRule=t=>new i(t),w.decl=t=>new o(t),w.rule=t=>new y(t),w.root=t=>new v(t),w.document=t=>new l(t),w.CssSyntaxError=r,w.Declaration=o,w.Container=s,w.Processor=p,w.Document=l,w.Comment=n,w.Warning=b,w.AtRule=i,w.Result=m,w.Input=h,w.Rule=y,w.Root=v,w.Node=f,u.registerPostcss(w),e.exports=w,w.default=w}),Zi=gi((t,e)=>{var i=Ei(),n=Ui(),s=ji();e.exports=class extends n{checkMissedSemicolon(){}comment(t){let e=new i;this.init(e,t[2]);let n=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:n.col,line:n.line,offset:t[3]+1};let s=t[1].slice(2);if("*/"===s.slice(-2)&&(s=s.slice(0,-2)),/^\s*$/.test(s))e.text="",e.raws.left=s,e.raws.right="";else{let t=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=t[2],e.raws.left=t[1],e.raws.right=t[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){let e,i,n=this.colon(t);if(!1===n)return;for(e=n-1;e>=0&&"word"!==t[e][0];e--);if(0===e||0>e)return;for(i=e-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}let s=t.slice(e),r=t.slice(i,e);t.splice(i,t.length-i),this.spaces=r.map(t=>t[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}});gi((t,e)=>{var{Input:i}=qi(),n=Zi();e.exports=function(t,e){let s=new n(new i(t,e));return s.parse(),s.root}})(),qi();var Xi=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}({});function Ji(t){const e=[];for(const i in t){const n=t[i];if("string"!=typeof n)continue;const s=nn(i);e.push(`${s}: ${n};`)}return e.join(" ")}var Qi=/-([a-z])/g,Ki=/^--[a-zA-Z0-9-]+$/,tn=t=>Ki.test(t)?t:t.replace(Qi,(t,e)=>e?e.toUpperCase():""),en=/\B([A-Z])/g,nn=t=>t.replace(en,"-$1").toLowerCase();function sn(t){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(t)}function rn(t,e,i){return(e=function(t){var e=function(t){if("object"!=sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=sn(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var on=class t{constructor(...t){rn(this,"parentElement",null),rn(this,"parentNode",null),rn(this,"ownerDocument",void 0),rn(this,"firstChild",null),rn(this,"lastChild",null),rn(this,"previousSibling",null),rn(this,"nextSibling",null),rn(this,"ELEMENT_NODE",1),rn(this,"TEXT_NODE",3),rn(this,"nodeType",void 0),rn(this,"nodeName",void 0),rn(this,"RRNodeType",void 0)}get childNodes(){const t=[];let e=this.firstChild;for(;e;)t.push(e),e=e.nextSibling;return t}contains(e){if(!(e instanceof t))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ln=class t extends on{constructor(...t){super(t),rn(this,"nodeType",9),rn(this,"nodeName","#document"),rn(this,"compatMode","CSS1Compat"),rn(this,"RRNodeType",Xi.Document),rn(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===Xi.Element&&"HTML"===t.tagName)||null}get body(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===Xi.Element&&"BODY"===t.tagName))||null}get head(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===Xi.Element&&"HEAD"===t.tagName))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const e=t.RRNodeType;if((e===Xi.Element||e===Xi.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===e))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${e===Xi.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=vn(this,t);return i.parentElement=null,i}insertBefore(t,e){const i=t.RRNodeType;if((i===Xi.Element||i===Xi.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===Xi.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const n=yn(this,t,e);return n.parentElement=null,n}removeChild(t){return gn(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){const t=this.createDocumentType("html",e,"");this.open(),this.appendChild(t)}}createDocument(e,i,n){return new t}createDocumentType(t,e,i){const n=new an(t,e,i);return n.ownerDocument=this,n}createElement(t){const e=new hn(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){const e=new fn(t);return e.ownerDocument=this,e}createComment(t){const e=new dn(t);return e.ownerDocument=this,e}createCDATASection(t){const e=new pn(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}},an=class extends on{constructor(t,e,i){super(),rn(this,"nodeType",10),rn(this,"RRNodeType",Xi.DocumentType),rn(this,"name",void 0),rn(this,"publicId",void 0),rn(this,"systemId",void 0),rn(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=i,this.nodeName=t}toString(){return"RRDocumentType"}},hn=class extends on{constructor(t){super(),rn(this,"nodeType",1),rn(this,"RRNodeType",Xi.Element),rn(this,"tagName",void 0),rn(this,"attributes",{}),rn(this,"shadowRoot",null),rn(this,"scrollLeft",void 0),rn(this,"scrollTop",void 0),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(e=>t+=e.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new mn(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?function(t){const e={},i=/:(.+)/;return t.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach(function(t){if(t){const n=t.split(i);n.length>1&&(e[tn(n[0].trim())]=n[1].trim())}}),e}(this.attributes.style):{},e=/\B([A-Z])/g;return t.setProperty=(i,n,s)=>{if(e.test(i))return;const r=tn(i);n?t[r]=n:delete t[r],"important"===s&&(t[r]+=" !important"),this.attributes.style=Ji(t)},t.removeProperty=i=>{if(e.test(i))return"";const n=tn(i),s=t[n]||"";return delete t[n],this.attributes.style=Ji(t),s},t}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,i){this.setAttribute(e,i)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return vn(this,t)}insertBefore(t,e){return yn(this,t,e)}removeChild(t){return gn(this,t)}attachShadow(t){const e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){let t="";for(const e in this.attributes)t+=`${e}="${this.attributes[e]}" `;return`${this.tagName} ${t}`}},un=class extends hn{constructor(...t){super(...t),rn(this,"currentTime",void 0),rn(this,"volume",void 0),rn(this,"paused",void 0),rn(this,"muted",void 0),rn(this,"playbackRate",void 0),rn(this,"loop",void 0)}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},cn=class extends hn{constructor(...t){super(...t),rn(this,"tagName","DIALOG"),rn(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}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")}},fn=class extends on{constructor(t){super(),rn(this,"nodeType",3),rn(this,"nodeName","#text"),rn(this,"RRNodeType",Xi.Text),rn(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}},dn=class extends on{constructor(t){super(),rn(this,"nodeType",8),rn(this,"nodeName","#comment"),rn(this,"RRNodeType",Xi.Comment),rn(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},pn=class extends on{constructor(t){super(),rn(this,"nodeName","#cdata-section"),rn(this,"nodeType",4),rn(this,"RRNodeType",Xi.CDATA),rn(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},mn=class{constructor(t,e){if(rn(this,"onChange",void 0),rn(this,"classes",[]),rn(this,"add",(...t)=>{for(const e of t){const t=String(e);0>this.classes.indexOf(t)&&this.classes.push(t)}this.onChange&&this.onChange(this.classes.join(" "))}),rn(this,"remove",(...t)=>{this.classes=this.classes.filter(e=>-1===t.indexOf(e)),this.onChange&&this.onChange(this.classes.join(" "))}),t){const e=t.trim().split(/\s+/);this.classes.push(...e)}this.onChange=e}};function vn(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function yn(t,e,i){if(!i)return vn(t,e);if(i.parentNode!==t)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===i||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=i.previousSibling,i.previousSibling=e,e.nextSibling=i,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function gn(t,e){if(e.parentNode!==t)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:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var bn=function(t){return t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t}({}),wn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Sn={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"},kn=null;function Cn(t,e,i,n=e.mirror||e.ownerDocument.mirror){t=function(t,e,i,n){if(i.afterAppend&&!kn&&(kn=new WeakSet,setTimeout(()=>{kn=null},0)),!An(t,e)){var s;const r=En(e,i.mirror,n);null===(s=t.parentNode)||void 0===s||s.replaceChild(r,t),t=r}switch(e.RRNodeType){case Xi.Document:if(!In(t,e,i.mirror,n)){const s=n.getMeta(e);s&&(i.mirror.removeNodeFromMap(t),t.close(),t.open(),i.mirror.add(t,s),null==kn||kn.add(t))}break;case Xi.Element:{const s=t,r=e;switch(r.tagName){case"IFRAME":{const s=t.contentDocument;if(!s)break;Cn(s,e.contentDocument,i,n);break}}r.shadowRoot&&(s.shadowRoot||vi(s))&&xn(s.shadowRoot,r.shadowRoot,i,n),function(t,e,i){const n=t.attributes,s=e.attributes;for(const n in s){const r=s[n],o=i.getMeta(e);if((null==o?void 0:o.isSVG)&&wn[n])t.setAttributeNS(wn[n],n,r);else if("CANVAS"===e.tagName&&"rr_dataURL"===n)Mn(t,r);else{if("IFRAME"===e.tagName&&"srcdoc"===n)continue;try{t.getAttribute(n)!==r&&t.setAttribute(n,r)}catch(t){console.warn(t)}}}for(const{name:e}of Array.from(n))e in s||t.removeAttribute(e);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(s,r,n);break}}return t}(t,e,i,n),xn(t,e,i,n),function(t,e,i){switch(e.RRNodeType){case Xi.Document:{const t=e.scrollData;t&&i.applyScroll(t,!0);break}case Xi.Element:{const n=t,s=e;switch(s.scrollData&&i.applyScroll(s.scrollData,!0),s.inputData&&i.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":{const e=t,i=s;void 0!==i.paused&&(i.paused?e.pause():e.play()),void 0!==i.muted&&(e.muted=i.muted),void 0!==i.volume&&(e.volume=i.volume),void 0!==i.currentTime&&(e.currentTime=i.currentTime),void 0!==i.playbackRate&&(e.playbackRate=i.playbackRate),void 0!==i.loop&&(e.loop=i.loop);break}case"CANVAS":{const s=e;null!==s.rr_dataURL&&Mn(n,s.rr_dataURL),s.canvasMutations.forEach(e=>i.applyCanvas(e.event,e.mutation,t));break}case"STYLE":{const t=n.sheet;t&&e.rules.forEach(e=>i.applyStyleSheetMutation(e,t));break}case"DIALOG":{const t=n,e=s,i=t.open,r=t.matches("dialog:modal"),o=e.open,l=e.isModal,a=r!==l,h=i!==o;if((a||i&&h)&&t.close(),o&&(h||a))try{l?t.showModal():t.show()}catch(t){console.warn(t)}break}}break}case Xi.Text:case Xi.Comment:case Xi.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}var n;(null==kn?void 0:kn.has(t))&&(kn.delete(t),null===(n=i.afterAppend)||void 0===n||n.call(i,t,i.mirror.getId(t)))}(t,e,i)}function Mn(t,e){const i=t.ownerDocument.createElement("img");i.onload=()=>{const e=t.getContext("2d");e&&e.drawImage(i,0,0,i.width,i.height)},i.src=e}function xn(t,e,i,n){const s=Array.from(t.childNodes),r=e.childNodes;if(0===s.length&&0===r.length)return;let o,l,a=0,h=s.length-1,u=0,c=r.length-1,f=s[a],d=s[h],p=r[u],m=r[c];for(;h>=a&&c>=u;)if(void 0===f)f=s[++a];else if(void 0===d)d=s[--h];else if(In(f,p,i.mirror,n))f=s[++a],p=r[++u];else if(In(d,m,i.mirror,n))d=s[--h],m=r[--c];else if(In(f,m,i.mirror,n)){try{t.insertBefore(f,d.nextSibling)}catch(t){console.warn(t)}f=s[++a],m=r[--c]}else if(In(d,p,i.mirror,n)){try{t.insertBefore(d,f)}catch(t){console.warn(t)}d=s[--h],p=r[++u]}else{if(!o){o={};for(let t=a;h>=t;t++){const e=s[t];e&&i.mirror.hasNode(e)&&(o[i.mirror.getId(e)]=t)}}l=o[n.getId(p)];const e=s[l];if(void 0!==l&&e&&In(e,p,i.mirror,n)){try{t.insertBefore(e,f)}catch(t){console.warn(t)}s[l]=void 0}else{const e=En(p,i.mirror,n);"#document"===t.nodeName&&f&&(e.nodeType===e.DOCUMENT_TYPE_NODE&&f.nodeType===f.DOCUMENT_TYPE_NODE||e.nodeType===e.ELEMENT_NODE&&f.nodeType===f.ELEMENT_NODE)&&(t.removeChild(f),i.mirror.removeNodeFromMap(f),f=s[++a]);try{t.insertBefore(e,f||null)}catch(t){console.warn(t)}}p=r[++u]}if(a>h){const e=r[c+1];let s=null;for(e&&(s=i.mirror.getNode(n.getId(e)));c>=u;++u){const e=En(r[u],i.mirror,n);try{t.insertBefore(e,s)}catch(t){console.warn(t)}}}else if(u>c)for(;h>=a;a++){const e=s[a];if(e&&e.parentNode===t)try{t.removeChild(e),i.mirror.removeNodeFromMap(e)}catch(t){console.warn(t)}}let v=t.firstChild,y=e.firstChild;for(;null!==v&&null!==y;)Cn(v,y,i,n),v=v.nextSibling,y=y.nextSibling}function En(t,e,i){const s=i.getId(t),r=i.getMeta(t);let o=null;if(s>-1&&(o=e.getNode(s)),null!==o&&An(o,t))return o;switch(t.RRNodeType){case Xi.Document:o=new Document;break;case Xi.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case Xi.Element:{let e=t.tagName.toLowerCase();e=Sn[e]||e,o=r&&"isSVG"in r&&(null==r?void 0:r.isSVG)?document.createElementNS(wn.svg,e):document.createElement(t.tagName);break}case Xi.Text:o=document.createTextNode(t.data);break;case Xi.Comment:o=document.createComment(t.data);break;case Xi.CDATA:o=document.createCDATASection(t.data)}r&&e.add(o,n({},r));try{null==kn||kn.add(o)}catch(t){}return o}function An(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function In(t,e,i,n){const s=i.getId(t),r=n.getId(e);return-1!==s&&s===r&&An(t,e)}var Rn=class t extends ln{get unserializedId(){return this.l--}constructor(t){super(),rn(this,"UNSERIALIZED_STARTING_ID",-2),rn(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),rn(this,"mirror",new Wn),rn(this,"scrollData",null),t&&(this.mirror=t)}createDocument(e,i,n){return new t}createDocumentType(t,e,i){const n=new Tn(t,e,i);return n.ownerDocument=this,n}createElement(t){const e=t.toUpperCase();let i;switch(e){case"AUDIO":case"VIDEO":i=new Dn(e);break;case"IFRAME":i=new Fn(e,this.mirror);break;case"CANVAS":i=new Ln(e);break;case"STYLE":i=new _n(e);break;case"DIALOG":i=new Nn(e);break;default:i=new On(e)}return i.ownerDocument=this,i}createComment(t){const e=new Bn(t);return e.ownerDocument=this,e}createCDATASection(t){const e=new jn(t);return e.ownerDocument=this,e}createTextNode(t){const e=new Pn(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.l=this.UNSERIALIZED_STARTING_ID}},Tn=an,On=class extends hn{constructor(...t){super(...t),rn(this,"inputData",null),rn(this,"scrollData",null)}},Dn=class extends un{},Nn=class extends cn{},Ln=class extends On{constructor(...t){super(...t),rn(this,"rr_dataURL",null),rn(this,"canvasMutations",[])}getContext(){return null}},_n=class extends On{constructor(...t){super(...t),rn(this,"rules",[])}},Fn=class extends On{constructor(t,e){super(t),rn(this,"contentDocument",new Rn),this.contentDocument.mirror=e}},Pn=fn,Bn=dn,jn=pn;function Un(t,e,i,s){let r;switch(t.nodeType){case bn.DOCUMENT_NODE:s&&"IFRAME"===s.nodeName?r=s.contentDocument:(r=e,r.compatMode=t.compatMode);break;case bn.DOCUMENT_TYPE_NODE:r=e.createDocumentType(t.name,t.publicId,t.systemId);break;case bn.ELEMENT_NODE:{const i=t,n=(o=i)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase();r=e.createElement(n);const s=r;for(const{name:t,value:e}of Array.from(i.attributes))s.attributes[t]=e;i.scrollLeft&&(s.scrollLeft=i.scrollLeft),i.scrollTop&&(s.scrollTop=i.scrollTop);break}case bn.TEXT_NODE:r=e.createTextNode(t.textContent||"");break;case bn.CDATA_SECTION_NODE:r=e.createCDATASection(t.data);break;case bn.COMMENT_NODE:r=e.createComment(t.textContent||"");break;case bn.DOCUMENT_FRAGMENT_NODE:{const t=s;if(!vi(t))return null;r=t.shadowRoot;break}default:return null}var o;let l=i.getMeta(t);return e instanceof Rn&&(l||(l=$n(r,e.unserializedId),i.add(t,l)),e.mirror.add(r,n({},l))),r}var Wn=class{constructor(){rn(this,"idNodeMap",new Map),rn(this,"nodeMetaMap",new WeakMap)}getId(t){var e,i;return t&&null!==(e=null===(i=this.getMeta(t))||void 0===i?void 0:i.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){const i=this.getNode(t);if(i){const t=this.nodeMetaMap.get(i);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function $n(t,e){switch(t.RRNodeType){case Xi.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case Xi.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case Xi.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case Xi.Text:case Xi.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case Xi.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function Hn(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date,"0".repeat(32),"0".repeat(16);var Gn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},zn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Vn={};function Yn(t){if(Vn[t])return Vn[t];const e=function(t){var e,i;const n=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(i=e.__symbol__)||void 0===i?void 0:i.call(e,t);return n&&globalThis[n]?globalThis[n]:void 0}(t)||globalThis[t],i=e.prototype,n=t in Gn?Gn[t]:void 0,s=Boolean(n&&n.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(i,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),r=t in zn?zn[t]:void 0,o=Boolean(r&&r.every(t=>{var e;return"function"==typeof i[t]&&(null===(e=i[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(s&&o)return Vn[t]=e.prototype,e.prototype;const l=document.createElement("iframe");l.style.display="none";let a=!1;try{document.body.appendChild(l);const n=l.contentWindow;if(!n)return e.prototype;const s=n[t].prototype;return s?(Hn(h=navigator.userAgent,"AppleWebKit")&&!Hn(h,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",t),a=!0),Vn[t]=s):i}catch(t){return i}finally{!a&&l.parentNode&&document.body.removeChild(l)}var h}var qn=Object.create(null);function Zn(t,e,i){var n;const s=qn[t],r=s[i];if(r)return r.call(e);const o=Yn(t),l=null===(n=Object.getOwnPropertyDescriptor(o,i))||void 0===n?void 0:n.get;return l?(s[i]=l,l.call(e)):e[i]}qn.Node=Object.create(null),qn.ShadowRoot=Object.create(null),qn.MutationObserver=Object.create(null),qn.Element=Object.create(null);var Xn,Jn={};function Qn(t,e,i){const n=`${t}.${String(i)}`;if(Jn[n])return Jn[n].bind(e);const s=Yn(t)[i];return"function"!=typeof s?e[i]:(Jn[n]=s,s.bind(e))}function Kn(){return Yn("MutationObserver").constructor}function ts(t,e,i){try{if(!(e in t))return()=>{};const n=t[e],s={next:n},r=i(function(...t){return s.next.apply(this,t)});return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n},__rrweb_layer__:{enumerable:!1,value:s}})),t[e]=r,()=>{if(t[e]===r)return void(t[e]=s.next);const i=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0};let n=t[e],o=i(n);for(;o;){if(o.next===r)return void(o.next=s.next);n=o.next,o=i(n)}}}catch(t){return()=>{}}}var es={childNodes:t=>Zn("Node",t,"childNodes"),parentNode:t=>Zn("Node",t,"parentNode"),parentElement:t=>Zn("Node",t,"parentElement"),textContent:t=>Zn("Node",t,"textContent"),isConnected(t){if(void 0===Xn){var e;const t=null===(e=Object.getOwnPropertyDescriptor(Yn("Node"),"isConnected"))||void 0===e?void 0:e.get;Xn=(null==t?void 0:t.toString().includes("[native code]"))?t:null}return null==Xn?void 0:Xn.call(t)},contains:(t,e)=>Qn("Node",t,"contains")(e),getRootNode:t=>Qn("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Zn("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Zn("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Qn("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Qn("Element",t,"querySelectorAll")(e),mutationObserver:Kn,patch:ts};function is(t){return is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(t)}function ns(t,e,i){return(e=function(t){var e=function(t){if("object"!=is(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=is(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==is(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ss=c({StyleSheetMirror:()=>Ns,_mirror:()=>us,callAllSafely:()=>as,callSafely:()=>ls,closestElementOfNode:()=>ys,getBaseDimension:()=>Is,getNestedRule:()=>Ts,getPositionsAndIndex:()=>Os,getRootShadowHost:()=>_s,getShadowHost:()=>Ls,getWindowHeight:()=>ms,getWindowScroll:()=>ps,getWindowWidth:()=>vs,hasShadowRoot:()=>Rs,hookSetter:()=>fs,inDom:()=>Ps,isAncestorRemoved:()=>Ss,isBlocked:()=>gs,isIgnored:()=>ws,isSerialized:()=>bs,isSerializedIframe:()=>Es,isSerializedStylesheet:()=>As,iterateResolveTree:()=>xs,legacy_isTouchEvent:()=>ks,nowTimestamp:()=>ds,on:()=>rs,polyfill:()=>Cs,queueToResolveTrees:()=>Ms,removeEventListenerSafely:()=>os,shadowHostInDom:()=>Fs,throttle:()=>cs,uniqueTextMutations:()=>Ds});function rs(t,e,i=document){const n={capture:!0,passive:!0};return i.addEventListener(t,e,n),()=>os(i,t,e,n)}function os(t,e,i,n){ls(()=>{const s=t.removeEventListener;"function"==typeof s&&(void 0!==n?s.call(t,e,i,n):s.call(t,e,i))})}function ls(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}function as(t){t.forEach(t=>{if("function"==typeof t)try{t()}catch(t){}})}var hs="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",us={map:{},getId(){return console.warn(hs),-1},getNode(){return console.warn(hs),null},removeNodeFromMap(){console.warn(hs)},has(){return console.warn(hs),!1},reset(){console.warn(hs)}};function cs(t,e,i={}){let n=null,s=0;return function(...r){const o=Date.now();s||!1!==i.leading||(s=o);const l=e-(o-s),a=this;0>=l||l>e?(n&&(clearTimeout(n),n=null),s=o,t.apply(a,r)):n||!1===i.trailing||(n=setTimeout(()=>{s=!1===i.leading?0:Date.now(),n=null,t.apply(a,r)},l))}}function fs(t,e,i,n,s=window){const r=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,n?i:{set(t){if(setTimeout(()=>{try{i.set.call(this,t)}catch(t){}},0),r&&r.set){if(r.get)try{r.get.call(this)}catch(t){return}r.set.call(this,t)}}}),()=>fs(t,e,r||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(us=new Proxy(us,{get(t,e,i){return"map"===e&&console.warn(hs),Reflect.get(t,e,i)}}));var ds=Date.now;function ps(t){var e,i,n,s;const r=t.document;return{left:r.scrollingElement?r.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:r.documentElement.scrollLeft||(null==r?void 0:r.body)&&(null===(e=es.parentElement(r.body))||void 0===e?void 0:e.scrollLeft)||(null==r||null===(i=r.body)||void 0===i?void 0:i.scrollLeft)||0,top:r.scrollingElement?r.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==r?void 0:r.documentElement.scrollTop)||(null==r?void 0:r.body)&&(null===(n=es.parentElement(r.body))||void 0===n?void 0:n.scrollTop)||(null==r||null===(s=r.body)||void 0===s?void 0:s.scrollTop)||0}}function ms(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ys(t){return t?t.nodeType===t.ELEMENT_NODE?t:es.parentElement(t):null}function gs(t,e,i,n){if(!t)return!1;const s=ys(t);if(!s)return!1;try{if("string"==typeof e){if(s.classList.contains(e))return!0;if(n&&null!==s.closest("."+e))return!0}else if(ze(s,e,n))return!0}catch(t){}if(i){if(s.matches(i))return!0;if(n&&null!==s.closest(i))return!0}return!1}function bs(t,e){return-1!==e.getId(t)}function ws(t,e,i){return!("TITLE"!==t.tagName||!i.headTitleMutations)||-2===e.getId(t)}function Ss(t,e){if(ot(t))return!1;const i=e.getId(t);if(!e.has(i))return!0;const n=es.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||Ss(n,e))}function ks(t){return Boolean(t.changedTouches)}function Cs(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function Ms(t){const e={},i=(t,i)=>{const n={value:t,parent:i,children:[]};return e[t.node.id]=n,n},n=[];for(const s of t){const{nextId:t,parentId:r}=s;if(t&&t in e){const r=e[t];if(r.parent){const t=r.parent.children.indexOf(r);r.parent.children.splice(t,0,i(s,r.parent))}else{const t=n.indexOf(r);n.splice(t,0,i(s,null))}continue}if(r in e){const t=e[r];t.children.push(i(s,t));continue}n.push(i(s,null))}return n}function xs(t,e){e(t.value);for(let i=t.children.length-1;i>=0;i--)xs(t.children[i],e)}function Es(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function As(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Is(t,e){var i;const n=null===(i=t.ownerDocument)||void 0===i||null===(i=i.defaultView)||void 0===i?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const s=n.getBoundingClientRect(),r=Is(n,e),o=s.height/n.clientHeight;return{x:s.x*r.relativeScale+r.x,y:s.y*r.relativeScale+r.y,relativeScale:o,absoluteScale:r.absoluteScale*o}}function Rs(t){return!!t&&(t instanceof on&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(es.shadowRoot(t)))}function Ts(t,e){const i=null==t?void 0:t[e[0]];return i?1===e.length?i:Ts(i.cssRules,e.slice(1)):null}function Os(t){const e=[...t];return{positions:e,index:e.pop()}}function Ds(t){const e=new Set,i=[];for(let n=t.length;n--;){const s=t[n];e.has(s.id)||(i.push(s),e.add(s.id))}return i}/[1-9][0-9]{12}/.test(Date.now().toString())||(ds=()=>(new Date).getTime());var Ns=class{constructor(){ns(this,"id",1),ns(this,"styleIDMap",new WeakMap),ns(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let i;return i=void 0===e?this.id++:e,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Ls(t){var e;let i=null;return"getRootNode"in t&&(null===(e=es.getRootNode(t))||void 0===e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&es.host(es.getRootNode(t))&&(i=es.host(es.getRootNode(t))),i}function _s(t){let e,i=t;for(;e=Ls(i);)i=e;return i}function Fs(t){const e=t.ownerDocument;if(!e)return!1;const i=_s(t);return es.contains(e,i)}function Ps(t){const e=t.ownerDocument;if(!e)return!1;if(es.contains(e,t))return!0;const i=es.isConnected(t);return"boolean"==typeof i?i:Fs(t)}var Bs=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}({}),js="rrweb/fullscreen",Us=function(t){return t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t}({}),Ws=function(t){return t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t}({}),$s=function(t){return t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t}({}),Hs=function(t){return t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t}({}),Gs=function(t){return t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t}({}),zs=function(t){return t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t}({}),Vs=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}({});function Ys(t){return"__ln"in t}var qs,Zs=class{constructor(){ns(this,"length",0),ns(this,"head",null),ns(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let i=0;t>i;i++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Ys(t.previousSibling)){const i=t.previousSibling.__ln.next;e.next=i,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,i&&(i.previous=e)}else if(t.nextSibling&&Ys(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},Xs=(t,e)=>`${t}@${e}`,Js=class{constructor(){ns(this,"frozen",!1),ns(this,"locked",!1),ns(this,"texts",[]),ns(this,"attributes",[]),ns(this,"attributeMap",new WeakMap),ns(this,"generatedAttributes",new WeakMap),ns(this,"removes",[]),ns(this,"mapRemoves",new Set),ns(this,"movedMap",{}),ns(this,"addedSet",new Set),ns(this,"movedSet",new Set),ns(this,"droppedSet",new Set),ns(this,"removesSubTreeCache",new Set),ns(this,"mutationCb",void 0),ns(this,"blockClass",void 0),ns(this,"blockSelector",void 0),ns(this,"maskTextClass",void 0),ns(this,"maskTextSelector",void 0),ns(this,"inlineStylesheet",void 0),ns(this,"maskInputOptions",void 0),ns(this,"maskTextFn",void 0),ns(this,"maskInputFn",void 0),ns(this,"maskAllElementAttributes",void 0),ns(this,"maskAttributeFn",void 0),ns(this,"keepIframeSrcFn",void 0),ns(this,"recordCanvas",void 0),ns(this,"canvasMaskingConfigured",void 0),ns(this,"inlineImages",void 0),ns(this,"slimDOMOptions",void 0),ns(this,"dataURLOptions",void 0),ns(this,"doc",void 0),ns(this,"mirror",void 0),ns(this,"iframeManager",void 0),ns(this,"stylesheetManager",void 0),ns(this,"shadowDomManager",void 0),ns(this,"canvasManager",void 0),ns(this,"processedNodeManager",void 0),ns(this,"unattachedDoc",void 0),ns(this,"canvasManagerReleased",!1),ns(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),ns(this,"emit",()=>{if(this.frozen||this.locked)return;const t=M(),e=I();try{this.processBufferedMutations()}finally{i=M()-t,n=e,O>0||T(i,null!=n?n:x)||i>U.slowestBatchMs&&(U.slowestBatchMs=i)}var i,n}),ns(this,"processBufferedMutations",()=>{const t=[],e=new Set,i=new Zs,n=t=>{let e=t,i=-2;for(;-2===i;)e=e&&e.nextSibling,i=e&&this.mirror.getId(e);return i};let s;const r=r=>{var o;const l=es.parentNode(r);if(!l||!Ps(r)||"TEXTAREA"===l.tagName)return;if(this.isBlockedAtEmission(l))return;const a=ot(l)?this.mirror.getId(Ls(r)):this.mirror.getId(l),h=n(r);if(-1===a||-1===h)return i.addNode(r);null!==(o=s)&&void 0!==o||(s={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,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{Es(t,this.mirror)&&this.iframeManager.addIframe(t),As(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),Rs(t)&&!gs(t,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(es.shadowRoot(t),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});const u=ei(r,s);u&&(t.push({parentId:a,nextId:h,node:u}),e.add(u.id))};for(const t of this.mapRemoves)this.mapRemoves.delete(t),this.mirror.removeNodeFromMap(t);for(const t of this.movedSet)Ks(this.removesSubTreeCache,t)&&!this.movedSet.has(es.parentNode(t))||r(t);for(const t of this.addedSet)tr(this.droppedSet,t)||Ks(this.removesSubTreeCache,t)?tr(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let o=null;for(;i.length;){let t=null;if(o){const e=this.mirror.getId(es.parentNode(o.value)),i=n(o.value);-1!==e&&-1!==i&&(t=o)}if(!t){let e=i.tail;for(;e;){const i=e;if(e=e.previous,i){const e=this.mirror.getId(es.parentNode(i.value));if(-1===n(i.value))continue;if(-1!==e){t=i;break}{const e=es.parentNode(i.value);if(e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const n=es.host(e);if(-1!==this.mirror.getId(n)){t=i;break}}}}}}if(!t){for(;i.head;)i.removeNode(i.head.value);break}o=t.previous,i.removeNode(t.value),r(t.value)}const l={texts:this.texts.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{const e=t.node,i=es.parentNode(e);return i&&"TEXTAREA"===i.tagName&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{const{attributes:e}=t;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof e.style){const i=JSON.stringify(t.styleDiff),n=JSON.stringify(t._unchangedStyles);e.style.length>i.length&&(i+n).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(const[n,s]of Object.entries(e))if("string"==typeof s||null===s){var i;e[n]=xt({element:t.node,name:n,value:s,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null===(i=this.generatedAttributes.get(t.node))||void 0===i?void 0:i.has(n)})}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!e.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},(l.texts.length||l.attributes.length||l.removes.length||l.adds.length)&&this.mutationCb(l)}),ns(this,"bufferBelongsToIframe",t=>this.doc===t.contentDocument),ns(this,"genTextAreaValueMutation",t=>{let e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e));const i=Array.from(es.childNodes(t),t=>es.textContent(t)||"").join("");e.attributes.value=kt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:At(t),value:i,maskInputFn:this.maskInputFn})}),ns(this,"processMutation",t=>{if(!ws(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const e=es.textContent(t.target);gs(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:Ve(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,ys(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{var e;const n=t.target,s=Ct(n.tagName),r=t.attributeName,o=null!==(e=t.attributeNamespace)&&void 0!==e?e:null;let l=function(t,e,i){if(!i)return e;const n=t.getAttributeNodeNS(i,e);if(n)return n.name;if("http://www.w3.org/1999/xlink"===i)return`xlink:${e}`;if("http://www.w3.org/XML/1998/namespace"===i)return`xml:${e}`;if("http://www.w3.org/2000/xmlns/"===i)return"xmlns"===e?e:`xmlns:${e}`;const s=t.lookupPrefix(i);return s?`${s}:${e}`:e}(n,r,o),a=o?n.getAttributeNS(o,r):t.target.getAttribute(r);if("value"===l){const t=n,e=At(t);a=kt({element:t,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:e,value:a,maskInputFn:this.maskInputFn})}if(gs(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;let h=this.attributeMap.get(t.target);const u="iframe"===s&&"src"===l;if(u&&!this.keepIframeSrcFn(a)&&n.contentDocument)return;if("type"===l&&"input"===s&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Ge(s,l)){var i;h||(h={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(h),this.attributeMap.set(t.target,h));const e=He(this.doc,s,Ct(l),a,n,this.dataURLOptions);if(u&&!this.keepIframeSrcFn(a)&&(l="rr_src"),h.attributes[l]=e,null===(i=this.generatedAttributes.get(t.target))||void 0===i||i.delete(l),"style"===l){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const e=this.unattachedDoc.createElement("span"),i=n.style;t.oldValue&&(e.style.cssText=t.oldValue);for(const t of Array.from(i)){const n=i.getPropertyValue(t),s=i.getPropertyPriority(t);n!==e.style.getPropertyValue(t)||s!==e.style.getPropertyPriority(t)?h.styleDiff[t]=""===s?n:[n,s]:h._unchangedStyles[t]=[n,s]}for(const t of Array.from(e.style))""===i.getPropertyValue(t)&&(h.styleDiff[t]=!1)}else if("open"===l&&"dialog"===s){h.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";let e=this.generatedAttributes.get(t.target);e||(e=new Set,this.generatedAttributes.set(t.target,e)),e.add("rr_open_mode")}}break}case"childList":if(gs(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const i=this.mirror.getId(e),n=ot(t.target)?this.mirror.getId(es.host(t.target)):this.mirror.getId(t.target);gs(t.target,this.blockClass,this.blockSelector,!1)||ws(e,this.mirror,this.slimDOMOptions)||!bs(e,this.mirror)||(this.addedSet.has(e)?(Qs(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===i||Ss(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Xs(i,n)]?Qs(this.movedSet,e):(this.removes.push({parentId:n,id:i,isShadow:!(!ot(t.target)||!at(t.target))||void 0}),function(t,e){const i=[t];for(;i.length;){const t=i.pop();e.has(t)||(e.add(t),es.childNodes(t).forEach(t=>i.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.add(e))})}}),ns(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)){if(this.addedSet.has(t))return this.addedSet.delete(t),void this.addedSet.add(t);if(!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(ws(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;e&&this.mirror.hasNode(e)&&(i=this.mirror.getId(e)),i&&-1!==i&&(this.movedMap[Xs(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);if(!gs(t,this.blockClass,this.blockSelector,!1)){if(t.nodeType===t.TEXT_NODE)return;const e=es.childNodes(t);for(let t=0,i=e.length;i>t;t++){const i=e[t];i&&this.genAdds(i)}if(Rs(t)){const e=es.childNodes(es.shadowRoot(t));for(let i=0,n=e.length;n>i;i++){const n=e[i];n&&(this.processedNodeManager.add(n,this),this.genAdds(n,t))}}}}}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]}),this.canvasManager.acquire()}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.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(const t of this.mapRemoves)this.mapRemoves.delete(t),this.mirror.removeNodeFromMap(t)}isBlockedAtEmission(t){const e=this.blockClass,i=e&&"string"!=typeof e&&(e.global||e.sticky)?new RegExp(e):null;for(;t;){if(i&&(i.lastIndex=0),gs(t,i||e,this.blockSelector,!0))return!0;const n="getRootNode"in t?es.getRootNode(t):null;t=(null==n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?es.host(n):null}return!1}};function Qs(t,e){const i=[e];for(;i.length;){const e=i.pop();if(t.delete(e),e.nodeType===e.TEXT_NODE)continue;const n=es.childNodes(e);for(let t=0,e=n.length;e>t;t++){const e=n[t];e&&i.push(e)}}}function Ks(t,e,i){return 0!==t.size&&function(t,e){const i=es.parentNode(e);return!!i&&t.has(i)}(t,e)}function tr(t,e){if(0===t.size)return!1;let i=es.parentNode(e);for(;i;){if(t.has(i))return!0;i=es.parentNode(i)}return!1}function er(t){qs=t}function ir(){qs=void 0}var nr=(t,e="rrweb")=>qs?(...i)=>{try{return t(...i)}catch(t){if(qs&&!0===qs(t,e))return;throw t}}:t,sr=[];function rr(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function or(t,e){const i=new Js;let n;i.init(t);try{n=new(Kn())(nr(i.processMutations.bind(i)));const s={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(s.attributeFilter=t.attributeFilter),n.observe(e,s),sr.push(i),{observer:n,buffer:i}}catch(t){try{null==n||n.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function lr({scrollCb:t,doc:e,mirror:i,blockClass:n,blockSelector:s,sampling:r}){const o=new Map,l=r=>{const l=rr(r);if(!l||gs(l,n,s,!0))return;const a=i.getId(l);let h,u;if(l===e&&e.defaultView){const t=ps(e.defaultView);h=t.left,u=t.top}else h=l.scrollLeft,u=l.scrollTop;const c=`${h},${u}`;o.get(a)!==c&&(o.set(a,c),t({id:a,x:h,y:u}))},a=[rs("scroll",nr(cs(nr(t=>l(t)),r.scroll||100)),e)];return"onscrollend"in e&&a.push(rs("scrollend",nr(l),e)),()=>a.forEach(t=>t())}function ar(t,e){for(let i=sr.length-1;i>=0;i--){const n=sr[i];if(!n)continue;let s=n.bufferBelongsToIframe(t);!s&&e&&e.has(n.bufferDoc())&&(s=!0),s&&(n.reset(),sr.splice(i,1))}}var hr=["INPUT","TEXTAREA","SELECT"],ur=new WeakMap;function cr(t){return function t(e,i){if(mr("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||mr("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||mr("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||mr("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);return i.unshift(n),t(e.parentRule,i)}if(e.parentStyleSheet){const t=Array.from(e.parentStyleSheet.cssRules).indexOf(e);i.unshift(t)}return i}(t,[])}function fr(t,e,i){let n,s;return t?(t.ownerNode?n=e.getId(t.ownerNode):s=i.getId(t),{styleId:s,id:n}):{}}function dr({mirror:t,stylesheetManager:e},i){var n,s;let r=null;r=t.getId("#document"===i.nodeName?i:es.host(i));const o="#document"===i.nodeName?null===(n=i.defaultView)||void 0===n?void 0:n.Document:null===(s=i.ownerDocument)||void 0===s||null===(s=s.defaultView)||void 0===s?void 0:s.ShadowRoot,l=(null==o?void 0:o.prototype)?Object.getOwnPropertyDescriptor(null==o?void 0:o.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&l?(Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var t;return null===(t=l.get)||void 0===t?void 0:t.call(this)},set(t){let i;try{var n;i=null===(n=l.set)||void 0===n?void 0:n.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(t){}return i}}),nr(()=>{Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function pr(t,e={}){const i=t.doc.defaultView;if(!i)return()=>{};let s,r;!function(t,e){const{mutationCb:i,mousemoveCb:n,mouseInteractionCb:s,scrollCb:r,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:h,styleDeclarationCb:u,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),i(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),n(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),s(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),r(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),o(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),l(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),a(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),h(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),c(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),f(...t)},t.selectionCb=(...t)=>{e.selection&&e.selection(...t),d(...t)},t.customElementCb=(...t)=>{e.customElement&&e.customElement(...t),p(...t)}}(t,e);const o=[],l=nr(()=>{try{if(r)try{r.destroy(),r.reset()}finally{const t=sr.indexOf(r);-1!==t&&sr.splice(t,1)}t.shadowDomManager.resetForDoc(t.doc),null==s||s.disconnect()}finally{as(o)}});try{if(t.recordDOM){const e=or(t,t.doc);s=e.observer,r=e.buffer}if(o.push(function({mousemoveCb:t,sampling:e,doc:i,mirror:n}){if(!1===e.mousemove)return()=>{};const s="number"==typeof e.mousemove?e.mousemove:50,r="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,l=[];const a=cs(nr(e=>{const i=Date.now()-o;t(l.map(t=>(t.timeOffset-=i,t)),e),l=[],o=null}),r),h=nr(cs(nr(t=>{const e=rr(t),{clientX:i,clientY:s}=ks(t)?t.changedTouches[0]:t;o||(o=ds()),l.push({x:i,y:s,id:n.getId(e),timeOffset:ds()-o}),a("undefined"!=typeof DragEvent&&t instanceof DragEvent?Us.Drag:t instanceof MouseEvent?Us.MouseMove:Us.TouchMove)}),s,{trailing:!1})),u=[rs("mousemove",h,i),rs("touchmove",h,i),rs("drag",h,i)];return nr(()=>{u.forEach(t=>t())})}(t)),o.push(function({mouseInteractionCb:t,doc:e,mirror:i,blockClass:s,blockSelector:r,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const l=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let h=null;return Object.keys(Ws).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==l[t]).forEach(o=>{let l=Ct(o);const u=(e=>o=>{const l=rr(o);if(gs(l,s,r,!0))return;let a=null,u=e;if("pointerType"in o){switch(o.pointerType){case"mouse":a=$s.Mouse;break;case"touch":a=$s.Touch;break;case"pen":a=$s.Pen}a===$s.Touch&&(Ws[e]===Ws.MouseDown?u="TouchStart":Ws[e]===Ws.MouseUp&&(u="TouchEnd"))}else ks(o)&&(a=$s.Touch);null!==a?(h=a,(u.startsWith("Touch")&&a===$s.Touch||u.startsWith("Mouse")&&a===$s.Mouse)&&(a=null)):Ws[e]===Ws.Click&&(a=h,h=null);const c=ks(o)?o.changedTouches[0]:o;if(!c)return;const f=i.getId(l),{clientX:d,clientY:p}=c;nr(t)(n({type:Ws[u],id:f,x:d,y:p},null!==a&&{pointerType:a}))})(o);if(window.PointerEvent)switch(Ws[o]){case Ws.MouseDown:case Ws.MouseUp:l=l.replace("mouse","pointer");break;case Ws.TouchStart:case Ws.TouchEnd:return}a.push(rs(l,u,e))}),nr(()=>{a.forEach(t=>t())})}(t)),o.push(lr(t)),o.push(function({viewportResizeCb:t},{win:e}){let i=-1,n=-1;return rs("resize",nr(cs(nr(()=>{const e=ms(),s=vs();i===e&&n===s||(t({width:Number(s),height:Number(e)}),i=e,n=s)}),200)),e)}(t,{win:i})),o.push(function({inputCb:t,doc:e,mirror:i,blockClass:s,blockSelector:r,ignoreClass:o,ignoreSelector:l,maskInputOptions:a,maskInputFn:h,sampling:u,userTriggeredOnInput:c}){function f(t){let i=rr(t);const n=t.isTrusted,u=e.defaultView;if(i&&u&&!(i instanceof u.HTMLElement))return;const f=i&&i.tagName;if(i&&"OPTION"===f&&(i=es.parentElement(i)),!i||!f||0>hr.indexOf(f)||gs(i,s,r,!0))return;if(i.classList.contains(o)||l&&i.matches(l))return;let p=i.value,m=!1;const v=At(i)||"";"radio"===v||"checkbox"===v?m=i.checked:(a[f.toLowerCase()]||a[v])&&(p=kt({element:i,maskInputOptions:a,tagName:f,type:v,value:p,maskInputFn:h})),d(i,c?{text:p,isChecked:m,userTriggered:n}:{text:p,isChecked:m});const y=i.name;"radio"===v&&y&&m&&e.querySelectorAll(`input[type="radio"][name="${y}"]`).forEach(t=>{if(t!==i){const e=t.value;d(t,c?{text:e,isChecked:!m,userTriggered:!1}:{text:e,isChecked:!m})}})}function d(e,s){const r=ur.get(e);if(!r||r.text!==s.text||r.isChecked!==s.isChecked){ur.set(e,s);const r=i.getId(e);nr(t)(n(n({},s),{},{id:r}))}}const p=("last"===u.input?["change"]:["input","change"]).map(t=>rs(t,nr(f),e)),m=e.defaultView;if(!m)return()=>{p.forEach(t=>t())};const v=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return v&&v.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map(t=>fs(t[0],t[1],{set(){nr(f)({target:this,isTrusted:!1})}},!1,m))),nr(()=>{as(p)})}(t)),o.push(function({mediaInteractionCb:t,blockClass:e,blockSelector:i,mirror:n,sampling:s,doc:r}){const o=nr(r=>cs(nr(s=>{const o=rr(s);if(!o||gs(o,e,i,!0))return;const{currentTime:l,volume:a,muted:h,playbackRate:u,loop:c}=o;t({type:r,id:n.getId(o),currentTime:l,volume:a,muted:h,playbackRate:u,loop:c})}),s.media||500)),l=[rs("play",o(Gs.Play),r),rs("pause",o(Gs.Pause),r),rs("seeked",o(Gs.Seeked),r),rs("volumechange",o(Gs.VolumeChange),r),rs("ratechange",o(Gs.RateChange),r)];return nr(()=>{l.forEach(t=>t())})}(t)),t.recordDOM){const e=function(t){const e=new Map,i=new Set;let n=!0;const s=t=>{if(n)try{t()}catch(t){}},r=t=>{var i;const n=e.get(t);if(n){for(;null===(i=n[0])||void 0===i?void 0:i.ready;){const t=n.shift();(null==t?void 0:t.emit)&&s(t.emit)}0===n.length&&e.delete(t)}};return{queueMutation(t,i){if(!t)return void s(i);const n=e.get(t);n?(n.push({emit:i,ready:!0}),r(t)):s(i)},queuePendingMutation(o,l,a){if(!n)return()=>{};let h=e.get(o);h||(h=[],e.set(o,h));const u={emit:l,ready:!1};h.push(u);let c,f=!1,d=!1;const p=()=>{f||d||(f=!0,void 0!==c&&i.delete(c),u.ready=!0,u.emit=void 0,r(o))};try{c=t.setTimeout(p,5e3),f||d?t.clearTimeout(c):i.add(c)}catch(t){p()}return e=>{!d&&n&&(d=!0,void 0!==c&&(t.clearTimeout(c),i.delete(c)),f?e&&s(a):(u.ready=!0,e||(u.emit=void 0),r(o)))}},reset(){n=!1,i.forEach(e=>t.clearTimeout(e)),i.clear(),e.clear()}}}(i);o.push(e.reset),o.push(function({styleSheetRuleCb:t,mirror:e,stylesheetManager:i},{win:n,mutationQueue:s}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r);const{id:h,styleId:u}=fr(r,e,i.styleMirror);return(h&&-1!==h||u&&-1!==u)&&s.queueMutation(r,()=>t({id:h,styleId:u,adds:[{rule:l,index:a}]})),a},"host")}),n.CSSStyleSheet.prototype.addRule=function(t,e,i=this.cssRules.length){return n.CSSStyleSheet.prototype.insertRule.apply(this,[`${t} { ${e} }`,i])};const o=n.CSSStyleSheet.prototype.deleteRule;let l,a;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r);const{id:h,styleId:u}=fr(r,e,i.styleMirror);return(h&&-1!==h||u&&-1!==u)&&s.queueMutation(r,()=>t({id:h,styleId:u,removes:[{index:l}]})),a},"host")}),n.CSSStyleSheet.prototype.removeRule=function(t){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},n.CSSStyleSheet.prototype.replace&&(l=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);try{const n=null==a?void 0:a.then;if(r.ownerNode||!a||"function"!=typeof n)return a;i.onCssomSheetMutation(r);const{id:o,styleId:h}=fr(r,e,i.styleMirror);if(!(o&&-1!==o||h&&-1!==h))return a;const u=s.queuePendingMutation(r,()=>t({id:o,styleId:h,replace:l}),()=>{const e=ft(r);null!==e&&t({id:o,styleId:h,replace:e})});try{n.call(a,()=>u(!0),()=>u(!1))}catch(t){u(!1)}}catch(t){}return a},"host")})),n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r);const{id:h,styleId:u}=fr(r,e,i.styleMirror);return(h&&-1!==h||u&&-1!==u)&&s.queueMutation(r,()=>t({id:h,styleId:u,replaceSync:l})),a},"host")}));const h={};vr("CSSGroupingRule")?h.CSSGroupingRule=n.CSSGroupingRule:(vr("CSSMediaRule")&&(h.CSSMediaRule=n.CSSMediaRule),vr("CSSConditionRule")&&(h.CSSConditionRule=n.CSSConditionRule),vr("CSSSupportsRule")&&(h.CSSSupportsRule=n.CSSSupportsRule));const u={};return Object.entries(h).forEach(([n,r])=>{u[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(u[n].insertRule,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r.parentStyleSheet);const{id:h,styleId:u}=fr(r.parentStyleSheet,e,i.styleMirror);if(r.parentStyleSheet&&(h&&-1!==h||u&&-1!==u)){const e=[...cr(r),a];s.queueMutation(r.parentStyleSheet,()=>t({id:h,styleId:u,adds:[{rule:l,index:e}]}))}return a},"host")}),r.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:nr((n,r,o)=>{const[l]=o,a=n.apply(r,o);i.onCssomSheetMutation(r.parentStyleSheet);const{id:h,styleId:u}=fr(r.parentStyleSheet,e,i.styleMirror);if(r.parentStyleSheet&&(h&&-1!==h||u&&-1!==u)){const e=[...cr(r),l];s.queueMutation(r.parentStyleSheet,()=>t({id:h,styleId:u,removes:[{index:e}]}))}return a},"host")})}),nr(()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,l&&(n.CSSStyleSheet.prototype.replace=l),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(h).forEach(([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule})})}(t,{win:i,mutationQueue:e})),o.push(dr(t,t.doc)),o.push(function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:i,stylesheetManager:n},{win:s,mutationQueue:r}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:nr((s,o,l)=>{var a;const[h,u,c]=l,f=s.apply(o,l);if(i.has(h))return f;const d=null===(a=o.parentRule)||void 0===a?void 0:a.parentStyleSheet;n.onCssomSheetMutation(d);const{id:p,styleId:m}=fr(d,e,n.styleMirror);if(p&&-1!==p||m&&-1!==m){const e=cr(o.parentRule);r.queueMutation(d,()=>t({id:p,styleId:m,set:{property:h,value:u,priority:c},index:e}))}return f},"host")});const l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:nr((s,o,l)=>{var a;const[h]=l,u=s.apply(o,l);if(i.has(h))return u;const c=null===(a=o.parentRule)||void 0===a?void 0:a.parentStyleSheet;n.onCssomSheetMutation(c);const{id:f,styleId:d}=fr(c,e,n.styleMirror);if(f&&-1!==f||d&&-1!==d){const e=cr(o.parentRule);r.queueMutation(c,()=>t({id:f,styleId:d,remove:{property:h},index:e}))}return u},"host")}),nr(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=l})}(t,{win:i,mutationQueue:e})),t.collectFonts&&o.push(function({fontCb:t,doc:e}){const i=e.defaultView;if(!i)return()=>{};const n=[],s=new WeakMap,r=i.FontFace;i.FontFace=function(t,e,i){const n=new r(t,e,i);return s.set(n,{family:t,buffer:"string"!=typeof e,descriptors:i,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),n};const o=ts(e.fonts,"add",function(e){return function(i){return setTimeout(nr(()=>{const e=s.get(i);e&&(t(e),s.delete(i))}),0),e.apply(this,[i])}});return n.push(()=>{i.FontFace=r}),n.push(o),nr(()=>{n.forEach(t=>t())})}(t))}o.push(function(t){const{doc:e,mirror:i,blockClass:n,blockSelector:s,selectionCb:r}=t;let o=!0;const l=nr(()=>{const t=e.getSelection();if(!t||o&&(null==t?void 0:t.isCollapsed))return;o=t.isCollapsed||!1;const l=[],a=t.rangeCount||0;for(let e=0;a>e;e++){const{startContainer:r,startOffset:o,endContainer:a,endOffset:h}=t.getRangeAt(e);gs(r,n,s,!0)||gs(a,n,s,!0)||l.push({start:i.getId(r),startOffset:o,end:i.getId(a),endOffset:h})}r({ranges:l})});return l(),rs("selectionchange",l)}(t)),o.push(function({doc:t,customElementCb:e}){const i=t.defaultView;return i&&i.customElements?ts(i.customElements,"define",function(t){return function(i,n,s){try{e({define:{name:i}})}catch(t){console.warn(`Custom element callback failed for ${i}`)}return t.apply(this,[i,n,s])}}):()=>{}}(t));for(const e of t.plugins)o.push(e.observer(e.callback,i,e.options))}catch(t){try{l()}catch(t){}throw t}return l}function mr(t){return void 0!==window[t]}function vr(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var yr=class{constructor(t){ns(this,"generateIdFn",void 0),ns(this,"iframeRemoteIdToLocalIdMap",new WeakMap),ns(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,i,n){if(0>e)return e;const s=i||this.getRemoteIdToLocalIdMap(t),r=n||this.getLocalIdToRemoteIdMap(t);let o=s.get(e);return void 0===o&&(o=this.generateIdFn(),s.set(e,o),r.set(o,e)),o}getIds(t,e){const i=this.getRemoteIdToLocalIdMap(t),n=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getId(t,e,i,n))}getRemoteId(t,e,i){var n;return"number"!=typeof e||0>e?e:null!==(n=(i||this.getLocalIdToRemoteIdMap(t)).get(e))&&void 0!==n?n:-1}getRemoteIds(t,e){const i=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getRemoteId(t,e,i))}reset(t){if(!t)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(t),this.iframeLocalIdToRemoteIdMap.delete(t)}getRemoteIdToLocalIdMap(t){let e=this.iframeRemoteIdToLocalIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToLocalIdMap.set(t,e)),e}getLocalIdToRemoteIdMap(t){let e=this.iframeLocalIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeLocalIdToRemoteIdMap.set(t,e)),e}},gr=class{constructor(t){ns(this,"iframes",new WeakMap),ns(this,"crossOriginIframeMap",new WeakMap),ns(this,"crossOriginIframeMirror",new yr(Fe)),ns(this,"crossOriginIframeStyleMirror",void 0),ns(this,"crossOriginIframeRootIdMap",new WeakMap),ns(this,"mirror",void 0),ns(this,"mutationCb",void 0),ns(this,"wrappedEmit",void 0),ns(this,"loadListener",void 0),ns(this,"pageHideListener",void 0),ns(this,"stylesheetManager",void 0),ns(this,"recordCrossOriginIframes",void 0),ns(this,"messageHandler",void 0),ns(this,"nestedIframeListeners",new Map),ns(this,"attachedWindows",new WeakMap),ns(this,"attachedDocuments",new WeakMap),ns(this,"attachedIframes",new Map),ns(this,"loadListenerDisposers",new WeakMap),ns(this,"iframeElementsById",new Map),ns(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new yr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){let i=this.loadListenerDisposers.get(t);i||(i=new Set,this.loadListenerDisposers.set(t,i)),i.add(e);const n=this.mirror.getId(t);-1!==n&&this.iframeElementsById.set(n,t)}getIframeElementById(t){var e,i,n;return null!==(e=null!==(i=null===(n=this.attachedIframes.get(t))||void 0===n?void 0:n.element)&&void 0!==i?i:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){const e=this.loadListenerDisposers.get(t);e&&(e.forEach(t=>ls(t)),this.loadListenerDisposers.delete(t))}removePageHideListener(t){const e=this.pageHideHandlers.get(t);e&&(e.forEach(({win:t,handler:e})=>{os(t,"pagehide",e)}),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){const i=this.mirror.getId(t);return this.attachedIframes.set(i,{element:t,content:e}),i}attachIframe(t,e){var i;const n=this.trackIframeContent(t,e);if(t.contentDocument){let e=this.attachedDocuments.get(t);e||(e=new Set,this.attachedDocuments.set(t,e)),e.add(t.contentDocument)}this.mutationCb({adds:[{parentId:n,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){const e=this.handleMessage.bind(this);ls(()=>{s.addEventListener("message",e),this.nestedIframeListeners.set(s,e);let i=this.attachedWindows.get(t);i||(i=new Set,this.attachedWindows.set(t,i)),i.add(s)})}ls(()=>{const e=t.contentWindow;if(!e)return;let i=this.pageHideHandlers.get(t);if(i)for(const t of i)if(t.win===e)return;const n=()=>{var e;null===(e=this.pageHideListener)||void 0===e||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument)};e.addEventListener("pagehide",n),i||(i=new Set,this.pageHideHandlers.set(t,i)),i.add({win:e,handler:n})}),null===(i=this.loadListener)||void 0===i||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const n=this.transformCrossOriginEvent(i,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Bs.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:Bs.IncrementalSnapshot,data:{source:Us.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Bs.Meta:case Bs.Load:case Bs.DomContentLoaded:return!1;case Bs.Plugin:return e;case Bs.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Bs.IncrementalSnapshot:switch(e.data.source){case Us.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(e.node,i)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Us.Drag:case Us.TouchMove:case Us.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Us.ViewportResize:return!1;case Us.MediaInteraction:case Us.MouseInteraction:case Us.Scroll:case Us.CanvasMutation:case Us.Input:return this.replaceIds(e.data,t,["id"]),e;case Us.StyleSheetRule:case Us.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Us.Font:return e;case Us.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case Us.AdoptedStyleSheet:var i;return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null===(i=e.data.styles)||void 0===i||i.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,i,n){for(const s of n)(Array.isArray(e[s])||"number"==typeof e[s])&&(e[s]=Array.isArray(e[s])?t.getIds(i,e[s]):t.getId(i,e[s]));return e}replaceIds(t,e,i){return this.replace(this.crossOriginIframeMirror,t,e,i)}replaceStyleIds(t,e,i){return this.replace(this.crossOriginIframeStyleMirror,t,e,i)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Vs.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}removeIframeById(t){const e=this.attachedIframes.get(t),i=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),i){const t=i.contentWindow,e=this.attachedWindows.get(i);e&&(e.forEach(t=>{const e=this.nestedIframeListeners.get(t);e&&(os(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)}),this.attachedWindows.delete(i)),t&&this.nestedIframeListeners.has(t)&&(os(t,"message",this.nestedIframeListeners.get(t)),this.nestedIframeListeners.delete(t)),t&&this.crossOriginIframeMap.delete(t),this.iframes.delete(i),this.disposeLoadListeners(i),this.removePageHideListener(i);const n=this.attachedDocuments.get(i);n&&(n.forEach(t=>{ls(()=>this.mirror.removeNodeFromMap(t))}),ls(()=>ar(i,n)),this.attachedDocuments.delete(i))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0===this.attachedIframes.size)return;const t=[];this.attachedIframes.forEach((e,i)=>{this.mirror.has(i)||t.push(i)}),t.forEach(t=>this.removeIframeById(t))}reattachIframes(){this.attachedIframes.forEach(({content:t},e)=>{this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)})}destroy(){this.recordCrossOriginIframes&&os(window,"message",this.messageHandler),this.nestedIframeListeners.forEach((t,e)=>{os(e,"message",t)}),this.nestedIframeListeners.clear();const t=new Set;this.iframeElementsById.forEach(e=>t.add(e)),this.attachedIframes.forEach(({element:e})=>t.add(e)),t.forEach(t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)}),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}},br=class{constructor(t){ns(this,"shadowDoms",new WeakSet),ns(this,"mutationCb",void 0),ns(this,"scrollCb",void 0),ns(this,"bypassOptions",void 0),ns(this,"mirror",void 0),ns(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){var i,s;if(!at(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=null!==(i=null===(s=es.host(t))||void 0===s?void 0:s.ownerDocument)&&void 0!==i?i:e,{observer:o,buffer:l}=or(n(n({},this.bypassOptions),{},{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push({doc:r,handler(){o.disconnect(),l.destroy(),l.releaseCanvasManager();const t=sr.indexOf(l);-1!==t&&sr.splice(t,1)}}),this.restoreHandlers.push({doc:r,handler:lr(n(n({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(es.host(t))),this.restoreHandlers.push({doc:r,handler:dr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)})},0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const i=this;this.restoreHandlers.push({doc:e,handler:ts(t.prototype,"attachShadow",function(t){return function(n){const s=t.call(this,n),r=es.shadowRoot(this);return r&&Ps(this)&&i.addShadowRoot(r,e),s}})})}reset(){this.restoreHandlers.forEach(({handler:t})=>{try{t()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){const e=[];for(const i of this.restoreHandlers)if(i.doc===t)try{i.handler()}catch(t){}else e.push(i);this.restoreHandlers=e}},wr="skip-frame";function Sr(t){if("object"!=typeof t||null===t)return!1;const{x:e,y:i,width:n,height:s}=t;return Number.isFinite(e)&&Number.isFinite(i)&&Number.isFinite(n)&&Number.isFinite(s)&&n>=0&&s>=0}for(var kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Mr=0;64>Mr;Mr++)Cr[kr.charCodeAt(Mr)]=Mr;var xr=function(t){var e,i=new Uint8Array(t),n=i.length,s="";for(e=0;n>e;e+=3)s+=kr[i[e]>>2],s+=kr[(3&i[e])<<4|i[e+1]>>4],s+=kr[(15&i[e+1])<<2|i[e+2]>>6],s+=kr[63&i[e+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s},Er=new Map,Ar=(t,e,i)=>{if(!t||!Tr(t,e)&&"object"!=typeof t)return;const n=function(t,e){let i=Er.get(t);return i||(i=new Map,Er.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}(i,t.constructor.name);let s=n.indexOf(t);return-1===s&&(s=n.length,n.push(t)),s};function Ir(t,e,i,n){if(t instanceof Array)return t.map(t=>Ir(t,e,i,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:xr(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Ir(t.buffer,e,i,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:i}=t;return{rr_type:e,src:i}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(n.type,n.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Ir(t.data,e,i,n),t.width,t.height]}:Tr(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ar(t,e,i)}:t}var Rr=(t,e,i,n)=>t.map(t=>Ir(t,e,i,n)),Tr=(t,e)=>{const i=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(i.find(i=>t instanceof e[i]))},Or=["webgl","webgl2"];function Dr(t){return"nodeType"in t}function Nr(t,e,i,s){const r=[];try{if(s){const s=function(t,e,i){const s=t.GPUCanvasContext;if((null==s?void 0:s.prototype)&&"function"==typeof s.prototype.configure)return ts(s.prototype,"configure",function(s){return function(r){const o=function(t){const{canvas:e}=t;return e&&"object"==typeof e?e:null}(this);if(!o||Dr(o)&&gs(o,e,i,!0))return s.call(this,r);Dr(o)&&!("__context"in o)&&(o.__context="webgpu");const l=function(t){const e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return s.call(this,null!==l&&r?n(n({},r),{},{usage:"number"==typeof r.usage?r.usage|l:l}):r)}})}(t,e,i);s&&r.push(s)}const o=ts(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(n,...r){const o=function(t){return"experimental-webgl"===t?"webgl":t}(n);if(!gs(this,e,i,!0)&&("__context"in this||(this.__context=o),s&&Or.includes(o)))if(r[0]&&"object"==typeof r[0]){const t=r[0];t.preserveDrawingBuffer||(t.preserveDrawingBuffer=!0)}else r.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[n,...r])}});r.push(o)}catch(t){console.warn("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(t=>t())}}function Lr(t,e,i,n,s,r,o){const l=[],a=Object.getOwnPropertyNames(t);for(const h of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if("function"!=typeof t[h])continue;const a=ts(t,h,function(t){return function(...l){const a=t.apply(this,l);if(Ar(a,r,this),this.canvas&&"tagName"in this.canvas&&!gs(this.canvas,n,s,!0)){const t=Rr(l,r,this,o);i(this.canvas,{type:e,property:h,args:t})}return a}});l.push(a)}catch(r){const o=fs(t,h,{set(t){this.canvas&&"tagName"in this.canvas&&!gs(this.canvas,n,s,!0)&&i(this.canvas,{type:e,property:h,args:[t],setter:!0})}});l.push(o)}return l}var _r='(function() {\n\t//#region ../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/base64-arraybuffer/1.0.2/f63fa6b5c318cf1c9f6bdd1d4292ad2f15f76f2ec78475025a2d44070e896fe9/node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js\n\tvar chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n\tvar lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);\n\tfor (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;\n\tvar encode = function(arraybuffer) {\n\t\tvar bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";\n\t\tfor (i = 0; i < len; i += 3) {\n\t\t\tbase64 += chars[bytes[i] >> 2];\n\t\t\tbase64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n\t\t\tbase64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n\t\t\tbase64 += chars[bytes[i + 2] & 63];\n\t\t}\n\t\tif (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "=";\n\t\telse if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "==";\n\t\treturn base64;\n\t};\n\t//#endregion\n\t//#region src/record/workers/image-bitmap-data-url-worker.ts\n\tconst lastFingerprintMap = /* @__PURE__ */ new Map();\n\tconst transparentFingerprintMap = /* @__PURE__ */ new Map();\n\tconst lastSentAtMap = /* @__PURE__ */ new Map();\n\tconst PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n\tfunction hashPixels(data) {\n\t\tconst view = new Uint32Array(data.buffer, data.byteOffset, data.byteLength >>> 2);\n\t\tlet primaryHash = 2166136261;\n\t\tlet secondaryHash = 2654435769;\n\t\tfor (let i = 0; i < view.length; i++) {\n\t\t\tprimaryHash ^= view[i];\n\t\t\tprimaryHash = Math.imul(primaryHash, 16777619);\n\t\t\tsecondaryHash ^= view[i];\n\t\t\tsecondaryHash = Math.imul(secondaryHash, 2246822507);\n\t\t}\n\t\treturn `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n\t}\n\tfunction frameFingerprint(width, height, data) {\n\t\treturn `${width}x${height}:${hashPixels(data)}`;\n\t}\n\tfunction transparentFingerprint(width, height) {\n\t\tconst pixelCount = width * height;\n\t\tlet hash = transparentFingerprintMap.get(pixelCount);\n\t\tif (hash === void 0) {\n\t\t\thash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n\t\t\ttransparentFingerprintMap.set(pixelCount, hash);\n\t\t}\n\t\treturn `${width}x${height}:${hash}`;\n\t}\n\tconst worker = self;\n\tlet reusableCanvas = null;\n\tlet reusableCtx = null;\n\tworker.onmessage = async function(e) {\n\t\tif ("resetFrameDedup" in e.data) {\n\t\t\tlastFingerprintMap.clear();\n\t\t\treturn;\n\t\t}\n\t\tif ("OffscreenCanvas" in globalThis) {\n\t\t\tconst { id, bitmap, width, height, displayWidth, displayHeight, dataURLOptions, maskRegions } = e.data;\n\t\t\ttry {\n\t\t\t\tif (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n\t\t\t\t\treusableCanvas = new OffscreenCanvas(width, height);\n\t\t\t\t\treusableCtx = reusableCanvas.getContext("2d", { willReadFrequently: true });\n\t\t\t\t}\n\t\t\t\tconst ctx = reusableCtx;\n\t\t\t\tctx.clearRect(0, 0, width, height);\n\t\t\t\tctx.drawImage(bitmap, 0, 0);\n\t\t\t\tbitmap.close();\n\t\t\t\tif (maskRegions) {\n\t\t\t\t\tctx.fillStyle = "black";\n\t\t\t\t\tfor (const region of maskRegions) ctx.fillRect(region.x, region.y, region.width, region.height);\n\t\t\t\t}\n\t\t\t\tconst fingerprint = frameFingerprint(width, height, ctx.getImageData(0, 0, width, height).data);\n\t\t\t\tif (fingerprint === (lastFingerprintMap.get(id) ?? transparentFingerprint(width, height))) {\n\t\t\t\t\tconst lastSentAt = lastSentAtMap.get(id);\n\t\t\t\t\tif (!(maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS)) return worker.postMessage({ id });\n\t\t\t\t}\n\t\t\t\tconst blob = await reusableCanvas.convertToBlob(dataURLOptions);\n\t\t\t\tconst arrayBuffer = await blob.arrayBuffer();\n\t\t\t\tworker.postMessage({\n\t\t\t\t\tid,\n\t\t\t\t\ttype: blob.type,\n\t\t\t\t\tbase64: encode(arrayBuffer),\n\t\t\t\t\tdisplayWidth,\n\t\t\t\t\tdisplayHeight\n\t\t\t\t});\n\t\t\t\tlastFingerprintMap.set(id, fingerprint);\n\t\t\t\tlastSentAtMap.set(id, Date.now());\n\t\t\t} catch {\n\t\t\t\tworker.postMessage({ id });\n\t\t\t}\n\t\t} else {\n\t\t\te.data.bitmap.close();\n\t\t\treturn worker.postMessage({ id: e.data.id });\n\t\t}\n\t};\n\t//#endregion\n})();\n',Fr="undefined"!=typeof self&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",_r],{type:"text/javascript;charset=utf-8"});function Pr(t){let e;try{if(e=Fr&&(self.URL||self.webkitURL).createObjectURL(Fr),!e)throw"";const i=new Worker(e,{name:null==t?void 0:t.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),i}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(_r),{name:null==t?void 0:t.name})}}var Br,jr,Ur,Wr=class{onFullSnapshot(){var t;null===(t=this.resetFrameDedup)||void 0===t||t.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){ns(this,"pendingCanvasMutations",new Map),ns(this,"rafStamps",{latestId:0,invokeId:null}),ns(this,"mirror",void 0),ns(this,"mutationCb",void 0),ns(this,"resetObservers",void 0),ns(this,"frozen",!1),ns(this,"locked",!1),ns(this,"rafIdTimestamp",null),ns(this,"rafIdFlush",null),ns(this,"refCount",0),ns(this,"torndown",!1),ns(this,"resetFrameDedup",null),ns(this,"processMutation",(t,e)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});const{sampling:e="all",win:i,blockClass:n,blockSelector:s,recordCanvas:r,dataURLOptions:o,resolutionScale:l,canvasMasking:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,r&&"all"===e&&this.initCanvasMutationObserver(i,n,s,o),r&&"number"==typeof e&&this.initCanvasFPSObserver(e,i,n,s,{dataURLOptions:o,resolutionScale:l,canvasMasking:a})}initCanvasFPSObserver(t,e,i,n,s){var r=this;if(!("OffscreenCanvas"in e))return;const l="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,a=Nr(e,i,n,!0),h=new Map;let u;try{u=new Pr}catch(t){return}let c=!1;u.onerror=()=>{var t;c=!0,cancelAnimationFrame(d),null===(t=u.terminate)||void 0===t||t.call(u),this.resetFrameDedup=null},this.resetFrameDedup=()=>{u.postMessage({resetFrameDedup:!0})},u.onmessage=t=>{const{id:e}=t.data;if(h.set(e,!1),!("base64"in t.data))return;const{base64:i,type:n,displayWidth:s,displayHeight:r}=t.data;this.mutationCb({id:e,type:Hs["2D"],commands:[{property:"clearRect",args:[0,0,s,r]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:n}]},0,0,s,r]}],displayWidth:s,displayHeight:r})};const f=1e3/t;let d,p=0;const m=t=>{var a;c||(p&&f>t-p||(p=t,(()=>{const t=[],s=e=>{try{e.querySelectorAll("canvas").forEach(e=>{gs(e,i,n,!0)||t.push(e)}),e.querySelectorAll("*").forEach(t=>{t.shadowRoot&&s(t.shadowRoot)})}catch(t){}};return s(e.document),t})().forEach((a=o(function*(t){const e=r.mirror.getId(t);if(!h.get(e)&&0!==t.width&&0!==t.height){h.set(e,!0);try{if(["webgl","webgl2"].includes(t.__context)){var i,n;const s=t.getContext(t.__context);if(null==s||null===(i=s.isContextLost)||void 0===i?void 0:i.call(s))return void h.set(e,!1);!1===(null==s||null===(n=s.getContextAttributes())||void 0===n?void 0:n.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}const r=t.clientWidth||t.width,o=t.clientHeight||t.height,a=Math.max(1,Math.round(r*l)),c=Math.max(1,Math.round(o*l)),f=function(t,e,i,n,s,r){if(!t||"function"!=typeof t.regionsFn)return;let o;try{o=t.regionsFn(e)}catch(t){return wr}if(void 0===o)return;if(!Array.isArray(o)||!o.every(Sr))return wr;const l=i/s,a=n/r;return o.filter(t=>t.width>0&&t.height>0).map(t=>{const e=Math.floor(t.x*l),i=Math.floor(t.y*a);return{x:e,y:i,width:Math.ceil((t.x+t.width)*l)-e,height:Math.ceil((t.y+t.height)*a)-i}})}(s.canvasMasking,t,a,c,r,o);if("skip-frame"===f)return void h.set(e,!1);const d=yield createImageBitmap(t,1>l?{resizeWidth:a,resizeHeight:c,resizeQuality:"medium"}:{resizeWidth:a,resizeHeight:c});u.postMessage({id:e,bitmap:d,width:a,height:c,displayWidth:r,displayHeight:o,dataURLOptions:s.dataURLOptions,maskRegions:f},[d])}catch(t){h.set(e,!1)}}}),function(t){return a.apply(this,arguments)}))),d=requestAnimationFrame(m))};d=requestAnimationFrame(m),this.resetObservers=()=>{var t;a(),cancelAnimationFrame(d),null===(t=u.terminate)||void 0===t||t.call(u),this.resetFrameDedup=null}}initCanvasMutationObserver(t,e,i,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Nr(t,e,i,!1),r=function(t,e,i,n,s){const r=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const l of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[l])continue;const o=ts(e.CanvasRenderingContext2D.prototype,l,function(r){return function(...o){return gs(this.canvas,i,n,!0)||setTimeout(()=>{const i=Rr(o,e,this,s);t(this.canvas,{type:Hs["2D"],property:l,args:i})},0),r.apply(this,o)}});r.push(o)}catch(s){const o=fs(e.CanvasRenderingContext2D.prototype,l,{set(e){gs(this.canvas,i,n,!0)||t(this.canvas,{type:Hs["2D"],property:l,args:[e],setter:!0})}});r.push(o)}return()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i,n),o=function(t,e,i,n,s){const r=[];return void 0!==e.WebGLRenderingContext&&r.push(...Lr(e.WebGLRenderingContext.prototype,Hs.WebGL,t,i,n,e,s)),void 0!==e.WebGL2RenderingContext&&r.push(...Lr(e.WebGL2RenderingContext.prototype,Hs.WebGL2,t,i,n,e,s)),()=>{r.forEach(t=>t())}}(this.processMutation.bind(this),t,e,i,n);this.resetObservers=()=>{s(),r(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const i=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,i)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||-1===e)return;const n=i.map(t=>s(t,h)),{type:r}=i[0];this.mutationCb({id:e,type:r,commands:n}),this.pendingCanvasMutations.delete(t)}},$r=class{constructor(t){var e;ns(this,"trackedLinkElements",new WeakSet),ns(this,"pendingDeferredSheets",new Set),ns(this,"mutationCb",void 0),ns(this,"adoptedStyleSheetCb",void 0),ns(this,"maskAllElementAttributes",void 0),ns(this,"maskAttributeFn",void 0),ns(this,"styleMirror",new Ns),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(e=t.maskAllElementAttributes)&&void 0!==e&&e,this.maskAttributeFn=t.maskAttributeFn}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}beginDeferredLinkInlining(t,e){if(-1===e||!t.isConnected)return null;let i=null,n=null;try{n=t.sheet,n&&(i=bt(n))}catch(t){}if(!i||!n)return Q(),null;const s=i;let r=!1;const o={sheet:n,invalidate(){r=!0}};this.pendingDeferredSheets.add(o);let l=!1;return{advance:i=>{if(l)return!0;const a=M(),h=I();let u=!0;try{if(r)return l=!0,Q(),!0;if(!s.advance(i))return u=!1,!1;l=!0;const o=s.text();if(!t.isConnected)return!0;let a=null;try{a=t.sheet}catch(t){}return a!==n?(Q(),!0):o?(this.emitCssTextMutation(t,e,o),!0):(Q(),!0)}finally{u&&this.pendingDeferredSheets.delete(o),T(c=M()-a,null!=(f=h)?f:x)||(W.totalMs+=c,c>W.slowestSliceMs&&(W.slowestSliceMs=c))}var c,f},remainingRules:()=>s.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(const e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var i;null===(i=this.beginDeferredLinkInlining(t,e))||void 0===i||i.advance(1/0)}emitCssTextMutation(t,e,i){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:xt({element:t,name:"_cssText",value:i,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const i={id:e,styleIds:[]},n=[];for(const e of t){let t;if(this.styleMirror.has(e))t=this.styleMirror.getId(e);else{const i=this.styleMirror.add(e);t=i;const s=M();try{q(()=>{try{const t=e.rules||e.cssRules;t&&Y(t)}catch(t){}n.push({styleId:i,rules:Array.from(e.rules||CSSRule,(t,i)=>({rule:dt(t,e.href),index:i}))})})}finally{Z(M()-s)}}i.styleIds.push(t)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),qe.forEach(t=>t.abort()),qe.clear()}trackStylesheetInLinkElement(t){}},Hr=class{constructor(){ns(this,"nodeMap",new WeakMap),ns(this,"active",!1)}inOtherBuffer(t,e){const i=this.nodeMap.get(t);return i&&Array.from(i).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}},Gr=!1;try{if(2!==Array.from([1],t=>2*t)[0]){var zr;const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null===(zr=t.contentWindow)||void 0===zr?void 0:zr.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}var Vr=St(),Yr=new Set([Us.Mutation,Us.MediaInteraction,Us.StyleSheetRule,Us.CanvasMutation,Us.Font,Us.Log,Us.StyleDeclaration,Us.AdoptedStyleSheet]);function qr(t){const e=window;if("function"==typeof e.requestIdleCallback){const i=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null===(t=e.cancelIdleCallback)||void 0===t?void 0:t.call(e,i)}}}const i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function Zr(t={}){let e;const{emit:i,checkoutEveryNms:s,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:l=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:f=!0,inlineStylesheetBudgetRules:d,maskAllInputs:p,maskInputOptions:m,slimDOMOptions:v,maskInputFn:y,maskTextFn:g,maskAllElementAttributes:b=!1,maskAttributeFn:w,hooks:S,packFn:k,sampling:C={},dataURLOptions:M={},canvasResolutionScale:x,canvasMasking:E,mousemoveWait:I,recordDOM:R=!0,recordCanvas:T=!1,recordCrossOriginIframes:O=!1,recordAfter:D=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:N=!1,collectFonts:L=!1,inlineImages:_=!1,plugins:F,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:B=new Set([]),attributeFilter:j,errorHandler:U}=t;er(U);const W=n({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},M),z=!O||window.parent===window;let V=!1;if(!z)try{window.parent.document&&(V=!1)}catch(t){V=!0}if(z&&!i)throw new Error("emit function is required");if(!z&&!V)return()=>{};void 0!==I&&void 0===C.mousemove&&(C.mousemove=I),Vr.reset();const Y=!0===p?{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}:void 0!==m?m:{password:!0},q=ii(void 0!==v&&v);let Z;Cs();let X=0;const Q=new Map;let tt,et;const it=t=>{for(const e of F||[])e.eventProcessor&&(t=e.eventProcessor(t));return k&&!V&&(t=k(t)),t};Br=(t,e)=>{var n;const o=t;if(o.timestamp=ds(),!(null===(n=sr[0])||void 0===n?void 0:n.isFrozen())||o.type===Bs.FullSnapshot||o.type===Bs.IncrementalSnapshot&&Yr.has(o.data.source)||sr.forEach(t=>t.unfreeze()),z)null==i||i(it(o),e);else if(V){const t={type:"rrweb",event:it(o),origin:window.location.origin,isCheckout:e};window.parent.postMessage(t,"*")}if(o.type===Bs.FullSnapshot)Z=o,X=0;else if(o.type===Bs.IncrementalSnapshot){if(o.data.source===Us.Mutation&&o.data.isAttachIframe)return;X++,(r&&X>=r||s&&o.timestamp-Z.timestamp>s)&&jr(!0)}};const nt=t=>{if(t.removes&&t.removes.length>0){const e=t.adds.length>0?new Set(t.adds.map(t=>t.node.id)):null,i=new Set;if(t.adds.length>0)for(const e of t.adds){const t=Vr.getNode(e.node.id);t&&"IFRAME"===t.nodeName&&i.add(t)}t.removes.forEach(({id:t})=>{if(e&&e.has(t))return;const n=lt.getIframeElementById(t);n&&i.has(n)?lt.forgetIframeId(t):(null==tt||tt(t),lt.removeIframeById(t))}),null==et||et(),lt.cleanupDetachedIframes()}Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Mutation},t)})},st=t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Scroll},t)}),rt=t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.CanvasMutation},t)}),ot=new $r({mutationCb:nt,adoptedStyleSheetCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.AdoptedStyleSheet},t)}),maskAllElementAttributes:b,maskAttributeFn:w}),lt=new gr({mirror:Vr,mutationCb:nt,stylesheetManager:ot,recordCrossOriginIframes:O,wrappedEmit:Br});for(const t of F||[])t.getMirror&&t.getMirror({nodeMirror:Vr,crossOriginIframeMirror:lt.crossOriginIframeMirror,crossOriginIframeStyleMirror:lt.crossOriginIframeStyleMirror});const at=new Hr,ht=null==E?void 0:E.configured;Ur=new Wr({recordCanvas:T,mutationCb:rt,win:window,blockClass:o,blockSelector:l,mirror:Vr,sampling:C.canvas,dataURLOptions:W,resolutionScale:x,canvasMasking:E});const ut=new br({mutationCb:nt,scrollCb:st,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:u,maskTextSelector:c,inlineStylesheet:f,maskInputOptions:Y,dataURLOptions:W,maskTextFn:g,maskInputFn:y,maskAllElementAttributes:b,maskAttributeFn:w,recordCanvas:T,canvasMaskingConfigured:ht,inlineImages:_,sampling:C,slimDOMOptions:q,iframeManager:lt,stylesheetManager:ot,canvasManager:Ur,keepIframeSrcFn:P,processedNodeManager:at,attributeFilter:j},mirror:Vr});jr=(t=!1)=>{if(R){H(d);try{Br({type:Bs.Meta,data:{href:window.location.href,width:vs(),height:ms()}},t),null==e||e.cancel(),e=void 0,ot.reset(),ut.init(),sr.forEach(t=>t.lock());let i=null,n=[];try{i=function(t,e){const{mirror:i=new wt,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:r="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:h=!1,canvasMaskingConfigured:u,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,maskAllElementAttributes:p=!1,maskAttributeFn:m,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:x=()=>!1,maxDepth:E,inlineStylesheetBudgetRules:A}=e||{},I=!0===c?{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}:!1===c?{password:!0}:c,R=ii(v);H(A);try{return ei(t,{doc:t,mirror:i,blockClass:n,blockSelector:s,maskTextClass:r,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:m,slimDOMOptions:R,dataURLOptions:y,inlineImages:a,recordCanvas:h,canvasMaskingConfigured:u,preserveWhiteSpace:g,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:x,newlyAddedElement:!1,maxDepth:E})}finally{G()}}(document,{mirror:Vr,blockClass:o,blockSelector:l,maskTextClass:u,maskTextSelector:c,inlineStylesheet:f,maskAllInputs:Y,inlineStylesheetBudgetRules:d,maskTextFn:g,maskInputFn:y,maskAllElementAttributes:b,maskAttributeFn:w,slimDOM:q,dataURLOptions:W,recordCanvas:T,canvasMaskingConfigured:ht,inlineImages:_,onSerialize(t){Es(t,Vr)&<.addIframe(t),As(t,Vr)&&ot.trackLinkElement(t),Rs(t)&&ut.addShadowRoot(es.shadowRoot(t),document)},onIframeLoad(t,e){lt.attachIframe(t,e),ut.observeAttachShadow(t)},onIframeListenerRegistered(t,e){lt.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){ot.attachLinkElement(t,e)},keepIframeSrcFn:P})}finally{n=J()}if(!i)return console.warn("Failed to snapshot the document");if(Br({type:Bs.FullSnapshot,data:{node:i,initialOffset:ps(window)}},t),sr.forEach(t=>t.unlock()),Ur.onFullSnapshot(),n.length){const t=function(t,e,i){let n=!1,s=null,r=0,o=null;const l=()=>null!==o||t.length>r,a=()=>{const i=t[r];t[r]=null,r+=1,i&&ls(()=>{o=e.beginDeferredLinkInlining(i,Vr.getId(i))})},h=()=>{if(!o)return;const t=o;let e=!0;ls(()=>{e=t.advance(200)}),e&&(o=null)},u=()=>{o||a(),h()},c=t=>{if(s=null,n)return;let e=0;do{try{u()}catch(t){null==o||o.discard(),o=null,K(1)}e+=1}while(!n&&l()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));n||(l()?s=qr(c):i())};return s=qr(c),{cancel(){n=!0,null==o||o.discard(),o=null,null==s||s.cancel(),s=null},flush(){if(n)return;n=!0,null==s||s.cancel(),s=null;let e=0,u=0;for(;l()&&50>e;){o||a();const t=o;if(t)if(Math.floor(t.remainingRules()/200)+1>50-e)t.discard(),o=null,u+=1;else{try{h()}catch(t){null==o||o.discard(),o=null,u+=1}e+=1}}if(l()||u>0){let e=u+(null!==o?1:0);for(let i=r;t.length>i;i++)null!==t[i]&&(e+=1);K(e),null==o||o.discard(),o=null}i()}}}(n,ot,()=>{e===t&&(e=void 0)});e=t}O&<.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ot.adoptStyleSheets(document.adoptedStyleSheets,Vr.getId(document))}finally{G()}}};try{const t=[];t.push(rs("pagehide",()=>{try{null==e||e.flush()}catch(t){}e=void 0},window));for(const e of["visibilitychange","freeze","resume"])t.push(rs(e,A,document));tt=e=>{const i=Q.get(e);i&&(i.forEach(e=>{ls(e);const i=t.indexOf(e);-1!==i&&t.splice(i,1)}),Q.delete(e))},et=()=>{for(const[t]of Q){const e=Vr.getNode(t);if(e)try{e.contentDocument&&e.contentDocument.defaultView||null==tt||tt(t)}catch(e){null==tt||tt(t)}else null==tt||tt(t)}};const i=t=>{var e;return nr(pr)({mutationCb:nt,mousemoveCb:(t,e)=>Br({type:Bs.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.MouseInteraction},t)}),scrollCb:st,viewportResizeCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.ViewportResize},t)}),inputCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Input},t)}),mediaInteractionCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.MediaInteraction},t)}),styleSheetRuleCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.StyleSheetRule},t)}),styleDeclarationCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.StyleDeclaration},t)}),canvasMutationCb:rt,fontCb:t=>Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Font},t)}),selectionCb(t){Br({type:Bs.IncrementalSnapshot,data:n({source:Us.Selection},t)})},customElementCb(t){Br({type:Bs.IncrementalSnapshot,data:n({source:Us.CustomElement},t)})},blockClass:o,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:c,maskInputOptions:Y,inlineStylesheet:f,sampling:C,recordDOM:R,recordCanvas:T,canvasMaskingConfigured:ht,inlineImages:_,userTriggeredOnInput:N,collectFonts:L,doc:t,maskInputFn:y,maskTextFn:g,maskAllElementAttributes:b,maskAttributeFn:w,keepIframeSrcFn:P,blockSelector:l,slimDOMOptions:q,dataURLOptions:W,mirror:Vr,iframeManager:lt,stylesheetManager:ot,shadowDomManager:ut,processedNodeManager:at,canvasManager:Ur,ignoreCSSAttributes:B,attributeFilter:j,plugins:(null==F||null===(e=F.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>Br({type:Bs.Plugin,data:{plugin:t.name,payload:e}})})))||[]},S)};lt.addLoadListener(e=>{try{const n=Vr.getId(e),s=i(e.contentDocument);if("function"==typeof s&&(t.push(s),-1!==n)){let t=Q.get(n);t||(t=new Set,Q.set(n,t)),t.add(s)}}catch(t){console.warn(t)}}),lt.addPageHideListener(t=>{const e=Vr.getId(t);null==tt||tt(e),ar(t)});let s=-1;const r=t=>Br({type:Bs.Custom,data:{tag:js,payload:t}}),d=()=>{var t,e,i,n;const o=document,l=null!==(t=null!==(e=null!==(i=null!==(n=o.fullscreenElement)&&void 0!==n?n:o.webkitFullscreenElement)&&void 0!==i?i:o.mozFullScreenElement)&&void 0!==e?e:o.msFullscreenElement)&&void 0!==t?t:null,a=l?Vr.getId(l):-1;a!==s&&(-1!==s&&r({id:s,enter:!1}),s=a,-1!==a&&r({id:a,enter:!0}))},p=()=>{jr();const e=i(document);"function"==typeof e&&t.push(e),t.push(rs("fullscreenchange",d)),t.push(rs("webkitfullscreenchange",d)),t.push(rs("mozfullscreenchange",d)),t.push(rs("MSFullscreenChange",d)),Gr=!0};return["interactive","complete"].includes(document.readyState)?p():(t.push(rs("DOMContentLoaded",()=>{Br({type:Bs.DomContentLoaded,data:{}}),"DOMContentLoaded"===D&&p()})),t.push(rs("load",()=>{Br({type:Bs.Load,data:{}}),"load"===D&&p()},window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,as(t),at.destroy(),lt.removeLoadListener(),lt.destroy(),Q.clear(),ut.reset(),Vr.reset(),Gr=!1,ir()}}catch(t){console.warn(t)}}Zr.addCustomEvent=(t,e)=>{if(!Gr)throw new Error("please add custom event after start recording");Br({type:Bs.Custom,data:{tag:t,payload:e}})},Zr.freezePage=()=>{sr.forEach(t=>t.freeze())},Zr.takeFullSnapshot=t=>{if(!Gr)throw new Error("please take full snapshot after start recording");jr(t)},Zr.mirror=Vr;var Xr=c({default:()=>Jr});function Jr(t){return{all:t=t||new Map,on(e,i){var n=t.get(e);n?n.push(i):t.set(e,[i])},off(e,i){var n=t.get(e);n&&(i?n.splice(n.indexOf(i)>>>0,1):t.set(e,[]))},emit(e,i){var n=t.get(e);n&&n.slice().map(function(t){t(i)}),(n=t.get("*"))&&n.slice().map(function(t){t(e,i)})}}}function Qr(t=window,e=document){if("scrollBehavior"in e.documentElement.style&&!0!==t.__forceSmoothScrollPolyfill__)return;const i=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||l,scrollIntoView:i.prototype.scrollIntoView},s=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,r=(o=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(o)?1:0);var o;function l(t,e){this.scrollLeft=t,this.scrollTop=e}function a(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+r:"X"===e?t.scrollWidth>t.clientWidth+r:void 0}function u(e,i){const n=t.getComputedStyle(e,null)["overflow"+i];return"auto"===n||"scroll"===n}function c(t){const e=h(t,"Y")&&u(t,"Y"),i=h(t,"X")&&u(t,"X");return e||i}function f(e){let i,n,r,o=(s()-e.startTime)/468;o=o>1?1:o,i=.5*(1-Math.cos(Math.PI*o)),n=e.startX+(e.x-e.startX)*i,r=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,n,r),n===e.x&&r===e.y||t.requestAnimationFrame(f.bind(t,e))}function d(i,r,o){let a,h,u,c;const d=s();i===e.body?(a=t,h=t.scrollX||t.pageXOffset,u=t.scrollY||t.pageYOffset,c=n.scroll):(a=i,h=i.scrollLeft,u=i.scrollTop,c=l),f({scrollable:a,method:c,startTime:d,startX:h,startY:u,x:r,y:o})}t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?d.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(a(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):d.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0===arguments[0])return;if(!0===a(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");return void n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}const t=arguments[0].left,e=arguments[0].top;d.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==a(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0===a(arguments[0]))return void n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0]);const i=function(t){for(;t!==e.body&&!1===c(t);)t=t.parentNode||t.host;return t}(this),s=i.getBoundingClientRect(),r=this.getBoundingClientRect();i!==e.body?(d.call(this,i,i.scrollLeft+r.left-s.left,i.scrollTop+r.top-s.top),"fixed"!==t.getComputedStyle(i).position&&t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})):t.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}}var Kr,to=class{constructor(t=[],e){ns(this,"timeOffset",0),ns(this,"speed",void 0),ns(this,"actions",void 0),ns(this,"raf",null),ns(this,"lastTimestamp",void 0),ns(this,"onActionError",void 0),this.actions=t,this.speed=e.speed,this.onActionError=e.onActionError}addAction(t){const e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){const e=this.findActionIndex(t);this.actions.splice(e,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const t=this.actions[0];if(t.delay>this.timeOffset)break;this.actions.shift();try{t.doAction()}catch(t){var e;null===(e=this.onActionError)||void 0===e||e.call(this,t)}}null!==this.raf&&(this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this)))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){let e=0,i=this.actions.length-1;for(;i>=e;){const n=Math.floor((e+i)/2);if(t.delay>this.actions[n].delay)e=n+1;else{if(t.delay>=this.actions[n].delay)return n+1;i=n-1}}return e}};function eo(t){const e=null==t?void 0:t.timeOffset;return"number"!=typeof e||Number.isNaN(e)?void 0:e}function io(t){const e=t.positions;if(Array.isArray(e)&&e.length)return eo(e[0])}function no(t,e){if(t.type===Bs.IncrementalSnapshot&&t.data.source===Us.MouseMove){const i=io(t.data);if(void 0!==i){const n=t.timestamp+i;return t.delay=n-e,n-e}}return t.delay=t.timestamp-e,t.delay}function so(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,s,r=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=r.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(s)throw s.error}}return o}!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(Kr||(Kr={}));var ro={type:"xstate.init"};function oo(t){return void 0===t?[]:[].concat(t)}function lo(t){return{type:"xstate.assign",assignment:t}}function ao(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function ho(t){return function(e){return t===e}}function uo(t){return"string"==typeof t?{type:t}:t}function co(t,e){return{value:t,context:e,actions:[],changed:!1,matches:ho(t)}}function fo(t,e,i){var n=e,s=!1;return[t.filter(function(t){if("xstate.assign"===t.type){s=!0;var e=Object.assign({},n);return"function"==typeof t.assignment?e=t.assignment(n,i):Object.keys(t.assignment).forEach(function(s){e[s]="function"==typeof t.assignment[s]?t.assignment[s](n,i):t.assignment[s]}),n=e,!1}return!0}),n,s]}function po(t,e){void 0===e&&(e={});var i=so(fo(oo(t.states[t.initial].entry).map(function(t){return ao(t,e.actions)}),t.context,ro),2),n={config:t,it:e,initialState:{value:t.initial,actions:i[0],context:i[1],matches:ho(t.initial)},transition(e,i){var s,r,o="string"==typeof e?{value:e,context:t.context}:e,l=o.value,a=o.context,h=uo(i),u=t.states[l];if(u.on){var c=oo(u.on[h.type]);try{for(var f=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:()=>(t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t})}}(c),d=f.next();!d.done;d=f.next()){var p=d.value;if(void 0===p)return co(l,a);var m="string"==typeof p?{target:p}:p,v=m.target,y=void 0===v?l:v,g=m.actions,b=void 0===g?[]:g,w=m.cond;if((void 0===w?function(){return!0}:w)(a,h)){var S=so(fo([].concat(u.exit,b,t.states[y].entry).filter(function(t){return t}).map(function(t){return ao(t,n.it.actions)}),a,h),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==l||k.length>0||S[2],matches:ho(y)}}}}catch(t){s={error:t}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(s)throw s.error}}}return co(l,a)}};return n}var mo=function(t,e){return t.actions.forEach(function(i){var n=i.exec;return n&&n(t.context,e)})};function vo(t){var e=t.initialState,i=Kr.NotStarted,n=new Set,s={u:t,send(s){i===Kr.Running&&(e=t.transition(e,s),mo(e,uo(s)),n.forEach(function(t){return t(e)}))},subscribe:t=>(n.add(t),t(e),{unsubscribe:()=>n.delete(t)}),start(n){if(n){var r="object"==typeof n?n:{context:t.config.context,value:n};e={value:r.value,actions:[],context:r.context,matches:ho(r.value)}}return i=Kr.Running,mo(e,ro),s},stop:()=>(i=Kr.Stopped,n.clear(),s),get state(){return e},get status(){return i}};return s}function yo(t,e){for(let i=t.length-1;i>=0;i--){const n=t[i];if(n.type===Bs.Meta&&e>=n.timestamp)return t.slice(i)}return t}var go=new Map;function bo(t,e){let i=go.get(t);return i||(i=new Map,go.set(t,i)),i.has(e)||i.set(e,[]),i.get(e)}function wo(t,e,i){return n=o(function*(n){if(n&&"object"==typeof n&&"rr_type"in n){if(i&&(i.isUnchanged=!1),"ImageBitmap"===n.rr_type&&"args"in n){const s=yield wo(t,e,i)(n.args);return yield createImageBitmap.apply(null,s)}if("index"in n){if(i||null===e)return n;const{rr_type:t,index:s}=n;return bo(e,t)[s]}if("args"in n){const{rr_type:s,args:r}=n;return new(0,window[s])(...yield Promise.all(r.map(wo(t,e,i))))}if("base64"in n)return function(t){var e,i,n,s,r,o=.75*t.length,l=t.length,a=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var h=new ArrayBuffer(o),u=new Uint8Array(h);for(e=0;l>e;e+=4)i=Cr[t.charCodeAt(e)],n=Cr[t.charCodeAt(e+1)],s=Cr[t.charCodeAt(e+2)],r=Cr[t.charCodeAt(e+3)],u[a++]=i<<2|n>>4,u[a++]=(15&n)<<4|s>>2,u[a++]=(3&s)<<6|63&r;return h}(n.base64);if("src"in n){const e=t.get(n.src);if(e)return e;{const e=new Image;return e.src=n.src,t.set(n.src,e),e}}if("data"in n&&"Blob"===n.rr_type){const s=yield Promise.all(n.data.map(wo(t,e,i)));return new Blob(s,{type:n.type})}}else if(Array.isArray(n))return yield Promise.all(n.map(wo(t,e,i)));return n}),function(t){return n.apply(this,arguments)};var n}var So=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function ko(t){return Co.apply(this,arguments)}function Co(){return Co=o(function*({mutation:t,target:e,type:i,imageMap:n,errorHandler:s}){try{const s=function(t,e){try{return e===Hs.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(e,i);if(!s)return;if(t.setter)return void(s[t.property]=t.args[0]);const r=s[t.property],o=yield Promise.all(t.args.map(wo(n,s)));!function(t,e){if(!(null==e?void 0:e.constructor))return;const{name:i}=e.constructor;if(!So.includes(i))return;const n=bo(t,i);n.includes(e)||n.push(e)}(s,r.apply(s,o))}catch(e){s(t,e)}}),Co.apply(this,arguments)}function Mo(){return Mo=o(function*({event:t,mutations:e,target:i,imageMap:n,errorHandler:s}){const r=i.getContext("2d");if(!r)return void s(e[0],new Error("Canvas context is null"));const l=e.map((a=o(function*(t){return Promise.all(t.args.map(wo(n,r)))}),function(t){return a.apply(this,arguments)}));var a;(yield Promise.all(l)).forEach((i,o)=>{const l=e[o];try{if(l.setter)return void(r[l.property]=l.args[0]);const e=r[l.property];"drawImage"===l.property&&"string"==typeof l.args[0]?(n.get(t),e.apply(r,l.args)):e.apply(r,i)}catch(t){s(l,t)}})}),Mo.apply(this,arguments)}function xo(t){return Eo.apply(this,arguments)}function Eo(){return Eo=o(function*({event:t,mutation:e,target:i,imageMap:n,canvasEventMap:s,errorHandler:r}){try{const o=s.get(t)||e,l="commands"in o?o.commands:[o];if([Hs.WebGL,Hs.WebGL2].includes(e.type)){for(let t=0;l.length>t;t++){const s=l[t];yield ko({mutation:s,type:e.type,target:i,imageMap:n,errorHandler:r})}return}yield function(t){return Mo.apply(this,arguments)}({event:t,mutations:l,target:i,imageMap:n,errorHandler:r})}catch(t){r(e,t)}}),Eo.apply(this,arguments)}var Ao=["AUDIO","VIDEO"],Io=class{constructor(t){ns(this,"mediaMap",new Map),ns(this,"warn",void 0),ns(this,"service",void 0),ns(this,"speedService",void 0),ns(this,"emitter",void 0),ns(this,"getCurrentTime",void 0),ns(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(zs.Start,this.start.bind(this)),this.emitter.on(zs.SkipStart,this.start.bind(this)),this.emitter.on(zs.Pause,this.pause.bind(this)),this.emitter.on(zs.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((e,i)=>{this.syncTargetWithState(i),t.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:e,mediaState:i}){if(i.isPlaying){const n=(t-i.lastInteractionTimeOffset)/1e3*i.playbackRate,s="duration"in e&&e.duration;if(Number.isNaN(s))return void this.waitForMetadata(e);let r=i.currentTimeAtLastInteraction+n;e.loop&&!1!==s&&(r%=s),e.currentTime=r}else e.pause(),e.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t))return;if(!("addEventListener"in t))return;const e=()=>{this.metadataCallbackMap.delete(t);const e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:e,mutation:i}){var n,s,r,o,l;const a=this.mediaMap.get(t),{type:h,playbackRate:u,currentTime:c,muted:f,volume:d,loop:p}=i;return{isPlaying:h===Gs.Play||h!==Gs.Pause&&((null==a?void 0:a.isPlaying)||null!==t.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(n=null!=c?c:null==a?void 0:a.currentTimeAtLastInteraction)&&void 0!==n?n:0,lastInteractionTimeOffset:e,playbackRate:null!==(s=null!=u?u:null==a?void 0:a.playbackRate)&&void 0!==s?s:1,volume:null!==(r=null!=d?d:null==a?void 0:a.volume)&&void 0!==r?r:1,muted:null!==(o=null!=f?f:null==a?void 0:a.muted)&&void 0!==o?o:null===t.getAttribute("muted"),loop:null!==(l=null!=p?p:null==a?void 0:a.loop)&&void 0!==l?l:null===t.getAttribute("loop")}}syncTargetWithState(t){const e=this.mediaMap.get(t);if(!e)return;const{muted:i,loop:n,volume:s,isPlaying:r}=e,o=this.service.state.matches("paused"),l=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==s&&(t.volume=s),t.muted=i,t.loop=n,t.playbackRate!==l&&(t.playbackRate=l),r&&!o?t.play():t.pause()}catch(t){this.warn(`Failed to replay media interactions: ${t.message||t}`)}}addMediaElements(t,e,i){if(!this.isSupportedMediaElement(t))return;const n=t,s=i.getMeta(n);if(!s||!("attributes"in s))return;const r=this.service.state.matches("paused"),o=s.attributes;let l=!1;l=o.rr_mediaState?"played"===o.rr_mediaState:null!==n.getAttribute("autoplay"),l&&r&&n.pause();let a=1;"number"==typeof o.rr_mediaPlaybackRate&&(a=o.rr_mediaPlaybackRate);let h=!1;h="boolean"==typeof o.rr_mediaMuted?o.rr_mediaMuted:null!==n.getAttribute("muted");let u=!1;u="boolean"==typeof o.rr_mediaLoop?o.rr_mediaLoop:null!==n.getAttribute("loop");let c=1;"number"==typeof o.rr_mediaVolume&&(c=o.rr_mediaVolume);let f=0;"number"==typeof o.rr_mediaCurrentTime&&(f=o.rr_mediaCurrentTime),this.mediaMap.set(n,{isPlaying:l,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:e,playbackRate:a,volume:c,muted:h,loop:u}),this.syncTargetWithState(n)}mediaMutation({target:t,timeOffset:e,mutation:i}){Ao.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:e,mutation:i})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Ao.includes(t.nodeName)}reset(){this.mediaMap.clear()}};function Ro(t,e){if("DIALOG"!==t.nodeName||t instanceof on)return;const i=t,n=i.open,s=n&&i.matches("dialog:modal"),r=i.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof i.getAttribute("open"),l="modal"===r;(!n||s&&"non-modal"===r||!s&&l)&&(i.isConnected?(n&&i.close(),o&&(l?i.showModal():i.show())):console.warn("dialog is not attached to the dom",i))}function To(t,e){if("DIALOG"!==t.nodeName||t instanceof on)return;const i=t;i.isConnected?null===e.attributes.open&&(i.removeAttribute("open"),i.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",i)}var Oo=Jr||Xr,Do="[replayer]",No={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Lo(t){return t.type==Bs.IncrementalSnapshot&&(t.data.source==Us.TouchMove||t.data.source==Us.MouseInteraction&&t.data.type==Ws.TouchStart)}var _o=class{get timer(){return this.service.state.context.timer}constructor(t,e){if(ns(this,"wrapper",void 0),ns(this,"iframe",void 0),ns(this,"service",void 0),ns(this,"speedService",void 0),ns(this,"config",void 0),ns(this,"usingVirtualDom",!1),ns(this,"virtualDom",new Rn),ns(this,"mouse",void 0),ns(this,"mouseTail",null),ns(this,"tailPositions",[]),ns(this,"emitter",Oo()),ns(this,"nextUserInteractionEvent",void 0),ns(this,"legacy_missingNodeRetryMap",{}),ns(this,"cache",Ae()),ns(this,"imageMap",new Map),ns(this,"canvasEventMap",new Map),ns(this,"mirror",St()),ns(this,"styleMirror",new Ns),ns(this,"pendingAdoptedStyleSheets",new Map),ns(this,"lastAdoptedStyleIds",new Map),ns(this,"adoptedStyleSheetTokens",new Map),ns(this,"mediaManager",void 0),ns(this,"firstFullSnapshot",null),ns(this,"newDocumentQueue",[]),ns(this,"mousePos",null),ns(this,"touchActive",null),ns(this,"lastMouseDownEvent",null),ns(this,"lastHoveredRootNode",void 0),ns(this,"lastSelectionData",null),ns(this,"lastScrollMap",new Map),ns(this,"constructedStyleMutations",[]),ns(this,"adoptedStyleSheets",[]),ns(this,"emitterHandlers",[]),ns(this,"serviceSubscription",void 0),ns(this,"speedServiceSubscription",void 0),ns(this,"timeouts",new Set),ns(this,"applyGeneration",0),ns(this,"seekRebuildInFlight",!1),ns(this,"seekNeedsFullRebuild",!1),ns(this,"styleSheetLoadListeners",new Map),ns(this,"handleResize",t=>{this.iframe.style.display="inherit";for(const e of[this.mouseTail,this.iframe])e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))}),ns(this,"shouldCastInSyncMode",t=>{switch(t.type){case Bs.DomContentLoaded:case Bs.Load:return!1;case Bs.Custom:return t.data.tag===js;default:return!0}}),ns(this,"applyEvents",(t,e)=>{var i;const n=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e;const{events:i,castEvent:n,yieldBudgetMs:s,schedule:r,isCancelled:o,onComplete:l}=t,a=null!==(e=t.now)&&void 0!==e?e:()=>performance.now();let h=0;const u=t=>{if(!t&&o())return;const e=(()=>{const t=s>0?a()+s:1/0;for(;i.length>h;){if(n(i[h]),h++,o())return!1;if(a()>=t)break}return h>=i.length})();o()||(e?l(t):r(()=>u(!1)))};u(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>{try{this.getCastFn(t,!0)()}catch(t){n===this.applyGeneration&&(this.seekNeedsFullRebuild=!0),this.warn("Exception in fast-forward event",t)}},yieldBudgetMs:null!==(i=this.config.seekYieldBudgetMs)&&void 0!==i?i:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>n!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(zs.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})}),ns(this,"getCastFn",(t,e=!1)=>{let i;switch(t.type){case Bs.DomContentLoaded:case Bs.Load:break;case Bs.Custom:i=()=>{e||this.emitter.emit(zs.CustomEvent,t),"rrweb/fullscreen"===t.data.tag&&this.applyFullscreen(t.data.payload)};break;case Bs.Meta:i=()=>this.emitter.emit(zs.Resize,{width:t.data.width,height:t.data.height});break;case Bs.FullSnapshot:i=()=>{var i;if(this.clearFullscreen(),this.firstFullSnapshot){if(this.firstFullSnapshot===t)return void(this.firstFullSnapshot=!0)}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.rebuildFullSnapshot(t,e),null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo(n(n({},t.data.initialOffset),{},{behavior:"instant"}))};break;case Bs.IncrementalSnapshot:i=()=>{if(this.applyIncremental(t,e),!e&&(t===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const e of this.service.state.context.events)if(e.timestamp>t.timestamp&&this.isUserInteraction(e)){e.delay-t.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=e);break}if(this.nextUserInteractionEvent){const e={speed:Math.min(Math.round((this.nextUserInteractionEvent.delay-t.delay)/5e3),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:e}),this.emitter.emit(zs.SkipStart,e)}}}}return()=>{i&&i();for(const i of this.config.plugins||[])i.handler&&i.handler(t,e,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:t}});const n=this.service.state.context.events.length-1;if(!this.config.liveMode&&t===this.service.state.context.events[n]){const e=this.applyGeneration,i=()=>{e===this.applyGeneration&&(this.seekRebuildInFlight?this.addTimeout(i,50):this.service.state.context.events.length-1>n||(this.backToNormal(),this.service.send("END"),this.emitter.emit(zs.Finish)))};let s=50;if(t.type===Bs.IncrementalSnapshot&&t.data.source===Us.MouseMove){const e=io(t.data);void 0!==e&&(s+=Math.max(0,-e))}setTimeout(i,s)}this.emitter.emit(zs.EventCast,t)}}),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");const i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:No,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};this.config=Object.assign({},i,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(zs.Resize,this.handleResize),this.setupDom();for(const t of this.config.plugins||[])t.getMirror&&t.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(zs.Flush,()=>{if(this.usingVirtualDom){const t={mirror:this.mirror,applyCanvas:(t,e,i)=>{xo({event:t,mutation:e,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===Us.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===Us.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(const i of this.config.plugins||[])i.onBuild&&i.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{Cn(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const e in this.legacy_missingNodeRetryMap)try{const i=this.legacy_missingNodeRetryMap[e],n=En(i.node,this.mirror,this.virtualDom.mirror);Cn(n,i.node,t,this.virtualDom.mirror),i.node=n}catch(t){this.warn(t)}this.constructedStyleMutations.forEach(t=>{this.applyStyleSheetMutation(t)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(t=>{this.applyAdoptedStyleSheet(t)}),this.adoptedStyleSheets=[],this.pendingAdoptedStyleSheets.forEach((t,e)=>{this.applyAdoptedStyleSheet({source:Us.AdoptedStyleSheet,id:e,styleIds:t})})}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[t,e]=this.lastMouseDownEvent;t.dispatchEvent(e)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach(t=>{this.applyScroll(t,!0)}),this.lastScrollMap.clear())}),this.addEmitterHandler(zs.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()});const s=new to([],{speed:this.config.speed,onActionError:t=>this.warn("Exception in timer action",t)});this.service=function(t,{getCastFn:e,applyEvents:i,emitter:s}){return vo(po({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},RESET_LAST_PLAYED:{target:"playing",actions:["resetLastPlayedEvent"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},RESET_LAST_PLAYED:{target:"paused",actions:["resetLastPlayedEvent"]},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:lo({lastPlayedEvent(t,e){return"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}}),recordTimeOffset:lo((t,e)=>{let i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),n(n({},t),{},{timeOffset:i,baselineTime:t.events[0].timestamp+i})}),play(t){const{timer:n,events:r,baselineTime:o,lastPlayedEvent:l}=t;n.clear(),n.timeOffset=0;for(const t of r)no(t,o);const a=yo(r,o),h=a.some(t=>t.type===Bs.FullSnapshot&&t.timestamp===o);let u=null==l?void 0:l.timestamp;if((null==l?void 0:l.type)===Bs.IncrementalSnapshot&&l.data.source===Us.MouseMove){const t=io(l.data);void 0!==t&&(u=l.timestamp+t)}(u||0)>o&&s.emit(zs.PlayBack);const c=new Array;for(const t of a)(!u||u>=o||t.timestamp>u&&t!==l)&&(o>t.timestamp||h&&t.timestamp===o&&(t.type===Bs.Meta||t.type===Bs.FullSnapshot))&&c.push(t);i(c,()=>{for(const i of yo(t.events,o)){if(o>i.timestamp||h&&i.timestamp===o&&(i.type===Bs.Meta||i.type===Bs.FullSnapshot))continue;if(u&&o>u&&i===l)continue;const t=e(i,!1);n.addAction({doAction(){t()},delay:i.delay})}n.start()})},pause(t){t.timer.clear()},resetLastPlayedEvent:lo(t=>n(n({},t),{},{lastPlayedEvent:null})),startLive:lo({baselineTime(t,e){return t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now()}}),addEvent:lo((t,i)=>{const{baselineTime:s,timer:r,events:o}=t;if("ADD_EVENT"===i.type){const{event:t}=i.payload;no(t,s);let n=o.length-1;if(o[n]&&o[n].timestamp>t.timestamp){let e=-1,i=0;for(;n>=i;){const e=Math.floor((i+n)/2);o[e].timestamp>t.timestamp?n=e-1:i=e+1}-1===e&&(e=i),o.splice(e,0,t)}else o.push(t);if(s>t.timestamp)i.payload.applyPastEventSynchronously&&e(t,!0)();else if(r.isActive()){const i=e(t,!1);r.addAction({doAction(){i()},delay:t.delay})}}return n(n({},t),{},{events:o})})}}))}({events:t.map(t=>e&&e.unpackFn?e.unpackFn(t):t).sort((t,e)=>t.timestamp-e.timestamp),timer:s,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe(t=>{this.emitter.emit(zs.StateChange,{player:t})}),this.speedService=vo(po({id:"speed",context:{normalSpeed:-1,timer: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,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:lo({normalSpeed:t=>t.timer.speed}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}})),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(t=>{this.emitter.emit(zs.StateChange,{speed:t})}),this.mediaManager=new Io({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const r=this.service.state.context.events.find(t=>t.type===Bs.Meta),o=this.service.state.context.events.find(t=>t.type===Bs.FullSnapshot);if(r){const{width:t,height:e}=r.data;this.addTimeout(()=>{this.emitter.emit(zs.Resize,{width:t,height:e})},0)}o&&this.addTimeout(()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),null===(t=this.iframe.contentWindow)||void 0===t||t.scrollTo(n(n({},o.data.initialOffset),{},{behavior:"instant"})))},1),this.service.state.context.events.find(Lo)&&this.mouse.classList.add("touch-device")}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){const i=setTimeout(()=>{this.timeouts.delete(i),t()},e);return this.timeouts.add(i),i}setConfig(t){Object.keys(t).forEach(e=>{this.config[e]=t[e]}),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?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(){const t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:e}=this.service.state.context;return t-e[0].timestamp}getMirror(){return this.mirror}play(t=0){var e;(this.seekRebuildInFlight||this.seekNeedsFullRebuild)&&(this.service.send({type:"RESET_LAST_PLAYED"}),this.seekNeedsFullRebuild=!1),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.remove("rrweb-paused"),this.emitter.emit(zs.Start)}pause(t){var e;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.add("rrweb-paused"),this.emitter.emit(zs.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(zs.Resume)}destroy(){var t,e,i;this.serviceSubscription&&(this.pause(),this.emitterHandlers.forEach(({event:t,handler:e})=>{this.emitter.off(t,e)}),this.emitterHandlers=[],null===(t=this.serviceSubscription)||void 0===t||t.unsubscribe(),null===(e=this.speedServiceSubscription)||void 0===e||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((t,e)=>{e.removeEventListener("load",t)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),null===(i=this.wrapper.parentNode)||void 0===i||i.removeChild(this.wrapper),this.emitter.emit(zs.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(zs.Flush),this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("playing")&&this.service.send({type:"PAUSE"})),this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const e=this.config.unpackFn?this.config.unpackFn(t):t;Lo(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}}))}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=Ae()}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),!1!==this.config.mouseTail&&(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");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Qr(this.iframe.contentWindow,this.iframe.contentDocument),Cs(this.iframe.contentWindow))}applyFullscreen(t){const e=t;if(!e||"number"!=typeof e.id||"boolean"!=typeof e.enter)return;const i=this.mirror.getNode(e.id);if(!i||i.nodeType!==Node.ELEMENT_NODE)return;const n=i;e.enter?n.setAttribute("rr_fullscreen",""):n.removeAttribute("rr_fullscreen")}clearFullscreen(){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll("[rr_fullscreen]").forEach(t=>t.removeAttribute("rr_fullscreen"))}discardStaleFlushBuffers(){this.lastScrollMap.clear(),this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[]}rebuildFullSnapshot(t,e=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const i=[],n=new Set,s=(e,s)=>{if("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)){const{events:i}=this.service.state.context;this.mediaManager.addMediaElements(e,t.timestamp-i[0].timestamp,this.mirror)}for(const t of this.config.plugins||[])t.onBuild&&t.onBuild(e,{id:s,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){const{doc:i,onVisit:n,hackCss:s=!0,afterAppend:r,cache:o,mirror:l=new wt}=e,a=Oe(t,{doc:i,mirror:l,skipChild:!1,hackCss:s,afterAppend:r,cache:o});(function(t,e){function i(t){e(t)}for(const e of t.getIds())t.has(e)&&i(t.getNode(e))})(l,t=>{n&&n(t),function(t,e){const i=e.getMeta(t);if((null==i?void 0:i.type)!==f.Element)return;const n=t;for(const t in i.attributes){if(!{}.hasOwnProperty.call(i.attributes,t)||!t.startsWith("rr_"))continue;const e=i.attributes[t];"rr_scrollLeft"===t&&(n.scrollLeft=e),"rr_scrollTop"===t&&(n.scrollTop=e)}}(t,l)})}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:t,builtNode:e}of i)this.attachDocumentToIframe(t,e),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t);const{documentElement:r,head:o}=this.iframe.contentDocument;this.insertStyleRules(r,o),n.forEach(t=>Ro(t)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(zs.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){const i=(n=this.config.blockClass,[`.${n} { background: currentColor }`,"noscript { display: none !important; }","[rr_fullscreen] { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; max-width: none !important; max-height: none !important; z-index: 2147483647 !important; }"]).concat(this.config.insertStyleRules);var n;if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,$n(n,this.virtualDom.unserializedId)),t.insertBefore(n,e),n.rules.push({source:Us.StyleSheetRule,adds:i.map((t,e)=>({rule:t,index:e}))})}else{const n=document.createElement("style");t.insertBefore(n,e);for(let t=0;i.length>t;t++){var s;null===(s=n.sheet)||void 0===s||s.insertRule(i[t],t)}}}attachDocumentToIframe(t,e){const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,r=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);const o=i.getMeta(t);if((null==o?void 0:o.type)===Vs.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){const{documentElement:t,head:i}=e.contentDocument;this.insertStyleRules(t,i)}if(!this.usingVirtualDom)for(const e of this.config.plugins||[])e.onBuild&&e.onBuild(t,{id:r,replayer:this})};Oe(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:r,cache:this.cache}),r(e.contentDocument,t.node.id);for(const{mutationInQueue:t,builtNode:e}of n)this.attachDocumentToIframe(t,e),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t);s.forEach(t=>Ro(t))}collectIframeAndAttachDocument(t,e){if(Es(e,this.mirror)){const i=this.newDocumentQueue.find(t=>t.parentId===this.mirror.getId(e));i&&t.push({mutationInQueue:i,builtNode:e})}}waitForStylesheetLoad(){var t;const e=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(e){const t=new Set;let i,n=this.service.state;const s=()=>{n=this.service.state};this.emitter.on(zs.Start,s),this.emitter.on(zs.Pause,s);const r=()=>{this.emitter.off(zs.Start,s),this.emitter.off(zs.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{e.sheet||(t.add(e),e.addEventListener("load",()=>{t.delete(e),0===t.size&&-1!==i&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(zs.LoadStylesheetEnd),i&&clearTimeout(i),r())}))}),t.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(zs.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,r()},this.config.loadTimeout))}}preloadAllImages(){var t=this;return o(function*(){const e=[];for(const i of t.service.state.context.events)i.type===Bs.IncrementalSnapshot&&i.data.source===Us.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(i.data,i)),("commands"in i.data?i.data.commands:[i.data]).forEach(e=>{t.preloadImages(e,i)}));return Promise.all(e)})()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){const t=document.createElement("canvas"),e=t.getContext("2d"),i=null==e?void 0:e.createImageData(t.width,t.height);null==e||e.putImageData(i,0,0)}}deserializeAndPreloadCanvasEvents(t,e){var i=this;return o(function*(){if(!i.canvasEventMap.has(e)){const r={isUnchanged:!0};if("commands"in t){const l=yield Promise.all(t.commands.map((s=o(function*(t){const e=yield Promise.all(t.args.map(wo(i.imageMap,null,r)));return n(n({},t),{},{args:e})}),function(t){return s.apply(this,arguments)})));!1===r.isUnchanged&&i.canvasEventMap.set(e,n(n({},t),{},{commands:l}))}else{const s=yield Promise.all(t.args.map(wo(i.imageMap,null,r)));!1===r.isUnchanged&&i.canvasEventMap.set(e,n(n({},t),{},{args:s}))}}var s})()}applyIncremental(t,e){const{data:i}=t;if(this.iframe.contentDocument)switch(i.source){case Us.Mutation:try{this.applyMutation(i,e)}catch(t){this.warn(`Exception in mutation ${t.message||t}`,i)}break;case Us.Drag:case Us.TouchMove:case Us.MouseMove:if(!Array.isArray(i.positions)||!i.positions.length)break;if(e){const t=i.positions[i.positions.length-1];this.mousePos={x:t.x,y:t.y,id:t.id,debugData:i}}else{var n;i.positions.forEach(n=>{const s=eo(n);void 0!==s&&this.timer.addAction({doAction:()=>{this.moveAndHover(n.x,n.y,n.id,e,i)},delay:s+t.timestamp-this.service.state.context.baselineTime})}),this.timer.addAction({doAction(){},delay:t.delay-(null!==(n=io(i))&&void 0!==n?n:0)})}break;case Us.MouseInteraction:{if(-1===i.id)break;const t=new Event(Ct(Ws[i.type])),n=this.mirror.getNode(i.id);if(!n)return this.debugNodeNotFound(i,i.id);this.emitter.emit(zs.MouseInteraction,{type:i.type,target:n});const{triggerFocus:s}=this.config;switch(i.type){case Ws.Blur:"blur"in n&&n.blur();break;case Ws.Focus:s&&n.focus&&n.focus({preventScroll:!0});break;case Ws.Click:case Ws.TouchStart:case Ws.TouchEnd:case Ws.MouseDown:case Ws.MouseUp:e?(i.type===Ws.TouchStart?this.touchActive=!0:i.type===Ws.TouchEnd&&(this.touchActive=!1),i.type===Ws.MouseDown?this.lastMouseDownEvent=[n,t]:i.type===Ws.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:i.x||0,y:i.y||0,id:i.id,debugData:i}):(i.type===Ws.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(i.x||0,i.y||0,i.id,e,i),i.type===Ws.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):i.type===Ws.TouchStart?this.mouse.classList.add("touch-active"):i.type===Ws.TouchEnd?this.mouse.classList.remove("touch-active"):n.dispatchEvent(t));break;case Ws.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:n.dispatchEvent(t)}break}case Us.Scroll:if(-1===i.id)break;if(e&&this.lastScrollMap.set(i.id,i),this.usingVirtualDom){const t=this.virtualDom.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);t.scrollData=i;break}this.applyScroll(i,e);break;case Us.ViewportResize:this.emitter.emit(zs.Resize,{width:i.width,height:i.height});break;case Us.Input:if(-1===i.id)break;if(this.usingVirtualDom){const t=this.virtualDom.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);t.inputData=i;break}this.applyInput(i);break;case Us.MediaInteraction:{const e=this.usingVirtualDom?this.virtualDom.mirror.getNode(i.id):this.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);const n=e,{events:s}=this.service.state.context;this.mediaManager.mediaMutation({target:n,timeOffset:t.timestamp-s[0].timestamp,mutation:i});break}case Us.StyleSheetRule:case Us.StyleDeclaration:var s;this.usingVirtualDom?i.styleId?this.constructedStyleMutations.push(i):i.id&&(null===(s=this.virtualDom.mirror.getNode(i.id))||void 0===s||s.rules.push(i)):this.applyStyleSheetMutation(i);break;case Us.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.canvasMutations.push({event:t,mutation:i})}else{const e=this.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);xo({event:t,mutation:i,target:e,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Us.Font:try{var r;const t=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);null===(r=this.iframe.contentDocument)||void 0===r||r.fonts.add(t)}catch(t){this.warn(t)}break;case Us.Selection:if(e){this.lastSelectionData=i;break}this.applySelection(i);break;case Us.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(i):this.applyAdoptedStyleSheet(i)}}applyMutation(t,e){if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,function(t,e=function(){return new yi}(),i=new Rn){(function t(n,s){const r=Un(n,i,e,s);if(null!==r)if("IFRAME"!==(null==s?void 0:s.nodeName)&&n.nodeType!==bn.DOCUMENT_FRAGMENT_NODE&&(null==s||s.appendChild(r),r.parentNode=s,r.parentElement=s),"IFRAME"===n.nodeName){const e=n.contentDocument;e&&t(e,r)}else n.nodeType!==bn.DOCUMENT_NODE&&n.nodeType!==bn.ELEMENT_NODE&&n.nodeType!==bn.DOCUMENT_FRAGMENT_NODE||(n.nodeType===bn.ELEMENT_NODE&&n.shadowRoot&&t(n.shadowRoot,r),n.childNodes.forEach(e=>t(e,r)))})(t,null)}(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const t in this.legacy_missingNodeRetryMap)try{const e=this.legacy_missingNodeRetryMap[t],i=Un(e.node,this.virtualDom,this.mirror);i&&(e.node=i)}catch(t){this.warn(t)}const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter(e=>!!i.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1)).forEach(e=>{const n=i.getNode(e.id);if(!n)return;let s=i.getNode(e.parentId);if(!s)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&Rs(s)&&(s=s.shadowRoot),i.removeNodeFromMap(n),s)try{var r;s.removeChild(n),this.usingVirtualDom&&"#text"===n.nodeName&&"STYLE"===s.nodeName&&(null===(r=s.rules)||void 0===r?void 0:r.length)>0&&(s.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",s,n,t)}});const s=n({},this.legacy_missingNodeRetryMap),r=[],o=e=>{var n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let o=i.getNode(e.parentId);if(!o)return e.node.type===Vs.Document?this.newDocumentQueue.push(e):t.adds.some(t=>t.node.id===e.parentId)?r.push(e):void 0;if(e.node.isShadow){var l;if(Rs(o))o=o.shadowRoot;else{if(!lt(o))return this.warn("Parent does not support shadow root, skipping mutation",e);o=o.shadowRoot}const t=null!==(l=this.lastAdoptedStyleIds.get(e.parentId))&&void 0!==l?l:this.pendingAdoptedStyleSheets.get(e.parentId);t&&(this.usingVirtualDom?this.pendingAdoptedStyleSheets.set(e.parentId,t):this.applyAdoptedStyleSheet({source:Us.AdoptedStyleSheet,id:e.parentId,styleIds:t}))}let a=null,h=null;if(e.previousId&&(a=i.getNode(e.previousId)),e.nextId&&(h=i.getNode(e.nextId)),e.node.rootId&&!i.getNode(e.node.rootId))return;const u=e.node.rootId?i.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Es(o,i))return void this.attachDocumentToIframe(e,o);const c=(t,e)=>{if(!this.usingVirtualDom){Ro(t);for(const i of this.config.plugins||[])i.onBuild&&i.onBuild(t,{id:e,replayer:this})}},f=Oe(e.node,{doc:u,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:c});if(-1===e.previousId||-1===e.nextId)return void(s[e.node.id]={node:f,mutation:e});const d=i.getMeta(o);if(d&&d.type===Vs.Element&&e.node.type===Vs.Text){const t=Array.isArray(o.childNodes)?o.childNodes:Array.from(o.childNodes);if("textarea"===d.tagName)for(const e of t)e.nodeType===o.TEXT_NODE&&o.removeChild(e);else if("style"===d.tagName&&1===t.length)for(const e of t)e.nodeType!==o.TEXT_NODE||i.hasNode(e)||(f.textContent=e.textContent,o.removeChild(e))}else if((null==d?void 0:d.type)===Vs.Document){var p;const t=o;e.node.type===Vs.DocumentType&&(null===(p=t.childNodes[0])||void 0===p?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&t.removeChild(t.childNodes[0]),"HTML"===f.nodeName&&t.documentElement&&t.removeChild(t.documentElement)}if(a&&a.nextSibling&&a.nextSibling.parentNode?o.insertBefore(f,a.nextSibling):h&&h.parentNode?o.contains(h)?o.insertBefore(f,h):o.insertBefore(f,null):o.appendChild(f),c(f,e.node.id),this.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===o.nodeName&&(null===(n=o.rules)||void 0===n?void 0:n.length)>0&&(o.rules=[]),Es(f,this.mirror)){const t=this.mirror.getId(f),e=this.newDocumentQueue.find(e=>e.parentId===t);e&&(this.attachDocumentToIframe(e,f),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(s,o,f,e)};t.adds.forEach(t=>{o(t)});const l=performance.now();for(;r.length;){const t=Ms(r);if(r.length=0,performance.now()-l>150){this.warn("Timeout in the loop, please check the resolve tree data:",t);break}for(const e of t)i.getNode(e.value.parentId)?xs(e,t=>{o(t)}):this.debug("Drop resolve tree since there is no parent for the root node.",e)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),Ds(t.texts).forEach(e=>{const n=i.getNode(e.id);if(!n){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}if(n.textContent=e.value,this.usingVirtualDom){var s;const t=n.parentNode;(null==t||null===(s=t.rules)||void 0===s?void 0:s.length)>0&&(t.rules=[])}}),t.attributes.forEach(e=>{const s=i.getNode(e.id);if(!s){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}for(const t in e.attributes)if("string"==typeof t){const l=e.attributes[t];if("autocomplete"===t&&("INPUT"===s.nodeName||"TEXTAREA"===s.nodeName))continue;if(null===l)s.removeAttribute(t),"open"===t&&To(s,e);else if("string"==typeof l)try{var r;if("_cssText"===t&&("LINK"===s.nodeName||"STYLE"===s.nodeName))try{const t=i.getMeta(s),r=s.nextSibling,o=s.parentNode,l=Oe(n(n({},t),{},{attributes:n(n({},t.attributes),e.attributes)}),{doc:s.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache});if(Object.assign(t.attributes,e.attributes),l&&o){s.parentNode===o&&o.removeChild(s),o.insertBefore(l,r),i.replace(e.id,l);break}}catch(t){}if("value"===t&&"TEXTAREA"===s.nodeName){var o;const t=s;t.childNodes.forEach(e=>t.removeChild(e));const e=null===(o=s.ownerDocument)||void 0===o?void 0:o.createTextNode(l);e&&t.appendChild(e)}else"xlink:href"===t&&(null===(r=i.getMeta(s))||void 0===r?void 0:r.isSVG)?s.setAttributeNS("http://www.w3.org/1999/xlink",t,l):s.setAttribute(t,l);"rr_open_mode"===t&&"DIALOG"===s.nodeName&&Ro(s,e)}catch(t){this.warn("An error occurred may due to the checkout feature.",t)}else if("style"===t){const t=l,e=s;for(const i in t)if(!1===t[i])e.style.removeProperty(i);else if(t[i]instanceof Array){const n=t[i];e.style.setProperty(i,n[0],n[1])}else e.style.setProperty(i,t[i])}}})}applyScroll(t,e){const i=this.mirror.getNode(t.id);if(!i)return this.debugNodeNotFound(t,t.id);const n=this.mirror.getMeta(i);var s;if(i===this.iframe.contentDocument)null===(s=this.iframe.contentWindow)||void 0===s||s.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==n?void 0:n.type)===Vs.Document){var r;null===(r=i.defaultView)||void 0===r||r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}else try{i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){const e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{const e=new Set,i=t.ranges.map(({start:t,startOffset:i,end:n,endOffset:s})=>{const r=this.mirror.getNode(t),o=this.mirror.getNode(n);if(!r||!o)return;const l=new Range;l.setStart(r,i),l.setEnd(o,s);const a=r.ownerDocument,h=null==a?void 0:a.getSelection();return h&&e.add(h),{range:l,selection:h}});e.forEach(t=>t.removeAllRanges()),i.forEach(t=>{var e;return t&&(null===(e=t.selection)||void 0===e?void 0:e.addRange(t.range))})}catch(t){}}applyStyleSheetMutation(t){var e;let i=null;t.styleId?i=this.styleMirror.getStyle(t.styleId):t.id&&(i=(null===(e=this.mirror.getNode(t.id))||void 0===e?void 0:e.sheet)||null),i&&(t.source===Us.StyleSheetRule?this.applyStyleSheetRule(t,i):t.source===Us.StyleDeclaration&&this.applyStyleDeclaration(t,i))}applyStyleSheetRule(t,e){var i,n;if(null===(i=t.adds)||void 0===i||i.forEach(({rule:t,index:i})=>{try{if(Array.isArray(i)){const{positions:n,index:s}=Os(i),r=Ts(e.cssRules,n);null==r||r.insertRule(t,s)}else{const n=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(t,n)}}catch(t){}}),null===(n=t.removes)||void 0===n||n.forEach(({index:t})=>{try{if(Array.isArray(t)){const{positions:i,index:n}=Os(t),s=Ts(e.cssRules,i);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(t)}catch(t){}}),"string"==typeof t.replace)try{var s;null===(s=e.replace)||void 0===s||s.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{var r;null===(r=e.replaceSync)||void 0===r||r.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){if(t.set){var i;const n=Ts(e.rules,t.index);null==n||null===(i=n.style)||void 0===i||i.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var n;const i=Ts(e.rules,t.index);null==i||null===(n=i.style)||void 0===n||n.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e;this.lastAdoptedStyleIds.set(t.id,t.styleIds);const i=this.mirror.getNode(t.id);if(!i)return;const n={};this.adoptedStyleSheetTokens.set(t.id,n),null===(e=t.styles)||void 0===e||e.forEach(t=>{var e;let n=null,s=null;if(s="#document"===i.nodeName?i.defaultView:(null===(e=i.ownerDocument)||void 0===e?void 0:e.defaultView)||null,s)try{n=new s.CSSStyleSheet,this.styleMirror.add(n,t.styleId),this.applyStyleSheetRule({source:Us.StyleSheetRule,adds:t.rules},n)}catch(t){}});let s=0;const r=(e,i)=>{if(this.adoptedStyleSheetTokens.get(t.id)!==n)return;const o=i.map(t=>this.styleMirror.getStyle(t)).filter(t=>null!==t);let l=!1;try{Rs(e)?(e.shadowRoot.adoptedStyleSheets=o,l=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,l=!0)}catch(t){}l?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,i),l&&o.length===i.length||s>=10||(this.addTimeout(()=>r(e,i),0+100*s),s++)};r(i,t.styleIds)}legacy_resolveMissingNode(t,e,i,n){const{previousId:s,nextId:r}=n,o=s&&t[s],l=r&&t[r];if(o){const{node:n,mutation:s}=o;e.insertBefore(n,i),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,e,n,s)}if(l){const{node:n,mutation:s}=l;e.insertBefore(n,i.nextSibling),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,e,n,s)}}moveAndHover(t,e,i,n,s){const r=this.mirror.getNode(i);if(!r)return this.debugNodeNotFound(s,i);const o=Is(r,this.iframe),l=t*o.absoluteScale+o.x,a=e*o.absoluteScale+o.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${a}px`,n||this.drawMouseTail({x:l,y:a}),this.hoverElements(r)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:e,lineWidth:i,strokeStyle:n,duration:s}=!0===this.config.mouseTail?No:Object.assign({},No,this.config.mouseTail),r=()=>{if(!this.mouseTail)return;const t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=i,t.lineCap=e,t.strokeStyle=n,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(e=>t.lineTo(e.x,e.y)),t.stroke())};this.tailPositions.push(t),r(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(e=>e!==t),r()},s/this.speedService.state.context.timer.speed)}hoverElements(t){var e;null===(e=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===e||e.querySelectorAll(".\\:hover").forEach(t=>{t.classList.remove(":hover")});const i=t.getRootNode();this.lastHoveredRootNode=i.nodeType===Node.DOCUMENT_NODE||i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i:void 0;let n=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;for(;n;)n.classList.add(":hover"),n=n.parentElement}isUserInteraction(t){return t.type===Bs.IncrementalSnapshot&&t.data.source>Us.Mutation&&Us.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(zs.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn(`Node with id '${e}' not found. `,t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug(`Node with id '${e}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Do,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Do,...t)}},Fo=Zr.addCustomEvent,Po=Zr.freezePage,Bo=Zr.takeFullSnapshot;export{Bs as EventType,Us as IncrementalSource,Ws as MouseInteractions,_o as Replayer,zs as ReplayerEvents,Fo as addCustomEvent,xo as canvasMutation,Po as freezePage,tt as getDeferredStylesheetStats,R as getDiscardedDurationSamples,z as getLastSnapshotCost,et as getMutationCost,us as mirror,Zr as record,ti as resetMaxDepthState,it as resetSnapshotCostState,Bo as takeFullSnapshot,ss as utils,Ke as wasMaxDepthReached};
|
|
2
2
|
//# sourceMappingURL=rrweb.js.map
|